shi'sen'yuan пре 3 година
родитељ
комит
1d99376490

+ 22 - 8
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -487,20 +487,14 @@ public class TStaffmgrController extends BaseController
                             }
                         }
                     } else if (j == 11) {
-                        if (cellValue != "") {
-                            entity.setAccidentNum(Long.parseLong(cellValue));//隐患查找数量
-                        }
-                    } else if (j == 12) {
                         entity.setMail(cellValue);//邮箱
-                    } else if (j == 13) {
-                        entity.setSkillScore(cellValue);//技能评估得分
-                    } else if (j == 14) {
+                    } else if (j == 12) {
                         for (SysDept d : dept) {
                             if (d.getDeptName().equals(cellValue)) {
                                 entity.setDeptId(d.getDeptId());//部门编号
                             }
                         }
-                    } else if (j == 15) {
+                    } else if (j == 13) {
                         entity.setRemarks(cellValue);//备注
                     }
                 }
@@ -520,6 +514,26 @@ public class TStaffmgrController extends BaseController
             failNum++;
             try {
                 tStaffmgrService.insertTStaffmgr(t);
+                if (t.getUnit().equals("10") || t.getUnit().equals("18")) {
+                    TTrainingrecords tTrainingrecords = new TTrainingrecords();
+                    tTrainingrecords.setStaffId(t.getId());
+                    tTrainingrecords.setPlantCode(t.getPlantCode());
+                    tTrainingrecords.setName(t.getName());
+                    tTrainingrecords.setEmployeeid(t.getStaffid());
+                    tTrainingrecords.setClasses(t.getTeam());
+                    tTrainingrecords.setDeptId(t.getDeptId());
+                    tTrainingrecordsService.insertTTrainingrecords(tTrainingrecords);
+                }
+                if (!t.getTeam().equals("18")) {
+                    TWorklicense tWorklicense = new TWorklicense();
+                    tWorklicense.setPlantCode(t.getPlantCode());
+                    tWorklicense.setClasses(t.getTeam());
+                    tWorklicense.setName(t.getName());
+                    tWorklicense.setEmployeeid(t.getStaffid());
+                    tWorklicense.setPost(t.getActualpost());
+                    tWorklicense.setDeptId(t.getDeptId());
+                    tWorklicenseService.insertTWorklicense(tWorklicense);
+                }
                 successNumber++;
             }catch (Exception e){
                 failNumber++;

BIN
master/src/main/resources/static/template/plant/staffmgr.xlsx


BIN
master/src/main/resources/static/template/plant/targetlist.xlsx


+ 4 - 4
ui/src/views/training/trainingrecords/index.vue

@@ -167,13 +167,13 @@
       <el-table-column :label="$t('入职')" align="center" prop="onboard" :formatter="onboardFormat" >
        <template slot-scope="scope">
          <span> {{onboardFormat(scope.row)}}</span>
-         <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'trainingrecords-onbord')"  circle></el-button>
+         <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.onboard !== '3'" @click="handleDoc(scope.row , 'trainingrecords-onbord')"  circle></el-button>
        </template>
       </el-table-column>
       <el-table-column label="TDS" align="center" prop="tds" :formatter="tdsFormat">
         <template slot-scope="scope">
           <span> {{tdsFormat(scope.row)}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'trainingrecords-tds')"  circle></el-button>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.tds !== '3'" @click="handleDoc(scope.row , 'trainingrecords-tds')"  circle></el-button>
         </template>
       </el-table-column>
       <el-table-column :label="$t('上岗证复证')" align="center" prop="postCard" :formatter="postCardFormat">
@@ -192,13 +192,13 @@
       <el-table-column :label="$t('公司级培训')" align="center" prop="company" :formatter="companyFormat">
         <template slot-scope="scope">
           <span> {{companyFormat(scope.row)}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="openCompany(scope.row)"  circle></el-button>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.company !== '3'" @click="openCompany(scope.row)"  circle></el-button>
         </template>
       </el-table-column>
       <el-table-column :label="$t('装置级培训')" align="center" prop="device" :formatter="deviceFormat">
         <template slot-scope="scope">
           <span> {{deviceFormat(scope.row)}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="openDevice(scope.row)"  circle></el-button>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.device !== '3'" @click="openDevice(scope.row)"  circle></el-button>
         </template>
       </el-table-column>
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>