| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.ManLocDetl; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.ManLocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.common.utils.RoleUtils; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | param.remove("modi_time"); |
| | | } |
| | | } |
| | | Page<LocDetl> stockOut = locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class)); |
| | | if (stockOut.getRecords().size()==0){ |
| | | stockOut = locDetlService.getStockOut(toPage(1, limit, param, LocDetl.class)); |
| | | param.remove("curr"); |
| | | param.remove("limit"); |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | // 不同继承角色显示不同库信息 |
| | | RoleUtils.addRoleWrapperByLocNo(getUserId(),wrapper); |
| | | Page<LocDetl> locDetlPage = locDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | if (locDetlPage.getRecords().size()==0){ |
| | | locDetlPage = locDetlService.selectPage(new Page<>(1, limit), wrapper); |
| | | } |
| | | return R.ok(stockOut); |
| | | return R.ok(locDetlPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stock/out/crn/list/auth") |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(LocDetl.class, param.keySet(), wrapper, condition); |
| | | // 不同继承角色显示不同库信息 |
| | | RoleUtils.addRoleWrapperByLocNo(getUserId(),wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | // if (!row.equals("")){ |
| | | // wrapper.and() |