|
@@ -2,6 +2,7 @@ package com.steerinfo.dil.controller;
|
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.steerinfo.dil.feign.ColumnDataFeign;
|
|
import com.steerinfo.dil.feign.ColumnDataFeign;
|
|
|
|
+import com.steerinfo.dil.feign.OmsFeign;
|
|
import com.steerinfo.dil.mapper.WmspInboundResultMapper;
|
|
import com.steerinfo.dil.mapper.WmspInboundResultMapper;
|
|
import com.steerinfo.dil.model.*;
|
|
import com.steerinfo.dil.model.*;
|
|
import com.steerinfo.dil.service.impl.RmsMaterialServiceImpl;
|
|
import com.steerinfo.dil.service.impl.RmsMaterialServiceImpl;
|
|
@@ -10,12 +11,14 @@ import com.steerinfo.dil.service.impl.WmsInboundResultServiceImpl;
|
|
import com.steerinfo.dil.service.impl.WmsInboundScanResultServiceImpl;
|
|
import com.steerinfo.dil.service.impl.WmsInboundScanResultServiceImpl;
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
import com.steerinfo.dil.util.ColumnDataUtil;
|
|
import com.steerinfo.dil.util.ColumnDataUtil;
|
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
import com.steerinfo.dil.util.PageListAdd;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.core.annotation.Order;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -55,6 +58,9 @@ public class WmsInboundScanResultController extends BaseRESTfulController {
|
|
@Autowired
|
|
@Autowired
|
|
ColumnDataFeign columnDataFeign;
|
|
ColumnDataFeign columnDataFeign;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ OmsFeign omsFeign;
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 1.新增扫描吊牌实绩!!!此时入库实绩未生成
|
|
* 1.新增扫描吊牌实绩!!!此时入库实绩未生成
|
|
@@ -64,11 +70,34 @@ public class WmsInboundScanResultController extends BaseRESTfulController {
|
|
@ApiOperation(value = "新增扫描吊牌实绩")
|
|
@ApiOperation(value = "新增扫描吊牌实绩")
|
|
@PostMapping("/insertResult")
|
|
@PostMapping("/insertResult")
|
|
@Transactional
|
|
@Transactional
|
|
- public synchronized RESTfulResult insertResult(@RequestBody(required = false)Map<String,Object>map) throws ParseException {
|
|
|
|
|
|
+ public synchronized RESTfulResult insertResult(@RequestBody(required = false)Map<String,Object>map) throws Exception {
|
|
//这里需要的参数包括 扫码人账号 userId、二维码信息 resultMaterial
|
|
//这里需要的参数包括 扫码人账号 userId、二维码信息 resultMaterial
|
|
//首先判断二维码是否已经被扫过了
|
|
//首先判断二维码是否已经被扫过了
|
|
//判断条件是查询扫描实绩判断是否已经存在改唯一标识码并且扫码人是否是自己
|
|
//判断条件是查询扫描实绩判断是否已经存在改唯一标识码并且扫码人是否是自己
|
|
System.out.println(map.get("resultMaterial"));
|
|
System.out.println(map.get("resultMaterial"));
|
|
|
|
+ //订单类型为倒库,直接扫码所有并返回数据
|
|
|
|
+ Map<String,Object> order=wmsInboundScanResultService.getOrderTypeByNum((String)map.get("resultMaterial"));
|
|
|
|
+ Integer orderType=DataChange.dataToBigDecimal(order.get("orderType")).intValue();
|
|
|
|
+ BigDecimal orderId=DataChange.dataToBigDecimal(order.get("orderId"));
|
|
|
|
+ if(orderType!=null && orderType == 25){
|
|
|
|
+ //根据运输订单号查询出库扫码实绩
|
|
|
|
+ List<Map<String,Object>> inboundOld= wmsInboundScanResultService.findInboundScanResult((String)map.get("resultMaterial"));
|
|
|
|
+ //批量新增扫码实绩
|
|
|
|
+ if(inboundOld!=null || inboundOld.size()>0 || inboundOld.get(0)!=null){
|
|
|
|
+ wmsInboundScanResultService.createInboundScanResultByFind(inboundOld,map);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ System.out.println("物资暂未出库,请先出库再入库!");
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ //返回新建的扫码实绩数据
|
|
|
|
+ List<Map<String,Object>> mapList= wmsInboundScanResultService.noIssueScanResultList(map.get("userName").toString());
|
|
|
|
+ //关闭运输订单
|
|
|
|
+ omsFeign.closeSteelOrderType4(DataChange.dataToBigDecimal(orderId));
|
|
|
|
+ //生成计费详单
|
|
|
|
+
|
|
|
|
+ return success(mapList);
|
|
|
|
+ }
|
|
int isExist= wmsInboundScanResultService.isExist(map.get("userName").toString(),map.get("resultMaterial").toString().substring(0,map.get("resultMaterial").toString().length()-1));
|
|
int isExist= wmsInboundScanResultService.isExist(map.get("userName").toString(),map.get("resultMaterial").toString().substring(0,map.get("resultMaterial").toString().length()-1));
|
|
//通过用户ID查询、当前扫描没有下发的物质、最终展示的集合
|
|
//通过用户ID查询、当前扫描没有下发的物质、最终展示的集合
|
|
List<Map<String,Object>>mapList= wmsInboundScanResultService.noIssueScanResultList(map.get("userName").toString());
|
|
List<Map<String,Object>>mapList= wmsInboundScanResultService.noIssueScanResultList(map.get("userName").toString());
|