Преглед изворни кода

feat: 组织机构导入增加编码校验;

hanchaolong пре 17 часа
родитељ
комит
4f4bf5e948

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

@@ -22,11 +22,11 @@ public class DeptImportDTO {
     private String deptCode;
     private String deptCode;
 
 
     /** 父组织名称 */
     /** 父组织名称 */
-    @Excel(name = "父组织名称")
+    @Excel(name = "*父组织名称")
     private String parentDeptName;
     private String parentDeptName;
 
 
     /** 父组织编码 */
     /** 父组织编码 */
-    @Excel(name = "父组织编码")
+    @Excel(name = "*父组织编码")
     private String parentDeptCode;
     private String parentDeptCode;
 
 
     /** 负责人手机号 */
     /** 负责人手机号 */

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

@@ -6,6 +6,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import com.ruoyi.common.core.utils.DateUtils;
 import com.ruoyi.common.core.utils.DateUtils;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.constant.UserConstants;
@@ -29,6 +30,7 @@ import com.ruoyi.system.service.ISysDeptService;
  * 
  * 
  * @author lydgt
  * @author lydgt
  */
  */
+@Slf4j
 @Service
 @Service
 public class SysDeptServiceImpl implements ISysDeptService
 public class SysDeptServiceImpl implements ISysDeptService
 {
 {
@@ -383,6 +385,7 @@ public class SysDeptServiceImpl implements ISysDeptService
                     successMsg.append(String.format("%1$s、导入成功;", dept.getDeptName()));
                     successMsg.append(String.format("%1$s、导入成功;", dept.getDeptName()));
                 }
                 }
             } catch (Exception e) {
             } catch (Exception e) {
+                log.info("导入部门数据异常", e);
                 failureNum++;
                 failureNum++;
                 String msg = String.format("%1$s、导入失败:%2$s", importDTO.getDeptName(), e.getMessage());
                 String msg = String.format("%1$s、导入失败:%2$s", importDTO.getDeptName(), e.getMessage());
                 failureMsg.append(msg);
                 failureMsg.append(msg);