|
|
@@ -18,6 +18,7 @@ import io.swagger.annotations.*;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springblade.constant.BusinessConstant;
|
|
|
+import org.springblade.constant.DictBusinessConstant;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springblade.core.log.annotation.ApiLog;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
@@ -30,10 +31,16 @@ import org.springblade.core.tool.utils.ConcurrentDateFormat;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
|
|
|
import org.springblade.enums.InspectionStatusEnum;
|
|
|
+import org.springblade.enums.OrderCloseEnum;
|
|
|
+import org.springblade.enums.OrderConfirmEnum;
|
|
|
+import org.springblade.enums.OrderStatusEnum;
|
|
|
+import org.springblade.modules.baseinfo.dict.entity.DictInfoEntity;
|
|
|
import org.springblade.modules.baseinfo.org.entity.DeptRegionEntity;
|
|
|
import org.springblade.modules.baseinfo.org.service.IDeptRegionService;
|
|
|
import org.springblade.modules.baseinfo.rtu.entity.RtuInfoEntity;
|
|
|
import org.springblade.modules.baseinfo.rtu.service.IRtuBaseInfoService;
|
|
|
+import org.springblade.modules.business.check.order.entity.CheckOrderInfoEntity;
|
|
|
+import org.springblade.modules.business.check.process.dto.OrderProcessInfoDTO;
|
|
|
import org.springblade.modules.business.equipment.inspection.base.dto.EquipmentInspectionInfoDTO;
|
|
|
import org.springblade.modules.business.equipment.inspection.base.entity.EquipmentInspectionInfoEntity;
|
|
|
import org.springblade.modules.business.equipment.inspection.base.service.IEquipmentInspectionService;
|
|
|
@@ -90,7 +97,7 @@ public class EquipmentInspectionReportController extends BladeController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 分页
|
|
|
+ * 巡检填报信息
|
|
|
*/
|
|
|
@GetMapping("/list")
|
|
|
@ApiImplicitParams({
|
|
|
@@ -100,30 +107,30 @@ public class EquipmentInspectionReportController extends BladeController {
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation(value = "分页")
|
|
|
public R<List<EquipmentInspectionReportVO>> list(@ApiIgnore EquipmentInspectionReportDTO inspectionReportDTO) {
|
|
|
- if (inspectionReportDTO.getInspectionYear() != null) {
|
|
|
- Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.setTime(year);
|
|
|
- calendar.set(Calendar.MONTH, 0);
|
|
|
- calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
- calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
- inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
|
|
|
- calendar.add(Calendar.YEAR, 1);
|
|
|
- inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
- } else {
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.setTime(new Date());
|
|
|
- calendar.set(Calendar.MONTH, 0);
|
|
|
- calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
- calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
- calendar.set(Calendar.MINUTE, 0);
|
|
|
- calendar.set(Calendar.SECOND, 0);
|
|
|
- inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
|
|
|
- calendar.add(Calendar.YEAR, 1);
|
|
|
- inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
- }
|
|
|
+// if (inspectionReportDTO.getInspectionYear() != null) {
|
|
|
+// Date year = Func.parseDate(inspectionReportDTO.getInspectionYear(), "yyyy-MM-dd");
|
|
|
+// Calendar calendar = Calendar.getInstance();
|
|
|
+// calendar.setTime(year);
|
|
|
+// calendar.set(Calendar.MONTH, 0);
|
|
|
+// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+// calendar.set(Calendar.MINUTE, 0);
|
|
|
+// calendar.set(Calendar.SECOND, 0);
|
|
|
+// inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
|
|
|
+// calendar.add(Calendar.YEAR, 1);
|
|
|
+// inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
+// } else {
|
|
|
+// Calendar calendar = Calendar.getInstance();
|
|
|
+// calendar.setTime(new Date());
|
|
|
+// calendar.set(Calendar.MONTH, 0);
|
|
|
+// calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+// calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+// calendar.set(Calendar.MINUTE, 0);
|
|
|
+// calendar.set(Calendar.SECOND, 0);
|
|
|
+// inspectionReportDTO.setInspectionYearStartDate(calendar.getTime());
|
|
|
+// calendar.add(Calendar.YEAR, 1);
|
|
|
+// inspectionReportDTO.setInspectionYearEndDate(calendar.getTime());
|
|
|
+// }
|
|
|
List<EquipmentInspectionReportVO> list = reportService.selectList(inspectionReportDTO);
|
|
|
for (EquipmentInspectionReportVO vo : list) {
|
|
|
EquipmentInspectionReportWrapper.build().entityVO(vo);
|
|
|
@@ -238,11 +245,10 @@ public class EquipmentInspectionReportController extends BladeController {
|
|
|
return R.fail("参数错误");
|
|
|
}
|
|
|
BladeUser user = AuthUtil.getUser();
|
|
|
-
|
|
|
reportService.save(inspectionReportEntity);
|
|
|
-
|
|
|
EquipmentInspectionInfoEntity inspectionInfoEntity = inspectionService.getById(inspectionReportEntity.getInspectionId());
|
|
|
inspectionInfoEntity.setInspectionStatus(InspectionStatusEnum.STATUS_CLOSE_APPROVE.getCode());
|
|
|
+ inspectionInfoEntity.setInspectionReportId(inspectionReportEntity.getId());
|
|
|
inspectionService.updateById(inspectionInfoEntity);
|
|
|
// Calendar dt = Calendar.getInstance();
|
|
|
// dt.setTime(new Date());
|
|
|
@@ -1293,4 +1299,5 @@ public class EquipmentInspectionReportController extends BladeController {
|
|
|
BladeFile bladeFile = ossBuilder.template().putFile(file);
|
|
|
return R.data(bladeFile);
|
|
|
}
|
|
|
+
|
|
|
}
|