fanxw 9 月之前
父節點
當前提交
3f3e2b91a1

+ 5 - 8
src/main/java/com/chinaitop/depot/business/controller/ReceiveNoticeController.java

@@ -1,6 +1,5 @@
1 1
 package com.chinaitop.depot.business.controller;
2 2
 
3
-import java.math.BigDecimal;
4 3
 import java.util.HashMap;
5 4
 import java.util.List;
6 5
 import java.util.Map;
@@ -10,8 +9,6 @@ import javax.annotation.Resource;
10 9
 import org.slf4j.Logger;
11 10
 import org.slf4j.LoggerFactory;
12 11
 import org.springframework.http.MediaType;
13
-import org.springframework.util.MultiValueMap;
14
-import org.springframework.web.bind.annotation.RequestBody;
15 12
 import org.springframework.web.bind.annotation.RequestMapping;
16 13
 import org.springframework.web.bind.annotation.RequestMethod;
17 14
 import org.springframework.web.bind.annotation.RestController;
@@ -168,19 +165,19 @@ public class ReceiveNoticeController {
168 165
 	@RequestMapping(value="/scRkxzzbd", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
169 166
     @ApiOperation(value="增加性质转变单数据(入库)", notes = "")
170 167
 	@ApiImplicitParams({
171
-        @ApiImplicitParam(name = "hwbm", value = "货位编码", paramType = "query")
168
+        @ApiImplicitParam(name = "sptId", value = "市库对接的货位ID", paramType = "query")
172 169
     })
173
-	public Map<String, Object> scRkxzzbd(String hwbm) {
170
+	public Map<String, Object> scRkxzzbd(String sptId) {
174 171
 		Map<String, Object> map = new HashMap<>();
175 172
 		try {
176
-			map = receiveNoticeService.scRkxzzbd(hwbm);
177
-			systemOutsideDataService.addlogger("rkxzzbd", hwbm, map.toString());
173
+			map = receiveNoticeService.scRkxzzbd(sptId);
174
+			systemOutsideDataService.addlogger("rkxzzbd", sptId, map.toString());
178 175
 		} catch (Exception e) {
179 176
 			logger.error("性质转变单生成异常");
180 177
 			logger.error(e.getMessage());
181 178
 			map.put("status", "error");
182 179
 			map.put("msg", "接口异常,请联系管理员!");
183
-			systemOutsideDataService.addlogger("rkxzzbd", hwbm, map.toString());
180
+			systemOutsideDataService.addlogger("rkxzzbd", sptId, map.toString());
184 181
 		}
185 182
 		return map;
186 183
 	}

+ 7 - 9
src/main/java/com/chinaitop/depot/business/service/impl/ReceiveNoticeServiceImpl.java

@@ -639,30 +639,28 @@ public class ReceiveNoticeServiceImpl implements ReceiveNoticeService {
639 639
 
640 640
 
641 641
 
642
+	@SuppressWarnings("unused")
642 643
 	@Override
643
-	public Map<String, Object> scRkxzzbd(String datas) {
644
+	public Map<String, Object> scRkxzzbd(String sptId) {
644 645
 		Map<String, Object> result_map = new HashMap<>();
645 646
 		
646
-		if (datas != null) {
647
-            // JSON字符串转对象
648
-            JSONObject jsonObject = JSONObject.parseObject(datas);
647
+		if (sptId != null) {
649 648
 
650 649
             BusinessNoticeReceive businessNoticeReceive = new BusinessNoticeReceive();
651 650
 
652 651
             businessNoticeReceive.setCrktype("1"); //默认值:入库
653 652
         	businessNoticeReceive.setYwtype("1");//默认值:竞价入库
654 653
 
655
-        	String hwbm = jsonObject.getString("hwbm");//货位国标编码
656
-            if (hwbm != null) {
654
+            if (sptId != null) {
657 655
             	//查询仓房ID、货位ID、orgId
658
-                Map<String, Object> basicMap = feignBasicService.getWareOrTankObj(hwbm);
659
-                logger.info("根据值"+hwbm+"获取到的货位数据如下:");
656
+                Map<String, Object> basicMap = feignBasicService.getWareOrTankObj(sptId);
657
+                logger.info("根据值"+sptId+"获取到的货位数据如下:");
660 658
                 logger.info(basicMap+"");
661 659
                 if ("0".equals(basicMap.get("houseId").toString()) 
662 660
                 		|| "0".equals(basicMap.get("warehouseId").toString()) 
663 661
                 		|| "0".equals(basicMap.get("orgId").toString())) {
664 662
 
665
-                	result_map.put("msg", "根据值"+hwbm+"未获取到对应仓房货位信息,请核对数据");
663
+                	result_map.put("msg", "根据值"+sptId+"未获取到对应仓房货位信息,请核对数据");
666 664
                 	result_map.put("status", "error");
667 665
                     return result_map;
668 666
                 } else {