|
@@ -82,9 +82,11 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
//判断为棒材还是线材
|
|
|
for (Map<String,Object> map1:deliveryOrderMaterialList){
|
|
|
BigDecimal materialid = (BigDecimal) map1.get("materialId");
|
|
|
+ BigDecimal saleMaterialIdOld = DataChange.dataToBigDecimal(map1.get("saleMaterialIdOld"));
|
|
|
String materialName =(String) map1.get("materialName");
|
|
|
map.put("materialName",materialName);
|
|
|
- BigDecimal Bigdecimal1 = tmstruckLeaveFactoryResultMapper.queryNumber(materialid, orderNumber);
|
|
|
+ map.put("saleMaterialIdOld",saleMaterialIdOld);
|
|
|
+ BigDecimal Bigdecimal1 = tmstruckLeaveFactoryResultMapper.queryNumber(materialid, orderNumber,saleMaterialIdOld);
|
|
|
map1.put("materialNumber",Bigdecimal1);
|
|
|
//判断是实重还是理重的标志
|
|
|
BigDecimal isPoundSale = (BigDecimal) map1.get("isPoundSale");
|
|
@@ -93,8 +95,9 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
List<Map<String, Object>> netWeightlist = tmstruckLeaveFactoryResultMapper.getNetWeightByOrder(map);
|
|
|
for (Map<String, Object> stringObjectMap : netWeightlist) {
|
|
|
BigDecimal materialid1 = (BigDecimal) stringObjectMap.get("materialid");
|
|
|
+ BigDecimal saleMaterialId = DataChange.dataToBigDecimal(stringObjectMap.get("saleMaterialId"));
|
|
|
if(materialid1 !=null&&!("".equals(materialid1))){
|
|
|
- if (materialid.compareTo(materialid1) == 0) {
|
|
|
+ if (materialid.compareTo(materialid1) == 0 && saleMaterialIdOld.compareTo(saleMaterialId) == 0) {
|
|
|
BigDecimal nowNetWeight = (BigDecimal) stringObjectMap.get("nowNetWeight");
|
|
|
if (nowNetWeight != null) {
|
|
|
map1.put("netWeightTime",stringObjectMap.get("netWeightTime"));
|
|
@@ -111,8 +114,9 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
if (isPoundSale !=null && isPoundSale.compareTo(BigDecimal.valueOf(0))==0){
|
|
|
for (Map<String, Object> stringObjectMap : netWeightlist) {
|
|
|
BigDecimal materialid1 = (BigDecimal) stringObjectMap.get("materialid");
|
|
|
+ BigDecimal saleMaterialId = DataChange.dataToBigDecimal(stringObjectMap.get("saleMaterialId"));
|
|
|
if(materialid1 !=null&&!("".equals(materialid1))){
|
|
|
- if (materialid.compareTo(materialid1) == 0) {
|
|
|
+ if (materialid.compareTo(materialid1) == 0 && saleMaterialIdOld.compareTo(saleMaterialId) == 0) {
|
|
|
BigDecimal nowNetWeight = (BigDecimal) stringObjectMap.get("nowNetWeight");
|
|
|
if (nowNetWeight != null) {
|
|
|
map1.put("materialWeight", nowNetWeight);
|
|
@@ -127,7 +131,8 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
List<Map<String, Object>> theoryWeightlist = tmstruckLeaveFactoryResultMapper.getTheoryWeight(map);
|
|
|
for (Map<String, Object> stringObjectMap : theoryWeightlist) {
|
|
|
BigDecimal materialid1 = (BigDecimal) stringObjectMap.get("materialid");
|
|
|
- if (materialid.compareTo(materialid1) == 0){
|
|
|
+ BigDecimal saleMaterialId = DataChange.dataToBigDecimal(stringObjectMap.get("saleMaterialId"));
|
|
|
+ if (materialid.compareTo(materialid1) == 0 && saleMaterialIdOld.compareTo(saleMaterialId) == 0){
|
|
|
BigDecimal theoryWeight=(BigDecimal) stringObjectMap.get("theoreticalWeight");
|
|
|
if (theoryWeight != null){
|
|
|
map1.put("materialWeight",theoryWeight);
|