Selaa lähdekoodia

fix: 企业信息导入

zhangying 11 kuukautta sitten
vanhempi
commit
38aa506c62

+ 9 - 9
src/main/java/com/hz/employmentsite/services/impl/companyService/CompanyServiceImpl.java

@@ -294,6 +294,14 @@ public class CompanyServiceImpl implements CompanyService {
                 errorInfo += "请填写统一信用代码!";
             if (stringUtils.IsNullOrEmpty(item.companyName))
                 errorInfo += "请填写企业名称!";
+            if (stringUtils.IsNullOrEmpty(item.regionName)) {
+                errorInfo += "请填写所属县区!";
+            } else {
+                item.regionCode = regionList.stream().filter(it -> it.getName().equals(item.regionName.trim()))
+                        .findFirst().orElse(new AreaCode()).getCode();
+                if (stringUtils.IsNullOrEmpty(item.regionCode))
+                    errorInfo += "县区名称不存在!";
+            }
             if (stringUtils.IsNullOrEmpty(item.SiteName))
                 errorInfo += "请填写所属驿站!";
             else {
@@ -317,7 +325,7 @@ public class CompanyServiceImpl implements CompanyService {
             else {
                 item.recordStatus = companyStatusList.stream().filter(it -> it.getName().equals(item.getRecordStatusName().trim()))
                         .findFirst().orElse(new SysDictionaryItem()).getValue();
-                if (stringUtils.IsNullOrEmpty(item.regionCode))
+                if (item.recordStatus == null)
                     errorInfo += "企业状态不存在!";
             }
 
@@ -334,14 +342,6 @@ public class CompanyServiceImpl implements CompanyService {
                 item.setErrorMessage(errorInfo);
             }
 
-            if (!stringUtils.IsNullOrEmpty(item.regionName))
-            {
-                item.regionCode = regionList.stream().filter(it -> it.getName().equals(item.regionName.trim()))
-                        .findFirst().orElse(new AreaCode()).getCode();
-                if (stringUtils.IsNullOrEmpty(item.regionCode))
-                    errorInfo += "县区名称不存在!";
-            }
-
             if (!stringUtils.IsNullOrEmpty(item.streetName))
             {
                 item.streetCode = streetList.stream().filter(it -> it.getName().equals(item.streetName.trim()))

BIN
src/main/resources/static/doc/template/企业信息导入模板.xlsx


+ 3 - 6
vue/src/views/companyService/company/index.vue

@@ -196,6 +196,7 @@ export default defineComponent({
       columns: [
         {cnName: '统一信用代码', enName: 'companyCode', width: 140},
         {cnName: '企业名称', enName: 'companyName', width: 100},
+        {cnName: '所属县区', enName: 'regionName', width: 100},
         {cnName: '所属驿站', enName: 'SiteName', width: 100},
         {cnName: '企业办公地址', enName: 'companyAddress', width: 100},
         {cnName: '企业联系人', enName: 'userName', width: 100},
@@ -211,7 +212,6 @@ export default defineComponent({
         {cnName: '所属产业分类', enName: 'estateCategoryName', width: 100},
         {cnName: '企业邮箱', enName: 'companyEmail', width: 100},
         {cnName: '经济类型', enName: 'companyTypeStr', width: 100},
-        {cnName: '所属县区', enName: 'regionName', width: 100},
         {cnName: '所属街道', enName: 'streetName', width: 100},
         {cnName: '企业规模', enName: 'companyModelStr', width: 100},
         {cnName: '用工情况(人)', enName: 'workSituation', width: 100},
@@ -242,13 +242,10 @@ export default defineComponent({
       {title: '所属驿站', dataIndex: 'siteName', key: 'siteName', width: 200, align: "center"},
       {
         title: '企业状态',
-        dataIndex: 'recordStatus',
-        key: 'recordStatus',
+        dataIndex: 'recordStatusName',
+        key: 'recordStatusName',
         width: 120,
         align: "center",
-        customRender: (item) => {
-          return item.record.recordStatus == 1 ? "在营" : "关闭";
-        }
       },
       {
         title: '企业规模',