| | |
| | | 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.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | |
| | | @GetMapping (value = "/locDetl/pageList/auth") |
| | | @ManagerAuth(memo = "分页查询库存明细") |
| | | public R pageList(@RequestParam Map<String,Object> param){ |
| | | if (Cools.isEmpty(param.get("locNo"))){ |
| | | return new R(201,""); |
| | | } |
| | | Page<LocDetl> locDetlPage = locDetlService.selectPage(new Page<>(Integer.parseInt((String) param.get("curr")) |
| | | , Integer.parseInt((String) param.get("limit"))), new EntityWrapper<LocDetl>().eq("loc_no", param.get("locNo"))); |
| | | |
| | | return R.ok(locDetlPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stock/out/list/auth") |
| | | @ManagerAuth |
| | | public R stockOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | // String row = ""; |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | // if (param.get("row") != null) { |
| | | // String chooseRow = (String) param.get("row"); |
| | | // if (chooseRow.length() == 1) { |
| | | // row = "0" + chooseRow; |
| | | // param.remove("row"); |
| | | // }else { |
| | | // row = chooseRow; |
| | | // param.remove("row"); |
| | | // } |
| | | // } |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(LocDetl.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | // if (!row.equals("")){ |
| | | // wrapper.and() |
| | | // .where("loc_no like '" +row +"%'"); |
| | | // } |
| | | return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | .where("loc_no like '" +row +"%'"); |
| | | } |
| | | List<LocDetl> list = locDetlService.selectList(wrapper); |
| | | for (LocDetl item : list) { |
| | | if (item.getSpecs() != null) { |
| | | item.setSpecs(item.getSpecs().replace("\"", "\"\"")); // 转义双引号 |
| | | } |
| | | if (item.getBrand() != null) { |
| | | item.setBrand(item.getBrand().replace("\"", "\"\"")); |
| | | } |
| | | } |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |