瀏覽代碼

后端修改

dengyj 3 年之前
父節點
當前提交
d539a19d66

+ 215 - 6
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java

@@ -1,14 +1,22 @@
 package com.steerinfo.meterwork.meterworkcaractualfirst.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.steerinfo.baseinfo.combaseinfo.mapper.ComBaseInfoMapper;
+import com.steerinfo.baseinfo.combaseinfo.model.ComBaseInfo;
 import com.steerinfo.baseinfo.meterbaseaddweight.mapper.MeterBaseAddWeightMapper;
 import com.steerinfo.baseinfo.meterbaseaddweight.model.MeterBaseAddWeight;
+import com.steerinfo.baseinfo.meterbasecar.mapper.MeterBaseCarMapper;
+import com.steerinfo.baseinfo.meterbasecar.model.MeterBaseCar;
 import com.steerinfo.baseinfo.meterbasehistaredata.mapper.MeterBaseHisTareDataMapper;
 import com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData;
 import com.steerinfo.baseinfo.meterbasehistaredetail.mapper.MeterBaseHisTareDetailMapper;
 import com.steerinfo.baseinfo.meterbasehistaredetail.model.MeterBaseHisTareDetail;
 import com.steerinfo.baseinfo.meterbasematterinfo.mapper.MeterBaseMatterInfoMapper;
 import com.steerinfo.baseinfo.meterbasematterinfo.model.MeterBaseMatterInfo;
+import com.steerinfo.baseinfo.meterbasemattermap.mapper.MeterBaseMatterMapMapper;
+import com.steerinfo.baseinfo.meterbasemattermap.model.MeterBaseMatterMap;
+import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
+import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper;
 import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
 import com.steerinfo.baseinfo.meterbasetermtaredata.mapper.MeterBaseTermTareDataMapper;
@@ -97,6 +105,18 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
     @Resource
     private MeterWorkCraneActualMapper craneActualMapper;
 
+    @Resource
+    private MeterBaseCarMapper meterBaseCarMapper;
+
+    @Resource
+    private MeterBaseOperationLogMapper meterBaseOperationLogMapper;
+
+    @Resource
+    private ComBaseInfoMapper comBaseInfoMapper;
+
+    @Resource
+    private MeterBaseMatterMapMapper meterBaseMatterMapMapper;
+
     @Resource
     private MeterBaseSpotInfoMapper meterBaseSpotInfoMapper;
 
@@ -248,6 +268,29 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
     public int checkcarandupdate(MeterWorkCarActualFirst model) throws MarkerMetException {
         try {
             ckeckcar(model);
+
+            UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getId();
+            String userName = payload.getUserName();
+            model.setUpdateTime(new Date());
+            model.setUpdateManNo(userId);
+            model.setUpdateManName(userName);
+
+            MeterWorkCarActualFirst modelTemp = meterWorkCarActualFirstMapper.selectByPrimaryKey(model.getActualFirstNo());
+
+            MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+            logModel.setId(PublicMethod.IdCreate(2));
+            logModel.setCreateManNo(userId);
+            logModel.setCreateManName(userName);
+            logModel.setCreateTime(new Date());
+            logModel.setOperationPage("web端-汽车衡一次数据维护");
+            logModel.setOperationFunction("车号修改");
+            logModel.setOperationId(model.getActualFirstNo());
+            logModel.setOperationPredictionNo(model.getPredictionNo());
+            logModel.setOperationCarnNo(model.getCarNo());
+            logModel.setOperationBeforeFix(modelTemp.getCarNo());
+            logModel.setOperationAfterFix(model.getCarNo());
+            meterBaseOperationLogMapper.insertSelective(logModel);
             int num = meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
             return num;
         } catch (MarkerMetException e) {
@@ -311,6 +354,16 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             if (models.size() <= 0 || models == null) {
                 throw new MarkerMetException(500, "参数为空!!");
             }
+            String userId = "";
+            String userName = "";
+            try{
+                UserPayload userPayload = UserPayload.getCurrUser();
+                userId = userPayload.getUserCode();
+                userName = userPayload.getUserName();
+            }catch (Exception e) {
+                userId = "system";
+                userName = "system";
+            }
             for (MeterWorkCarActualFirst model : models) {
                 if (model.getValueFlag().equals(DbConstants.NET)) {
                     throw new MarkerMetException(500, "已结净的数据不可再废除!!");
@@ -319,6 +372,18 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 model.setValueFlag(DbConstants.INVALID);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
                 num++;
+
+                MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                logModel.setId(PublicMethod.IdCreate(2));
+                logModel.setCreateManNo(userId);
+                logModel.setCreateManName(userName);
+                logModel.setCreateTime(new Date());
+                logModel.setOperationPage("web端-汽车衡一次数据维护");
+                logModel.setOperationFunction("作废");
+                logModel.setOperationId(model.getActualFirstNo());
+                logModel.setOperationPredictionNo(model.getPredictionNo());
+                logModel.setOperationCarnNo(model.getCarNo());
+                meterBaseOperationLogMapper.insertSelective(logModel);
             }
             for (MeterWorkCarActualFirst model : models) {
                 if (StringUtils.isNotEmpty(model.getPredictionNo())
@@ -429,6 +494,16 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             if (models.size() <= 0 || models == null) {
                 throw new MarkerMetException(500, "请选择需要启用的数据!!");
             }
+            String userId = "";
+            String userName = "";
+            try{
+                UserPayload userPayload = UserPayload.getCurrUser();
+                userId = userPayload.getUserCode();
+                userName = userPayload.getUserName();
+            }catch (Exception e) {
+                userId = "system";
+                userName = "system";
+            }
             for (MeterWorkCarActualFirst model : models) {
                 if (model.getValueFlag().equals(DbConstants.NET)) {
                     throw new MarkerMetException(500, "计量数据已经结净,无法启用");
@@ -436,6 +511,18 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 model.setValueFlag(DbConstants.VALID);
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
 
+                MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                logModel.setId(PublicMethod.IdCreate(2));
+                logModel.setCreateManNo(userId);
+                logModel.setCreateManName(userName);
+                logModel.setCreateTime(new Date());
+                logModel.setOperationPage("web端-汽车衡一次数据维护");
+                logModel.setOperationFunction("启用");
+                logModel.setOperationId(model.getActualFirstNo());
+                logModel.setOperationPredictionNo(model.getPredictionNo());
+                logModel.setOperationCarnNo(model.getCarNo());
+                meterBaseOperationLogMapper.insertSelective(logModel);
+
                 if (StringUtils.isNotEmpty(model.getPredictionNo())
                         && model.getPredictionNo().length() > 10) {
                     PreTrackScale ps = new PreTrackScale();
@@ -515,6 +602,17 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
     @Transactional(rollbackFor = Exception.class)
     public int remove(List<MeterWorkCarActualFirst> models) throws MarkerMetException {
         try {
+            String userId = "";
+            String userName = "";
+            try{
+                UserPayload userPayload = UserPayload.getCurrUser();
+                userId = userPayload.getUserCode();
+                userName = userPayload.getUserName();
+            }catch (Exception e) {
+                userId = "system";
+                userName = "system";
+            }
+
             int num = 0;
             if (models.size() <= 0 || models == null) {
                 throw new MarkerMetException(500, "参数为空!!");
@@ -554,8 +652,8 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                     throw new MarkerMetException(500, "数据对应的委托不存在!!");
                 }
                 pls.setUpdateTime(new Date());
-                pls.setUpdateManNo("system");
-                pls.setUpdateManName("一次计量数据解除操作");
+                pls.setUpdateManNo(userId);
+                pls.setUpdateManName(userName);
                 pls.setValueFlag(DbConstants.VALID);
                 pls.setUploadFlag("1");
                 preTrackScaleMapper.updateByPrimaryKeySelective(pls);
@@ -567,6 +665,19 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                     meterWorkPreLinkMapper.updateByPrimaryKey(mwpl);
                 }
 
+                //操作日志
+                MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                logModel.setId(PublicMethod.IdCreate(2));
+                logModel.setCreateManNo(userId);
+                logModel.setCreateManName(userName);
+                logModel.setCreateTime(new Date());
+                logModel.setOperationPage("web端-汽车衡一次数据维护");
+                logModel.setOperationFunction("汽车衡撤销委托");
+                logModel.setOperationId(model.getActualFirstNo());
+                logModel.setOperationPredictionNo(model.getPredictionNo());
+                logModel.setOperationCarnNo(model.getCarNo());
+                logModel.setOperationBeforeFix(model.toString());
+
                 MeterWorkCarActualFirst mwcaf = meterWorkCarActualFirstMapper.selectAndRemove(model.getActualFirstNo());
 
                 String actualFirstNo = mwcaf.getActualFirstNo();
@@ -593,8 +704,15 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
 
                 // 将一次计量数据设置为未匹配状态
                 //mwcaf.setValueFlag("2");
+                mwcaf.setUpdateManNo(userId);
+                mwcaf.setUpdateManName(userName);
+                mwcaf.setUpdateTime(new Date());
+                mwcaf.setNote("一次数据撤销委托");
                 mwcaf.setIsPreScale("0");
                 meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf);
+
+                logModel.setOperationAfterFix(mwcaf.toString());
+                meterBaseOperationLogMapper.insertSelective(logModel);
                 num++;
             }
             return num;
@@ -627,10 +745,29 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             Assert.isTrue(pts != null, "委托编号:" + predictionNo + "未查询到有效委托信息");
             MeterWorkCarActualFirst model = meterWorkCarActualFirstMapper.selectByPrimaryKey(actualFirstNo);
             Assert.isTrue(model != null, "一次数据不存在");
-            Assert.isTrue(model.getPredictionNo() == null && StringUtils.isEmpty(model.getPredictionNo()), "一次数据已匹配,不允许计量");
+            Assert.isTrue(!model.getValueFlag().equals("2"), "一次数据已结净,不允许匹配委托,请在洁净数据维护中进行洁净匹配委托");
+            Assert.isTrue(model.getPredictionNo() == null && StringUtils.isEmpty(model.getPredictionNo()), "一次数据已匹配,不允许匹配委托");
+
+            //操作日志
+            MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+            logModel.setId(PublicMethod.IdCreate(2));
+            logModel.setCreateManNo(userId);
+            logModel.setCreateManName(userName);
+            logModel.setCreateTime(new Date());
+            logModel.setOperationPage("web端-汽车衡一次数据维护");
+            logModel.setOperationFunction("汽车衡匹配委托");
+            logModel.setOperationId(model.getActualFirstNo());
+            logModel.setOperationPredictionNo(model.getPredictionNo());
+            logModel.setOperationCarnNo(model.getCarNo());
+            logModel.setOperationBeforeFix(model.toString());
+
+            //匹配委托操作
             MeterWorkCarActualFirst modelTemp = meterWorkCarActualFirstMapper.selectAndMatch(actualFirstNo, pts.getPredictionNo());
             BeanUtils.copyProperties(modelTemp, model);
             model.setIsPreScale("1");
+            model.setUpdateManNo(userId);
+            model.setUpdateManName(userName);
+            model.setUpdateTime(new Date());
             model.setNote("一次数据匹配委托");
             model.setPredictionNo(pts.getPredictionNo());
             meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
@@ -642,7 +779,10 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             pts.setUploadFlag("1");
             pts.setMeasureStation(model.getBaseSpotNo());
             pts.setMeasureStationName(model.getBaseSpotName());
-            preTrackScaleMapper.updateByPrimaryKey(pts);
+            preTrackScaleMapper.updateByPrimaryKeySelective(pts);
+
+            logModel.setOperationAfterFix(model.toString());
+            meterBaseOperationLogMapper.insertSelective(logModel);
 
             rm.setSucceed();
             rm.setCode("200");
@@ -4135,7 +4275,49 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 rm.setMessage("请根据一次数据从大到小的规则,依次选择两条一次数据!!");
                 return rm;
             }
-            //判断双委托 物料相同、A委托的收货单位是B委托的发货单位 或者 B委托的收货单位是A委托的发货单位
+//            HashMap<String, Object> carMap = new HashMap();
+//            carMap.put("carNo", mwcaf01.getCarNo());
+//            carMap.put("valueFlag", "1");
+//            List<MeterBaseCar> carList = meterBaseCarMapper.selectByParameters(carMap);
+//            //判断车辆是否是内倒车辆
+//            if(carList.size() >= 1 && carList.get(0).getCarTypeNo().equals("001004003")) {
+//                HashMap<String, Object> innerCarMap = new HashMap<>();
+//                innerCarMap.put("pBaseCode", "001047");
+//                innerCarMap.put("validFlag", "1");
+//                innerCarMap.put("baseName", mwcaf01.getCarNo());
+//                List<ComBaseInfo> innerCarList = comBaseInfoMapper.selectByParameters(innerCarMap);
+//                //判断配置表里是否配置了车辆为内部双委托车辆
+//                if(innerCarList.size() >= 1) {
+//                    //内部车辆需要查询一下物料映射
+//                    HashMap<String, Object> matterMap = new HashMap<>();
+//                    matterMap.put("maaterNo1", pts01.getMatterNo());
+//                    matterMap.put("maaterNo2", pts02.getMatterNo());
+//                    List<MeterBaseMatterMap> matterMapList = meterBaseMatterMapMapper.selectByParameters(matterMap);
+//                    if(matterMapList.size() >= 1) {
+//                        if(pts01.getReceivingUintNo().equals(pts02.getForwardingUnitNo()) ||
+//                                pts01.getForwardingUnitNo().equals(pts02.getReceivingUintNo())) {
+//                            rm.setMessage("内部车--委托信息不符合双委托规则,请确认!!");
+//                            return rm;
+//                        }
+//                    }else {
+//                        rm.setMessage("内部车--委托信息的物料不存在映射关系,请确认!!");
+//                        return rm;
+//                    }
+//                }else{
+//                    rm.setMessage(mwcaf01.getCarNo() + "不是内倒双委托车辆,请确认!!");
+//                    return rm;
+//                }
+//            }else {
+//                //外部车辆需要严格控制
+//                //判断双委托 物料相同、A委托的收货单位是B委托的发货单位 或者 B委托的收货单位是A委托的发货单位
+//                if(!(pts01.getMatterNo().equals(pts02.getMatterNo()) &&
+//                        (pts01.getReceivingUintNo().equals(pts02.getForwardingUnitNo()) ||
+//                                pts01.getForwardingUnitNo().equals(pts02.getReceivingUintNo())))) {
+//                    rm.setMessage("外部车--委托信息不符合双委托规则,请确认!!");
+//                    return rm;
+//                }
+//            }
+
             if(!(pts01.getMatterNo().equals(pts02.getMatterNo()) &&
                     (pts01.getReceivingUintNo().equals(pts02.getForwardingUnitNo()) ||
                             pts01.getForwardingUnitNo().equals(pts02.getReceivingUintNo())))) {
@@ -4170,7 +4352,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                 return rm;
             }
 
-
             //将委托中的编号和收发货的等数据拷贝进一次数据中
             MeterWorkCarActualFirst first1 = meterWorkCarActualFirstMapper.selectAndMatch(actualNo1, predictionNo1);
             BeanUtils.copyProperties(first1,mwcaf01);
@@ -5418,6 +5599,20 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                     scale.setMeasureStationName(actualRow.getNetSpot3Name());
                     preTrackScaleMapper.updateByPrimaryKeySelective(scale);
 
+                    MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                    logModel.setId(PublicMethod.IdCreate(2));
+                    logModel.setCreateManNo(userId);
+                    logModel.setCreateManName(userName);
+                    logModel.setCreateTime(new Date());
+                    logModel.setOperationPage("web端-一次数据维护");
+                    logModel.setOperationFunction("期限皮洁净");
+                    logModel.setOperationId(grossModel.getActualFirstNo());
+                    logModel.setOperationPredictionNo(grossModel.getPredictionNo());
+                    logModel.setOperationCarnNo(grossModel.getCarNo());
+                    logModel.setOperationBeforeFix("一次数据:" + grossModel.toString());
+                    logModel.setOperationAfterFix("洁净数据:" + actualRow.toString());
+                    meterBaseOperationLogMapper.insertSelective(logModel);
+
                     rm.setSucceed();
                     rm.setData(actualRow);
                     rm.setMessage("有委托期限皮结净成功");
@@ -5482,6 +5677,20 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
                     }
                     meterWorkCarActualMapper.insertSelective(actualRow);
 
+                    MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+                    logModel.setId(PublicMethod.IdCreate(2));
+                    logModel.setCreateManNo(userId);
+                    logModel.setCreateManName(userName);
+                    logModel.setCreateTime(new Date());
+                    logModel.setOperationPage("web端-一次数据维护");
+                    logModel.setOperationFunction("期限皮洁净");
+                    logModel.setOperationId(grossModel.getActualFirstNo());
+                    logModel.setOperationPredictionNo(grossModel.getPredictionNo());
+                    logModel.setOperationCarnNo(grossModel.getCarNo());
+                    logModel.setOperationBeforeFix("一次数据:" + grossModel.toString());
+                    logModel.setOperationAfterFix("洁净数据:" + actualRow.toString());
+                    meterBaseOperationLogMapper.insertSelective(logModel);
+
                     rm.setSucceed();
                     rm.setData(actualRow);
                     rm.setMessage("无委托期限皮结净成功");

+ 4 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirstbak/service/impl/MeterWorkCarActualFirstBakServiceImpl.java

@@ -642,6 +642,9 @@ public class MeterWorkCarActualFirstBakServiceImpl extends BaseServiceImpl<Meter
             MeterWorkCarActualFirstBak modelTemp = meterWorkCarActualFirstBakMapper.selectAndMatch(actualFirstNo, pts.getPredictionNo());
             BeanUtils.copyProperties(modelTemp, model);
             model.setIsPreScale("1");
+            model.setUpdateManNo("system");
+            model.setUpdateManName("system");
+            model.setUpdateTime(new Date());
             model.setNote("一次数据匹配委托");
             model.setPredictionNo(pts.getPredictionNo());
             meterWorkCarActualFirstBakMapper.updateByPrimaryKeySelective(model);
@@ -661,6 +664,7 @@ public class MeterWorkCarActualFirstBakServiceImpl extends BaseServiceImpl<Meter
             rm.setData(model);
         }catch (Exception e) {
             e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             rm.setMessage("操作异常:>>>" + e.getMessage());
         }
         return rm;

+ 51 - 1
src/main/java/com/steerinfo/meterwork/meterworkoldandnew/controller/MeterWorkOldAndNew.java

@@ -477,7 +477,57 @@ public class MeterWorkOldAndNew extends BaseRESTfulController {
             List<HashMap> totalList = Stream.of(newList, oldList)
                     .flatMap(x -> x.stream())
                     .collect(Collectors.toList());
-            //PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), 200);
+            PageList pageInfo = this.helpPage(params, totalList);
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+            rm.setData(pageInfo);
+        }catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常:>>>" + e.getMessage());
+        }
+        return rm;
+    }
+
+    /*
+     * 轨道衡新老系统查询接口
+     */
+    @ApiOperation(value="查询轨道衡结净老系统和新系统", notes="返回List<HashMap>对象")
+    @PostMapping(value = "/railwayHook/doQueryOldAndNew2")
+    public RESTfulResult doQueryRailwayHookOldAndNew2(@RequestBody HashMap params) {
+        RESTfulResult rm = success();
+        try {
+            // 新系统结净数据
+            List<HashMap> newList = meterWorkOldAndNewService.getRailwayHookNew(params);
+            // 老系统结净数据
+            List<HashMap> oldList = meterWorkOldAndNewService.getRailwayHookOld(params);
+            // 新老系统数据联合查询
+            List<HashMap> totalList = Stream.of(newList, oldList)
+                    .flatMap(x -> x.stream())
+                    .collect(Collectors.toList());
+            PageList pageInfo = this.helpPage(params, totalList);
+            rm.setCode("200");
+            rm.setMessage("操作成功!!");
+            rm.setData(pageInfo);
+        }catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常:>>>" + e.getMessage());
+        }
+        return rm;
+    }
+
+    @ApiOperation(value="统计结净老系统和新系统", notes="返回List<HashMap>对象")
+    @PostMapping(value = "/railwayHook/countOldAndNew2")
+    public RESTfulResult countRailwayHookOldAndNew2(@RequestBody HashMap params) {
+        RESTfulResult rm = success();
+        try {
+            // 新系统结净数据
+            List<HashMap> newList = meterWorkOldAndNewService.countRailwayHookNew(params);
+            // 老系统结净数据
+            List<HashMap> oldList = meterWorkOldAndNewService.countRailwayHookOld(params);
+            // 新老系统数据联合查询
+            List<HashMap> totalList = Stream.of(newList, oldList)
+                    .flatMap(x -> x.stream())
+                    .collect(Collectors.toList());
             PageList pageInfo = this.helpPage(params, totalList);
             rm.setCode("200");
             rm.setMessage("操作成功!!");

+ 4 - 16
src/main/java/com/steerinfo/meterwork/meterworkoldandnew/mapper/MeterWorkOldAndNewMapper.java

@@ -15,46 +15,34 @@ public interface MeterWorkOldAndNewMapper {
 
     // 汽车衡联合查询
     List<HashMap> doQueryFirstNew(Map<String, Object> params);
-
     List<HashMap> doQueryFirstOld(Map<String, Object> params);
-
     List<HashMap> doQueryNew(Map<String, Object> params);
-
     List<HashMap> doQueryOld(Map<String, Object> params);
-
     List<HashMap> countNew(Map<String, Object> params);
-
     List<HashMap> countOld(Map<String, Object> params);
 
     // 静态轨道衡联合查询
     List<HashMap> doQueryRailwayNew(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayOld(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayFirstNew(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayFirstOld(Map<String, Object> params);
-
     List<HashMap> countRailwayNew(Map<String, Object> params);
-
     List<HashMap> countRailwayOld(Map<String, Object> params);
 
     // 动态轨道衡联合查询
     List<HashMap> doQueryRailwayDynamicNew(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayDynamicOld(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayDynamicFirstNew(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayDynamicFirstOld(Map<String, Object> params);
-
     List<HashMap> countRailwayDynamicNew(Map<String, Object> params);
-
     List<HashMap> countRailwayDynamicOld(Map<String, Object> params);
 
 
     //静态贴水衡、吊钩秤
     List<HashMap> doQueryRailwayHookFirstNew(Map<String, Object> params);
-
     List<HashMap> doQueryRailwayHookFirstOld(Map<String, Object> params);
+    List<HashMap> doQueryRailwayHookNew(Map<String, Object> params);
+    List<HashMap> doQueryRailwayHookOld(Map<String, Object> params);
+    List<HashMap> countRailwayHookNew(Map<String, Object> params);
+    List<HashMap> countRailwayHookOld(Map<String, Object> params);
 }

+ 278 - 11
src/main/java/com/steerinfo/meterwork/meterworkoldandnew/mapper/MeterWorkOldAndNewMapper.xml

@@ -1261,14 +1261,15 @@ where FS_ISVALID = '1' and FS_DELETEDTAG = 'N' and (FS_BALANCETYPE='静态' or F
         <if test="maxWgt != null and maxWgt != ''">
             and meter_weight/1000 &lt;= '${maxWgt}'
         </if>
+        order by create_time desc
     </select>
 
     <select id="doQueryRailwayHookFirstOld" parameterType="java.util.HashMap" resultType="HashMap">
         select FS_WEIGHTNO actual_first_no,
-        FS_noticeNO prediction_no,
-        FS_TRAINNO RAILWAY_NO,
-        FN_weight*1000 meter_weight,
-        FD_weightTime create_time,
+        FS_noticeId prediction_no,
+        FS_CARNO RAILWAY_NO,
+        FS_weight*1000 meter_weight,
+        FS_weightTime create_time,
         fs_pointId base_spot_no,
         FS_pointName base_spot_name,
         FS_sender forwarding_unit_no,
@@ -1279,22 +1280,22 @@ where FS_ISVALID = '1' and FS_DELETEDTAG = 'N' and (FS_BALANCETYPE='静态' or F
         FS_materialName matter_name,
         FS_SENDERREMARK sender_remark,
         '老系统' remark
-        from jgweight.VIEW_TRAIN_FIRST
-        where FS_DELETEDTAG='N' and FS_BALANCETYPE='静态'
+        from jgweight.VIEW_HOOK_FIRST
+        where    FS_DELETEDTAG = 'N'
         <if test="remark != null and remark != ''">
             and '老系统' LIKE '%${remark}%'
         </if>
         <if test="predictionNo != null and predictionNo != ''">
-            and FS_noticeNO LIKE '%${predictionNo}%'
+            and FS_noticeId LIKE '%${predictionNo}%'
         </if>
         <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
-            and FD_weightTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and FD_weightTime  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+            and FS_weightTime >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and FS_weightTime  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
         </if>
         <if test="senderRemark != null and senderRemark != ''">
             and FS_SENDERREMARK LIKE '%${senderRemark}%'
         </if>
         <if test="railwayNo != null and railwayNo != ''">
-            and FS_TRAINNO like '%${railwayNo}%'
+            and FS_CARNO like '%${railwayNo}%'
         </if>
         <if test="baseSpotNo != null and baseSpotNo != ''">
             and fs_pointId like '%${baseSpotNo}%'
@@ -1321,10 +1322,276 @@ where FS_ISVALID = '1' and FS_DELETEDTAG = 'N' and (FS_BALANCETYPE='静态' or F
             and FS_materialName LIKE '%${matterName}%'
         </if>
         <if test="minWgt != null and minWgt != ''">
-            and FN_weight >= '${minWgt}'
+            and FS_weight >= '${minWgt}'
         </if>
         <if test="maxWgt != null and maxWgt != ''">
-            and FN_weight &lt;= '${maxWgt}'
+            and FS_weight &lt;= '${maxWgt}'
+        </if>
+        order by FS_weightTime desc
+    </select>
+
+    <select id="doQueryRailwayHookNew" parameterType="java.util.HashMap" resultType="HashMap">
+        select RAILWAY_NO,
+        PREDICTION_NO,
+        GROSS_WEIGHT,
+        TARE_WEIGHT,
+        NET_WEIGHT,
+        NET_TIME,
+        GROSS_TIME,
+        TARE_TIME,
+        BASE_SPOT1_NAME,
+        BASE_SPOT2_NAME,
+        NET_SPOT3_NAME,
+        RAILWAY_TYPE_NAME,
+        VALUE_FLAG,
+        FORWARDING_UNIT_NAME,
+        SENDER_REMARK,
+        RECEIVING_UINT_NAME,
+        RECEIVER_REMARK,
+        MATTER_NO,
+        MATTER_NAME,
+        '新系统' as remark
+        from METER_WORK_RAILWAY_ACTUAL
+        where VALUE_FLAG in ('2') and RAILWAY_TYPE_NO in ('001019003', '001019005')
+        <if test="remark != null and remark != ''">
+            and '新系统' LIKE '%${remark}%'
+        </if>
+        <if test="predictionNo != null and predictionNo != ''">
+            and PREDICTION_NO LIKE '%${predictionNo}%'
+        </if>
+        <if test="minWeight != null and minWeight != ''">
+            and NET_WEIGHT &gt; '%${minWeight}%'
+        </if>
+        <if test="maxWeight != null and maxWeight != ''">
+            and NET_WEIGHT &lt; '%${maxWeight}%'
+        </if>
+        <if test="netSpot3No != null and netSpot3No != ''">
+            and BASE_SPOT1_NO like '%${netSpot3No}%'
+        </if>
+        <if test="netSpot3Name != null and netSpot3Name != ''">
+            and BASE_SPOT1_NAME like '%${netSpot3Name}%'
+        </if>
+        <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+            and NET_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and NET_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+        </if>
+        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+            and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+        </if>
+        <if test="forwardingUnitName != null and forwardingUnitName != ''">
+            and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+        </if>
+        <if test="receivingUintNo != null and receivingUintNo != ''">
+            and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+        </if>
+        <if test="receivingUintName != null and receivingUintName != ''">
+            and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+        </if>
+        <if test="railwayNo != null and railwayNo != ''">
+            and RAILWAY_NO like '%${railwayNo}%'
+        </if>
+        <if test="matterNo != null and matterNo != ''">
+            and MATTER_NO LIKE '%${matterNo}%'
+        </if>
+        <if test="matterName != null and matterName != ''">
+            and materialName LIKE '%${matterName}%'
+        </if>
+        <if test="senderRemark != null and senderRemark != ''">
+            and RECEIVER_REMARK LIKE '%${senderRemark}%'
+        </if>
+        <if test="minWgt != null and minWgt != ''">
+            and NET_WEIGHT/1000 >= '${minWgt}'
+        </if>
+        <if test="maxWgt != null and maxWgt != ''">
+            and NET_WEIGHT/1000 &lt;= '${maxWgt}'
+        </if>
+        order by NET_TIME desc
+    </select>
+
+    <select id="doQueryRailwayHookOld" parameterType="java.util.HashMap" resultType="HashMap">
+        select FS_CARNO RAILWAY_NO,
+        FS_NOTICEID PREDICTION_NO,
+        FS_GROSSWEIGHT*1000 GROSS_WEIGHT,
+        FS_TAREWEIGHT*1000 TARE_WEIGHT,
+        FS_NETWEIGHT*1000 NET_WEIGHT,
+        FS_NETWEIGHTTIME NET_TIME,
+        FS_GROSSWEIGHTTIME GROSS_TIME,
+        FS_TAREWEIGHTTIME TARE_TIME,
+        FS_GROSSPOINTNAME BASE_SPOT1_NAME,
+        FS_TAREPOINTNAME BASE_SPOT2_NAME,
+        FS_NETPOINTNAME NET_SPOT3_NAME,
+        FS_BALANCETYPE RAILWAY_TYPE_NAME,
+        FS_ISVALID VALUE_FLAG,
+        FS_SENDERNAME FORWARDING_UNIT_NAME,
+        FS_SENDERREMARK SENDER_REMARK,
+        FS_RECEIVERNAME RECEIVING_UINT_NAME,
+        FS_RECEIVERREMARK RECEIVER_REMARK,
+        FS_MATERIAL MATTER_NO,
+        FS_MATERIALNAME MATTER_NAME,
+        '老系统' as remark
+        from JGWEIGHT.VIEW_HOOK_NET
+        where FS_ISVALID = '0' and FS_DELETEDTAG = 'N'
+        <if test="remark != null and remark != ''">
+            and '老系统' LIKE '%${remark}%'
+        </if>
+        <if test="predictionNo != null and predictionNo != ''">
+            and FS_NOTICEID LIKE '%${predictionNo}%'
+        </if>
+        <if test="netSpot3No != null and netSpot3No != ''">
+            and fs_netPointId like '%${netSpot3No}%'
+        </if>
+        <if test="netSpot3Name != null and netSpot3Name != ''">
+            and FS_NETPOINTNAME like '%${netSpot3Name}%'
+        </if>
+        <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+            and FS_NETWEIGHTTIME >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and FS_NETWEIGHTTIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+        </if>
+        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+            and FS_SENDER LIKE '%${forwardingUnitNo}%'
+        </if>
+        <if test="forwardingUnitName != null and forwardingUnitName != ''">
+            and FS_SENDERNAME LIKE '%${forwardingUnitName}%'
+        </if>
+        <if test="receivingUintNo != null and receivingUintNo != ''">
+            and fs_receiver LIKE '%${receivingUintNo}%'
+        </if>
+        <if test="receivingUintName != null and receivingUintName != ''">
+            and FS_RECEIVERNAME LIKE '%${receivingUintName}%'
+        </if>
+        <if test="railwayNo != null and railwayNo != ''">
+            and FS_CARNO like '%${railwayNo}%'
+        </if>
+        <if test="matterNo != null and matterNo != ''">
+            and fs_material LIKE '%${matterNo}%'
+        </if>
+        <if test="matterName != null and matterName != ''">
+            and FS_MATERIALNAME LIKE '%${matterName}%'
+        </if>
+        <if test="senderRemark != null and senderRemark != ''">
+            and fs_senderRemark LIKE '%${senderRemark}%'
+        </if>
+        <if test="minWgt != null and minWgt != ''">
+            and FS_NETWEIGHT >= '${minWgt}'
+        </if>
+        <if test="maxWgt != null and maxWgt != ''">
+            and FS_NETWEIGHT &lt;= '${maxWgt}'
+        </if>
+        order by FS_NETWEIGHTTIME desc
+    </select>
+
+    <select id="countRailwayHookNew" parameterType="java.util.HashMap" resultType="HashMap">
+        select * from
+        (
+        select matter_no,
+        matter_name,
+        count(1) countSum,
+        sum(net_weight) net_weight,
+        sum(gross_weight) gross_weight,
+        sum(tare_weight) tare_weight,
+        forwarding_unit_no,
+        forwarding_unit_name,
+        receiving_uint_no,
+        receiving_uint_name,
+        '新系统' remark
+        from METER_WORK_RAILWAY_ACTUAL
+        where 1= 1
+        and VALUE_FLAG in ('2') and RAILWAY_TYPE_NO in ('001019003', '001019005')
+        <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+            and net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+        </if>
+        <if test="netSpot3No != null and netSpot3No != ''">
+            and net_spot3_no like '%${netSpot3No}%'
+        </if>
+        <if test="netSpot3Name != null and netSpot3Name != ''">
+            and net_spot3_name like '%${netSpot3Name}%'
+        </if>
+        <if test="senderRemark != null and senderRemark != ''">
+            and sender_remark LIKE '%${senderRemark}%'
+        </if>
+        <if test="railwayNo != null and railwayNo != ''">
+            and RAILWAY_NO like '%${railwayNo}%'
+        </if>
+        group by matter_no, matter_name, forwarding_unit_no, forwarding_unit_name, receiving_uint_no, receiving_uint_name
+        )
+        where 1=1
+        <if test="remark != null and remark != ''">
+            and remark LIKE '%${remark}%'
+        </if>
+        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+            and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+        </if>
+        <if test="forwardingUnitName != null and forwardingUnitName != ''">
+            and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+        </if>
+        <if test="receivingUintNo != null and receivingUintNo != ''">
+            and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+        </if>
+        <if test="receivingUintName != null and receivingUintName != ''">
+            and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+        </if>
+        <if test="matterNo != null and matterNo != ''">
+            and matter_no LIKE '%${matterNo}%'
+        </if>
+        <if test="matterName != null and matterName != ''">
+            and matter_name LIKE '%${matterName}%'
+        </if>
+    </select>
+
+    <select id="countRailwayHookOld" parameterType="java.util.HashMap" resultType="HashMap">
+        select * from
+        (
+        select fs_material matter_no,
+        fs_materialName matter_name,
+        count(1) countSum,
+        sum(fs_netWeight*1000) net_weight,
+        sum(fs_grossWeight*1000) gross_weight,
+        sum(fs_tareWeight*1000) tare_weight,
+        fs_sender forwarding_unit_no,
+        fs_senderName forwarding_unit_name,
+        fs_receiver receiving_uint_no,
+        fs_receiverName receiving_uint_name,
+        '老系统' remark
+        from JGWEIGHT.VIEW_HOOk_NET
+        where 1 = 1
+        and FS_CARNO is not null
+        and FS_DELETEDTAG='N'
+        <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+            and FS_NETWEIGHTTIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and FS_NETWEIGHTTIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+        </if>
+        <if test="netSpot3No != null and netSpot3No != ''">
+            and fs_netPointId like '%${netSpot3No}%'
+        </if>
+        <if test="netSpot3Name != null and netSpot3Name != ''">
+            and fs_netPointName like '%${netSpot3Name}%'
+        </if>
+        <if test="senderRemark != null and senderRemark != ''">
+            and fs_senderRemark LIKE '%${senderRemark}%'
+        </if>
+        <if test="railwayNo != null and railwayNo != ''">
+            and FS_CARNO LIKE '%${railwayNo}%'
+        </if>
+        group by fs_material, fs_materialName, fs_sender , fs_senderName , fs_receiver , fs_receiverName
+        )
+        where 1=1
+        <if test="remark != null and remark != ''">
+            and remark LIKE '%${remark}%'
+        </if>
+        <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+            and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+        </if>
+        <if test="forwardingUnitName != null and forwardingUnitName != ''">
+            and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+        </if>
+        <if test="receivingUintNo != null and receivingUintNo != ''">
+            and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+        </if>
+        <if test="receivingUintName != null and receivingUintName != ''">
+            and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+        </if>
+        <if test="matterNo != null and matterNo != ''">
+            and matter_no LIKE '%${matterNo}%'
+        </if>
+        <if test="matterName != null and matterName != ''">
+            and matter_name LIKE '%${matterName}%'
         </if>
     </select>
 </mapper>

+ 5 - 17
src/main/java/com/steerinfo/meterwork/meterworkoldandnew/service/IMeterWorkOldAndNewService.java

@@ -12,45 +12,33 @@ public interface IMeterWorkOldAndNewService {
 
     // 汽车衡联合查询Service
     List<HashMap> getNewFirst(HashMap params);
-
     List<HashMap> getOldFirst(HashMap params);
-
     List<HashMap> getNew(HashMap params);
-
     List<HashMap> getOld(HashMap params);
-
     List<HashMap> countNew(HashMap params);
-
     List<HashMap> countOld(HashMap params);
 
     // 静态轨道衡联合查询Service
     List<HashMap> getRailwayNew(HashMap params);
-
     List<HashMap> getRailwayOld(HashMap params);
-
     List<HashMap> getRailwayFirstNew(HashMap params);
-
     List<HashMap> getRailwayFirstOld(HashMap params);
-
     List<HashMap> countRailwayNew(HashMap params);
-
     List<HashMap> countRailwayOld(HashMap params);
 
     // 动态轨道衡联合查询Service
     List<HashMap> getRailwayDynamicNew(HashMap params);
-
     List<HashMap> getRailwayDynamicOld(HashMap params);
-
     List<HashMap> getRailwayDynamicFirstNew(HashMap params);
-
     List<HashMap> getRailwayDynamicFirstOld(HashMap params);
-
     List<HashMap> countRailwayDynamicNew(HashMap params);
-
     List<HashMap> countRailwayDynamicOld(HashMap params);
 
-
+    // 铁水、吊钩秤轨道衡联合查询Service
     List<HashMap> getRailwayHookFirstNew(HashMap params);
-
     List<HashMap> getRailwayHookFirstOld(HashMap params);
+    List<HashMap> getRailwayHookNew(HashMap params);
+    List<HashMap> getRailwayHookOld(HashMap params);
+    List<HashMap> countRailwayHookNew(HashMap params);
+    List<HashMap> countRailwayHookOld(HashMap params);
 }

+ 20 - 1
src/main/java/com/steerinfo/meterwork/meterworkoldandnew/service/impl/MeterWorkOldAndNewService.java

@@ -123,10 +123,29 @@ public class MeterWorkOldAndNewService implements IMeterWorkOldAndNewService {
     public List<HashMap> getRailwayHookFirstNew(HashMap params) {
         return meterWorkOldAndNewMapper.doQueryRailwayHookFirstNew(params);
     }
-
     @Override
     @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
     public List<HashMap> getRailwayHookFirstOld(HashMap params) {
         return meterWorkOldAndNewMapper.doQueryRailwayHookFirstOld(params);
     }
+
+    @Override
+    public List<HashMap> getRailwayHookNew(HashMap params) {
+        return meterWorkOldAndNewMapper.doQueryRailwayHookNew(params);
+    }
+    @Override
+    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
+    public List<HashMap> getRailwayHookOld(HashMap params) {
+        return meterWorkOldAndNewMapper.doQueryRailwayHookOld(params);
+    }
+
+    @Override
+    public List<HashMap> countRailwayHookNew(HashMap params) {
+        return meterWorkOldAndNewMapper.countRailwayHookNew(params);
+    }
+    @Override
+    @TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
+    public List<HashMap> countRailwayHookOld(HashMap params) {
+        return meterWorkOldAndNewMapper.countRailwayHookOld(params);
+    }
 }

+ 0 - 1
src/main/java/com/steerinfo/meterwork/meterworkprewgttype/service/impl/MeterWorkPreWgttypeServiceImpl.java

@@ -175,7 +175,6 @@ public class MeterWorkPreWgttypeServiceImpl extends BaseServiceImpl<MeterWorkPre
                 if(model.getWeightTypeName().equals("毛重")){
                     HashMap<String, Object> preTrackMap = new HashMap<>();
                     preTrackMap.put("carNo", carNo);
-                    preTrackMap.put("valueFlag", "1");
                     preTrackMap.put("lineDesc", "1");
                     List<PreTrackScale> scales = preTrackScaleMapper.selectByParameters(preTrackMap);
                     if (scales.size() >= 1) {

+ 7 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -4267,8 +4267,10 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 
                 //将委托中的编号和收发货的等数据拷贝进一次数据中
                 MeterWorkRailwayActFirst first1 = meterWorkRailwayActFirstMapper.selectAndMatch(model01.getActualFirstNo(), scale.getPredictionNo());
+                first1.setRailwayNo(scale.getRailwayNo());
                 BeanUtils.copyProperties(first1, model01);
                 MeterWorkRailwayActFirst first2 = meterWorkRailwayActFirstMapper.selectAndMatch(model02.getActualFirstNo(), scale.getPredictionNo());
+                first2.setRailwayNo(scale.getRailwayNo());
                 BeanUtils.copyProperties(first2, model02);
 
                 //修改毛重一次数据状态
@@ -8527,6 +8529,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult saveAutoScale(CommonCombination<MeterWorkRailwayActFirst, MeterWorkRailwayActFirst, MeterWorkRailwayActual, MeterWorkRailwayScheduledHelp> com) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -8624,9 +8627,11 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             rm.setMessage("操作成功");
         }catch (MarkerMetException e) {
             e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             rm.setMessage("操作异常:>>>" + e.getMessage());
         }catch (Exception e) {
             e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             rm.setMessage("操作异常:>>>" + e.getMessage());
         }
         return rm;
@@ -8672,6 +8677,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doNetEmergency(MeterWorkRailwayActual model) throws Exception {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -8756,6 +8762,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
             rm.setData(actualModel.getActualNo());
         }catch (Exception e) {
             e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             rm.setMessage("操作异常:>>>" + e.getMessage());
         }
         return rm;