| | |
| | | import com.vincent.rsf.server.system.controller.BaseController; |
| | | import com.vincent.rsf.server.manager.enums.LocStsType; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public R page(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<LocItem, BaseParam> pageParam = new PageParam<>(baseParam, LocItem.class); |
| | | |
| | | // 库位状态筛选:关联 man_loc,不能作为 man_loc_item 字段参与 buildWrapper |
| | | Object useStatus = map.get("useStatus"); |
| | | if (pageParam.getWhere() != null && pageParam.getWhere().getMap() != null) { |
| | | pageParam.getWhere().getMap().remove("useStatus"); |
| | | } |
| | | QueryWrapper<LocItem> wrapper = pageParam.buildWrapper(true); |
| | | if (useStatus != null && StringUtils.isNotBlank(useStatus.toString())) { |
| | | String status = useStatus.toString().replace("'", "''"); |
| | | wrapper.apply("EXISTS (SELECT 1 FROM man_loc ml WHERE ml.id = man_loc_item.loc_id AND ml.use_status = '" + status + "')"); |
| | | } |
| | | FieldsUtils.setFieldsFilters(wrapper, pageParam, LocItem.class); |
| | | |
| | | /**拼接扩展字段*/ |