Browse Source

维修工单列表、设备调整

ouyj 7 months ago
parent
commit
63ca9e2f00

+ 9 - 2
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtEquipmentServiceImpl.java

@@ -304,7 +304,7 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
         if (StringUtils.isNotEmpty(equipment.getMaintenanceCenter())) {
         if (StringUtils.isNotEmpty(equipment.getMaintenanceCenter())) {
             SysDept dept = new SysDept();
             SysDept dept = new SysDept();
             dept.setDeptNameNoLike(equipment.getMaintenanceCenter());
             dept.setDeptNameNoLike(equipment.getMaintenanceCenter());
-            dept.setLevel("2"); // 维保中心层级为2
+            //dept.setLevel("2"); // 维保中心层级为2
             List<SysDept> depts = sysDeptService.selectDeptList(dept);
             List<SysDept> depts = sysDeptService.selectDeptList(dept);
             // 如果只找到一个维保中心,则设置维保中心ID
             // 如果只找到一个维保中心,则设置维保中心ID
             if (depts != null && depts.size() == 1) {
             if (depts != null && depts.size() == 1) {
@@ -314,7 +314,7 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
         
         
         // 处理场站ID
         // 处理场站ID
         if (StringUtils.isNotEmpty(equipment.getStation())) {
         if (StringUtils.isNotEmpty(equipment.getStation())) {
-            SysDept dept = new SysDept();
+            /*SysDept dept = new SysDept();
             dept.setDeptNameNoLike(equipment.getStation());
             dept.setDeptNameNoLike(equipment.getStation());
             dept.setLevel("3"); // 场站层级为3
             dept.setLevel("3"); // 场站层级为3
             List<SysDept> deptsA = sysDeptService.selectDeptList(dept);
             List<SysDept> deptsA = sysDeptService.selectDeptList(dept);
@@ -328,6 +328,13 @@ public class GxtEquipmentServiceImpl implements IGxtEquipmentService
                 if (deptsB != null && deptsB.size() == 1) {
                 if (deptsB != null && deptsB.size() == 1) {
                     equipment.setStationId(deptsB.get(0).getDeptId());
                     equipment.setStationId(deptsB.get(0).getDeptId());
                 }
                 }
+            }*/
+            SysDept dept = new SysDept();
+            dept.setDeptNameNoLike(equipment.getStation());
+            List<SysDept> depts = sysDeptService.selectDeptList(dept);
+            // 如果只找到一个场站,则设置场站ID
+            if (depts != null && depts.size() == 1) {
+                equipment.setStationId(depts.get(0).getDeptId());
             }
             }
         }
         }
     }
     }

+ 10 - 2
ygtx-gxt/src/main/java/com/ygtx/gxt/task/EquipmentSyncTask.java

@@ -140,7 +140,7 @@ public class EquipmentSyncTask {
         if (StringUtils.isNotEmpty(equipment.getMaintenanceCenter())) {
         if (StringUtils.isNotEmpty(equipment.getMaintenanceCenter())) {
             SysDept dept = new SysDept();
             SysDept dept = new SysDept();
             dept.setDeptNameNoLike(equipment.getMaintenanceCenter());
             dept.setDeptNameNoLike(equipment.getMaintenanceCenter());
-            dept.setLevel("2"); // 维保中心层级为2
+            //dept.setLevel("2"); // 维保中心层级为2
             List<SysDept> depts = sysDeptService.selectDeptList(dept);
             List<SysDept> depts = sysDeptService.selectDeptList(dept);
             // 如果只找到一个维保中心,则设置维保中心ID
             // 如果只找到一个维保中心,则设置维保中心ID
             if (depts != null && depts.size() == 1) {
             if (depts != null && depts.size() == 1) {
@@ -150,7 +150,7 @@ public class EquipmentSyncTask {
         
         
         // 处理场站ID
         // 处理场站ID
         if (StringUtils.isNotEmpty(equipment.getStation())) {
         if (StringUtils.isNotEmpty(equipment.getStation())) {
-            SysDept dept = new SysDept();
+            /*SysDept dept = new SysDept();
             dept.setDeptNameNoLike(equipment.getStation());
             dept.setDeptNameNoLike(equipment.getStation());
             dept.setLevel("3"); // 场站层级为3
             dept.setLevel("3"); // 场站层级为3
             List<SysDept> deptsA = sysDeptService.selectDeptList(dept);
             List<SysDept> deptsA = sysDeptService.selectDeptList(dept);
@@ -164,6 +164,14 @@ public class EquipmentSyncTask {
                 if (deptsB != null && deptsB.size() == 1) {
                 if (deptsB != null && deptsB.size() == 1) {
                     equipment.setStationId(deptsB.get(0).getDeptId());
                     equipment.setStationId(deptsB.get(0).getDeptId());
                 }
                 }
+            }*/
+            SysDept dept = new SysDept();
+            dept.setDeptNameNoLike(equipment.getStation());
+            //dept.setLevel("3"); // 场站层级为3
+            List<SysDept> depts = sysDeptService.selectDeptList(dept);
+            // 如果只找到一个场站,则设置场站ID
+            if (depts != null && depts.size() == 1) {
+                equipment.setStationId(depts.get(0).getDeptId());
             }
             }
         }
         }
     }
     }

+ 19 - 2
ygtx-ui/src/views/gxt/repairOrder/index.vue

@@ -165,20 +165,37 @@
       <el-table-column label="维保中心" align="center" prop="gxtCenter"  width="150" :show-overflow-tooltip="true"/>
       <el-table-column label="维保中心" align="center" prop="gxtCenter"  width="150" :show-overflow-tooltip="true"/>
       <el-table-column label="场站" align="center" prop="pcsStationName" width="150" :show-overflow-tooltip="true"/>
       <el-table-column label="场站" align="center" prop="pcsStationName" width="150" :show-overflow-tooltip="true"/>
       <el-table-column label="品牌" align="center" prop="brand" width="120" :show-overflow-tooltip="true"/>
       <el-table-column label="品牌" align="center" prop="brand" width="120" :show-overflow-tooltip="true"/>
+      <el-table-column label="机型" align="center" prop="model" width="120" :show-overflow-tooltip="true"/>
       <el-table-column label="故障代码" align="center" prop="faultCode" width="120" :show-overflow-tooltip="true"/>
       <el-table-column label="故障代码" align="center" prop="faultCode" width="120" :show-overflow-tooltip="true"/>
-      <el-table-column label="故障条纹" align="center" prop="faultBarcode" width="150" :show-overflow-tooltip="true"/>
+      <el-table-column label="发生时间" align="center" prop="occurTime" width="150" >
+        <template #default="scope">
+          <span>{{ parseTime(scope.row.occurTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="MIS工单编码" align="center" prop="misOrderNo"  width="150" :show-overflow-tooltip="true"/>
+<!--      <el-table-column label="故障条纹" align="center" prop="faultBarcode" width="150" :show-overflow-tooltip="true"/>-->
+      <el-table-column label="下发人" align="center" prop="assignUserName" width="100" />
       <el-table-column label="下发时间" align="center" prop="assignTime" width="150">
       <el-table-column label="下发时间" align="center" prop="assignTime" width="150">
         <template #default="scope">
         <template #default="scope">
           <span>{{ parseTime(scope.row.assignTime, '{y}-{m}-{d} {h}:{i}') }}</span>
           <span>{{ parseTime(scope.row.assignTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column label="下发人" align="center" prop="assignUserName" width="100" />
       <el-table-column label="接单人" align="center" prop="acceptUserName" width="100" />
       <el-table-column label="接单人" align="center" prop="acceptUserName" width="100" />
       <el-table-column label="接单时间" align="center" prop="acceptTime" width="150">
       <el-table-column label="接单时间" align="center" prop="acceptTime" width="150">
         <template #default="scope">
         <template #default="scope">
           <span>{{ parseTime(scope.row.acceptTime, '{y}-{m}-{d} {h}:{i}') }}</span>
           <span>{{ parseTime(scope.row.acceptTime, '{y}-{m}-{d} {h}:{i}') }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
+      <el-table-column label="开始时间" align="center" prop="acceptTime" width="150">
+        <template #default="scope">
+          <span>{{ parseTime(scope.row.realStartTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="结束时间" align="center" prop="acceptTime" width="150">
+        <template #default="scope">
+          <span>{{ parseTime(scope.row.realEndTime, '{y}-{m}-{d} {h}:{i}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="工作负责人" align="center" prop="teamLeaderName" width="100" />
       <el-table-column label="工作负责人" align="center" prop="teamLeaderName" width="100" />
       <!--      <el-table-column label="优先级" align="center" prop="priorityType" min-width="100">
       <!--      <el-table-column label="优先级" align="center" prop="priorityType" min-width="100">
               <template #default="scope">
               <template #default="scope">