|
@@ -390,8 +390,10 @@ public class WmspGridMaterialServiceImpl implements IWmspGridMaterialService {
|
|
return -1;
|
|
return -1;
|
|
}else{
|
|
}else{
|
|
int count = 0;
|
|
int count = 0;
|
|
-// 遍历materialList
|
|
|
|
|
|
+ //遍历materialList
|
|
//创建金蝶报文
|
|
//创建金蝶报文
|
|
|
|
+ //防止前台没请求到
|
|
|
|
+ materialTheWeight = getTheoreticalByInfo(warehouseId,materialCode,materialSpecification,materialModel,status,quantity).toString();
|
|
BigDecimal inboundEasId = wmspInboundEasMapper.inboundEasId();
|
|
BigDecimal inboundEasId = wmspInboundEasMapper.inboundEasId();
|
|
Map<String, Object> head = new HashMap<>();
|
|
Map<String, Object> head = new HashMap<>();
|
|
head.put("number",inboundEasId);
|
|
head.put("number",inboundEasId);
|
|
@@ -443,7 +445,11 @@ public class WmspGridMaterialServiceImpl implements IWmspGridMaterialService {
|
|
wmspInboundEas.setInsertTime(new Date());
|
|
wmspInboundEas.setInsertTime(new Date());
|
|
wmspInboundEas.setMaterialActuallyWeight(new BigDecimal(actuallyWeight));
|
|
wmspInboundEas.setMaterialActuallyWeight(new BigDecimal(actuallyWeight));
|
|
wmspInboundEas.setMaterialNum(new BigDecimal(quantity));
|
|
wmspInboundEas.setMaterialNum(new BigDecimal(quantity));
|
|
- wmspInboundEas.setMaterialTheroticalWeight(new BigDecimal(materialTheWeight));
|
|
|
|
|
|
+ if(DataChange.dataToBigDecimal(warehouseId).intValue() == 3){
|
|
|
|
+ wmspInboundEas.setMaterialTheroticalWeight(new BigDecimal(actuallyWeight));
|
|
|
|
+ }else{
|
|
|
|
+ wmspInboundEas.setMaterialTheroticalWeight(new BigDecimal(materialTheWeight));
|
|
|
|
+ }
|
|
wmspInboundEas.setInsertUsername(remark);
|
|
wmspInboundEas.setInsertUsername(remark);
|
|
wmspInboundEas.setInsertUpdateRemark(json.toString());
|
|
wmspInboundEas.setInsertUpdateRemark(json.toString());
|
|
wmspInboundEas.setUpdateUsername(resultMap);
|
|
wmspInboundEas.setUpdateUsername(resultMap);
|
|
@@ -604,4 +610,36 @@ public class WmspGridMaterialServiceImpl implements IWmspGridMaterialService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public int deleteInboundMaterial(String warehouseId, String materialCode, String materialSpecification, String materialModel, Integer quantity) {
|
|
|
|
+ // 设置状态为预留转入库
|
|
|
|
+ Integer status = 1;
|
|
|
|
+// 根据前端传过来的物资型号,物资规格查询当前实时库存中的物资id
|
|
|
|
+ List<Map<String,Object>> materialIdList=wmspGridMaterialMapper.getMaterialIdes(warehouseId,materialCode,materialSpecification,materialModel,status);
|
|
|
|
+ for (Map<String,Object> map:materialIdList){}
|
|
|
|
+ // 当数量小于零的时候
|
|
|
|
+ if (quantity<=0){
|
|
|
|
+ return 0;
|
|
|
|
+ }else if (quantity>materialIdList.size()){
|
|
|
|
+ // 当数量大于查询到的数量
|
|
|
|
+ return -1;
|
|
|
|
+ }else{
|
|
|
|
+ int count = 0;
|
|
|
|
+ //遍历materialList
|
|
|
|
+ //创建金蝶报文
|
|
|
|
+ //防止前台没请求到
|
|
|
|
+ for (int i =0;i<quantity;i++){
|
|
|
|
+ Map<String,Object> map =materialIdList.get(i);
|
|
|
|
+ BigDecimal inboundId=(BigDecimal) map.get("inboundId");
|
|
|
|
+// 创建入库实体类
|
|
|
|
+ WmspInboundResult wmspInboundResult = new WmspInboundResult();
|
|
|
|
+ wmspInboundResult.setInboundId(inboundId);
|
|
|
|
+ wmspInboundResult.setInboundIscomplete(new BigDecimal(2));
|
|
|
|
+ wmspInboundResult.setIsupload(new BigDecimal(1));
|
|
|
|
+// 修改入库实绩
|
|
|
|
+ count += wmspInboundResultMapper.updateByPrimaryKeySelective(wmspInboundResult);
|
|
|
|
+ }
|
|
|
|
+ return count;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|