Merge remote-tracking branch 'origin/master'
| | |
| | | filterChainDefinitionMap.put("/jmreport/**", "anon"); |
| | | filterChainDefinitionMap.put("/**/*.js.map", "anon"); |
| | | filterChainDefinitionMap.put("/**/*.css.map", "anon"); |
| | | //设å¤ç¹æ£æå°æ¥å£æé¤ |
| | | filterChainDefinitionMap.put("/eam/eamInspectionOrder/exportInsOrderBaseInfo", "anon"); |
| | | filterChainDefinitionMap.put("/eam/eamInspectionOrder/exportInsOrderDetailList", "anon"); |
| | | filterChainDefinitionMap.put("/eam/eamInspectionOrder/exportInsOrderDetailUserList", "anon"); |
| | | filterChainDefinitionMap.put("/eam/eamInspectionOrder/exportWeekInsDetailList", "anon"); |
| | | filterChainDefinitionMap.put("/eam/eamInspectionOrder/exportWeekInsOrderDetailUserList", "anon"); |
| | | //设å¤å®å¥½çæ¥è¡¨æé¤ |
| | | filterChainDefinitionMap.put("/eam/repairOrder/equipmentAvailability", "anon"); |
| | | //ç产æ
éé´éæ¶é´æ¥è¡¨æé¤ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.constant; |
| | | |
| | | /** |
| | | * ç¹æ£ç»æåç±» |
| | | */ |
| | | public enum InspectionResultEnum { |
| | | NORMAL, //æ£å¸¸ |
| | | ANOMALY, //å¼å¸¸ |
| | | FAULT, //æ
é |
| | | CLOSE //å
³æº |
| | | } |
| | |
| | | /** |
| | | * æå±åç±» |
| | | */ |
| | | @Excel(name = "æå±åç±»", width = 15, orderNum = "5") |
| | | @Excel(name = "æå±åç±»", width = 15, orderNum = "5",dicCode = "equipment_category") |
| | | @ApiModelProperty(value = "æå±åç±»") |
| | | @Dict(dicCode = "equipment_category") |
| | | private String equipmentCategory; |
| | |
| | | /** |
| | | * è´¨ä¿å¼å§æ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 15, orderNum = "36") |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "36") |
| | | @ApiModelProperty(value = "è´¨ä¿å¼å§æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | /** |
| | | * è´¨ä¿ç»ææ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, orderNum = "37") |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "37") |
| | | @ApiModelProperty(value = "è´¨ä¿ç»ææ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**ææ°äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, orderNum = "39") |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "39") |
| | | @ApiModelProperty(value = "ææ°äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, orderNum = "40") |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "40") |
| | | @ApiModelProperty(value = "䏿¬¡äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**æ¬æ¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, orderNum = "41") |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "41") |
| | | @ApiModelProperty(value = "æ¬æ¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, orderNum = "42") |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "42") |
| | | @ApiModelProperty(value = "䏿¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**ææ°ææ¯ç¶æé´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, orderNum = "44") |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "44") |
| | | @ApiModelProperty(value = "ææ°ææ¯ç¶æé´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private java.util.Date latestTechnologyCheck; |
| | | /**ææ¯ç¶æä¸æ¬¡é´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, orderNum = "45") |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "45") |
| | | @ApiModelProperty(value = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | /** |
| | | * æå±åç±» |
| | | */ |
| | | @Excel(name = "æå±åç±»", width = 15, orderNum = "5") |
| | | @Excel(name = "æå±åç±»", width = 15, orderNum = "5",dicCode = "equipment_category") |
| | | @ApiModelProperty(value = "æå±åç±»") |
| | | @Dict(dicCode = "equipment_category") |
| | | private String equipmentCategory; |
| | |
| | | /** |
| | | * è´¨ä¿å¼å§æ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 15, orderNum = "36") |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 25, format = "yyyy/MM/dd", orderNum = "36") |
| | | @ApiModelProperty(value = "è´¨ä¿å¼å§æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | /** |
| | | * è´¨ä¿ç»ææ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, orderNum = "37") |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "37") |
| | | @ApiModelProperty(value = "è´¨ä¿ç»ææ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**ææ°äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, orderNum = "39") |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "39") |
| | | @ApiModelProperty(value = "ææ°äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, orderNum = "40") |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "40") |
| | | @ApiModelProperty(value = "䏿¬¡äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**æ¬æ¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, orderNum = "41") |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd",orderNum = "41") |
| | | @ApiModelProperty(value = "æ¬æ¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, orderNum = "42") |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "42") |
| | | @ApiModelProperty(value = "䏿¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**ææ°ææ¯ç¶æé´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, orderNum = "44") |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "44") |
| | | @ApiModelProperty(value = "ææ°ææ¯ç¶æé´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private java.util.Date latestTechnologyCheck; |
| | | /**ææ¯ç¶æä¸æ¬¡é´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, orderNum = "45") |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "45") |
| | | @ApiModelProperty(value = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | private String orderId; |
| | | /**ç¹æ£ç»æ*/ |
| | | @Excel(name = "ç¹æ£ç»æ", width = 15) |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸") |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸-æ
é-å
³æº") |
| | | private String inspectionResult; |
| | | /**å¼å¸¸æè¿°*/ |
| | | @Excel(name = "å¼å¸¸æè¿°", width = 15) |
| | |
| | | private Date planInspectionDate; |
| | | /**ç¹æ£ç»æ*/ |
| | | @Excel(name = "ç¹æ£ç»æ", width = 15) |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸") |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸-å
³æº-æ
é") |
| | | private String inspectionResult; |
| | | /**å¼å¸¸æè¿°*/ |
| | | @Excel(name = "å¼å¸¸æè¿°", width = 15) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-09 |
| | | * @Description: ç¹æ£é¡¹åºç¡ä¿¡æ¯å¯¼åºè¯¦ç» |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="è¿å对象", description="ç¹æ£å·¥ååºç¡ä¿¡æ¯å¯¼åºè¯¦ç»") |
| | | public class EamInsOrderDetailResultResponse implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -1779195782355233938L; |
| | | |
| | | /**ç¹æ£æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç¹æ£æ¥æ") |
| | | private Date inspectionDate; |
| | | /**ä¿å
»é¡¹åºå·*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹åºå·") |
| | | private Integer itemCode; |
| | | /**ä¿å
»é¡¹*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹") |
| | | private String itemName; |
| | | /**ä¿å
»è¦æ±*/ |
| | | @ApiModelProperty(value = "ä¿å
»è¦æ±") |
| | | private String itemDemand; |
| | | /**ç¹æ£ç»æ*/ |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸-") |
| | | private String inspectionResult; |
| | | |
| | | public EamInsOrderDetailResultResponse() { |
| | | } |
| | | |
| | | public EamInsOrderDetailResultResponse(Integer itemCode, String itemName, String itemDemand) { |
| | | this.itemCode = itemCode; |
| | | this.itemName = itemName; |
| | | this.itemDemand = itemDemand; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-09 |
| | | * @Description: æ¥ç¹æ£è´£ä»»äººè¿å对象 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="è¿å对象", description="æ¥ç¹æ£è´£ä»»äººè¿å导åºè¯¦ç»") |
| | | public class EamInsOrderDetailUserResponse implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 6369935960896727599L; |
| | | |
| | | /**ç¹æ£æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç¹æ£æ¥æ") |
| | | private Date inspectionDate; |
| | | |
| | | /**ç¹æ£äºº*/ |
| | | @ApiModelProperty(value = "ç¹æ£äºº-æ¯é¢å人") |
| | | private String operator; |
| | | |
| | | /**çç»é¿ç¡®è®¤*/ |
| | | @ApiModelProperty(value = "çç»é¿ç¡®è®¤--é¢åå产ç") |
| | | private String confirmUser; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-09 |
| | | * @Description: ç¹æ£å·¥ååºç¡ä¿¡æ¯å¯¼åºè¯¦ç» |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="è¿å对象", description="ç¹æ£å·¥ååºç¡ä¿¡æ¯å¯¼åºè¯¦ç»") |
| | | public class EamInspectionOrderBaseResponse implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -9051699099294744556L; |
| | | |
| | | @ApiModelProperty(value = "设å¤åç§°") |
| | | private String equipmentName; |
| | | |
| | | @ApiModelProperty(value = "设å¤åå·") |
| | | private String equipmentModel; |
| | | |
| | | @ApiModelProperty(value = "设å¤ç¼å·") |
| | | private String equipmentCode; |
| | | |
| | | @ApiModelProperty(value = "åä½") |
| | | private String factoryName; |
| | | |
| | | @ApiModelProperty(value = "å¹´") |
| | | private String inspectionYear; |
| | | |
| | | @ApiModelProperty(value = "æ") |
| | | private String inspectionMonth; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-09 |
| | | * @Description: å¨ç¹æ£ç»æå表 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="è¿å对象", description="å¨ç¹æ£å·¥ååºç¡ä¿¡æ¯å¯¼åºè¯¦ç»") |
| | | public class EamWeekInsDetailResultResponse implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -9051699099294744556L; |
| | | |
| | | /**计åç¹æ£æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "计åç¹æ£æ¥æ") |
| | | private Date planInspectionDate; |
| | | /**ä¿å
»é¡¹åºå·*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹åºå·") |
| | | private Integer itemCode; |
| | | /**ä¿å
»é¡¹*/ |
| | | @ApiModelProperty(value = "ä¿å
»é¡¹") |
| | | private String itemName; |
| | | /**ä¿å
»è¦æ±*/ |
| | | @ApiModelProperty(value = "ä¿å
»è¦æ±") |
| | | private String itemDemand; |
| | | /**ç¹æ£ç»æ*/ |
| | | @ApiModelProperty(value = "ç¹æ£ç»æ-æ£å¸¸-å¼å¸¸-æ
é-å
³æº") |
| | | private String inspectionResult; |
| | | |
| | | public EamWeekInsDetailResultResponse() { |
| | | } |
| | | |
| | | public EamWeekInsDetailResultResponse(Integer itemCode, String itemName, String itemDemand) { |
| | | this.itemCode = itemCode; |
| | | this.itemName = itemName; |
| | | this.itemDemand = itemDemand; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-10 |
| | | * @Description: å¨ç¹æ£è´£ä»»äººè¿å对象 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="è¿å对象", description="å¨ç¹æ£è´£ä»»äººè¿å导åºè¯¦ç»") |
| | | public class EamWeekInsDetailUserResponse implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -2269180394302345460L; |
| | | |
| | | /**ç¹æ£æ¥æ*/ |
| | | @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd") |
| | | @ApiModelProperty(value = "ç¹æ£æ¥æ") |
| | | private Date inspectionDate; |
| | | |
| | | /**ç¹æ£äºº*/ |
| | | @ApiModelProperty(value = "ç¹æ£äºº-æ¯é¢å人") |
| | | private String inspector; |
| | | |
| | | /**çç»é¿ç¡®è®¤*/ |
| | | @ApiModelProperty(value = "çç»é¿ç¡®è®¤--é¢åå产ç") |
| | | private String confirmUser; |
| | | } |
| | |
| | | sb.append(String.format("设å¤ç¼ç [%s]ä¿åå¤±è´¥ï¼æ æ³å¯¼å
¥\n\r", eamEquipment.getEquipmentCode())); |
| | | continue; |
| | | } |
| | | EamEquipmentExtend eamEquipmentExtend=new EamEquipmentExtend(); |
| | | BeanUtils.copyProperties(eamEquipmentExtend,equipment); |
| | | eamEquipmentExtendService.save(eamEquipmentExtend); |
| | | } |
| | | log.info("æ¶èæ¶é´" + (System.currentTimeMillis() - start) + "毫ç§"); |
| | | //update-end-author:taoyan date:20190528 for:æ¹éæå
¥æ°æ® |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¡¨ä½¿ç¨ qsw |
| | | * 2025-6-19 |
| | | * 导åºè·ååºæ¬ä¿¡æ¯ |
| | | * @param equipmentCode ç»ä¸ç¼ç |
| | | * @param inspectionDate æ¥æ |
| | | * @return |
| | | */ |
| | | @GetMapping("/findInspectionResult") |
| | | public JSONObject findInspectionResult(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | |
| | | String equipmentId = (String)params.get("equipmentId"); |
| | | String inspectionDate = (String)params.get("inspectionDate"); |
| | | |
| | | List<InspectionVo> inspectionVos = new ArrayList<>(); |
| | | List<Map<String, Object>> inspectionStandard = eamInspectionOrderService.findInspectionStandard(equipmentId); |
| | | for (Map<String, Object> map : inspectionStandard) { |
| | | List<InspectionVo> dayInspectionResult = eamInspectionOrderService.findInspectionResult(equipmentId,(String)map.get("itemDemand"),inspectionDate); |
| | | InspectionVo inspectionVo = new InspectionVo(); |
| | | inspectionVo.setInspectionContent((String)map.get("itemDemand")); |
| | | Object seq = map.get("seq"); |
| | | inspectionVo.setSeq(seq.toString()); |
| | | for (InspectionVo vo : dayInspectionResult) { |
| | | if("1".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay1(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("2".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay2(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("3".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay3(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("4".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay4(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("5".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay5(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("6".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay6(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("7".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay7(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("8".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay8(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("9".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay9(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("10".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay10(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("11".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay11(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("12".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay12(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("13".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay13(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("14".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay14(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("15".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay15(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("16".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay16(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("17".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay17(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("18".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay18(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("19".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay19(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("20".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay20(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("21".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay21(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("22".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay22(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("23".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay23(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("24".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay24(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("25".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay25(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("26".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay26(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("27".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay27(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("28".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay28(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("29".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay29(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("30".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay30(vo.getInspectionResult()); |
| | | continue; |
| | | }else if("31".equals(vo.getDayTime())){ |
| | | inspectionVo.setDay31(vo.getInspectionResult()); |
| | | continue; |
| | | } |
| | | } |
| | | inspectionVos.add(inspectionVo); |
| | | } |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",inspectionVos); |
| | | return jsonObject; |
| | | @GetMapping("/exportInsOrderBaseInfo") |
| | | public JSONObject exportInspectionOrderBaseInfo(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, |
| | | @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { |
| | | return eamInspectionOrderService.exportInspectionOrderBaseInfo(equipmentCode, inspectionDate); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¡¨ä½¿ç¨ qsw |
| | | * 2025-6-19 |
| | | * æ¥ç¹æ£é¡¹å表 |
| | | * @param equipmentCode ç»ä¸ç¼ç |
| | | * @param inspectionDate æ¥æ |
| | | * @return |
| | | */ |
| | | @GetMapping("/findInspectionUser") |
| | | public JSONObject findInspectionUser(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "1000") Integer pageSize, |
| | | @RequestParam Map<String, Object> params) { |
| | | |
| | | String equipmentId = (String)params.get("equipmentId"); |
| | | String inspectionDate = (String)params.get("inspectionDate"); |
| | | |
| | | List<InspectionVo> inspectionVos = new ArrayList<>(); |
| | | List<InspectionVo> inspectionUser = eamInspectionOrderService.findInspectionUser(equipmentId,inspectionDate); |
| | | InspectionVo inspectionVo = new InspectionVo(); |
| | | for (InspectionVo vo : inspectionUser) { |
| | | if("1".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator1(vo.getOperator()); |
| | | inspectionVo.setConfirmUser1(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("2".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator2(vo.getOperator()); |
| | | inspectionVo.setConfirmUser2(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("3".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator3(vo.getOperator()); |
| | | inspectionVo.setConfirmUser3(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("4".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator4(vo.getOperator()); |
| | | inspectionVo.setConfirmUser4(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("5".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator5(vo.getOperator()); |
| | | inspectionVo.setConfirmUser5(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("6".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator6(vo.getOperator()); |
| | | inspectionVo.setConfirmUser6(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("7".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator7(vo.getOperator()); |
| | | inspectionVo.setConfirmUser7(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("8".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator8(vo.getOperator()); |
| | | inspectionVo.setConfirmUser8(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("9".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator9(vo.getOperator()); |
| | | inspectionVo.setConfirmUser9(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("10".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator10(vo.getOperator()); |
| | | inspectionVo.setConfirmUser10(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("11".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator11(vo.getOperator()); |
| | | inspectionVo.setConfirmUser11(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("12".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator12(vo.getOperator()); |
| | | inspectionVo.setConfirmUser12(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("13".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator13(vo.getOperator()); |
| | | inspectionVo.setConfirmUser13(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("14".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator14(vo.getOperator()); |
| | | inspectionVo.setConfirmUser14(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("15".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator15(vo.getOperator()); |
| | | inspectionVo.setConfirmUser15(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("16".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator16(vo.getOperator()); |
| | | inspectionVo.setConfirmUser16(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("17".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator17(vo.getOperator()); |
| | | inspectionVo.setConfirmUser17(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("18".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator18(vo.getOperator()); |
| | | inspectionVo.setConfirmUser18(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("19".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator19(vo.getOperator()); |
| | | inspectionVo.setConfirmUser19(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("20".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator20(vo.getOperator()); |
| | | inspectionVo.setConfirmUser20(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("21".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator21(vo.getOperator()); |
| | | inspectionVo.setConfirmUser21(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("22".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator22(vo.getOperator()); |
| | | inspectionVo.setConfirmUser22(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("23".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator23(vo.getOperator()); |
| | | inspectionVo.setConfirmUser23(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("24".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator24(vo.getOperator()); |
| | | inspectionVo.setConfirmUser24(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("25".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator25(vo.getOperator()); |
| | | inspectionVo.setConfirmUser25(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("26".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator26(vo.getOperator()); |
| | | inspectionVo.setConfirmUser26(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("27".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator27(vo.getOperator()); |
| | | inspectionVo.setConfirmUser27(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("28".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator28(vo.getOperator()); |
| | | inspectionVo.setConfirmUser28(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("29".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator29(vo.getOperator()); |
| | | inspectionVo.setConfirmUser29(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("30".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator30(vo.getOperator()); |
| | | inspectionVo.setConfirmUser30(vo.getConfirmUser()); |
| | | continue; |
| | | }else if("31".equals(vo.getDayTime())){ |
| | | inspectionVo.setOperator31(vo.getOperator()); |
| | | inspectionVo.setConfirmUser31(vo.getConfirmUser()); |
| | | continue; |
| | | } |
| | | } |
| | | inspectionVos.add(inspectionVo); |
| | | // } |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("data",inspectionVos); |
| | | return jsonObject; |
| | | @GetMapping("/exportInsOrderDetailList") |
| | | public JSONObject exportInspectionOrderDetailList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, |
| | | @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { |
| | | return eamInspectionOrderService.exportInspectionOrderDetailList(equipmentCode, inspectionDate); |
| | | } |
| | | |
| | | /** |
| | | * æ¥ç¹æ£è´£ä»»äººå表 |
| | | * @param equipmentCode ç»ä¸ç¼ç |
| | | * @param inspectionDate æ¥æ |
| | | * @return |
| | | */ |
| | | @GetMapping("/exportInsOrderDetailUserList") |
| | | public JSONObject exportInspectionOrderDetailUserList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, |
| | | @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { |
| | | return eamInspectionOrderService.exportInspectionOrderDetailUserList(equipmentCode, inspectionDate); |
| | | } |
| | | |
| | | /** |
| | | * å¨ç¹æ£é¡¹å表 |
| | | * @param equipmentCode ç»ä¸ç¼ç |
| | | * @param inspectionDate æ¥æ |
| | | * @return |
| | | */ |
| | | @GetMapping("/exportWeekInsDetailList") |
| | | public JSONObject exportWeekInsDetailList(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, |
| | | @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { |
| | | return eamInspectionOrderService.exportWeekInsDetailList(equipmentCode, inspectionDate); |
| | | } |
| | | |
| | | /** |
| | | * å¨ç¹æ£è´£ä»»äººå表 |
| | | * @param equipmentCode ç»ä¸ç¼ç |
| | | * @param inspectionDate æ¥æ |
| | | * @return |
| | | */ |
| | | @GetMapping("/exportWeekInsOrderDetailUserList") |
| | | public JSONObject exportInspectionOrder(@RequestParam(name = "equipmentCode", required = true) String equipmentCode, |
| | | @RequestParam(name = "inspectionDate", required = true) String inspectionDate) { |
| | | return eamInspectionOrderService.exportWeekInsOrderDetailUserList(equipmentCode, inspectionDate); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | /** |
| | | * @Description: ä¿å
»æ å |
| | |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamMaintenanceStandard entity = eamMaintenanceStandardService.getById(id); |
| | | if (entity != null&&entity.getStandardStatus().equals(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name())) { |
| | | //åªå é¤ç¶æä¸ºå¾
æäº¤ç |
| | | i.getAndIncrement(); |
| | | entity.setDelFlag(CommonConstant.DEL_FLAG_1); |
| | | eamMaintenanceStandardService.updateById(entity); |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | return Result.OK("æ¹éå 餿å,å·²å é¤ç¶æä¸ºå¾
æäº¤çä¿å
»æ åï¼å 餿°é为"+i); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | | file.getOriginalFilename(); |
| | | return eamMaintenanceStandardService.importPointInspectionExcel(file); |
| | | String fileName = file.getOriginalFilename(); |
| | | Result<?> importResult=eamMaintenanceStandardService.importPointInspectionExcel(file); |
| | | if (importResult.isSuccess()) { |
| | | successCount++; |
| | | } else { |
| | | results.put(fileName, importResult.getMessage()); |
| | | failureCount++; |
| | | } |
| | | } |
| | | |
| | | // æå»ºååº |
| | | Map<String, Object> response = new HashMap<>(); |
| | | response.put("results", results); |
| | | response.put("totalFiles", fileMap.size()); |
| | | response.put("successCount", successCount); |
| | | response.put("failureCount", failureCount); |
| | | |
| | | return Result.ok("导å
¥å®æ" + response); |
| | | // æå»ºæç»ååº |
| | | return getResult(results, fileMap.size(), successCount, failureCount); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("ç¹æ£å¯¼å
¥å¤çå¼å¸¸", e); |
| | |
| | | |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | | file.getOriginalFilename(); |
| | | return eamMaintenanceStandardService.importMaintenanceStandard(file, "SECOND"); |
| | | String fileName = file.getOriginalFilename(); |
| | | Result<?> importResult=eamMaintenanceStandardService.importMaintenanceStandard(file, "SECOND"); |
| | | if (importResult.isSuccess()) { |
| | | successCount++; |
| | | } else { |
| | | results.put(fileName, importResult.getMessage()); |
| | | failureCount++; |
| | | } |
| | | } |
| | | |
| | | // æå»ºæç»ååº |
| | | Map<String, Object> response = new HashMap<>(); |
| | | response.put("results", results); |
| | | response.put("totalFiles", fileMap.size()); |
| | | response.put("successCount", successCount); |
| | | response.put("failureCount", failureCount); |
| | | |
| | | return Result.ok("导å
¥å®æ"+response); |
| | | return getResult(results, fileMap.size(), successCount, failureCount); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("导å
¥å¤çå¼å¸¸", e); |
| | |
| | | |
| | | for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) { |
| | | MultipartFile file = entity.getValue(); |
| | | file.getOriginalFilename(); |
| | | return eamMaintenanceStandardService.importMaintenanceStandard(file, "THIRD"); |
| | | String fileName = file.getOriginalFilename(); |
| | | Result<?> importResult= eamMaintenanceStandardService.importMaintenanceStandard(file, "THIRD"); |
| | | if (importResult.isSuccess()) { |
| | | successCount++; |
| | | } else { |
| | | results.put(fileName, importResult.getMessage()); |
| | | failureCount++; |
| | | } |
| | | } |
| | | |
| | | // æå»ºæç»ååº |
| | | Map<String, Object> response = new HashMap<>(); |
| | | response.put("results", results); |
| | | response.put("totalFiles", fileMap.size()); |
| | | response.put("successCount", successCount); |
| | | response.put("failureCount", failureCount); |
| | | |
| | | return Result.ok("导å
¥å®æ"+response); |
| | | return getResult(results, fileMap.size(), successCount, failureCount); |
| | | |
| | | } catch (Exception e) { |
| | | log.error("导å
¥å¤çå¼å¸¸", e); |
| | |
| | | } |
| | | } |
| | | |
| | | private Result<?> getResult(Map<String, String> results, int fileCount, int successCount, int failureCount) { |
| | | List<String> response = new ArrayList<>(); |
| | | response.add("æ»æä»¶æ°ï¼" + fileCount); |
| | | response.add("æåæ°ï¼" + successCount); |
| | | response.add("失败æ°ï¼" + failureCount); |
| | | if (failureCount > 0) { |
| | | response.add("é误信æ¯ï¼" + results.values()); |
| | | return Result.error("é¨åæä»¶å¯¼å
¥å¤±è´¥ï¼" + response); |
| | | } |
| | | return Result.ok("æææä»¶å¯¼å
¥æåï¼" + response); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrder; |
| | | import org.jeecg.modules.eam.entity.EamWeekMaintenanceOrder; |
| | | import org.jeecg.modules.eam.vo.InspectionVo; |
| | | import org.jeecg.modules.eam.request.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description: ç¹æ£å·¥å |
| | |
| | | * @return |
| | | */ |
| | | IPage<EamInspectionOrder> queryPageList(Page<EamInspectionOrder> page, @Param(Constants.WRAPPER) QueryWrapper<EamInspectionOrder> queryWrapper); |
| | | /** |
| | | * ç¹æ£æ¥è¡¨ new |
| | | */ |
| | | List<InspectionVo> findInspectionResult(@Param("equipmentId")String equipmentId, @Param("itemDemand")String itemDemand,@Param("yearMonth")String yearMonth); |
| | | |
| | | List<InspectionVo> findInspectionUser(@Param("equipmentId")String equipmentId,@Param("yearMonth")String yearMonth); |
| | | EamInspectionOrderBaseResponse findInsOrderBaseInfo(@Param("equipmentCode") String equipmentCode, @Param("inspectionDate") String inspectionDate); |
| | | |
| | | List<Map<String,Object>> findInspectionStandard(@Param("equipmentId")String equipmentId); |
| | | List<EamInsOrderDetailResultResponse> findInsOrderDetailList(@Param("equipmentCode") String equipmentCode, @Param("inspectionDate") String inspectionDate); |
| | | |
| | | List<EamInsOrderDetailUserResponse> findInspectionOrderDetailUserList(@Param("equipmentCode") String equipmentCode, @Param("inspectionDate") String inspectionDate); |
| | | |
| | | List<EamWeekInsDetailResultResponse> findWeekInsDetailList(@Param("equipmentCode") String equipmentCode, @Param("inspectionDate") String inspectionDate); |
| | | |
| | | List<EamWeekInsDetailUserResponse> findWeekInsOrderDetailUserList(@Param("equipmentCode") String equipmentCode, @Param("inspectionDate") String inspectionDate); |
| | | } |
| | |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <select id="findInspectionUser" parameterType="String" resultType="org.jeecg.modules.eam.vo.InspectionVo"> |
| | | |
| | | SELECT |
| | | t2.realname operator, |
| | | t3.realname as confirmUser, |
| | | CONVERT(VARCHAR, DATEPART(DAY, t1.inspection_date)) as dayTime |
| | | <select id="findInsOrderBaseInfo" resultType="org.jeecg.modules.eam.request.EamInspectionOrderBaseResponse"> |
| | | SELECT TOP 1 |
| | | t2.equipment_name equipmentName, |
| | | t2.equipment_code equipmentCode, |
| | | t2.equipment_model equipmentModel, |
| | | t2.factory_org_code factoryName, |
| | | DATEPART( YEAR, t1.inspection_date ) AS inspectionYear, |
| | | DATEPART( MONTH, t1.inspection_date ) AS inspectionMonth |
| | | FROM |
| | | eam_inspection_order t1 |
| | | left join sys_user t2 on t1.operator = t2.username |
| | | left join sys_user t3 on t1.confirm_user = t3.username |
| | | WHERE t1.del_flag = '0' |
| | | AND t1.equipment_id = #{equipmentId} |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.inspection_date, 120 ), 1, 7 ) = SUBSTRING(CONVERT(VARCHAR(10),#{yearMonth}, 120 ), 1, 7 ) |
| | | </select> |
| | | |
| | | <select id="findInspectionResult" parameterType="String" resultType="org.jeecg.modules.eam.vo.InspectionVo"> |
| | | |
| | | SELECT |
| | | t1.item_demand as inspectionContent, |
| | | CONVERT(VARCHAR, DATEPART(DAY, t2.inspection_date)) as dayTime, |
| | | case t1.inspection_result when '1' then 'â' when '2' then 'x' else '' end as inspectionResult |
| | | FROM |
| | | eam_inspection_order_detail t1 |
| | | LEFT JOIN eam_inspection_order t2 ON t1.order_id = t2.id |
| | | WHERE t1.item_demand = #{itemDemand} |
| | | and t2.equipment_id = #{equipmentId} |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t2.inspection_date, 120 ), 1, 7 ) = SUBSTRING(CONVERT(VARCHAR(10),#{yearMonth}, 120 ), 1, 7 ) |
| | | </select> |
| | | |
| | | <select id="findInspectionStandard" parameterType="String" resultType="Map"> |
| | | SELECT |
| | | ROW_NUMBER() OVER (ORDER BY t1.id) AS seq, |
| | | t1.item_demand as itemDemand |
| | | FROM |
| | | eam_maintenance_standard_detail t1 |
| | | LEFT JOIN eam_maintenance_standard t2 ON t1.standard_id = t2.id |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | WHERE |
| | | t2.maintenance_category = 'POINT_INSPECTION' |
| | | AND t2.standard_status = 'NORMAL' |
| | | and equipment_id =#{equipmentId} |
| | | t2.equipment_code = #{equipmentCode} |
| | | AND t1.inspection_date LIKE CONCAT(#{inspectionDate},'%') |
| | | AND t1.inspection_status = 'COMPLETE' |
| | | ORDER BY |
| | | item_code ASC |
| | | t1.inspection_date DESC |
| | | </select> |
| | | |
| | | <select id="findInsOrderDetailList" resultType="org.jeecg.modules.eam.request.EamInsOrderDetailResultResponse"> |
| | | SELECT |
| | | t1.inspection_date inspectionDate, |
| | | t2.item_code item_code, |
| | | t2.item_name item_name, |
| | | t2.item_demand item_demand, |
| | | t2.inspection_result inspection_result |
| | | FROM |
| | | eam_inspection_order t1 |
| | | LEFT JOIN eam_inspection_order_detail t2 ON t1.id = t2.order_id |
| | | LEFT JOIN eam_equipment t3 ON t1.equipment_id = t3.id |
| | | WHERE |
| | | t3.equipment_code = #{equipmentCode} |
| | | AND t1.inspection_date LIKE CONCAT(#{inspectionDate},'%') |
| | | AND t1.inspection_status = 'COMPLETE' |
| | | GROUP BY |
| | | t1.inspection_date, |
| | | t2.item_code, |
| | | t2.item_name, |
| | | t2.item_demand, |
| | | t2.inspection_result |
| | | ORDER BY |
| | | t1.inspection_date ASC |
| | | </select> |
| | | |
| | | <select id="findInspectionOrderDetailUserList" resultType="org.jeecg.modules.eam.request.EamInsOrderDetailUserResponse"> |
| | | SELECT |
| | | t1.inspection_date inspectionDate, |
| | | t1.operator, |
| | | t1.confirm_user confirmUser |
| | | FROM |
| | | eam_inspection_order t1 |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | WHERE |
| | | t2.equipment_code = #{equipmentCode} |
| | | AND t1.inspection_date LIKE CONCAT(#{inspectionDate},'%') |
| | | AND t1.inspection_status = 'COMPLETE' |
| | | GROUP BY |
| | | t1.inspection_date, |
| | | t1.operator, |
| | | t1.confirm_user |
| | | ORDER BY |
| | | t1.inspection_date ASC |
| | | </select> |
| | | |
| | | <select id="findWeekInsDetailList" resultType="org.jeecg.modules.eam.request.EamWeekInsDetailResultResponse"> |
| | | SELECT |
| | | t1.plan_inspection_date, |
| | | t1.item_code, |
| | | t1.item_name, |
| | | t1.item_demand, |
| | | t1.inspection_result |
| | | |
| | | FROM |
| | | eam_week_inspection_detail t1 |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | LEFT JOIN eam_inspection_order t3 ON t3.inspection_date = t1.plan_inspection_date |
| | | AND t3.equipment_id = t1.equipment_id |
| | | WHERE |
| | | t2.equipment_code = #{equipmentCode} |
| | | AND t3.inspection_date LIKE CONCAT(#{inspectionDate},'%') |
| | | AND t3.inspection_status = 'COMPLETE' |
| | | GROUP BY |
| | | t1.plan_inspection_date, |
| | | t1.item_code, |
| | | t1.item_name, |
| | | t1.item_demand, |
| | | t1.inspection_result |
| | | ORDER BY |
| | | t1.plan_inspection_date ASC |
| | | </select> |
| | | |
| | | <select id="findWeekInsOrderDetailUserList" resultType="org.jeecg.modules.eam.request.EamWeekInsDetailUserResponse"> |
| | | SELECT |
| | | t1.plan_inspection_date, |
| | | t1.inspector, |
| | | t3.confirm_user |
| | | FROM |
| | | eam_week_inspection_detail t1 |
| | | LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id |
| | | LEFT JOIN eam_inspection_order t3 ON t3.inspection_date = t1.plan_inspection_date |
| | | AND t3.equipment_id = t1.equipment_id |
| | | WHERE |
| | | t2.equipment_code = #{equipmentCode} |
| | | AND t3.inspection_date LIKE CONCAT(#{inspectionDate},'%') |
| | | AND t3.inspection_status = 'COMPLETE' |
| | | GROUP BY |
| | | t1.plan_inspection_date, |
| | | t1.inspector, |
| | | t3.confirm_user |
| | | ORDER BY |
| | | t1.plan_inspection_date ASC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | List<EamInspectionOrder> selectUnCompleteOrder(String expiredDate); |
| | | |
| | | /** |
| | | * ç¹æ£æ¥è¡¨ new |
| | | * 导åºè·ååºæ¬ä¿¡æ¯ |
| | | */ |
| | | List<InspectionVo> findInspectionResult(String equipmentId, String itemDemand,String yearMonth); |
| | | JSONObject exportInspectionOrderBaseInfo(String equipmentCode, String inspectionDate); |
| | | |
| | | List<InspectionVo> findInspectionUser(String equipmentId,String yearMonth); |
| | | /** |
| | | * æ¥ç¹æ£é¡¹å表 |
| | | */ |
| | | JSONObject exportInspectionOrderDetailList(String equipmentCode, String inspectionDate); |
| | | |
| | | List<Map<String,Object>> findInspectionStandard(String equipmentId); |
| | | /** |
| | | * æ¥ç¹æ£è´£ä»»äººå表 |
| | | */ |
| | | JSONObject exportInspectionOrderDetailUserList(String equipmentCode, String inspectionDate); |
| | | |
| | | /** |
| | | * å¨ç¹æ£é¡¹å表 |
| | | */ |
| | | JSONObject exportWeekInsDetailList(String equipmentCode, String inspectionDate); |
| | | |
| | | /** |
| | | * å¨ç¹æ£è´£ä»»äººå表 |
| | | */ |
| | | JSONObject exportWeekInsOrderDetailUserList(String equipmentCode, String inspectionDate); |
| | | } |
| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; |
| | | import org.jeecg.modules.eam.constant.*; |
| | | import org.jeecg.modules.eam.request.*; |
| | | import org.jeecg.modules.system.entity.BaseFactory; |
| | | import org.jeecg.modules.system.entity.BaseFactoryUser; |
| | | import org.jeecg.modules.system.service.IBaseFactoryService; |
| | | import org.jeecg.modules.system.service.IBaseFactoryUserService; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.EquipmentOperationTagEnum; |
| | | import org.jeecg.modules.eam.constant.InspectionItemCategroyEnum; |
| | | import org.jeecg.modules.eam.constant.InspectionStatus; |
| | | import org.jeecg.modules.eam.entity.*; |
| | | import org.jeecg.modules.eam.mapper.EamInspectionOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamInspectionOrderRequest; |
| | | import org.jeecg.modules.eam.service.*; |
| | | import org.jeecg.modules.eam.util.DateUtils; |
| | | import org.jeecg.modules.eam.vo.InspectionVo; |
| | |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.service.ISysDictService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.IntStream; |
| | | |
| | | /** |
| | | * @Description: ç¹æ£å·¥å |
| | |
| | | private IEamReportRepairService eamReportRepairService; |
| | | @Resource |
| | | private IEamMaintenanceStandardDetailService eamMaintenanceStandardDetailService; |
| | | @Resource |
| | | private ISysDictService sysDictService; |
| | | |
| | | @Override |
| | | public IPage<EamInspectionOrder> queryPageList(Page<EamInspectionOrder> page, EamInspectionOrderQuery query) { |
| | |
| | | return eamInspectionOrderMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè·ååºæ¬ä¿¡æ¯ |
| | | * @param equipmentCode 设å¤ç¼ç |
| | | * @param inspectionDate ç¹æ£æ¥æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public JSONObject exportInspectionOrderBaseInfo(String equipmentCode, String inspectionDate) { |
| | | // åå»ºç»æå¯¹è±¡ |
| | | JSONObject result = new JSONObject(); |
| | | EamInspectionOrderBaseResponse eamInspectionOrderBaseResponse = eamInspectionOrderMapper.findInsOrderBaseInfo(equipmentCode, inspectionDate); |
| | | // å¤çåä½ |
| | | String factoryOrgCode = eamInspectionOrderBaseResponse.getFactoryName(); |
| | | BaseFactory baseFactory = baseFactoryService.getOne(new LambdaQueryWrapper<BaseFactory>().eq(BaseFactory::getOrgCode, factoryOrgCode.substring(0, 6))); |
| | | eamInspectionOrderBaseResponse.setFactoryName(baseFactory.getFactoryName()); |
| | | result.put("data",Collections.singletonList(eamInspectionOrderBaseResponse)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ¥ç¹æ£é¡¹å表 |
| | | * @param equipmentCode 设å¤ç¼ç |
| | | * @param inspectionDate ç¹æ£æ¥æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public JSONObject exportInspectionOrderDetailList(String equipmentCode, String inspectionDate) { |
| | | // åå»ºç»æå¯¹è±¡ |
| | | JSONObject result = new JSONObject(); |
| | | List<EamInsOrderDetailResultResponse> eamInsOrderDetailResultResponseList = eamInspectionOrderMapper.findInsOrderDetailList(equipmentCode, inspectionDate); |
| | | if (eamInsOrderDetailResultResponseList == null || eamInsOrderDetailResultResponseList.isEmpty()) { |
| | | return result; |
| | | } |
| | | Map<EamInsOrderDetailResultResponse, List<EamInsOrderDetailResultResponse>> groupMap = eamInsOrderDetailResultResponseList |
| | | .stream().collect(Collectors.groupingBy( |
| | | // åç»é®ï¼å
å« itemCodeãitemNameãitemDemand ç对象 |
| | | item -> new EamInsOrderDetailResultResponse( |
| | | item.getItemCode(), |
| | | item.getItemName(), |
| | | item.getItemDemand() |
| | | ), |
| | | // ç¨ TreeMap ä½ä¸ºå®¹å¨ï¼å¹¶æå®æ itemCode æåºçæ¯è¾å¨ |
| | | () -> new TreeMap<>(Comparator.comparingInt(EamInsOrderDetailResultResponse::getItemCode)), |
| | | // æ¶éæ¯ç»çå
ç´ ä¸º List |
| | | Collectors.toList() |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | groupMap.forEach((insOrderDetailResultResponse, insOrderDetailResultResponseList) -> { |
| | | Map<String, Object> resultMap = new LinkedHashMap<>(); |
| | | resultMap.put("itemCode", insOrderDetailResultResponse.getItemCode()); |
| | | resultMap.put("itemName", insOrderDetailResultResponse.getItemName()); |
| | | resultMap.put("itemDemand", insOrderDetailResultResponse.getItemDemand()); |
| | | Map<Integer, EamInsOrderDetailResultResponse> collect = insOrderDetailResultResponseList |
| | | .stream().collect(Collectors.toMap( |
| | | // åç»é®ï¼æåæ¥æä¸çâ天â |
| | | item -> { |
| | | Date date = item.getInspectionDate(); |
| | | LocalDate localDate = date.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDate(); |
| | | return localDate.getDayOfMonth(); // é®ä¸ºâ天âï¼1-31ï¼ |
| | | }, |
| | | // å¼ï¼ç´æ¥ä½¿ç¨å½å对象ï¼ä½ä¸ºåå§å¼ï¼ |
| | | item -> item, |
| | | // å并彿°ï¼å½åä¸â天âæå¤ä¸ªå¯¹è±¡æ¶ï¼å¦ä½å¤çï¼è¿é示ä¾å第ä¸ä¸ªï¼ |
| | | (existing, replacement) -> existing // è¥æéå¤é®ï¼ä¿çå·²åå¨ç对象 |
| | | )); |
| | | for (int i = 1; i <= 31; i++) { |
| | | if (collect.containsKey(i)) { |
| | | String inspectionResult = ""; |
| | | switch (collect.get(i).getInspectionResult()) { |
| | | case "NORMAL": |
| | | inspectionResult = "â"; |
| | | break; |
| | | case "ANOMALY": |
| | | inspectionResult = "Ã"; |
| | | break; |
| | | case "FAULT": |
| | | inspectionResult = "â³"; |
| | | break; |
| | | case "CLOSE": |
| | | inspectionResult = "T"; |
| | | break; |
| | | } |
| | | resultMap.put("inspectionResult" + i, inspectionResult); |
| | | } else { |
| | | resultMap.put("inspectionResult" + i, ""); |
| | | } |
| | | } |
| | | resultList.add(resultMap); |
| | | }); |
| | | result.put("data", resultList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * æ¥ç¹æ£è´£ä»»äººå表 |
| | | * @param equipmentCode 设å¤ç¼ç |
| | | * @param inspectionDate ç¹æ£æ¥æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public JSONObject exportInspectionOrderDetailUserList(String equipmentCode, String inspectionDate) { |
| | | // åå»ºç»æå¯¹è±¡ |
| | | JSONObject result = new JSONObject(); |
| | | List<EamInsOrderDetailUserResponse> eamInsOrderDetailUserResponseList = eamInspectionOrderMapper.findInspectionOrderDetailUserList(equipmentCode, inspectionDate); |
| | | if (eamInsOrderDetailUserResponseList == null || eamInsOrderDetailUserResponseList.isEmpty()) { |
| | | return result; |
| | | } |
| | | Map<Integer, EamInsOrderDetailUserResponse> groupMap = eamInsOrderDetailUserResponseList.stream().collect(Collectors.toMap( |
| | | // åç»é®ï¼æåæ¥æä¸çâ天â |
| | | item -> { |
| | | Date date = item.getInspectionDate(); |
| | | LocalDate localDate = date.toInstant() |
| | | .atZone(ZoneId.systemDefault()) |
| | | .toLocalDate(); |
| | | return localDate.getDayOfMonth(); // é®ä¸ºâ天âï¼1-31ï¼ |
| | | }, |
| | | // å¼ï¼ç´æ¥ä½¿ç¨å½å对象ï¼ä½ä¸ºåå§å¼ï¼ |
| | | item -> item, |
| | | // å并彿°ï¼å½åä¸â天âæå¤ä¸ªå¯¹è±¡æ¶ï¼å¦ä½å¤çï¼è¿é示ä¾å第ä¸ä¸ªï¼ |
| | | (existing, replacement) -> existing // è¥æéå¤é®ï¼ä¿çå·²åå¨ç对象 |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | for (int i = 1; i <= 31; i++) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | if (groupMap.containsKey(i)) { |
| | | EamInsOrderDetailUserResponse eamInsOrderDetailUserResponse = groupMap.get(i); |
| | | resultMap.put("operator" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamInsOrderDetailUserResponse.getOperator())); |
| | | resultMap.put("confirmUser" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamInsOrderDetailUserResponse.getConfirmUser())); |
| | | } else { |
| | | resultMap.put("operator" + i, ""); |
| | | resultMap.put("confirmUser" + i, ""); |
| | | } |
| | | resultList.add(resultMap); |
| | | } |
| | | result.put("data", resultList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * å¨ç¹æ£é¡¹å表 |
| | | * @param equipmentCode 设å¤ç¼ç |
| | | * @param inspectionDate ç¹æ£æ¥æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public JSONObject exportWeekInsDetailList(String equipmentCode, String inspectionDate) { |
| | | // åå»ºç»æå¯¹è±¡ |
| | | JSONObject result = new JSONObject(); |
| | | List<EamWeekInsDetailResultResponse> eamWeekInsDetailResultResponseList = eamInspectionOrderMapper.findWeekInsDetailList(equipmentCode, inspectionDate); |
| | | if (eamWeekInsDetailResultResponseList == null || eamWeekInsDetailResultResponseList.isEmpty()) { |
| | | return result; |
| | | } |
| | | Map<EamWeekInsDetailResultResponse, List<EamWeekInsDetailResultResponse>> groupMap = eamWeekInsDetailResultResponseList |
| | | .stream().collect(Collectors.groupingBy( |
| | | // åç»é®ï¼å
å« itemCodeãitemNameãitemDemand ç对象 |
| | | item -> new EamWeekInsDetailResultResponse( |
| | | item.getItemCode(), |
| | | item.getItemName(), |
| | | item.getItemDemand() |
| | | ), |
| | | // ç¨ TreeMap ä½ä¸ºå®¹å¨ï¼å¹¶æå®æ itemCode æåºçæ¯è¾å¨ |
| | | () -> new TreeMap<>(Comparator.comparingInt(EamWeekInsDetailResultResponse::getItemCode)), |
| | | // æ¶éæ¯ç»çå
ç´ ä¸º List |
| | | Collectors.toList() |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | groupMap.forEach((weekInsDetailResultResponse, weekInsDetailResultResponseList) -> { |
| | | Map<String, Object> resultMap = new LinkedHashMap<>(); |
| | | resultMap.put("itemCode", weekInsDetailResultResponse.getItemCode()); |
| | | resultMap.put("itemName", weekInsDetailResultResponse.getItemName()); |
| | | resultMap.put("itemDemand", weekInsDetailResultResponse.getItemDemand()); |
| | | // 使ç¨AtomicIntegerä½ä¸ºè®¡æ°å¨ï¼ä»1å¼å§ |
| | | AtomicInteger counter = new AtomicInteger(1); |
| | | Map<Integer, EamWeekInsDetailResultResponse> collect = weekInsDetailResultResponseList |
| | | .stream() |
| | | .collect(Collectors.toMap( |
| | | // åç»é®ï¼ä½¿ç¨èªå¢åºå·ï¼ä»1å¼å§ï¼ |
| | | item -> counter.getAndIncrement(), |
| | | // å¼ï¼ç´æ¥ä½¿ç¨å½å对象 |
| | | item -> item, |
| | | // å并彿°ï¼å½åä¸åºå·æå¤ä¸ªå¯¹è±¡æ¶ï¼ç论ä¸ä¸ä¼åçï¼ï¼å¦ä½å¤ç |
| | | (existing, replacement) -> existing, // è¥æéå¤é®ï¼ä¿çå·²åå¨ç对象 |
| | | // æå®Mapçå
·ä½å®ç°ï¼å¯éï¼ |
| | | LinkedHashMap::new // ä¿ææå
¥é¡ºåº |
| | | )); |
| | | for (int i = 1; i <= 5; i++) { |
| | | if (collect.containsKey(i)) { |
| | | String inspectionResult = ""; |
| | | switch (collect.get(i).getInspectionResult()) { |
| | | case "NORMAL": |
| | | inspectionResult = "â"; |
| | | break; |
| | | case "ANOMALY": |
| | | inspectionResult = "Ã"; |
| | | break; |
| | | case "FAULT": |
| | | inspectionResult = "â³"; |
| | | break; |
| | | case "CLOSE": |
| | | inspectionResult = "T"; |
| | | break; |
| | | } |
| | | resultMap.put("inspectionResult" + i, inspectionResult); |
| | | } else { |
| | | resultMap.put("inspectionResult" + i, ""); |
| | | } |
| | | } |
| | | resultList.add(resultMap); |
| | | }); |
| | | result.put("data", resultList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * å¨ç¹æ£è´£ä»»äººå表 |
| | | * @param equipmentCode 设å¤ç¼ç |
| | | * @param inspectionDate ç¹æ£æ¥æ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public JSONObject exportWeekInsOrderDetailUserList(String equipmentCode, String inspectionDate) { |
| | | // åå»ºç»æå¯¹è±¡ |
| | | JSONObject result = new JSONObject(); |
| | | List<EamWeekInsDetailUserResponse> eamWeekInsDetailUserResponseList = eamInspectionOrderMapper.findWeekInsOrderDetailUserList(equipmentCode, inspectionDate); |
| | | if (eamWeekInsDetailUserResponseList == null || eamWeekInsDetailUserResponseList.isEmpty()) { |
| | | return result; |
| | | } |
| | | // 使ç¨AtomicIntegerä½ä¸ºè®¡æ°å¨ï¼ä»1å¼å§ |
| | | AtomicInteger counter = new AtomicInteger(1); |
| | | Map<Integer, EamWeekInsDetailUserResponse> groupMap = eamWeekInsDetailUserResponseList |
| | | .stream() |
| | | .collect(Collectors.toMap( |
| | | // åç»é®ï¼ä½¿ç¨èªå¢åºå·ï¼ä»1å¼å§ï¼ |
| | | item -> counter.getAndIncrement(), |
| | | // å¼ï¼ç´æ¥ä½¿ç¨å½å对象ï¼ä½ä¸ºåå§å¼ï¼ |
| | | item -> item, |
| | | // å并彿°ï¼å½åä¸â天âæå¤ä¸ªå¯¹è±¡æ¶ï¼å¦ä½å¤çï¼è¿é示ä¾å第ä¸ä¸ªï¼ |
| | | (existing, replacement) -> existing // è¥æéå¤é®ï¼ä¿çå·²åå¨ç对象 |
| | | )); |
| | | List<Map<String, Object>> resultList = new ArrayList<>(); |
| | | for (int i = 1; i <= 5; i++) { |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | | if (groupMap.containsKey(i)) { |
| | | EamWeekInsDetailUserResponse eamWeekInsDetailUserResponse = groupMap.get(i); |
| | | resultMap.put("operator" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamWeekInsDetailUserResponse.getInspector())); |
| | | resultMap.put("confirmUser" + i, sysDictService.queryTableDictTextByKey("sys_user", "realname", "username", eamWeekInsDetailUserResponse.getConfirmUser())); |
| | | } else { |
| | | resultMap.put("operator" + i, ""); |
| | | resultMap.put("confirmUser" + i, ""); |
| | | } |
| | | resultList.add(resultMap); |
| | | } |
| | | result.put("data", resultList); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result<String> addInspectionOrder(EamInspectionOrderRequest eamInspectionOrderRequest) { |
| | |
| | | if (CollectionUtils.isNotEmpty(maintenanceStandardDetailList)) { |
| | | List<EamWeekInspectionDetail> weekInspectionDetailList = maintenanceStandardDetailList.stream().map(EamWeekInspectionDetail::new).collect(Collectors.toList()); |
| | | weekInspectionDetailList.forEach(weekInspectionDetail -> { |
| | | weekInspectionDetail.setEquipmentId(eamInspectionOrderRequest.getEquipmentId()); |
| | | weekInspectionDetail.setStandardId(eamInspectionOrderRequest.getStandardId()); |
| | | // TODO å¨ç¹æ£æ¥æ |
| | | weekInspectionDetail.setPlanInspectionDate(eamInspectionOrderRequest.getInspectionDate()); |
| | |
| | | return (List<String>) object; |
| | | } |
| | | |
| | | @Override |
| | | public List<InspectionVo> findInspectionResult(String equipmentId, String itemDemand, String yearMonth) { |
| | | return this.baseMapper.findInspectionResult(equipmentId, itemDemand, yearMonth); |
| | | } |
| | | |
| | | @Override |
| | | public List<InspectionVo> findInspectionUser(String equipmentId, String yearMonth) { |
| | | return this.baseMapper.findInspectionUser(equipmentId, yearMonth); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> findInspectionStandard(String equipmentId) { |
| | | return this.baseMapper.findInspectionStandard(equipmentId); |
| | | } |
| | | } |