|
@@ -9,6 +9,7 @@ import com.steerinfo.dil.model.WmspInboundStackResult;
|
|
|
import com.steerinfo.dil.service.IRmsMaterialSteelService;
|
|
|
import com.steerinfo.dil.service.IWmsInboundScanResultService;
|
|
|
import com.steerinfo.dil.service.IWmspInboundGroupService;
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -470,4 +471,49 @@ public class WmsInboundScanResultServiceImpl implements IWmsInboundScanResultSer
|
|
|
public Integer isExistLoad(String orderNumber) {
|
|
|
return wmspInboundScanResultMapper.isExistLoad(orderNumber);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Map<String,Object>> createResultMaterials(Map<String,Object> map){
|
|
|
+ List<Map<String,Object>> resultMaterials=new ArrayList<>();
|
|
|
+ SimpleDateFormat format=new SimpleDateFormat("yyyyMMdd");
|
|
|
+ //把今天作为生产日期
|
|
|
+ String today=format.format(new Date());
|
|
|
+ //总数量
|
|
|
+ Integer number=Integer.parseInt(map.get("number").toString());
|
|
|
+ //物资编码
|
|
|
+ String materialCode=map.get("materialCode").toString();
|
|
|
+ //炉号
|
|
|
+ String furnaceNumber=map.get("furnaceNumber").toString();
|
|
|
+ //理重
|
|
|
+ BigDecimal theoreticalWeight= DataChange.dataToBigDecimal(map.get("theoreticalWeight"));
|
|
|
+ Map<String,Object> materialDetails=wmspInboundScanResultMapper.findMaterialDetails(materialCode);
|
|
|
+ if(materialDetails==null || materialDetails.get("materialModel")==null || materialDetails.get("materialSpecification")==null)
|
|
|
+ return null;
|
|
|
+ //物资型号
|
|
|
+ String materialModel=materialDetails.get("materialModel").toString();
|
|
|
+ //物资规格
|
|
|
+ String materialSpecification=materialDetails.get("materialSpecification").toString();
|
|
|
+ String arr[]=materialSpecification.split("Φ");
|
|
|
+ if(arr.length>1){
|
|
|
+ materialSpecification=arr[1];
|
|
|
+ }
|
|
|
+ for(int i=0;i<number;i++){
|
|
|
+ Map<String,Object> temp=new HashMap<>();
|
|
|
+ String resultMaterial="";
|
|
|
+ resultMaterial=materialModel+"-"
|
|
|
+ +materialSpecification+"-"
|
|
|
+ +furnaceNumber+"-"
|
|
|
+ +"-"
|
|
|
+ +theoreticalWeight+"-"
|
|
|
+ +"-"
|
|
|
+ +today+"-"
|
|
|
+ +i+"wuliuxitongbulu"+System.currentTimeMillis()+"-"//唯一编码
|
|
|
+ +materialCode+"-"
|
|
|
+ +"1";
|
|
|
+ temp.put("resultMaterial",resultMaterial);
|
|
|
+ System.out.println(resultMaterial);
|
|
|
+ resultMaterials.add(temp);
|
|
|
+ }
|
|
|
+ return resultMaterials;
|
|
|
+ }
|
|
|
}
|