From 88424ed67743530db24eed145ffda7da1083f620 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Fri, 22 Nov 2024 15:51:36 +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/entity/po/AssetBusinessFormCpPo.java | 5 +++- .../entity/request/AssetTaskPageRequest.java | 7 ++++++ .../tc/service/impl/AssetTaskServiceImpl.java | 23 +++++++++++-------- .../main/resources/mapper/AssetTaskDao.xml | 6 +++-- .../src/main/resources/mapper/UnitMapper.xml | 7 ++++-- 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetBusinessFormCpPo.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetBusinessFormCpPo.java index a3d80b5..e46af6f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetBusinessFormCpPo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/po/AssetBusinessFormCpPo.java @@ -27,7 +27,10 @@ public class AssetBusinessFormCpPo extends BaseClass implements Serializable { @TableId(type = IdType.AUTO,value = "business_id") private Long businessId; - + /** + * 主键id + */ + private Long id; /** * 资源id */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java index ea0dc47..cba8fcd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetTaskPageRequest.java @@ -58,4 +58,11 @@ public class AssetTaskPageRequest { @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime endTime; + + + /** + * 单位名称 + */ + @ApiModelProperty("单位名称") + private String dwmc; } 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 5dd04cf..80f2255 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 @@ -67,7 +67,8 @@ public class AssetTaskServiceImpl extends ServiceImpl bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId()); if (bussList != null) { for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) { - assetCurrentResponse.getXjgywxt().setBusinessId(assetBusinessFormCpResponse.getBusinessId()); - assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId()); - assetCurrentResponse.getXjgywxt().setTaskId(id); - assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt()); + if (assetCurrentResponse.getXjgywxt() != null) { + assetCurrentResponse.getXjgywxt().setAssetId(assetBusinessFormCpResponse.getId()); + assetCurrentResponse.getXjgywxt().setTaskId(id); + assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt()); + } } assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList); } @@ -134,7 +137,7 @@ public class AssetTaskServiceImpl extends ServiceImpl SupplyChainNewList = SupplyChainList.stream() .map(cpPo -> { AssetSupplyChain supplyChain = new AssetSupplyChain(); + supplyChain.setId(null); BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性 return supplyChain; // 返回新对象 }) @@ -345,7 +349,6 @@ public class AssetTaskServiceImpl extends ServiceImpl and task_name = #{req.taskName} + + and dwmc = #{req.dwmc} + and task_finish_time >= #{req.begainTime} @@ -185,7 +188,6 @@ and task_status = #{req.taskStatus} - and id = #{req.id} @@ -259,7 +261,7 @@ SELECT a.status, CASE - WHEN DATE(a.update_time) > STR_TO_DATE(IFNULL(b.task_deadline, '1970-01-01'), '%Y-%m-%d') THEN '6' + WHEN a.update_time > b.task_deadline THEN '6' ELSE '7' END AS deadstatus FROM diff --git a/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml b/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml index f3c666d..72d12bd 100644 --- a/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/UnitMapper.xml @@ -115,9 +115,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"