소스 검색

项目重构,开发新需求20240123

aiwenzhu 10 달 전
부모
커밋
1445aaee23

+ 2 - 0
smart-admin-api/kpt-admin/src/main/java/com/kpt/admin/module/gm/audit/domain/vo/AuditVo.java

@@ -59,4 +59,6 @@ public class AuditVo {
     private String appgs;
     // 0 还有需要审核 1 没有
     private int empStatus;
+    // 报修日期
+    private String dateRepair;
 }

+ 2 - 0
smart-admin-api/kpt-admin/src/main/java/com/kpt/admin/module/gm/audit/domain/vo/ManHourVo.java

@@ -29,4 +29,6 @@ public class ManHourVo {
     private String repairPerson;
     //    费用
     private String cost;
+    // 报修日期
+    private String dateRepair;
 }

+ 2 - 6
smart-admin-api/kpt-admin/src/main/java/com/kpt/admin/module/gm/audit/service/AuditService.java

@@ -37,13 +37,9 @@ public class AuditService {
                                       String eqCodeOrName, String auditType, int pastureId, String pick, String code,
                                       String sapCode, String startDate, String endDate, String authAuditType, String priok, String empId, String roleId) {
 
-        List<AuditVo> auditList = new ArrayList<>();
-//        try {
-            auditList = audittDao.getAuditList(page, personnel, createUserId, processed, status, eqCodeOrName,
+        List<AuditVo> auditList = audittDao.getAuditList(page, personnel, createUserId, processed, status, eqCodeOrName,
                     auditType, pastureId, pick, code, sapCode,startDate,endDate,authAuditType,priok,empId,roleId);
-//        } catch (Exception e) {
-//            return auditList;
-//        }
+
         return auditList;
     }
 

+ 7 - 4
smart-admin-api/kpt-admin/src/main/resources/mapper/gm/audit/AuditMapper.xml

@@ -11,7 +11,8 @@
     </insert>
 
     <select id="getAuditList" resultType="com.kpt.admin.module.gm.audit.domain.vo.AuditVo">
-        select a.*,e.swerk,e.tplnr,cu.actual_name as createUserName,
+        select a.*,concat(r.qmdat,' ',r.mzeit) dateRepair,
+               e.swerk,e.tplnr,cu.actual_name as createUserName,
                (select id from bigpartapply  where applyCode = a.code)bigPartapplyId,
         bist.id biginspectionId,bist.plantime,up.actual_name upkeepPersonName,
         bpemp.actual_name partapplyPersonName,(select sum(amount) from partapply where bigid = bp.id) amount,
@@ -160,7 +161,7 @@
 
     <select id="getManHour" resultType="com.kpt.admin.module.gm.audit.domain.vo.ManHourVo">
         SELECT
-            p.name pastureName,
+            p.name pastureName,concat(r.qmdat,' ',r.mzeit) dateRepair,
             a.code,
             eq.eqCode,
             eq.eqName,
@@ -175,6 +176,7 @@
             (select sum(part.sumPrice) from bigpartapply bpa join partapply part on part.bigId = bpa.id where bpa.RUCode = a.code) cost
         FROM
             audit a
+                left join repair r on r.qmnum = a.code
                 JOIN equipment eq ON eq.eqCode = a.eqCode
                 JOIN pasture p ON p.id = eq.pastureId
         join t_employee te on te.employee_id = a.personnelID
@@ -208,7 +210,7 @@
     </select>
     <select id="getManHourStatistics" resultType="com.kpt.admin.module.gm.audit.domain.vo.ManHourVo">
         SELECT
-            p.name pastureName,
+            p.name pastureName,concat(r.qmdat,' ',r.mzeit) dateRepair,
             a.code,
             eq.eqCode,
             eq.eqName,
@@ -223,6 +225,7 @@
             (select sum(part.sumPrice) from bigpartapply bpa join partapply part on part.bigId = bpa.id where bpa.RUCode = a.code) cost
         FROM
             audit a
+        left join repair r on r.qmnum = a.code
         left JOIN equipment eq ON eq.eqCode = a.eqCode
         left JOIN pasture p ON p.id = eq.pastureId
         left join t_employee te on te.employee_id = a.personnelID
@@ -245,7 +248,7 @@
           and ( (a.oneAuditTime between #{audit.startAudit} and DATE_SUB(#{audit.endAudit}, INTERVAL -1 DAY)  ) or ( #{audit.startAudit} = '' and #{audit.endAudit}  = '' ))
           and (p.id = #{audit.pastureId} or #{audit.pastureId} = '')  and (eq.eqName like concat('%',#{audit.eqName},'%') or #{audit.eqName} = '')
           and (te.actual_name like concat('%',#{audit.repairPerson},'%') or #{audit.repairPerson} = '')
-        order by a.completionTime desc
+        order by a.date desc,a.completionTime desc
     </select>
     <select id="getManHourStatisticsCount" resultType="java.lang.Integer">
         SELECT