浏览代码

操作证bug修复,超期保养计划sql bug修复

别傲 5 年之前
父节点
当前提交
f95702e23c

+ 0 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/maintenance/controller/MaintenanceRecordController.java

@@ -96,7 +96,6 @@ public class MaintenanceRecordController {
         if (Objects.nonNull(planBegin) && Objects.nonNull(planEnd)) {
             Validate.isTrue(planBegin.isBefore(planEnd), ValuePool.beginTimeToEndTimeIllegal(planBegin, planEnd));
         }
-        request.addDesc("plan_date");
         IPage<MtPlanResponse> pages = maintenancePlanService.pagePlanByCondition(request);
         Validate.notNull(pages, ValuePool.MAINTENANCE_PLAN_NOT_EXIST);
         List<MtPlanResponse> records = pages.getRecords();

+ 3 - 1
lift-business-service/src/main/resources/mapper/maintenance/MaintenancePlanMapper.xml

@@ -259,12 +259,14 @@
         <if test="cond.workDate != null">
             AND mp.work_date = #{cond.workDate}
         </if>
+		ORDER BY
+		plan_date DESC,record_status
     </select>
 
 	<!--日常保养-计划超期:根据条件总计条数-->
     <select id="countPlanByCondition" resultType="java.lang.Long" parameterType="cn.com.ty.lift.business.maintenance.dao.entity.model.request.MtPlanRequest">
         SELECT
-            count(*)
+            count(1)
         FROM
           maintenance_plan mp
         WHERE mp.plan_date &lt; date_format(now(),'%Y-%m-%d') AND mp.work_date IS NULL

+ 1 - 0
lift-enterprise-service/src/main/java/cn/com/ty/lift/enterprise/oa/controller/LiftCertificateController.java

@@ -85,6 +85,7 @@ public class LiftCertificateController {
         certificate.setIssuanceAgency(entity.getIssuanceAgency());
         certificate.setFirstImgUrl(entity.getFirstImgUrl());
         certificate.setSecondImgUrl(entity.getSecondImgUrl());
+        certificate.setStatus(3);
 
         boolean result = liftCertificateService.updateById(certificate);
         return RestResponse.success(result);