haungfuli 2 年之前
父節點
當前提交
75d46a8026
共有 21 個文件被更改,包括 133 次插入57 次删除
  1. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/AgentCargoOwnerInfoServiceImpl.java
  2. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CargoOwnerCompInfoServiceImpl.java
  3. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CargoOwnerInfoServiceImpl.java
  4. 4 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java
  5. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CompanyInfoServiceImpl.java
  6. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  7. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  8. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java
  9. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/EvaluateInfoServiceImpl.java
  10. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FeedbackReportServiceImpl.java
  11. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FleetInfoServiceImpl.java
  12. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FleetMemberInfoServiceImpl.java
  13. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FreightInfoServiceImpl.java
  14. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerCapitalInfoServiceImpl.java
  15. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerPayeeInfoServiceImpl.java
  16. 26 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyFreightSettlementInfoServiceImpl.java
  17. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyOrderTravelPathServiceImpl.java
  18. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyPublicConsultationServiceImpl.java
  19. 51 55
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java
  20. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PatformAnagementEgulationsServiceImpl.java
  21. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/AgentCargoOwnerInfoServiceImpl.java

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.service.ICargoOwnerCompInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.HashMap;
 import java.util.List;
@@ -61,6 +62,7 @@ public class AgentCargoOwnerInfoServiceImpl extends ServiceImpl<AgentCargoOwnerI
      * 更改代理货主状态
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editAgentCargoOwner(HyAgentCargoOwnerInfo hyAgentCargoOwnerInfo) {
         //查询代理货主信息
         HyAgentCargoOwnerInfo hyAgentCargoOwnerInfo1 = this.selectById(hyAgentCargoOwnerInfo.getId());

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CargoOwnerCompInfoServiceImpl.java

@@ -54,6 +54,7 @@ public class CargoOwnerCompInfoServiceImpl extends ServiceImpl<CargoOwnerCompInf
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addCargoOwnerComp(HyCargoOwnerCompInfo hyCargoOwnerCompInfo) {
         //新增主键id
         hyCargoOwnerCompInfo.setId(IdGenerator.generateUUID());
@@ -105,6 +106,7 @@ public class CargoOwnerCompInfoServiceImpl extends ServiceImpl<CargoOwnerCompInf
      * 编辑所属公司
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editCargoOwnerComp(HyCargoOwnerCompInfo hyCargoOwnerCompInfo) {
         //信息编辑
         hyCargoOwnerCompInfo.setStatus(StatusEnum.COMPANY_EXAMINEING.getName());

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CargoOwnerInfoServiceImpl.java

@@ -111,6 +111,7 @@ public class CargoOwnerInfoServiceImpl extends ServiceImpl<CargoOwnerInfoMapper,
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addCargoOwner(HyCargoOwnerInfo hyCargoOwnerInfo){
             //新增主键id
             hyCargoOwnerInfo.setId(IdGenerator.generateUUID());
@@ -142,6 +143,7 @@ public class CargoOwnerInfoServiceImpl extends ServiceImpl<CargoOwnerInfoMapper,
      * 编辑货主个人信息
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editCargoOwner(HyCargoOwnerInfo hyCargoOwnerInfo) {
         HyCargoOwnerInfo hyCargoOwnerInfo1 = this.selectById(hyCargoOwnerInfo.getId());
         if (hyCargoOwnerInfo1 != null){

+ 4 - 2
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java

@@ -103,6 +103,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String unLoadingAdd(HyCarrierInfo hyCarrierInfo) {
         //根据id查询承运信息
         HyCarrierInfo hyCarrierInfo1 = this.selectById(hyCarrierInfo.getId());
@@ -150,6 +151,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String cargoOwnerLoadingAdd(HyCarrierInfo hyCarrierInfo) {
         //查询订单
         OrderInfo orderInfo = orderInfoService.selectById(hyCarrierInfo.getOrderId());
@@ -193,7 +195,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
                                 //账户余额小于预付款
                                 throw new YException(YExceptionEnum.INSUFFICIENT_ACCOUNT_BALANCES);
                             }else {
-                                //冻结公司账户余额
+                                //冻结货主账户余额
                                 Double d = hyCargoOwnerInfo.getAccountBalance();
                                 Double d1 = hyCargoOwnerInfo.getFrozenAmount();
                                 hyCargoOwnerInfo.setAccountBalance(d-orderInfo.getAdvanceCharge());
@@ -278,7 +280,7 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
                                 //账户余额小于尾款+服务费
                                 throw new YException(YExceptionEnum.INSUFFICIENT_ACCOUNT_BALANCES);
                             }else {
-                                //冻结公司账户余额
+                                //冻结货主账户余额
                                 Double d = hyCargoOwnerInfo.getAccountBalance();
                                 Double d1 = hyCargoOwnerInfo.getFrozenAmount();
                                 hyCargoOwnerInfo.setAccountBalance(d-zong);

+ 1 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CompanyInfoServiceImpl.java

@@ -70,6 +70,7 @@ public class CompanyInfoServiceImpl extends ServiceImpl<CompanyInfoMapper, HyCom
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addCompanyInfo(HyCompanyInfo hyCompanyInfo){
         //新增主键id
         hyCompanyInfo.setId(IdGenerator.generateUUID());

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java

@@ -104,6 +104,7 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addInfo(HyDriverCarInfo hyDriverCarInfo) throws IOException {
         //新增主键id
         hyDriverCarInfo.setId(IdGenerator.generateUUID());
@@ -253,6 +254,7 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
      * @throws ParseException
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String batchSubmission (HyDriverCarInfo hyDriverCarInfo) throws IOException , ParseException {
         //获取token
         String token = EntityAnalyse.GetJTToken();

+ 1 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java

@@ -449,6 +449,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
      * @throws ParseException
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String batchSubmission (HyDriverInfo hyDriverInfo) throws IOException , ParseException {
         //上报
         //获取token

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java

@@ -53,6 +53,7 @@ public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addInfo(HyDriverPayeeInfo hyDriverPayeeInfo){
         //新增主键id
         hyDriverPayeeInfo.setId(IdGenerator.generateUUID());
@@ -76,6 +77,7 @@ public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMappe
      * 编辑银行卡信息
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editInfo(HyDriverPayeeInfo hyDriverPayeeInfo) {
         //信息编辑
         this.updateById(hyDriverPayeeInfo);

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/EvaluateInfoServiceImpl.java

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.activiti.engine.impl.util.CollectionUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.DecimalFormat;
 import java.util.HashMap;
@@ -46,6 +47,7 @@ public class EvaluateInfoServiceImpl extends ServiceImpl<EvaluateInfoMapper, Eva
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addEvaluateInfo(EvaluateInfo evaluateInfo){
         DecimalFormat df = new DecimalFormat("0.0");
         //新增主键id
@@ -158,6 +160,7 @@ public class EvaluateInfoServiceImpl extends ServiceImpl<EvaluateInfoMapper, Eva
      * @param evaluateInfo
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void deleteEvaluateInfo(EvaluateInfo evaluateInfo){
         EvaluateInfo evaluateInfo1 = this.selectById(evaluateInfo.getId());
         if (evaluateInfo1 != null){

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FeedbackReportServiceImpl.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.service.INewsInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -64,6 +65,7 @@ public class FeedbackReportServiceImpl extends ServiceImpl<FeedbackReportMapper,
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addInfo(FeedbackReport feedbackReport){
         //新增主键id
         feedbackReport.setId(IdGenerator.generateUUID());
@@ -145,6 +147,7 @@ public class FeedbackReportServiceImpl extends ServiceImpl<FeedbackReportMapper,
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editInfo(FeedbackReport feedbackReport){
         //消息评价投诉举报结果
         if ("1".equals(feedbackReport.getEditFlag())) {

+ 4 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FleetInfoServiceImpl.java

@@ -17,6 +17,7 @@ import com.yh.saas.plugin.yiliangyiyun.util.CheckTxtUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -44,6 +45,7 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper, FleetInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addFleetInfo(FleetInfo fleetInfo) {
         //查询用户创建的车队数量
         List<FleetInfo> fleetInfos = this.selectList(new EntityWrapper<FleetInfo>()
@@ -101,6 +103,7 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper, FleetInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editFleetInfo(FleetInfo fleetInfo) {
         //1发公告
         if ("1".equals(fleetInfo.getFlag())) {
@@ -252,6 +255,7 @@ public class FleetInfoServiceImpl extends ServiceImpl<FleetInfoMapper, FleetInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String examineFleetInfo(FleetInfo fleetInfo) {
         FleetInfo fleetInfo1 = this.selectById(fleetInfo.getId());
         if (fleetInfo1 != null){

+ 8 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FleetMemberInfoServiceImpl.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
@@ -83,6 +84,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addFleetMemberInfo(FleetMemberInfo fleetMemberInfo) {
         if ("1".equals(fleetMemberInfo.getJoinFlag())) {
             //查询此司机已加入的车队数量
@@ -173,6 +175,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editFleetMemberInfo(FleetMemberInfo fleetMemberInfo) {
         //查询车队成员信息
         FleetMemberInfo fleetMemberInfo1 = this.selectById(fleetMemberInfo.getId());
@@ -210,6 +213,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @param fleetMemberInfo
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void delete(FleetMemberInfo fleetMemberInfo) {
         //退出车队
         if ("1".equals(fleetMemberInfo.getOutFlag())) {
@@ -245,6 +249,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String transferLeader(FleetMemberInfo fleetMemberInfo) {
         //查询转移人信息
         FleetMemberInfo fleetMemberInfo1 = this.selectOne(new EntityWrapper<FleetMemberInfo>().eq("fleet_id", fleetMemberInfo.getFleetId())
@@ -270,6 +275,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String read(FleetMemberInfo fleetMemberInfo) {
         //入队申请
         if ("1".equals(fleetMemberInfo.getReadFlag())) {
@@ -314,6 +320,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public FleetMemberInfo redDot(FleetMemberInfo fleetMemberInfo) {
         FleetMemberInfo fleetMemberInfo2 = new FleetMemberInfo();
         //根据用户id查询标识
@@ -368,6 +375,7 @@ public class FleetMemberInfoServiceImpl extends ServiceImpl<FleetMemberInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String listDelete(FleetMemberInfo fleetMemberInfo) {
         //查询被删除人信息
         FleetMemberInfo fleetMemberInfo1 = this.selectById(fleetMemberInfo.getId());

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FreightInfoServiceImpl.java

@@ -11,6 +11,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -80,6 +81,7 @@ public class FreightInfoServiceImpl extends ServiceImpl<FreightInfoMapper, Freig
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String advance(FreightInfo freightInfo) throws ParseException {
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String Time = df.format(new Date());
@@ -115,6 +117,7 @@ public class FreightInfoServiceImpl extends ServiceImpl<FreightInfoMapper, Freig
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String balance(FreightInfo freightInfo) throws ParseException {
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String Time = df.format(new Date());

+ 4 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerCapitalInfoServiceImpl.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -74,6 +75,7 @@ public class HyCargoOwnerCapitalInfoServiceImpl extends ServiceImpl<HyCargoOwner
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String withdrawal(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
         //新增账单信息
         hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
@@ -121,6 +123,7 @@ public class HyCargoOwnerCapitalInfoServiceImpl extends ServiceImpl<HyCargoOwner
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String recharge(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
         //新增账单信息
         hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
@@ -204,6 +207,7 @@ public class HyCargoOwnerCapitalInfoServiceImpl extends ServiceImpl<HyCargoOwner
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String examineList(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
         List<HyCargoOwnerCapitalInfo> hyCargoOwnerCapitalInfoList = hyCargoOwnerCapitalInfo.getHyCargoOwnerCapitalInfos();
         if (CollectionUtils.isNotEmpty(hyCargoOwnerCapitalInfoList)){

+ 1 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerPayeeInfoServiceImpl.java

@@ -61,6 +61,7 @@ public class HyCargoOwnerPayeeInfoServiceImpl extends ServiceImpl<HyCargoOwnerPa
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addPayee(HyCargoOwnerPayeeInfo hyCargoOwnerPayeeInfo){
         //新增主键id
         hyCargoOwnerPayeeInfo.setId(IdGenerator.generateUUID());

+ 26 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyFreightSettlementInfoServiceImpl.java

@@ -15,6 +15,7 @@ import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
 import java.text.ParseException;
@@ -89,6 +90,7 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String deferredPayment(HyFreightSettlementInfo hyFreightSettlementInfo) {
         List<HyFreightSettlementInfo> hyFreightSettlementInfoList = hyFreightSettlementInfo.getHyFreightSettlementInfos();
         if (CollectionUtils.isNotEmpty(hyFreightSettlementInfoList)) {
@@ -111,6 +113,7 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String paymentList(HyFreightSettlementInfo hyFreightSettlementInfo) throws IOException, ParseException {
         List<HyFreightSettlementInfo> hyFreightSettlementInfoList = hyFreightSettlementInfo.getHyFreightSettlementInfos();
         if (CollectionUtils.isNotEmpty(hyFreightSettlementInfoList)) {
@@ -185,6 +188,16 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
                             EntityAnalyse.uploadWaybill(orderInfo1);
                             orderInfoService.updateById(orderInfo1);
                         }
+                        //司机承运次数+1,计算累计支付运费
+                        HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+                                .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
+                        if (hyDriverInfo != null) {
+                            Long count = hyDriverInfo.getShipmentsNumber() + 1;
+                            hyDriverInfo.setShipmentsNumber(count);
+                            Double d4 = hyDriverInfo.getAccumulatedFreight();
+                            hyDriverInfo.setAccumulatedFreight(d4 + freightInfo.getActualFreight() - freightInfo.getDriverServiceCharge());
+                            driverInfoService.updateById(hyDriverInfo);
+                        }
                         //修改还款信息
                         RepaymentInfo repaymentInfo = repaymentInfoService.selectOne(new EntityWrapper<RepaymentInfo>()
                                 .eq("order_id",orderInfo1.getId()).eq("delete_flag","0"));
@@ -275,6 +288,16 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
                             EntityAnalyse.uploadWaybill(orderInfo1);
                             orderInfoService.updateById(orderInfo1);
                         }
+                        //司机承运次数+1,计算累计支付运费
+                        HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+                                .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
+                        if (hyDriverInfo != null) {
+                            Long count = hyDriverInfo.getShipmentsNumber() + 1;
+                            hyDriverInfo.setShipmentsNumber(count);
+                            Double d4 = hyDriverInfo.getAccumulatedFreight();
+                            hyDriverInfo.setAccumulatedFreight(d4 + freightInfo.getActualFreight() - freightInfo.getDriverServiceCharge());
+                            driverInfoService.updateById(hyDriverInfo);
+                        }
                     }
                 }
                 //查询上报所需信息
@@ -349,6 +372,7 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String postponeReporting(HyFreightSettlementInfo hyFreightSettlementInfo) {
         List<HyFreightSettlementInfo> hyFreightSettlementInfoList = hyFreightSettlementInfo.getHyFreightSettlementInfos();
         if (CollectionUtils.isNotEmpty(hyFreightSettlementInfoList)) {
@@ -371,6 +395,7 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
      * @throws ParseException
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String batchSubmission(HyFreightSettlementInfo hyFreightSettlementInfo) throws IOException, ParseException {
         //获取token
         String token = EntityAnalyse.GetJTToken();
@@ -420,6 +445,7 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
      * @throws ParseException
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public HyFreightSettlementInfo getHyFreightSettlementInfo(HyFreightSettlementInfo hyFreightSettlementInfo){
         //查询流水单信息
         HyFreightSettlementInfo hyFreightSettlementInfo1 = this.selectById(hyFreightSettlementInfo.getId());

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyOrderTravelPathServiceImpl.java

@@ -13,6 +13,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.yh.saas.plugin.yiliangyiyun.util.PositionUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
@@ -48,6 +49,7 @@ public class HyOrderTravelPathServiceImpl extends ServiceImpl<HyOrderTravelPathM
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addInfo(HyOrderTravelPath hyOrderTravelPath) {
         HyOrderTravelPath hyOrderTravelPath1 = this.selectOne(new EntityWrapper<HyOrderTravelPath>()
                 .eq("order_id", hyOrderTravelPath.getOrderId()).eq("delete_flag", "0"));
@@ -74,6 +76,7 @@ public class HyOrderTravelPathServiceImpl extends ServiceImpl<HyOrderTravelPathM
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public HyOrderTravelPath getInfo(HyOrderTravelPath hyOrderTravelPath) {
         HyOrderTravelPath hyOrderTravelPath1 = this.selectOne(new EntityWrapper<HyOrderTravelPath>()
                 .eq("order_id", hyOrderTravelPath.getOrderId()).eq("delete_flag", "0").eq("type", "1"));

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyPublicConsultationServiceImpl.java

@@ -36,6 +36,7 @@ public class HyPublicConsultationServiceImpl extends ServiceImpl<HyPublicConsult
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addPublicConsultation (HyPublicConsultation publicConsultation){
         publicConsultation.setId(IdGenerator.generateUUID());
         //获取当前年月日
@@ -98,6 +99,7 @@ public class HyPublicConsultationServiceImpl extends ServiceImpl<HyPublicConsult
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editPublicConsultation (HyPublicConsultation publicConsultation){
         HyPublicConsultation hyPublicConsultation= this.selectById(publicConsultation.getId());
         if(hyPublicConsultation != null){
@@ -114,6 +116,7 @@ public class HyPublicConsultationServiceImpl extends ServiceImpl<HyPublicConsult
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public HyPublicConsultation getHyPublicConsultation(String id) {
         HyPublicConsultation publicConsultation1 = this.selectById(id);
         return publicConsultation1;

+ 51 - 55
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java

@@ -243,10 +243,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
     @Override
     public List<OrderInfo> getAssociatedOrder(OrderInfo orderInfo) {
         //根据司机用户id和货主用户id查询
-        List<OrderInfo> orderInfoList = this.selectList(new EntityWrapper<OrderInfo>().eq("common_id",orderInfo.getCommonId())
-                .eq("cargo_common_id",orderInfo.getCargoCommonId()).eq("delete_flag","0")
-                .orderBy("update_date",false));
-        if (CollectionUtils.isNotEmpty(orderInfoList)){
+        List<OrderInfo> orderInfoList = this.selectList(new EntityWrapper<OrderInfo>().eq("common_id", orderInfo.getCommonId())
+                .eq("cargo_common_id", orderInfo.getCargoCommonId()).eq("delete_flag", "0")
+                .orderBy("update_date", false));
+        if (CollectionUtils.isNotEmpty(orderInfoList)) {
             return orderInfoList;
         }
         List<OrderInfo> orderInfoList1 = new ArrayList<>();
@@ -261,6 +261,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public OrderInfo selectHaoPing(String commonId, String evaluateFlag) {
         OrderInfo orderInfo = new OrderInfo();
         //好评率
@@ -352,6 +353,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public OrderInfo getOrderInfo(String id) {
         //基本信息
         OrderInfo orderInfo = this.selectById(id);
@@ -401,15 +403,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         if (publishTaskInfo != null) {
             orderInfo.setPublishTaskInfo(publishTaskInfo);
         }
-        if (orderInfo.getCompId() != null){
+        if (orderInfo.getCompId() != null) {
             //查询公司
             HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(orderInfo.getCompId());
             orderInfo.setHyCompanyInfo(hyCompanyInfo);
         }
         //查询车牌颜色
         HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>()
-                .eq("car_number",hyCarrierInfo.getCarNo()).eq("delete_flag","0"));
-        if (hyDriverCarInfo != null){
+                .eq("car_number", hyCarrierInfo.getCarNo()).eq("delete_flag", "0"));
+        if (hyDriverCarInfo != null) {
             orderInfo.setCarNumberColour(hyDriverCarInfo.getCarNumberColour());
         }
         return orderInfo;
@@ -507,18 +509,19 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * examineFlag
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String confirmFreight(OrderInfo orderInfo) {
         //查询订单
         OrderInfo orderInfo1 = this.selectById(orderInfo.getId());
         if (orderInfo1 != null) {
             //货主
-            if("1".equals(orderInfo.getTypeFlag())){
+            if ("1".equals(orderInfo.getTypeFlag())) {
                 orderInfo1.setOrderStatus(StatusEnum.DRIVER_CONFIRM_FREIGHT.getName());
                 orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_CONFIRM_FREIGHT.getFlag());
                 orderInfo1.setCargoOwnerStatus(StatusEnum.DRIVER_NOT_CONFIRM_FREIGHT.getName());
                 orderInfo1.setCargoOwnerStatusKey(StatusEnum.DRIVER_NOT_CONFIRM_FREIGHT.getFlag());
                 //修改承运表合计应付运费
-                HyCarrierInfo hyCarrierInfo = carrierInfoService.selectOne(new EntityWrapper<HyCarrierInfo>().eq("order_id",orderInfo1.getId())
+                HyCarrierInfo hyCarrierInfo = carrierInfoService.selectOne(new EntityWrapper<HyCarrierInfo>().eq("order_id", orderInfo1.getId())
                         .eq("delete_flag", "0"));
                 hyCarrierInfo.setTotalFreight(orderInfo.getTotalFreight());
                 carrierInfoService.updateById(hyCarrierInfo);
@@ -535,14 +538,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 }
                 //查询订单是否垫付
                 //非垫付订单
-                if("0".equals(orderInfo1.getFreightAdvance())){
-                    if (freightInfo1.getPrepaidFreight() > hyCarrierInfo.getTotalFreight()){
+                if ("0".equals(orderInfo1.getFreightAdvance())) {
+                    if (freightInfo1.getPrepaidFreight() > hyCarrierInfo.getTotalFreight()) {
                         //预付运费大于实际运费
                         throw new YException(YExceptionEnum.TOTAL_BIG_PREPAID);
                     }
                     //查询费用信息
                     FreightInfo freightInfo = freightInfoService.selectOne(new EntityWrapper<FreightInfo>()
-                            .eq("order_id",orderInfo1.getId()).eq("delete_flag","0"));
+                            .eq("order_id", orderInfo1.getId()).eq("delete_flag", "0"));
                     //尾款
                     Double weikuan = freightInfo.getActualFreight() - freightInfo.getPrepaidFreight();
                     //尾款+服务费
@@ -555,35 +558,34 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     hyFreezingMoneyInfo.setType("冻结");
                     hyFreezingMoneyInfo.setAmountMoney(zong);
 
-                    if (orderInfo1.getCompId() != null && !orderInfo1.getCompId().isEmpty()){
+                    if (orderInfo1.getCompId() != null && !orderInfo1.getCompId().isEmpty()) {
                         //货主是公司
                         HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(orderInfo1.getCompId());
-                        if (hyCompanyInfo.getAccountBalance() < zong){
+                        if (hyCompanyInfo.getAccountBalance() < zong) {
                             //账户余额小于尾款+服务费
                             throw new YException(YExceptionEnum.INSUFFICIENT_ACCOUNT_BALANCES);
-                        }else {
+                        } else {
                             //冻结公司账户余额
                             Double d = hyCompanyInfo.getAccountBalance();
                             Double d1 = hyCompanyInfo.getFrozenAmount();
-                            hyCompanyInfo.setAccountBalance(d-zong);
-                            hyCompanyInfo.setFrozenAmount(d1+zong);
+                            hyCompanyInfo.setAccountBalance(d - zong);
+                            hyCompanyInfo.setFrozenAmount(d1 + zong);
                             companyInfoService.updateById(hyCompanyInfo);
                             hyFreezingMoneyInfo.setCompanyId(hyCompanyInfo.getId());
                         }
-                    }
-                    else {
+                    } else {
                         //货主是个人
                         HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
-                                .eq("common_id",orderInfo1.getCargoCommonId()).eq("delete_flag","0"));
-                        if (hyCargoOwnerInfo.getAccountBalance() < zong){
+                                .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
+                        if (hyCargoOwnerInfo.getAccountBalance() < zong) {
                             //账户余额小于尾款+服务费
                             throw new YException(YExceptionEnum.INSUFFICIENT_ACCOUNT_BALANCES);
-                        }else {
+                        } else {
                             //冻结公司账户余额
                             Double d = hyCargoOwnerInfo.getAccountBalance();
                             Double d1 = hyCargoOwnerInfo.getFrozenAmount();
-                            hyCargoOwnerInfo.setAccountBalance(d-zong);
-                            hyCargoOwnerInfo.setFrozenAmount(d1+zong);
+                            hyCargoOwnerInfo.setAccountBalance(d - zong);
+                            hyCargoOwnerInfo.setFrozenAmount(d1 + zong);
                             cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
                             hyFreezingMoneyInfo.setCommonId(hyCargoOwnerInfo.getCommonId());
                         }
@@ -594,7 +596,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
             //司机
             else {
                 //通过
-                if ("1".equals(orderInfo.getExamineFlag())){
+                if ("1".equals(orderInfo.getExamineFlag())) {
                     orderInfo1.setOrderStatusKey(StatusEnum.PLATFORM_CONFIRMED_UNLOAD.getFlag());
                     orderInfo1.setOrderStatus(StatusEnum.PLATFORM_CONFIRMED_UNLOAD.getName());
                     orderInfo1.setCargoOwnerStatusKey(StatusEnum.PLATFORM_CONFIRMED_UNLOAD.getFlag());
@@ -663,6 +665,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editEnd(OrderInfo orderInfo) throws IOException {
         //查询订单
         OrderInfo orderInfo1 = this.selectById(orderInfo.getId());
@@ -685,16 +688,6 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
             //查询费用表
             FreightInfo freightInfo = freightInfoService.selectOne(new EntityWrapper<FreightInfo>().eq("order_id", orderInfo1.getId())
                     .eq("delete_flag", "0"));
-            //司机承运次数+1,计算累计支付运费
-            HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
-                    .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
-            if (hyDriverInfo != null) {
-                Long count = hyDriverInfo.getShipmentsNumber() + 1;
-                hyDriverInfo.setShipmentsNumber(count);
-                Double d = hyDriverInfo.getAccumulatedFreight();
-                hyDriverInfo.setAccumulatedFreight(d + freightInfo.getActualFreight() - freightInfo.getDriverServiceCharge());
-                driverInfoService.updateById(hyDriverInfo);
-            }
             //货主发运次数+1,计算累计支付运费
             HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
                     .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
@@ -716,6 +709,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String orderReceiving(OrderInfo orderInfo) {
         //查询订单
         OrderInfo orderInfo1 = this.selectById(orderInfo.getId());
@@ -827,6 +821,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String postponeReporting(OrderInfo orderInfo) {
         List<OrderInfo> orderInfos = orderInfo.getOrderInfoList();
         if (CollectionUtils.isNotEmpty(orderInfos)) {
@@ -843,17 +838,19 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
 
     /**
      * 运单批量上报
+     *
      * @param orderInfo
      * @return
      * @throws IOException
      * @throws ParseException
      */
     @Override
-    public String batchSubmission (OrderInfo orderInfo) throws IOException {
+    @Transactional(rollbackFor = Exception.class)
+    public String batchSubmission(OrderInfo orderInfo) throws IOException {
         //获取token
         String token = EntityAnalyse.GetJTToken();
-        if (CollectionUtils.isNotEmpty(orderInfo.getOrderInfoList())){
-            for (OrderInfo orderInfo1 : orderInfo.getOrderInfoList()){
+        if (CollectionUtils.isNotEmpty(orderInfo.getOrderInfoList())) {
+            for (OrderInfo orderInfo1 : orderInfo.getOrderInfoList()) {
                 //上报
                 orderInfo1.setToken(token);
                 EntityAnalyse.uploadWaybill(orderInfo1);
@@ -873,6 +870,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String examine(OrderInfo orderInfo) throws ParseException {
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String Time = df.format(new Date());
@@ -896,7 +894,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     freightInfo.setPayabledFreight(0d);
                     freightInfo.setNopayableFreight(freightInfo.getPayableFreight());
                     //判断是否是垫付订单
-                    if ("0".equals(orderInfo1.getFreightAdvance())){
+                    if ("0".equals(orderInfo1.getFreightAdvance())) {
                         //非垫付订单
                         freightInfo.setPrepaidFreight(orderInfo1.getAdvanceCharge());
                         freightInfo.setReceivableFreight(orderInfo1.getAdvanceCharge());
@@ -950,16 +948,24 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             }
                         }
                         hyFreezingMoneyInfoService.insert(hyFreezingMoneyInfo);
+                        //计算货主累计支付运费
+                        HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
+                                .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
+                        if (hyCargoOwnerInfo != null) {
+                            Double d3 = hyCargoOwnerInfo.getAccumulatedFreight();
+                            hyCargoOwnerInfo.setAccumulatedFreight(d3 + orderInfo1.getAdvanceCharge());
+                            cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
+                        }
                     }
                     freightInfoService.insert(freightInfo);
                     //如果应付款大于0,生成司机运费结算信息
-                    if (freightInfo.getPayableFreight()!= null &&freightInfo.getPayableFreight() != 0) {
+                    if (freightInfo.getPayableFreight() != null && freightInfo.getPayableFreight() != 0) {
                         HyFreightSettlementInfo hyFreightSettlementInfo = new HyFreightSettlementInfo();
                         hyFreightSettlementInfo.setId(IdGenerator.generateUUID());
                         hyFreightSettlementInfo.setCommonId(orderInfo1.getCommonId());
                         hyFreightSettlementInfo.setOrderId(orderInfo1.getId());
                         hyFreightSettlementInfo.setOrderNo(orderInfo1.getOrderNo());
-                        hyFreightSettlementInfo.setDocumentNo(orderInfo1.getOrderNo().replace("CY","ZJLS"));
+                        hyFreightSettlementInfo.setDocumentNo(orderInfo1.getOrderNo().replace("CY", "ZJLS"));
                         hyFreightSettlementInfo.setFreightAdvance(orderInfo1.getFreightAdvance());
                         hyFreightSettlementInfo.setDriverName(orderInfo1.getDriverName());
                         hyFreightSettlementInfo.setBankCard(orderInfo1.getBankCard());
@@ -1087,16 +1093,6 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             hyCargoOwnerCapitalInfoService.insert(hyCargoOwnerCapitalInfo);
                         }
                         hyFreezingMoneyInfoService.insert(hyFreezingMoneyInfo);
-                        //司机承运次数+1,计算累计支付运费
-                        HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
-                                .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
-                        if (hyDriverInfo != null) {
-                            Long count = hyDriverInfo.getShipmentsNumber() + 1;
-                            hyDriverInfo.setShipmentsNumber(count);
-                            Double d2 = hyDriverInfo.getAccumulatedFreight();
-                            hyDriverInfo.setAccumulatedFreight(d2 + freightInfo.getActualFreight() - freightInfo.getDriverServiceCharge());
-                            driverInfoService.updateById(hyDriverInfo);
-                        }
                         //货主发运次数+1,计算累计支付运费
                         HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
                                 .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
@@ -1104,7 +1100,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             Long count = hyCargoOwnerInfo.getShipmentsNumber() + 1;
                             hyCargoOwnerInfo.setShipmentsNumber(count);
                             Double d3 = hyCargoOwnerInfo.getAccumulatedFreight();
-                            hyCargoOwnerInfo.setAccumulatedFreight(d3 + freightInfo.getActualFreight() + freightInfo.getOwnerServiceCharge());
+                            hyCargoOwnerInfo.setAccumulatedFreight(d3 + freightInfo.getOwnerFreightBalance() + freightInfo.getOwnerServiceCharge());
                             cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
                         }
                     }
@@ -1121,7 +1117,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     hyFreightSettlementInfo.setCommonId(orderInfo1.getCommonId());
                     hyFreightSettlementInfo.setOrderId(orderInfo1.getId());
                     hyFreightSettlementInfo.setOrderNo(orderInfo1.getOrderNo());
-                    hyFreightSettlementInfo.setDocumentNo(orderInfo1.getOrderNo().replace("CY","ZJLS"));
+                    hyFreightSettlementInfo.setDocumentNo(orderInfo1.getOrderNo().replace("CY", "ZJLS"));
                     hyFreightSettlementInfo.setFreightAdvance(orderInfo1.getFreightAdvance());
                     hyFreightSettlementInfo.setDriverName(orderInfo1.getDriverName());
                     hyFreightSettlementInfo.setBankCard(orderInfo1.getBankCard());
@@ -1216,9 +1212,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         else {
             //查询车辆信息
             HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>().eq("car_number", orderInfo.getCarNumber())
-                    .eq("common_id",orderInfo1.getCommonId()).eq("delete_flag", "0"));
+                    .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
             //车辆不存在
-            if (hyDriverCarInfo == null){
+            if (hyDriverCarInfo == null) {
                 throw new YException(YExceptionEnum.CAR_NOT_EXIST);
             }
             //查询车辆核定载重量

+ 3 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PatformAnagementEgulationsServiceImpl.java

@@ -57,6 +57,7 @@ public class PatformAnagementEgulationsServiceImpl extends ServiceImpl<PatformAn
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String edit(PatformAnagementEgulations patformAnagementEgulations) {
         patformAnagementEgulations.setStatusKey(StatusEnum.PLATFORM_REVIEWED.getFlag());
         patformAnagementEgulations.setStatus(StatusEnum.PLATFORM_REVIEWED.getName());
@@ -74,6 +75,7 @@ public class PatformAnagementEgulationsServiceImpl extends ServiceImpl<PatformAn
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public PatformAnagementEgulations show(String id) {
         PatformAnagementEgulations patformAnagementEgulations = this.selectById(id);
         return patformAnagementEgulations;
@@ -84,6 +86,7 @@ public class PatformAnagementEgulationsServiceImpl extends ServiceImpl<PatformAn
      * @param id
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void delete(String id) {
         PatformAnagementEgulations patformAnagementEgulations = this.selectById(id);
         if (patformAnagementEgulations != null) {

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java

@@ -1047,6 +1047,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String editTask(PublishTaskInfo publishTaskInfo) {
         //除审核中状态其余可编辑
         if (publishTaskInfo != null) {
@@ -1093,6 +1094,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void deleteTask(String id) {
         PublishTaskInfo publishTaskInfo = this.selectById(id);
         this.deleteById(publishTaskInfo.getId());
@@ -1105,6 +1107,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public void showHidden(String id) {
         //查询任务信息
         PublishTaskInfo publishTaskInfo = this.selectById(id);
@@ -1126,6 +1129,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String refresh(PublishTaskInfo publishTaskInfo) {
         //查询发布任务
         PublishTaskInfo publishTaskInfo1 = this.seeTask(publishTaskInfo.getId());
@@ -1170,6 +1174,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addOrder(PublishTaskInfo publishTaskInfo) {
         //查询任务是否过期
         PublishTaskInfo publishTaskInfo1 = this.selectById(publishTaskInfo.getId());