|
@@ -6,6 +6,7 @@ import com.steerinfo.dil.mapper.WmspInboundScanResultMapper;
|
|
|
import com.steerinfo.dil.model.WmspOutboundResult;
|
|
|
import com.steerinfo.dil.model.WmspOutboundScanResult;
|
|
|
import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
|
|
|
+import com.steerinfo.dil.service.impl.WmsInboundScanResultServiceImpl;
|
|
|
import com.steerinfo.dil.service.impl.WmspOutboundResultServiceImpl;
|
|
|
import com.steerinfo.dil.service.impl.WmspOutboundScanResultServiceImpl;
|
|
|
import com.steerinfo.dil.util.BaseRESTfulController;
|
|
@@ -23,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
@@ -46,6 +48,8 @@ import java.util.Map;
|
|
|
@RequestMapping("/${api.version}/wmspoutboundresults")
|
|
|
public class WmspOutboundResultController extends BaseRESTfulController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ WmsInboundScanResultServiceImpl wmsInboundScanResultService;
|
|
|
@Autowired
|
|
|
private WmspOutboundResultServiceImpl wmspOutboundResultService;
|
|
|
@Autowired
|
|
@@ -178,7 +182,7 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
|
* */
|
|
|
@Transactional
|
|
|
@PostMapping(value = "/insertwmspOutboundScanResult")
|
|
|
- public synchronized RESTfulResult insertwmspOutboundScanResult(@RequestBody(required = false) Map<String, Object> map){
|
|
|
+ public synchronized RESTfulResult insertwmspOutboundScanResult(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
|
|
|
//判断物资是否满足要求,目前一下三种不做处理的判断
|
|
|
//获取装卸工扫描吊牌结果 HRB400-14-21706854-9-3049-280-20211001015115-7a63cd87a4095e7f-08010103010100003-4
|
|
|
String subResultMaterial = map.get("resultMaterial").toString().substring(0,map.get("resultMaterial").toString().length() - 1);
|
|
@@ -194,10 +198,14 @@ public class WmspOutboundResultController extends BaseRESTfulController {
|
|
|
//根据物资id查询相对应的入库实绩ID,并将其赋值给相对应的入库扫描实绩表,判断是否入库
|
|
|
List<Map<String, Object>> list = wmspInboundScanResultMapper.getInboundResultIdByMaterial(subResultMaterial);
|
|
|
if (list==null||list.size()==0){
|
|
|
- //没有入库
|
|
|
- return failed(-2);
|
|
|
+ Map<String, Object> inboundScanResultByResultMaterial = wmsInboundScanResultService.createInboundScanResultByResultMaterial(1, map.get("personnelJobNumber").toString(), map.get("resultMaterial").toString());
|
|
|
+ if (inboundScanResultByResultMaterial==null){
|
|
|
+ //没有入库
|
|
|
+ return failed(-2);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- //判断物资是否是需要出库的物资,需要出库物资数量不等于0,通过物资唯一编码和出库实绩
|
|
|
+ //判断物资是否是需要出库的物资类型,需要出库物资数量不等于0,通过物资唯一编码和出库实绩
|
|
|
Map<String,Object> materialMap = wmspOutboundResultMaterialService.isOutboundResultMaterial(MaterialOnlyCode,resultId);
|
|
|
if (materialMap==null){
|
|
|
//物质类型错误
|