|
|
@@ -192,7 +192,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
|
|
|
//当存储一次数据或者结净时,将本车辆的预处理重量改为已使用
|
|
|
updatePreWeight(model.getCarNo());
|
|
|
- model.setValueFlag("1");
|
|
|
+ if(StringUtils.isEmpty(model.getValueFlag())){
|
|
|
+ model.setValueFlag("1");
|
|
|
+ }
|
|
|
if(StringUtils.isNotEmpty(model.getPredictionNo())){
|
|
|
model.setIsPreScale("1");
|
|
|
}
|
|
|
@@ -2642,35 +2644,32 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
MeterWorkCarActualFirst mwcaf2 = meterWorkCarActualFirstMapper.selectByPrimaryKey(actualNo2);
|
|
|
MeterWorkCarActualFirst mwcaf3 = meterWorkCarActualFirstMapper.selectByPrimaryKey(actualNo2);
|
|
|
MeterWorkCarActualFirst mwcaf4 = meterWorkCarActualFirstMapper.selectByPrimaryKey(actualNo3);
|
|
|
-
|
|
|
//查询所有的委托数据
|
|
|
PreTrackScale pts1 = preTrackScaleMapper.selectByPrimaryKey(predictionNo1);
|
|
|
PreTrackScale pts2 = preTrackScaleMapper.selectByPrimaryKey(predictionNo2);
|
|
|
-
|
|
|
//定义新的结净数据实体
|
|
|
MeterWorkCarActual actualRow1 = new MeterWorkCarActual();
|
|
|
MeterWorkCarActual actualRow2 = new MeterWorkCarActual();
|
|
|
|
|
|
//判断是否为混装逻辑
|
|
|
- if(mwcaf1.getMeterWeight().compareTo(mwcaf2.getMeterWeight()) == 1 || mwcaf1.getMeterWeight().compareTo(mwcaf4.getMeterWeight()) == 1 || mwcaf2.getMeterWeight().compareTo(mwcaf4.getMeterWeight()) == 1){
|
|
|
+ if(mwcaf1.getMeterWeight().compareTo(mwcaf2.getMeterWeight()) == 1 ||
|
|
|
+ mwcaf1.getMeterWeight().compareTo(mwcaf4.getMeterWeight()) == 1 ||
|
|
|
+ mwcaf2.getMeterWeight().compareTo(mwcaf4.getMeterWeight()) == 1){
|
|
|
return "不为混装逻辑!!";
|
|
|
}
|
|
|
-
|
|
|
//判断一次数据是否存在
|
|
|
if (mwcaf1 == null || mwcaf2 == null || mwcaf3 == null || mwcaf4 == null) {
|
|
|
return "未查询到相应的一次数据!!";
|
|
|
}
|
|
|
-
|
|
|
//判断一次数据是否已结净
|
|
|
- if (mwcaf1.getValueFlag().equals("2") || mwcaf2.getValueFlag().equals("2") || mwcaf3.getValueFlag().equals("2") || mwcaf4.getValueFlag().equals("2")) {
|
|
|
+ if (mwcaf1.getValueFlag().equals("2") || mwcaf2.getValueFlag().equals("2") ||
|
|
|
+ mwcaf3.getValueFlag().equals("2") || mwcaf4.getValueFlag().equals("2")) {
|
|
|
return "存在已结净的一次数据!!";
|
|
|
}
|
|
|
-
|
|
|
//判断委托数据是否存在
|
|
|
if (pts1 == null || pts2 == null) {
|
|
|
return "未查询到相应的委托数据!!";
|
|
|
}
|
|
|
-
|
|
|
//判断委托数据是否已使用
|
|
|
if (!pts1.getValueFlag().equals("1") || !pts1.getValueFlag().equals("1")) {
|
|
|
return "委托不是未使用状态!!";
|
|
|
@@ -2685,20 +2684,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
BeanUtils.copyProperties(first3,mwcaf3);
|
|
|
MeterWorkCarActualFirst first4 = meterWorkCarActualFirstMapper.selectAndMatch(actualNo3, predictionNo2);
|
|
|
BeanUtils.copyProperties(first4, mwcaf4);
|
|
|
-
|
|
|
- //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
|
|
|
- MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(actualNo2, actualNo1, predictionNo1);
|
|
|
- BeanUtils.copyProperties(mwca1, actualRow1);
|
|
|
- MeterWorkCarActual mwca2 = meterWorkCarActualMapper.manualAddPre(actualNo3, actualNo2, predictionNo2);
|
|
|
- BeanUtils.copyProperties(mwca2,actualRow2);
|
|
|
-
|
|
|
//更新预报数据
|
|
|
PreTrackScale scale = new PreTrackScale();
|
|
|
scale.setPredictionNo(predictionNo1);
|
|
|
scale.setValueFlag(DbConstants.NET);
|
|
|
scale.setUpdateTime(new Date());
|
|
|
scale.setUpdateManNo("system");
|
|
|
- scale.setUpdateManName("二次计量洁净更新");
|
|
|
+ scale.setUpdateManName("混装洁净更新");
|
|
|
+ scale.setPredictionType("7");
|
|
|
+ scale.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
scale.setUploadFlag("1");
|
|
|
preTrackScaleMapper.updateByPrimaryKeySelective(scale);
|
|
|
|
|
|
@@ -2707,7 +2701,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
scale1.setValueFlag(DbConstants.NET);
|
|
|
scale1.setUpdateTime(new Date());
|
|
|
scale1.setUpdateManNo("system");
|
|
|
- scale1.setUpdateManName("二次计量洁净更新");
|
|
|
+ scale1.setUpdateManName("混装洁净更新");
|
|
|
+ scale1.setPredictionType("7");
|
|
|
+ scale1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
scale1.setUploadFlag("1");
|
|
|
preTrackScaleMapper.updateByPrimaryKeySelective(scale1);
|
|
|
|
|
|
@@ -2715,16 +2711,22 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
//更新第一次皮重数据
|
|
|
mwcaf1.setValueFlag(DbConstants.NET);
|
|
|
mwcaf1.setUpdateManName("system");
|
|
|
- mwcaf1.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf1.setUpdateManName("混装洁净更新");
|
|
|
mwcaf1.setUpdateTime(new Date());
|
|
|
mwcaf1.setIsPreScale("1");
|
|
|
+ mwcaf1.setPredictionNo(predictionNo1);
|
|
|
+ mwcaf1.setPredictionType("7");
|
|
|
+ mwcaf1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
|
|
|
//更新第一次毛重数据
|
|
|
mwcaf2.setValueFlag(DbConstants.NET);
|
|
|
mwcaf2.setUpdateManName("system");
|
|
|
- mwcaf2.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf2.setUpdateManName("混装洁净更新");
|
|
|
mwcaf2.setUpdateTime(new Date());
|
|
|
mwcaf2.setIsPreScale("1");
|
|
|
+ mwcaf2.setPredictionNo(predictionNo1);
|
|
|
+ mwcaf2.setPredictionType("7");
|
|
|
+ mwcaf2.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
|
|
|
//添加第二次皮重数据
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
@@ -2733,29 +2735,43 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
mwcaf3.setActualFirstNo(actualFirstNo);
|
|
|
mwcaf3.setValueFlag(DbConstants.NET);
|
|
|
mwcaf3.setUpdateManName("system");
|
|
|
- mwcaf3.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf3.setUpdateManName("混装洁净更新");
|
|
|
mwcaf3.setUpdateTime(new Date());
|
|
|
mwcaf3.setIsPreScale("1");
|
|
|
+ mwcaf3.setPredictionNo(predictionNo2);
|
|
|
+ mwcaf3.setPredictionType("7");
|
|
|
+ mwcaf3.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.insertSelective(mwcaf3);
|
|
|
//更新第二次毛重数据
|
|
|
mwcaf4.setValueFlag(DbConstants.NET);
|
|
|
mwcaf4.setUpdateManName("system");
|
|
|
- mwcaf4.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf4.setUpdateManName("混装洁净更新");
|
|
|
mwcaf4.setUpdateTime(new Date());
|
|
|
mwcaf4.setIsPreScale("1");
|
|
|
+ mwcaf4.setPredictionNo(predictionNo2);
|
|
|
+ mwcaf4.setPredictionType("7");
|
|
|
+ mwcaf4.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf4);
|
|
|
+ //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
|
|
|
+ MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(actualNo2, actualNo1, predictionNo1);
|
|
|
+ BeanUtils.copyProperties(mwca1, actualRow1);
|
|
|
+ MeterWorkCarActual mwca2 = meterWorkCarActualMapper.manualAddPre(actualNo3, actualFirstNo, predictionNo2);
|
|
|
+ BeanUtils.copyProperties(mwca2,actualRow2);
|
|
|
|
|
|
//添加结净数据
|
|
|
String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
|
|
|
actualRow1.setActualNo(sdf.format(new Date()) + no);
|
|
|
actualRow1.setNetTime(new Date());
|
|
|
actualRow1.setNetMode(DbConstants.TYPE);
|
|
|
- actualRow1.setNote("混装结净");
|
|
|
+ actualRow1.setNote("混装匹配结净");
|
|
|
actualRow1.setUploadFlag("1");
|
|
|
actualRow1.setIsPreScale("1");
|
|
|
- actualRow1.setValueFlag("2");
|
|
|
+ actualRow1.setValueFlag("1");
|
|
|
actualRow1.setCreateTime(new Date());
|
|
|
- actualRow1.setCreateManName("洁净");
|
|
|
+ actualRow1.setCreateManName("混装匹配结净");
|
|
|
+ actualRow1.setPredictionType("7");
|
|
|
+ actualRow1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
+ actualRow1.setPredictionNo(predictionNo2);
|
|
|
actualRow1.setNetWeight(mwcaf2.getMeterWeight().subtract(mwcaf1.getMeterWeight()));
|
|
|
meterWorkCarActualMapper.insertSelective(actualRow1);
|
|
|
|
|
|
@@ -2763,12 +2779,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
actualRow2.setActualNo(sdf.format(new Date()) + no1);
|
|
|
actualRow2.setNetTime(new Date());
|
|
|
actualRow2.setNetMode(DbConstants.TYPE);
|
|
|
- actualRow2.setNote("混装结净");
|
|
|
+ actualRow2.setNote("混装匹配结净");
|
|
|
actualRow2.setUploadFlag("1");
|
|
|
actualRow2.setIsPreScale("1");
|
|
|
- actualRow2.setValueFlag("2");
|
|
|
+ actualRow2.setValueFlag("1");
|
|
|
actualRow2.setCreateTime(new Date());
|
|
|
- actualRow2.setCreateManName("洁净");
|
|
|
+ actualRow2.setCreateManName("混装匹配结净");
|
|
|
+ actualRow2.setPredictionType("7");
|
|
|
+ actualRow2.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
+ actualRow2.setPredictionNo(predictionNo2);
|
|
|
actualRow2.setNetWeight(mwcaf4.getMeterWeight().subtract(mwcaf3.getMeterWeight()));
|
|
|
meterWorkCarActualMapper.insertSelective(actualRow2);
|
|
|
}
|
|
|
@@ -2825,11 +2844,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
BeanUtils.copyProperties(first3,mwcaf3);
|
|
|
MeterWorkCarActualFirst first4 = meterWorkCarActualFirstMapper.selectAndMatch(actualNo3, predictionNo2);
|
|
|
BeanUtils.copyProperties(first4, mwcaf4);
|
|
|
- //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
|
|
|
- MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(actualNo1, actualNo2, predictionNo1);
|
|
|
- BeanUtils.copyProperties(mwca1, actualRow1);
|
|
|
- MeterWorkCarActual mwca2 = meterWorkCarActualMapper.manualAddPre(actualNo2, actualNo3, predictionNo2);
|
|
|
- BeanUtils.copyProperties(mwca2,actualRow2);
|
|
|
|
|
|
//更新预报数据
|
|
|
PreTrackScale scale = new PreTrackScale();
|
|
|
@@ -2837,11 +2851,11 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
scale.setValueFlag(DbConstants.NET);
|
|
|
scale.setUpdateTime(new Date());
|
|
|
scale.setUpdateManNo("system");
|
|
|
- scale.setUpdateManName("二次计量洁净更新");
|
|
|
+ scale.setUpdateManName("混卸洁净更新");
|
|
|
scale.setUploadFlag("1");
|
|
|
scale.setValueFlag("2");
|
|
|
//预报类型:双委托(5)、预报组合:A预报,B预报
|
|
|
- scale.setPredictionType("7");
|
|
|
+ scale.setPredictionType("6");
|
|
|
scale.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
preTrackScaleMapper.updateByPrimaryKeySelective(scale);
|
|
|
|
|
|
@@ -2850,10 +2864,10 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
scale1.setValueFlag(DbConstants.NET);
|
|
|
scale1.setUpdateTime(new Date());
|
|
|
scale1.setUpdateManNo("system");
|
|
|
- scale1.setUpdateManName("二次计量洁净更新");
|
|
|
+ scale1.setUpdateManName("混卸洁净更新");
|
|
|
scale1.setUploadFlag("1");
|
|
|
scale1.setValueFlag("2");
|
|
|
- scale1.setPredictionType("7");
|
|
|
+ scale1.setPredictionType("6");
|
|
|
scale1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
preTrackScaleMapper.updateByPrimaryKeySelective(scale1);
|
|
|
|
|
|
@@ -2861,19 +2875,21 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
//更新第一次毛重数据
|
|
|
mwcaf1.setValueFlag(DbConstants.NET);
|
|
|
mwcaf1.setUpdateManNo("system");
|
|
|
- mwcaf1.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf1.setUpdateManName("混卸洁净更新");
|
|
|
mwcaf1.setUpdateTime(new Date());
|
|
|
mwcaf1.setIsPreScale("1");
|
|
|
- mwcaf1.setPredictionType("7");
|
|
|
+ mwcaf1.setPredictionNo(predictionNo1);
|
|
|
+ mwcaf1.setPredictionType("6");
|
|
|
mwcaf1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
|
|
|
//更新第一次皮重数据
|
|
|
mwcaf2.setValueFlag(DbConstants.NET);
|
|
|
mwcaf2.setUpdateManNo("system");
|
|
|
- mwcaf2.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf2.setUpdateManName("混卸洁净更新");
|
|
|
mwcaf2.setUpdateTime(new Date());
|
|
|
mwcaf2.setIsPreScale("1");
|
|
|
- mwcaf2.setPredictionType("7");
|
|
|
+ mwcaf2.setPredictionNo(predictionNo1);
|
|
|
+ mwcaf2.setPredictionType("6");
|
|
|
mwcaf2.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
|
|
|
//添加第二次毛重数据
|
|
|
@@ -2883,34 +2899,41 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
mwcaf3.setActualFirstNo(actualFirstNo);
|
|
|
mwcaf3.setValueFlag(DbConstants.NET);
|
|
|
mwcaf3.setUpdateManNo("system");
|
|
|
- mwcaf3.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf3.setUpdateManName("混卸洁净更新");
|
|
|
mwcaf3.setUpdateTime(new Date());
|
|
|
mwcaf3.setIsPreScale("1");
|
|
|
- mwcaf3.setPredictionType("7");
|
|
|
+ mwcaf3.setPredictionNo(predictionNo2);
|
|
|
+ mwcaf3.setPredictionType("6");
|
|
|
mwcaf3.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.insertSelective(mwcaf3);
|
|
|
//更新第二次皮重数据
|
|
|
mwcaf4.setValueFlag(DbConstants.NET);
|
|
|
mwcaf4.setUpdateManNo("system");
|
|
|
- mwcaf4.setUpdateManName("二次计量洁净更新");
|
|
|
+ mwcaf4.setUpdateManName("混卸洁净更新");
|
|
|
mwcaf4.setUpdateTime(new Date());
|
|
|
mwcaf4.setIsPreScale("1");
|
|
|
- mwcaf4.setPredictionType("7");
|
|
|
+ mwcaf4.setPredictionNo(predictionNo2);
|
|
|
+ mwcaf4.setPredictionType("6");
|
|
|
mwcaf4.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf4);
|
|
|
+ //将委托中的编号和收发货单位和一次数据等数据拷贝进结净数据中
|
|
|
+ MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(actualNo1, actualNo2, predictionNo1);
|
|
|
+ BeanUtils.copyProperties(mwca1, actualRow1);
|
|
|
+ MeterWorkCarActual mwca2 = meterWorkCarActualMapper.manualAddPre(actualFirstNo, actualNo3, predictionNo2);
|
|
|
+ BeanUtils.copyProperties(mwca2,actualRow2);
|
|
|
|
|
|
//添加结净数据
|
|
|
String no = meterWorkCarActualMapper.getNewID(sdf.format(new Date()));
|
|
|
actualRow1.setActualNo(sdf.format(new Date()) + no);
|
|
|
actualRow1.setNetTime(new Date());
|
|
|
actualRow1.setNetMode(DbConstants.TYPE);
|
|
|
- actualRow1.setNote("混装结净");
|
|
|
+ actualRow1.setNote("混卸匹配结净");
|
|
|
actualRow1.setUploadFlag("1");
|
|
|
actualRow1.setIsPreScale("1");
|
|
|
- actualRow1.setValueFlag("2");
|
|
|
- actualRow1.setCreateManName("洁净");
|
|
|
+ actualRow1.setValueFlag("1");
|
|
|
+ actualRow1.setCreateManName("混卸匹配结净");
|
|
|
actualRow1.setCreateTime(new Date());
|
|
|
- actualRow1.setPredictionNo("7");
|
|
|
+ actualRow1.setPredictionType("6");
|
|
|
actualRow1.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
actualRow1.setPredictionNo(predictionNo1);
|
|
|
actualRow1.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
|
|
|
@@ -2920,13 +2943,13 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
actualRow2.setActualNo(sdf.format(new Date()) + no1);
|
|
|
actualRow2.setNetTime(new Date());
|
|
|
actualRow2.setNetMode(DbConstants.TYPE);
|
|
|
- actualRow2.setNote("混装结净");
|
|
|
+ actualRow2.setNote("混卸匹配结净");
|
|
|
actualRow2.setUploadFlag("1");
|
|
|
actualRow2.setIsPreScale("1");
|
|
|
- actualRow2.setValueFlag("2");
|
|
|
- actualRow2.setCreateManName("洁净");
|
|
|
+ actualRow2.setValueFlag("1");
|
|
|
+ actualRow2.setCreateManName("混卸匹配结净");
|
|
|
actualRow2.setCreateTime(new Date());
|
|
|
- actualRow2.setPredictionNo("7");
|
|
|
+ actualRow2.setPredictionType("6");
|
|
|
actualRow2.setPredictionCombination(predictionNo1 + "," + predictionNo2);
|
|
|
actualRow2.setPredictionNo(predictionNo2);
|
|
|
actualRow2.setNetWeight(mwcaf3.getMeterWeight().subtract(mwcaf4.getMeterWeight()));
|
|
|
@@ -3428,13 +3451,21 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public PageList<MeterWorkCarActualFirst> likeByValueFlag(Map<String, Object> params, Integer pageNum, Integer pageSize) {
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<MeterWorkCarActualFirst> rows = meterWorkCarActualFirstMapper.likeByValueFlag(params);
|
|
|
+ PageList pageInfo = new PageList(rows);
|
|
|
+ return pageInfo;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(value = "tm", rollbackFor = Exception.class)
|
|
|
public RESTfulResult doNetAddMuch(MeterWorkCarActualFirst actualFirst) throws Exception {
|
|
|
- try {
|
|
|
- RESTfulResult rm = new RESTfulResult();
|
|
|
- rm.setCode("200");
|
|
|
+ RESTfulResult rm = new RESTfulResult();
|
|
|
+ rm.setCode("200");
|
|
|
|
|
|
+ try {
|
|
|
HashMap map = new HashMap();
|
|
|
map.put("valueFlag","1");
|
|
|
map.put("carNo",actualFirst.getCarNo());
|
|
|
@@ -3446,14 +3477,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
String afl = formatter.format(new Date());
|
|
|
String no = meterWorkCarActualFirstMapper.getNewID(afl);
|
|
|
actualFirst.setActualFirstNo(formatter.format(new Date()) + no);
|
|
|
- actualFirst.setValueFlag("2");//洁净
|
|
|
- meterWorkCarActualFirstMapper.insertSelective(actualFirst);
|
|
|
+ actualFirst.setValueFlag("2");//未洁净
|
|
|
+ int i = meterWorkCarActualFirstMapper.insertSelective(actualFirst);
|
|
|
|
|
|
//将毛重委托匹配到皮重中
|
|
|
MeterWorkCarActualFirst meterWorkCarActualFirst = meterWorkCarActualFirstMapper.selectAndMatch(actualFirst.getActualFirstNo(), model.getPredictionNo());
|
|
|
- meterWorkCarActualFirst.setIsPreScale("1s");
|
|
|
+ meterWorkCarActualFirst.setIsPreScale("1");
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(meterWorkCarActualFirst);
|
|
|
|
|
|
+
|
|
|
//修改毛重数据状态为结净
|
|
|
model.setValueFlag("2");
|
|
|
meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
|
|
|
@@ -3480,7 +3512,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
preTrackScaleMapper.updateByPrimaryKeySelective(preTrackScale);
|
|
|
num++;
|
|
|
}
|
|
|
-
|
|
|
//当存储一次数据或者结净时,将本车辆的预处理重量改为已使用
|
|
|
updatePreWeight(actualFirst.getCarNo());
|
|
|
|
|
|
@@ -3489,7 +3520,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
|
|
|
return rm;
|
|
|
}
|
|
|
catch (Exception e){
|
|
|
- RESTfulResult rm = new RESTfulResult();
|
|
|
rm.setCode("500");
|
|
|
rm.setData(null);
|
|
|
rm.setMessage(e.getMessage());
|