fanxw 1 year ago
parent
commit
bb787404f0

+ 3 - 1
src/main/java/com/chinaitop/depot/business/service/impl/BusinessContractReceiveServiceImpl.java

@@ -195,7 +195,9 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
195
 			logger.info(basicMap+"");
195
 			logger.info(basicMap+"");
196
 			if (!"0".equals(basicMap.get("houseId").toString()) && !"0".equals(basicMap.get("warehouseId").toString()) && !"0".equals(basicMap.get("orgId").toString())) {
196
 			if (!"0".equals(basicMap.get("houseId").toString()) && !"0".equals(basicMap.get("warehouseId").toString()) && !"0".equals(basicMap.get("orgId").toString())) {
197
 				dataobj.setHouseId(Integer.parseInt(basicMap.get("houseId").toString()));
197
 				dataobj.setHouseId(Integer.parseInt(basicMap.get("houseId").toString()));
198
-				dataobj.setWarehouseId(Integer.parseInt(basicMap.get("warehouseId").toString()));
198
+				if (hw_sptid.length() > 4) {//说明是粮食仓房的。如果是小于等于4,那就是油罐的数据,货位的值为空
199
+					dataobj.setWarehouseId(Integer.parseInt(basicMap.get("warehouseId").toString()));
200
+				}
199
 				dataobj.setOrgId(Integer.parseInt(basicMap.get("orgId").toString()));
201
 				dataobj.setOrgId(Integer.parseInt(basicMap.get("orgId").toString()));
200
 				dataobj.setInputTime(new Date());
202
 				dataobj.setInputTime(new Date());
201
 				dataobj.setUpdateTime(dataobj.getInputTime());
203
 				dataobj.setUpdateTime(dataobj.getInputTime());

+ 32 - 4
src/main/java/com/chinaitop/depot/business/service/impl/BusinessDeliveryStorageNoticeServiceImpl.java

@@ -21,10 +21,9 @@ import com.chinaitop.depot.business.mapper.BusinessDeliveryStorageNoticeMapper;
21
 import com.chinaitop.depot.business.model.BusinessApproval;
21
 import com.chinaitop.depot.business.model.BusinessApproval;
22
 import com.chinaitop.depot.business.model.BusinessContract;
22
 import com.chinaitop.depot.business.model.BusinessContract;
23
 import com.chinaitop.depot.business.model.BusinessContractExample;
23
 import com.chinaitop.depot.business.model.BusinessContractExample;
24
+import com.chinaitop.depot.business.model.BusinessContractReceive;
24
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice;
25
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNotice;
25
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample;
26
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample;
26
-import com.chinaitop.depot.business.model.BusinessLading;
27
-import com.chinaitop.depot.business.model.BusinessLadingExample;
28
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample.Criteria;
27
 import com.chinaitop.depot.business.model.BusinessDeliveryStorageNoticeExample.Criteria;
29
 import com.chinaitop.depot.business.model.BusinessPlan;
28
 import com.chinaitop.depot.business.model.BusinessPlan;
30
 import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
29
 import com.chinaitop.depot.business.model.BusinessStoreWareDetail;
@@ -35,12 +34,14 @@ import com.chinaitop.depot.business.model.enums.StoreWareType;
35
 import com.chinaitop.depot.business.model.enums.TaskType;
34
 import com.chinaitop.depot.business.model.enums.TaskType;
36
 import com.chinaitop.depot.business.model.vo.BusinessDeliveryStorageNoticeAuditVO;
35
 import com.chinaitop.depot.business.model.vo.BusinessDeliveryStorageNoticeAuditVO;
37
 import com.chinaitop.depot.business.service.BusinessApprovalService;
36
 import com.chinaitop.depot.business.service.BusinessApprovalService;
37
+import com.chinaitop.depot.business.service.BusinessContractReceiveService;
38
 import com.chinaitop.depot.business.service.BusinessContractService;
38
 import com.chinaitop.depot.business.service.BusinessContractService;
39
 import com.chinaitop.depot.business.service.BusinessDeliveryStorageNoticeService;
39
 import com.chinaitop.depot.business.service.BusinessDeliveryStorageNoticeService;
40
 import com.chinaitop.depot.business.service.BusinessLadingService;
40
 import com.chinaitop.depot.business.service.BusinessLadingService;
41
 import com.chinaitop.depot.business.service.BusinessPlanService;
41
 import com.chinaitop.depot.business.service.BusinessPlanService;
42
 import com.chinaitop.depot.business.service.BusinessStoreWareDetailService;
42
 import com.chinaitop.depot.business.service.BusinessStoreWareDetailService;
43
 import com.chinaitop.depot.business.service.FeignAgileService;
43
 import com.chinaitop.depot.business.service.FeignAgileService;
44
+import com.chinaitop.depot.business.service.ReceiveNoticeService;
44
 import com.chinaitop.depot.business.service.UserInfoService;
45
 import com.chinaitop.depot.business.service.UserInfoService;
45
 import com.github.pagehelper.PageHelper;
46
 import com.github.pagehelper.PageHelper;
46
 import com.github.pagehelper.PageInfo;
47
 import com.github.pagehelper.PageInfo;
@@ -70,6 +71,10 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
70
     private BusinessApprovalService businessApprovalService;
71
     private BusinessApprovalService businessApprovalService;
71
     @Resource
72
     @Resource
72
     private UserInfoService userInfoService;
73
     private UserInfoService userInfoService;
74
+    @Resource
75
+	private ReceiveNoticeService receiveNoticeService;
76
+    @Resource
77
+    private BusinessContractReceiveService businessContractReceiveService;
73
     
78
     
74
     // 入库通知单枚举id,出入库系统使用.
79
     // 入库通知单枚举id,出入库系统使用.
75
     private static Integer STORAGENOTICEENUMID = 2816;
80
     private static Integer STORAGENOTICEENUMID = 2816;
@@ -388,11 +393,34 @@ public class BusinessDeliveryStorageNoticeServiceImpl implements BusinessDeliver
388
         approval.setTaskId(taskId);
393
         approval.setTaskId(taskId);
389
         
394
         
390
         businessApprovalService.add(approval);
395
         businessApprovalService.add(approval);
396
+
397
+        //符合以下条件,说明是储备粮下的入库通知单
398
+        if ("1".equals(businessDeliveryStorageNoticeB.getBillType()) && "1".equals(businessDeliveryStorageNoticeB.getCreateUnit())) {
399
+        	//给市平台推送合同被引用的消息
400
+        	pushHtStatus(businessDeliveryStorageNoticeB.getContractBid());
401
+        }
391
         
402
         
392
         return returnMap;
403
         return returnMap;
393
     }
404
     }
394
-    
395
-    /**
405
+
406
+    private void pushHtStatus(Integer id) {
407
+		try {
408
+			BusinessContractReceive contractReceive = businessContractReceiveService.findbyParmaryKey(id);
409
+			if (null != contractReceive) {
410
+				//businessNoticeReceive.getHtbh(), businessNoticeReceive.getOrgId()
411
+				JSONObject object = new JSONObject();
412
+				object.put("htbh", contractReceive.getHtbh());
413
+				object.put("orgId", contractReceive.getOrgId());
414
+				receiveNoticeService.pushHtStatus(object.toString());
415
+			}
416
+		} catch (Exception e) {
417
+			// TODO Auto-generated catch block
418
+			e.printStackTrace();
419
+		}
420
+	}
421
+
422
+
423
+	/**
396
      * 获取审批列表.
424
      * 获取审批列表.
397
      */
425
      */
398
     public List<BusinessDeliveryStorageNoticeAuditVO> getApprovalList(Map<String, Object> paramMap) {
426
     public List<BusinessDeliveryStorageNoticeAuditVO> getApprovalList(Map<String, Object> paramMap) {

+ 1 - 0
src/main/java/com/chinaitop/depot/business/service/impl/ReceiveNoticeServiceImpl.java

@@ -544,6 +544,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
544
 			JSONObject object = new JSONObject();
544
 			JSONObject object = new JSONObject();
545
 			object.put("htbm", htbm);
545
 			object.put("htbm", htbm);
546
 			object.put("isChange", "0");
546
 			object.put("isChange", "0");
547
+			logger.info("给给市平台发送合同被引用通知数据串:"+object.toString());;
547
 
548
 
548
 			//给市平台发送请求
549
 			//给市平台发送请求
549
 			result = HTTPUtils.doPost(path, object.toString());
550
 			result = HTTPUtils.doPost(path, object.toString());