|
|
@@ -7,6 +7,8 @@ import javax.annotation.Resource;
|
|
7
|
7
|
import javax.servlet.http.HttpServletRequest;
|
|
8
|
8
|
|
|
9
|
9
|
import org.apache.commons.lang.ObjectUtils;
|
|
|
10
|
+import org.slf4j.Logger;
|
|
|
11
|
+import org.slf4j.LoggerFactory;
|
|
10
|
12
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
11
|
13
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
12
|
14
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -37,7 +39,9 @@ import io.swagger.annotations.ApiOperation;
|
|
37
|
39
|
@RestController
|
|
38
|
40
|
@RequestMapping(value="/Warehouse")
|
|
39
|
41
|
@Api(value= "BasicWarehouseController", description = "货位管理控制类")
|
|
40
|
|
-public class BasicWarehouseController {
|
|
|
42
|
+public class BasicWarehouseController {
|
|
|
43
|
+
|
|
|
44
|
+ final static Logger logger = LoggerFactory.getLogger(BasicWarehouse.class);
|
|
41
|
45
|
|
|
42
|
46
|
@Resource
|
|
43
|
47
|
private BasicWarehouseService basicWarehouseService;
|
|
|
@@ -323,6 +327,8 @@ public class BasicWarehouseController {
|
|
323
|
327
|
})
|
|
324
|
328
|
public void updateWarehouseCrkStatus(Integer wareId, String crk_status) {
|
|
325
|
329
|
|
|
|
330
|
+ String date = ParameterUtil.getSysDateTime();
|
|
|
331
|
+ logger.info("时间:"+date+",封仓时更新出入库状态回写接口,封仓调用,接收参数是,货位ID:"+wareId+",状态值:"+crk_status);
|
|
326
|
332
|
try {
|
|
327
|
333
|
if (null != wareId && null != crk_status && !"".equals(crk_status)) {
|
|
328
|
334
|
BasicWarehouse warehouse = new BasicWarehouse();
|
|
|
@@ -331,11 +337,31 @@ public class BasicWarehouseController {
|
|
331
|
337
|
|
|
332
|
338
|
//修改数据
|
|
333
|
339
|
basicWarehouseService.update(warehouse);
|
|
|
340
|
+ logger.info("时间:"+date+",封仓时更新出入库状态回写接口,封仓调用,调用回写成功!");
|
|
334
|
341
|
} else {
|
|
335
|
|
- System.out.println("更新出入库状态值crk_status出错,参数:货位ID="+wareId+",出入库状态值="+crk_status);
|
|
|
342
|
+ logger.info("时间:"+date+",封仓时更新出入库状态值crk_status出错,参数:货位ID="+wareId+",出入库状态值="+crk_status);
|
|
336
|
343
|
}
|
|
337
|
344
|
} catch (NumberFormatException e) {
|
|
|
345
|
+ logger.info("时间:"+date+",封仓时更新出入库状态回写接口,封仓调用,调用失败,报错如下!");
|
|
|
346
|
+ e.printStackTrace();
|
|
|
347
|
+ }
|
|
|
348
|
+ }
|
|
|
349
|
+
|
|
|
350
|
+ @SuppressWarnings("all")
|
|
|
351
|
+ @RequestMapping(value="/getCountWhs", method=RequestMethod.GET)
|
|
|
352
|
+ @ApiOperation(value="查询货位数", notes = "查询货位数")
|
|
|
353
|
+ @ApiImplicitParams({
|
|
|
354
|
+ @ApiImplicitParam(name = "orgId", value = "单位ID", paramType = "query")
|
|
|
355
|
+ })
|
|
|
356
|
+ public Integer getCountWhs(Integer orgId) {
|
|
|
357
|
+ Integer hws = 0;
|
|
|
358
|
+ try {
|
|
|
359
|
+ hws = basicWarehouseService.getCountWhs(orgId);
|
|
|
360
|
+ } catch (Exception e) {
|
|
|
361
|
+ hws = 0;
|
|
338
|
362
|
e.printStackTrace();
|
|
|
363
|
+ } finally {
|
|
|
364
|
+ return hws;
|
|
339
|
365
|
}
|
|
340
|
366
|
}
|
|
341
|
367
|
}
|