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("同步租赁商城机具状态失败");
+ }
}
}
}