Explorar o código

feat: bug清单问题处理;

hanchaolong hai 4 semanas
pai
achega
e003d68894

+ 0 - 2
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/domain/BizAddressBook.java

@@ -19,7 +19,6 @@ public class BizAddressBook extends BaseEntity
     private Long addressId;
     private Long addressId;
 
 
     /** 公司名称 */
     /** 公司名称 */
-    @Excel(name = "公司名称")
     private String companyName;
     private String companyName;
 
 
     /** 联系人姓名 */
     /** 联系人姓名 */
@@ -47,7 +46,6 @@ public class BizAddressBook extends BaseEntity
     private String detailedAddress;
     private String detailedAddress;
 
 
     /** 是否默认 0非默认1默认 */
     /** 是否默认 0非默认1默认 */
-    @Excel(name = "是否默认", readConverterExp = "0=非默认,1=默认")
     private String defaultFlag;
     private String defaultFlag;
 
 
     /** 部门ID */
     /** 部门ID */

+ 8 - 2
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/BizAddressBookServiceImpl.java

@@ -159,7 +159,7 @@ public class BizAddressBookServiceImpl implements IBizAddressBookService {
 
 
         // 对导入的地址进行判断,联系人,联系电话,省市区信息必须存在,是否默认字段允许为空(默认为否),如果不为空只能有一个默认
         // 对导入的地址进行判断,联系人,联系电话,省市区信息必须存在,是否默认字段允许为空(默认为否),如果不为空只能有一个默认
         bookList.forEach(book -> {
         bookList.forEach(book -> {
-            // 先判断 联系人,联系电话,省市区信息是否为空
+            // 先判断 联系人,联系电话,省市区信息是否为空
             if (StringUtils.isEmpty(book.getContactName())
             if (StringUtils.isEmpty(book.getContactName())
                     || StringUtils.isEmpty(book.getContactPhone())
                     || StringUtils.isEmpty(book.getContactPhone())
                     || StringUtils.isEmpty(book.getProvinceName())
                     || StringUtils.isEmpty(book.getProvinceName())
@@ -167,8 +167,14 @@ public class BizAddressBookServiceImpl implements IBizAddressBookService {
                     || StringUtils.isEmpty(book.getCountyName())
                     || StringUtils.isEmpty(book.getCountyName())
                     || StringUtils.isEmpty(book.getDetailedAddress())
                     || StringUtils.isEmpty(book.getDetailedAddress())
             ) {
             ) {
-                throw new ServiceException("导入地址数据存在空值,请检查!");
+                throw new ServiceException("导入地址数据存在空值请检查!");
             }
             }
+                        
+            // 校验手机号格式
+            if (!book.getContactPhone().matches("^1[3-9]\\d{9}$")) {
+                throw new ServiceException("导入地址数据存在手机号格式不正确,请检查!");
+            }
+
             // 判断 是否默认字段是否为空,如果不为空只能有一个默认,并根据传值进行发替换
             // 判断 是否默认字段是否为空,如果不为空只能有一个默认,并根据传值进行发替换
             String defaultFlag = book.getDefaultFlag();
             String defaultFlag = book.getDefaultFlag();
             if (defaultFlag == null || defaultFlag.isEmpty() || Objects.equals(defaultFlag, "否")) {
             if (defaultFlag == null || defaultFlag.isEmpty() || Objects.equals(defaultFlag, "否")) {

+ 5 - 0
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/logistics/service/impl/SysDeptRateServiceImpl.java

@@ -206,6 +206,11 @@ public class SysDeptRateServiceImpl implements ISysDeptRateService
                         j + 1, begins2, ends2));
                         j + 1, begins2, ends2));
                 }
                 }
 
 
+                if (rate1.getRate().compareTo(new BigDecimal("0")) == 0) {
+                    throw new ServiceException(String.format(
+                            "%s、%s的费率不能为0", getCompanyName(rate1.getCompanyType()), getProductName(rate1.getProductType())));
+                }
+
                 if (rate1.getRate().compareTo(rate2.getRate()) < 0) {
                 if (rate1.getRate().compareTo(rate2.getRate()) < 0) {
                     throw new ServiceException(String.format(
                     throw new ServiceException(String.format(
                             "%s、%s的费率配置有误:区间%d(%d,%d] 与区间%d(%d,%d]",
                             "%s、%s的费率配置有误:区间%d(%d,%d] 与区间%d(%d,%d]",

+ 0 - 4
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/system/domain/dto/DeptImportDTO.java

@@ -37,10 +37,6 @@ public class DeptImportDTO {
     @Excel(name = "负责人姓名")
     @Excel(name = "负责人姓名")
     private String leader;
     private String leader;
 
 
-    /** 费率 */
-    @Excel(name = "*费率")
-    private String rateValue;
-
     /** 发票抬头 */
     /** 发票抬头 */
     @Excel(name = "*发票抬头")
     @Excel(name = "*发票抬头")
     private String invoiceName;
     private String invoiceName;

+ 0 - 1
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java

@@ -421,7 +421,6 @@ public class SysDeptServiceImpl implements ISysDeptService
         dept.setBankAccount(importDTO.getBankAccount());
         dept.setBankAccount(importDTO.getBankAccount());
         dept.setCreateBy(SecurityUtils.getUsername());
         dept.setCreateBy(SecurityUtils.getUsername());
         dept.setCreateTime(DateUtils.getNowDate());
         dept.setCreateTime(DateUtils.getNowDate());
-        dept.setRateValue(importDTO.getRateValue());
         return dept;
         return dept;
     }
     }
 }
 }

+ 1 - 1
jd-logistics-modules/jd-logistics-system/src/main/resources/mapper/logistics/BizAddressBookMapper.xml

@@ -57,7 +57,7 @@
                 detailed_address like concat('%', #{searchKeyword}, '%'))
                 detailed_address like concat('%', #{searchKeyword}, '%'))
             </if>
             </if>
         </where>
         </where>
-        order by default_flag desc, create_time desc
+        order by create_time desc
     </select>
     </select>
 
 
     <select id="selectBizAddressBookByAddressId" parameterType="Long" resultMap="BizAddressBookResult">
     <select id="selectBizAddressBookByAddressId" parameterType="Long" resultMap="BizAddressBookResult">