|
@@ -128,6 +128,8 @@ public class AnnualInspectionController {
|
|
|
/**
|
|
|
* status 状态(0 待完成;1 已完成;2 超期)
|
|
|
* 1 维保工确认年检计划。停止信息推送
|
|
|
+ * stepStatus : 1
|
|
|
+ * stepName: 1
|
|
|
*/
|
|
|
@PostMapping("confirm")
|
|
|
@Verifier(fields = {"liftId","mtCompanyId","planDate"})
|
|
@@ -142,7 +144,32 @@ public class AnnualInspectionController {
|
|
|
boolean ai = annualInspectionService.saveOrUpdate(entity);
|
|
|
return RestResponse.success(ai);
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 修改年检信息
|
|
|
+ * <p>
|
|
|
+ * status 状态(0 待完成;1 已完成;2 超期)
|
|
|
+ * stepStatus :年检阶段状态- 第一阶段 1-2,第二阶段 3,第三阶段 4-7,第四阶段 8-10
|
|
|
+ * stepName : 当前能操作的阶段
|
|
|
+ * <p>
|
|
|
+ * 1 维保工确认年检计划
|
|
|
+ * 2 维保工上传自检报告,选择自检时间 或者 文员设置 是否检查限速器和荷载年检设置,
|
|
|
+ * 文员也可以上传自检报告或者确认自检报告和自检时间,自检时间以最后设置的为准
|
|
|
+ * --------------------------------
|
|
|
+ * 3 企业文员确认现场检验时间
|
|
|
+ * 录入人员信息,政府质检,企业质检,联系电话
|
|
|
+ * --------------------------------
|
|
|
+ * 4 维保工上传检验结果, 如果有急修就关闭急修
|
|
|
+ * 5 企业文员确认检验结果-合格 --> 不能算年检超期
|
|
|
+ * 6 企业文员确认检验结果-整改 --> 回到第二阶段
|
|
|
+ * 7 企业文员确认检验结果-不合格 --> 可以算年检超期
|
|
|
+ * --------------------------------
|
|
|
+ * 8 维保工上传年检报告和合格证
|
|
|
+ * 9 企业文员确认年检报告和合格证-合格
|
|
|
+ * 10 企业文员确认年检报告和合格证-不合格 -->停用电梯
|
|
|
+ *
|
|
|
+ * @param entity AnnualInspection
|
|
|
+ * @return RestResponse
|
|
|
+ */
|
|
|
@PostMapping("update")
|
|
|
@Verifier(fields = {"id","mtCompanyId","isCheckGoverner","loadInspectionSetting"})
|
|
|
public RestResponse update(@RequestBody InspectionRequest entity){
|
|
@@ -199,10 +226,8 @@ public class AnnualInspectionController {
|
|
|
Verify.notNull(old, Verify.Inspection.confirm);
|
|
|
Integer oldStepName = old.getStepName();
|
|
|
Integer oldStepStatus = old.getStepStatus();
|
|
|
- Integer stepStatus = entity.getStepStatus();
|
|
|
Verify.isTrue(oldStepName == 1, "请进行第二阶段操作");
|
|
|
Verify.isTrue(oldStepStatus == 2 || oldStepStatus == 3, "请进行第二阶段操作");
|
|
|
- Verify.isTrue(stepStatus == 2 || stepStatus == 3, "请进行第二阶段操作");
|
|
|
|
|
|
old.setCheckDate(entity.getCheckDate());
|
|
|
old.setInspector(entity.getInspector());
|
|
@@ -211,11 +236,7 @@ public class AnnualInspectionController {
|
|
|
|
|
|
old.setStatus(0);
|
|
|
old.setStepStatus(3);
|
|
|
- if(stepStatus == 2){
|
|
|
- old.setStepName(2);
|
|
|
- }else if(stepStatus == 3){
|
|
|
- old.setStepName(3);//流转到阶段3
|
|
|
- }
|
|
|
+ old.setStepName(3);//流转到阶段3
|
|
|
|
|
|
boolean ai = annualInspectionService.saveOrUpdate(old);
|
|
|
return RestResponse.success(ai);
|
|
@@ -283,14 +304,16 @@ public class AnnualInspectionController {
|
|
|
old.setAnnualInspectionImg(entity.getAnnualInspectionImg());
|
|
|
old.setCertificateImgUrl(entity.getCertificateImgUrl());
|
|
|
|
|
|
- old.setFinishTime(LocalDateTime.now());
|
|
|
|
|
|
if(stepStatus == 8){
|
|
|
- old.setStatus(1);
|
|
|
+ old.setStatus(0);//未完成
|
|
|
} else if(stepStatus == 9){
|
|
|
- old.setStatus(1);
|
|
|
+ old.setStatus(1);//已完成
|
|
|
} else if(stepStatus == 10){
|
|
|
- old.setStatus(2);
|
|
|
+ old.setStatus(2);//超期
|
|
|
+ }
|
|
|
+ if(stepStatus == 9 || stepStatus == 10){
|
|
|
+ old.setFinishTime(LocalDateTime.now());
|
|
|
}
|
|
|
old.setStepName(4);
|
|
|
|