| | |
| | | //没有选择设备,根据车间过滤设备 |
| | | queryWrapper.exists("select 1 from mdc_user_production t where t.user_id={0} and t.pro_id=e.org_id ", sysUser.getId()); |
| | | } |
| | | //控制待提交状态的数据只能本人查看 |
| | | queryWrapper.and(i -> i.ne("wmo.lean_status", EquipmentLeanOutStatusEnum.WAIT_SUBMIT).or().eq("wmo.lean_person", sysUser.getUsername())); |
| | | //查询条件过滤 |
| | | if (query != null) { |
| | | if (StringUtils.isNotBlank(query.getEquipmentId())) { |
| | |
| | | entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_APPROVAL_IN.name()); |
| | | } else { |
| | | entity.setLeanStatus(EquipmentLeanOutStatusEnum.REJECT.name()); |
| | | equipment.setAssetStatus(AssetStatusEnum.NORMAL.name()); |
| | | eamEquipmentService.updateById(equipment); |
| | | } |
| | | break; |
| | | case WAIT_APPROVAL_IN: |
| | |
| | | entity.setLeanStatus(EquipmentLeanOutStatusEnum.WAIT_RETURN.name()); |
| | | } else { |
| | | entity.setLeanStatus(EquipmentLeanOutStatusEnum.REJECT.name()); |
| | | equipment.setAssetStatus(AssetStatusEnum.NORMAL.name()); |
| | | eamEquipmentService.updateById(equipment); |
| | | } |
| | | break; |
| | | case WAIT_CONFIRM_RETURN: |