fanxw 1 år sedan
förälder
incheckning
c705ece700

+ 18 - 59
src/main/java/com/chinaitop/depot/business/controller/ReceiveNoticeController.java

@@ -164,66 +164,25 @@ public class ReceiveNoticeController {
164 164
     public int getNoticeNoAuditList(String xybh,String sptDataId,Integer flag) throws Exception {
165 165
         return receiveNoticeService.queryIsOrAudit(xybh,sptDataId,flag);
166 166
     }
167
-	
168
-	
169
-	@RequestMapping(value="/saveDataRk", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
170
-    @ApiOperation(value="增加性质转变单数据(入库)", notes = "增加性质转变单数据(入库)")
171
-	@ApiImplicitParams({
172
-        @ApiImplicitParam(name = "orgId", value = "组织id", paramType = "query"),
173
-        @ApiImplicitParam(name = "storehouseId", value = "仓房", paramType = "query"),
174
-        @ApiImplicitParam(name = "warehouseId", value = "货位", paramType = "query"),
175
-        @ApiImplicitParam(name = "rksl", value = "入库数量", paramType = "query"),
176
-        @ApiImplicitParam(name = "grainVarietyName", value = "品种名称", paramType = "query")
177
-    })
178
-    public void saveDataRk(String orgId,Integer storehouseId,Integer warehouseId,String grainVarietyName,
179
-    		BigDecimal rksl,String lsxzzbdh) {
180
-		
181
-		 logger.info("接收到的参数是:"+orgId+"--"+storehouseId+"**"+warehouseId+"**"+grainVarietyName+"**"+rksl+"//"+lsxzzbdh);
182
-		receiveNoticeService.saveDataRk( orgId, storehouseId, warehouseId, grainVarietyName,
183
-	    		 rksl, lsxzzbdh,null);
184
-    	
185
-    }
186
-	
187
-	
188
-	@RequestMapping(value="/saveDataRkByRest", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
189
-    @ApiOperation(value="增加性质转变单数据(入库)", notes = "增加性质转变单数据(入库)")
167
+
168
+	@RequestMapping(value="/scRkxzzbd", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
169
+    @ApiOperation(value="增加性质转变单数据(入库)", notes = "")
190 170
 	@ApiImplicitParams({
191
-        @ApiImplicitParam(name = "orgId", value = "组织id", paramType = "query"),
192
-        @ApiImplicitParam(name = "storehouseId", value = "仓房", paramType = "query"),
193
-        @ApiImplicitParam(name = "warehouseId", value = "货位", paramType = "query"),
194
-        @ApiImplicitParam(name = "rksl", value = "入库数量", paramType = "query"),
195
-        @ApiImplicitParam(name = "grainVarietyName", value = "品种名称", paramType = "query")
171
+        @ApiImplicitParam(name = "hwbm", value = "货位编码", paramType = "query")
196 172
     })
197
-	public void saveDataRkByRest(@RequestBody MultiValueMap<String,String> map) {
198
-		
199
-		logger.info("入库验收接收到的性质转变单:"+map);
200
-		List<String> orgIdList = map.get("orgId");
201
-		String orgId = (String) orgIdList.get(0);
202
-		
203
-		List<String> storehouseIdList = map.get("storehouseId");
204
-		Integer storehouseId = Integer.valueOf(storehouseIdList.get(0));
205
-		
206
-		List<String> warehouseIdList = map.get("warehouseId");
207
-		Integer warehouseId = Integer.valueOf(warehouseIdList.get(0));
208
-
209
-		
210
-		List<String> grainVarietyNameList = map.get("grainVarietyName");
211
-		String grainVarietyName = (String) grainVarietyNameList.get(0);
212
-		
213
-		List<String> rkslList = map.get("rksl");
214
-		BigDecimal rksl = new BigDecimal(rkslList.get(0));
215
-	
216
-		List<String> lsxzzbdhList =  map.get("lsxzzbdh");
217
-		String lsxzzbdh = lsxzzbdhList.get(0);
218
-		
219
-		List<String> xyhList =  map.get("xyh");
220
-		String xyh = xyhList.get(0);
221
-		
222
-		logger.info("接收到的参数是:orgId:"+orgId+"--"+"storehouseId:"+storehouseId+"**"+warehouseId+"**"+grainVarietyName+"**"+rksl+"//"+lsxzzbdh);
223
-		receiveNoticeService.saveDataRk( orgId, storehouseId, warehouseId, grainVarietyName,
224
-	    		 rksl, lsxzzbdh, xyh);
225
-    }
226
-	
227
-	
173
+	public Map<String, Object> scRkxzzbd(String hwbm) {
174
+		Map<String, Object> map = new HashMap<>();
175
+		try {
176
+			map = receiveNoticeService.scRkxzzbd(hwbm);
177
+			systemOutsideDataService.addlogger("rkxzzbd", hwbm, map.toString());
178
+		} catch (Exception e) {
179
+			logger.error("性质转变单生成异常");
180
+			logger.error(e.getMessage());
181
+			map.put("status", "error");
182
+			map.put("msg", "接口异常,请联系管理员!");
183
+			systemOutsideDataService.addlogger("rkxzzbd", hwbm, map.toString());
184
+		}
185
+		return map;
186
+	}
228 187
     
229 188
 }

+ 0 - 1
src/main/java/com/chinaitop/depot/business/mapper/BusinessNoticeReceiveMapper.xml

@@ -287,7 +287,6 @@
287 287
       <if test="htbh != null">
288 288
         htbh,
289 289
       </if>
290
-      
291 290
     </trim>
292 291
     <trim prefix="values (" suffix=")" suffixOverrides="," >
293 292
       <if test="id != null" >

+ 1 - 0
src/main/java/com/chinaitop/depot/business/model/BusinessNoticeReceive.java

@@ -822,4 +822,5 @@ public class BusinessNoticeReceive {
822 822
 	public void setHtbh(String htbh) {
823 823
 		this.htbh = htbh;
824 824
 	}
825
+
825 826
 }

+ 2 - 3
src/main/java/com/chinaitop/depot/business/model/BusinessNoticeReceiveExample.java

@@ -230,13 +230,12 @@ public class BusinessNoticeReceiveExample {
230 230
             addCriterion("is_notice =", value, "isNotice");
231 231
             return (Criteria) this;
232 232
         }
233
-        
233
+
234 234
         public Criteria andIsSheetEqualTo(Integer value) {
235 235
             addCriterion("is_sheet =", value, "isSheet");
236 236
             return (Criteria) this;
237 237
         }
238
-        
239
-        
238
+
240 239
         public Criteria andIdIsNull() {
241 240
             addCriterion("id is null");
242 241
             return (Criteria) this;

+ 7 - 5
src/main/java/com/chinaitop/depot/business/service/ReceiveNoticeService.java

@@ -26,11 +26,6 @@ public interface ReceiveNoticeService {
26 26
 
27 27
 	int queryIsOrAudit(String xybh, String sptDataId,Integer flag);
28 28
 
29
-	//void saveDataRk(Map<String, Object> paramMap);
30
-
31
-	void saveDataRk(String orgId, Integer storehouseId, Integer warehouseId, String grainVarietyName, BigDecimal rksl,
32
-			String lsxzzbdh,String xyh);
33
-
34 29
 	/**
35 30
 	 * 修改下发的通知单数据
36 31
 	 * @param notice
@@ -43,5 +38,12 @@ public interface ReceiveNoticeService {
43 38
 	 * @param notice
44 39
 	 */
45 40
 	void pushHtStatus(String notice) throws Exception;
41
+
42
+	/**
43
+	 * 生成入库性质转变单
44
+	 * @param datas
45
+	 * @return
46
+	 */
47
+	Map<String, Object> scRkxzzbd(String datas);
46 48
 			
47 49
 }

+ 144 - 58
src/main/java/com/chinaitop/depot/business/service/impl/ReceiveNoticeServiceImpl.java

@@ -31,9 +31,11 @@ import com.chinaitop.depot.business.service.FeignAgileService;
31 31
 import com.chinaitop.depot.business.service.FeignBasicService;
32 32
 import com.chinaitop.depot.business.service.ReceiveNoticeService;
33 33
 import com.chinaitop.depot.business.service.SystemOutsideDataService;
34
+import com.chinaitop.depot.feignService.DepotSystemFeignService;
34 35
 import com.chinaitop.depot.system.service.SysCodeService;
35 36
 import com.chinaitop.depot.utils.HTTPUtils;
36 37
 import com.chinaitop.depot.utils.ParameterUtil;
38
+import com.chinaitop.depot.utils.createKC;
37 39
 import com.fasterxml.jackson.databind.ObjectMapper;
38 40
 import com.github.pagehelper.PageHelper;
39 41
 
@@ -47,6 +49,8 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
47 49
 	@Resource
48 50
 	private FeignAgileService feignAgileService;
49 51
 	@Resource
52
+	private DepotSystemFeignService depotSystemFeignService;
53
+	@Resource
50 54
     private BusinessApprovalService businessApprovalService;
51 55
 	@Resource
52 56
 	private BusinessContractReceiveService businessContractReceiveService;
@@ -56,9 +60,6 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
56 60
 	private SystemOutsideDataService systemOutsideDataService;
57 61
 
58 62
 	public static final Logger logger = LoggerFactory.getLogger(ReceiveNoticeServiceImpl.class);
59
-    /*@Resource
60
-    private BusinessApprovalMapper approvalMapper;*/
61
-
62 63
 	
63 64
 	// 获取ip地址
64 65
     @Value("${crk-webservice}")
@@ -141,6 +142,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
141 142
         if(businessNoticeReceive.getIsSheet()!=null){
142 143
         	createCriteria.andIsSheetEqualTo(businessNoticeReceive.getIsSheet());
143 144
         }
145
+
144 146
         if(pageNum!=null && pageSize!=null){
145 147
         	PageHelper.startPage(pageNum, pageSize);
146 148
         }
@@ -323,7 +325,13 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
323 325
                     					businessNoticeReceive.setGrainAnnual(Integer.parseInt(scnf));//收获年度
324 326
                     				}
325 327
                                 }
326
-                            } else {
328
+                                //入库兜底类型的不需要审批性质转变单
329
+                                if (ObjectUtils.toString(jsonObject.getString("ywlx")).equals("3")) {
330
+                                	businessNoticeReceive.setIsSheet(1);
331
+                                } else {
332
+                                	businessNoticeReceive.setIsSheet(0);
333
+                                }
334
+                            } else {//出库类型
327 335
                                 //根据仓房、货位、orgId获取粮食品种等信息
328 336
                                 Map<String, Object> map = feignAgileService.getDateByChHwh(orgId, houseId, wareHouseId);
329 337
                                 logger.info("根据orgId="+orgId+",houseId="+houseId+",warehouseId="+wareHouseId+"  获取到的库存数据如下:");
@@ -364,7 +372,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
364 372
                                 businessNoticeReceive.setLsxzzbdh(jsonObject.getString("tzdid"));//粮食性质转变单单号
365 373
                                 //SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd :hh:mm:ss");
366 374
                                 businessNoticeReceive.setHzrq(new Date());//划转时间
367
-
375
+                                businessNoticeReceive.setIsSheet(0);//是性质转变单
368 376
                             }
369 377
                             String  lsyqsl = jsonObject.getString("lsyqsl");
370 378
                             businessNoticeReceive.setCount(lsyqsl); //计划数量(吨)
@@ -374,7 +382,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
374 382
                             businessNoticeReceive.setIsNotice(0);//0是可以引用的通知单
375 383
                             businessNoticeReceive.setAuditState(0);//下达未审批
376 384
                             businessNoticeReceive.setReceiveTime(new Date());//接收数据的时间
377
-                            businessNoticeReceive.setIsSheet(0);//是性质转变单
385
+                            //businessNoticeReceive.setSfzswtzd("0"); //接收通知单菜单不展示该数据
378 386
                             businessNoticeReceiveMapper.insert(businessNoticeReceive);
379 387
                            
380 388
                         }
@@ -441,7 +449,7 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
441 449
         	createCriteria.andWareHouseIdEqualTo(businessNoticeReceive.getWareHouseId());
442 450
         }
443 451
         
444
-      //货位
452
+        //货位
445 453
         if(businessNoticeReceive.getOrgId()!=null){
446 454
         	createCriteria.andOrgIdEqualTo(businessNoticeReceive.getOrgId());
447 455
         }
@@ -521,11 +529,40 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
521 529
         }
522 530
        //增加审批表数据
523 531
     	businessApprovalService.add(businessApproval);
524
-        
525
-		
526
-	}
527 532
 
533
+    	//必须是入库,并且不是通知单,只是性质转变单
534
+    	if ("1".equals(receiveNotice.getIsNotice()) && "1".equals(receiveNotice.getIsSheet()) && "1".equals(receiveNotice.getCrktype())) {
535
+    		restLsxz(receiveNotice.getId());
536
+    	}
537
+	}
528 538
 
539
+	public void restLsxz(Integer id) {
540
+		/* 先调用出入库接口生成转储的业务的台账信息,生成失败不可保存转储数据***start */
541
+		BusinessNoticeReceive receiveNotice = businessNoticeReceiveMapper.selectByPrimaryKey(id);
542
+		Object[] parameters = new Object[9];
543
+		parameters[0] = receiveNotice.getOrgId() + "";
544
+		parameters[1] = receiveNotice.getGrainKind() + "";
545
+		//parameters[2] = null;
546
+		parameters[3] = receiveNotice.getHouseId() + "";
547
+		if (StringUtils.isNotBlank(receiveNotice.getWareHouseId()+"")) {//粮仓
548
+			parameters[4] = receiveNotice.getWareHouseId() + "";
549
+		} else {
550
+			parameters[4] = receiveNotice.getHouseId() + "";//油罐
551
+		}
552
+		parameters[5] = receiveNotice.getHzqlsxzdm() + "";
553
+		parameters[6] = receiveNotice.getGrainAttribute() + "";
554
+		parameters[7] = Integer.parseInt(receiveNotice.getLssl())*1000 + "";
555
+		parameters[8] = 1 + ""; //1:新增;2:修改;3:删除
556
+		
557
+		String crkurl = depotSystemFeignService.getUrl(receiveNotice.getOrgId().toString(), "2");
558
+	    if (StringUtils.isNotBlank(crkurl)) {
559
+	    	String url_id = crkurl.substring(0, crkurl.lastIndexOf("Base")-1);
560
+	    	StringBuffer sbf = new StringBuffer();
561
+	    	sbf.append(url_id).append(url);
562
+	    	String str = createKC.createKC("ChangeGrainAttribute", sbf.toString(), parameters);
563
+	    	systemOutsideDataService.addlogger("rkxzzb", JSON.toJSONString(parameters), str);
564
+	    }
565
+	}
529 566
 
530 567
 	@Override
531 568
 	public int queryIsOrAudit(String xybh, String sptDataId,Integer flag) {
@@ -555,54 +592,6 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
555 592
 		
556 593
 	}
557 594
 
558
-
559
-
560
-	@Override
561
-	public void saveDataRk(String orgId, Integer storehouseId, Integer warehouseId, String grainVarietyName, BigDecimal rksl,
562
-			String lsxzzbdh,String xyh) {
563
-		// TODO Auto-generated method stub
564
-        
565
-		BusinessNoticeReceive businessNoticeReceive = new BusinessNoticeReceive();
566
-        //String orgId = (String) paramMap.get("orgId");
567
-        //Integer storehouseId =  (Integer) paramMap.get("storehouseId");
568
-        // warehouseId =  (Integer) paramMap.get("warehouseId");
569
-        //String pzmc = (String) paramMap.get("pzmc");
570
-       // String hzsl = (String) paramMap.get("hzsl");
571
-        //String lsxzzbdh = (String) paramMap.get("lsxzzbdh");
572
-		System.out.println("orgId:----------------------------"+orgId+"storehouseId:-"+storehouseId+"warehouseId"+"////"+warehouseId);
573
-		Map<String, Object> map = feignAgileService.getDateByChHwh(Integer.valueOf(orgId), storehouseId, warehouseId);
574
-		System.out.println("map:----------------------------"+map);
575
-		Integer grainKind = (Integer) map.get("pz"); //品种
576
-        Double kcsl = (Double) map.get("kcsl");//千克
577
-        Integer grainAttribute = (Integer) map.get("hwxz"); //粮油性质
578
-        businessNoticeReceive.setAuditState(0);//下发未审批
579
-        businessNoticeReceive.setIsNotice(1);//0是1否  是否是可以引用的通知单
580
-        businessNoticeReceive.setOrgId(Integer.valueOf(orgId));
581
-        businessNoticeReceive.setHouseId(storehouseId);
582
-        businessNoticeReceive.setWareHouseId(warehouseId);
583
-        businessNoticeReceive.setCount(rksl+"");
584
-        businessNoticeReceive.setPzmc(grainVarietyName);
585
-        businessNoticeReceive.setGrainKind(grainKind);
586
-        businessNoticeReceive.setGrainAttribute(3052); //入库 转前 3052商品粮
587
-        businessNoticeReceive.setHzqlsxzdm(grainAttribute);//入库 转后 
588
-        businessNoticeReceive.setContractNumber(xyh);
589
-        businessNoticeReceive.setLsxzzbdh(lsxzzbdh);
590
-        businessNoticeReceive.setNoticeNumber(lsxzzbdh);
591
-        businessNoticeReceive.setCrktype("1"); //1入 3出
592
-        BigDecimal s = new BigDecimal(1000);
593
-        System.out.println(kcsl+"kcsl");
594
-        BigDecimal kcslBig = new BigDecimal(String.valueOf(kcsl));
595
-        System.out.println(kcslBig+"kcslBig");
596
-
597
-        BigDecimal kcslKg = kcslBig.divide(s);
598
-        businessNoticeReceive.setLssl(kcslKg.toString());//库存数量
599
-        businessNoticeReceive.setHzrq(new Date());
600
-        businessNoticeReceive.setReceiveTime(new Date());
601
-        businessNoticeReceive.setIsSheet(0);
602
-        businessNoticeReceiveMapper.insertSelective(businessNoticeReceive);
603
-        
604
-	}
605
-
606 595
 	@Override
607 596
 	public Map<String, Object> updateReceiveNotice(String notice) throws Exception {
608 597
 		Map<String, Object> map = new HashMap<>();
@@ -648,4 +637,101 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
648 637
 		return businessNoticeReceive;
649 638
 	}
650 639
 
640
+
641
+
642
+	@Override
643
+	public Map<String, Object> scRkxzzbd(String datas) {
644
+		Map<String, Object> result_map = new HashMap<>();
645
+		
646
+		if (datas != null) {
647
+            // JSON字符串转对象
648
+            JSONObject jsonObject = JSONObject.parseObject(datas);
649
+
650
+            BusinessNoticeReceive businessNoticeReceive = new BusinessNoticeReceive();
651
+
652
+            businessNoticeReceive.setCrktype("1"); //默认值:入库
653
+        	businessNoticeReceive.setYwtype("1");//默认值:竞价入库
654
+
655
+        	String hwbm = jsonObject.getString("hwbm");//货位国标编码
656
+            if (hwbm != null) {
657
+            	//查询仓房ID、货位ID、orgId
658
+                Map<String, Object> basicMap = feignBasicService.getWareOrTankObj(hwbm);
659
+                logger.info("根据值"+hwbm+"获取到的货位数据如下:");
660
+                logger.info(basicMap+"");
661
+                if ("0".equals(basicMap.get("houseId").toString()) 
662
+                		|| "0".equals(basicMap.get("warehouseId").toString()) 
663
+                		|| "0".equals(basicMap.get("orgId").toString())) {
664
+
665
+                	result_map.put("msg", "根据值"+hwbm+"未获取到对应仓房货位信息,请核对数据");
666
+                	result_map.put("status", "error");
667
+                    return result_map;
668
+                } else {
669
+                	Integer houseId = (Integer) basicMap.get("houseId");
670
+                    Integer wareHouseId = (Integer) basicMap.get("warehouseId");
671
+                    Integer orgId = (Integer) basicMap.get("orgId");
672
+                    businessNoticeReceive.setHouseId(houseId); //仓房
673
+                    if (!wareHouseId.toString().equals(houseId.toString())) {//只有粮仓才保存货位,油罐不保存货位
674
+                    	businessNoticeReceive.setWareHouseId(wareHouseId); //货位
675
+                    }
676
+                    businessNoticeReceive.setOrgId(orgId);  //组织id
677
+                }
678
+            } else {
679
+            	result_map.put("msg", "hwbm不能为空");
680
+            	result_map.put("status", "error");
681
+                return result_map;
682
+            }
683
+            
684
+            Map<String, Object> kcmap = feignAgileService.getDateByChHwh(businessNoticeReceive.getOrgId(), businessNoticeReceive.getHouseId(), businessNoticeReceive.getWareHouseId());
685
+            logger.info("根据orgId="+businessNoticeReceive.getOrgId()+",houseId="+businessNoticeReceive.getHouseId()+",warehouseId="+businessNoticeReceive.getWareHouseId()+"  获取到的库存数据如下:");
686
+			logger.info(kcmap+"");
687
+			if (null != kcmap) {
688
+				String inputTime = kcmap.get("rq")+""; //入库时间
689
+	            Double kcsl = (Double) kcmap.get("kcsl");//千克
690
+	            Date date = null;
691
+	            if(inputTime!=null){
692
+	                date = ParameterUtil.string2datetime(inputTime);
693
+	                businessNoticeReceive.setInputTime(date);//入库时间
694
+	            }
695
+	            businessNoticeReceive.setProductiveYear(Integer.parseInt(kcmap.get("scnf")+""));//生产年份
696
+	            businessNoticeReceive.setGrainAnnual(Integer.parseInt(kcmap.get("scnf")+""));//收获年度
697
+                businessNoticeReceive.setGrainKind((Integer) kcmap.get("pz")); //品种
698
+	            businessNoticeReceive.setGrainDetailKind((Integer) kcmap.get("mxpz")); //明细品种
699
+	            businessNoticeReceive.setGrainGrade((Integer) kcmap.get("dj")); //等级
700
+	            businessNoticeReceive.setGrainAttribute((Integer) kcmap.get("hwxz")); //粮油性质
701
+	            businessNoticeReceive.setGrainProducingArea((Integer) kcmap.get("gb"));//产地
702
+	            
703
+	            /**
704
+	             * 库存数量转化为吨
705
+	             */
706
+	            BigDecimal s = new BigDecimal(1000);
707
+	            BigDecimal kcslBig = new BigDecimal(kcsl);
708
+	            BigDecimal kcslKg = kcslBig.divide(s);
709
+	            businessNoticeReceive.setLssl(kcslKg.toString());//库存数量
710
+	            
711
+	            businessNoticeReceive.setHzqlsxzdm(3052);//商品粮 转后,划转后粮食性质
712
+	            StringBuffer sbf = new StringBuffer(50);
713
+	            Date thisdate = new Date();
714
+	            sbf.append("RKXZZBD").append(String.format("%03d", businessNoticeReceive.getOrgId())).append(ParameterUtil.getDateYMDHMS(thisdate));
715
+	            businessNoticeReceive.setLsxzzbdh(sbf.toString());//粮食性质转变单单号
716
+	            businessNoticeReceive.setHzrq(thisdate);//划转时间
717
+	            businessNoticeReceive.setCount(businessNoticeReceive.getLssl()); //计划数量(吨)
718
+	            businessNoticeReceive.setInApplication(1); //启用
719
+	            businessNoticeReceive.setAuditState(0);//下达未审批
720
+	            businessNoticeReceive.setReceiveTime(thisdate);//接收数据的时间
721
+	            businessNoticeReceive.setIsNotice(1);//0是可以引用的通知单,1不是
722
+	            businessNoticeReceive.setIsSheet(0);//0代表是性质转变单
723
+	            businessNoticeReceiveMapper.insert(businessNoticeReceive);
724
+			} else {
725
+				result_map.put("msg", "根据所传信息没有查到对应库存信息");
726
+            	result_map.put("status", "error");
727
+                return result_map;
728
+			}
729
+        } else {
730
+        	result_map.put("msg", "所传数据不能为空");
731
+        	result_map.put("status", "error");
732
+        }
733
+		
734
+		return result_map;
735
+	}
736
+
651 737
 }

+ 23 - 0
src/main/java/com/chinaitop/depot/feignService/DepotSystemFeignService.java

@@ -0,0 +1,23 @@
1
+package com.chinaitop.depot.feignService;
2
+
3
+import org.springframework.cloud.openfeign.FeignClient;
4
+import org.springframework.http.MediaType;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RequestMethod;
7
+import org.springframework.web.bind.annotation.RequestParam;
8
+
9
+@FeignClient(value = "DEPOT-SYSTEM")
10
+public interface DepotSystemFeignService {
11
+
12
+	/**
13
+	 * 查询一条配置的应急端系统URL
14
+	 * @param orgId 组织机构ID
15
+	 * @param userType 类型(1:库级,2:出入库)
16
+	 * @return 
17
+	 */
18
+	@RequestMapping(value = "/urlConfig/getUrl", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
19
+	String getUrl(
20
+			@RequestParam("orgId") String orgId, 
21
+			@RequestParam("userType") String userType
22
+			);
23
+}