| | |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.service.FieldsService; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | } |
| | | |
| | | } |
| | | // locUseStatus 仅用于下方 EXISTS 子查询,不能作为 man_matnr 表字段参与 buildWrapper |
| | | Object locUseStatus = params.get("locUseStatus"); |
| | | if (pageParam.getWhere() != null && pageParam.getWhere().getMap() != null) { |
| | | pageParam.getWhere().getMap().remove("locUseStatus"); |
| | | } |
| | | QueryWrapper<Matnr> queryWrapper = pageParam.buildWrapper(true); |
| | | queryWrapper.in(!longs.isEmpty(),"group_id", longs); |
| | | // 出库选物料:按库位状态筛选(仅展示在该库位状态下有库存的物料) |
| | | if (locUseStatus != null && StringUtils.isNotBlank(locUseStatus.toString())) { |
| | | String useStatus = locUseStatus.toString().replace("'", "''"); |
| | | queryWrapper.apply("EXISTS (SELECT 1 FROM man_loc_item li INNER JOIN man_loc l ON li.loc_id = l.id WHERE li.matnr_id = man_matnr.id AND l.use_status = '" + useStatus + "')"); |
| | | } |
| | | |
| | | FieldsUtils.setFieldsFilters(queryWrapper,pageParam,Matnr.class); |
| | | /**拼接扩展字段*/ |