|  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<InventoryCheckOrder> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<InventoryCheckOrder> page = inventoryCheckOrderService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<InventoryCheckOrder> page = inventoryCheckOrderService.selectPage(new Page<>(0, 1000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (InventoryCheckOrder inventoryCheckOrder : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<InventoryCheckOrderDetl> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<InventoryCheckOrderDetl> page = inventoryCheckOrderDetlService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<InventoryCheckOrderDetl> page = inventoryCheckOrderDetlService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (InventoryCheckOrderDetl inventoryCheckOrderDetl : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<LocCheck> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<LocCheck> page = locCheckService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<LocCheck> page = locCheckService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (LocCheck locCheck : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("matnr", condition); | 
 |  |  |         Page<LocDetl> page = locDetlService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<LocDetl> page = locDetlService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (LocDetl locDetl : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("loc_no", condition); | 
 |  |  |         Page<LocMast> page = locMastService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<LocMast> page = locMastService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (LocMast locMast : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<Mat> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("matnr", condition).or().like("maktx", condition); | 
 |  |  |         Page<Mat> page = matService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<Mat> page = matService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (Mat mat : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |                 param.getOrderNo(),    // 订单编号 | 
 |  |  |                 DateUtils.convert(now),    // 单据日期 | 
 |  |  |                 param.getDocType(),    // 单据类型 | 
 |  |  |                 null,    // 项目编号 | 
 |  |  |                 null,    // | 
 |  |  |                 param.getItemId(),    // 项目编号 | 
 |  |  |                 param.getItemName(),    // | 
 |  |  |                 null,    // 调拨项目编号 | 
 |  |  |                 null,    // 初始票据号 | 
 |  |  |                 null,    // 票据号 | 
 |  |  | 
 |  |  |         Date now = new Date(); | 
 |  |  |         Long userId = getUserId(); | 
 |  |  |         // 修改主档 | 
 |  |  |         if (!param.getDocType().equals(order.getDocType())) { | 
 |  |  |         if (!param.getDocType().equals(order.getDocType()) || param.getItemId() != order.getItemId()) { | 
 |  |  |             order.setDocType(param.getDocType()); | 
 |  |  |             order.setUpdateBy(userId); | 
 |  |  |             order.setUpdateTime(now); | 
 |  |  |             order.setItemId(param.getItemId()); | 
 |  |  |             order.setItemName(param.getItemName()); | 
 |  |  |             if (!orderService.updateById(order)) { | 
 |  |  |                 throw new CoolException("修改订单类型失败"); | 
 |  |  |             } | 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<Order> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<Order> page = orderService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<Order> page = orderService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (Order order : page.getRecords()) { | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<OrderDetl> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<OrderDetl> page = orderDetlService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (OrderDetl orderDetl : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/nav/list/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R navList(@RequestParam(required = false) String orderNo){ | 
 |  |  |     public R navList(@RequestParam(required = false) String orderNo) { | 
 |  |  |         EntityWrapper<OrderPakin> wrapper = new EntityWrapper<>(); | 
 |  |  |         if (!Cools.isEmpty(orderNo)) { | 
 |  |  |             wrapper.like("order_no", orderNo); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/head/page/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R head(@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){ | 
 |  |  |     public R head(@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<OrderPakin> wrapper = new EntityWrapper<>(); | 
 |  |  |         excludeTrash(param); | 
 |  |  |         convert(param, wrapper); | 
 |  |  |         if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { | 
 |  |  |         if (!Cools.isEmpty(orderByField)) { | 
 |  |  |             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); | 
 |  |  |         } else { | 
 |  |  |             wrapper.orderBy("settle").orderBy("create_time", false); | 
 |  |  |         } | 
 |  |  |         wrapper.eq("status", 1); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/detl/all/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R head(@RequestParam Long orderId){ | 
 |  |  |     public R head(@RequestParam Long orderId) { | 
 |  |  |         return R.ok().add(orderDetlService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_id", orderId))); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/form/add/auth") | 
 |  |  |     @ManagerAuth(memo = "手动添加订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R formAdd(@RequestBody OrderDomainParam param){ | 
 |  |  |         if(Cools.isEmpty(param.getOrderNo())){ | 
 |  |  |     public R formAdd(@RequestBody OrderDomainParam param) { | 
 |  |  |         if (Cools.isEmpty(param.getOrderNo())) { | 
 |  |  |             String prefix = ""; | 
 |  |  |             DocType docType = docTypeService.selectById(param.getDocType()); | 
 |  |  |             if(!Cools.isEmpty(docType)){ | 
 |  |  |             if (!Cools.isEmpty(docType)) { | 
 |  |  |                 prefix = docType.getPakin() == 1 ? "RK" : "CK"; | 
 |  |  |             } | 
 |  |  |             param.setOrderNo(prefix + snowflakeIdWorker.nextId()); | 
 |  |  | 
 |  |  |                 param.getOrderNo(),    // 订单编号 | 
 |  |  |                 DateUtils.convert(now),    // 单据日期 | 
 |  |  |                 param.getDocType(),    // 单据类型 | 
 |  |  |                 null,    // 项目编号 | 
 |  |  |                 null,    // | 
 |  |  |                 param.getItemId(),    // 项目编号 | 
 |  |  |                 param.getItemName(),    // | 
 |  |  |                 null,    // 调拨项目编号 | 
 |  |  |                 null,    // 初始票据号 | 
 |  |  |                 null,    // 票据号 | 
 |  |  | 
 |  |  |         } | 
 |  |  |         List<DetlDto> list = new ArrayList<>(); | 
 |  |  |         for (OrderDetlPakin orderDetl : param.getOrderDetlPakinList()) { | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getLineNumber(), | 
 |  |  |                     orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                     orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |             if (DetlDto.has(list, dto)) { | 
 |  |  |                 OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), | 
 |  |  |                         orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                 OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), | 
 |  |  |                         orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |                 item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); | 
 |  |  |                 if (!orderDetlService.updateById(item)) { | 
 |  |  |                     throw new CoolException("保存订单明细档失败"); | 
 |  |  | 
 |  |  |     @RequestMapping(value = "/order/form/modify/auth") | 
 |  |  |     @ManagerAuth(memo = "手动修改订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R formModify(@RequestBody OrderDomainParam param){ | 
 |  |  |     public R formModify(@RequestBody OrderDomainParam param) { | 
 |  |  |         OrderPakin order = orderService.selectById(param.getOrderId()); | 
 |  |  |         if (order == null || order.getStatus() == 0) { | 
 |  |  |             return R.error("订单不存在"); | 
 |  |  | 
 |  |  |         Date now = new Date(); | 
 |  |  |         Long userId = getUserId(); | 
 |  |  |         // 修改主档 | 
 |  |  |         if (!param.getDocType().equals(order.getDocType())) { | 
 |  |  |         if (!param.getDocType().equals(order.getDocType()) || param.getItemId() != order.getItemId()) { | 
 |  |  |             order.setDocType(param.getDocType()); | 
 |  |  |             order.setUpdateBy(userId); | 
 |  |  |             order.setUpdateTime(now); | 
 |  |  |             order.setItemId(param.getItemId()); | 
 |  |  |             order.setItemName(param.getItemName()); | 
 |  |  |             if (!orderService.updateById(order)) { | 
 |  |  |                 throw new CoolException("修改订单类型失败"); | 
 |  |  |             } | 
 |  |  | 
 |  |  |         for (OrderDetlPakin orderDetl : param.getOrderDetlPakinList()) { | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), | 
 |  |  |                     orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                     orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |             if (DetlDto.has(list, dto)) { | 
 |  |  |                 OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand() | 
 |  |  |                         ,orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                 OrderDetlPakin item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand() | 
 |  |  |                         , orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |                 item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); | 
 |  |  |                 if (!orderDetlService.updateById(item)) { | 
 |  |  |                     throw new CoolException("保存订单明细档失败"); | 
 |  |  | 
 |  |  |             WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime())); | 
 |  |  |             if (wrkMast == null) { | 
 |  |  |                 WrkMastLog wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime())); | 
 |  |  |                 if (wrkMastLog.getIoType()==103){ | 
 |  |  |                     wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime()).eq("io_type",53)); | 
 |  |  |                 if (wrkMastLog.getIoType() == 103) { | 
 |  |  |                     wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime()).eq("io_type", 53)); | 
 |  |  |                 } | 
 |  |  |                 if (wrkMastLog != null) { | 
 |  |  |                     wrkMast = new WrkMast(); | 
 |  |  | 
 |  |  |                 .add("list", wrkTraceVos) | 
 |  |  |                 .add("orderNo", order.getOrderNo()) | 
 |  |  |                 .add("totalQty", totalQty) | 
 |  |  |                 .add("wrkQty", wrkQty+endQty) | 
 |  |  |                 .add("wrkQty", wrkQty + endQty) | 
 |  |  |                 .add("lackQty", lackQty) | 
 |  |  |                 .add("endQty",endQty) | 
 |  |  |                 .add("endQty", endQty) | 
 |  |  |         ); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/list/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R list(@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){ | 
 |  |  |     public R list(@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<OrderPakin> wrapper = new EntityWrapper<>(); | 
 |  |  |         excludeTrash(param); | 
 |  |  |         convert(param, wrapper); | 
 |  |  |         if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} | 
 |  |  |         if (!Cools.isEmpty(orderByField)) { | 
 |  |  |             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); | 
 |  |  |         } | 
 |  |  |         return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ | 
 |  |  |         for (Map.Entry<String, Object> entry : map.entrySet()){ | 
 |  |  |     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()); | 
 |  |  |             if (val.contains(RANGE_TIME_LINK)){ | 
 |  |  |             if (val.contains(RANGE_TIME_LINK)) { | 
 |  |  |                 String[] dates = val.split(RANGE_TIME_LINK); | 
 |  |  |                 wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); | 
 |  |  |                 wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/update/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R update(OrderPakin order){ | 
 |  |  |         if (Cools.isEmpty(order) || null == order.getId()){ | 
 |  |  |     public R update(OrderPakin order) { | 
 |  |  |         if (Cools.isEmpty(order) || null == order.getId()) { | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //订单完结前,判断是否存在作业中数据,存在则不能完结 | 
 |  |  |         if(order.getSettle() == 4){ | 
 |  |  |             int wrkCount = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no",order.getOrderNo())); | 
 |  |  |             int pakinCount = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("order_no",order.getOrderNo())); | 
 |  |  |         if (order.getSettle() == 4) { | 
 |  |  |             int wrkCount = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", order.getOrderNo())); | 
 |  |  |             int pakinCount = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("order_no", order.getOrderNo())); | 
 |  |  |             if (wrkCount > 0 || pakinCount > 0) { | 
 |  |  |                 throw new CoolException("存在作业中数据,不能完结。请检查入库通知档和工作档"); | 
 |  |  |             } | 
 |  |  | 
 |  |  |     @RequestMapping(value = "/order/delete/auth") | 
 |  |  |     @ManagerAuth(memo = "手动删除订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R delete(@RequestParam Long orderId){ | 
 |  |  |     public R delete(@RequestParam Long orderId) { | 
 |  |  |         orderService.remove(orderId); | 
 |  |  | //        Order order = orderService.selectById(orderId); | 
 |  |  | //        if (order != null) { | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/export/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R export(@RequestBody JSONObject param){ | 
 |  |  |     public R export(@RequestBody JSONObject param) { | 
 |  |  |         EntityWrapper<OrderPakin> wrapper = new EntityWrapper<>(); | 
 |  |  |         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); | 
 |  |  |         Map<String, Object> map = excludeTrash(param.getJSONObject("order")); | 
 |  |  | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<OrderPakin> page = orderService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (OrderPakin order : page.getRecords()){ | 
 |  |  |         for (OrderPakin order : page.getRecords()) { | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 |  |  |             map.put("id", order.getId()); | 
 |  |  |             map.put("value", order.getOrderNo()); | 
 |  |  | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R query(@RequestBody JSONObject param) { | 
 |  |  |         Wrapper<OrderPakin> wrapper = new EntityWrapper<OrderPakin>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); | 
 |  |  |         if (null != orderService.selectOne(wrapper)){ | 
 |  |  |         if (null != orderService.selectOne(wrapper)) { | 
 |  |  |             return R.parse(BaseRes.REPEAT).add(getComment(OrderPakin.class, String.valueOf(param.get("key")))); | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/nav/list/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R navList(@RequestParam(required = false) String orderNo){ | 
 |  |  |     public R navList(@RequestParam(required = false) String orderNo) { | 
 |  |  |         EntityWrapper<OrderPakout> wrapper = new EntityWrapper<>(); | 
 |  |  |         if (!Cools.isEmpty(orderNo)) { | 
 |  |  |             wrapper.like("order_no", orderNo); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/head/page/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R head(@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){ | 
 |  |  |     public R head(@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<OrderPakout> wrapper = new EntityWrapper<>(); | 
 |  |  |         excludeTrash(param); | 
 |  |  |         convert(param, wrapper); | 
 |  |  |         if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { | 
 |  |  |         if (!Cools.isEmpty(orderByField)) { | 
 |  |  |             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); | 
 |  |  |         } else { | 
 |  |  |             wrapper.orderBy("settle").orderBy("create_time", false); | 
 |  |  |         } | 
 |  |  |         wrapper.eq("status", 1); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/detl/all/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R head(@RequestParam Long orderId){ | 
 |  |  |     public R head(@RequestParam Long orderId) { | 
 |  |  |         return R.ok().add(orderDetlService.selectList(new EntityWrapper<OrderDetlPakout>().eq("order_id", orderId))); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/form/add/auth") | 
 |  |  |     @ManagerAuth(memo = "手动添加订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R formAdd(@RequestBody OrderDomainParam param){ | 
 |  |  |         if(Cools.isEmpty(param.getOrderNo())){ | 
 |  |  |     public R formAdd(@RequestBody OrderDomainParam param) { | 
 |  |  |         if (Cools.isEmpty(param.getOrderNo())) { | 
 |  |  |             String prefix = ""; | 
 |  |  |             DocType docType = docTypeService.selectById(param.getDocType()); | 
 |  |  |             if(!Cools.isEmpty(docType)){ | 
 |  |  |             if (!Cools.isEmpty(docType)) { | 
 |  |  |                 prefix = docType.getPakin() == 1 ? "RK" : "CK"; | 
 |  |  |             } | 
 |  |  |             param.setOrderNo(prefix + snowflakeIdWorker.nextId()); | 
 |  |  | 
 |  |  |                 param.getOrderNo(),    // 订单编号 | 
 |  |  |                 DateUtils.convert(now),    // 单据日期 | 
 |  |  |                 param.getDocType(),    // 单据类型 | 
 |  |  |                 null,    // 项目编号 | 
 |  |  |                 null,    // | 
 |  |  |                 param.getItemId(),    // 项目编号 | 
 |  |  |                 param.getItemName(),    // | 
 |  |  |                 null,    // 调拨项目编号 | 
 |  |  |                 null,    // 初始票据号 | 
 |  |  |                 null,    // 票据号 | 
 |  |  | 
 |  |  |         } | 
 |  |  |         List<DetlDto> list = new ArrayList<>(); | 
 |  |  |         for (OrderDetlPakout orderDetl : param.getOrderDetlPakoutList()) { | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |             if (DetlDto.has(list, dto)) { | 
 |  |  |                 OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), | 
 |  |  |                         orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(),orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                 OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), | 
 |  |  |                         orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |                 item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); | 
 |  |  |                 if (!orderDetlService.updateById(item)) { | 
 |  |  |                     throw new CoolException("保存订单明细档失败"); | 
 |  |  | 
 |  |  |     @RequestMapping(value = "/order/form/modify/auth") | 
 |  |  |     @ManagerAuth(memo = "手动修改订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R formModify(@RequestBody OrderDomainParam param){ | 
 |  |  |     public R formModify(@RequestBody OrderDomainParam param) { | 
 |  |  |         OrderPakout order = orderService.selectById(param.getOrderId()); | 
 |  |  |         if (order == null || order.getStatus() == 0) { | 
 |  |  |             return R.error("订单不存在"); | 
 |  |  | 
 |  |  |         Date now = new Date(); | 
 |  |  |         Long userId = getUserId(); | 
 |  |  |         // 修改主档 | 
 |  |  |         if (!param.getDocType().equals(order.getDocType())) { | 
 |  |  |         if (!param.getDocType().equals(order.getDocType()) || param.getItemId() != order.getItemId()) { | 
 |  |  |             order.setDocType(param.getDocType()); | 
 |  |  |             order.setUpdateBy(userId); | 
 |  |  |             order.setUpdateTime(now); | 
 |  |  |             order.setItemId(param.getItemId()); | 
 |  |  |             order.setItemName(param.getItemName()); | 
 |  |  |             if (!orderService.updateById(order)) { | 
 |  |  |                 throw new CoolException("修改订单类型失败"); | 
 |  |  |             } | 
 |  |  | 
 |  |  |         // 2.重组数据 | 
 |  |  |         List<DetlDto> list = new ArrayList<>(); | 
 |  |  |         for (OrderDetlPakout orderDetl : param.getOrderDetlPakoutList()) { | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(),orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |             DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), | 
 |  |  |                     orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                     orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |             if (DetlDto.has(list, dto)) { | 
 |  |  |                 OrderDetlPakout item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), | 
 |  |  |                         orderDetl.getBrand(),orderDetl.getStandby1(),orderDetl.getStandby2(),orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(),orderDetl.getBoxType2(),orderDetl.getBoxType3()); | 
 |  |  |                         orderDetl.getBrand(), orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), | 
 |  |  |                         orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); | 
 |  |  |                 item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); | 
 |  |  |                 if (!orderDetlService.updateById(item)) { | 
 |  |  |                     throw new CoolException("保存订单明细档失败"); | 
 |  |  | 
 |  |  |             WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime())); | 
 |  |  |             if (wrkMast == null) { | 
 |  |  |                 WrkMastLog wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime())); | 
 |  |  |                 if (wrkMastLog.getIoType()==103){ | 
 |  |  |                     wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime()).eq("io_type",53)); | 
 |  |  |                 if (wrkMastLog.getIoType() == 103) { | 
 |  |  |                     wrkMastLog = wrkMastLogService.selectOne(new EntityWrapper<WrkMastLog>().eq("wrk_no", wrkDetl.getWrkNo()).eq("io_time", wrkDetl.getIoTime()).eq("io_type", 53)); | 
 |  |  |                 } | 
 |  |  |                 if (wrkMastLog != null) { | 
 |  |  |                     wrkMast = new WrkMast(); | 
 |  |  | 
 |  |  |                 .add("list", wrkTraceVos) | 
 |  |  |                 .add("orderNo", order.getOrderNo()) | 
 |  |  |                 .add("totalQty", totalQty) | 
 |  |  |                 .add("wrkQty", wrkQty+endQty) | 
 |  |  |                 .add("wrkQty", wrkQty + endQty) | 
 |  |  |                 .add("lackQty", lackQty) | 
 |  |  |                 .add("endQty",endQty) | 
 |  |  |                 .add("endQty", endQty) | 
 |  |  |         ); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/list/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R list(@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){ | 
 |  |  |     public R list(@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<OrderPakout> wrapper = new EntityWrapper<>(); | 
 |  |  |         excludeTrash(param); | 
 |  |  |         convert(param, wrapper); | 
 |  |  |         if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} | 
 |  |  |         if (!Cools.isEmpty(orderByField)) { | 
 |  |  |             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); | 
 |  |  |         } | 
 |  |  |         return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ | 
 |  |  |         for (Map.Entry<String, Object> entry : map.entrySet()){ | 
 |  |  |     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()); | 
 |  |  |             if (val.contains(RANGE_TIME_LINK)){ | 
 |  |  |             if (val.contains(RANGE_TIME_LINK)) { | 
 |  |  |                 String[] dates = val.split(RANGE_TIME_LINK); | 
 |  |  |                 wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); | 
 |  |  |                 wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/update/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R update(OrderPakout order){ | 
 |  |  |         if (Cools.isEmpty(order) || null == order.getId()){ | 
 |  |  |     public R update(OrderPakout order) { | 
 |  |  |         if (Cools.isEmpty(order) || null == order.getId()) { | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //订单完结前,判断是否存在作业中数据,存在则不能完结 | 
 |  |  |         if(order.getSettle() == 4){ | 
 |  |  |             int wrkCount = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no",order.getOrderNo())); | 
 |  |  |             int pakinCount = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("order_no",order.getOrderNo())); | 
 |  |  |         if (order.getSettle() == 4) { | 
 |  |  |             int wrkCount = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("order_no", order.getOrderNo())); | 
 |  |  |             int pakinCount = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("order_no", order.getOrderNo())); | 
 |  |  |             if (wrkCount > 0 || pakinCount > 0) { | 
 |  |  |                 throw new CoolException("存在作业中数据,不能完结。请检查入库通知档和工作档"); | 
 |  |  |             } | 
 |  |  | 
 |  |  |     @RequestMapping(value = "/order/delete/auth") | 
 |  |  |     @ManagerAuth(memo = "手动删除订单") | 
 |  |  |     @Transactional | 
 |  |  |     public R delete(@RequestParam Long orderId){ | 
 |  |  |     public R delete(@RequestParam Long orderId) { | 
 |  |  |         orderService.remove(orderId); | 
 |  |  | //        Order order = orderService.selectById(orderId); | 
 |  |  | //        if (order != null) { | 
 |  |  | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/order/export/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R export(@RequestBody JSONObject param){ | 
 |  |  |     public R export(@RequestBody JSONObject param) { | 
 |  |  |         EntityWrapper<OrderPakout> wrapper = new EntityWrapper<>(); | 
 |  |  |         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); | 
 |  |  |         Map<String, Object> map = excludeTrash(param.getJSONObject("order")); | 
 |  |  | 
 |  |  |         wrapper.like("id", condition); | 
 |  |  |         Page<OrderPakout> page = orderService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (OrderPakout order : page.getRecords()){ | 
 |  |  |         for (OrderPakout order : page.getRecords()) { | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 |  |  |             map.put("id", order.getId()); | 
 |  |  |             map.put("value", order.getOrderNo()); | 
 |  |  | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R query(@RequestBody JSONObject param) { | 
 |  |  |         Wrapper<OrderPakout> wrapper = new EntityWrapper<OrderPakout>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); | 
 |  |  |         if (null != orderService.selectOne(wrapper)){ | 
 |  |  |         if (null != orderService.selectOne(wrapper)) { | 
 |  |  |             return R.parse(BaseRes.REPEAT).add(getComment(OrderPakout.class, String.valueOf(param.get("key")))); | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 
| New file | 
 |  |  | 
 |  |  | package com.zy.asrs.controller; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSONObject; | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.baomidou.mybatisplus.mapper.Wrapper; | 
 |  |  | import com.baomidou.mybatisplus.plugins.Page; | 
 |  |  | import com.core.annotations.ManagerAuth; | 
 |  |  | import com.core.common.BaseRes; | 
 |  |  | import com.core.common.Cools; | 
 |  |  | import com.core.common.DateUtils; | 
 |  |  | import com.core.common.R; | 
 |  |  | import com.zy.asrs.entity.DocType; | 
 |  |  | import com.zy.asrs.entity.StoreType; | 
 |  |  | import com.zy.asrs.service.StoreTypeService; | 
 |  |  | import com.zy.common.web.BaseController; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.*; | 
 |  |  |  | 
 |  |  | import java.util.*; | 
 |  |  |  | 
 |  |  | @RestController | 
 |  |  | public class StoreTypeController extends BaseController { | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private StoreTypeService storeTypeService; | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/{id}/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R get(@PathVariable("id") String id) { | 
 |  |  |         return R.ok(storeTypeService.selectById(String.valueOf(id))); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/list/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R list(@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<StoreType> wrapper = new EntityWrapper<>(); | 
 |  |  |         excludeTrash(param); | 
 |  |  |         convert(param, wrapper); | 
 |  |  |         if (!Cools.isEmpty(orderByField)) { | 
 |  |  |             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); | 
 |  |  |         } | 
 |  |  |         return R.ok(storeTypeService.selectPage(new Page<>(curr, limit), wrapper)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     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()); | 
 |  |  |             if (val.contains(RANGE_TIME_LINK)) { | 
 |  |  |                 String[] dates = val.split(RANGE_TIME_LINK); | 
 |  |  |                 wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); | 
 |  |  |                 wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); | 
 |  |  |             } else { | 
 |  |  |                 wrapper.like(entry.getKey(), val); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/add/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R add(StoreType docType) { | 
 |  |  |         docType.setStatus(1); | 
 |  |  |         docType.setCreateBy(getUserId()); | 
 |  |  |         docType.setCreateTime(new Date()); | 
 |  |  |         docType.setUpdateBy(getUserId()); | 
 |  |  |         docType.setUpdateTime(new Date()); | 
 |  |  |         storeTypeService.insert(docType); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/update/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R update(StoreType docType) { | 
 |  |  |         if (Cools.isEmpty(docType) || null == docType.getStoreId()) { | 
 |  |  |             return R.error(); | 
 |  |  |         } | 
 |  |  |         docType.setUpdateBy(getUserId()); | 
 |  |  |         docType.setUpdateTime(new Date()); | 
 |  |  |         storeTypeService.updateById(docType); | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/delete/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R delete(@RequestParam(value = "ids[]") Long[] ids) { | 
 |  |  |         for (Long id : ids) { | 
 |  |  |             storeTypeService.deleteById(id); | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/export/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R export(@RequestBody JSONObject param) { | 
 |  |  |         EntityWrapper<StoreType> wrapper = new EntityWrapper<>(); | 
 |  |  |         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); | 
 |  |  |         Map<String, Object> map = excludeTrash(param.getJSONObject("docType")); | 
 |  |  |         convert(map, wrapper); | 
 |  |  |         List<StoreType> list = storeTypeService.selectList(wrapper); | 
 |  |  |         return R.ok(exportSupport(list, fields)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeTypeQuery/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<StoreType> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("store_name", condition); | 
 |  |  |         wrapper.eq("status", 1); | 
 |  |  |         Page<StoreType> page = storeTypeService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (StoreType docType : page.getRecords()) { | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 |  |  |             map.put("id", docType.getStoreId()); | 
 |  |  |             map.put("value",  docType.getStoreName()); | 
 |  |  |             result.add(map); | 
 |  |  |         } | 
 |  |  |         return R.ok(result); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @RequestMapping(value = "/storeType/check/column/auth") | 
 |  |  |     @ManagerAuth | 
 |  |  |     public R query(@RequestBody JSONObject param) { | 
 |  |  |         Wrapper<StoreType> wrapper = new EntityWrapper<StoreType>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); | 
 |  |  |         if (null != storeTypeService.selectOne(wrapper)) { | 
 |  |  |             return R.parse(BaseRes.REPEAT).add(getComment(DocType.class, String.valueOf(param.get("key")))); | 
 |  |  |         } | 
 |  |  |         return R.ok(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |     public R query(String condition) { | 
 |  |  |         EntityWrapper<Tag> wrapper = new EntityWrapper<>(); | 
 |  |  |         wrapper.like("uuid", condition).or().like("name", condition); | 
 |  |  |         Page<Tag> page = tagService.selectPage(new Page<>(0, 10), wrapper); | 
 |  |  |         Page<Tag> page = tagService.selectPage(new Page<>(0, 10000), wrapper); | 
 |  |  |         List<Map<String, Object>> result = new ArrayList<>(); | 
 |  |  |         for (Tag tag : page.getRecords()){ | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 
| New file | 
 |  |  | 
 |  |  | package com.zy.asrs.entity; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.annotations.TableField; | 
 |  |  | import com.baomidou.mybatisplus.annotations.TableId; | 
 |  |  | import com.baomidou.mybatisplus.annotations.TableName; | 
 |  |  | import com.baomidou.mybatisplus.enums.IdType; | 
 |  |  | import io.swagger.annotations.ApiModelProperty; | 
 |  |  | import lombok.Data; | 
 |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
 |  |  |  | 
 |  |  | import java.io.Serializable; | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | @Data | 
 |  |  | @TableName("man_store") | 
 |  |  | public class StoreType implements Serializable { | 
 |  |  |  | 
 |  |  |     private static final long serialVersionUID = 1L; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 仓库id | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "仓库id") | 
 |  |  |     @TableId(value = "store_id", type = IdType.INPUT) | 
 |  |  |     @TableField("store_id") | 
 |  |  |     private String storeId; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 类型名称 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "类型名称") | 
 |  |  |     @TableField("store_name") | 
 |  |  |     private String storeName; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 是否立库本身 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "是否立库本身,0不是,1是") | 
 |  |  |     private Integer own = 0; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 状态 1: 正常  0: 禁用 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "状态 1: 正常  0: 禁用  ") | 
 |  |  |     private Integer status = 0; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 添加人员 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "添加人员") | 
 |  |  |     @TableField("create_by") | 
 |  |  |     private Long createBy; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 添加时间 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "添加时间") | 
 |  |  |     @TableField("create_time") | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     private Date createTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 修改人员 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "修改人员") | 
 |  |  |     @TableField("update_by") | 
 |  |  |     private Long updateBy; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 修改时间 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "修改时间") | 
 |  |  |     @TableField("update_time") | 
 |  |  |     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
 |  |  |     private Date updateTime; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 备注 | 
 |  |  |      */ | 
 |  |  |     @ApiModelProperty(value = "备注") | 
 |  |  |     private String memo; | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     private String orderTime; | 
 |  |  |  | 
 |  |  |     private Long itemId; | 
 |  |  |  | 
 |  |  |     private String itemName; | 
 |  |  |  | 
 |  |  |     private List<DetlDto> orderDetails; | 
 |  |  |  | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     private String orderTime; | 
 |  |  |  | 
 |  |  |     private Long itemId; | 
 |  |  |  | 
 |  |  |     private String itemName; | 
 |  |  |  | 
 |  |  |     private List<DetlDto> orderDetails; | 
 |  |  |  | 
 |  |  |     private String lgort; | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     private String orderNo; | 
 |  |  |  | 
 |  |  |     private Long itemId; | 
 |  |  |  | 
 |  |  |     private String itemName; | 
 |  |  |  | 
 |  |  |     private List<OrderDetl> orderDetlList; | 
 |  |  |     private List<OrderDetlPakin> orderDetlPakinList; | 
 |  |  |     private List<OrderDetlPakout> orderDetlPakoutList; | 
 
| New file | 
 |  |  | 
 |  |  | package com.zy.asrs.mapper; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.BaseMapper; | 
 |  |  | import com.zy.asrs.entity.DocType; | 
 |  |  | import com.zy.asrs.entity.StoreType; | 
 |  |  | import org.apache.ibatis.annotations.Mapper; | 
 |  |  | import org.springframework.stereotype.Repository; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | @Mapper | 
 |  |  | @Repository | 
 |  |  | public interface StoreTypeMapper extends BaseMapper<StoreType> { | 
 |  |  |  | 
 |  |  |     List<String> listOwn(); | 
 |  |  | } | 
 
| New file | 
 |  |  | 
 |  |  | package com.zy.asrs.service; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.service.IService; | 
 |  |  | import com.zy.asrs.entity.StoreType; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | public interface StoreTypeService extends IService<StoreType> { | 
 |  |  |  | 
 |  |  |     List<String> listOwn(); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |                     } | 
 |  |  |                     break; | 
 |  |  |                 case "转库-出库": | 
 |  |  |                     process1 = processZKCK(orderDetls); | 
 |  |  |                     process1 = processZKCK(order, orderDetls); | 
 |  |  |                     List<Object> zkck1 = new ArrayList<>(); | 
 |  |  |                     zkck1.add(process1); | 
 |  |  |                     //发送请求 | 
 |  |  | 
 |  |  |         return data; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     private Object processZKCK(List<OrderDetl> orderDetls) { | 
 |  |  |     private Object processZKCK(Order order, List<OrderDetl> orderDetls) { | 
 |  |  |         //组装对象数据 | 
 |  |  |         Map<String, Object> data = new HashMap<String, Object>(); | 
 |  |  |         WhsTransBillHeaderVO whsTransBillHeaderVO = new WhsTransBillHeaderVO(); | 
 |  |  |         whsTransBillHeaderVO.setPk_org("FYT"); | 
 |  |  |         whsTransBillHeaderVO.setCwarehouseid("6101"); | 
 |  |  |         whsTransBillHeaderVO.setCwarehouseid(order.getItemId() + ""); | 
 |  |  |         whsTransBillHeaderVO.setCotherbizid(order.getAllotItemId() + ""); | 
 |  |  |         whsTransBillHeaderVO.setCtrantypeid("4K-Cxx-01"); | 
 |  |  |         WhsTransBillBodyVO whsTransBillBodyVO = null; | 
 |  |  |         List<WhsTransBillBodyVO> whsTransBillBodyVOS = new ArrayList<>(); | 
 |  |  |         for (OrderDetl orderDetl : orderDetls) { | 
 |  |  |             whsTransBillBodyVO = new WhsTransBillBodyVO(); | 
 |  |  |             String remark = orderDetl.getRemark(); | 
 |  |  |             if (!Cools.isEmpty(remark)) { | 
 |  |  |                 NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); | 
 |  |  |                 whsTransBillBodyVO.setCsourcetype("4331"); | 
 |  |  |                 whsTransBillBodyVO.setClocationid("610101"); | 
 |  |  |                 whsTransBillBodyVO.setCsourcebillbid(nccSaleXsfhmxWms.getCdeliverybid()); | 
 |  |  |                 whsTransBillBodyVO.setCsourcebillhid(nccSaleXsfhmxWms.getCdeliveryid()); | 
 |  |  |                 whsTransBillBodyVO.setNnum(orderDetl.getQty()); | 
 |  |  |                 whsTransBillBodyVO.setVbatchcode(orderDetl.getBatch()); | 
 |  |  |                 whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); | 
 |  |  |             } | 
 |  |  |             //if (!Cools.isEmpty(remark)) { | 
 |  |  |             //NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); | 
 |  |  |             whsTransBillBodyVO.setNnum(orderDetl.getQty()); | 
 |  |  |             whsTransBillBodyVO.setVfree10(orderDetl.getBatch()); | 
 |  |  |             whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); | 
 |  |  |             //} | 
 |  |  |             whsTransBillBodyVOS.add(whsTransBillBodyVO); | 
 |  |  |         } | 
 |  |  |         data.put("WhsTransBillHeaderVO", whsTransBillHeaderVO); | 
 
| New file | 
 |  |  | 
 |  |  | package com.zy.asrs.service.impl; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.baomidou.mybatisplus.service.impl.ServiceImpl; | 
 |  |  | import com.core.common.Cools; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.asrs.entity.DocType; | 
 |  |  | import com.zy.asrs.entity.StoreType; | 
 |  |  | import com.zy.asrs.mapper.DocTypeMapper; | 
 |  |  | import com.zy.asrs.mapper.StoreTypeMapper; | 
 |  |  | import com.zy.asrs.service.DocTypeService; | 
 |  |  | import com.zy.asrs.service.StoreTypeService; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.util.Collections; | 
 |  |  | import java.util.Date; | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | @Service("storeTypeService") | 
 |  |  | public class StoreTypeServiceImpl extends ServiceImpl<StoreTypeMapper, StoreType> implements StoreTypeService { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<String> listOwn() { | 
 |  |  |         return this.baseMapper.listOwn(); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  */ | 
 |  |  | public interface NccSaleDbddWmsMapper extends BaseMapper<NccSaleDbddWms> { | 
 |  |  |  | 
 |  |  |     List<String> selectDbdd(@Param("ids") List<Integer> ids); | 
 |  |  |     List<String> selectDbdd(@Param("ids") List<String> ids); | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | public interface NccScZkmxbWmsMapper extends BaseMapper<NccScZkmxbWms> { | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     List<String> selectZkOut(@Param("ids") List<Integer> ids); | 
 |  |  |     List<String> selectZkOut(@Param("ids") List<String> ids); | 
 |  |  |  | 
 |  |  |     List<String> selectZkIn(@Param("ids")List<Integer> ids); | 
 |  |  |     List<String> selectZkIn(@Param("ids")List<String> ids); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  */ | 
 |  |  | public interface NccSaleDbddWmsService extends IService<NccSaleDbddWms> { | 
 |  |  |  | 
 |  |  |     List<String> selectDbdd(List<Integer> ids); | 
 |  |  |     List<String> selectDbdd(List<String> ids); | 
 |  |  | } | 
 
 |  |  | 
 |  |  | */ | 
 |  |  | public interface NccScZkmxbWmsService extends IService<NccScZkmxbWms> { | 
 |  |  |  | 
 |  |  |     List<String> selectZkOut(List<Integer> ids); | 
 |  |  |     List<String> selectZkOut(List<String> ids); | 
 |  |  |  | 
 |  |  |     List<String> selectZkIn(List<Integer> ids); | 
 |  |  |     List<String> selectZkIn(List<String> ids); | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         implements NccSaleDbddWmsService { | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<String> selectDbdd(List<Integer> ids) { | 
 |  |  |     public List<String> selectDbdd(List<String> ids) { | 
 |  |  |         return this.baseMapper.selectDbdd(ids); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<String> selectZkOut(List<Integer> ids) { | 
 |  |  |     public List<String> selectZkOut(List<String> ids) { | 
 |  |  |         return this.baseMapper.selectZkOut(ids); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public List<String> selectZkIn(List<Integer> ids) { | 
 |  |  |     public List<String> selectZkIn(List<String> ids) { | 
 |  |  |         return this.baseMapper.selectZkIn(ids); | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 仓库基础数据同步 | 
 |  |  |      */ | 
 |  |  |     @Scheduled(cron = "0/3 * * * * ? ") | 
 |  |  |     public void execute6() { | 
 |  |  |         ReturnT<String> returnT = baseDataHandler.start6(); | 
 |  |  |         if (!returnT.isSuccess()) { | 
 |  |  |             log.error(returnT.getMsg()); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  | } | 
 
 |  |  | 
 |  |  | package com.zy.nc.task; | 
 |  |  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.zy.asrs.service.StoreTypeService; | 
 |  |  | import com.zy.asrs.task.core.ReturnT; | 
 |  |  | import com.zy.nc.entity.*; | 
 |  |  | import com.zy.nc.service.*; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private NccCkPddWmsService nccCkPddWmsService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ConfigServiceImpl configService; | 
 |  |  |     private StoreTypeService storeTypeService; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 发货 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Scheduled(cron = "0/3 * * * * ? ") | 
 |  |  |     public void execute2_1() { | 
 |  |  |         //Config wmsFlag1 = configService.selectConfigByCode("wms_flag"); | 
 |  |  |         List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110); | 
 |  |  |         List<String> ids = storeTypeService.listOwn(); | 
 |  |  |         //String s = "一期成品库-内贸(立体库)、一期成品库-福莱国际外贸(立体库)、一期成品库-外购(立体库)、一期成品库-福达/工厂外贸(立体库)、一期辅料库-包材(立体库)"; | 
 |  |  |         List<String> strings = nccScZkmxbWmsService.selectZkIn(ids); | 
 |  |  |         for (String string : strings) { | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Scheduled(cron = "0/3 * * * * ? ") | 
 |  |  |     public void execute2_2() { | 
 |  |  |         List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110); | 
 |  |  |         List<String> ids = storeTypeService.listOwn(); | 
 |  |  |         List<String> strings = nccScZkmxbWmsService.selectZkOut(ids); | 
 |  |  |         for (String string : strings) { | 
 |  |  |             List<NccScZkmxbWms> wmsFlag = nccScZkmxbWmsService.selectList(new EntityWrapper<NccScZkmxbWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("hdr", 0).eq("bdr", 0)); | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Scheduled(cron = "0/3 * * * * ? ") | 
 |  |  |     public void execute5() { | 
 |  |  |         List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110); | 
 |  |  |         List<String> ids = storeTypeService.listOwn(); | 
 |  |  |         List<String> strings = nccSaleDbddWmsService.selectDbdd(ids); | 
 |  |  |         for (String string : strings) { | 
 |  |  |             List<NccSaleDbddWms> wmsFlag = nccSaleDbddWmsService.selectList(new EntityWrapper<NccSaleDbddWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("dr", 0).eq("bdr", 0)); | 
 
 |  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.baomidou.mybatisplus.plugins.Page; | 
 |  |  | import com.core.common.Cools; | 
 |  |  | import com.zy.asrs.entity.StoreType; | 
 |  |  | import com.zy.asrs.entity.Tag; | 
 |  |  | import com.zy.asrs.entity.param.MatSyncParam; | 
 |  |  | import com.zy.asrs.service.OpenService; | 
 |  |  | import com.zy.asrs.service.StoreTypeService; | 
 |  |  | import com.zy.asrs.service.TagService; | 
 |  |  | import com.zy.asrs.task.AbstractHandler; | 
 |  |  | import com.zy.asrs.task.core.ReturnT; | 
 |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private UserService userService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private StoreTypeService storeTypeService; | 
 |  |  |  | 
 |  |  |     @Value("${NYNC.pageSize}") | 
 |  |  |     private Integer pageSize; | 
 |  |  |  | 
 |  |  | 
 |  |  |         Page<NccJcCkWms> wmsFlag = nccJcCkWmsService.selectPage(page, new EntityWrapper<NccJcCkWms>().ne("wms_flag", 1)); | 
 |  |  |         for (NccJcCkWms nccJcCkWms : wmsFlag.getRecords()) { | 
 |  |  |             log.info("NccJcCkWms数据:{}", JSONObject.toJSON(nccJcCkWms)); | 
 |  |  |             StoreType storeType = storeTypeService.selectById(nccJcCkWms.getCode()); | 
 |  |  |             if (storeType == null) { | 
 |  |  |                 storeType = new StoreType(); | 
 |  |  |                 storeType.setStoreName(nccJcCkWms.getName()); | 
 |  |  |                 storeType.setStatus(1); | 
 |  |  |                 storeType.setStoreId(nccJcCkWms.getCode()); | 
 |  |  |                 storeType.setCreateBy(1L); | 
 |  |  |                 storeType.setCreateTime(new Date()); | 
 |  |  |                 storeTypeService.insert(storeType); | 
 |  |  |             } else { | 
 |  |  |                 storeType.setStoreName(nccJcCkWms.getName()); | 
 |  |  |                 storeTypeService.updateById(storeType); | 
 |  |  |             } | 
 |  |  |             nccJcCkWms.setWmsFlag(1); | 
 |  |  |             nccJcCkWmsService.updateById(nccJcCkWms); | 
 |  |  |         } | 
 |  |  |         return SUCCESS; | 
 |  |  |     } | 
 |  |  | 
 |  |  |                 user.setStatus(1); | 
 |  |  |                 user.setCreateTime(new Date()); | 
 |  |  |                 userService.insert(user); | 
 |  |  |             }else { | 
 |  |  |             } else { | 
 |  |  |                 user.setUsername(nccJcRyWms.getRybm()); | 
 |  |  |                 user.setNickname(nccJcRyWms.getRymc()); | 
 |  |  |                 user.setRoleId(12L); | 
 
| New file | 
 |  |  | 
 |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
 |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
 |  |  | <mapper namespace="com.zy.asrs.mapper.StoreTypeMapper"> | 
 |  |  |  | 
 |  |  |     <select id="listOwn" resultType="string"> | 
 |  |  |         select store_id from man_store where own =1 | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  | </mapper> | 
 
 |  |  | 
 |  |  |                             orderId: Number(data.field.id), | 
 |  |  |                             docType: Number(data.field.docType), | 
 |  |  |                             orderNo: data.field.orderNo, | 
 |  |  |                             itemId: Number(data.field.itemId), | 
 |  |  |                             itemName: data.field.itemName, | 
 |  |  |                             orderDetlList: nList | 
 |  |  |                         }), | 
 |  |  |                         contentType:'application/json;charset=UTF-8', | 
 
 |  |  | 
 |  |  |                             orderId: Number(data.field.id), | 
 |  |  |                             docType: Number(data.field.docType), | 
 |  |  |                             orderNo: data.field.orderNo, | 
 |  |  |                             itemId: Number(data.field.itemId), | 
 |  |  |                             itemName: data.field.itemName, | 
 |  |  |                             orderDetlPakinList: nList | 
 |  |  |                         }), | 
 |  |  |                         contentType:'application/json;charset=UTF-8', | 
 
 |  |  | 
 |  |  |                             orderId: Number(data.field.id), | 
 |  |  |                             docType: Number(data.field.docType), | 
 |  |  |                             orderNo: data.field.orderNo, | 
 |  |  |                             itemId: Number(data.field.itemId), | 
 |  |  |                             itemName: data.field.itemName, | 
 |  |  |                             orderDetlPakoutList: nList | 
 |  |  |                         }), | 
 |  |  |                         contentType:'application/json;charset=UTF-8', | 
 
 |  |  | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">入库仓库:</label> | 
 |  |  |             <div class="layui-input-block cool-auto-complete"> | 
 |  |  |                 <input class="layui-input" name="itemId" placeholder="请输入入库仓库" style="display: none"> | 
 |  |  |                 <input id="itemName" name="itemName" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入单据类型" onfocus=this.blur() lay-verType="tips" lay-verify="required"> | 
 |  |  |                 <div class="cool-auto-complete-window"> | 
 |  |  |                     <input class="cool-auto-complete-window-input" data-key="storeTypeQueryBystoreType" onkeyup="autoLoad(this.getAttribute('data-key'))"> | 
 |  |  |                     <select class="cool-auto-complete-window-select" data-key="storeTypeQueryBystoreTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> | 
 |  |  |                     </select> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">单据编号:</label> | 
 |  |  |             <div class="layui-input-block"> | 
 |  |  |                 <input id="orderNo" name="orderNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> | 
 |  |  | 
 |  |  | <script type="text/javascript" src="../../static/js/echarts/echarts.min.js" charset="utf-8"></script> | 
 |  |  | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> | 
 |  |  | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> | 
 |  |  | <script type="text/javascript" src="../../static/js/order/order.js" charset="utf-8"></script> | 
 |  |  | <script type="text/javascript" src="../../static/js/order/order.js?v=3" charset="utf-8"></script> | 
 |  |  |  | 
 |  |  | <script type="text/template" id="docTypeTpl"> | 
 |  |  |     <option value="">选择类型</option> | 
 
 |  |  | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">入库仓库:</label> | 
 |  |  |             <div class="layui-input-block cool-auto-complete"> | 
 |  |  |                 <input class="layui-input" name="itemId" placeholder="请输入入库仓库" style="display: none"> | 
 |  |  |                 <input id="itemName" name="itemName" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入单据类型" onfocus=this.blur() lay-verType="tips" lay-verify="required"> | 
 |  |  |                 <div class="cool-auto-complete-window"> | 
 |  |  |                     <input class="cool-auto-complete-window-input" data-key="storeTypeQueryBystoreType" onkeyup="autoLoad(this.getAttribute('data-key'))"> | 
 |  |  |                     <select class="cool-auto-complete-window-select" data-key="storeTypeQueryBystoreTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> | 
 |  |  |                     </select> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">单据编号:</label> | 
 |  |  |             <div class="layui-input-block"> | 
 |  |  |                 <input id="orderNo" name="orderNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> | 
 
 |  |  | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">入库仓库:</label> | 
 |  |  |             <div class="layui-input-block cool-auto-complete"> | 
 |  |  |                 <input class="layui-input" name="itemId" placeholder="请输入入库仓库" style="display: none"> | 
 |  |  |                 <input id="itemName" name="itemName" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入单据类型" onfocus=this.blur() lay-verType="tips" lay-verify="required"> | 
 |  |  |                 <div class="cool-auto-complete-window"> | 
 |  |  |                     <input class="cool-auto-complete-window-input" data-key="storeTypeQueryBystoreType" onkeyup="autoLoad(this.getAttribute('data-key'))"> | 
 |  |  |                     <select class="cool-auto-complete-window-select" data-key="storeTypeQueryBystoreTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> | 
 |  |  |                     </select> | 
 |  |  |                 </div> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-form-item"> | 
 |  |  |             <label class="layui-form-label">单据编号:</label> | 
 |  |  |             <div class="layui-input-block"> | 
 |  |  |                 <input id="orderNo" name="orderNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> |