From 1a36bc3da473af7b28a525e971c0133b16419366 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Fri, 22 Nov 2024 09:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A8=A1=E5=9D=97=E7=BC=96?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tc/controller/AssetTaskController.java | 36 +++++++++++++-- .../java/com/ruoyi/tc/entity/AssetLc.java | 40 ++++------------- .../entity/request/AssetCurrentShRequest.java | 2 + .../tc/entity/request/AssetdwHcRequest.java | 23 ++++++++++ .../tc/entity/response/AssetdwHcResponse.java | 45 +++++++++++++++++++ .../com/ruoyi/tc/mapper/AssetTaskMapper.java | 13 +++++- .../ruoyi/tc/service/AssetTaskService.java | 10 +++++ .../tc/service/impl/AssetTaskServiceImpl.java | 41 +++++++++++------ .../src/main/resources/mapper/AssetLcDao.xml | 23 ++++++++-- .../main/resources/mapper/AssetTaskDao.xml | 24 ++++++++++ 10 files changed, 203 insertions(+), 54 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java index 51ab6cc..d002cbe 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetTaskController.java @@ -11,8 +11,10 @@ import com.ruoyi.tc.entity.po.*; 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.AssetdwHcRequest; import com.ruoyi.tc.entity.response.AssestTaskXqresponse; import com.ruoyi.tc.entity.response.AssetTaskIdResponse; +import com.ruoyi.tc.entity.response.AssetdwHcResponse; import com.ruoyi.tc.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -185,7 +187,7 @@ public class AssetTaskController extends BaseController { assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId()); if (StringUtils.isBlank(assetCurrent.getBfyy())) { //待审批 - assetCurrent.setStatus(1); + assetCurrent.setStatus(0); } else { //已报废 assetCurrent.setStatus(5); @@ -266,7 +268,10 @@ public class AssetTaskController extends BaseController { assetLc.setAssetName(assetCurrent.getXtmc()); //当审核状态为审核不通过 单位端重新提交 if (assetCurrent.getStatus().equals(4)){ - assetLc.setDwcxhcTime(LocalDateTime.now()); + assetLc.setTaskId(assetCurrent.getTaskId()); + assetLc.setXfTime(LocalDateTime.now()); + assetLc.setAssetName("单位重新核查提交时间"+assetCurrent.getXtmc()); + assetLcService.insert(assetLc); } StringBuilder a = new StringBuilder(); @@ -284,12 +289,18 @@ public class AssetTaskController extends BaseController { b.append(","); }); } + assetCurrent.setGlIp(b.toString()); - assetCurrentJyService.save(assetCurrent); + assetCurrent.setStatus(1); //当审核状态为带待核查 if(assetCurrent.getStatus().equals(1)){ - assetLc.setDwhcTime(LocalDateTime.now()); + assetLc.setXfTime(LocalDateTime.now()); + assetLc.setTaskId(assetCurrent.getTaskId()); + assetLc.setAssetName("单位核查完成提交"+assetCurrent.getXtmc()); + assetLcService.insert(assetLc); } + assetCurrentJyService.save(assetCurrent); + //新增新监管业务形态 if (assetCurrent.getXjgywxt() != null) { assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); @@ -335,5 +346,22 @@ public class AssetTaskController extends BaseController { public AjaxResult sh(@RequestBody AssetCurrentShRequest req) { return AjaxResult.success(assetTaskService.sh(req)); } + + + + /** + * 管理端-单位核查情况 + * + * @param req 请求类 + * @return + */ + @ApiOperation(value = "管理端-单位核查情况",response =AssetdwHcResponse.class ) + @PostMapping("/dwHc") + public AjaxResult dwHc(Page assetdwHcResponsePage, AssetdwHcRequest req) { + return AjaxResult.success(assetTaskService.dwHc(assetdwHcResponsePage,req)); + } + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetLc.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetLc.java index b2e1e0e..01f64d7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetLc.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetLc.java @@ -32,38 +32,19 @@ public class AssetLc implements Serializable { /** * 管理员下发时间 */ - @ApiModelProperty("管理员下发时间") + @ApiModelProperty("时间") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime xfTime; + + /** - * 单位核查完成提交时间 - */ - @ApiModelProperty("单位核查完成提交时间") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime dwhcTime; - /** - * 管理员审核驳回时间 - */ - @ApiModelProperty("管理员审核驳回时间") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime shbhTime; - /** - * 单位重新核查提交时间 - */ - @ApiModelProperty("单位重新核查提交时间") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime dwcxhcTime; - /** - * 管理员审核通过时间 + * 流程名称 */ - @ApiModelProperty("管理员审核通过时间") - @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime shtgTime; + @ApiModelProperty("流程名称") + private String assetName; + + /** * 用户id */ @@ -119,11 +100,6 @@ public class AssetLc implements Serializable { @ApiModelProperty("备注") private String remark; - /** - * 资产名称 - */ - @ApiModelProperty("资产名称") - private String assetName; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java index a968d1e..b036b5f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentShRequest.java @@ -27,6 +27,8 @@ public class AssetCurrentShRequest { private Integer assetId; + + /** * 审核状态(0待核查,1待审核,3审核通过,4审核不通过,5已报废) */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java new file mode 100644 index 0000000..ae266d4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetdwHcRequest.java @@ -0,0 +1,23 @@ +package com.ruoyi.tc.entity.request; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author dong + * @since 2024/11/21 18:49 + */ +@Data +@ApiModel("单位核查情况请求类") +public class AssetdwHcRequest { + + + /** + * 单位名称 + */ + @ApiModelProperty("单位名称") + private String dwmc; + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java new file mode 100644 index 0000000..e9b105f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/response/AssetdwHcResponse.java @@ -0,0 +1,45 @@ +package com.ruoyi.tc.entity.response; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author dong + * @since 2024/11/21 18:36 + */ +@Data +@ApiModel("核查单位信息响应类") +public class AssetdwHcResponse { + + + /** + * 单位名称 + */ + @ApiModelProperty("单位名称") + private String dwmc; + + + + + /** + * 核查资产数量 + */ + @ApiModelProperty("核查资产数量") + private Integer total; + + + /** + * 完成数量 + */ + @ApiModelProperty("完成数量") + private Integer checked; + + + /** + * 百分比 + */ + @ApiModelProperty("百分比") + private double checkedRatio; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java index 5f7b365..d836b23 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java @@ -6,9 +6,11 @@ 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.request.AssetdwHcRequest; import com.ruoyi.tc.entity.response.AssestTaskXqresponse; import com.ruoyi.tc.entity.po.AssetCurrentCpPo; import com.ruoyi.tc.entity.response.AssetTaskResponse; +import com.ruoyi.tc.entity.response.AssetdwHcResponse; import org.apache.ibatis.annotations.Param; import org.springframework.data.domain.Pageable; @@ -128,7 +130,6 @@ public interface AssetTaskMapper extends BaseMapper { AssetCurrentCpPo findBytaskIdandAssestId(@Param("taskId") int taskId, @Param("assetId") int assetId); - /** * 管理端审核 * @@ -136,5 +137,15 @@ public interface AssetTaskMapper extends BaseMapper { * @return */ int sh(@Param("req") AssetCurrentShRequest req); + + + + + /** + * 管理端-单位核查情况 + * + * @return + */ + Page dwHc(Page assetdwHcResponsePage, @Param("req") AssetdwHcRequest req); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java index 1e77dea..a46021d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetTaskService.java @@ -6,9 +6,11 @@ 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.request.AssetdwHcRequest; import com.ruoyi.tc.entity.response.AssestTaskXqresponse; import com.ruoyi.tc.entity.po.AssetCurrentCpPo; import com.ruoyi.tc.entity.response.AssetTaskResponse; +import com.ruoyi.tc.entity.response.AssetdwHcResponse; /** * 任务主表(AssetTask)表服务接口 @@ -86,4 +88,12 @@ public interface AssetTaskService extends IService { * @return */ int sh(AssetCurrentShRequest req); + + + /** + * 管理端-单位核查情况 + * + * @return + */ + Page dwHc(Page assetdwHcResponsePage,AssetdwHcRequest req); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java index e7c0cbb..17fc814 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetTaskServiceImpl.java @@ -4,17 +4,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.tc.entity.AssetLc; import com.ruoyi.tc.entity.AssetTask; -import com.ruoyi.tc.entity.request.Acomma; -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.po.*; +import com.ruoyi.tc.entity.request.*; import com.ruoyi.tc.entity.response.AssestTaskXqresponse; -import com.ruoyi.tc.entity.po.AssetBasicNetworkCpPo; -import com.ruoyi.tc.entity.po.AssetBusinessFormCpPo; -import com.ruoyi.tc.entity.po.AssetCurrentCpPo; -import com.ruoyi.tc.entity.po.AssetSupplyChainCpPo; import com.ruoyi.tc.entity.response.AssetTaskResponse; -import com.ruoyi.tc.entity.po.UnitOtherConcatCpPo; +import com.ruoyi.tc.entity.response.AssetdwHcResponse; import com.ruoyi.tc.mapper.AssetTaskMapper; import com.ruoyi.tc.service.*; import org.springframework.stereotype.Service; @@ -55,6 +49,7 @@ public class AssetTaskServiceImpl extends ServiceImpl a1 = new ArrayList<>(); - Arrays.asList(byId.getGlym().split(",")).forEach(x->{ + Arrays.asList(byId.getGlym().split(",")).forEach(x -> { Acomma acomma = new Acomma(); acomma.setKey(x); a1.add(acomma); }); byId.setGlymList(a1); List a2 = new ArrayList<>(); - Arrays.asList(byId.getGlIp().split(",")).forEach(x->{ + Arrays.asList(byId.getGlIp().split(",")).forEach(x -> { Acomma acomma = new Acomma(); acomma.setKey(x); a2.add(acomma); @@ -201,15 +197,32 @@ public class AssetTaskServiceImpl extends ServiceImpl zcHc(Page assetTask, AssestTaskXqRequest pageRequest) - { + public Page zcHc(Page assetTask, AssestTaskXqRequest pageRequest) { assetTask.setOptimizeCountSql(false); return assetTaskDao.zcHc(assetTask, pageRequest); } @Override public int sh(AssetCurrentShRequest req) { + AssetLc assetLc = new AssetLc(); + if (req.getStatus()==3) { + assetLc.setTaskId(req.getTaskId()); + assetLc.setXfTime(LocalDateTime.now()); + assetLc.setAssetName("管理员审核通过"); + assetLcService.insert(assetLc); + } else if (req.getStatus()==4) { + assetLc.setTaskId(req.getTaskId()); + assetLc.setAssetName("管理员审核不通过"); + assetLc.setXfTime(LocalDateTime.now()); + assetLcService.insert(assetLc); + } + + return assetTaskDao.sh(req); + } + + @Override + public Page dwHc(Page assetdwHcResponsePage,AssetdwHcRequest req) { - return assetTaskDao.sh(req); + return assetTaskDao.dwHc(assetdwHcResponsePage,req); } } diff --git a/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml index 6351a02..a9a6037 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetLcDao.xml @@ -48,7 +48,7 @@ + - insert into asset_lc(task_id,xf_time,dwhc_time,shbh_time,dwcxhc_time,shtg_time,ueser_id,dept_id,create_id,create_by,create_time,update_id,update_by,update_time,version,remark) - values (#{taskId},#{xfTime},#{dwhcTime},#{shbhTime},#{dwcxhcTime},#{shtgTime},#{ueserId},#{deptId},#{createId},#{createBy},#{createTime},#{updateId},#{updateBy},#{updateTime},#{version},#{remark}) + insert into asset_lc(task_id,xf_time,asset_name,ueser_id,dept_id,create_id,create_by,create_time,update_id,update_by,update_time,version,remark) + values (#{taskId},#{xfTime},#{assetName},#{ueserId},#{deptId},#{createId},#{createBy},#{createTime},#{updateId},#{updateBy},#{updateTime},#{version},#{remark}) diff --git a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml index 020f1f0..27000ed 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml @@ -221,6 +221,7 @@ and b.xtlx = #{req.xtlx} + order by b.current_id desc +