| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.AgvWrkDetl; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/list/authV9") |
| | | @ManagerAuth |
| | | public R pakoutList9(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam(required = false) String orderByField, |
| | | @RequestParam(required = false) String orderByType, |
| | | @RequestParam Map<String, Object> param) { |
| | | EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convertLike(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | List<DocType> pakins = docTypeService.selectList(new EntityWrapper<DocType>().eq("pakout", 1)); |
| | | List<Long> docIds = new ArrayList<>(); |
| | | for (DocType pakin : pakins) { |
| | | if (pakin.getDocId() == 48) { |
| | | docIds.add(pakin.getDocId()); |
| | | } |
| | | } |
| | | |
| | | wrapper.in("source", docIds); |
| | | Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | for (OrderDetl record : page.getRecords()) { |
| | | Double sumAnfme = agvLocDetlService.getSumAnfmeProcessed2(record.getMatnr(), record.getThreeCode()); |
| | | record.setStock(sumAnfme == null ? 0 : sumAnfme); |
| | | //Double workNum = agvWrkDetlMapper.sumAnfmeByMatnr(record.getMatnr(), record.getThreeCode(), record.getOrderNo()); |
| | | //record.setWorkNum(workNum == null ? 0 : workNum); |
| | | } |
| | | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/list/authV6") |
| | | @ManagerAuth |
| | | public R pakoutList6(@RequestParam(defaultValue = "1") Integer curr, |
| | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/workNum") |
| | | @ManagerAuth |
| | | public R listWorkDetl() { |
| | | List<AgvWrkDetl> agvWrkDetls = agvWrkDetlMapper.listAnfmeByMatnr(); |
| | | return R.ok(agvWrkDetls); |
| | | |
| | | } |
| | | |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | String val = String.valueOf(entry.getValue()); |