art: 选择设备查询逻辑修改, 点检工单新增时产线逻辑修改
| | |
| | | HttpServletRequest req) { |
| | | QueryWrapper<Equipment> queryWrapper = QueryGenerator.initQueryWrapper(equipment, req.getParameterMap()); |
| | | Page<Equipment> page = new Page<Equipment>(pageNo, pageSize); |
| | | List<String> userWorkCenterIds = getUserWorkCenterIds(); |
| | | if(userWorkCenterIds != null && userWorkCenterIds.size() > 0){ |
| | | equipment.setUserWorkCenterIds(userWorkCenterIds); |
| | | } |
| | | IPage<Equipment> pageList = equipmentService.getEquipmentList(page, equipment); |
| | | return Result.OK(pageList); |
| | | } |
| | |
| | | }else{ |
| | | //生产线设备,按照生产线来进行点检 |
| | | String lineId = equipment.getLineId(); |
| | | if(StringUtils.isBlank(lineId)){ |
| | | return Result.error("生产线设备没有关联到产线编号"); |
| | | } |
| | | List<DailyInspectionStandard> dailyInspectionStandards = dailyInspectionStandardService.lambdaQuery() |
| | | .eq(DailyInspectionStandard::getEquipmentId, lineId) |
| | | .eq(DailyInspectionStandard::getVersionStatus, "2") |
| | | .eq(DailyInspectionStandard::getDelFlag, "0").list(); |
| | | if(CollectionUtils.isEmpty(dailyInspectionStandards)){ |
| | | return Result.error("设备对应的产线没有配置点检标准"); |
| | | } |
| | | if(dailyInspectionStandards.size()>0) { |
| | | DailyInspectionStandard dailyInspectionStandard = dailyInspectionStandards.get(0); |
| | | //保存点检工单子表数据 |
| | |
| | | private String yseNoMaintenance2Standard; |
| | | @TableField(exist = false) |
| | | private String yseNoMaintenance3Standard; |
| | | @TableField(exist = false) |
| | | private List<String> userWorkCenterIds; |
| | | |
| | | |
| | | } |
| | |
| | | @Param("isLine")String isLine, |
| | | @Param("equipmentCategoryId")String equipmentCategoryId, |
| | | @Param("equipNums") List<String> equipNums, |
| | | @Param("sql")String sql |
| | | @Param("sql")String sql, |
| | | @Param("userWorkCenterIds")List<String> userWorkCenterIds |
| | | ); |
| | | |
| | | List<Equipment> getEquipmentTZList( Page<Equipment> page, |
| | |
| | | <if test="lineId != null and lineId != ''"> |
| | | and t1.line_id = #{lineId} |
| | | </if> |
| | | <if test="userWorkCenterIds != null and userWorkCenterIds.size > 0"> |
| | | and t1.work_center_id in |
| | | <foreach collection="userWorkCenterIds" open="(" separator="," close=")" item="workCenterId"> |
| | | #{workCenterId} |
| | | </foreach> |
| | | </if> |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | equipment.getIsLine(), |
| | | equipment.getEquipmentCategoryId(), |
| | | equipNums, |
| | | sql |
| | | sql, |
| | | equipment.getUserWorkCenterIds() |
| | | )); |
| | | } |
| | | |