Răsfoiți Sursa

Merge remote-tracking branch 'origin/dev' into dev

xucaiqin 2 ani în urmă
părinte
comite
9911fc4cf6
26 a modificat fișierele cu 318 adăugiri și 144 ștergeri
  1. 77 76
      sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java
  2. 15 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/EnvConstant.java
  3. 21 3
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java
  4. 11 2
      sckw-modules/sckw-message/src/main/java/com/sckw/message/service/SckwSmsHandlerService.java
  5. 12 5
      sckw-modules/sckw-message/src/main/java/com/sckw/message/service/SmsService.java
  6. 5 0
      sckw-modules/sckw-report/src/main/java/com/sckw/report/service/KwFleetService.java
  7. 2 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntTypeDao.java
  8. 2 0
      sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsMenuRightsDao.java
  9. 60 36
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java
  10. 3 1
      sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java
  11. 7 0
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml
  12. 0 1
      sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml
  13. 3 3
      sckw-modules/sckw-system/src/main/resources/mapper/KwsMenuDao.xml
  14. 9 0
      sckw-modules/sckw-system/src/main/resources/mapper/KwsMenuRightsDao.xml
  15. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtWaybillOrderMapper.java
  16. 5 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java
  17. 30 5
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ManagementLogisticsOrderVO.java
  18. 10 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/OrderDetailVO.java
  19. 11 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/SubcontractConsignmentVO.java
  20. 15 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ManagementLogisticsOrderExcelVo.java
  21. 1 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java
  22. 2 5
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java
  23. 7 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ManagementLogisticsOrderService.java
  24. 3 1
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java
  25. 3 1
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml
  26. 1 1
      sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

+ 77 - 76
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -58,82 +58,83 @@ public class AuthServiceImpl implements IAuthService {
 
     @Override
     public LoginResVo login(LoginReqVo reqDto) {
-        /*1、根据账号密码或者手机号校验码登录, 手机号后面处理*/
-        KwsUserResDto kwsUser = checkLogin(reqDto);
-        LoginResVo loginResVo = new LoginResVo();
-        loginResVo.setClientType(reqDto.getClientType());
-        BeanUtils.copyProperties(kwsUser, loginResVo);
-
-        //平台管理员直接过了
-        if (kwsUser.getIsMain() == Global.YES && kwsUser.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
-            afterProcessor(loginResVo);
-            return loginResVo;
-        }
-        /*2、登录成功,查询角色信息*/
-        Long userId = kwsUser.getId();
-        List<KwsRoleResDto> kwsRoleResDtos = remoteUserService.queryRoleInfoByUserId(userId);
-        loginResVo.setRoleInfo(kwsRoleResDtos);
-
-
-        /*3、查询用户机构*/
-        List<KwsUserDeptResDto> kwsUserDeptResDtos = remoteUserService.queryUserDeptByUserId(userId);
-        if (CollectionUtils.isEmpty(kwsUserDeptResDtos)) {
-            throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.USER_DEPT_NOT_EXISTS);
-        }
-
-        List<Long> deptIds = kwsUserDeptResDtos.stream().map(KwsUserDeptResDto::getDeptId).toList();
-        List<KwsDeptResDto> kwsDepts = remoteUserService.queryDeptByIds(deptIds);
-        if (CollectionUtils.isEmpty(kwsDepts)) {
-            //数据不全,直接返回
-            afterProcessor(loginResVo);
-            return loginResVo;
-        }
-
-        /*3、查企业*/
-        //目前一个人只能归属于一个企业,所以这里取第一个就行
-        Long entId = kwsDepts.get(0).getEntId();
-        KwsEnterpriseResDto kwsEnterpriseResDto = remoteUserService.queryEnterpriseById(entId);
-        if (Objects.isNull(kwsEnterpriseResDto)) {
-            //只要查出了机构,这个if其实不会进的,做保险起见还是加上判空
-            afterProcessor(loginResVo);
-            return loginResVo;
-        }
-
-        EntInfoResVo entInfoResVo = new EntInfoResVo();
-        BeanUtils.copyProperties(kwsEnterpriseResDto, entInfoResVo);
-        entInfoResVo.setDeptInfo(BeanUtils.copyToList(kwsDepts, DeptInfoResVo.class));
-
-        //查企业类型
-        List<EntTypeResDto> entTypeResDtos = remoteUserService.queryEntTypeById(entId);
-        if (CollectionUtils.isNotEmpty(entTypeResDtos)) {
-            entInfoResVo.setEntTypes(String.join(Global.COMMA, entTypeResDtos.stream().map(EntTypeResDto::getType).map(String::valueOf).distinct().toList()));
-        }
-        loginResVo.setEntInfo(entInfoResVo);
-
-        /* 4、查资质*/
-        List<EntCertificateResDto> entCertificateResDtoList = remoteUserService.queryCertificateByEntId(entId);
-        entInfoResVo.setCertificateInfo(entCertificateResDtoList);
-
-        //企业资质有效性判断  1、当前资质没过期,且状态是已认证  2、只要有认证过一次就算有效  参数判断
-        String checkType = String.valueOf(Global.NUMERICAL_TWO);
-        if (checkType.equals(Global.NUMERICAL_ONE)) {
-            for (EntCertificateResDto entCertificateResDto : entCertificateResDtoList) {
-                Date expireTime = entCertificateResDto.getExpireTime();
-                entInfoResVo.setValid(DateUtil.compare(new Date(), expireTime) <= 0);
-            }
-        } else {
-            List<EntCheckTrackResDto> entCheckTrackResDtoList = remoteUserService.checkTrackByEntId(entId);
-            if (CollectionUtils.isEmpty(entCheckTrackResDtoList)) {
-                entInfoResVo.setValid(false);
-                afterProcessor(loginResVo);
-                return loginResVo;
-            }
-            entInfoResVo.setValid(entCheckTrackResDtoList.stream().anyMatch(item -> item.getStatus() == Global.NO));
-        }
-
-        /*5、生成token,一些信息存redis*/
-        afterProcessor(loginResVo);
-        return loginResVo;
+//        /*1、根据账号密码或者手机号校验码登录, 手机号后面处理*/
+//        KwsUserResDto kwsUser = checkLogin(reqDto);
+//        LoginResVo loginResVo = new LoginResVo();
+//        loginResVo.setClientType(reqDto.getClientType());
+//        BeanUtils.copyProperties(kwsUser, loginResVo);
+//
+//        //平台管理员直接过了
+//        if (kwsUser.getIsMain() == Global.YES && kwsUser.getSystemType().equals(SystemTypeEnum.MANAGE.getCode())) {
+//            afterProcessor(loginResVo);
+//            return loginResVo;
+//        }
+//        /*2、登录成功,查询角色信息*/
+//        Long userId = kwsUser.getId();
+//        List<KwsRoleResDto> kwsRoleResDtos = remoteUserService.queryRoleInfoByUserId(userId);
+//        loginResVo.setRoleInfo(kwsRoleResDtos);
+//
+//
+//        /*3、查询用户机构*/
+//        List<KwsUserDeptResDto> kwsUserDeptResDtos = remoteUserService.queryUserDeptByUserId(userId);
+//        if (CollectionUtils.isEmpty(kwsUserDeptResDtos)) {
+//            throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.USER_DEPT_NOT_EXISTS);
+//        }
+//
+//        List<Long> deptIds = kwsUserDeptResDtos.stream().map(KwsUserDeptResDto::getDeptId).toList();
+//        List<KwsDeptResDto> kwsDepts = remoteUserService.queryDeptByIds(deptIds);
+//        if (CollectionUtils.isEmpty(kwsDepts)) {
+//            //数据不全,直接返回
+//            afterProcessor(loginResVo);
+//            return loginResVo;
+//        }
+//
+//        /*3、查企业*/
+//        //目前一个人只能归属于一个企业,所以这里取第一个就行
+//        Long entId = kwsDepts.get(0).getEntId();
+//        KwsEnterpriseResDto kwsEnterpriseResDto = remoteUserService.queryEnterpriseById(entId);
+//        if (Objects.isNull(kwsEnterpriseResDto)) {
+//            //只要查出了机构,这个if其实不会进的,做保险起见还是加上判空
+//            afterProcessor(loginResVo);
+//            return loginResVo;
+//        }
+//
+//        EntInfoResVo entInfoResVo = new EntInfoResVo();
+//        BeanUtils.copyProperties(kwsEnterpriseResDto, entInfoResVo);
+//        entInfoResVo.setDeptInfo(BeanUtils.copyToList(kwsDepts, DeptInfoResVo.class));
+//
+//        //查企业类型
+//        List<EntTypeResDto> entTypeResDtos = remoteUserService.queryEntTypeById(entId);
+//        if (CollectionUtils.isNotEmpty(entTypeResDtos)) {
+//            entInfoResVo.setEntTypes(String.join(Global.COMMA, entTypeResDtos.stream().map(EntTypeResDto::getType).map(String::valueOf).distinct().toList()));
+//        }
+//        loginResVo.setEntInfo(entInfoResVo);
+//
+//        /* 4、查资质*/
+//        List<EntCertificateResDto> entCertificateResDtoList = remoteUserService.queryCertificateByEntId(entId);
+//        entInfoResVo.setCertificateInfo(entCertificateResDtoList);
+//
+//        //企业资质有效性判断  1、当前资质没过期,且状态是已认证  2、只要有认证过一次就算有效  参数判断
+//        String checkType = String.valueOf(Global.NUMERICAL_TWO);
+//        if (checkType.equals(Global.NUMERICAL_ONE)) {
+//            for (EntCertificateResDto entCertificateResDto : entCertificateResDtoList) {
+//                Date expireTime = entCertificateResDto.getExpireTime();
+//                entInfoResVo.setValid(DateUtil.compare(new Date(), expireTime) <= 0);
+//            }
+//        } else {
+//            List<EntCheckTrackResDto> entCheckTrackResDtoList = remoteUserService.checkTrackByEntId(entId);
+//            if (CollectionUtils.isEmpty(entCheckTrackResDtoList)) {
+//                entInfoResVo.setValid(false);
+//                afterProcessor(loginResVo);
+//                return loginResVo;
+//            }
+//            entInfoResVo.setValid(entCheckTrackResDtoList.stream().anyMatch(item -> item.getStatus() == Global.NO));
+//        }
+//
+//        /*5、生成token,一些信息存redis*/
+//        afterProcessor(loginResVo);
+//        return loginResVo;
+        return null;
     }
 
     private KwsUserResDto checkLogin(LoginReqVo reqDto) {

+ 15 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/common/enums/EnvConstant.java

@@ -0,0 +1,15 @@
+package com.sckw.core.common.enums;
+
+/**
+ * @desc: 环境常量
+ * @author: yzc
+ * @date: 2023-09-28 17:14
+ */
+public class EnvConstant {
+
+    public static final String LOCAL = "local";
+    public static final String DEV = "dev";
+    public static final String TEST = "test";
+    public static final String PROD = "prod";
+
+}

+ 21 - 3
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -1055,7 +1055,7 @@ public class KwfTruckService {
                 KwfTruckGpsVo truckGps = new KwfTruckGpsVo();
                 truckGps.setLat(truck.getString("lat"));
                 truckGps.setLng(truck.getString("lng"));
-                truckGps.setSpeed(truck.getDouble("speed"));
+                truckGps.setSpeed(speed(truck.getString("speed")));
                 truckGps.setGpsTime(truck.getString("createTime"));
                 truckGps.setRunStatus(runStatus(truckGps.getGpsTime(), truckGps.getSpeed()));
                 truckGpsList.add(truckGps);
@@ -1084,7 +1084,7 @@ public class KwfTruckService {
                         truckGps.setTruckNo(truck.getString("vehicleNo"));
                         truckGps.setLat(truck.getString("lat"));
                         truckGps.setLng(truck.getString("lng"));
-                        truckGps.setSpeed(truck.getDouble("speed"));
+                        truckGps.setSpeed(speed(truck.getString("speed")));
                         truckGps.setGpsTime(truck.getString("createTime"));
                         truckGps.setRunStatus(runStatus(truckGps.getGpsTime(), truckGps.getSpeed()));
                         truckGpsList.add(truckGps);
@@ -1126,7 +1126,7 @@ public class KwfTruckService {
                     truckGps.setTruckNo(truck.getString("vehicleNo"));
                     truckGps.setLat(locateInfo.getString("lat"));
                     truckGps.setLng(locateInfo.getString("lng"));
-                    truckGps.setSpeed(locateInfo.getDouble("speed"));
+                    truckGps.setSpeed(speed(locateInfo.getString("speed")));
                     truckGps.setGpsTime(locateInfo.getString("createTime"));
                     truckGps.setRunStatus(runStatus(truckGps.getGpsTime(), truckGps.getSpeed()));
                     return truckGps;
@@ -1160,4 +1160,22 @@ public class KwfTruckService {
         return compareTo < 0 ? 2 : (speed == null || speed == 0) ? 1 : 0;
     }
 
+    /**
+     * @param obj 速度
+     * @desc 速度处理
+     * @author zk
+     * @date 2023/9/5
+     **/
+    public static Double speed(String obj) {
+        if (obj == null) {
+            return Global.AMOUNT;
+        }
+        try {
+            return Double.parseDouble(obj);
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            return Global.AMOUNT;
+        }
+    }
+
 }

+ 11 - 2
sckw-modules/sckw-message/src/main/java/com/sckw/message/service/SckwSmsHandlerService.java

@@ -1,14 +1,17 @@
 package com.sckw.message.service;
 
 import com.alibaba.fastjson2.JSON;
+import com.sckw.core.common.enums.EnvConstant;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.message.model.KwmSms;
 import com.sckw.redis.constant.RedisConstant;
 import com.sckw.redis.utils.RedissonUtils;
 import com.sckw.stream.enums.SmsCodeEnum;
 import com.sckw.stream.model.SckwSms;
+import com.sckw.stream.utils.SmsUtil;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 /**
@@ -23,6 +26,10 @@ public class SckwSmsHandlerService {
 
     private final KwmSmsService kwmSmsService;
 
+    @Value("${spring.profiles.active}")
+    private String env;
+
+
     /**
      * @param sckwSms
      * @return void
@@ -45,8 +52,10 @@ public class SckwSmsHandlerService {
                 throw new BusinessException("请勿频繁获取短信验证码!");
             }
             RedissonUtils.putString(requestKey, String.valueOf(sckwSms.getParams().get("code")), RedisConstant.SMS_VERIFY_CODE_REQUEST_TIME);
-            //发送短信 TODO:测试暂时屏蔽,上线再放开
-//            SmsUtil.sendSms(sckwSms.getPhone(), sckwSms.getSignName(), sckwSms.getTemplateCode().getName(), JSON.toJSONString(sckwSms.getParams()));
+            //发送短信 生产环境才发短信
+            if (EnvConstant.PROD.equals(env)) {
+                SmsUtil.sendSms(sckwSms.getPhone(), sckwSms.getSignName(), sckwSms.getTemplateCode().getName(), JSON.toJSONString(sckwSms.getParams()));
+            }
             //放入缓存
             String valueKey = getKey(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, type, phone);
             RedissonUtils.putString(valueKey, String.valueOf(sckwSms.getParams().get("code")), RedisConstant.SMS_VERIFY_CODE_VALID_TIME);

+ 12 - 5
sckw-modules/sckw-message/src/main/java/com/sckw/message/service/SmsService.java

@@ -1,10 +1,12 @@
 package com.sckw.message.service;
 
 import com.alibaba.fastjson2.JSON;
+import com.sckw.core.common.enums.EnvConstant;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.NumberUtils;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.message.model.vo.req.GetSmsVerifyCoderReqVO;
@@ -17,6 +19,7 @@ import com.sckw.system.api.RemoteSystemService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cloud.stream.function.StreamBridge;
 import org.springframework.stereotype.Service;
 
@@ -40,6 +43,10 @@ public class SmsService {
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
 
+    @Value("${spring.profiles.active}")
+    private String env;
+
+
     /**
      * @param param
      * @return com.sckw.core.web.response.HttpResult
@@ -50,9 +57,9 @@ public class SmsService {
     public void sendVerifyCode(SendSmsVerifyCoderReqVO param) {
         Map<String, Map<String, String>> dict = remoteSystemService.queryDictByType(Collections.singletonList(DictTypeEnum.SEND_SMS_TYPE.getType()));
         Map<String, String> map;
-        if (CollectionUtils.isNotEmpty(dict)){
+        if (CollectionUtils.isNotEmpty(dict)) {
             map = dict.get(DictTypeEnum.SEND_SMS_TYPE.getType());
-        }else {
+        } else {
             map = new HashMap<>();
         }
         String type = param.getType();
@@ -65,9 +72,9 @@ public class SmsService {
             throw new BusinessException("请勿频繁获取短信验证码!");
         }
         Map<String, Object> params = new HashMap<>(Global.NUMERICAL_SIXTEEN);
-        //TODO:测试先写死code码为123456,上线再放开
-        params.put("code", 123456);
-//        params.put("code", NumberUtils.createRandomVcode());
+        //生产环境才发短信
+        String code = EnvConstant.PROD.equals(env) ? NumberUtils.createRandomVcode() : "123456";
+        params.put("code", code);
         SckwSms sckwSms = new SckwSms();
         sckwSms.setPhone(param.getPhone()).setType(type).setTemplateCode(SmsCodeEnum.VERIFICATION_CODE)
                 .setParams(params).setCreateBy(LoginUserHolder.getUserId());

+ 5 - 0
sckw-modules/sckw-report/src/main/java/com/sckw/report/service/KwFleetService.java

@@ -6,6 +6,7 @@ import com.github.pagehelper.PageInfo;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
+import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.NumberUtils;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.fleet.api.RemoteFleetService;
@@ -50,6 +51,9 @@ public class KwFleetService {
         if (capacityAmountMin != null || capacityAmountMax != null) {
             List<Map<String, Object>> statistics = fleetService.capacityStatistics(entIds, capacityAmountMin, capacityAmountMax);
             statistics.forEach(e -> entIds.add(NumberUtils.parseEmptyLong(e.get("entId"))));
+            if (CollectionUtils.isEmpty(entIds)) {
+                return new PageResult();
+            }
         }
 
         // 企业数据查询
@@ -62,6 +66,7 @@ public class KwFleetService {
         queryPage.setEntTypeList(new ArrayList<>(Arrays.asList(3, 4)));
         queryPage.setCityCode(NumberUtils.parseIntV1(params.get("cityCode")));
         queryPage.setEntName(StringUtils.objectStr(params.get("firmName")));
+        queryPage.setEntIdList(entIds);
         PageResult pageResult = userService.queryEntInfoByCityCodeAndEntTypesWithPage(queryPage);
         List<KwsEnterpriseResDto> ents = JSON.parseArray(JSON.toJSONString(pageResult.getList()), KwsEnterpriseResDto.class);
         for (KwsEnterpriseResDto ent:ents) {

+ 2 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsEntTypeDao.java

@@ -43,6 +43,8 @@ public interface KwsEntTypeDao {
      */
     List<KwsEntType> findListByEntId(Long entId);
 
+    List<KwsEntType> findApprovalByEntId(Long entId);
+
     /**
      * @param entId 企业ids
      * @return KwsEntType

+ 2 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dao/KwsMenuRightsDao.java

@@ -63,4 +63,6 @@ public interface KwsMenuRightsDao {
     int saveBatch(@Param(value = "list") List<KwsMenuRights> list);
 
     List<KwsMenuRights> selectEntMenus(Long id);
+
+    int deleteByIds(@Param(value = "list") List<Long> list);
 }

+ 60 - 36
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsEnterpriseService.java

@@ -74,6 +74,12 @@ public class KwsEnterpriseService {
     @Autowired
     private KwsRoleService kwsRoleService;
 
+    @Autowired
+    private KwsMenuRightsDao kwsMenuRightsDao;
+
+    @Autowired
+    private KwsMenuDao kwsMenuDao;
+
     @Autowired
     private RemoteSystemServiceImpl remoteSystemService;
 
@@ -143,9 +149,6 @@ public class KwsEnterpriseService {
     }
 
     public static void main(String[] args) {
-        Long l1 = 1234L;
-        Long l2 = 1234L;
-        System.out.println(l1.equals(l2));
     }
 
     /**
@@ -329,28 +332,20 @@ public class KwsEnterpriseService {
 
         /*2、存企业类型,一个企业可以有多个类型*/
         List<KwsEntType> listByEntId = kwsEntTypeDao.findListByEntId(entId);
-        List<Integer> typeList = new ArrayList<>();
+        List<Integer> currentTypeList = new ArrayList<>();
         if (CollectionUtils.isNotEmpty(listByEntId)) {
-            typeList = listByEntId.stream().map(KwsEntType::getType).toList();
+            currentTypeList.addAll(listByEntId.stream().map(KwsEntType::getType).toList());
         }
-        List<Integer> finalTypeList = typeList;
-        if (CollectionUtils.isNotEmpty(listByEntId)) {
-            for (KwsEntType listId : listByEntId) {
-                KwsEntType kwsEntType = new KwsEntType();
-                kwsEntType.setId(listId.getId());
-                kwsEntType.setDelFlag(Global.YES);
-                if (kwsEntTypeDao.update(kwsEntType) <= 0) {
-                    throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
-                }
+        List<String> typeList = Arrays.stream(reqVo.getEntTypes().split(",")).toList();
+        for (String item : typeList) {
+            if (currentTypeList.contains(Integer.parseInt(item))) {
+                continue;
             }
-        }
-        Arrays.stream(reqVo.getEntTypes().split(",")).toList().forEach(item -> {
-            //if (!finalTypeList.contains(Integer.parseInt(item))) {
             KwsEntType kwsEntType = new KwsEntType();
             kwsEntType.setEntId(entId);
             kwsEntType.setType(Integer.parseInt(item));
             kwsEntType.setId(new IdWorker(1).nextId());
-            kwsEntType.setStatus(Global.NO);
+            kwsEntType.setStatus(ApprovalEnum.PROCESS.getCode());
             kwsEntType.setCreateBy(userId);
             kwsEntType.setCreateTime(date);
             kwsEntType.setUpdateBy(userId);
@@ -359,8 +354,7 @@ public class KwsEnterpriseService {
             if (kwsEntTypeDao.insert(kwsEntType) <= 0) {
                 throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
             }
-            //}
-        });
+        }
 
         /*3、存企业证书*/
         List<KwsEntCertificate> kwsEntCertificates = new ArrayList<>();
@@ -383,7 +377,7 @@ public class KwsEnterpriseService {
             throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
         }
 
-        if(SystemTypeEnum.MANAGE.getCode().equals(LoginUserHolder.getSystemType())) {
+        if (SystemTypeEnum.MANAGE.getCode().equals(LoginUserHolder.getSystemType())) {
             ApprovalReqVo approvalReqVo = new ApprovalReqVo();
             approvalReqVo.setEntId(entId);
             approvalReqVo.setStatus(ApprovalEnum.OK.getCode());
@@ -459,6 +453,14 @@ public class KwsEnterpriseService {
             kwsEntCertificates.add(kwsEntCertificate);
         }
 
+        List<KwsEntType> kwsEntTypeList = kwsEntTypeDao.findApprovalByEntId(entId);
+        if (CollectionUtils.isNotEmpty(kwsEntTypeList)) {
+            for (KwsEntType kwsEntType : kwsEntTypeList) {
+                kwsEntType.setStatus(status.equals(ApprovalEnum.OK.getCode()) ? Global.NO : Global.YES);
+                kwsEntTypeDao.update(kwsEntType);
+            }
+        }
+
         /*更新企业信息主表审批状态*/
         KwsEnterprise kwsEnterprise = checkKwsEnterpriseById(entId);
         Integer currentApproval = kwsEnterprise.getApproval();
@@ -481,18 +483,41 @@ public class KwsEnterpriseService {
         //主体机构不用走后面的流程
         if (Objects.isNull(kwsEntDept)) {
             /*第一次审批通过(非更新资质审批通过),构建机构角色等*/
-            if (ApprovalEnum.OK.getCode() == status && ApprovalEnum.PROCESS.getCode() == currentApproval) {
-                /*审批通过,绑定角色*/
-                FindManagePojo findManagePojo = kwsEnterpriseDao.findManageInfoByEntIdBeforeApproval(entId);
-                if (Objects.isNull(findManagePojo)) {
-                    throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+            if (ApprovalEnum.OK.getCode() == status) {
+                if (ApprovalEnum.PROCESS.getCode() == currentApproval) {
+                    /*审批通过,绑定角色*/
+                    FindManagePojo findManagePojo = kwsEnterpriseDao.findManageInfoByEntIdBeforeApproval(entId);
+                    if (Objects.isNull(findManagePojo)) {
+                        throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+                    }
+                    KwsUser userByAccount = kwsUserService.getUserByAccount(kwsEnterprise.getPhone(), SystemTypeEnum.COMPANY.getCode());
+                    if (Objects.isNull(userByAccount)) {
+                        throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+                    }
+                    kwsUserService.fillUserRole(String.valueOf(findManagePojo.getRoleId()), userByAccount.getId(), SystemTypeEnum.COMPANY.getCode());
                 }
-                KwsUser userByAccount = kwsUserService.getUserByAccount(kwsEnterprise.getPhone(), SystemTypeEnum.COMPANY.getCode());
-                if (Objects.isNull(userByAccount)) {
-                    throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
+            }
+
+            List<KwsMenuRights> kwsMenuRightsList = kwsMenuRightsDao.selectEntMenus(entId);
+            if (CollectionUtils.isNotEmpty(kwsMenuRightsList)) {
+                kwsMenuRightsDao.deleteByIds(kwsMenuRightsList.stream().map(KwsMenuRights::getId).collect(Collectors.toList()));
+            }
+
+            List<KwsEntType> listByEntId = kwsEntTypeDao.findListByEntId(entId);
+            List<Integer> typeList = listByEntId.stream().map(KwsEntType::getType).toList();
+            List<KwsMenu> kwsMenus = kwsMenuDao.selectAll();
+            List<KwsMenuRights> kwsMenuRightsList2 = new ArrayList<>();
+            for (Integer entType : typeList) {
+                List<KwsMenu> collect = kwsMenus.stream().filter(item -> item.getUsingRoles().contains(String.valueOf(entType))).toList();
+                for (KwsMenu kwsMenu : collect) {
+                    KwsMenuRights kwsMenuRights = new KwsMenuRights();
+                    kwsMenuRights.setEntId(entId);
+                    kwsMenuRights.setMenuId(kwsMenu.getId());
+                    kwsMenuRights.setId(new IdWorker(1L).nextId());
+                    kwsMenuRightsList2.add(kwsMenuRights);
                 }
-                kwsUserService.fillUserRole(String.valueOf(findManagePojo.getRoleId()), userByAccount.getId(), SystemTypeEnum.COMPANY.getCode());
             }
+            kwsMenuRightsDao.saveBatch(kwsMenuRightsList2);
         }
         commonService.updateEntCertificate(entId, BeanUtils.copyToList(kwsEntCertificates, EntCertificateInfo.class));
 
@@ -604,7 +629,7 @@ public class KwsEnterpriseService {
                     for (Integer type : collect.keySet()) {
                         List<KwsEntCertificate> kwsEntCertificates1 = collect.get(type);
                         if (CollectionUtils.isNotEmpty(kwsEntCertificates1)) {
-                            List<KwsEntCertificate> collect1 = kwsEntCertificates1.stream().sorted(Comparator.comparing(KwsEntCertificate::getUpdateTime).reversed()).collect(Collectors.toList());
+                            List<KwsEntCertificate> collect1 = kwsEntCertificates1.stream().sorted(Comparator.comparing(KwsEntCertificate::getUpdateTime).reversed()).toList();
                             finalList.add(collect1.get(0));
                         }
                     }
@@ -684,11 +709,10 @@ public class KwsEnterpriseService {
             BeanUtils.copyProperties(reqVo, entRegisterReqVo);
             entRegisterReqVo.setEntId(register.getEntId());
             register(entRegisterReqVo);
-
-            ApprovalReqVo approvalReqVo = new ApprovalReqVo();
-            approvalReqVo.setEntId(register.getEntId());
-            approvalReqVo.setStatus(ApprovalEnum.OK.getCode());
-            approval(approvalReqVo);
+//            ApprovalReqVo approvalReqVo = new ApprovalReqVo();
+//            approvalReqVo.setEntId(register.getEntId());
+//            approvalReqVo.setStatus(ApprovalEnum.OK.getCode());
+//            approval(approvalReqVo);
             return;
         }
 

+ 3 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/service/KwsUserService.java

@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 用户service接口
@@ -91,7 +92,7 @@ public class KwsUserService {
         BeanUtils.copyProperties(reqVo, kwsUser);
         kwsUser.setPhone(kwsUser.getAccount());
         kwsUser.setIsMain(Global.NO);
-        kwsUser.setSystemType(SystemTypeEnum.COMPANY.getCode());
+        kwsUser.setSystemType(kwsUser.getSystemType());
 
         /*1、数据校验*/
         checkAccountValid(kwsUser.getAccount(), kwsUser.getSystemType());
@@ -196,6 +197,7 @@ public class KwsUserService {
             if (CollectionUtils.isEmpty(kwsMenus)) {
                 throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MENU_NOT_EXISTS);
             }
+            kwsMenus = kwsMenus.stream().filter(item -> item.getClientType().equals(Global.NUMERICAL_TWO)).collect(Collectors.toList());
             editRoleReqVo.setName(Global.MANAGE_NAME);
             editRoleReqVo.setCurrentUnitId(kwsDept.getId());
             editRoleReqVo.setMenuIds(String.join(Global.COMMA, kwsMenus.stream().map(KwsMenu::getId).map(String::valueOf).toList()));

+ 7 - 0
sckw-modules/sckw-system/src/main/resources/mapper/KwsEntTypeDao.xml

@@ -194,6 +194,10 @@
     select * from kws_ent_type a where a.ent_id = #{entId} and a.del_flag = 0 and a.status = 0
   </select>
 
+  <select id="findApprovalByEntId" resultType="com.sckw.system.model.KwsEntType">
+    select * from kws_ent_type a where a.ent_id = #{entId} and a.del_flag = 0 and a.status = 3
+  </select>
+
   <select id="findListByEntIds" resultType="com.sckw.system.model.KwsEntType">
     select * from kws_ent_type a
    where a.ent_id in
@@ -203,4 +207,7 @@
      and a.del_flag = 0 and a.status = 0
   </select>
 
+
+
+
 </mapper>

+ 0 - 1
sckw-modules/sckw-system/src/main/resources/mapper/KwsEnterpriseDao.xml

@@ -663,7 +663,6 @@
            approval_time = now(),
            remark = #{remark}
      where id = #{id,jdbcType=BIGINT}
-       and approval in (3, 4)
        and del_flag = 0
   </update>
 

+ 3 - 3
sckw-modules/sckw-system/src/main/resources/mapper/KwsMenuDao.xml

@@ -270,7 +270,7 @@
     from kws_menu sm
     left join kws_menu_rights smr on sm.id = smr.menu_id
     where sm.del_flag = 0
-      <if test="systemType != 1">
+      <if test="systemType != 1 and clientType != 3">
         and smr.del_flag = 0
       </if>
     <if test="clientType != null">
@@ -285,11 +285,11 @@
           using_roles like concat('%', #{item}, '%')
         </foreach>
       </if>
-    <if test="entId != null">
+    <if test="entId != null and clientType != 3">
       and smr.ent_id = #{entId}
       and smr.role_id is null
     </if>
-    <if test="roleIds != null and roleIds.size() > 0">
+    <if test="roleIds != null and roleIds.size() > 0 and clientType != 3">
       and smr.role_id in
       <foreach collection="roleIds" separator="," open="(" close=")" item="item">
         #{item}

+ 9 - 0
sckw-modules/sckw-system/src/main/resources/mapper/KwsMenuRightsDao.xml

@@ -20,6 +20,15 @@
     update_time, del_flag
   </sql>
 
+  <delete id="deleteByIds">
+    update kws_menu_rights
+       set del_flag = 1
+     where id in
+     <foreach collection="list" open="(" close=")" separator="," item="item">
+        #{item}
+     </foreach>
+  </delete>
+
   <select id="selectByKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     <include refid="Base_Column_List" />

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/dao/KwtWaybillOrderMapper.java

@@ -128,15 +128,15 @@ public interface KwtWaybillOrderMapper extends BaseMapper<KwtWaybillOrder> {
     List<WaybillOrderDriverVo> findOtherWaybillOrderByDriver(Map<String, Object> params);
 
     /**
-     *
+     *易订单id查找相关联车辆信息
      * @param id
      * @return
      */
     List<OrderCarDTO> selectWaybillOrderCarListNotPage(@Param("id") String id);
 
     /**
-     *
-     * @param ids
+     *贸易订单ids查找相关联车辆信息
+     * @param ids   贸易订单ids
      * @return
      */
     List<OrderCarDTO> selectWaybillOrderCarListByTradeOrderId(@Param("ids") List<Long> ids);

+ 5 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/AcceptCarriageOrderVO.java

@@ -318,4 +318,9 @@ public class AcceptCarriageOrderVO /*extends PageRequest*/ {
      */
     private String orderSourceLabel;
 
+    /**
+     *税率
+     */
+    private BigDecimal taxRate;
+
 }

+ 30 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/ManagementLogisticsOrderVO.java

@@ -119,7 +119,7 @@ public class ManagementLogisticsOrderVO /*extends PageRequest*/ {
     @JsonProperty("tOrderId")
     private String tOrderId;
     /**
-     *  贸易订单编号
+     * 贸易订单编号
      */
     @JsonProperty("tOrderNo")
     private String tOrderNo;
@@ -157,7 +157,7 @@ public class ManagementLogisticsOrderVO /*extends PageRequest*/ {
     /**
      * 计划收货时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private LocalDate receiveGoodsDateTime;
     /**
      * 收货电话
@@ -174,7 +174,7 @@ public class ManagementLogisticsOrderVO /*extends PageRequest*/ {
     /**
      * 计划发货时间
      */
-    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private LocalDate shipmentsDateTime;
     /**
      * 发货电话
@@ -251,7 +251,7 @@ public class ManagementLogisticsOrderVO /*extends PageRequest*/ {
     private BigDecimal loadAmount;
 
     /**
-     *总装货量
+     * 总装货量
      */
     private BigDecimal totalLoadAmount;
 
@@ -289,5 +289,30 @@ public class ManagementLogisticsOrderVO /*extends PageRequest*/ {
     /**
      * 订单主体企业id
      */
-    private  Long entId;
+    private Long entId;
+
+    /**
+     * 装货地点名称
+     */
+    private String loadName;
+
+    /**
+     * 卸货地点名称
+     */
+    private String unloadName;
+
+    /**
+     * 税率
+     */
+    private BigDecimal taxRate;
+
+    /**
+     * 订单来源
+     */
+    private String orderSource;
+
+    /**
+     * 订单来源
+     */
+    private String orderSourceLabel;
 }

+ 10 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/OrderDetailVO.java

@@ -245,5 +245,15 @@ public class OrderDetailVO {
      */
     private BigDecimal waitDistributionAmount;
 
+    /**
+     *税率
+     */
+    private BigDecimal taxRate;
+
+    /**
+     *税率
+     */
+    private String taxRateLabel;
+
 
 }

+ 11 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/SubcontractConsignmentVO.java

@@ -3,6 +3,7 @@ package com.sckw.transport.model.vo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -253,4 +254,14 @@ public class SubcontractConsignmentVO {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date createTime;
 
+    /**
+     *税率
+     */
+    private BigDecimal taxRate;
+
+    /**
+     *税率
+     */
+    private String taxRateLabel;
+
 }

+ 15 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/execlVo/ManagementLogisticsOrderExcelVo.java

@@ -123,6 +123,19 @@ public class ManagementLogisticsOrderExcelVo implements Serializable {
     @ExcelProperty(value = "运价")
     private String priceLabel;
 
+    /**
+     * 税率
+     */
+    @ExcelProperty(value = "税率")
+    private BigDecimal taxRate;
+
+
+    /**
+     * 订单来源
+     */
+    @ExcelProperty(value = "订单来源")
+    private String orderSourceLabel;
+
     /**
      * 收货联系人
      */
@@ -240,6 +253,8 @@ public class ManagementLogisticsOrderExcelVo implements Serializable {
     @ExcelProperty(value = "卸货量")
     private String unloadAmount;
 
+
+
 //    /**
 //     * 结算周期
 //     */

+ 1 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageOrderService.java

@@ -1036,6 +1036,7 @@ public class AcceptCarriageOrderService {
                 subcontractConsignmentVO.setLoadAddressDetail(subcontractConsignmentVO.getLoadCityName() + subcontractConsignmentVO.getLoadAddress());
                 subcontractConsignmentVO.setUnloadAddressDetail(subcontractConsignmentVO.getUnloadCityName() + subcontractConsignmentVO.getUnloadAddress());
                 subcontractConsignmentVO.setOrderSourceLabel(orderSource == null ? null : orderSource.get(subcontractConsignmentVO.getOrderSource()));
+                subcontractConsignmentVO.setTaxRateLabel(subcontractConsignmentVO.getTaxRate()+"%");
             }
             allList.addAll(voList);
         }

+ 2 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/KwtWaybillOrderService.java

@@ -874,9 +874,6 @@ public class KwtWaybillOrderService {
 
         //操作人信息
         order.setStatus(CarWaybillEnum.PENDING_ORDER.getCode());
-        order.setCreateBy(LoginUserHolder.getUserId());
-        order.setCreateByName(LoginUserHolder.getUserName());
-        order.setCreateTime(circulate.getUpdateTime());
         order.setUpdateBy(LoginUserHolder.getUserId());
         order.setUpdateByName(LoginUserHolder.getUserName());
         order.setUpdateTime(circulate.getUpdateTime());
@@ -1595,7 +1592,7 @@ public class KwtWaybillOrderService {
         ticket.setWOrderId(waybillOrder.getId());
         ticket.setType(Global.NUMERICAL_ONE);
         ticket.setAmount(waybillOrder.getLoadAmount());
-        ticket.setUrls(params.getUrls());
+        ticket.setUrls(FileUtils.replaceAllBatch(params.getUrls()));
         ticket.setOperateTime(params.getOperateTime());
         waybillOrderTicketDao.insert(ticket);
 
@@ -1705,7 +1702,7 @@ public class KwtWaybillOrderService {
         ticket.setWOrderId(waybillOrder.getId());
         ticket.setType(Global.NUMERICAL_TWO);
         ticket.setAmount(waybillOrder.getUnloadAmount());
-        ticket.setUrls(params.getUrls());
+        ticket.setUrls(FileUtils.replaceAllBatch(params.getUrls()));
         ticket.setOperateTime(params.getOperateTime());
         waybillOrderTicketDao.insert(ticket);
 

+ 7 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/ManagementLogisticsOrderService.java

@@ -160,6 +160,8 @@ public class ManagementLogisticsOrderService {
         Map<String, String> signingWay = commonService.getDictData(DictTypeEnum.SIGNING_TYPE.getType());
         /**合理损耗*/
 //        Map<String, String> taxRateTypeDictData = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
+        /**订单来源*/
+        Map<String, String> orderSource = commonService.getDictData(DictTypeEnum.ORDER_SOURCE.getType());
         Map<Long, UserCacheResDto> longUserMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         if (CollectionUtils.isNotEmpty(list)) {
             List<Long> collect = list.stream().map(ManagementLogisticsOrderVO::getCreateBy).collect(Collectors.toList());
@@ -168,6 +170,7 @@ public class ManagementLogisticsOrderService {
             }
         }
         for (ManagementLogisticsOrderVO vo : list) {
+            vo.setOrderSourceLabel(orderSource == null ? null : orderSource.get(vo.getOrderSource()));
             vo.setAccountsCycleLabel(settlementDictData.get(vo.getAccountsCycle()));
             vo.setAppointor(longUserMap.get(vo.getCreateBy()) == null ? null : longUserMap.get(vo.getCreateBy()).getName());
             vo.setBillingModeLabel(chargingDictData.get(vo.getBillingMode()));
@@ -302,6 +305,8 @@ public class ManagementLogisticsOrderService {
         Map<String, String> taxRate = commonService.getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
         /**运价方式*/
         Map<String, String> priceType = commonService.getDictData(DictTypeEnum.PRICE_TYPE.getType());
+        /**订单来源*/
+        Map<String, String> orderSource = commonService.getDictData(DictTypeEnum.ORDER_SOURCE.getType());
         Map<Long, UserCacheResDto> longUserMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
         if (CollectionUtils.isNotEmpty(list)) {
             List<Long> collect = list.stream().map(ManagementLogisticsOrderVO::getCreateBy).collect(Collectors.toList());
@@ -313,6 +318,7 @@ public class ManagementLogisticsOrderService {
         for (ManagementLogisticsOrderVO vo : list) {
             ManagementLogisticsOrderExcelVo managementLogisticsOrderExcelVo = new ManagementLogisticsOrderExcelVo();
             BeanUtils.copyProperties(vo, managementLogisticsOrderExcelVo);
+            managementLogisticsOrderExcelVo.setOrderSourceLabel(orderSource == null ? null : orderSource.get(vo.getOrderSource()));
 //            managementLogisticsOrderExcelVo.setStatus(vo.getStatus().toString());
             managementLogisticsOrderExcelVo.setPriceLabel(vo.getPrice() == null ? null : vo.getPrice().toString() + priceType.get(vo.getPriceType()));
             managementLogisticsOrderExcelVo.setLossUnitLabel(vo.getLoss() == null ? null : vo.getLoss().toString() + taxRate.get(vo.getLossUnit()));
@@ -684,7 +690,7 @@ public class ManagementLogisticsOrderService {
 //        PageHelper.startPage(page, pageSize);
         List<Long> tradeOrderIds = StringUtils.splitStrToList(ids, Long.class);
         if (CollectionUtils.isEmpty(tradeOrderIds)) {
-           throw new BusinessException("贸易订单id不能为空");
+            throw new BusinessException("贸易订单id不能为空");
         }
         List<LogisticsOrderDTO> returnList = new ArrayList<>();
         tradeOrderIds = tradeOrderIds.stream().sorted(Comparator.reverseOrder()).collect(Collectors.toList());

+ 3 - 1
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java

@@ -192,6 +192,8 @@ public class TransportCommonService {
             orderDetailVO.setCarrierContacts(unitTwo.getContacts());
             orderDetailVO.setCarrierPhone(unitTwo.getPhone());
         }
+        orderDetailVO.setTaxRate(logisticsOrder.getTaxRate());
+        orderDetailVO.setTaxRateLabel(logisticsOrder.getTaxRate() + "%");
         orderDetailVO.setStatus(logisticsOrder.getStatus());
         orderDetailVO.setStatusLabel(LogisticsOrderEnum.getName(logisticsOrder.getStatus()));
         orderDetailVO.setGoodsId(String.valueOf(orderGoods == null ? null : orderGoods.getGoodsId()));
@@ -731,7 +733,7 @@ public class TransportCommonService {
         Map<String, String> taxRateTypeDictData = getDictData(DictTypeEnum.TAX_RATE_TYPE.getType());
         if (CollectionUtils.isNotEmpty(list)) {
             for (SckwLogisticsOrderVO vo : list) {
-                vo.setBillingModeLabel(chargingDictData==null?null:chargingDictData.get(vo.getBillingMode()));
+                vo.setBillingModeLabel(chargingDictData == null ? null : chargingDictData.get(vo.getBillingMode()));
                 vo.setPaymentLabel(vo.getPayment() == null ? null : tradeTypeDictData.get(vo.getPayment().toString()));
                 vo.setStatusLabel(LogisticsOrderEnum.getDestination(vo.getStatus()));
                 vo.setLossUnitLabel(vo.getLossUnit() == null ? null : taxRateTypeDictData.get(vo.getLossUnit()));

+ 3 - 1
sckw-modules/sckw-transport/src/main/resources/mapper/KwtLogisticsOrderMapper.xml

@@ -484,6 +484,7 @@
         f.detail_address as unloadAddress,
         a.billing_mode as billingMode,
         a.loss,
+        a.tax_rate as taxRate,
         a.loss_unit as lossUnit,
         a.goods_price as goodsPrice,
         a.goods_price_unit as goodsPriceUnit,
@@ -967,7 +968,7 @@
         a.settlement_cycle AS settlementCycle,
         a.price AS price,
         a.price_type AS priceType,
-        a.type AS type,
+        a.type AS orderSource,
         a.unit AS unit,
         a.subcontract_amount AS subcontractAmount,
         a.entrust_amount AS entrustAmount,
@@ -1015,6 +1016,7 @@
         b.phone AS shipmentsPhone,
         b.lat AS loadLat,
         b.lng AS loadLng,
+        c.name AS unloadName,
         c.address_type AS unloadType,
         c.contacts AS receiveGoodsContacts,
         c.phone AS receiveGoodsPhone,

+ 1 - 1
sckw-modules/sckw-transport/src/main/resources/mapper/KwtWaybillOrderMapper.xml

@@ -651,7 +651,7 @@
             and kwo.t_order_id = #{tOrderId, jdbcType=BIGINT}
         </if>
         <if test="lOrderId != null and lOrderId != ''">
-            and kwo.id = #{lOrderId, jdbcType=BIGINT}
+            and kwo.l_order_id = #{lOrderId, jdbcType=BIGINT}
         </if>
         <if test="driverId != null and driverId != ''">
             and kwo.driver_id = #{driverId, jdbcType=BIGINT}