| | |
| | | @Lazy |
| | | private IDailyInspectionStandardService dailyInspectionStandardService; |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private IAreaService areaService; |
| | | |
| | | // @Autowired |
| | | // private IUploadRelaService uploadRelaService; |
| | | // |
| | |
| | | String equipmentNum = (String)params.get("num"); |
| | | String dataTime = (String)params.get("dataTime"); |
| | | Equipment equipment = equipmentService.getOne(new LambdaQueryWrapper<Equipment>().eq(Equipment::getNum, equipmentNum).eq(Equipment::getDelFlag, 0)); |
| | | String workCenterId = equipment.getWorkCenterId(); |
| | | |
| | | Area area = areaService.getById(workCenterId); |
| | | |
| | | |
| | | List<Map<String, Object>> list1 = this.getInspectionStandars(equipmentNum,"day",dataTime); |
| | | List<Map<String, Object>> list2 = this.getUserQianzi(equipmentNum,"day",dataTime); |
| | |
| | | |
| | | mapResult.put("equipentNum",equipment.getNum()); |
| | | mapResult.put("equipentName",equipment.getName()); |
| | | mapResult.put("equipmentModel",equipment.getModel()); |
| | | if(area != null){ |
| | | mapResult.put("workCenterName",area.getName()); |
| | | } |
| | | mapResult.put("list1",list1); |
| | | mapResult.put("list2",list2); |
| | | mapResult.put("list3",list3); |
| | |
| | | String name = (String)map.get("name"); |
| | | String detectionStandard = (String)map.get("detectionStandard"); |
| | | List<Map<String, Object>> record = inspectionOrderService.findDayInspectionStandardProject(equipmentNum,name, detectionStandard,dataTime); |
| | | |
| | | List<InspectionResultVo> listS = new ArrayList<>(); |
| | | |
| | | for (Map<String, Object> r : record) { |
| | |
| | | and t4.num = '-1' |
| | | </if> |
| | | <if test="dataTime != null and dataTime != ''"> |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 ) |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = #{dataTime} |
| | | </if> |
| | | <if test="dataTime == null and dataTime == ''"> |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 ) |
| | | </if> |
| | | and t3.name = #{name} and t3.detection_standard = #{detectionStandard} |
| | | </select> |
| | | <!-- <if test="dataTime != null and dataTime != ''">--> |
| | | <!-- AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )--> |
| | | <!-- </if>--> |
| | | |
| | | <select id="getUserQianzi" parameterType="String" resultType="Map"> |
| | | SELECT |
| | |
| | | and t2.num = '-1' |
| | | </if> |
| | | <if test="dataTime != null and dataTime != ''"> |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 ) |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = #{dataTime} |
| | | </if> |
| | | <if test="dataTime == null and dataTime == ''"> |
| | | AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 ) |
| | | </if> |
| | | and t3.cycle_unit = #{cycleUnit} |
| | | </select> |
| | | <!-- <if test="dataTime != null and dataTime != ''">--> |
| | | <!-- AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )--> |
| | | <!-- </if>--> |
| | | </mapper> |