qushaowei
2023-08-31 33ceaa13a6c7c7be1b6d5c90ca05ca3e4bef0e11
增加生效失效时间
已修改12个文件
102 ■■■■■ 文件已修改
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyInspectionStandardController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceStandardController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/DailyInspectionStandard.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/InspectionCycle.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/MaintenanceCycle.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/MaintenanceStandard.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyInspectionStandardMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionCycleMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceCycleMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/DailyInspectionStandardController.java
@@ -25,6 +25,7 @@
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -262,6 +263,7 @@
    @Transactional(rollbackFor = { Exception.class })
    public Result<String> revise(@RequestBody DailyInspectionStandard dailyInspectionStandard) {
        dailyInspectionStandard.setId("");
        dailyInspectionStandard.setCreateTime(new Date());
        dailyInspectionStandardService.save(dailyInspectionStandard);
        List<DailyInspectionStandardDetail> dailyInspectionStandardDetaillist = dailyInspectionStandard.getDailyInspectionStandardDetaillist();
        DailyInspectionStandardDetail isd = null;
@@ -309,8 +311,10 @@
                .eq(DailyInspectionStandard::getVersionStatus, "2").list();
        for (DailyInspectionStandard standard : dailyInspectionStandards) {
            standard.setVersionStatus("3");
            standard.setLoseEfficacyTime(new Date());
            dailyInspectionStandardService.updateById(standard);
        }
        dailyInspectionStandard.setTakeEffectTime(new Date());
        boolean b = dailyInspectionStandardService.updateById(dailyInspectionStandard);
        if (b){
            return Result.OK("编辑成功!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/InspectionCycleController.java
@@ -382,8 +382,10 @@
        List<InspectionCycle> list = inspectionCycleService.lambdaQuery().eq(InspectionCycle::getCode, inspectionCycle.getCode()).eq(InspectionCycle::getVersionStatus, "2").list();
        for (InspectionCycle cycle : list) {
            cycle.setVersionStatus("3");
            cycle.setLoseEfficacyTime(new Date());
            inspectionCycleService.updateById(cycle);
        }
        inspectionCycle.setTakeEffectTime(new Date());
        boolean b = inspectionCycleService.updateById(inspectionCycle);
        if (b){
            return Result.OK("编辑成功!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceCycleController.java
@@ -386,8 +386,10 @@
                .orderByDesc(MaintenanceCycle::getVersion).list();
        for (MaintenanceCycle cycle : maintenanceCycles) {
            cycle.setVersionStatus("3");
            cycle.setLoseEfficacyTime(new Date());
            maintenanceCycleService.updateById(cycle);
        }
        maintenanceCycle.setTakeEffectTime(new Date());
        boolean b = maintenanceCycleService.updateById(maintenanceCycle);
        if (b){
            return Result.OK("生效成功!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/MaintenanceStandardController.java
@@ -27,6 +27,7 @@
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -285,6 +286,7 @@
        List<MaintenanceStandardWorkInstruction> maintenanceStandardWorkInstructionList = maintenanceStandardWorkInstructionService.lambdaQuery().eq(MaintenanceStandardWorkInstruction::getMaintenanceStandardId,maintenanceStandard.getId())
                .eq(MaintenanceStandardWorkInstruction::getDelFlag, CommonConstant.DEL_FLAG_0).list();
        maintenanceStandard.setId("");
        maintenanceStandard.setCreateTime(new Date());
        maintenanceStandardService.save(maintenanceStandard);
        //明细信息
        List<MaintenanceStandardDetail> maintenanceStandardDetailList = maintenanceStandard.getMaintenanceStandardDetaillist();
@@ -361,8 +363,10 @@
                .eq(MaintenanceStandard::getVersionStatus, "2").list();
        for (MaintenanceStandard standard : maintenanceStandardList) {
            standard.setVersionStatus("3");
            standard.setLoseEfficacyTime(new Date());
            maintenanceStandardService.updateById(standard);
        }
        maintenanceStandard.setTakeEffectTime(new Date());
        boolean b = maintenanceStandardService.updateById(maintenanceStandard);
        if (b){
            return Result.OK("生效成功!");
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/DailyInspectionStandard.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -10,6 +11,7 @@
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;
@@ -85,6 +87,24 @@
    @ApiModelProperty(value = "状态 0 禁用 1 启用")
    private String status = CommonConstant.STATUS_1;
    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间")
    @Excel(name = "生效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date takeEffectTime;
    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间")
    @Excel(name = "失效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date loseEfficacyTime;
    @TableField(exist = false)
    private List<DailyInspectionStandardDetail> dailyInspectionStandardDetaillist;
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/InspectionCycle.java
@@ -13,6 +13,7 @@
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -133,4 +134,22 @@
    @ApiModelProperty(value = "依据日历")
    private String accordingCalendar;
    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间")
    @Excel(name = "生效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date takeEffectTime;
    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间")
    @Excel(name = "失效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date loseEfficacyTime;
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/MaintenanceCycle.java
@@ -10,6 +10,7 @@
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -121,4 +122,22 @@
    @ApiModelProperty(value = "依据日历")
    private String accordingCalendar;
    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间")
    @Excel(name = "生效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date takeEffectTime;
    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间")
    @Excel(name = "失效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date loseEfficacyTime;
}
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/MaintenanceStandard.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -11,6 +12,7 @@
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.base.entity.JeecgEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.List;
@@ -99,6 +101,24 @@
    @ApiModelProperty(value = "标准分类(daily日常点检标准,specialty专业点检标准)")
    private String type;
    /**
     * 生效时间
     */
    @ApiModelProperty(value = "生效时间")
    @Excel(name = "生效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date takeEffectTime;
    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间")
    @Excel(name = "失效时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date loseEfficacyTime;
    @TableField(exist = false)
    private List<MaintenanceStandardDetail> maintenanceStandardDetaillist;
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyInspectionStandardMapper.xml
@@ -22,7 +22,9 @@
            t3.depart_name as useDepartName,
            t2.use_id as useId,
            t4.id as teamId,
            t4.name as teamName
            t4.name as teamName,
            t1.take_effect_time as takeEffectTime,
            t1.lose_efficacy_time as loseEfficacyTime
        FROM
            mom_eam_daily_inspection_standard t1
        LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionCycleMapper.xml
@@ -20,6 +20,8 @@
        t1.arrange_way arrangeWay,
        t1.audit_status auditStatus,
        t1.first_inspection_time as firstInspectionTime,
        t1.take_effect_time as takeEffectTime,
        t1.lose_efficacy_time as loseEfficacyTime,
        CONVERT(  VARCHAR(100), t1.first_inspection_time, 23 ) firstInspectionTime1,
        CONVERT(  VARCHAR(100), t1.first_inspection_time, 8 ) firstInspectionTime2,
        t1.lead_time leadTime,
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceCycleMapper.xml
@@ -19,6 +19,8 @@
        t1.arrange_way arrangeWay,
        t1.audit_status auditStatus,
        t1.first_maintenance_time as firstMaintenanceTime,
        t1.take_effect_time as takeEffectTime,
        t1.lose_efficacy_time as loseEfficacyTime,
        CONVERT(  VARCHAR(100), t1.first_maintenance_time, 23 ) firstMaintenanceTime1,
        CONVERT(  VARCHAR(100), t1.first_maintenance_time, 8 ) firstMaintenanceTime2,
        t1.lead_time leadTime,
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml
@@ -68,7 +68,9 @@
            t4.name as teamName,
            t2.use_id useId,
            t7.depart_name as useDepartName,
            t1.remark
            t1.remark,
            t1.take_effect_time as takeEffectTime,
            t1.lose_efficacy_time as loseEfficacyTime
        FROM
            mom_eam_maintenance_standard t1
        LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id