fanxw 10 meses atrás
pai
commit
42c57f5157

+ 1 - 1
pom.xml

@@ -263,7 +263,7 @@
263 263
 	       </exclusions>  
264 264
 	       <scope>compile</scope>  
265 265
 	     </dependency>
266
-		
266
+
267 267
 	</dependencies>
268 268
 
269 269
 	<!-- 导入Spring Cloud的依赖管理 -->

+ 4 - 1
src/main/java/com/chinaitop/depot/act/controller/ActRoleController.java

@@ -8,6 +8,7 @@ import com.chinaitop.depot.business.service.RoleInfoService;
8 8
 import org.activiti.engine.delegate.Expression;
9 9
 import org.activiti.engine.impl.task.TaskDefinition;
10 10
 import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RequestMethod;
11 12
 import org.springframework.web.bind.annotation.RestController;
12 13
 
13 14
 import javax.annotation.Resource;
@@ -26,7 +27,7 @@ public class ActRoleController {
26 27
 	 * @throws Exception
27 28
 	 * @param procInstId 流程定义的id
28 29
 	 */
29
-	@RequestMapping(value="/getUserList")
30
+	@RequestMapping(value="/getUserList", method=RequestMethod.GET)
30 31
 	public Map<String, Object> getUserList(String procInstId, String type,Integer orgId) throws Exception{
31 32
 		/*procInstId = "190075";*/
32 33
 		int roleId = 0 ;
@@ -69,10 +70,12 @@ public class ActRoleController {
69 70
 				modelMap.put("userByRoleId", userByRoleId);
70 71
 			}else {
71 72
 				modelMap.put("isEnd", true);
73
+				modelMap.put("msg", "没有下一个审批角色或没有角色对应的审批人");
72 74
 			}
73 75
 
74 76
 		}else {
75 77
 			modelMap.put("isEnd", true);
78
+			modelMap.put("msg", "没有检测到流程数据信息");
76 79
 
77 80
 		}
78 81
 		return modelMap;

+ 1 - 1
src/main/java/com/chinaitop/depot/business/controller/BusinessStoreWareDetailController.java

@@ -444,7 +444,7 @@ public class BusinessStoreWareDetailController {
444 444
     @RequestMapping(value="/getCkRemainNumber",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
445 445
     @ApiOperation(value="剩余数量(出库通知单)", notes = "剩余数量(出库通知单)")
446 446
     @ApiImplicitParams({
447
-    	@ApiImplicitParam(name = "receiveNoticeList", value = "选中的数据", paramType = "query")
447
+    	@ApiImplicitParam(name = "receiveNoticeListJson", value = "选中的数据", paramType = "query")
448 448
     })
449 449
     public Map<String, Object> getCkRemainNumber(String receiveNoticeListJson) {
450 450
     	Map<String, Object> modelMap = new HashMap<String, Object>();

+ 2 - 3
src/main/java/com/chinaitop/depot/business/mapper/BusinessStoreWareDetailMapper.xml

@@ -620,16 +620,15 @@
620 620
   </select>
621 621
   <!-- 通过合同ID获取合同子表数据的已使用数量 -->
622 622
   <select id="selectContractUseCount" parameterType="java.util.Map" resultType="java.util.Map">
623
-    SELECT detail.contract_id, detail.id, detail.house_id,detail.warehouse_id, SUM(detail.in_count) in_count, SUM(detail.out_count) out_count FROM 
623
+    SELECT detail.contract_id, detail.house_id,detail.warehouse_id, SUM(detail.in_count) in_count, SUM(detail.out_count) out_count FROM 
624 624
 	(
625
-	SELECT c.id contract_id,a.id, a.house_id,a.warehouse_id,a.in_count,a.out_count FROM business_store_ware_detail a
625
+	SELECT c.id contract_id, a.house_id,a.warehouse_id,a.in_count,a.out_count FROM business_store_ware_detail a
626 626
 	LEFT JOIN business_delivery_storage_notice b on b.id=a.zid
627 627
 	LEFT JOIN business_contract c ON c.id=b.contract_bid
628 628
 	WHERE 1=1 AND a.type='notice' AND b.audit_state!=4 AND b.changing=0
629 629
 	) detail
630 630
 	WHERE detail.contract_id=#{contract_id} 
631 631
 	GROUP BY detail.contract_id,detail.house_id,detail.warehouse_id
632
-	ORDER BY detail.id
633 632
   </select>
634 633
   
635 634
   <!-- 储备粮中计算合同中已使用的数量 -->

+ 17 - 5
src/main/java/com/chinaitop/depot/business/service/impl/BusinessContractReceiveServiceImpl.java

@@ -116,10 +116,17 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
116 116
 		}
117 117
 		String pz = obj.getString("pz");
118 118
 		if (StringUtils.isNotBlank(pz)) {
119
-			Map<String, Object> basicMap = feignBasicService.getIdByNameAndParentId(1061, null, pz);
120
-			logger.info("根据"+pz+"获取到的品种数据如下:");
121
-			logger.info(basicMap.toString());
122
-			String lypz = basicMap.get("enumId")+"";
119
+			String lypz = "";
120
+			if (pz.equals("2130000") || pz.equals("1410000")) {
121
+				lypz = "7144";
122
+				logger.info("根据"+pz+"获取到的品种数据如下:");
123
+				logger.info("原油对应的字典ID是:7144");
124
+			} else {
125
+				Map<String, Object> basicMap = feignBasicService.getIdByNameAndParentId(1061, null, pz);
126
+				lypz = basicMap.get("enumId")+"";
127
+				logger.info("根据"+pz+"获取到的品种数据如下:");
128
+				logger.info(basicMap.toString());
129
+			}
123 130
 			if (StringUtils.isNotBlank(lypz)) {
124 131
 				dataobj.setLypz(Integer.parseInt(lypz));
125 132
 			} else {
@@ -131,7 +138,12 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
131 138
 		String mxpz = obj.getString("mxpz");
132 139
 		if (StringUtils.isNotBlank(mxpz)) {
133 140
 			if (null != dataobj.getLypz()) {
134
-				Integer enumid = getEnumId(dataobj.getLypz(), mxpz);
141
+				Integer enumid = null;
142
+				if (mxpz.equals("2131000")) {
143
+					enumid = 7145;
144
+				} else {
145
+					enumid = getEnumId(dataobj.getLypz(), mxpz);
146
+				}
135 147
 				logger.info("根据"+mxpz+"获取到的明细品种数据是:"+enumid);
136 148
 				if (null != enumid) {
137 149
 					dataobj.setMxpz(enumid);

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

@@ -242,7 +242,9 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
242 242
                             Integer wareHouseId = (Integer) wareDataMap.get("wareHouseId");
243 243
                             Integer orgId = (Integer) wareDataMap.get("orgId");
244 244
                             businessNoticeReceive.setHouseId(houseId); //仓房
245
-                            businessNoticeReceive.setWareHouseId(wareHouseId); //货位
245
+                            if (!wareHouseId.toString().equals(houseId.toString())) {//只有粮仓才保存货位,油罐不保存货位
246
+                            	businessNoticeReceive.setWareHouseId(wareHouseId); //货位
247
+                            }
246 248
                             businessNoticeReceive.setOrgId(orgId);  //组织id
247 249
                             if(ObjectUtils.toString(jsonObject.getString("ywlx")).equals("6")){//入库竞价的业务类型
248 250
                                 if(jsonObject.getString("pz")!=null){