From c7e9e47f7b75dd0a88c929d7fb0713e5f638fdf1 Mon Sep 17 00:00:00 2001
From: jiazx0107 <jiazx0107@163.com>
Date: 星期日, 08 二月 2026 19:08:11 +0800
Subject: [PATCH] 调整工单审核功能,调整出入库工单排序
---
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java | 51 +++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 41 insertions(+), 10 deletions(-)
diff --git a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
index 778a6a3..358b891 100644
--- a/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
+++ b/fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -1,6 +1,7 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.InoutConstant;
import com.fzzy.igds.data.*;
@@ -75,6 +76,7 @@
queryWrapper.like("complete_status", param.getCompleteStatus());
}
+ queryWrapper.orderByDesc("id");
noticeInMapper.selectPage(page, queryWrapper);
}
@@ -90,6 +92,9 @@
}
if (StringUtils.isNotBlank(param.getDeptId())) {
queryWrapper.eq("dept_id", param.getDeptId());
+ }
+ if (StringUtils.isNotBlank(param.getAuditStatus())) {
+ queryWrapper.eq("audit_status", param.getAuditStatus());
}
if (StringUtils.isNotBlank(param.getCompleteStatus())) {
queryWrapper.eq("complete_status", param.getCompleteStatus());
@@ -143,7 +148,7 @@
//鑾峰彇璐ㄦ娂鍚堝悓鏁版嵁
PledgeContract pledge = this.getPledgeByDepotId(data);
if (null != pledge && pledge.getStatus().equals(Constant.YN_N)) {
- return BaseResp.error("褰撳墠浠撳簱鏈夋湭瑙e帇鐨勮川鎶煎悎鍚岋紝璐ㄦ娂鍚堝悓=" + pledge.getName());
+ return BaseResp.error("褰撳墠浠撳簱鏈夋湭瑙f娂鐨勮川鎶煎悎鍚岋紝璐ㄦ娂鍚堝悓=" + pledge.getName());
}
}
@@ -197,9 +202,9 @@
/**
- * 鍒ゆ柇褰撳墠浠撳簱鏄惁鍦ㄨ川鎶煎悎鍚屼腑鏈В鍘�
+ * 鍒ゆ柇褰撳墠浠撳簱鏄惁鍦ㄨ川鎶煎悎鍚屼腑鏈В鎶�
* @param data 褰撳墠鏁版嵁
- * @return true-鍦ㄨ川鎶煎悎鍚屼腑鏈В鍘嬶紝false-鍦ㄨ川鎶煎悎鍚屼腑宸茶В鍘�
+ * @return true-鍦ㄨ川鎶煎悎鍚屼腑鏈В鎶硷紝false-鍦ㄨ川鎶煎悎鍚屼腑宸茶В鎶�
*/
private PledgeContract getPledgeByDepotId(InoutNoticeIn data) {
IgdsBaseParam param = new IgdsBaseParam();
@@ -216,6 +221,18 @@
param.setDepotId(data.getDepotId());
param.setBankId(data.getBankId());
return pledgeContractService.getByDepotId(param);
+ }
+
+ /**
+ * 鏇存柊瀹℃牳鐘舵��
+ * @param id
+ * @param status
+ */
+ public void updateNoticeInStatus(String id, String status) {
+ UpdateWrapper<InoutNoticeIn> updateWrapper = new UpdateWrapper<>();
+ updateWrapper.eq("id", id).set("audit_status", status);
+
+ noticeInMapper.update(null, updateWrapper);
}
/**
@@ -254,7 +271,7 @@
if (StringUtils.isNotBlank(param.getCompleteStatus())) {
queryWrapper.like("complete_status", param.getCompleteStatus());
}
-
+ queryWrapper.orderByDesc("id");
noticeOutMapper.selectPage(page, queryWrapper);
}
@@ -269,6 +286,9 @@
}
if (StringUtils.isNotBlank(param.getDeptId())) {
queryWrapper.eq("dept_id", param.getDeptId());
+ }
+ if (StringUtils.isNotBlank(param.getAuditStatus())) {
+ queryWrapper.eq("audit_status", param.getAuditStatus());
}
if (StringUtils.isNotBlank(param.getCompleteStatus())) {
queryWrapper.eq("complete_status", param.getCompleteStatus());
@@ -287,7 +307,6 @@
* @return
*/
public InoutNoticeOut getNoticeOutOne(String id) {
-
QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("id", id);
return noticeOutMapper.selectOne(queryWrapper);
@@ -316,13 +335,13 @@
*/
@Transactional(rollbackFor = Exception.class)
public BaseResp saveOrUpdateOut(InoutNoticeOut data) {
- //濡傛灉鍑哄簱閫氱煡鍗曠被鍨嬩负搴撳尯閫氱煡鍗曪紝楠岃瘉浠撳簱鏄惁鏄湭瑙e帇寰椾粨搴擄紝鏄垯涓嶅厑璁镐繚瀛�
+ //濡傛灉鍑哄簱閫氱煡鍗曠被鍨嬩负搴撳尯閫氱煡鍗曪紝楠岃瘉浠撳簱鏄惁鏄湭瑙f娂寰椾粨搴擄紝鏄垯涓嶅厑璁镐繚瀛�
if (InoutConstant.NOTICE_IN_TYPE_10.equals(data.getType())) {
- //鍦ㄨ川鎶煎悎鍚屾壘鍒版湭瑙e帇锛屼笖璐ㄦ娂浠撳簱鍖呭惈褰撳墠浠撳簱鐨勬暟鎹�
+ //鍦ㄨ川鎶煎悎鍚屾壘鍒版湭瑙f娂锛屼笖璐ㄦ娂浠撳簱鍖呭惈褰撳墠浠撳簱鐨勬暟鎹�
//鑾峰彇璐ㄦ娂鍚堝悓鏁版嵁
PledgeContract pledge = this.getPledgeByDepotIdOut(data);
if (null != pledge && pledge.getStatus().equals(Constant.YN_N)) {
- return BaseResp.error("褰撳墠浠撳簱鏈夋湭瑙e帇鐨勮川鎶煎悎鍚岋紝璐ㄦ娂鍚堝悓=" + pledge.getName());
+ return BaseResp.error("褰撳墠浠撳簱鏈夋湭瑙f娂鐨勮川鎶煎悎鍚岋紝璐ㄦ娂鍚堝悓=" + pledge.getName());
}
}
//濡傛灉鍑哄簱閫氱煡鍗曠被鍨嬩负鐩戠閫氱煡鍗�
@@ -347,6 +366,18 @@
noticeOutMapper.updateById(data);
return BaseResp.success();
}
+ }
+
+ /**
+ * 鏇存柊瀹℃牳鐘舵��
+ * @param id
+ * @param status
+ */
+ public void updateNoticeOutStatus(String id, String status) {
+ UpdateWrapper<InoutNoticeOut> updateWrapper = new UpdateWrapper<>();
+ updateWrapper.eq("id", id).set("audit_status", status);
+
+ noticeOutMapper.update(null, updateWrapper);
}
/**
@@ -385,9 +416,9 @@
}
/**
- * 鍒ゆ柇褰撳墠浠撳簱鏄惁鍦ㄨ川鎶煎悎鍚屼腑鏈В鍘�
+ * 鍒ゆ柇褰撳墠浠撳簱鏄惁鍦ㄨ川鎶煎悎鍚屼腑鏈В鎶�
* @param data 褰撳墠鏁版嵁
- * @return true-鍦ㄨ川鎶煎悎鍚屼腑鏈В鍘嬶紝false-鍦ㄨ川鎶煎悎鍚屼腑宸茶В鍘�
+ * @return true-鍦ㄨ川鎶煎悎鍚屼腑鏈В鎶硷紝false-鍦ㄨ川鎶煎悎鍚屼腑宸茶В鎶�
*/
private PledgeContract getPledgeByDepotIdOut(InoutNoticeOut data) {
IgdsBaseParam param = new IgdsBaseParam();
--
Gitblit v1.9.3