杜函宇 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.AssetTask;
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.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import com.ruoyi.tc.service.AssetTaskService;
import com.ruoyi.tc.entity.response.*;
import com.ruoyi.tc.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.time.LocalDateTime;
/**
* (AssetTask)
@ -34,6 +35,20 @@ public class AssetTaskController extends BaseController {
@Resource
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)
@GetMapping("/page")
public AjaxResult queryByPage(Page<AssetTask> assetTask, AssetTaskPageRequest pageRequest) {
return AjaxResult.success(this.assetTaskService.queryByPage(assetTask, pageRequest));
}
@ -69,6 +85,7 @@ public class AssetTaskController extends BaseController {
@PostMapping("/add")
@Transactional(rollbackFor = Exception.class)
public AjaxResult add(@RequestBody @Valid AssetTask assetTask) {
assetTask.setTaskTime(LocalDateTime.now());
this.assetTaskService.insert(assetTask);
return AjaxResult.success();
}
@ -99,17 +116,17 @@ public class AssetTaskController extends BaseController {
/**
*
*
*
* @param taskId id
* @param assetId id
* @return
*/
@ApiOperation(value = "任务审核", response = AssetCurrent.class)
@ApiOperation(value = "任务审核详情信息", response = AssetCurrent.class)
@GetMapping("/taskSh")
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));
}
/**
*
*
* @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("资产类型")
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;
}

@ -31,7 +31,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 50,message="云平台-云平台服务商长度不能超过50")
@ApiModelProperty("云平台-云平台服务商")
private String yptFws;
/**
@ -48,73 +48,73 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@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;
/**
@ -125,13 +125,13 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 50,message="一般物联网设备-系统集成商名称长度不能超过50")
@ApiModelProperty("一般物联网设备-系统集成商名称")
private String wlwsbXtjcs;
/**
* -
*/
@Size(max= 50,message="一般物联网设备-用户数量长度不能超过50")
@ApiModelProperty("一般物联网设备-用户数量")
private String wlwsbYhsl;
/**
@ -142,7 +142,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 50,message="一般物联网设备-终端数量长度不能超过50")
@ApiModelProperty("一般物联网设备-终端数量")
private String wlwsbZdsl;
/**
@ -153,7 +153,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 50,message="一般物联网设备-联系人长度不能超过50")
@ApiModelProperty("一般物联网设备-联系人")
private String wlwsbLxr;
/**
@ -164,97 +164,97 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@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;
/**
@ -265,13 +265,13 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 255,message="工业控制-系统集成商名称长度不能超过255")
@ApiModelProperty("工业控制-系统集成商名称")
private String gykzJcs;
/**
* -
*/
@Size(max= 255,message="工业控制-运行时间长度不能超过255")
@ApiModelProperty("工业控制-运行时间")
private String gykzYxsj;
/**
@ -282,7 +282,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 255,message="工业控制-集成商国内外情况长度不能超过255")
@ApiModelProperty("工业控制-集成商国内外情况")
private String gykzJcsqk;
/**
@ -293,7 +293,7 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@Size(max= 255,message="工业控制-联系人长度不能超过255")
@ApiModelProperty("工业控制-联系人")
private String gykzLxr;
/**
@ -304,61 +304,61 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* -
*/
@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;
/**
@ -369,31 +369,31 @@ public class AssetBusinessFormCpResponse extends BaseClass implements Serializab
/**
* 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;

@ -35,31 +35,31 @@ public class AssetSupplyChainCpResponse extends BaseClass implements Serializabl
/**
*
*/
@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;
/**

@ -1,14 +1,15 @@
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.Delete;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_basic_network_cp)访
*
* @author makejava
* @since 2024-11-15 10:03:56
*/
@ -25,5 +26,13 @@ public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkC
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.ruoyi.tc.entity.response.AssetBusinessFormCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* (asset_business_form_cp)访
*
@ -22,5 +25,15 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
@Select("select * from asset_business_form where asset_id =#{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.request.AssetCurrentPageRequest;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -16,22 +17,12 @@ import java.util.List;
* @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);
/**
*
* @param assetId
* @param taskId
*/
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.ruoyi.tc.entity.response.AssetSupplyChainCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -15,7 +16,6 @@ import java.util.List;
public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpResponse> {
/**
* idid
*
@ -25,5 +25,15 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpR
@Select("select * from asset_supply_chain where asset_id=#{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.ruoyi.tc.entity.AssetTask;
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.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
@ -125,5 +126,15 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
* @return
*/
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.ruoyi.tc.entity.response.UnitOtherConcatCpResponse;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -22,4 +23,14 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpRes
*/
@Select("select * from unit_other_contact where asset_id =#{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);
/**
* 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);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
}

@ -1,14 +1,8 @@
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)
*
@ -17,5 +11,13 @@ import java.util.List;
*/
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);
/**
* idid
*
* @param assetId id
* @param taskId id
*/
void deletByAssetIdandTaskId(Long assetId, int taskId);
}

@ -1,18 +1,14 @@
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.AssetTask;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetCurrentResponse;
import com.ruoyi.tc.entity.response.AssetTaskIdResponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse;
import org.springframework.data.domain.PageRequest;
import java.util.List;
/**
* (AssetTask)
@ -81,4 +77,13 @@ public interface AssetTaskService extends IService<AssetTask> {
* @return
*/
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
*/
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);
}
@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) {
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")
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) {
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.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.AssetCurrentShRequest;
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.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 javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
@ -42,8 +55,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
private UnitOtherConcatCpService unitOtherConcatCpService;
/**
* ID
*
@ -76,15 +87,16 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
@Override
public void insert(AssetTask assetTask) {
//任务新增
int id= assetTaskDao.insert(assetTask);
int id = assetTaskDao.insert(assetTask);
String[] parts = assetTask.getDwmc().split(",");
for (String part : parts) {
//根据单位名称查询资产
List<AssetCurrentResponse> list = assetTaskDao.findByDwmcAssetCurrent(part);
for (AssetCurrentResponse assetCurrentResponse:list){
for (AssetCurrentResponse assetCurrentResponse : list) {
assetCurrentResponse.setTaskId(id);
}
assetCurrentCpService.saveBatch(list);
List<AssetBusinessFormCpResponse> assetBusinessFormCpResponseList = new ArrayList<>();
for (AssetCurrentResponse assetCurrentResponse : list) {
//新增新监管业务形态
//根据资产id查询新监管业务形态主表id
@ -94,8 +106,9 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
assetCurrentResponse.getXjgywxt().setId(assetBusinessFormCpResponse.getId());
assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId());
assetCurrentResponse.getXjgywxt().setTaskId(id);
assetBusinessFormCpService.save(assetCurrentResponse.getXjgywxt());
assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
}
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
}
//根据资产id查询供应链主表id-
List<AssetSupplyChainCpResponse> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
@ -105,8 +118,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setId(items.getId());
items.setTaskId(id);
//新增供应链
assetSupplyChainCpService.save(items);
}
assetSupplyChainCpService.saveBatch(supplyChainList);
}
List<AssetBasicNetworkCpResponse> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
if (BasicNetworkCpList != null) {
@ -116,9 +129,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setId(items.getId());
items.setTaskId(id);
//新增基础网络
assetBasicNetworkCpService.save(items);
}
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
}
List<UnitOtherConcatCpResponse> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
if (unitOtherConcatList != null) {
@ -128,9 +140,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
items.setConcatId(items.getConcatId());
items.setTaskId(id);
//新增其他联系人
unitOtherConcatCpService.save(items);
}
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
}
}
}
@ -161,17 +172,23 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
}
@Override
public AssetCurrentResponse taskSh(int taskId,int 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.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.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpResponse::getAssetId,assetId).eq(UnitOtherConcatCpResponse::getDelFlag,"0").eq(UnitOtherConcatCpResponse::getTaskId,taskId).list());
public AssetCurrentResponse taskSh(int taskId, int 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.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.setOtherConcat(unitOtherConcatCpService.lambdaQuery().eq(UnitOtherConcatCpResponse::getAssetId, assetId).eq(UnitOtherConcatCpResponse::getDelFlag, "0").eq(UnitOtherConcatCpResponse::getTaskId, taskId).list());
return byId;
}
@Override
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) {
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 b.xtlx,
b.xtmc,
b.dwmc,
b.dwmc as zcdwmc,
b.status,
b.id
b.id ,
b.task_id
from asset_task a
LEFT JOIN
asset_current_cp b ON FIND_IN_SET(b.dwmc, a.dwmc)
@ -216,18 +217,21 @@
<if test="req.status!=null ">
and b.status =#{req.status}
</if>
<if test="req.zclx!=null and req.zclx!='' ">
and b.zclx = #{req.zclx}
<if test="req.xtlx!=null and req.xtlx!='' ">
and b.xtlx = #{req.xtlx}
</if>
</where>
</select>
<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>
<!--新增所有列-->
<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,
version, reamark)
values (#{taskName}, #{taskTime}, #{taskDeadline}, #{taskFinishTime}, #{taskStatus}, #{dwmc},
@ -316,6 +320,20 @@
</set>
where id = #{id}
</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">

Loading…
Cancel
Save