任务模块编写

main
dongdingding 2 months ago
parent ddc6006ee6
commit 51d93a6fe4

@ -3,12 +3,11 @@ package com.ruoyi.tc.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tc.domain.AssetLc; import com.ruoyi.tc.entity.AssetLc;
import com.ruoyi.tc.domain.request.AssetLcRequest; import com.ruoyi.tc.entity.request.AssetLcRequest;
import com.ruoyi.tc.service.AssetLcService; import com.ruoyi.tc.service.AssetLcService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;

@ -3,12 +3,18 @@ package com.ruoyi.tc.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tc.domain.AssetTask; import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import com.ruoyi.tc.service.AssetTaskService; import com.ruoyi.tc.service.AssetTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid;
/** /**
* (AssetTask) * (AssetTask)
@ -16,6 +22,7 @@ import javax.annotation.Resource;
* @author makejava * @author makejava
* @since 2024-11-18 13:22:58 * @since 2024-11-18 13:22:58
*/ */
@Api(tags = "任务主表")
@RestController @RestController
@RequestMapping("/unit/assetTask") @RequestMapping("/unit/assetTask")
public class AssetTaskController extends BaseController { public class AssetTaskController extends BaseController {
@ -32,8 +39,9 @@ public class AssetTaskController extends BaseController {
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
@GetMapping @ApiOperation(value = "分页查询", response = AssetTask.class)
public AjaxResult queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest) { @GetMapping("/page")
public AjaxResult queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest) {
return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest)); return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest));
} }
@ -43,6 +51,7 @@ public class AssetTaskController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@ApiOperation(value = "通过主键查询单条数据", response = AssetTaskIdResponse.class)
@GetMapping("{id}") @GetMapping("{id}")
public AjaxResult queryById(@PathVariable("id") Integer id) { public AjaxResult queryById(@PathVariable("id") Integer id) {
return AjaxResult.success(this.assetTaskService.queryById(id)); return AjaxResult.success(this.assetTaskService.queryById(id));
@ -54,9 +63,12 @@ public class AssetTaskController extends BaseController {
* @param assetTask * @param assetTask
* @return * @return
*/ */
@PostMapping @ApiOperation(value = "新增数据")
public AjaxResult add(AssetTask assetTask) { @PostMapping("/add")
return AjaxResult.success(this.assetTaskService.insert(assetTask)); @Transactional(rollbackFor = Exception.class)
public AjaxResult add(@RequestBody @Valid AssetTask assetTask) {
this.assetTaskService.insert(assetTask);
return AjaxResult.success();
} }
/** /**
@ -65,8 +77,9 @@ public class AssetTaskController extends BaseController {
* @param assetTask * @param assetTask
* @return * @return
*/ */
@PutMapping @ApiOperation(value = "编辑数据")
public AjaxResult edit(AssetTask assetTask) { @PostMapping("/edit")
public AjaxResult edit(@RequestBody @Valid AssetTask assetTask) {
return AjaxResult.success(this.assetTaskService.update(assetTask)); return AjaxResult.success(this.assetTaskService.update(assetTask));
} }
@ -76,8 +89,9 @@ public class AssetTaskController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@DeleteMapping @ApiOperation(value = "删除数据")
public AjaxResult deleteById(Integer id) { @PostMapping("/deleteById/{id}")
public AjaxResult deleteById(@PathVariable("id") Integer id) {
return AjaxResult.success(this.assetTaskService.deleteById(id)); return AjaxResult.success(this.assetTaskService.deleteById(id));
} }

@ -1,4 +1,4 @@
package com.ruoyi.tc.domain; package com.ruoyi.tc.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -1,4 +1,4 @@
package com.ruoyi.tc.domain; package com.ruoyi.tc.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -59,10 +59,10 @@ public class AssetTask implements Serializable {
@ApiModelProperty("任务状态1进行中2正常完成3超期完成4正常完成5审核驳回") @ApiModelProperty("任务状态1进行中2正常完成3超期完成4正常完成5审核驳回")
private String taskStatus; private String taskStatus;
/** /**
* id *
*/ */
@ApiModelProperty("单位id") @ApiModelProperty("单位名称")
private Integer dwId; private String dwmc;
/** /**
* id * id
*/ */

@ -1,4 +1,4 @@
package com.ruoyi.tc.domain.request; package com.ruoyi.tc.entity.request;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

@ -0,0 +1,55 @@
package com.ruoyi.tc.entity.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author dong
* @since 2024/11/19 10:27
*/
@Data
@ApiModel("任务主表分页请求类")
public class AssetTaskPageRequest {
/**
*
*/
@ApiModelProperty("任务名称")
private String taskName;
/**
*
*/
@ApiModelProperty("任务编号")
private String taskId;
/**
* 12345
*/
@ApiModelProperty("任务状态1进行中2正常完成3超期完成4正常完成5审核驳回")
private String taskStatus;
/**
*
*/
@ApiModelProperty("任务开始时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime begainTime;
/**
*
*/
@ApiModelProperty("任务结束时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endTime;
}

@ -0,0 +1,89 @@
package com.ruoyi.tc.entity.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (asset_basic_network)
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("资产基础网络复制表")
@TableName(value = "asset_basic_network_cp")
public class AssetBasicNetworkCpResponse extends BaseClass implements Serializable {
private Integer id;
/**
* id
*/
@ApiModelProperty("资源id")
private Long assetId;
/**
* 1.23
*/
@ApiModelProperty("1.服务器信息2网络设备3安全设备")
private Integer type;
/**
*
*/
@ApiModelProperty("设备类型")
private String sblx;
/**
*
*/
@ApiModelProperty("品牌")
private String pp;
/**
* IP
*/
@ApiModelProperty("设备IP")
private String sbIp;
/**
*
*/
@ApiModelProperty("操作系统")
private Integer czxt;
/**
*
*/
@ApiModelProperty("操作系统版本")
private String czxtbb;
/**
*
*/
@ApiModelProperty("硬件型号")
private String yjxh;
/**
*
*/
@ApiModelProperty("硬件序列号")
private String yjxlh;
/**
*
*/
@ApiModelProperty("硬件版本信息")
private String yjbbxx;
/**
*
*/
@ApiModelProperty("硬件用途")
private String yjyt;
/**
*
*/
@ApiModelProperty("硬件部署位置")
private String yjbsxx;
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,403 @@
package com.ruoyi.tc.entity.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* (asset_business_form_cp)
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("资产新监管业务形态复制表")
@TableName(value = "asset_business_form_cp")
public class AssetBusinessFormCpResponse extends BaseClass implements Serializable {
private Integer id;
/**
* id
*/
@ApiModelProperty("资源id")
private Long assetId;
/**
* -
*/
@Size(max= 50,message="云平台-云平台服务商长度不能超过50")
@ApiModelProperty("云平台-云平台服务商")
private String yptFws;
/**
* -
*/
@ApiModelProperty("云平台-是否租户级安全")
private Integer yptSfzh;
/**
* -
*/
@Size(max= 50,message="云平台-云平台类型长度不能超过50")
@ApiModelProperty("云平台-云平台类型")
private String yptLx;
/**
* -
*/
@Size(max= 50,message="云平台-硬件资源大小长度不能超过50")
@ApiModelProperty("云平台-硬件资源大小")
private String yptYjzydx;
/**
* -
*/
@Size(max= 50,message="云平台-平台架构长度不能超过50")
@ApiModelProperty("云平台-平台架构")
private String yptPtjg;
/**
* -IP
*/
@Size(max= 50,message="云平台-互联网IP段长度不能超过50")
@ApiModelProperty("云平台-互联网IP段")
private String yptIp;
/**
* -
*/
@Size(max= 50,message="云平台-机房联系人长度不能超过50")
@ApiModelProperty("云平台-机房联系人")
private String yptJflxr;
/**
* -
*/
@Size(max= 50,message="云平台-机房联系人电话长度不能超过50")
@ApiModelProperty("云平台-机房联系人电话")
private String yptJflxrdh;
/**
* -
*/
@Size(max= 50,message="云平台-服务器设备类型长度不能超过50")
@ApiModelProperty("云平台-服务器设备类型")
private String yptFwqsblx;
/**
* -
*/
@Size(max= 50,message="大数据平台-平台服务商长度不能超过50")
@ApiModelProperty("大数据平台-平台服务商")
private String dsjPtfws;
/**
* -
*/
@Size(max= 50,message="大数据平台-敏感数据类型长度不能超过50")
@ApiModelProperty("大数据平台-敏感数据类型")
private String dsjMgsjlx;
/**
* -
*/
@Size(max= 50,message="大数据平台-硬件资源长度不能超过50")
@ApiModelProperty("大数据平台-硬件资源")
private String dsjYjzy;
/**
* -
*/
@Size(max= 50,message="大数据平台-系统数据量长度不能超过50")
@ApiModelProperty("大数据平台-系统数据量")
private String dsjXtsjl;
/**
* -
*/
@Size(max= 50,message="大数据平台-机房联系人长度不能超过50")
@ApiModelProperty("大数据平台-机房联系人")
private String dsjJflxr;
/**
* -
*/
@Size(max= 50,message="大数据平台-机房联系人电话长度不能超过50")
@ApiModelProperty("大数据平台-机房联系人电话")
private String dsjJflxrdh;
/**
* -
*/
@ApiModelProperty("大数据平台-是否数据审计")
private Integer dsjSfsjsj;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-系统集成商名称长度不能超过50")
@ApiModelProperty("一般物联网设备-系统集成商名称")
private String wlwsbXtjcs;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-用户数量长度不能超过50")
@ApiModelProperty("一般物联网设备-用户数量")
private String wlwsbYhsl;
/**
* -
*/
@ApiModelProperty("一般物联网设备-服务对象")
private Integer wlwsbFwdx;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-终端数量长度不能超过50")
@ApiModelProperty("一般物联网设备-终端数量")
private String wlwsbZdsl;
/**
* -
*/
@ApiModelProperty("一般物联网设备-网络互联情况")
private Integer wlwsbWlhlqk;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-联系人长度不能超过50")
@ApiModelProperty("一般物联网设备-联系人")
private String wlwsbLxr;
/**
* -
*/
@ApiModelProperty("一般物联网设备-服务范围")
private Integer wlwsbFwfw;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-联系人电话长度不能超过50")
@ApiModelProperty("一般物联网设备-联系人电话")
private String wlwsbLxrdh;
/**
* -
*/
@Size(max= 500,message="一般物联网设备-服务内容长度不能超过500")
@ApiModelProperty("一般物联网设备-服务内容")
private String wlwsbFwnr;
/**
* -
*/
@Size(max= 50,message="摄像头-摄像头品牌长度不能超过50")
@ApiModelProperty("摄像头-摄像头品牌")
private String sxtPp;
/**
* -
*/
@Size(max= 255,message="摄像头-位置长度不能超过255")
@ApiModelProperty("摄像头-位置")
private String sxtWz;
/**
* -IP
*/
@Size(max= 50,message="摄像头-摄像头IP长度不能超过50")
@ApiModelProperty("摄像头-摄像头IP")
private String sxtIp;
/**
* -
*/
@Size(max= 50,message="摄像头-区域长度不能超过50")
@ApiModelProperty("摄像头-区域")
private String sxtQy;
/**
* -
*/
@Size(max= 50,message="摄像头-摄像头数量长度不能超过50")
@ApiModelProperty("摄像头-摄像头数量")
private String sxtSl;
/**
* -
*/
@Size(max= 50,message="摄像头-端口长度不能超过50")
@ApiModelProperty("摄像头-端口")
private String sxtDk;
/**
* -
*/
@Size(max= 50,message="摄像头-设备型号长度不能超过50")
@ApiModelProperty("摄像头-设备型号")
private String sxtSbxh;
/**
* -
*/
@Size(max= 50,message="摄像头-固定版本长度不能超过50")
@ApiModelProperty("摄像头-固定版本")
private String sxtGdbb;
/**
* APP-APP
*/
@Size(max= 50,message="移动APP-移动APP系统长度不能超过50")
@ApiModelProperty("移动APP-移动APP系统")
private String appXt;
/**
* APP-
*/
@Size(max= 50,message="移动APP-服务端域名长度不能超过50")
@ApiModelProperty("移动APP-服务端域名")
private String appYm;
/**
* APP-APP
*/
@Size(max= 50,message="移动APP-移动APP渠道长度不能超过50")
@ApiModelProperty("移动APP-移动APP渠道")
private String appQd;
/**
* APP-IP
*/
@Size(max= 50,message="移动APP-服务端IP长度不能超过50")
@ApiModelProperty("移动APP-服务端IP")
private String appIp;
/**
* APP-
*/
@Size(max= 50,message="移动APP-联系人长度不能超过50")
@ApiModelProperty("移动APP-联系人")
private String appLxr;
/**
* APP-
*/
@Size(max= 50,message="移动APP-联系人电话长度不能超过50")
@ApiModelProperty("移动APP-联系人电话")
private String appLxrdh;
/**
* APP-APP
*/
@ApiModelProperty("移动APP-APP是否有身份认证")
private Integer appSfysfrz;
/**
* -
*/
@Size(max= 255,message="工业控制-系统集成商名称长度不能超过255")
@ApiModelProperty("工业控制-系统集成商名称")
private String gykzJcs;
/**
* -
*/
@Size(max= 255,message="工业控制-运行时间长度不能超过255")
@ApiModelProperty("工业控制-运行时间")
private String gykzYxsj;
/**
* -
*/
@ApiModelProperty("工业控制-服务对象")
private Integer gykzFwdx;
/**
* -
*/
@Size(max= 255,message="工业控制-集成商国内外情况长度不能超过255")
@ApiModelProperty("工业控制-集成商国内外情况")
private String gykzJcsqk;
/**
* -
*/
@ApiModelProperty("工业控制-网络互联情况")
private Integer gykzWlhxqk;
/**
* -
*/
@Size(max= 255,message="工业控制-联系人长度不能超过255")
@ApiModelProperty("工业控制-联系人")
private String gykzLxr;
/**
* -
*/
@ApiModelProperty("工业控制-服务范围")
private Integer gykzFwfw;
/**
* -
*/
@Size(max= 50,message="工业控制-联系人电话长度不能超过50")
@ApiModelProperty("工业控制-联系人电话")
private String gykzLxrdh;
/**
* -
*/
@Size(max= 50,message="工业控制-设备名称长度不能超过50")
@ApiModelProperty("工业控制-设备名称")
private String gykzSbmc;
/**
* -
*/
@Size(max= 50,message="工业控制-设备品牌长度不能超过50")
@ApiModelProperty("工业控制-设备品牌")
private String gykzSbpp;
/**
* -
*/
@Size(max= 50,message="工业控制-设备类别长度不能超过50")
@ApiModelProperty("工业控制-设备类别")
private String gykzSblb;
/**
* -
*/
@Size(max= 50,message="工业控制-运营商长度不能超过50")
@ApiModelProperty("工业控制-运营商")
private String gykzYys;
/**
* -IP
*/
@Size(max= 50,message="工业控制-互联网IP长度不能超过50")
@ApiModelProperty("工业控制-互联网IP")
private String gykzHlwIp;
/**
* -
*/
@Size(max= 50,message="工业控制-网络层级长度不能超过50")
@ApiModelProperty("工业控制-网络层级")
private String gykzWlcj;
/**
* -IP
*/
@Size(max= 50,message="工业控制-控制台IP长度不能超过50")
@ApiModelProperty("工业控制-控制台IP")
private String gykzKztIp;
/**
* -
*/
@Size(max= 500,message="工业控制-描述长度不能超过500")
@ApiModelProperty("工业控制-描述")
private String gykzMs;
/**
* CDN-CDN
*/
@Size(max= 255,message="CDN信息-CDN供应商长度不能超过255")
@ApiModelProperty("CDN信息-CDN供应商")
private String cdnGys;
/**
* CDN-CDN使
*/
@ApiModelProperty("CDN信息-CDN是否使用")
private Integer cdnSfsy;
/**
* CDN-CDN
*/
@Size(max= 50,message="CDN信息-CDN类型长度不能超过50")
@ApiModelProperty("CDN信息-CDN类型")
private String cdnLx;
/**
* CDN-CDN
*/
@Size(max= 50,message="CDN信息-CDN域名长度不能超过50")
@ApiModelProperty("CDN信息-CDN域名")
private String cdnYm;
/**
* CDN-
*/
@Size(max= 50,message="CDN信息-联系人长度不能超过50")
@ApiModelProperty("CDN信息-联系人")
private String cdnLxr;
/**
* CDN-
*/
@Size(max= 50,message="CDN信息-联系人电话长度不能超过50")
@ApiModelProperty("CDN信息-联系人电话")
private String cdnLxrdh;
/**
* CDN-CDN
*/
@Size(max= 500,message="CDN信息-CDN加速信息长度不能超过500")
@ApiModelProperty("CDN信息-CDN加速信息")
private String cdnJsxx;
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,73 @@
package com.ruoyi.tc.entity.response;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Size;
import java.io.Serializable;
/**
* (asset_supply_chain_cp)
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("资产供应链信息复制表响应类")
@TableName(value = "asset_supply_chain_cp")
public class AssetSupplyChainCpResponse extends BaseClass implements Serializable {
private Integer id;
/**
* id
*/
@ApiModelProperty("资产id")
private Long assetId;
/**
* 1.2.3.4.5.6.
*/
@ApiModelProperty("1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位")
private Integer type;
/**
*
*/
@Size(max= 50,message="名称长度不能超过50")
@ApiModelProperty("名称")
private String name;
/**
*
*/
@Size(max= 50,message="统一信用代码长度不能超过50")
@ApiModelProperty("统一信用代码")
private String tyshxydm;
/**
*
*/
@Size(max= 50,message="联系人长度不能超过50")
@ApiModelProperty("联系人")
private String lxr;
/**
*
*/
@Size(max= 50,message="联系电话长度不能超过50")
@ApiModelProperty("联系电话")
private String lxdh;
/**
*
*/
@Size(max= 500,message="供应商注册地址长度不能超过500")
@ApiModelProperty("供应商注册地址")
private String gyszcdz;
/**
*
*/
@ApiModelProperty("注册地是否为太仓")
private Integer sfwtc;
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,131 @@
package com.ruoyi.tc.entity.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
/**
* @author dong
* @since 2024/11/19 9:58
*/
@Data
@ApiModel("任务详情响应类")
public class AssetTaskIdResponse {
/**
* id
*/
@ApiModelProperty("主键id")
private Integer id;
/**
*
*/
@ApiModelProperty("任务编号")
private String taskId;
/**
*
*/
@ApiModelProperty("任务名称")
private String taskName;
/**
*
*/
@ApiModelProperty("任务下发时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime taskTime;
/**
*
*/
@ApiModelProperty("任务截至时间")
private String taskDeadline;
/**
*
*/
@ApiModelProperty("任务完成时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime taskFinishTime;
/**
* 12345
*/
@ApiModelProperty("任务状态1进行中2正常完成3超期完成4正常完成5审核驳回")
private String taskStatus;
/**
*
*/
@ApiModelProperty("单位名称")
private Integer dwmc;
/**
* id
*/
/**
* id
*/
@ApiModelProperty("用户id")
private Integer userId;
/**
* id
*/
@ApiModelProperty("部门id")
private Integer deptId;
/**
* id
*/
@ApiModelProperty("创建者id")
private Integer createId;
/**
*
*/
@ApiModelProperty("创建人")
private String createBy;
/**
*
*/
@ApiModelProperty("创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
/**
* id
*/
@ApiModelProperty("更新着id")
private Integer updateId;
/**
*
*/
@ApiModelProperty("更新者")
private String updateBy;
/**
*
*/
@ApiModelProperty("更新时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
/**
*
*/
@ApiModelProperty("版本")
private String version;
/**
*
*/
@ApiModelProperty("备注")
private String reamark;
/**
*
*/
@ApiModelProperty("系统类型")
private String xtlx;
/**
*
*/
@ApiModelProperty("系统名称")
private String xtmc;
}

@ -0,0 +1,44 @@
package com.ruoyi.tc.entity.response;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.tc.baseClass.BaseClass;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (unit_other_contact_cp)
*
* @author du
* @since 2024/11/13 14:44
*/
@Data
@ApiModel("单位其他联系人复制表")
@TableName(value = "unit_other_contact_cp")
public class UnitOtherConcatCpResponse extends BaseClass implements Serializable {
private Long concatId;
@ApiModelProperty("单位id")
private Long unitId;
@ApiModelProperty("资产id")
private Long assetId;
@ApiModelProperty("其他联系人姓名")
private String qtlxrxm;
@ApiModelProperty("其他联系人联系方式")
private String qtlxrlxfs;
@ApiModelProperty("其他联系人邮箱")
private String qtlxryx;
@ApiModelProperty("其他联系人职务职称")
private String qtlxrzwzc;
@ApiModelProperty("删除标志0代表存在 2代表删除")
private String delFlag;
}

@ -0,0 +1,29 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.AssetBasicNetwork;
import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_basic_network_cp)访
* @author makejava
* @since 2024-11-15 10:03:56
*/
public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
@Select("select id from asset_basic_network_cp where asset_id=#{assetId} ")
int findByassetId(Integer assetId);
}

@ -0,0 +1,26 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
import org.apache.ibatis.annotations.Select;
/**
* (asset_business_form_cp)访
*
* @author makejava
* @since 2024-11-15 10:03:56
*/
public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
@Select("select id from asset_business_form_cp where asset_id =#{assetId}")
int findByassetId(Integer assetId);
}

@ -0,0 +1,37 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* (AssetCurrentResponse)访
*
* @author makejava
* @since 2024-11-15 10:03:56
*/
public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentResponse> {
/**
*
*
* @param page
* @param as
* @return
*/
Page<AssetCurrent> page(Page<AssetCurrent> page,@Param("req") AssetCurrentPageRequest as);
List<AssetCurrent> page(@Param("req") AssetCurrentPageRequest as);
/**
*
*/
void deleteByUnitIds(List<Long> idList);
}

@ -1,10 +1,9 @@
package com.ruoyi.tc.mapper; package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.domain.AssetLc; import com.ruoyi.tc.entity.AssetLc;
import com.ruoyi.tc.domain.request.AssetLcRequest; import com.ruoyi.tc.entity.request.AssetLcRequest;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;

@ -0,0 +1,27 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
import org.apache.ibatis.annotations.Select;
/**
* (asset_supply_chain_cp)访
*
* @author makejava
* @since 2024-11-15 10:03:56
*/
public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
@Select("select id from asset_supply_chain_cp where asset_id=#{assetId}")
int findByassetId(Integer assetId);
}

@ -2,10 +2,14 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.domain.AssetTask; import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
/** /**
@ -20,24 +24,25 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
/** /**
* *
* *
* @param page * @param page
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
Page<AssetTask> queryByPage(Page<AssetTask> page, @Param("req") PageRequest pageRequest); Page<AssetTask> queryByPage(Page<AssetTask> page, @Param("req") AssetTaskPageRequest pageRequest);
/** /**
* ID * ID
* *
* @param id * @param id
* @return * @return
*/ */
AssetTask queryById(Integer id); List<AssetTaskIdResponse> queryById(Integer id);
/** /**
* *
* *
* @param assetTask * @param assetTask
* @param pageable * @param pageable
* @return * @return
*/ */
List<AssetTask> queryAllByLimit(AssetTask assetTask, @Param("pageable") Pageable pageable); List<AssetTask> queryAllByLimit(AssetTask assetTask, @Param("pageable") Pageable pageable);
@ -91,5 +96,13 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
*/ */
int deleteById(Integer id); int deleteById(Integer id);
/**
*
*
* @param dwmc
* @return
*/
AssetCurrentResponse findByDwmcAssetCurrent(String dwmc);
} }

@ -0,0 +1,23 @@
package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import org.apache.ibatis.annotations.Select;
/**
* (unit_other_contact_cp)
*
* @author ruoyi
*/
public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
@Select("select id from unit_other_contact_cp where asset_id =#{assetId}")
int findByassetId(Integer assetId);
}

@ -0,0 +1,25 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.AssetBasicNetwork;
import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse;
import java.util.List;
/**
* (asset_basic_network)
*
* @author makejava
* @since 2024-11-15 16:05:26
*/
public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
int findByassetId(Integer assetId);
}

@ -0,0 +1,23 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
/**
* (asset_business_form_cp)
*
* @author makejava
* @since 2024-11-15 16:06:53
*/
public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCpResponse> {
/**
* idid
* @param assetId id
* @return
*/
int findByassetId(Integer assetId);
}

@ -0,0 +1,21 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import java.io.Serializable;
import java.util.List;
/**
* (AssetCurrentResponse)
*
* @author makejava
* @since 2024-11-15 10:04:03
*/
public interface AssetCurrentCpService extends IService<AssetCurrentResponse> {
}

@ -1,9 +1,8 @@
package com.ruoyi.tc.service; package com.ruoyi.tc.service;
import com.ruoyi.tc.domain.AssetLc; import com.ruoyi.tc.entity.AssetLc;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.domain.request.AssetLcRequest; import com.ruoyi.tc.entity.request.AssetLcRequest;
import org.springframework.data.domain.PageRequest;
/** /**
* (AssetLc) * (AssetLc)

@ -0,0 +1,23 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
/**
* (asset_supply_chain_cp)
*
* @author makejava
* @since 2024-11-15 16:07:30
*/
public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
int findByassetId(Integer assetId);
}

@ -1,9 +1,12 @@
package com.ruoyi.tc.service; package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.domain.AssetTask; import com.ruoyi.tc.entity.AssetTask;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
import java.util.List;
/** /**
* (AssetTask) * (AssetTask)
@ -19,7 +22,7 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param id * @param id
* @return * @return
*/ */
AssetTask queryById(Integer id); List<AssetTaskIdResponse> queryById(Integer id);
/** /**
* *
@ -28,7 +31,7 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
Page<AssetTask> queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest); Page<AssetTask> queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest);
/** /**
* *
@ -36,7 +39,7 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param assetTask * @param assetTask
* @return * @return
*/ */
AssetTask insert(AssetTask assetTask); void insert(AssetTask assetTask);
/** /**
* *
@ -44,7 +47,7 @@ public interface AssetTaskService extends IService<AssetTask> {
* @param assetTask * @param assetTask
* @return * @return
*/ */
AssetTask update(AssetTask assetTask); int update(AssetTask assetTask);
/** /**
* *

@ -0,0 +1,23 @@
package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.tc.entity.UnitOtherConcat;
import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import java.util.List;
/**
* (unit_other_contact_cp)
* @author du
* @since 2024/11/13 14:55
*/
public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpResponse> {
/**
* idid
*
* @param assetId id
* @return
*/
int findByassetId(Integer assetId);
}

@ -0,0 +1,27 @@
package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse;
import com.ruoyi.tc.mapper.AssetBasicNetWorkCpMapper;
import com.ruoyi.tc.service.AssetBasicNetworkCpService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (AssetBasicNetworkCpResponse)
*
* @author makejava
* @since 2024-11-15 16:05:26
*/
@Service("assetBasicNetworkCpService")
public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWorkCpMapper, AssetBasicNetworkCpResponse> implements AssetBasicNetworkCpService {
@Resource
private AssetBasicNetWorkCpMapper assetBasicNetWorkCpMapper;
@Override
public int findByassetId(Integer assetId) {
return assetBasicNetWorkCpMapper.findByassetId(assetId);
}
}

@ -0,0 +1,28 @@
package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
import com.ruoyi.tc.mapper.AssetBusinessFormCpMapper;
import com.ruoyi.tc.service.AssetBusinessFormCpService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (AssetBusinessFormCp)
*
* @author makejava
* @since 2024-11-15 16:06:53
*/
@Service("assetBusinessFormCpService")
public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFormCpMapper, AssetBusinessFormCpResponse> implements AssetBusinessFormCpService {
@Resource
private AssetBusinessFormCpMapper assetBusinessFormCpMapper;
@Override
public int findByassetId(Integer assetId) {
return assetBusinessFormCpMapper.findByassetId(assetId);
}
}

@ -0,0 +1,28 @@
package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.*;
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import com.ruoyi.tc.mapper.AssetCurrentCpMapper;
import com.ruoyi.tc.mapper.AssetCurrentMapper;
import com.ruoyi.tc.service.*;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;
/**
* (AssetCurrentResponse)
*
* @author makejava
* @since 2024-11-15 10:04:03
*/
@Service("assetCurrentCpService")
public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper, AssetCurrentResponse> implements AssetCurrentCpService {
}

@ -1,15 +1,11 @@
package com.ruoyi.tc.service.impl; package com.ruoyi.tc.service.impl;
import com.ruoyi.tc.domain.AssetLc; import com.ruoyi.tc.entity.AssetLc;
import com.ruoyi.tc.domain.AssetTask; import com.ruoyi.tc.entity.request.AssetLcRequest;
import com.ruoyi.tc.domain.request.AssetLcRequest;
import com.ruoyi.tc.mapper.AssetLcMapper; import com.ruoyi.tc.mapper.AssetLcMapper;
import com.ruoyi.tc.service.AssetLcService; import com.ruoyi.tc.service.AssetLcService;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import javax.annotation.Resource; import javax.annotation.Resource;

@ -0,0 +1,30 @@
package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.AssetSupplyChain;
import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
import com.ruoyi.tc.mapper.AssetSupplyChainCpMapper;
import com.ruoyi.tc.mapper.AssetSupplyChainMapper;
import com.ruoyi.tc.service.AssetSupplyChainCpService;
import com.ruoyi.tc.service.AssetSupplyChainService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (AssetSupplyChainCpResponse)
*
* @author makejava
* @since 2024-11-15 16:07:30
*/
@Service("assetSupplyChainCpService")
public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainCpMapper, AssetSupplyChainCpResponse> implements AssetSupplyChainCpService {
@Resource
private AssetSupplyChainCpMapper assetSupplyChainCpMapper;
@Override
public int findByassetId(Integer assetId) {
return assetSupplyChainCpMapper.findByassetId(assetId);
}
}

@ -2,13 +2,15 @@ package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.domain.AssetTask; import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.*;
import com.ruoyi.tc.mapper.AssetTaskMapper; import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.AssetTaskService; import com.ruoyi.tc.service.*;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* (AssetTask) * (AssetTask)
@ -21,6 +23,23 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Resource @Resource
private AssetTaskMapper assetTaskDao; private AssetTaskMapper assetTaskDao;
@Resource
private AssetCurrentCpService assetCurrentCpService;
@Resource
private AssetBusinessFormCpService assetBusinessFormCpService;
@Resource
private AssetSupplyChainCpService assetSupplyChainCpService;
@Resource
private AssetBasicNetworkCpService assetBasicNetworkCpService;
@Resource
private UnitOtherConcatCpService unitOtherConcatCpService;
/** /**
* ID * ID
* *
@ -28,7 +47,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
* @return * @return
*/ */
@Override @Override
public AssetTask queryById(Integer id) { public List<AssetTaskIdResponse> queryById(Integer id) {
return this.assetTaskDao.queryById(id); return this.assetTaskDao.queryById(id);
} }
@ -40,7 +59,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
* @return * @return
*/ */
@Override @Override
public Page<AssetTask> queryByPage(Page<AssetTask> assetTask, PageRequest pageRequest) { public Page<AssetTask> queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest) {
return assetTaskDao.queryByPage(assetTask, pageRequest); return assetTaskDao.queryByPage(assetTask, pageRequest);
} }
@ -51,9 +70,55 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
* @return * @return
*/ */
@Override @Override
public AssetTask insert(AssetTask assetTask) { public void insert(AssetTask assetTask) {
this.assetTaskDao.insert(assetTask); //任务新增
return assetTask; assetTaskDao.insert(assetTask);
String[] parts = assetTask.getDwmc().split(",");
for (String part : parts) {
//根据单位名称查询资产
AssetCurrentResponse assetCurrentResponse = assetTaskDao.findByDwmcAssetCurrent(part);
assetCurrentCpService.save(assetCurrentResponse);
//新增新监管业务形态
if (assetCurrentResponse.getXjgywxt() != null) {
//根据资产id查询新监管业务形态主表id
int businessId = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
assetCurrentResponse.getXjgywxt().setId(businessId);
assetCurrentResponse.getXjgywxt().setAssetId(Long.valueOf(assetCurrentResponse.getId()));
assetBusinessFormCpService.save(assetCurrentResponse.getXjgywxt());
}
if (!assetCurrentResponse.getGylxxList().isEmpty()) {
for (AssetSupplyChainCpResponse items : assetCurrentResponse.getGylxxList()) {
//根据资产id查询供应链主表id
int supplyChainId = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
items.setAssetId(Long.valueOf(assetCurrentResponse.getId()));
items.setId(supplyChainId);
}
//新增供应链
assetSupplyChainCpService.saveBatch(assetCurrentResponse.getGylxxList());
}
if (!assetCurrentResponse.getJcwlList().isEmpty()) {
for (AssetBasicNetworkCpResponse items : assetCurrentResponse.getJcwlList()) {
//根据资产id查询基础网络主表id
int basicNetworkId = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
items.setAssetId(Long.valueOf(assetCurrentResponse.getId()));
items.setId(basicNetworkId);
}
//新增基础网络
assetBasicNetworkCpService.saveBatch(assetCurrentResponse.getJcwlList());
}
if (!assetCurrentResponse.getOtherConcat().isEmpty()) {
for (UnitOtherConcatCpResponse items : assetCurrentResponse.getOtherConcat()) {
//根据资产id查询其他联系人主表id
int unitOtherConcatId = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
items.setAssetId(Long.valueOf(assetCurrentResponse.getId()));
items.setConcatId((long) unitOtherConcatId);
}
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrentResponse.getOtherConcat());
}
}
} }
/** /**
@ -63,9 +128,9 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
* @return * @return
*/ */
@Override @Override
public AssetTask update(AssetTask assetTask) { public int update(AssetTask assetTask) {
this.assetTaskDao.update(assetTask); return this.assetTaskDao.update(assetTask);
return this.queryById(assetTask.getId());
} }
/** /**

@ -0,0 +1,26 @@
package com.ruoyi.tc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import com.ruoyi.tc.mapper.UnitOtherConcatCpMapper;
import com.ruoyi.tc.service.UnitOtherConcatCpService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* (unit_other_contact_cp)
*
* @author du
* @since 2024/11/13 14:58
*/
@Service("unitOtherConcatCpService")
public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpMapper, UnitOtherConcatCpResponse> implements UnitOtherConcatCpService {
@Resource
private UnitOtherConcatCpMapper unitOtherConcatCpMapper;
@Override
public int findByassetId(Integer assetId) {
return unitOtherConcatCpMapper.findByassetId(assetId);
}
}

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tc.mapper.AssetLcMapper"> <mapper namespace="com.ruoyi.tc.mapper.AssetLcMapper">
<resultMap type="com.ruoyi.tc.domain.AssetLc" id="AssetLcMap"> <resultMap type="com.ruoyi.tc.entity.AssetLc" id="AssetLcMap">
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="INTEGER"/>
<result property="taskId" column="task_id" jdbcType="INTEGER"/> <result property="taskId" column="task_id" jdbcType="INTEGER"/>
<result property="xfTime" column="xf_time" jdbcType="TIMESTAMP"/> <result property="xfTime" column="xf_time" jdbcType="TIMESTAMP"/>

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tc.mapper.AssetTaskMapper"> <mapper namespace="com.ruoyi.tc.mapper.AssetTaskMapper">
<resultMap type="com.ruoyi.tc.domain.AssetTask" id="AssetTaskMap"> <resultMap type="com.ruoyi.tc.entity.AssetTask" id="AssetTaskMap">
<result property="id" column="id" jdbcType="INTEGER"/> <result property="id" column="id" jdbcType="INTEGER"/>
<result property="taskId" column="task_id" jdbcType="VARCHAR"/> <result property="taskId" column="task_id" jdbcType="VARCHAR"/>
<result property="taskName" column="task_name" jdbcType="VARCHAR"/> <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
@ -10,7 +10,7 @@
<result property="taskDeadline" column="task_deadline" jdbcType="VARCHAR"/> <result property="taskDeadline" column="task_deadline" jdbcType="VARCHAR"/>
<result property="taskFinishTime" column="task_finish_time" jdbcType="TIMESTAMP"/> <result property="taskFinishTime" column="task_finish_time" jdbcType="TIMESTAMP"/>
<result property="taskStatus" column="task_status" jdbcType="VARCHAR"/> <result property="taskStatus" column="task_status" jdbcType="VARCHAR"/>
<result property="dwId" column="dw_id" jdbcType="INTEGER"/> <result property="dwmc" column="dwmc" jdbcType="VARCHAR"/>
<result property="createId" column="create_id" jdbcType="INTEGER"/> <result property="createId" column="create_id" jdbcType="INTEGER"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
@ -25,32 +25,33 @@
<!--查询单个--> <!--查询单个-->
<select id="queryById" resultMap="AssetTaskMap"> <select id="queryById" resultMap="AssetTaskMap">
select id, select a.id,
task_id, a.task_id,
task_name, a.task_name,
task_time, a.task_time,
task_deadline, a.task_deadline,
task_finish_time, a.task_finish_time,
task_status, a.task_status,
dw_id, a.dwmc,
create_id, a.create_id,
create_by, a.create_by,
create_time, a.create_time,
update_id, a.update_id,
update_by, a.update_by,
update_time, a.update_time,
user_id, a.user_id,
dept_id, a.dept_id,
version, a.version,
reamark a.reamark,
from asset_task b.xtlx,b.xtmc
where id = #{id} from asset_task a left join asset_current b on a.dwmc =b.dwmc
where a.id = #{id}
</select> </select>
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="AssetTaskMap"> <select id="queryAllByLimit" resultMap="AssetTaskMap">
select select
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
from asset_task from asset_task
<where> <where>
<if test="id != null"> <if test="id != null">
@ -74,8 +75,8 @@
<if test="taskStatus != null and taskStatus != ''"> <if test="taskStatus != null and taskStatus != ''">
and task_status = #{taskStatus} and task_status = #{taskStatus}
</if> </if>
<if test="dwId != null"> <if test="dwmc != null">
and dw_id = #{dwId} and dwmc = #{dwmc}
</if> </if>
<if test="createId != null"> <if test="createId != null">
and create_id = #{createId} and create_id = #{createId}
@ -137,8 +138,8 @@
<if test="taskStatus != null and taskStatus != ''"> <if test="taskStatus != null and taskStatus != ''">
and task_status = #{taskStatus} and task_status = #{taskStatus}
</if> </if>
<if test="dwId != null"> <if test="dwmc != null">
and dw_id = #{dwId} and dwmc = #{dwmc}
</if> </if>
<if test="createId != null"> <if test="createId != null">
and create_id = #{createId} and create_id = #{createId}
@ -172,63 +173,64 @@
</if> </if>
</where> </where>
</select> </select>
<select id="queryByPage" resultType="com.ruoyi.tc.domain.AssetTask"> <select id="queryByPage" resultType="com.ruoyi.tc.entity.AssetTask">
select select
id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark id,task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark
from asset_task from asset_task
<where> <where>
<if test="taskName != null and taskName != ''"> <if test="req.taskName != null and req.taskName != ''">
and task_name = #{taskName} and task_name = #{req.taskName}
</if> </if>
<if test="taskFinishTime != null">
and task_finish_time = #{taskFinishTime} <if test="req.begainTime != null">
</if> and task_finish_time &gt;= #{req.begainTime}
<if test="begainTime != null">
and task_finish_time &gt;= #{begainTime}
</if> </if>
<if test="endTime != null"> <if test="req.endTime != null">
and task_finish_time &lt;= #{endTime} and task_finish_time &lt;= #{req.endTime}
</if> </if>
<if test="taskStatus != null and taskStatus != ''"> <if test="req.taskStatus != null and req.taskStatus != ''">
and task_status = #{taskStatus} and task_status = #{req.taskStatus}
</if> </if>
<if test="taskId != null and taskId != ''"> <if test="req.taskId != null and req.taskId != ''">
and task_id = #{taskId} and task_id = #{req.taskId}
</if> </if>
</where> </where>
</select> </select>
<select id="findByDwmcAssetCurrent" resultType="com.ruoyi.tc.entity.response.AssetCurrentResponse">
</select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dw_id, insert into asset_task(task_id, task_name, task_time, task_deadline, task_finish_time, task_status, dwmc,
create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id, create_id, create_by, create_time, update_id, update_by, update_time, user_id, dept_id,
version, reamark) version, reamark)
values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwId}, values (#{taskId}, #{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwmc},
#{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId}, #{createId}, #{createBy}, #{createTime}, #{updateId}, #{updateBy}, #{updateTime}, #{userId}, #{deptId},
#{version}, #{reamark}) #{version}, #{reamark})
</insert> </insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
insert into insert into
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark) asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwId},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark}) (#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline},#{entity.taskFinishTime},#{entity.taskStatus},#{entity.dwmc},#{entity.createId},#{entity.createBy},#{entity.createTime},#{entity.updateId},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.version},#{entity.reamark})
</foreach> </foreach>
</insert> </insert>
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true"> <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
insert into insert into
asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dw_id,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark) asset_task(task_id,task_name,task_time,task_deadline,task_finish_time,task_status,dwmc,create_id,create_by,create_time,update_id,update_by,update_time,user_id,dept_id,version,reamark)
values values
<foreach collection="entities" item="entity" separator=","> <foreach collection="entities" item="entity" separator=",">
(#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwId}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark}) (#{entity.taskId},#{entity.taskName},#{entity.taskTime},#{entity.taskDeadline}#{entity.taskFinishTime}#{entity.taskStatus}#{entity.dwmc}#{entity.createId}#{entity.createBy}#{entity.createTime}#{entity.updateId}#{entity.updateBy}#{entity.updateTime}#{entity.userId}#{entity.deptId}#{entity.version}#{entity.reamark})
</foreach> </foreach>
on duplicate key update on duplicate key update
task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline = task_id = values(task_id)task_name = values(task_name)task_time = values(task_time)task_deadline =
values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dw_id = values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dwmc =
values(dw_id)create_id = values(create_id)create_by = values(create_by)create_time = values(dwmc)create_id = values(create_id)create_by = values(create_by)create_time =
values(create_time)update_id = values(update_id)update_by = values(update_by)update_time = values(create_time)update_id = values(update_id)update_by = values(update_by)update_time =
values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark = values(update_time)user_id = values(user_id)dept_id = values(dept_id)version = values(version)reamark =
values(reamark) values(reamark)
@ -256,8 +258,8 @@
<if test="taskStatus != null and taskStatus != ''"> <if test="taskStatus != null and taskStatus != ''">
task_status = #{taskStatus}, task_status = #{taskStatus},
</if> </if>
<if test="dwId != null"> <if test="dwmc != null">
dw_id = #{dwId}, dwmc = #{dwmc},
</if> </if>
<if test="createId != null"> <if test="createId != null">
create_id = #{createId}, create_id = #{createId},

@ -115,7 +115,7 @@ public class SecurityConfig
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
// .antMatchers("/tc/**").permitAll() .antMatchers("/unit/assetTask/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated(); .anyRequest().authenticated();
}) })

Loading…
Cancel
Save