任务模块编写

main
dongdingding 2 months ago
parent 20df9197a8
commit fd9d66de9f

@ -7,9 +7,8 @@ import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.AssetTask; import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest; import com.ruoyi.tc.entity.request.AssestTaskXqRequest;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest; import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.AssestTaskXqresponse; import com.ruoyi.tc.entity.response.*;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse; import com.ruoyi.tc.service.*;
import com.ruoyi.tc.service.AssetTaskService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -17,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.time.LocalDateTime;
/** /**
* (AssetTask) * (AssetTask)
@ -34,6 +34,20 @@ public class AssetTaskController extends BaseController {
@Resource @Resource
private AssetTaskService assetTaskService; private AssetTaskService assetTaskService;
@Resource
private AssetCurrentCpService assetCurrentCpService;
@Resource
private AssetBusinessFormCpService assetBusinessFormCpService;
@Resource
private AssetBasicNetworkCpService assetBasicNetworkCpService;
@Resource
private AssetSupplyChainCpService assetSupplyChainCpService;
@Resource
private UnitOtherConcatCpService unitOtherConcatCpService;
/** /**
* *
* *
@ -43,6 +57,7 @@ public class AssetTaskController extends BaseController {
*/ */
@ApiOperation(value = "分页查询", response = AssetTask.class) @ApiOperation(value = "分页查询", response = AssetTask.class)
@GetMapping("/page") @GetMapping("/page")
public AjaxResult queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest) { public AjaxResult queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest) {
return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest)); return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest));
} }
@ -69,6 +84,7 @@ public class AssetTaskController extends BaseController {
@PostMapping("/add") @PostMapping("/add")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult add(@RequestBody @Valid AssetTask assetTask) { public AjaxResult add(@RequestBody @Valid AssetTask assetTask) {
assetTask.setTaskTime(LocalDateTime.now());
this.assetTaskService.insert(assetTask); this.assetTaskService.insert(assetTask);
return AjaxResult.success(); return AjaxResult.success();
} }
@ -99,17 +115,17 @@ public class AssetTaskController extends BaseController {
/** /**
* *
* *
* @param taskId id * @param taskId id
* @param assetId id * @param assetId id
* @return * @return
*/ */
@ApiOperation(value = "任务审核", response = AssetCurrent.class) @ApiOperation(value = "任务审核详情信息", response = AssetCurrent.class)
@GetMapping("/taskSh") @GetMapping("/taskSh")
public AjaxResult taskSh(@RequestParam("taskId") int taskId, @RequestParam("assetId") int assetId) { public AjaxResult taskSh(@RequestParam("taskId") int taskId, @RequestParam("assetId") int assetId) {
assetTaskService.taskSh(taskId,assetId);
return AjaxResult.success(); return AjaxResult.success(assetTaskService.taskSh(taskId, assetId));
} }
@ -126,5 +142,82 @@ public class AssetTaskController extends BaseController {
return AjaxResult.success(assetTaskService.zcHc(page, pageRequest)); return AjaxResult.success(assetTaskService.zcHc(page, pageRequest));
} }
/**
*
*
* @param assetCurrent
* @return
*/
@ApiOperation(value = "单位端暂存报废")
@PostMapping("/zc")
@Transactional(rollbackFor = Exception.class)
public AjaxResult zcHc(@RequestBody AssetCurrentResponse assetCurrent) {
//根据资产id和任务id删除五张表数据
assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetSupplyChainCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
unitOtherConcatCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
assetCurrent.setGlym(String.join(",", assetCurrent.getGlymList()));
assetCurrent.setGlIp(String.join(",", assetCurrent.getGlIpList()));
assetCurrentCpService.save(assetCurrent);
//新增新监管业务形态
if (assetCurrent.getXjgywxt() != null) {
assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
assetCurrent.getXjgywxt().setTaskId(assetCurrent.getTaskId());
assetBusinessFormCpService.save(assetCurrent.getXjgywxt());
}
if (!assetCurrent.getGylxxList().isEmpty()) {
for (AssetSupplyChainCpResponse items : assetCurrent.getGylxxList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增供应链
assetSupplyChainCpService.saveBatch(assetCurrent.getGylxxList());
}
if (!assetCurrent.getJcwlList().isEmpty()) {
for (AssetBasicNetworkCpResponse items : assetCurrent.getJcwlList()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增基础网络
assetBasicNetworkCpService.saveBatch(assetCurrent.getJcwlList());
}
if (!assetCurrent.getOtherConcat().isEmpty()) {
for (UnitOtherConcatCpResponse items : assetCurrent.getOtherConcat()) {
items.setAssetId(assetCurrent.getId());
items.setTaskId(assetCurrent.getTaskId());
}
//新增其他联系人
unitOtherConcatCpService.saveBatch(assetCurrent.getOtherConcat());
}
return success();
}
/**
*
*
* @param assetCurrent
* @return
*/
@ApiOperation(value = "单位端提交")
@PostMapping("/tj")
@Transactional(rollbackFor = Exception.class)
public AjaxResult tj(@RequestBody AssetCurrentResponse assetCurrent) {
return AjaxResult.success();
}
@ApiOperation(value = "管理端审核")
@PostMapping("/sh")
public AjaxResult sh(@RequestBody AssetCurrentResponse assetCurrent) {
return AjaxResult.success();
}
} }

@ -22,7 +22,7 @@ public class AssestTaskXqRequest {
* *
*/ */
@ApiModelProperty("资产类型") @ApiModelProperty("资产类型")
private String zclx; private String xtlx;
/** /**
* *

@ -43,8 +43,8 @@ public class AssestTaskXqresponse {
/** /**
* 01345 * 01345
*/ */
@ApiModelProperty("审核状态0待核查1待审核3审核通过4审核不通过5审核不通过") @ApiModelProperty("审核状态0待核查1待审核3审核通过4审核不通过5已报废")
private String status; private String status;
} }

@ -31,7 +31,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-云平台服务商长度不能超过50")
@ApiModelProperty("云平台-云平台服务商") @ApiModelProperty("云平台-云平台服务商")
private String yptFws; private String yptFws;
/** /**
@ -48,73 +48,73 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-硬件资源大小长度不能超过50")
@ApiModelProperty("云平台-硬件资源大小") @ApiModelProperty("云平台-硬件资源大小")
private String yptYjzydx; private String yptYjzydx;
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-平台架构长度不能超过50")
@ApiModelProperty("云平台-平台架构") @ApiModelProperty("云平台-平台架构")
private String yptPtjg; private String yptPtjg;
/** /**
* -IP * -IP
*/ */
@Size(max= 50,message="云平台-互联网IP段长度不能超过50")
@ApiModelProperty("云平台-互联网IP段") @ApiModelProperty("云平台-互联网IP段")
private String yptIp; private String yptIp;
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-机房联系人长度不能超过50")
@ApiModelProperty("云平台-机房联系人") @ApiModelProperty("云平台-机房联系人")
private String yptJflxr; private String yptJflxr;
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-机房联系人电话长度不能超过50")
@ApiModelProperty("云平台-机房联系人电话") @ApiModelProperty("云平台-机房联系人电话")
private String yptJflxrdh; private String yptJflxrdh;
/** /**
* - * -
*/ */
@Size(max= 50,message="云平台-服务器设备类型长度不能超过50")
@ApiModelProperty("云平台-服务器设备类型") @ApiModelProperty("云平台-服务器设备类型")
private String yptFwqsblx; private String yptFwqsblx;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-平台服务商长度不能超过50")
@ApiModelProperty("大数据平台-平台服务商") @ApiModelProperty("大数据平台-平台服务商")
private String dsjPtfws; private String dsjPtfws;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-敏感数据类型长度不能超过50")
@ApiModelProperty("大数据平台-敏感数据类型") @ApiModelProperty("大数据平台-敏感数据类型")
private String dsjMgsjlx; private String dsjMgsjlx;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-硬件资源长度不能超过50")
@ApiModelProperty("大数据平台-硬件资源") @ApiModelProperty("大数据平台-硬件资源")
private String dsjYjzy; private String dsjYjzy;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-系统数据量长度不能超过50")
@ApiModelProperty("大数据平台-系统数据量") @ApiModelProperty("大数据平台-系统数据量")
private String dsjXtsjl; private String dsjXtsjl;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-机房联系人长度不能超过50")
@ApiModelProperty("大数据平台-机房联系人") @ApiModelProperty("大数据平台-机房联系人")
private String dsjJflxr; private String dsjJflxr;
/** /**
* - * -
*/ */
@Size(max= 50,message="大数据平台-机房联系人电话长度不能超过50")
@ApiModelProperty("大数据平台-机房联系人电话") @ApiModelProperty("大数据平台-机房联系人电话")
private String dsjJflxrdh; private String dsjJflxrdh;
/** /**
@ -125,13 +125,13 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="一般物联网设备-系统集成商名称长度不能超过50")
@ApiModelProperty("一般物联网设备-系统集成商名称") @ApiModelProperty("一般物联网设备-系统集成商名称")
private String wlwsbXtjcs; private String wlwsbXtjcs;
/** /**
* - * -
*/ */
@Size(max= 50,message="一般物联网设备-用户数量长度不能超过50")
@ApiModelProperty("一般物联网设备-用户数量") @ApiModelProperty("一般物联网设备-用户数量")
private String wlwsbYhsl; private String wlwsbYhsl;
/** /**
@ -142,7 +142,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="一般物联网设备-终端数量长度不能超过50")
@ApiModelProperty("一般物联网设备-终端数量") @ApiModelProperty("一般物联网设备-终端数量")
private String wlwsbZdsl; private String wlwsbZdsl;
/** /**
@ -153,7 +153,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="一般物联网设备-联系人长度不能超过50")
@ApiModelProperty("一般物联网设备-联系人") @ApiModelProperty("一般物联网设备-联系人")
private String wlwsbLxr; private String wlwsbLxr;
/** /**
@ -164,97 +164,97 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="一般物联网设备-联系人电话长度不能超过50")
@ApiModelProperty("一般物联网设备-联系人电话") @ApiModelProperty("一般物联网设备-联系人电话")
private String wlwsbLxrdh; private String wlwsbLxrdh;
/** /**
* - * -
*/ */
@Size(max= 500,message="一般物联网设备-服务内容长度不能超过500")
@ApiModelProperty("一般物联网设备-服务内容") @ApiModelProperty("一般物联网设备-服务内容")
private String wlwsbFwnr; private String wlwsbFwnr;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-摄像头品牌长度不能超过50")
@ApiModelProperty("摄像头-摄像头品牌") @ApiModelProperty("摄像头-摄像头品牌")
private String sxtPp; private String sxtPp;
/** /**
* - * -
*/ */
@Size(max= 255,message="摄像头-位置长度不能超过255")
@ApiModelProperty("摄像头-位置") @ApiModelProperty("摄像头-位置")
private String sxtWz; private String sxtWz;
/** /**
* -IP * -IP
*/ */
@Size(max= 50,message="摄像头-摄像头IP长度不能超过50")
@ApiModelProperty("摄像头-摄像头IP") @ApiModelProperty("摄像头-摄像头IP")
private String sxtIp; private String sxtIp;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-区域长度不能超过50")
@ApiModelProperty("摄像头-区域") @ApiModelProperty("摄像头-区域")
private String sxtQy; private String sxtQy;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-摄像头数量长度不能超过50")
@ApiModelProperty("摄像头-摄像头数量") @ApiModelProperty("摄像头-摄像头数量")
private String sxtSl; private String sxtSl;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-端口长度不能超过50")
@ApiModelProperty("摄像头-端口") @ApiModelProperty("摄像头-端口")
private String sxtDk; private String sxtDk;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-设备型号长度不能超过50")
@ApiModelProperty("摄像头-设备型号") @ApiModelProperty("摄像头-设备型号")
private String sxtSbxh; private String sxtSbxh;
/** /**
* - * -
*/ */
@Size(max= 50,message="摄像头-固定版本长度不能超过50")
@ApiModelProperty("摄像头-固定版本") @ApiModelProperty("摄像头-固定版本")
private String sxtGdbb; private String sxtGdbb;
/** /**
* APP-APP * APP-APP
*/ */
@Size(max= 50,message="移动APP-移动APP系统长度不能超过50")
@ApiModelProperty("移动APP-移动APP系统") @ApiModelProperty("移动APP-移动APP系统")
private String appXt; private String appXt;
/** /**
* APP- * APP-
*/ */
@Size(max= 50,message="移动APP-服务端域名长度不能超过50")
@ApiModelProperty("移动APP-服务端域名") @ApiModelProperty("移动APP-服务端域名")
private String appYm; private String appYm;
/** /**
* APP-APP * APP-APP
*/ */
@Size(max= 50,message="移动APP-移动APP渠道长度不能超过50")
@ApiModelProperty("移动APP-移动APP渠道") @ApiModelProperty("移动APP-移动APP渠道")
private String appQd; private String appQd;
/** /**
* APP-IP * APP-IP
*/ */
@Size(max= 50,message="移动APP-服务端IP长度不能超过50")
@ApiModelProperty("移动APP-服务端IP") @ApiModelProperty("移动APP-服务端IP")
private String appIp; private String appIp;
/** /**
* APP- * APP-
*/ */
@Size(max= 50,message="移动APP-联系人长度不能超过50")
@ApiModelProperty("移动APP-联系人") @ApiModelProperty("移动APP-联系人")
private String appLxr; private String appLxr;
/** /**
* APP- * APP-
*/ */
@Size(max= 50,message="移动APP-联系人电话长度不能超过50")
@ApiModelProperty("移动APP-联系人电话") @ApiModelProperty("移动APP-联系人电话")
private String appLxrdh; private String appLxrdh;
/** /**
@ -265,13 +265,13 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 255,message="工业控制-系统集成商名称长度不能超过255")
@ApiModelProperty("工业控制-系统集成商名称") @ApiModelProperty("工业控制-系统集成商名称")
private String gykzJcs; private String gykzJcs;
/** /**
* - * -
*/ */
@Size(max= 255,message="工业控制-运行时间长度不能超过255")
@ApiModelProperty("工业控制-运行时间") @ApiModelProperty("工业控制-运行时间")
private String gykzYxsj; private String gykzYxsj;
/** /**
@ -282,7 +282,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 255,message="工业控制-集成商国内外情况长度不能超过255")
@ApiModelProperty("工业控制-集成商国内外情况") @ApiModelProperty("工业控制-集成商国内外情况")
private String gykzJcsqk; private String gykzJcsqk;
/** /**
@ -293,7 +293,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 255,message="工业控制-联系人长度不能超过255")
@ApiModelProperty("工业控制-联系人") @ApiModelProperty("工业控制-联系人")
private String gykzLxr; private String gykzLxr;
/** /**
@ -304,61 +304,61 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-联系人电话长度不能超过50")
@ApiModelProperty("工业控制-联系人电话") @ApiModelProperty("工业控制-联系人电话")
private String gykzLxrdh; private String gykzLxrdh;
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-设备名称长度不能超过50")
@ApiModelProperty("工业控制-设备名称") @ApiModelProperty("工业控制-设备名称")
private String gykzSbmc; private String gykzSbmc;
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-设备品牌长度不能超过50")
@ApiModelProperty("工业控制-设备品牌") @ApiModelProperty("工业控制-设备品牌")
private String gykzSbpp; private String gykzSbpp;
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-设备类别长度不能超过50")
@ApiModelProperty("工业控制-设备类别") @ApiModelProperty("工业控制-设备类别")
private String gykzSblb; private String gykzSblb;
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-运营商长度不能超过50")
@ApiModelProperty("工业控制-运营商") @ApiModelProperty("工业控制-运营商")
private String gykzYys; private String gykzYys;
/** /**
* -IP * -IP
*/ */
@Size(max= 50,message="工业控制-互联网IP长度不能超过50")
@ApiModelProperty("工业控制-互联网IP") @ApiModelProperty("工业控制-互联网IP")
private String gykzHlwIp; private String gykzHlwIp;
/** /**
* - * -
*/ */
@Size(max= 50,message="工业控制-网络层级长度不能超过50")
@ApiModelProperty("工业控制-网络层级") @ApiModelProperty("工业控制-网络层级")
private String gykzWlcj; private String gykzWlcj;
/** /**
* -IP * -IP
*/ */
@Size(max= 50,message="工业控制-控制台IP长度不能超过50")
@ApiModelProperty("工业控制-控制台IP") @ApiModelProperty("工业控制-控制台IP")
private String gykzKztIp; private String gykzKztIp;
/** /**
* - * -
*/ */
@Size(max= 500,message="工业控制-描述长度不能超过500")
@ApiModelProperty("工业控制-描述") @ApiModelProperty("工业控制-描述")
private String gykzMs; private String gykzMs;
/** /**
* CDN-CDN * CDN-CDN
*/ */
@Size(max= 255,message="CDN信息-CDN供应商长度不能超过255")
@ApiModelProperty("CDN信息-CDN供应商") @ApiModelProperty("CDN信息-CDN供应商")
private String cdnGys; private String cdnGys;
/** /**
@ -369,31 +369,31 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/** /**
* CDN-CDN * CDN-CDN
*/ */
@Size(max= 50,message="CDN信息-CDN类型长度不能超过50")
@ApiModelProperty("CDN信息-CDN类型") @ApiModelProperty("CDN信息-CDN类型")
private String cdnLx; private String cdnLx;
/** /**
* CDN-CDN * CDN-CDN
*/ */
@Size(max= 50,message="CDN信息-CDN域名长度不能超过50")
@ApiModelProperty("CDN信息-CDN域名") @ApiModelProperty("CDN信息-CDN域名")
private String cdnYm; private String cdnYm;
/** /**
* CDN- * CDN-
*/ */
@Size(max= 50,message="CDN信息-联系人长度不能超过50")
@ApiModelProperty("CDN信息-联系人") @ApiModelProperty("CDN信息-联系人")
private String cdnLxr; private String cdnLxr;
/** /**
* CDN- * CDN-
*/ */
@Size(max= 50,message="CDN信息-联系人电话长度不能超过50")
@ApiModelProperty("CDN信息-联系人电话") @ApiModelProperty("CDN信息-联系人电话")
private String cdnLxrdh; private String cdnLxrdh;
/** /**
* CDN-CDN * CDN-CDN
*/ */
@Size(max= 500,message="CDN信息-CDN加速信息长度不能超过500")
@ApiModelProperty("CDN信息-CDN加速信息") @ApiModelProperty("CDN信息-CDN加速信息")
private String cdnJsxx; private String cdnJsxx;

@ -35,31 +35,31 @@ public class AssetSupplyChainCpResponse extends BaseClass implements Serializabl
/** /**
* *
*/ */
@Size(max= 50,message="名称长度不能超过50")
@ApiModelProperty("名称") @ApiModelProperty("名称")
private String name; private String name;
/** /**
* *
*/ */
@Size(max= 50,message="统一信用代码长度不能超过50")
@ApiModelProperty("统一信用代码") @ApiModelProperty("统一信用代码")
private String tyshxydm; private String tyshxydm;
/** /**
* *
*/ */
@Size(max= 50,message="联系人长度不能超过50")
@ApiModelProperty("联系人") @ApiModelProperty("联系人")
private String lxr; private String lxr;
/** /**
* *
*/ */
@Size(max= 50,message="联系电话长度不能超过50")
@ApiModelProperty("联系电话") @ApiModelProperty("联系电话")
private String lxdh; private String lxdh;
/** /**
* *
*/ */
@Size(max= 500,message="供应商注册地址长度不能超过500")
@ApiModelProperty("供应商注册地址") @ApiModelProperty("供应商注册地址")
private String gyszcdz; private String gyszcdz;
/** /**

@ -1,14 +1,15 @@
package com.ruoyi.tc.mapper; package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.AssetBasicNetwork;
import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse; import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
/** /**
* (asset_basic_network_cp)访 * (asset_basic_network_cp)访
*
* @author makejava * @author makejava
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
@ -25,5 +26,13 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
List<AssetBasicNetworkCpResponse> findByassetId(Long assetId); List<AssetBasicNetworkCpResponse> findByassetId(Long assetId);
} /**
* idid
*
* @param assetId id
* @param taskId id
*/
@Delete("delete from asset_basic_network_cp where asset_id=#{assetId} and task_id ={taskId} ")
void deletByAssetIdandTaskId(Long assetId, int taskId);
}

@ -2,8 +2,11 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse; import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
/** /**
* (asset_business_form_cp)访 * (asset_business_form_cp)访
* *
@ -22,5 +25,15 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
@Select("select * from asset_business_form where asset_id =#{assetId}") @Select("select * from asset_business_form where asset_id =#{assetId}")
List<AssetBusinessFormCpResponse> findByassetId(Long assetId); List<AssetBusinessFormCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id ={taskId} ")
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.entity.AssetCurrent; import com.ruoyi.tc.entity.AssetCurrent;
import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; import com.ruoyi.tc.entity.request.AssetCurrentPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse; import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -16,22 +17,12 @@ import java.util.List;
* @since 2024-11-15 10:03:56 * @since 2024-11-15 10:03:56
*/ */
public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentResponse> { public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentResponse> {
/** /**
*
* *
* @param page * @param assetId
* @param as * @param taskId
* @return
*/
Page<AssetCurrent> page(Page<AssetCurrent> page,@Param("req") AssetCurrentPageRequest as);
List<AssetCurrent> page(@Param("req") AssetCurrentPageRequest as);
/**
*
*/ */
void deleteByUnitIds(List<Long> idList); @Delete("delete from asset_current_cp where id=#{assetId} and task_id ={taskId} ")
void deletByAssetIdandTaskId(Long assetId,int taskId);
} }

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse; import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -15,7 +16,6 @@ import java.util.List;
public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpResponse> { public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpResponse> {
/** /**
* idid * idid
* *
@ -25,5 +25,15 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpR
@Select("select * from asset_supply_chain where asset_id=#{assetId}") @Select("select * from asset_supply_chain where asset_id=#{assetId}")
List<AssetSupplyChainCpResponse> findByassetId(Long assetId); List<AssetSupplyChainCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
@Delete("delete from asset_business_form_cp where asset_id=#{assetId} and task_id ={taskId} ")
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -2,6 +2,7 @@ package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse; import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
@ -22,4 +23,14 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpRes
*/ */
@Select("select * from unit_other_contact where asset_id =#{assetId}") @Select("select * from unit_other_contact where asset_id =#{assetId}")
List<UnitOtherConcatCpResponse> findByassetId(Long assetId); List<UnitOtherConcatCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
@Delete("delete from unit_other_contact_cp where asset_id=#{assetId} and task_id ={taskId} ")
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -22,4 +22,13 @@ public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCp
*/ */
List<AssetBasicNetworkCpResponse> findByassetId(Long assetId); List<AssetBasicNetworkCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -21,5 +21,14 @@ public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCp
List<AssetBusinessFormCpResponse> findByassetId(Long assetId); List<AssetBusinessFormCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -1,14 +1,8 @@
package com.ruoyi.tc.service; package com.ruoyi.tc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; 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 com.ruoyi.tc.entity.response.AssetCurrentResponse;
import java.io.Serializable;
import java.util.List;
/** /**
* (AssetCurrentResponse) * (AssetCurrentResponse)
* *
@ -17,5 +11,13 @@ import java.util.List;
*/ */
public interface AssetCurrentCpService extends IService<AssetCurrentResponse> { public interface AssetCurrentCpService extends IService<AssetCurrentResponse> {
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -22,4 +22,14 @@ public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpRe
List<AssetSupplyChainCpResponse> findByassetId(Long assetId); List<AssetSupplyChainCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -20,4 +20,13 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpResp
* @return * @return
*/ */
List<UnitOtherConcatCpResponse> findByassetId(Long assetId); List<UnitOtherConcatCpResponse> findByassetId(Long assetId);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
} }

@ -54,7 +54,7 @@ public interface UnitService extends IService<Unit> {
/** /**
* *
*/ */
void deleteUnits(List<Long> ids); void deleteUnits(Long ids);

@ -26,5 +26,10 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWor
return assetBasicNetWorkCpMapper.findByassetId(assetId); return assetBasicNetWorkCpMapper.findByassetId(assetId);
} }
@Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) {
assetBasicNetWorkCpMapper.deletByAssetIdandTaskId(assetId, taskId);
}
} }

@ -25,5 +25,10 @@ public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFor
public List<AssetBusinessFormCpResponse> findByassetId(Long assetId) { public List<AssetBusinessFormCpResponse> findByassetId(Long assetId) {
return assetBusinessFormCpMapper.findByassetId(assetId); return assetBusinessFormCpMapper.findByassetId(assetId);
} }
@Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) {
assetBusinessFormCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
} }

@ -23,6 +23,11 @@ import java.util.List;
@Service("assetCurrentCpService") @Service("assetCurrentCpService")
public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper, AssetCurrentResponse> implements AssetCurrentCpService { public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper, AssetCurrentResponse> implements AssetCurrentCpService {
@Resource
private AssetCurrentCpMapper assetCurrentCpMapper;
@Override
public void deletByAssetIdandTaskId(Long assetId,int taskId) {
assetCurrentCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
} }

@ -27,4 +27,9 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
public List<AssetSupplyChainCpResponse> findByassetId(Long assetId) { public List<AssetSupplyChainCpResponse> findByassetId(Long assetId) {
return assetSupplyChainCpMapper.findByassetId(assetId); return assetSupplyChainCpMapper.findByassetId(assetId);
} }
@Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) {
assetSupplyChainCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
} }

@ -24,4 +24,9 @@ public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpM
public List<UnitOtherConcatCpResponse> findByassetId(Long assetId) { public List<UnitOtherConcatCpResponse> findByassetId(Long assetId) {
return unitOtherConcatCpMapper.findByassetId(assetId); return unitOtherConcatCpMapper.findByassetId(assetId);
} }
@Override
public void deletByAssetIdandTaskId(Long assetId, int taskId) {
unitOtherConcatCpMapper.deletByAssetIdandTaskId(assetId,taskId);
}
} }

@ -200,9 +200,10 @@
<select id="zcHc" resultType="com.ruoyi.tc.entity.response.AssestTaskXqresponse"> <select id="zcHc" resultType="com.ruoyi.tc.entity.response.AssestTaskXqresponse">
select b.xtlx, select b.xtlx,
b.xtmc, b.xtmc,
b.dwmc, b.dwmc as zcdwmc,
b.status, b.status,
b.id b.id ,
b.task_id
from asset_task a from asset_task a
LEFT JOIN LEFT JOIN
asset_current_cp b ON FIND_IN_SET(b.dwmc, a.dwmc) asset_current_cp b ON FIND_IN_SET(b.dwmc, a.dwmc)
@ -216,13 +217,13 @@
<if test="req.status!=null "> <if test="req.status!=null ">
and b.status =#{req.status} and b.status =#{req.status}
</if> </if>
<if test="req.zclx!=null and req.zclx!='' "> <if test="req.xtlx!=null and req.xtlx!='' ">
and b.zclx = #{req.zclx} and b.xtlx = #{req.xtlx}
</if> </if>
</where> </where>
</select> </select>
<select id="findBytaskIdandAssestId" resultType="com.ruoyi.tc.entity.response.AssetCurrentResponse"> <select id="findBytaskIdandAssestId" resultType="com.ruoyi.tc.entity.response.AssetCurrentResponse">
select * from asset_current_cp where task_id =#{taskId} and asset_id =#{assetId} select * from asset_current_cp where task_id =#{taskId} and id =#{assetId}
</select> </select>
<!--新增所有列--> <!--新增所有列-->

Loading…
Cancel
Save