| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class DeviceRepairDto { |
| | | |
| | | @ApiModelProperty("设备报修id") |
| | |
| | | @ApiModelProperty("设备型号") |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("报修时间") |
| | | private Date repairTime; |
| | | |
| | | private String repairTimeStr; |
| | | @ApiModelProperty("报修时间开始") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime repairTimeStart; |
| | | |
| | | @ApiModelProperty("报修时间结束") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime repairTimeEnd; |
| | | |
| | | @ApiModelProperty("报修人") |
| | | private String repairName; |
| | |
| | | |
| | | private String deviceModel; |
| | | |
| | | @ApiModelProperty("报修时间") |
| | | private Date repairTime; |
| | | @ApiModelProperty("报修时间开始") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime repairTimeStart; |
| | | |
| | | @ApiModelProperty("报修时间结束") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime repairTimeEnd; |
| | | |
| | | @ApiModelProperty("报修人") |
| | | private String repairName; |
| | |
| | | deviceRepair.setRemark(deviceDefectRecord.getDefectDescription()); |
| | | //获取当前登录用户 |
| | | deviceRepair.setRepairName(SecurityUtils.getUsername()); |
| | | deviceRepair.setRepairTime(new Date()); |
| | | // deviceRepair.setRepairTime(new Date()); |
| | | deviceRepairMapper.insert(deviceRepair); |
| | | return deviceDefectRecordMapper.insert(deviceDefectRecord) > 0; |
| | | } else if (status.equals("一般缺陷")) { |
| | |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long deptId; |
| | | |
| | | @ApiModelProperty(value = "生产前是否存在异常") |
| | | private Boolean hasExceptionBefore; |
| | | |
| | | @ApiModelProperty(value = "生产中是否存在异常") |
| | | private Boolean hasExceptionAfter; |
| | | |
| | | @ApiModelProperty(value = "生产后是否存在异常") |
| | | private Boolean hasExceptionIssue; |
| | | } |
| | |
| | | <select id="queryPage" resultType="com.ruoyi.device.dto.DeviceRepairDto"> |
| | | select dr.id, |
| | | dr.device_ledger_id, |
| | | dr.repair_time, |
| | | dr.repair_name, |
| | | dr.remark, |
| | | dr.repair_project, |
| | | dr.repair_time_start as repairTimeStart, |
| | | dr.repair_time_end as repairTimeEnd, |
| | | dr.maintenance_name, |
| | | dr.maintenance_time, |
| | | dr.maintenance_result, |
| | |
| | | and dr.maintenance_name like concat('%',#{deviceRepairDto.maintenanceName},'%') |
| | | </if> |
| | | |
| | | <if test="deviceRepairDto.repairTimeStr != null and deviceRepairDto.repairTimeStr != '' "> |
| | | and dr.repair_time like concat('%',#{deviceRepairDto.repairTimeStr},'%') |
| | | </if> |
| | | |
| | | <if test="deviceRepairDto.maintenanceTimeStr != null and deviceRepairDto.maintenanceTimeStr != '' "> |
| | | and dr.maintenance_time like concat('%',#{deviceRepairDto.maintenanceTimeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by dr.status asc, dr.create_time desc |
| | | </select> |
| | | <select id="detailById" resultType="com.ruoyi.device.dto.DeviceRepairDto"> |
| | | select dr.id, |
| | | dr.device_ledger_id, |
| | | dr.repair_time, |
| | | dr.repair_name, |
| | | dr.remark, |
| | | dr.repair_project, |
| | | dr.repair_time_start as repairTimeStart, |
| | | dr.repair_time_end as repairTimeEnd, |
| | | dr.maintenance_name, |
| | | dr.maintenance_time, |
| | | dr.maintenance_result, |
| | |
| | | <if test="qualityInspect.entryDateEnd != null and qualityInspect.entryDateEnd != '' "> |
| | | AND qi.check_time <= DATE_FORMAT(#{qualityInspect.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | ORDER BY qi.check_time DESC |
| | | ORDER BY |
| | | CASE WHEN qi.check_result IS NULL OR qi.check_result = '' THEN 0 ELSE 1 END, |
| | | inspect_state, |
| | | qi.check_time DESC, |
| | | qi.id DESC |
| | | </select> |
| | | |
| | | <select id="qualityInspectExport" resultType="com.ruoyi.quality.pojo.QualityInspect"> |