Merge remote-tracking branch 'origin/master'
| | |
| | | "avatar": "", |
| | | "version": "4.9.2", |
| | | "createdTime": "2025-3-10 16:38:19", |
| | | "updatedTime": "2025-7-9 19:20:22", |
| | | "updatedTime": "2025-7-10 10:43:18", |
| | | "dbConns": [], |
| | | "profile": { |
| | | "default": { |
| | |
| | | "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" |
| | | }, |
| | | { |
| | | "defKey": "order_id", |
| | | "defName": "å·¥åID", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "16120F75-6AA7-4483-868D-F07F511BB081", |
| | | "id": "237E6137-D268-4FDF-95F1-C20B95DE6F98" |
| | | }, |
| | | { |
| | | "defKey": "item_code", |
| | | "defName": "åºå·", |
| | | "comment": "", |
| | |
| | | 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 //å
³æº |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¡¨ä½¿ç¨ 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); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationOrderService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * @Description: ææ¯ç¶æé´å®å·¥å |
| | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamTechnicalStatusEvaluationOrder |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥å-å页å表æ¥è¯¢", notes="ææ¯ç¶æé´å®å·¥å-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamTechnicalStatusEvaluationOrder eamTechnicalStatusEvaluationOrder, |
| | | public Result<?> queryPageList(EamTechnicalStatusEvaluationOrderQuery query, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamTechnicalStatusEvaluationOrder> queryWrapper = QueryGenerator.initQueryWrapper(eamTechnicalStatusEvaluationOrder, req.getParameterMap()); |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) { |
| | | Page<EamTechnicalStatusEvaluationOrder> page = new Page<EamTechnicalStatusEvaluationOrder>(pageNo, pageSize); |
| | | IPage<EamTechnicalStatusEvaluationOrder> pageList = eamTechnicalStatusEvaluationOrderService.page(page, queryWrapper); |
| | | IPage<EamTechnicalStatusEvaluationOrder> pageList = eamTechnicalStatusEvaluationOrderService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | |
| | | eamTechnicalStatusEvaluationOrderService.updateById(eamTechnicalStatusEvaluationOrder); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥å-éè¿idå é¤") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥å-éè¿idå é¤", notes="ææ¯ç¶æé´å®å·¥å-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamTechnicalStatusEvaluationOrderService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥å-æ¹éå é¤") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥å-æ¹éå é¤", notes="ææ¯ç¶æé´å®å·¥å-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamTechnicalStatusEvaluationOrderService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥å-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥å-éè¿idæ¥è¯¢", notes="ææ¯ç¶æé´å®å·¥å-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamTechnicalStatusEvaluationOrder eamTechnicalStatusEvaluationOrder = eamTechnicalStatusEvaluationOrderService.getById(id); |
| | | return Result.OK(eamTechnicalStatusEvaluationOrder); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamTechnicalStatusEvaluationOrder |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamTechnicalStatusEvaluationOrder eamTechnicalStatusEvaluationOrder) { |
| | | return super.exportXls(request, eamTechnicalStatusEvaluationOrder, EamTechnicalStatusEvaluationOrder.class, "ææ¯ç¶æé´å®å·¥å"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamTechnicalStatusEvaluationOrder.class); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrderDetail; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationOrderDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | /** |
| | | * @Description: ææ¯ç¶æé´å®å·¥åæç» |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-09 |
| | |
| | | @RequestMapping("/eam/eamTechnicalStatusEvaluationOrderDetail") |
| | | public class EamTechnicalStatusEvaluationOrderDetailController extends JeecgController<EamTechnicalStatusEvaluationOrderDetail, IEamTechnicalStatusEvaluationOrderDetailService> { |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationOrderDetailService eamTechnicalStatusEvaluationOrderDetailService; |
| | | |
| | | private IEamTechnicalStatusEvaluationOrderDetailService orderDetailService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * 䏿¬¡å è½½ |
| | | * |
| | | * @param eamTechnicalStatusEvaluationOrderDetail |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-å页å表æ¥è¯¢", notes="ææ¯ç¶æé´å®å·¥åæç»-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamTechnicalStatusEvaluationOrderDetail eamTechnicalStatusEvaluationOrderDetail, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamTechnicalStatusEvaluationOrderDetail> queryWrapper = QueryGenerator.initQueryWrapper(eamTechnicalStatusEvaluationOrderDetail, req.getParameterMap()); |
| | | Page<EamTechnicalStatusEvaluationOrderDetail> page = new Page<EamTechnicalStatusEvaluationOrderDetail>(pageNo, pageSize); |
| | | IPage<EamTechnicalStatusEvaluationOrderDetail> pageList = eamTechnicalStatusEvaluationOrderDetailService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param eamTechnicalStatusEvaluationOrderDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥åæç»-æ·»å ") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-æ·»å ", notes="ææ¯ç¶æé´å®å·¥åæç»-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamTechnicalStatusEvaluationOrderDetail eamTechnicalStatusEvaluationOrderDetail) { |
| | | eamTechnicalStatusEvaluationOrderDetailService.save(eamTechnicalStatusEvaluationOrderDetail); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamTechnicalStatusEvaluationOrderDetail |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥åæç»-ç¼è¾") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-ç¼è¾", notes="ææ¯ç¶æé´å®å·¥åæç»-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamTechnicalStatusEvaluationOrderDetail eamTechnicalStatusEvaluationOrderDetail) { |
| | | eamTechnicalStatusEvaluationOrderDetailService.updateById(eamTechnicalStatusEvaluationOrderDetail); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥åæç»-éè¿idå é¤") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-éè¿idå é¤", notes="ææ¯ç¶æé´å®å·¥åæç»-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamTechnicalStatusEvaluationOrderDetailService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥åæç»-æ¹éå é¤") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-æ¹éå é¤", notes="ææ¯ç¶æé´å®å·¥åæç»-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamTechnicalStatusEvaluationOrderDetailService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥åæç»-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥åæç»-éè¿idæ¥è¯¢", notes="ææ¯ç¶æé´å®å·¥åæç»-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamTechnicalStatusEvaluationOrderDetail eamTechnicalStatusEvaluationOrderDetail = eamTechnicalStatusEvaluationOrderDetailService.getById(id); |
| | | return Result.OK(eamTechnicalStatusEvaluationOrderDetail); |
| | | @ApiOperation(value = "ææ¯ç¶æé´å®è§èæç»-ä¸å页å表æ¥è¯¢", notes = "ææ¯ç¶æé´å®è§èæç»-ä¸å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryList") |
| | | public Result<?> queryList(@RequestParam("orderId") String orderId) { |
| | | LambdaQueryWrapper<EamTechnicalStatusEvaluationOrderDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamTechnicalStatusEvaluationOrderDetail::getOrderId, orderId); |
| | | queryWrapper.orderByAsc(EamTechnicalStatusEvaluationOrderDetail::getCheckCategory); |
| | | queryWrapper.orderByAsc(EamTechnicalStatusEvaluationOrderDetail::getItemCode); |
| | | List<EamTechnicalStatusEvaluationOrderDetail> list = orderDetailService.list(queryWrapper); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamTechnicalStatusEvaluationOrderDetail |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamTechnicalStatusEvaluationOrderDetail eamTechnicalStatusEvaluationOrderDetail) { |
| | | return super.exportXls(request, eamTechnicalStatusEvaluationOrderDetail, EamTechnicalStatusEvaluationOrderDetail.class, "ææ¯ç¶æé´å®å·¥åæç»"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamTechnicalStatusEvaluationOrderDetail.class); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | /**夿³¨*/ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | //å表å±ç¤º |
| | | @TableField(exist = false) |
| | | private String equipmentCode; |
| | | @TableField(exist = false) |
| | | private String equipmentName; |
| | | @TableField(exist = false) |
| | | private String equipmentModel; |
| | | } |
| | |
| | | /**æ´æ°æ¶é´*/ |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | private Date updateTime; |
| | | /**å·¥åID*/ |
| | | @ApiModelProperty(value = "å·¥åID") |
| | | private String orderId; |
| | | /**åºå·*/ |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Integer itemCode; |
| | |
| | | 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); |
| | | } |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * @Description: ææ¯ç¶æé´å®å·¥å |
| | |
| | | */ |
| | | public interface EamTechnicalStatusEvaluationOrderMapper extends BaseMapper<EamTechnicalStatusEvaluationOrder> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | IPage<EamTechnicalStatusEvaluationOrder> queryPageList(Page<EamTechnicalStatusEvaluationOrder> page, @Param(Constants.WRAPPER) QueryWrapper<EamTechnicalStatusEvaluationOrder> queryWrapper); |
| | | } |
| | |
| | | ${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> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationOrderMapper"> |
| | | |
| | | <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder"> |
| | | select ems.*, e.equipment_code, e.equipment_name, e.equipment_model |
| | | from eam_technical_status_evaluation_order ems |
| | | inner join eam_equipment e |
| | | on ems.equipment_id = e.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class EamTechnicalStatusEvaluationOrderQuery { |
| | | private String orderNum; |
| | | private String equipmentId; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date dateBegin; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date dateEnd; |
| | | private String evaluationStatus; |
| | | |
| | | private String column; |
| | | private String order; |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | | |
| | | /** |
| | | * @Description: ææ¯ç¶æé´å®å·¥å |
| | |
| | | */ |
| | | public interface IEamTechnicalStatusEvaluationOrderService extends IService<EamTechnicalStatusEvaluationOrder> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | IPage<EamTechnicalStatusEvaluationOrder> queryPageList(Page<EamTechnicalStatusEvaluationOrder> page, EamTechnicalStatusEvaluationOrderQuery query); |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import org.jeecg.modules.eam.mapper.EamTechnicalStatusEvaluationOrderMapper; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationOrderDetailService; |
| | | import org.jeecg.modules.eam.service.IEamTechnicalStatusEvaluationOrderService; |
| | | 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.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: ææ¯ç¶æé´å®å·¥å |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-09 |
| | | * @Date: 2025-07-09 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamTechnicalStatusEvaluationOrderServiceImpl extends ServiceImpl<EamTechnicalStatusEvaluationOrderMapper, EamTechnicalStatusEvaluationOrder> implements IEamTechnicalStatusEvaluationOrderService { |
| | | |
| | | @Autowired |
| | | private IBaseFactoryUserService baseFactoryUserService; |
| | | @Autowired |
| | | private IBaseFactoryService baseFactoryService; |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationOrderDetailService orderDetailService; |
| | | @Autowired |
| | | private IEamEquipmentService equipmentService; |
| | | @Autowired |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | |
| | | @Override |
| | | public IPage<EamTechnicalStatusEvaluationOrder> queryPageList(Page<EamTechnicalStatusEvaluationOrder> page, EamTechnicalStatusEvaluationOrderQuery query) { |
| | | QueryWrapper<EamTechnicalStatusEvaluationOrder> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("ems.del_flag", CommonConstant.DEL_FLAG_0); |
| | | //ç¨æ·æ°æ®æé |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null) { |
| | | return page; |
| | | } |
| | | if (StringUtils.isNotBlank(sysUser.getEamEquipmentIds())) { |
| | | //éæ©äºè®¾å¤ï¼æ ¹æ®è®¾å¤idè¿æ»¤è®¾å¤ |
| | | List<String> equipArr = Arrays.asList(sysUser.getEamEquipmentIds().split(",")); |
| | | queryWrapper.in("e.equipment_code", equipArr); |
| | | } else { |
| | | //没æéæ©è®¾å¤ï¼æ ¹æ®ä¸å¿è¿æ»¤è®¾å¤ |
| | | List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. |
| | | list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); |
| | | if (!CollectionUtils.isEmpty(baseFactoryUserList)) { |
| | | Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); |
| | | Set<String> factoryCodeList = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); |
| | | queryWrapper.in("e.factory_org_code", factoryCodeList); |
| | | } else { |
| | | return page; |
| | | } |
| | | } |
| | | if (query != null) { |
| | | //ç¼ç æ¨¡ç³æ¥è¯¢ |
| | | if (StringUtils.isNotBlank(query.getOrderNum())) { |
| | | queryWrapper.like("ems.order_num", query.getOrderNum()); |
| | | } |
| | | //è®¾å¤ |
| | | if (StringUtils.isNotBlank(query.getEquipmentId())) { |
| | | queryWrapper.eq("ems.equipment_id", query.getEquipmentId()); |
| | | } |
| | | |
| | | //ä¿å
»åç±» |
| | | if (StringUtils.isNotBlank(query.getEvaluationStatus())) { |
| | | queryWrapper.eq("ems.evaluation_status", query.getEvaluationStatus()); |
| | | } |
| | | if (query.getDateBegin() != null && query.getDateEnd() != null) { |
| | | queryWrapper.between("ems.evaluation_date", query.getDateBegin(), query.getDateEnd()); |
| | | } |
| | | //æåº |
| | | if (StringUtils.isNotBlank(query.getColumn()) && StringUtils.isNotBlank(query.getOrder())) { |
| | | String column = query.getColumn(); |
| | | if (column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) { |
| | | column = column.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX)); |
| | | } |
| | | if (DataBaseConstant.SQL_ASC.equalsIgnoreCase(query.getOrder())) { |
| | | queryWrapper.orderByAsc("ems." + oConvertUtils.camelToUnderline(column)); |
| | | } else { |
| | | queryWrapper.orderByDesc("ems." + oConvertUtils.camelToUnderline(column)); |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc("ems.create_time"); |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc("ems.create_time"); |
| | | } |
| | | queryWrapper.orderByDesc("ems.create_time"); |
| | | return this.getBaseMapper().queryPageList(page, queryWrapper); |
| | | } |
| | | } |