From 78c398d94f7bb4295ba3723d6919e4337ed2d243 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期五, 12 一月 2024 17:26:41 +0800 Subject: [PATCH] 维修履历导出 --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairOrder.java | 68 ++++++++--------- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml | 20 ++++ lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairOrderMapper.java | 10 ++ lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairOrderController.java | 67 ++++++++++++++-- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairOrderServiceImpl.java | 19 ++++ 5 files changed, 135 insertions(+), 49 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairOrderController.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairOrderController.java index 40f235d..63b372f 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairOrderController.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/RepairOrderController.java @@ -19,14 +19,19 @@ import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.entity.*; +import org.jeecg.modules.eam.mapper.RepairOrderMapper; import org.jeecg.modules.eam.service.*; import org.jeecg.modules.eam.vo.EquipmentAvailabilityVo; +import org.jeecg.modules.eam.vo.RepairReportExportVo; +import org.jeecg.modules.system.entity.SysUser; +import org.jeecg.modules.system.mapper.SysUserMapper; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ImportParams; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; @@ -99,6 +104,12 @@ @Autowired @Lazy private IdentityService sysIdentityService; + @Autowired + private RepairOrderMapper repairOrderMapper; + @Autowired + private SysUserMapper sysUserMapper; + @Value("${jeecg.path.upload}") + private String upLoadPath; @@ -321,15 +332,53 @@ return Result.OK("鎵归噺鍒犻櫎鎴愬姛!"); } - /** - * 瀵煎嚭 - * @return - */ - //@RequiresPermissions("org.jeecg.modules.demo:mom_eam_repair_order:exportXls") - @RequestMapping(value = "/exportXls") - public ModelAndView exportXls(HttpServletRequest request, RepairOrder repairOrder) { - return super.exportXls(request, repairOrder, RepairOrder.class, "缁翠慨宸ュ崟"); - } + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, RepairOrder repairOrder) { + // Step.1 缁勮鏌ヨ鏉′欢 + String title = "缁翠慨灞ュ巻"; + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + // Step.2 鑾峰彇瀵煎嚭鏁版嵁 + if(StringUtils.isNotBlank(repairOrder.getUserId())){ + SysUser user = sysUserMapper.selectById(repairOrder.getUserId()); + repairOrder.setTeamId(user.getTeamId()); + }else{ + repairOrder.setTeamId(""); + } + List<String> equipNums = new ArrayList<>(); + if(StringUtils.isNotBlank(repairOrder.getNums())){ + equipNums = Arrays.asList(repairOrder.getNums().trim().split("\n")).stream().filter(num->!num.equals("\n")).collect(Collectors.toList()); + } + List<RepairOrder> exportList = repairOrderMapper.getRepairOrderList(null,repairOrder.getId(), + repairOrder.getNum(), + repairOrder.getEquipmentNum(), + repairOrder.getEquipmentName(), + repairOrder.getStatus(), + repairOrder.getRepairOrderType(), + repairOrder.getEquipmentCategoryId(), + repairOrder.getFactoryModelId(), + repairOrder.getSpecificEquipment(), + repairOrder.getTeamId(), + equipNums, + repairOrder.getRepairOrderUda1(), + repairOrder.getFaultStartTime(), + repairOrder.getFaultEndTime(), + repairOrder.getCreateStartTime(), + repairOrder.getCreateEndTime(), + repairOrder.getEquipmentImportanceId()); + + // Step.3 AutoPoi 瀵煎嚭Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //姝ゅ璁剧疆鐨刦ilename鏃犳晥 ,鍓嶇浼氶噸鏇存柊璁剧疆涓�涓� + mv.addObject(NormalExcelConstants.FILE_NAME, title); + mv.addObject(NormalExcelConstants.CLASS, RepairOrder.class); + //update-begin--Author:liusq Date:20210126 for锛氬浘鐗囧鍑烘姤閿欙紝ImageBasePath鏈缃�-------------------- + ExportParams exportParams=new ExportParams(title + "鎶ヨ〃", "瀵煎嚭浜�:" + sysUser.getRealname(), title); + exportParams.setImageBasePath(upLoadPath); + //update-end--Author:liusq Date:20210126 for锛氬浘鐗囧鍑烘姤閿欙紝ImageBasePath鏈缃�---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + } /** * 瀵煎叆 diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairOrder.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairOrder.java index 158de49..affa498 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairOrder.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/RepairOrder.java @@ -38,31 +38,28 @@ @ApiModelProperty(value = "涓婚敭ID") private String id; /**缁翠慨璁㈠崟鍙�*/ - @Excel(name = "缁翠慨璁㈠崟鍙�", width = 15) + @Excel(name = "缁翠慨璁㈠崟鍙�", width = 15,orderNum = "5") @ApiModelProperty(value = "缁翠慨璁㈠崟鍙�") private String num; /**璁惧鍙拌处ID*/ - @Excel(name = "璁惧鍙拌处ID", width = 15) @ApiModelProperty(value = "璁惧鍙拌处ID") private String equipmentId; /**鏁呴殰鎶ヤ慨鍗旾D*/ - @Excel(name = "鏁呴殰鎶ヤ慨鍗旾D", width = 15) @ApiModelProperty(value = "鏁呴殰鎶ヤ慨鍗旾D") @Dict(dicCode = "id",dictTable ="mom_eam_equipment_report_repair",dicText = "num") private String reportRepairId; /**椤圭洰鎬х淮淇崟ID*/ - @Excel(name = "椤圭洰鎬х淮淇崟ID", width = 15) @ApiModelProperty(value = "椤圭洰鎬х淮淇崟ID") @Dict(dicCode = "id",dictTable ="mom_eam_project_maintenance_order",dicText = "num") private String projectMaintenanceOrderId; /**鐝粍ID*/ - @Excel(name = "鐝粍ID", width = 15) + @Excel(name = "缁翠慨鐝粍", width = 15,dicCode = "id",dictTable ="mom_base_team",dicText = "name",orderNum = "10") @ApiModelProperty(value = "鐝粍ID") @Dict(dicCode = "id",dictTable ="mom_base_team",dicText = "name") private String teamId; /**浣跨敤閮ㄩ棬ID*/ - @Excel(name = "浣跨敤閮ㄩ棬ID", width = 15) + @Excel(name = "浣跨敤閮ㄩ棬", width = 15,dicCode = "id",dictTable ="sys_depart",dicText = "depart_name",orderNum ="9" ) @ApiModelProperty(value = "浣跨敤閮ㄩ棬ID") @Dict(dicCode = "id",dictTable ="sys_depart",dicText = "depart_name") private String departId; @@ -87,97 +84,83 @@ @ApiModelProperty(value = "棰勯槻鎺柦") private String preventiveMeasure; /**鏁呴殰鎻忚堪*/ - @Excel(name = "鏁呴殰鎻忚堪", width = 15) + @Excel(name = "鏁呴殰鎻忚堪", width = 15,orderNum = "16") @ApiModelProperty(value = "鏁呴殰鎻忚堪") private String faultDescription; /**鏁呴殰鏃堕棿*/ - @Excel(name = "鏁呴殰鏃堕棿", width = 20, format = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "鏁呴殰鏃堕棿", width = 20, format = "yyyy-MM-dd HH:mm:ss",orderNum = "13") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "鏁呴殰鏃堕棿") private Date faultTime; /**鏁呴殰鐓х墖*/ - @Excel(name = "鏁呴殰鐓х墖", width = 15) @ApiModelProperty(value = "鏁呴殰鐓х墖") private String photo; /**鏄惁鍋滄満*/ - @Excel(name = "鏄惁鍋滄満", width = 15) @ApiModelProperty(value = "鏄惁鍋滄満") @Dict(dicCode = "is_stop") private String isStop; /**璁″垝寮�濮嬫椂闂�*/ - @Excel(name = "璁″垝寮�濮嬫椂闂�", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "璁″垝寮�濮嬫椂闂�") private Date planStartTime; /**璁″垝缁撴潫鏃堕棿*/ - @Excel(name = "璁″垝缁撴潫鏃堕棿", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "璁″垝缁撴潫鏃堕棿") private Date planEndTime; /**瀹為檯寮�濮嬫椂闂�*/ - @Excel(name = "瀹為檯寮�濮嬫椂闂�", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "瀹為檯寮�濮嬫椂闂�") private Date actualStartTime; /**瀹為檯缁撴潫鏃堕棿*/ - @Excel(name = "瀹為檯缁撴潫鏃堕棿", width = 20, format = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "瀹為檯缁撴潫鏃堕棿") private Date actualEndTime; /**棰嗗彇浜篒D*/ - @Excel(name = "棰嗗彇浜�", width = 15) @ApiModelProperty(value = "棰嗗彇浜篒D") @Dict(dicCode = "id",dictTable ="sys_user",dicText = "username") private String recipientUserId; /**鎶ヤ慨浜篒D*/ - @Excel(name = "鎶ヤ慨浜�", width = 15) @ApiModelProperty(value = "鎶ヤ慨浜篒D") @Dict(dicCode = "id",dictTable ="sys_user",dicText = "username") private String reportUserId; /**宸ユ椂瀹氶*/ - @Excel(name = "宸ユ椂瀹氶", width = 15) @ApiModelProperty(value = "宸ユ椂瀹氶") private BigDecimal workingHourQuota; /**宸ュ崟鎵ц鐘舵�侊紙鏁版嵁瀛楀吀锛歳epair_order_status锛�*/ - @Excel(name = "宸ュ崟鎵ц鐘舵�侊紙鏁版嵁瀛楀吀锛歳epair_order_status锛�", width = 15) @ApiModelProperty(value = "宸ュ崟鎵ц鐘舵�侊紙鏁版嵁瀛楀吀锛歵rue_repair_status锛�") @Dict(dicCode = "true_repair_status") + @Excel(name = "鐘舵��", width = 15,orderNum = "3",dicCode = "true_repair_status") private String status; /**缁翠繚鏂瑰紡*/ - @Excel(name = "缁翠繚鏂瑰紡", width = 15) @ApiModelProperty(value = "缁翠繚鏂瑰紡") @Dict(dicCode = "maintenance_method") private String maintenanceMethod; /**澶囩敤瀛楁1*/ - @Excel(name = "澶囩敤瀛楁1", width = 15) + @Excel(name = "缁翠慨鐘舵��", width = 15,orderNum = "4",dicCode = "repair_status" ) @ApiModelProperty(value = "澶囩敤瀛楁1") @Dict(dicCode = "repair_status") private String repairOrderUda1; /**澶囩敤瀛楁2*/ - @Excel(name = "澶囩敤瀛楁2", width = 15) @ApiModelProperty(value = "澶囩敤瀛楁2") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date repairOrderUda2; /**澶囩敤瀛楁3*/ - @Excel(name = "澶囩敤瀛楁3", width = 15) @ApiModelProperty(value = "澶囩敤瀛楁3") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date repairOrderUda3; /**澶囩敤瀛楁4*/ - @Excel(name = "澶囩敤瀛楁4", width = 15) @ApiModelProperty(value = "澶囩敤瀛楁4") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date repairOrderUda4; /**澶囩敤瀛楁5*/ - @Excel(name = "澶囩敤瀛楁5", width = 15) @ApiModelProperty(value = "澶囩敤瀛楁5") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @@ -189,6 +172,7 @@ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "鍒涘缓鏃堕棿") + @Excel(name = "宸ュ崟鍒涘缓鏃堕棿", width = 15,orderNum = "8",databaseFormat = "yyyy-MM-dd HH:mm:ss",exportFormat = "yyyy-MM-dd HH:mm:ss") private Date createTime; /**淇敼浜�*/ @ApiModelProperty(value = "淇敼浜�") @@ -199,59 +183,48 @@ @ApiModelProperty(value = "淇敼鏃堕棿") private Date updateTime; /**鍒犻櫎鐘舵��(0-姝e父,1-宸插垹闄�)*/ - @Excel(name = "鍒犻櫎鐘舵��(0-姝e父,1-宸插垹闄�)", width = 15) @ApiModelProperty(value = "鍒犻櫎鐘舵��(0-姝e父,1-宸插垹闄�)") @Dict(dicCode = "del_flag") private Integer delFlag = CommonConstant.DEL_FLAG_0; /**缁翠慨宸ュ崟绫诲瀷锛堟暟鎹瓧鍏革細repair_order_type,0:姝e父缁翠慨宸ュ崟锛�1:淇悗姹囨姤宸ュ崟锛�*/ - @Excel(name = "缁翠慨宸ュ崟绫诲瀷", width = 15) @ApiModelProperty(value = "缁翠慨宸ュ崟绫诲瀷") @Dict(dicCode = "repair_order_type") private Integer repairOrderType; /**绉熸埛ID*/ - @Excel(name = "绉熸埛ID", width = 15) @ApiModelProperty(value = "绉熸埛ID") private String tenantId; /**澶囨敞*/ - @Excel(name = "澶囨敞", width = 15) @ApiModelProperty(value = "澶囨敞") private String remark; /**浼佷笟ID*/ - @Excel(name = "浼佷笟ID", width = 15) @ApiModelProperty(value = "浼佷笟ID") private String enterpriseId; /**浼佷笟ID*/ - @Excel(name = "璐d换浜篒D", width = 15) @Dict(dicCode = "id",dictTable ="sys_user",dicText = "realname") @ApiModelProperty(value = "璐d换浜篒D") private String responsibilityId; /*濮斿鍗曚綅*/ - @Excel(name = "濮斿鍗曚綅", width = 15) @ApiModelProperty(value = "濮斿鍗曚綅") private String outsourcingUnit; /*瀹為檯宸ユ椂*/ - @Excel(name = "瀹為檯宸ユ椂", width = 15) @ApiModelProperty(value = "瀹為檯宸ユ椂") private BigDecimal actualHour; /**绱ф�ョ▼搴�*/ - @Excel(name = "绱ф�ョ▼搴�", width = 15) @ApiModelProperty(value = "绱ф�ョ▼搴�") @Dict(dicCode = "urgency") private String urgency; /**娲惧伐鏂瑰紡*/ - @Excel(name = "娲惧伐鏂瑰紡", width = 15) @ApiModelProperty(value = "娲惧伐鏂瑰紡") @Dict(dicCode = "dispatch_method") private String dispatchMethod; /**涓氬姟绫诲瀷*/ - @Excel(name = "涓氬姟绫诲瀷", width = 15) @ApiModelProperty(value = "涓氬姟绫诲瀷") @Dict(dicCode = "repair_order_business_type") private String businessType; @@ -262,12 +235,15 @@ @TableField(exist = false) + @Excel(name = "缁熶竴缂栫爜", width = 15,orderNum = "6") private String equipmentNum; @TableField(exist = false) + @Excel(name = "璁惧鍚嶇О", width = 15,orderNum = "7") private String equipmentName; @TableField(exist = false) + @Excel(name = "璁惧鍨嬪彿", width = 15,orderNum = "8") private String equipmentModel; @TableField(exist = false) private String reportRepairNum; @@ -284,6 +260,7 @@ @TableField(exist = false) @Dict(dicCode = "specific_equipment") + @Excel(name = "鍏抽敭璁惧鏍囪瘑", width = 15,orderNum = "0",dicCode = "specific_equipment") private String specificEquipment; @TableField(exist = false) List<RepairOrderFaultAnalysis> faultAnalysis; @@ -302,6 +279,7 @@ @TableField(exist = false) private String nums; @TableField(exist = false) + @Excel(name = "鎶ヤ慨浜�", width = 15,orderNum = "14") private String errUda2; @TableField(exist = false) @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @@ -311,7 +289,25 @@ private String errUda3; @TableField(exist = false) private BigDecimal faultHour; - + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(exist = false) + private Date faultStartTime; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(exist = false) + private Date faultEndTime; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(exist = false) + private Date createStartTime; + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @TableField(exist = false) + private Date createEndTime; + @TableField(exist = false) + @Excel(name = "ABC鏍囪瘑", width = 15,orderNum = "1") + private String equipmentImportanceId; } diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairOrderMapper.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairOrderMapper.java index a65ba19..fae1b4a 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairOrderMapper.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/RepairOrderMapper.java @@ -6,6 +6,7 @@ import org.jeecg.modules.eam.entity.RepairOrder; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import java.util.Date; import java.util.List; import java.util.Map; @@ -37,7 +38,14 @@ @Param("specificEquipment") String specificEquipment, @Param("teamId") String teamId, @Param("equipNums") List<String> equipNums, - @Param("repairOrderUda1") String repairOrderUda1 + @Param("repairOrderUda1") String repairOrderUda1, + @Param("faultStartTime") Date faultStartTime, + @Param("faultEndTime")Date faultEndTime, + @Param("createStartTime")Date createStartTime, + @Param("createEndTime")Date createEndTime, + @Param("equipmentImportanceId")String equipmentImportanceId + + ); IPage<Map<String, Object>> getUserTeam(IPage<Map> pageData, @Param("realname") String realname); diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml index baa6a45..b23c088 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml @@ -16,7 +16,6 @@ t1.preventive_measure preventiveMeasure, t1.fault_remove faultRemove, t1.fault_description faultDescription, - t1.fault_time faultTime, t1.photo photo, t1.is_stop isStop, t1.maintenance_method maintenanceMethod, @@ -47,10 +46,12 @@ report.accept_time acceptTime, report.err_uda3 errUda3, report.fault_hour faultHour, + report.fault_time faultTime, t2.num equipmentNum, t2.name equipmentName, t2.model equipmentModel, t2.specific_equipment specificEquipment, + t2.equipment_importance_id equipmentImportanceId, t3.depart_name departName, t4.name outsourcingUnitName, t5.realname responsibilityName, @@ -96,11 +97,26 @@ <if test="specificEquipment != null and specificEquipment != ''"> and t2.specific_equipment = #{specificEquipment} </if> + <if test="equipmentImportanceId != null and equipmentImportanceId != ''"> + and t2. equipment_importance_id = #{equipmentImportanceId} + </if> <if test="teamId != null and teamId != ''"> and t1.team_id = #{teamId} </if> <if test="repairOrderType != null and repairOrderType != ''"> - and t1.repair_order_type = #{repairOrderType} + and t1.repair_order_type = #{repairOrderType} + </if> + <if test="faultStartTime != null"> + and report.fault_time >= #{faultStartTime} + </if> + <if test="faultEndTime != null"> + and report.fault_time <= #{faultEndTime} + </if> + <if test="createStartTime != null"> + and t1.create_time >= #{createStartTime} + </if> + <if test="createEndTime != null"> + and t1.create_time <= #{createEndTime} </if> order by t1.create_time desc </select> diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairOrderServiceImpl.java index ab3294e..dfa8be0 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/RepairOrderServiceImpl.java @@ -105,7 +105,24 @@ if(StringUtils.isNotBlank(repairOrder.getNums())){ equipNums = Arrays.asList(repairOrder.getNums().trim().split("\n")).stream().filter(num->!num.equals("\n")).collect(Collectors.toList()); } - return page.setRecords(baseMapper.getRepairOrderList(page,repairOrder.getId(),repairOrder.getNum(),repairOrder.getEquipmentNum(),repairOrder.getEquipmentName(),repairOrder.getStatus(),repairOrder.getRepairOrderType(),repairOrder.getEquipmentCategoryId(),repairOrder.getFactoryModelId(),repairOrder.getSpecificEquipment(),repairOrder.getTeamId(),equipNums,repairOrder.getRepairOrderUda1())); + return page.setRecords(baseMapper.getRepairOrderList(page, + repairOrder.getId(), + repairOrder.getNum(), + repairOrder.getEquipmentNum(), + repairOrder.getEquipmentName(), + repairOrder.getStatus(), + repairOrder.getRepairOrderType(), + repairOrder.getEquipmentCategoryId(), + repairOrder.getFactoryModelId(), + repairOrder.getSpecificEquipment(), + repairOrder.getTeamId(), + equipNums, + repairOrder.getRepairOrderUda1(), + repairOrder.getFaultStartTime(), + repairOrder.getFaultEndTime(), + repairOrder.getCreateStartTime(), + repairOrder.getCreateEndTime(), + repairOrder.getEquipmentImportanceId())); } @Override -- Gitblit v1.9.3