fanxw 10 months ago
parent
commit
42c57f5157

+ 1 - 1
pom.xml

@@ -263,7 +263,7 @@
263
 	       </exclusions>  
263
 	       </exclusions>  
264
 	       <scope>compile</scope>  
264
 	       <scope>compile</scope>  
265
 	     </dependency>
265
 	     </dependency>
266
-		
266
+
267
 	</dependencies>
267
 	</dependencies>
268
 
268
 
269
 	<!-- 导入Spring Cloud的依赖管理 -->
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
 import org.activiti.engine.delegate.Expression;
8
 import org.activiti.engine.delegate.Expression;
9
 import org.activiti.engine.impl.task.TaskDefinition;
9
 import org.activiti.engine.impl.task.TaskDefinition;
10
 import org.springframework.web.bind.annotation.RequestMapping;
10
 import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RequestMethod;
11
 import org.springframework.web.bind.annotation.RestController;
12
 import org.springframework.web.bind.annotation.RestController;
12
 
13
 
13
 import javax.annotation.Resource;
14
 import javax.annotation.Resource;
@@ -26,7 +27,7 @@ public class ActRoleController {
26
 	 * @throws Exception
27
 	 * @throws Exception
27
 	 * @param procInstId 流程定义的id
28
 	 * @param procInstId 流程定义的id
28
 	 */
29
 	 */
29
-	@RequestMapping(value="/getUserList")
30
+	@RequestMapping(value="/getUserList", method=RequestMethod.GET)
30
 	public Map<String, Object> getUserList(String procInstId, String type,Integer orgId) throws Exception{
31
 	public Map<String, Object> getUserList(String procInstId, String type,Integer orgId) throws Exception{
31
 		/*procInstId = "190075";*/
32
 		/*procInstId = "190075";*/
32
 		int roleId = 0 ;
33
 		int roleId = 0 ;
@@ -69,10 +70,12 @@ public class ActRoleController {
69
 				modelMap.put("userByRoleId", userByRoleId);
70
 				modelMap.put("userByRoleId", userByRoleId);
70
 			}else {
71
 			}else {
71
 				modelMap.put("isEnd", true);
72
 				modelMap.put("isEnd", true);
73
+				modelMap.put("msg", "没有下一个审批角色或没有角色对应的审批人");
72
 			}
74
 			}
73
 
75
 
74
 		}else {
76
 		}else {
75
 			modelMap.put("isEnd", true);
77
 			modelMap.put("isEnd", true);
78
+			modelMap.put("msg", "没有检测到流程数据信息");
76
 
79
 
77
 		}
80
 		}
78
 		return modelMap;
81
 		return modelMap;

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

@@ -444,7 +444,7 @@ public class BusinessStoreWareDetailController {
444
     @RequestMapping(value="/getCkRemainNumber",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
444
     @RequestMapping(value="/getCkRemainNumber",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
445
     @ApiOperation(value="剩余数量(出库通知单)", notes = "剩余数量(出库通知单)")
445
     @ApiOperation(value="剩余数量(出库通知单)", notes = "剩余数量(出库通知单)")
446
     @ApiImplicitParams({
446
     @ApiImplicitParams({
447
-    	@ApiImplicitParam(name = "receiveNoticeList", value = "选中的数据", paramType = "query")
447
+    	@ApiImplicitParam(name = "receiveNoticeListJson", value = "选中的数据", paramType = "query")
448
     })
448
     })
449
     public Map<String, Object> getCkRemainNumber(String receiveNoticeListJson) {
449
     public Map<String, Object> getCkRemainNumber(String receiveNoticeListJson) {
450
     	Map<String, Object> modelMap = new HashMap<String, Object>();
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
   </select>
620
   </select>
621
   <!-- 通过合同ID获取合同子表数据的已使用数量 -->
621
   <!-- 通过合同ID获取合同子表数据的已使用数量 -->
622
   <select id="selectContractUseCount" parameterType="java.util.Map" resultType="java.util.Map">
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
 	LEFT JOIN business_delivery_storage_notice b on b.id=a.zid
626
 	LEFT JOIN business_delivery_storage_notice b on b.id=a.zid
627
 	LEFT JOIN business_contract c ON c.id=b.contract_bid
627
 	LEFT JOIN business_contract c ON c.id=b.contract_bid
628
 	WHERE 1=1 AND a.type='notice' AND b.audit_state!=4 AND b.changing=0
628
 	WHERE 1=1 AND a.type='notice' AND b.audit_state!=4 AND b.changing=0
629
 	) detail
629
 	) detail
630
 	WHERE detail.contract_id=#{contract_id} 
630
 	WHERE detail.contract_id=#{contract_id} 
631
 	GROUP BY detail.contract_id,detail.house_id,detail.warehouse_id
631
 	GROUP BY detail.contract_id,detail.house_id,detail.warehouse_id
632
-	ORDER BY detail.id
633
   </select>
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
 		String pz = obj.getString("pz");
117
 		String pz = obj.getString("pz");
118
 		if (StringUtils.isNotBlank(pz)) {
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
 			if (StringUtils.isNotBlank(lypz)) {
130
 			if (StringUtils.isNotBlank(lypz)) {
124
 				dataobj.setLypz(Integer.parseInt(lypz));
131
 				dataobj.setLypz(Integer.parseInt(lypz));
125
 			} else {
132
 			} else {
@@ -131,7 +138,12 @@ public class BusinessContractReceiveServiceImpl implements BusinessContractRecei
131
 		String mxpz = obj.getString("mxpz");
138
 		String mxpz = obj.getString("mxpz");
132
 		if (StringUtils.isNotBlank(mxpz)) {
139
 		if (StringUtils.isNotBlank(mxpz)) {
133
 			if (null != dataobj.getLypz()) {
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
 				logger.info("根据"+mxpz+"获取到的明细品种数据是:"+enumid);
147
 				logger.info("根据"+mxpz+"获取到的明细品种数据是:"+enumid);
136
 				if (null != enumid) {
148
 				if (null != enumid) {
137
 					dataobj.setMxpz(enumid);
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
                             Integer wareHouseId = (Integer) wareDataMap.get("wareHouseId");
242
                             Integer wareHouseId = (Integer) wareDataMap.get("wareHouseId");
243
                             Integer orgId = (Integer) wareDataMap.get("orgId");
243
                             Integer orgId = (Integer) wareDataMap.get("orgId");
244
                             businessNoticeReceive.setHouseId(houseId); //仓房
244
                             businessNoticeReceive.setHouseId(houseId); //仓房
245
-                            businessNoticeReceive.setWareHouseId(wareHouseId); //货位
245
+                            if (!wareHouseId.toString().equals(houseId.toString())) {//只有粮仓才保存货位,油罐不保存货位
246
+                            	businessNoticeReceive.setWareHouseId(wareHouseId); //货位
247
+                            }
246
                             businessNoticeReceive.setOrgId(orgId);  //组织id
248
                             businessNoticeReceive.setOrgId(orgId);  //组织id
247
                             if(ObjectUtils.toString(jsonObject.getString("ywlx")).equals("6")){//入库竞价的业务类型
249
                             if(ObjectUtils.toString(jsonObject.getString("ywlx")).equals("6")){//入库竞价的业务类型
248
                                 if(jsonObject.getString("pz")!=null){
250
                                 if(jsonObject.getString("pz")!=null){