From 90cfb1285e0b085137094d09b8b84113eea6c399 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Fri, 22 Nov 2024 19:16:40 +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 | 13 +++++---- .../ruoyi/tc/controller/UnitController.java | 2 +- .../tc/entity/po/AssetBusinessFormCpPo.java | 5 +--- .../ruoyi/tc/entity/request/UnitRequest.java | 2 +- .../tc/service/impl/AssetTaskServiceImpl.java | 29 +++++++++++++++---- .../resources/mapper/AssetCurrentMapper.xml | 2 +- .../main/resources/mapper/AssetTaskDao.xml | 16 +++++----- .../src/main/resources/mapper/UnitMapper.xml | 3 +- 8 files changed, 45 insertions(+), 27 deletions(-) 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 08f1f59..53e576c 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 @@ -190,6 +190,7 @@ public class AssetTaskController extends BaseController { } else { //已报废 assetCurrent.setStatus(5); + assetCurrent.setXtzt("5"); } StringBuilder a = new StringBuilder(); if (!assetCurrent.getGlymList().isEmpty()) { @@ -266,12 +267,12 @@ public class AssetTaskController extends BaseController { assetLc.setTaskId(assetCurrent.getTaskId()); assetLc.setAssetName(assetCurrent.getXtmc()); //当审核状态为审核不通过 单位端重新提交 - if (assetCurrent.getStatus().equals(4)) { - assetLc.setTaskId(assetCurrent.getTaskId()); - assetLc.setXfTime(LocalDateTime.now()); - assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc()); - assetLcService.insert(assetLc); - } +// if (assetCurrent.getStatus().equals(4)) { +// assetLc.setTaskId(assetCurrent.getTaskId()); +// assetLc.setXfTime(LocalDateTime.now()); +// assetLc.setAssetName("单位重新核查提交时间" + assetCurrent.getXtmc()); +// assetLcService.insert(assetLc); +// } StringBuilder a = new StringBuilder(); if (!assetCurrent.getGlymList().isEmpty()) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java index 992b0ef..dd679da 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java @@ -34,7 +34,7 @@ import java.util.List; */ @Api(tags = "单位表控制层") @RestController -@PreAuthorize("@ss.hasAnyRoles('admin,common')") +//@PreAuthorize("@ss.hasAnyRoles('admin,common')") @RequestMapping("/tc/unit") public class UnitController { 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 e46af6f..a3d80b5 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,10 +27,7 @@ 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/UnitRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java index 5e37502..9c0e2d0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java @@ -13,7 +13,7 @@ public class UnitRequest { @ApiModelProperty("1 查询已有资产的单位") - private String isSearch; + private int isSearch; @ApiModelProperty("统一社会信用代码") private String userName; 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 80f2255..63a42dd 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 @@ -125,7 +125,7 @@ public class AssetTaskServiceImpl extends ServiceImpl zcHc(Page assetTask, AssestTaskXqRequest pageRequest) { assetTask.setOptimizeCountSql(false); - return assetTaskDao.zcHc(assetTask, pageRequest); + Page result = assetTaskDao.zcHc(assetTask, pageRequest); + // 确保 records 不为 null + if (result.getRecords() == null) { + result.setRecords(new ArrayList<>()); // 设置为空数组 + } + return result; } @Override @@ -247,6 +252,7 @@ public class AssetTaskServiceImpl extends ServiceImpl item.getStatus() == 3); boolean hasExpired = list.stream().anyMatch(item -> item.getDeadstatus() == 6); boolean hasRejected = list.stream().anyMatch(item -> item.getStatus() == 4); + boolean hased = list.stream().anyMatch(item -> item.getStatus() == 5); LocalDateTime finishTime = null; if (hasPendingApproval) { // 资产状态存在待审批,任务状态为进行中 @@ -263,7 +269,18 @@ public class AssetTaskServiceImpl extends ServiceImpl select * from asset_current - del_flag = '0' and isbf = '0' + del_flag = '0' and xtmc like concat('%',#{req.xtmc},'%') diff --git a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml index 5d67f98..d460f82 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetTaskDao.xml @@ -177,7 +177,7 @@ and task_name = #{req.taskName} - and dwmc = #{req.dwmc} + and dwmc like concat('%',#{req.dwmc},'%') and task_finish_time >= #{req.begainTime} @@ -191,7 +191,9 @@ and id = #{req.id} + + order by task_time desc update unit_info set del_flag = '2' where id = #{id}