From 93d524ced26deb1c08fe69bb6e13cfb7ecf6f7ff Mon Sep 17 00:00:00 2001
From: 15856 <15856818120@163.com>
Date: Thu, 14 Nov 2024 17:24:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=BC=8F=E6=B4=9E=E5=8D=87?=
=?UTF-8?q?=E7=BA=A7=EF=BC=8C=E6=8E=A8=E9=80=81=E9=80=BB=E8=BE=91=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sgzb-modules/sgzb-material/pom.xml | 34 +++++++++++++++++
.../service/impl/BackReceiveServiceImpl.java | 37 +++++++++++--------
2 files changed, 56 insertions(+), 15 deletions(-)
diff --git a/sgzb-modules/sgzb-material/pom.xml b/sgzb-modules/sgzb-material/pom.xml
index b00b0ad..6912de0 100644
--- a/sgzb-modules/sgzb-material/pom.xml
+++ b/sgzb-modules/sgzb-material/pom.xml
@@ -18,7 +18,41 @@
com.bonus.sgzb
sgzb-common-core
+
+
+ org.apache.commons
+ commons-compress
+
+
+ ch.qos.logback
+ logback-classic
+
+
+ ch.qos.logback
+ logback-core
+
+
+
+ org.apache.commons
+ commons-compress
+ 1.26.0
+
+
+ ch.qos.logback
+ logback-core
+ 1.2.13
+
+
+ ch.qos.logback
+ logback-classic
+ 1.2.13
+
+
com.bonus.sgzb
sgzb-common-security
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java
index a243537..05a41c4 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/BackReceiveServiceImpl.java
@@ -9,6 +9,7 @@ import com.bonus.sgzb.base.api.domain.BackApplyInfo;
import com.bonus.sgzb.base.api.domain.MaMachine;
import com.bonus.sgzb.base.api.domain.MachinePart;
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
+import com.bonus.sgzb.base.mapper.MaMachineMapper;
import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
@@ -37,6 +38,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
@Resource
private BackReceiveMapper backReceiveMapper;
+ @Resource
+ private MaMachineMapper maMachineMapper;
+
@Resource
private TmTaskMapper tmTaskMapper;
@@ -527,21 +531,24 @@ public class BackReceiveServiceImpl implements BackReceiveService {
res = 1;
} else {
res = backReceiveMapper.updateMaStatus(maId, "15");
- //同步租赁机具状态
- try {
- MaMachine maMachine = new MaMachine();
- maMachine.setMaId(maId);
- // 15---1在库,16---2已出库
- maMachine.setMaStatus("1");
- String content = JSONObject.toJSONString(maMachine);
- Map map = new HashMap<>();
- map.put("body", content);
- String body = JSONObject.toJSONString(map);
- String data = HttpHelper.sendHttpPost(updateItemStatus, body);
- log.info("dataString-=========:" + data);
- } catch (Exception e) {
- log.error("同步租赁商城机具状态失败");
- throw new RuntimeException("同步租赁商城机具状态失败");
+ //查询装备是否推送到租赁
+ MaMachine maMachine = maMachineMapper.selectMaMachineByMaId(Long.valueOf(maId));
+ if (maMachine != null && maMachine.getPushStatus().equals(1)) {
+ //同步租赁机具状态
+ try {
+ maMachine.setMaId(maId);
+ // 15---1在库,16---2已出库
+ maMachine.setMaStatus("1");
+ String content = JSONObject.toJSONString(maMachine);
+ Map map = new HashMap<>();
+ map.put("body", content);
+ String body = JSONObject.toJSONString(map);
+ String data = HttpHelper.sendHttpPost(updateItemStatus, body);
+ log.info("dataString-=========:" + data);
+ } catch (Exception e) {
+ log.error("同步租赁商城机具状态失败");
+ throw new RuntimeException("同步租赁商城机具状态失败");
+ }
}
}
}