fanxw 9 months ago
parent
commit
3f3e2b91a1

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

@@ -1,6 +1,5 @@
1
 package com.chinaitop.depot.business.controller;
1
 package com.chinaitop.depot.business.controller;
2
 
2
 
3
-import java.math.BigDecimal;
4
 import java.util.HashMap;
3
 import java.util.HashMap;
5
 import java.util.List;
4
 import java.util.List;
6
 import java.util.Map;
5
 import java.util.Map;
@@ -10,8 +9,6 @@ import javax.annotation.Resource;
10
 import org.slf4j.Logger;
9
 import org.slf4j.Logger;
11
 import org.slf4j.LoggerFactory;
10
 import org.slf4j.LoggerFactory;
12
 import org.springframework.http.MediaType;
11
 import org.springframework.http.MediaType;
13
-import org.springframework.util.MultiValueMap;
14
-import org.springframework.web.bind.annotation.RequestBody;
15
 import org.springframework.web.bind.annotation.RequestMapping;
12
 import org.springframework.web.bind.annotation.RequestMapping;
16
 import org.springframework.web.bind.annotation.RequestMethod;
13
 import org.springframework.web.bind.annotation.RequestMethod;
17
 import org.springframework.web.bind.annotation.RestController;
14
 import org.springframework.web.bind.annotation.RestController;
@@ -168,19 +165,19 @@ public class ReceiveNoticeController {
168
 	@RequestMapping(value="/scRkxzzbd", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
165
 	@RequestMapping(value="/scRkxzzbd", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.GET)
169
     @ApiOperation(value="增加性质转变单数据(入库)", notes = "")
166
     @ApiOperation(value="增加性质转变单数据(入库)", notes = "")
170
 	@ApiImplicitParams({
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
 		Map<String, Object> map = new HashMap<>();
171
 		Map<String, Object> map = new HashMap<>();
175
 		try {
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
 		} catch (Exception e) {
175
 		} catch (Exception e) {
179
 			logger.error("性质转变单生成异常");
176
 			logger.error("性质转变单生成异常");
180
 			logger.error(e.getMessage());
177
 			logger.error(e.getMessage());
181
 			map.put("status", "error");
178
 			map.put("status", "error");
182
 			map.put("msg", "接口异常,请联系管理员!");
179
 			map.put("msg", "接口异常,请联系管理员!");
183
-			systemOutsideDataService.addlogger("rkxzzbd", hwbm, map.toString());
180
+			systemOutsideDataService.addlogger("rkxzzbd", sptId, map.toString());
184
 		}
181
 		}
185
 		return map;
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
 	@Override
643
 	@Override
643
-	public Map<String, Object> scRkxzzbd(String datas) {
644
+	public Map<String, Object> scRkxzzbd(String sptId) {
644
 		Map<String, Object> result_map = new HashMap<>();
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
             BusinessNoticeReceive businessNoticeReceive = new BusinessNoticeReceive();
649
             BusinessNoticeReceive businessNoticeReceive = new BusinessNoticeReceive();
651
 
650
 
652
             businessNoticeReceive.setCrktype("1"); //默认值:入库
651
             businessNoticeReceive.setCrktype("1"); //默认值:入库
653
         	businessNoticeReceive.setYwtype("1");//默认值:竞价入库
652
         	businessNoticeReceive.setYwtype("1");//默认值:竞价入库
654
 
653
 
655
-        	String hwbm = jsonObject.getString("hwbm");//货位国标编码
656
-            if (hwbm != null) {
654
+            if (sptId != null) {
657
             	//查询仓房ID、货位ID、orgId
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
                 logger.info(basicMap+"");
658
                 logger.info(basicMap+"");
661
                 if ("0".equals(basicMap.get("houseId").toString()) 
659
                 if ("0".equals(basicMap.get("houseId").toString()) 
662
                 		|| "0".equals(basicMap.get("warehouseId").toString()) 
660
                 		|| "0".equals(basicMap.get("warehouseId").toString()) 
663
                 		|| "0".equals(basicMap.get("orgId").toString())) {
661
                 		|| "0".equals(basicMap.get("orgId").toString())) {
664
 
662
 
665
-                	result_map.put("msg", "根据值"+hwbm+"未获取到对应仓房货位信息,请核对数据");
663
+                	result_map.put("msg", "根据值"+sptId+"未获取到对应仓房货位信息,请核对数据");
666
                 	result_map.put("status", "error");
664
                 	result_map.put("status", "error");
667
                     return result_map;
665
                     return result_map;
668
                 } else {
666
                 } else {