杜函宇 2 months ago
commit 9e87d92a68

@ -6,10 +6,10 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.tc.entity.AssetCurrent; 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.AssetCurrentShRequest;
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 +17,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 +35,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 +58,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 +85,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 +116,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 +143,97 @@ 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());
if(assetCurrent.getBfyy().isEmpty()) {
//待审批
assetCurrent.setStatus(1);
}else{
//已报废
assetCurrent.setStatus(5);
}
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();
}
/**
*
*
* @param req
* @return
*/
@ApiOperation(value = "管理端审核")
@PostMapping("/sh")
public AjaxResult sh(@RequestBody AssetCurrentShRequest req) {
return AjaxResult.success(assetTaskService.sh(req));
}
} }

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

@ -0,0 +1,38 @@
package com.ruoyi.tc.entity.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author dong
* @since 2024/11/20 16:29
*/
@Data
@ApiModel("管理端审核请求类")
public class AssetCurrentShRequest {
/**
* id
*/
@ApiModelProperty("任务id")
private Integer taskId;
/**
* id
*/
@ApiModelProperty("资产id")
private Integer assetId;
/**
* 01345
*/
@ApiModelProperty("审核状态0待核查1待审批3审核通过4审核不通过5已报废")
private Integer status;
}

@ -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
*/ */
@ -22,8 +23,16 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
*/ */
@Select("select * from asset_basic_network where asset_id=#{assetId} ") @Select("select * from asset_basic_network where asset_id=#{assetId} ")
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)访
* *
@ -20,7 +23,17 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
* @return * @return
*/ */
@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);
} }

@ -4,6 +4,7 @@ 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.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.AssetCurrentShRequest;
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.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetCurrentResponse; import com.ruoyi.tc.entity.response.AssetCurrentResponse;
@ -125,5 +126,15 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
* @return * @return
*/ */
AssetCurrentResponse findBytaskIdandAssestId(@Param("taskId") int taskId, @Param("assetId") int assetId); AssetCurrentResponse findBytaskIdandAssestId(@Param("taskId") int taskId, @Param("assetId") int assetId);
/**
*
*
* @param req
* @return
*/
int sh(@Param("req") AssetCurrentShRequest req);
} }

@ -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);
} }

@ -1,18 +1,14 @@
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.AssetTask; import com.ruoyi.tc.entity.AssetTask;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest; import com.ruoyi.tc.entity.request.AssestTaskXqRequest;
import com.ruoyi.tc.entity.request.AssetCurrentShRequest;
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.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetCurrentResponse; import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse; import com.ruoyi.tc.entity.response.AssetTaskResponse;
import org.springframework.data.domain.PageRequest;
import java.util.List;
/** /**
* (AssetTask) * (AssetTask)
@ -76,9 +72,18 @@ public interface AssetTaskService extends IService<AssetTask> {
/** /**
* *
* *
* @param page * @param page
* @param pageRequest * @param pageRequest
* @return * @return
*/ */
Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> page, AssestTaskXqRequest pageRequest); Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> page, AssestTaskXqRequest pageRequest);
/**
*
*
* @param req
* @return
*/
int sh(AssetCurrentShRequest req);
} }

@ -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);
} }

@ -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);
}
} }

@ -2,15 +2,28 @@ 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.entity.*; 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.AssetCurrentShRequest;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest; import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.response.*; import com.ruoyi.tc.entity.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetBasicNetworkCpResponse;
import com.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import com.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse;
import com.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import com.ruoyi.tc.mapper.AssetTaskMapper; import com.ruoyi.tc.mapper.AssetTaskMapper;
import com.ruoyi.tc.service.*; import com.ruoyi.tc.service.AssetBasicNetworkCpService;
import com.ruoyi.tc.service.AssetBusinessFormCpService;
import com.ruoyi.tc.service.AssetCurrentCpService;
import com.ruoyi.tc.service.AssetSupplyChainCpService;
import com.ruoyi.tc.service.AssetTaskService;
import com.ruoyi.tc.service.UnitOtherConcatCpService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -42,8 +55,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
private UnitOtherConcatCpService unitOtherConcatCpService; private UnitOtherConcatCpService unitOtherConcatCpService;
/** /**
* ID * ID
* *
@ -76,15 +87,16 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Override @Override
public void insert(AssetTask assetTask) { public void insert(AssetTask assetTask) {
//任务新增 //任务新增
int id= assetTaskDao.insert(assetTask); int id = assetTaskDao.insert(assetTask);
String[] parts = assetTask.getDwmc().split(","); String[] parts = assetTask.getDwmc().split(",");
for (String part : parts) { for (String part : parts) {
//根据单位名称查询资产 //根据单位名称查询资产
List<AssetCurrentResponse> list = assetTaskDao.findByDwmcAssetCurrent(part); List<AssetCurrentResponse> list = assetTaskDao.findByDwmcAssetCurrent(part);
for (AssetCurrentResponse assetCurrentResponse:list){ for (AssetCurrentResponse assetCurrentResponse : list) {
assetCurrentResponse.setTaskId(id); assetCurrentResponse.setTaskId(id);
} }
assetCurrentCpService.saveBatch(list); assetCurrentCpService.saveBatch(list);
List<AssetBusinessFormCpResponse> assetBusinessFormCpResponseList = new ArrayList<>();
for (AssetCurrentResponse assetCurrentResponse : list) { for (AssetCurrentResponse assetCurrentResponse : list) {
//新增新监管业务形态 //新增新监管业务形态
//根据资产id查询新监管业务形态主表id //根据资产id查询新监管业务形态主表id
@ -94,8 +106,9 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
assetCurrentResponse.getXjgywxt().setId(assetBusinessFormCpResponse.getId()); assetCurrentResponse.getXjgywxt().setId(assetBusinessFormCpResponse.getId());
assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId()); assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId());
assetCurrentResponse.getXjgywxt().setTaskId(id); assetCurrentResponse.getXjgywxt().setTaskId(id);
assetBusinessFormCpService.save(assetCurrentResponse.getXjgywxt()); assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
} }
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
} }
//根据资产id查询供应链主表id- //根据资产id查询供应链主表id-
List<AssetSupplyChainCpResponse> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId()); List<AssetSupplyChainCpResponse> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
@ -105,8 +118,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setId(items.getId()); items.setId(items.getId());
items.setTaskId(id); items.setTaskId(id);
//新增供应链 //新增供应链
assetSupplyChainCpService.save(items);
} }
assetSupplyChainCpService.saveBatch(supplyChainList);
} }
List<AssetBasicNetworkCpResponse> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId()); List<AssetBasicNetworkCpResponse> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
if (BasicNetworkCpList != null) { if (BasicNetworkCpList != null) {
@ -116,9 +129,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setId(items.getId()); items.setId(items.getId());
items.setTaskId(id); items.setTaskId(id);
//新增基础网络 //新增基础网络
assetBasicNetworkCpService.save(items);
} }
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
} }
List<UnitOtherConcatCpResponse> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId()); List<UnitOtherConcatCpResponse> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
if (unitOtherConcatList != null) { if (unitOtherConcatList != null) {
@ -128,9 +140,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setConcatId(items.getConcatId()); items.setConcatId(items.getConcatId());
items.setTaskId(id); items.setTaskId(id);
//新增其他联系人 //新增其他联系人
unitOtherConcatCpService.save(items);
} }
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
} }
} }
} }
@ -161,17 +172,23 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
} }
@Override @Override
public AssetCurrentResponse taskSh(int taskId,int assetId) { public AssetCurrentResponse taskSh(int taskId, int assetId) {
AssetCurrentResponse byId = assetTaskDao.findBytaskIdandAssestId(taskId,assetId); AssetCurrentResponse byId = assetTaskDao.findBytaskIdandAssestId(taskId, assetId);
byId.setGylxxList(assetSupplyChainCpService.lambdaQuery().eq(AssetSupplyChainCpResponse::getAssetId,assetId).eq(AssetSupplyChainCpResponse::getDelFlag,"0").eq(AssetSupplyChainCpResponse::getTaskId,taskId).list()); byId.setGylxxList(assetSupplyChainCpService.lambdaQuery().eq(AssetSupplyChainCpResponse::getAssetId, assetId).eq(AssetSupplyChainCpResponse::getDelFlag, "0").eq(AssetSupplyChainCpResponse::getTaskId, taskId).list());
byId.setJcwlList(assetBasicNetworkCpService.lambdaQuery().eq(AssetBasicNetworkCpResponse::getAssetId,assetId).eq(AssetBasicNetworkCpResponse::getDelFlag,"0").eq(AssetBasicNetworkCpResponse::getTaskId,taskId).list()); byId.setJcwlList(assetBasicNetworkCpService.lambdaQuery().eq(AssetBasicNetworkCpResponse::getAssetId, assetId).eq(AssetBasicNetworkCpResponse::getDelFlag, "0").eq(AssetBasicNetworkCpResponse::getTaskId, taskId).list());
byId.setXjgywxt(assetBusinessFormCpService.lambdaQuery().eq(AssetBusinessFormCpResponse::getAssetId,assetId).eq(AssetBusinessFormCpResponse::getDelFlag,"0").eq(AssetBusinessFormCpResponse::getTaskId,taskId).one()); byId.setXjgywxt(assetBusinessFormCpService.lambdaQuery().eq(AssetBusinessFormCpResponse::getAssetId, assetId).eq(AssetBusinessFormCpResponse::getDelFlag, "0").eq(AssetBusinessFormCpResponse::getTaskId, taskId).one());
byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpResponse::getAssetId,assetId).eq(UnitOtherConcatCpResponse::getDelFlag,"0").eq(UnitOtherConcatCpResponse::getTaskId,taskId).list()); byId.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpResponse::getAssetId, assetId).eq(UnitOtherConcatCpResponse::getDelFlag, "0").eq(UnitOtherConcatCpResponse::getTaskId, taskId).list());
return byId; return byId;
} }
@Override @Override
public Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> assetTask, AssestTaskXqRequest pageRequest) { public Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> assetTask, AssestTaskXqRequest pageRequest) {
return assetTaskDao.zcHc(assetTask,pageRequest); return assetTaskDao.zcHc(assetTask, pageRequest);
}
@Override
public int sh(AssetCurrentShRequest req) {
return assetTaskDao.sh(req);
} }
} }

@ -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,18 +217,21 @@
<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>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into asset_task( task_name, task_time, task_deadline, task_finish_time, task_status, dwmc, insert into asset_task(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 (#{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwmc}, values (#{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwmc},
@ -252,7 +256,7 @@
(#{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}) (#{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_name = values(task_name)task_time = values(task_time)task_deadline = 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)dwmc = values(task_deadline)task_finish_time = values(task_finish_time)task_status = values(task_status)dwmc =
values(dwmc)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 =
@ -316,6 +320,20 @@
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
<update id="sh" parameterType="com.ruoyi.tc.entity.request.AssetCurrentShRequest">
update asset_current_cp
<set>
<if test="req.taskId != null ">
task_id = #{req.taskId},
</if>
<if test="req.assetId != null ">
id = #{req.assetId},
</if>
<if test="req.status != null ">
status = #{req.status},
</if>
</set>
</update>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="deleteById"> <delete id="deleteById">

Loading…
Cancel
Save