| | |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MatPrint; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.param.MatParam; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | |
| | | import com.zy.common.entity.MatExcel; |
| | | import com.zy.common.utils.BarcodeUtils; |
| | | import com.zy.common.utils.QrCode; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.nc.entity.NccJcQilibcBarcodeflowWms; |
| | | import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr(){ |
| | | public R autoMatnr() { |
| | | return R.ok().add("YJ" + DateUtils.convert(new Date(), DateUtils.yyyyMMddHHmmsssss).substring(0, 16)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/list/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaList(@RequestParam(required = true)Long tagId){ |
| | | public R pdaList(@RequestParam(required = true) Long tagId) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("tag_id", tagId); |
| | | wrapper.orderBy("create_time", false); |
| | |
| | | |
| | | @RequestMapping(value = "/mat/search/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaSearch(@RequestParam(required = false)String condition){ |
| | | public R pdaSearch(@RequestParam(required = false) String condition) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | if (!Cools.isEmpty(condition)) { |
| | | // wrapper.like("matnr", condition).or().like("maktx", condition); |
| | |
| | | List<Mat> mats = matService.selectList(wrapper); |
| | | return R.ok().add(mats); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/mat/{id}/auth") |
| | | @ManagerAuth |
| | |
| | | |
| | | @RequestMapping(value = "/mat/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) { |
| | | Object tagId = param.get("tag_id"); |
| | | if (Cools.isEmpty(tagId)) { |
| | | tagId = getOriginTag().getId(); |
| | |
| | | |
| | | } |
| | | |
| | | private void convert(Map<String, Object> map, EntityWrapper wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | private void convert(Map<String, Object> map, EntityWrapper 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/update/auth") |
| | | @ManagerAuth |
| | | public R update(Mat mat){ |
| | | if (Cools.isEmpty(mat) || null==mat.getId()){ |
| | | @RequestMapping(value = "/mat/update/auth") |
| | | @ManagerAuth |
| | | public R update(Mat mat) { |
| | | if (Cools.isEmpty(mat) || null == mat.getId()) { |
| | | return R.error(); |
| | | } |
| | | mat.setUpdateBy(getUserId()); |
| | |
| | | |
| | | @RequestMapping(value = "/mat/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam String param){ |
| | | public R delete(@RequestParam String param) { |
| | | List<Mat> list = JSONArray.parseArray(param, Mat.class); |
| | | if (Cools.isEmpty(list)){ |
| | | if (Cools.isEmpty(list)) { |
| | | return R.error(); |
| | | } |
| | | for (Mat entity : list){ |
| | | for (Mat entity : list) { |
| | | if (!matService.delete(new EntityWrapper<>(entity))) { |
| | | throw new CoolException("删除失败,请联系管理员"); |
| | | } |
| | |
| | | |
| | | @RequestMapping(value = "/mat/turn/over/list/auth") |
| | | @ManagerAuth |
| | | public R turnOverList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R turnOverList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | return R.ok(matService.getMatTurnPage(toPage(curr, limit, param, Mat.class))); |
| | | } |
| | | |
| | | @RequestMapping("/mat/turn/over/take/site") |
| | | @ManagerAuth() |
| | | public R availableTakeSite(@RequestParam(required = false) String matnr){ |
| | | public R availableTakeSite(@RequestParam(required = false) String matnr) { |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | List<Mat> mats = matService.selectByMatnrLink(matnr); |
| | | for (Mat mat : mats) { |
| | |
| | | |
| | | @RequestMapping(value = "/mat/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("mat")); |
| | |
| | | wrapper.like("matnr", condition).or().like("maktx", condition); |
| | | Page<Mat> page = matService.selectPage(new Page<>(0, 10000), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Mat mat : page.getRecords()){ |
| | | for (Mat mat : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", mat.getId()); |
| | | map.put("value", mat.getMatnr() + "(" + mat.getMaktx() + ")"); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<Mat> wrapper = new EntityWrapper<Mat>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != matService.selectOne(wrapper)){ |
| | | if (null != matService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(Mat.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | , @RequestParam String param |
| | | , HttpServletResponse response) throws Exception { |
| | | AdminInterceptor.cors(response); |
| | | if (Cools.isEmpty(param)){ |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.EMPTY); |
| | | } |
| | | BufferedImage img; |
| | |
| | | @RequestMapping(value = "/mat/print/auth") |
| | | @ManagerAuth(memo = "商品编码打印") |
| | | public R matCodePrint(@RequestParam(value = "param[]") String[] param) { |
| | | if(Cools.isEmpty(param)) { |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | List<MatPrint> res = new ArrayList<>(); |
| | | for (String matnr : param){ |
| | | for (String matnr : param) { |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | // 打印数据注入 |
| | | MatPrint print = new MatPrint(); |
| | |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | MatExcelListener listener = new MatExcelListener(getUserId()); |
| | | EasyExcel.read(file.getInputStream(), MatExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | return R.ok("成功同步" + listener.getTotal() + "条商品数据"); |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.model.enumUtils.OrderEnumVo; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.nc.entity.NccJcQilibcBarcodeflowWms; |
| | | import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("mobile") |
| | | public class MobileController extends BaseController { |
| | | public class MobileController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private NccJcQilibcBarcodeflowWmsService nccJcQilibcBarcodeflowWmsService; |
| | | @Autowired |
| | | private OrderPakinService orderPakinService; |
| | | |
| | | @Resource |
| | | private StaDescService staDescService; |
| | | |
| | |
| | | @RequestMapping("/pda/WarehouseOutPickMerge/v1") |
| | | @ManagerAuth(memo = "拣料途中并板") |
| | | public R WarehouseOutPickMergeV1(@RequestBody WarehouseOutPickMergeParam param) { |
| | | if (Cools.isEmpty(param,param.getLocNo(),param.getBarcode(),param.getCombMats())) { |
| | | if (Cools.isEmpty(param, param.getLocNo(), param.getBarcode(), param.getCombMats())) { |
| | | return R.parse("参数不能为空!"); |
| | | } |
| | | return mobileService.WarehouseOutPickMergeV1(param, getHostId(), getUserId()); |
| | |
| | | @ManagerAuth(memo = "并板入库") |
| | | public R pickConfirm(@RequestBody PickConfirmParam param) { |
| | | |
| | | if(Cools.isEmpty(param,param.getList(),param.getLocNo(),param.getStaNo())) { |
| | | if (Cools.isEmpty(param, param.getList(), param.getLocNo(), param.getStaNo())) { |
| | | return R.parse("参数不完整"); |
| | | } |
| | | return mobileService.pickConfirm(param, getUserId()); |
| | |
| | | // 商品上架 |
| | | @RequestMapping("/mat/onSale/auth") |
| | | @ManagerAuth |
| | | public R matOnSale(@RequestBody CombParam combParam){ |
| | | public R matOnSale(@RequestBody CombParam combParam) { |
| | | mobileService.onSale(combParam); |
| | | return R.ok("上架成功"); |
| | | } |
| | | |
| | | // 商品下架 |
| | | @RequestMapping("/mat/offSale/auth") |
| | | //@ManagerAuth |
| | | public R matOffSale(@RequestBody OffSaleParam offSaleParam){ |
| | | public R matOffSale(@RequestBody OffSaleParam offSaleParam) { |
| | | mobileService.offSale(offSaleParam); |
| | | return R.ok("下架成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | // 组托 ---------------------------------------------------------------------------------------------------- |
| | |
| | | // } |
| | | @RequestMapping("/order/search/orderNo/auth") |
| | | @ManagerAuth |
| | | public R orderSearchByBarcode(@RequestParam String orderNo){ |
| | | if (Cools.isEmpty(orderNo)){ |
| | | orderNo=null; |
| | | public R orderSearchByBarcode(@RequestParam String orderNo) { |
| | | if (Cools.isEmpty(orderNo)) { |
| | | orderNo = null; |
| | | } |
| | | // List<Order> orders = orderService.selectorderNoL(orderNo); |
| | | List<Order> orders = OrderInAndOutUtil.selectOrderNoL(null, orderNo); |
| | | if (Cools.isEmpty(orders)){ |
| | | List<OrderPakin> orderPakins = orderPakinService.selectorderNoL(orderNo); |
| | | //List<Order> orders = OrderInAndOutUtil.selectOrderNoL(OrderEnumVo.PAKIN.getCode(), orderNo); |
| | | if (Cools.isEmpty(orderPakins)) { |
| | | return R.ok(); |
| | | } |
| | | LinkedList<CombParam> combParams = new LinkedList<>(); |
| | | if (!Cools.isEmpty(orders)){ |
| | | for (Order order:orders){ |
| | | CombParam combParam=new CombParam(); |
| | | if (!Cools.isEmpty(orderPakins)) { |
| | | for (OrderPakin order : orderPakins) { |
| | | CombParam combParam = new CombParam(); |
| | | if (order == null) { |
| | | continue; |
| | | } |
| | |
| | | List<OrderDetl> orderDetls = OrderInAndOutUtil.selectWorkingDetls(order.getPakinPakoutStatus$(), order.getId()); |
| | | if (!Cools.isEmpty(orderDetls)) { |
| | | LinkedList<CombParam.CombMat> combMats = new LinkedList<>(); |
| | | for (OrderDetl orderDetl:orderDetls){ |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | CombParam.CombMat combMat = new CombParam.CombMat(); |
| | | combMat.setMatnr(orderDetl.getMatnr()); |
| | | combMat.setBatch(orderDetl.getBatch()); |
| | | combMat.setAnfme(orderDetl.getAnfme()-orderDetl.getWorkQty()); |
| | | combMat.setAnfme(orderDetl.getAnfme() - orderDetl.getWorkQty()); |
| | | combMat.setMaktx(orderDetl.getMaktx()); |
| | | combMat.setSpecs(orderDetl.getSpecs()); |
| | | combMats.add(combMat); |
| | |
| | | combParams.add(combParam); |
| | | } |
| | | } |
| | | return R.ok().add(combParams); |
| | | return R.ok().add(combParams.get(0)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/search/auth") |
| | | @ManagerAuth |
| | | public R pdaSearchV2(@RequestParam String matnr) { |
| | | EntityWrapper<NccJcQilibcBarcodeflowWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("VBARCODE", matnr).orderBy("ts", false); |
| | | NccJcQilibcBarcodeflowWms nccJcQilibcBarcodeflowWms = nccJcQilibcBarcodeflowWmsService.selectOne(wrapper); |
| | | if (null == nccJcQilibcBarcodeflowWms) { |
| | | return R.error("未找到此条码"); |
| | | } else { |
| | | if (!nccJcQilibcBarcodeflowWms.getInfla().equals("出库")) { |
| | | return R.error("该条码最后一次不是出库"); |
| | | } |
| | | } |
| | | Mat mat = matService.selectByMatnr(nccJcQilibcBarcodeflowWms.getWlbm()); |
| | | MatParam matParam = new MatParam(); |
| | | Synchro.Copy(mat, matParam); |
| | | matParam.setBatch(nccJcQilibcBarcodeflowWms.getVbatchcode()); |
| | | matParam.setAnfme(12D); |
| | | return R.ok().add(matParam); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam){ |
| | | public R comb(@RequestBody CombParam combParam) { |
| | | mobileService.comb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | | |
| | | @RequestMapping("/pack/get/auth") |
| | | @ManagerAuth |
| | | public R packGet(@RequestParam String barcode){ |
| | | public R packGet(@RequestParam String barcode) { |
| | | Pack pack = packService.selectByBarcode(barcode); |
| | | if (pack == null) { |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping("/pack/comb/auth") |
| | | @ManagerAuth(memo = "下线组托") |
| | | public R packComb(@RequestBody CombParam combParam){ |
| | | public R packComb(@RequestBody CombParam combParam) { |
| | | mobileService.packComb(combParam, getUserId()); |
| | | return R.ok("组托成功"); |
| | | } |
| | |
| | | @Deprecated |
| | | public R pakoutQuery(@RequestParam(required = false) String barcode, |
| | | @RequestParam(required = false) Integer staNo, |
| | | @RequestParam(required = false) String matnr){ |
| | | @RequestParam(required = false) String matnr) { |
| | | if (Cools.isEmpty(barcode) && Cools.isEmpty(matnr)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/pakout/confirm/barcode/auth") |
| | | @ManagerAuth |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode){ |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) String barcode) { |
| | | if (Cools.isEmpty(barcode)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/pakout/confirm/goods/auth") //待完善 原因(客户未给出详细信息) |
| | | @ManagerAuth |
| | | public R pakoutQueryByGoods(@RequestBody GDYKConfirmGoodsParam combParam){ |
| | | public R pakoutQueryByGoods(@RequestBody GDYKConfirmGoodsParam combParam) { |
| | | if (Cools.isEmpty(combParam)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | Order order = OrderInAndOutUtil.selectByNo(Boolean.FALSE, combParam.getOrderNo()); |
| | | List<OrderDetl> orderDetlList = OrderInAndOutUtil.selectByOrderId(Boolean.FALSE, order.getId()); |
| | | OrderDetl orderDetl = null; |
| | | for (OrderDetl orderDetl1 : orderDetlList){ |
| | | if (combParam.getMatnr().equals(orderDetl1.getMatnr()) && combParam.getBatch().equals(orderDetl1.getBatch())){ |
| | | for (OrderDetl orderDetl1 : orderDetlList) { |
| | | if (combParam.getMatnr().equals(orderDetl1.getMatnr()) && combParam.getBatch().equals(orderDetl1.getBatch())) { |
| | | orderDetl = orderDetl1; |
| | | break; |
| | | } |
| | | } |
| | | if (Cools.isEmpty(orderDetl)){ |
| | | if (Cools.isEmpty(orderDetl)) { |
| | | return R.error("未查到数据"); |
| | | } |
| | | if (!orderDetl.getQty$().equals("已完成")){ |
| | | if (!orderDetl.getQty$().equals("已完成")) { |
| | | return R.error("任务未完成"); |
| | | } |
| | | //复核数 |
| | | orderDetl.setSource(1); |
| | | // orderDetlService.updateById(orderDetl); |
| | | OrderInAndOutUtil.updateOrderDetl(Boolean.FALSE,order,orderDetl); |
| | | OrderInAndOutUtil.updateOrderDetl(Boolean.FALSE, order, orderDetl); |
| | | return R.ok(); |
| | | } |
| | | |
| | | // 根据库位码和商品码搜索商品 |
| | | @RequestMapping("/mat/find/auth") |
| | | public R find(@RequestParam(required = false) String locNo |
| | | , @RequestParam(required = false) String matnr){ |
| | | , @RequestParam(required = false) String matnr) { |
| | | //List<ManLocDetl> manLocDetls = manLocDetlMapper.selectItem0(locNo, matnr); |
| | | ManLocDetl manLocDetl = manLocDetlMapper.selectLocNo0(locNo, matnr); |
| | | return R.ok(manLocDetl); |
| | |
| | | @RequestMapping("/pakout/confirm/pick/auth") |
| | | @ManagerAuth |
| | | public R pakoutQueryByBarcode(@RequestParam(required = false) Integer wrkNo |
| | | , @RequestParam(required = false) String matnr){ |
| | | , @RequestParam(required = false) String matnr) { |
| | | if (Cools.isEmpty(wrkNo)) { |
| | | return R.ok(); |
| | | } |
| | |
| | | |
| | | @RequestMapping("/adjust/auth") |
| | | @ManagerAuth(memo = "盘点") |
| | | public R adjust(@RequestBody MobileAdjustParam combParam){ |
| | | public R adjust(@RequestBody MobileAdjustParam combParam) { |
| | | mobileService.adjust(combParam, getUserId()); |
| | | return R.ok("盘点成功"); |
| | | } |
| | |
| | | @PostMapping("/order/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakoutByOrder(@RequestBody JSONObject param) { |
| | | if(!param.containsKey("staNo") || !param.containsKey("orderNo")){ |
| | | if (!param.containsKey("staNo") || !param.containsKey("orderNo")) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | mobileService.pakoutByOrder(param,getUserId()); |
| | | mobileService.pakoutByOrder(param, getUserId()); |
| | | return R.ok("出库成功"); |
| | | } |
| | | |
| | |
| | | param.getOrderNo(), // 订单编号 |
| | | DateUtils.convert(now), // 单据日期 |
| | | param.getDocType(), // 单据类型 |
| | | param.getItemId(), // 项目编号 |
| | | param.getItemName(), // |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | |
| | | 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("修改订单类型失败"); |
| | | } |
| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : param.getOrderDetlList()) { |
| | | DetlDto dto = new DetlDto(orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), |
| | | orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), |
| | | param.getItemId(), orderDetl.getStandby2(), orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); |
| | | if (DetlDto.has(list, dto)) { |
| | | OrderDetl item = orderDetlService.selectItem(order.getId(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getBrand(), |
| | | orderDetl.getStandby1(), orderDetl.getStandby2(), orderDetl.getStandby3(), |
| | | param.getItemId(), orderDetl.getStandby2(), orderDetl.getStandby3(), |
| | | orderDetl.getBoxType1(), orderDetl.getBoxType2(), orderDetl.getBoxType3()); |
| | | item.setAnfme(item.getAnfme() + orderDetl.getAnfme()); |
| | | if (!orderDetlService.updateById(item)) { |
| | |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | orderDetl.setStandby1(param.getItemId()); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("保存订单明细档失败"); |
| | | } |
| | |
| | | return R.ok(orderDetlPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pda/list/auth") |
| | | @ManagerAuth |
| | | public R listpda(@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<OrderDetlPakin> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | wrapper.eq("status", 1); |
| | | Page<OrderDetlPakin> orderDetlPage = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(orderDetlPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/list/auth") |
| | | @ManagerAuth |
| | | public R pakoutList(@RequestParam(defaultValue = "1")Integer curr, |
| | |
| | | |
| | | @RequestMapping(value = "/orderDetl/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<OrderDetlPakout> 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("create_time", false); |
| | | } |
| | | wrapper.eq("status", 1); |
| | | Page<OrderDetlPakout> orderDetlPage = orderDetlService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(orderDetlPage); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/pda/list/auth") |
| | | @ManagerAuth |
| | | public R listpda(@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<OrderDetlPakout> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | wrapper.eq("status", 1); |
| | |
| | | |
| | | @RequestMapping(value = "/orderDetl/pakout/list/auth") |
| | | @ManagerAuth |
| | | public R pakoutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | public R pakoutList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | return R.ok(orderDetlService.getPakoutPage(toPage(curr, limit, param, OrderDetlPakout.class))); |
| | | } |
| | | |
| | | 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])); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/update/auth") |
| | | @ManagerAuth |
| | | public R update(OrderDetlPakout orderDetl){ |
| | | if (Cools.isEmpty(orderDetl) || null==orderDetl.getId()){ |
| | | @RequestMapping(value = "/orderDetl/update/auth") |
| | | @ManagerAuth |
| | | public R update(OrderDetlPakout orderDetl) { |
| | | if (Cools.isEmpty(orderDetl) || null == orderDetl.getId()) { |
| | | return R.error(); |
| | | } |
| | | orderDetlService.updateById(orderDetl); |
| | |
| | | |
| | | @RequestMapping(value = "/orderDetl/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | public R delete(@RequestParam(value = "ids[]") Long[] ids) { |
| | | for (Long id : ids) { |
| | | orderDetlService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | |
| | | |
| | | @RequestMapping(value = "/orderDetl/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | public R export(@RequestBody JSONObject param) { |
| | | EntityWrapper<OrderDetlPakout> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("orderDetl")); |
| | |
| | | wrapper.like("id", condition); |
| | | Page<OrderDetlPakout> page = orderDetlService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (OrderDetlPakout orderDetl : page.getRecords()){ |
| | | for (OrderDetlPakout orderDetl : page.getRecords()) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", orderDetl.getId()); |
| | | map.put("value", orderDetl.getId()); |
| | |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<OrderDetlPakout> wrapper = new EntityWrapper<OrderDetlPakout>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != orderDetlService.selectOne(wrapper)){ |
| | | if (null != orderDetlService.selectOne(wrapper)) { |
| | | return R.parse(BaseRes.REPEAT).add(getComment(OrderDetlPakout.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | /** |
| | | * 是否冻结 |
| | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @ApiModelProperty(value= "编号") |
| | | @ApiModelProperty(value = "编号") |
| | | private String uuid; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value= "订单编号") |
| | | @ApiModelProperty(value = "订单编号") |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 单据日期 |
| | | */ |
| | | @ApiModelProperty(value= "单据日期") |
| | | @ApiModelProperty(value = "单据日期") |
| | | @TableField("order_time") |
| | | private String orderTime; |
| | | |
| | | /** |
| | | * 单据类型 |
| | | */ |
| | | @ApiModelProperty(value= "单据类型") |
| | | @ApiModelProperty(value = "单据类型") |
| | | @TableField("doc_type") |
| | | private Long docType; |
| | | |
| | | /** |
| | | * 项目编号 |
| | | * 出库仓库id |
| | | */ |
| | | @ApiModelProperty(value= "项目编号") |
| | | @ApiModelProperty(value = "出库仓库id") |
| | | @TableField("item_id") |
| | | private Long itemId; |
| | | private String itemId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @ApiModelProperty(value = "出库仓库名称") |
| | | @TableField("item_name") |
| | | private String itemName; |
| | | |
| | | /** |
| | | * 调拨项目编号 |
| | | * |
| | | */ |
| | | @ApiModelProperty(value= "调拨项目编号") |
| | | @ApiModelProperty(value = "ru库仓库id") |
| | | @TableField("allot_item_id") |
| | | private Long allotItemId; |
| | | private String allotItemId; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 初始票据号 |
| | | * 初始票据号,入库仓库id |
| | | */ |
| | | @ApiModelProperty(value= "初始票据号") |
| | | @ApiModelProperty(value = "初始票据号") |
| | | @TableField("def_number") |
| | | private String defNumber; |
| | | |
| | | /** |
| | | * 票据号 |
| | | */ |
| | | @ApiModelProperty(value= "票据号") |
| | | @ApiModelProperty(value = "票据号") |
| | | private String number; |
| | | |
| | | /** |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value= "客户编号") |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | | */ |
| | | @ApiModelProperty(value= "客户") |
| | | @ApiModelProperty(value = "客户") |
| | | @TableField("cstmr_name") |
| | | private String cstmrName; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @ApiModelProperty(value= "联系方式") |
| | | @ApiModelProperty(value = "联系方式") |
| | | private String tel; |
| | | |
| | | /** |
| | | * 操作人员 |
| | | */ |
| | | @ApiModelProperty(value= "操作人员") |
| | | @ApiModelProperty(value = "操作人员") |
| | | @TableField("oper_memb") |
| | | private String operMemb; |
| | | |
| | | /** |
| | | * 合计金额 |
| | | */ |
| | | @ApiModelProperty(value= "合计金额") |
| | | @ApiModelProperty(value = "合计金额") |
| | | @TableField("total_fee") |
| | | private Double totalFee; |
| | | |
| | | /** |
| | | * 优惠率 |
| | | */ |
| | | @ApiModelProperty(value= "优惠率") |
| | | @ApiModelProperty(value = "优惠率") |
| | | private Double discount; |
| | | |
| | | /** |
| | | * 优惠金额 |
| | | */ |
| | | @ApiModelProperty(value= "优惠金额") |
| | | @ApiModelProperty(value = "优惠金额") |
| | | @TableField("discount_fee") |
| | | private Double discountFee; |
| | | |
| | | /** |
| | | * 销售或采购费用合计 |
| | | */ |
| | | @ApiModelProperty(value= "销售或采购费用合计") |
| | | @ApiModelProperty(value = "销售或采购费用合计") |
| | | @TableField("other_fee") |
| | | private Double otherFee; |
| | | |
| | | /** |
| | | * 实付金额 |
| | | */ |
| | | @ApiModelProperty(value= "实付金额") |
| | | @ApiModelProperty(value = "实付金额") |
| | | @TableField("act_fee") |
| | | private Double actFee; |
| | | |
| | | /** |
| | | * 付款类型 1: 现金 2: 记账 |
| | | */ |
| | | @ApiModelProperty(value= "付款类型 1: 现金 2: 记账 ") |
| | | @ApiModelProperty(value = "付款类型 1: 现金 2: 记账 ") |
| | | @TableField("pay_type") |
| | | private Integer payType; |
| | | |
| | | /** |
| | | * 业务员 |
| | | */ |
| | | @ApiModelProperty(value= "业务员") |
| | | @ApiModelProperty(value = "业务员") |
| | | private String salesman; |
| | | |
| | | /** |
| | | * 结算天数 |
| | | */ |
| | | @ApiModelProperty(value= "结算天数") |
| | | @ApiModelProperty(value = "结算天数") |
| | | @TableField("account_day") |
| | | private Integer accountDay; |
| | | |
| | | /** |
| | | * 邮费支付类型 1: 在线支付 2: 货到付款 |
| | | */ |
| | | @ApiModelProperty(value= "邮费支付类型 1: 在线支付 2: 货到付款 ") |
| | | @ApiModelProperty(value = "邮费支付类型 1: 在线支付 2: 货到付款 ") |
| | | @TableField("post_fee_type") |
| | | private Integer postFeeType; |
| | | |
| | | /** |
| | | * 邮费 |
| | | */ |
| | | @ApiModelProperty(value= "邮费") |
| | | @ApiModelProperty(value = "邮费") |
| | | @TableField("post_fee") |
| | | private Double postFee; |
| | | |
| | | /** |
| | | * 付款时间 |
| | | */ |
| | | @ApiModelProperty(value= "付款时间") |
| | | @ApiModelProperty(value = "付款时间") |
| | | @TableField("pay_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date payTime; |
| | | |
| | | /** |
| | | * 发货时间 |
| | | */ |
| | | @ApiModelProperty(value= "发货时间") |
| | | @ApiModelProperty(value = "发货时间") |
| | | @TableField("send_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 物流名称 |
| | | */ |
| | | @ApiModelProperty(value= "物流名称") |
| | | @ApiModelProperty(value = "物流名称") |
| | | @TableField("ship_name") |
| | | private String shipName; |
| | | |
| | | /** |
| | | * 物流单号 |
| | | */ |
| | | @ApiModelProperty(value= "物流单号") |
| | | @ApiModelProperty(value = "物流单号") |
| | | @TableField("ship_code") |
| | | private String shipCode; |
| | | |
| | | /** |
| | | * 订单状态 |
| | | */ |
| | | @ApiModelProperty(value= "订单状态") |
| | | @ApiModelProperty(value = "订单状态") |
| | | private Long settle; |
| | | |
| | | /** |
| | | * 步序 |
| | | */ |
| | | @ApiModelProperty(value= "步序") |
| | | @ApiModelProperty(value = "步序") |
| | | private Integer step; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | @ApiModelProperty(value = "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @ApiModelProperty(value = "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @ApiModelProperty(value = "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | @ApiModelProperty(value = "备注") |
| | | private String memo; |
| | | |
| | | /** |
| | | * 状态 1: 进行中 0: 初始 2:已完成 |
| | | */ |
| | | @ApiModelProperty(value= "状态 2:已完成 1: 进行中 0: 初始 ") |
| | | @ApiModelProperty(value = "状态 2:已完成 1: 进行中 0: 初始 ") |
| | | @TableField("move_status") |
| | | private Integer moveStatus; |
| | | |
| | | /** |
| | | * 状态 1: 进行中 0: 初始 2:已完成 |
| | | */ |
| | | @ApiModelProperty(value= "入出库类型(0:未知,1:入库,2:出库)") |
| | | @ApiModelProperty(value = "入出库类型(0:未知,1:入库,2:出库)") |
| | | @TableField("pakin_pakout_status") |
| | | private Integer pakinPakoutStatus; |
| | | |
| | | public Order() {} |
| | | public Order() { |
| | | } |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | public Order(String uuid, String orderNo, String orderTime, Long docType, String itemId, String itemName, String allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Integer pakinPakoutStatus) { |
| | | public Order(String uuid, String orderNo, String orderTime, Long docType, String itemId, String itemName, String allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, Integer pakinPakoutStatus) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getDocType$(){ |
| | | public String getDocType$() { |
| | | DocTypeService service = SpringUtils.getBean(DocTypeService.class); |
| | | DocType docType = service.selectById(this.docType); |
| | | if (!Cools.isEmpty(docType)){ |
| | | if (!Cools.isEmpty(docType)) { |
| | | return String.valueOf(docType.getDocName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getPayType$(){ |
| | | if (null == this.payType){ return null; } |
| | | switch (this.payType){ |
| | | public String getPayType$() { |
| | | if (null == this.payType) { |
| | | return null; |
| | | } |
| | | switch (this.payType) { |
| | | case 1: |
| | | return "现金"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getPakinPakoutStatus$(){ |
| | | switch (this.pakinPakoutStatus){ |
| | | public String getPakinPakoutStatus$() { |
| | | switch (this.pakinPakoutStatus) { |
| | | case 1: |
| | | return "Y"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getPostFeeType$(){ |
| | | if (null == this.postFeeType){ return null; } |
| | | switch (this.postFeeType){ |
| | | public String getPostFeeType$() { |
| | | if (null == this.postFeeType) { |
| | | return null; |
| | | } |
| | | switch (this.postFeeType) { |
| | | case 1: |
| | | return "在线支付"; |
| | | case 2: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getPayTime$(){ |
| | | if (Cools.isEmpty(this.payTime)){ |
| | | public String getPayTime$() { |
| | | if (Cools.isEmpty(this.payTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.payTime); |
| | | } |
| | | |
| | | public String getSendTime$(){ |
| | | if (Cools.isEmpty(this.sendTime)){ |
| | | public String getSendTime$() { |
| | | if (Cools.isEmpty(this.sendTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); |
| | | } |
| | | |
| | | public String getSettle$(){ |
| | | public String getSettle$() { |
| | | OrderSettleService service = SpringUtils.getBean(OrderSettleService.class); |
| | | OrderSettle orderSettle = service.selectById(this.settle); |
| | | if (!Cools.isEmpty(orderSettle)){ |
| | | if (!Cools.isEmpty(orderSettle)) { |
| | | return String.valueOf(orderSettle.getSettleName()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | public String getStatus$() { |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status) { |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getMoveStatus$(){ |
| | | if (null == this.moveStatus){ return null; } |
| | | switch (this.moveStatus){ |
| | | public String getMoveStatus$() { |
| | | if (null == this.moveStatus) { |
| | | return null; |
| | | } |
| | | switch (this.moveStatus) { |
| | | case 2: |
| | | return "已备货"; |
| | | case 1: |
| | |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | public String getCreateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | public String getCreateTime$() { |
| | | if (Cools.isEmpty(this.createTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | public String getUpdateBy$() { |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | if (!Cools.isEmpty(user)) { |
| | | return String.valueOf(user.getUsername()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | public String getUpdateTime$() { |
| | | if (Cools.isEmpty(this.updateTime)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | @ApiModelProperty(value= "备注") |
| | | @TableField("remark") |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public OrderDetlPakin() {} |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public OrderDetlPakout() {} |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value= "项目编号") |
| | | @TableField("item_id") |
| | | private Long itemId; |
| | | private String itemId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("item_name") |
| | |
| | | */ |
| | | @ApiModelProperty(value= "调拨项目编号") |
| | | @TableField("allot_item_id") |
| | | private Long allotItemId; |
| | | private String allotItemId; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 初始票据号 |
| | |
| | | |
| | | public OrderPakin() {} |
| | | |
| | | public OrderPakin(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakin(String uuid, String orderNo, String orderTime, Long docType, String itemId, String itemName, String allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "项目编号") |
| | | @TableField("item_id") |
| | | private Long itemId; |
| | | private String itemId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("item_name") |
| | |
| | | */ |
| | | @ApiModelProperty(value= "调拨项目编号") |
| | | @TableField("allot_item_id") |
| | | private Long allotItemId; |
| | | private String allotItemId; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 初始票据号 |
| | |
| | | |
| | | public OrderPakout() {} |
| | | |
| | | public OrderPakout(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakout(String uuid, String orderNo, String orderTime, Long docType, String itemId, String itemName, String allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | private String boxType1 = ""; |
| | | private String boxType2 = ""; |
| | | private String boxType3 = ""; |
| | | |
| | | // 物料数量 |
| | | private Double anfme; |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 商品同步接口,参数 |
| | | * Created on 2022/6/22 |
| | | */ |
| | | @Data |
| | | public class MatParam implements Serializable { |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | private double anfme; |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | private String batch; |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 商品分类 |
| | | */ |
| | | private String groupCode; |
| | | |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | private String groupName; |
| | | |
| | | /** |
| | | * 别名 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | private String model; |
| | | |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | | */ |
| | | private String unit; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | private String sku; |
| | | |
| | | /** |
| | | * 单位量 |
| | | */ |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 产地 |
| | | */ |
| | | private String origin; |
| | | |
| | | /** |
| | | * 厂家 |
| | | */ |
| | | private String manu; |
| | | |
| | | /** |
| | | * 生产日期 |
| | | */ |
| | | private String manuDate; |
| | | |
| | | /** |
| | | * 品项数 |
| | | */ |
| | | private String itemNum; |
| | | |
| | | /** |
| | | * 安全库存量 |
| | | */ |
| | | private Double safeQty; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 三方编码 |
| | | */ |
| | | private String threeCode; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | private String supp; |
| | | |
| | | /** |
| | | * 供应商编码 |
| | | */ |
| | | private String suppCode; |
| | | |
| | | /** |
| | | * 是否批次 1: 是 0: 否 |
| | | */ |
| | | private Integer beBatch; |
| | | |
| | | /** |
| | | * 保质期 |
| | | */ |
| | | private String deadTime; |
| | | |
| | | /** |
| | | * 预警天数 |
| | | */ |
| | | private Integer deadWarn; |
| | | |
| | | /** |
| | | * 来源 1: 制造 2: 采购 3: 外协 |
| | | */ |
| | | private Integer source; |
| | | |
| | | /** |
| | | * 要求检验 1: 是 0: 否 |
| | | */ |
| | | private Integer inspect; |
| | | |
| | | /** |
| | | * 危险品 1: 是 0: 否 |
| | | */ |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String memo; |
| | | |
| | | } |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.zy.common.model.DetlDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private String orderTime; |
| | | |
| | | private Long itemId; |
| | | |
| | | private String itemName; |
| | | // private String itemId; |
| | | // |
| | | // private String itemName; |
| | | // |
| | | // private String allotItemId; |
| | | // |
| | | // private String allotItemName; |
| | | |
| | | private List<DetlDto> orderDetails; |
| | | |
| | |
| | | |
| | | private String orderTime; |
| | | |
| | | private Long itemId; |
| | | |
| | | private String itemName; |
| | | // private String itemId; |
| | | // |
| | | // private String itemName; |
| | | // |
| | | // private String allotItemId; |
| | | // |
| | | // private String allotItemName; |
| | | |
| | | private List<DetlDto> orderDetails; |
| | | |
| | |
| | | |
| | | private String orderNo; |
| | | |
| | | private Long itemId; |
| | | private String itemId; |
| | | |
| | | private String itemName; |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value= "备用1") |
| | | @TableField("box_type1") |
| | | private String boxType1 = "1"; |
| | | private String boxType1 = ""; |
| | | |
| | | /** |
| | | * 备用2 |
| | | */ |
| | | @ApiModelProperty(value= "备用2") |
| | | @TableField("box_type2") |
| | | private String boxType2 = "1"; |
| | | private String boxType2 = ""; |
| | | |
| | | /** |
| | | * 备用3 |
| | | */ |
| | | @ApiModelProperty(value= "备用3") |
| | | @TableField("box_type3") |
| | | private String boxType3 = "1"; |
| | | private String boxType3 = ""; |
| | | |
| | | } |
| | | |
| | |
| | | private String standby1 = ""; |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | private String boxType1 = ""; |
| | | private String boxType2 = ""; |
| | | private String boxType3 = ""; |
| | | |
| | | public FindLocNoAttributeVo() { |
| | | } |
| | |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | if (param.getCombMats().size() > 1) { |
| | | throw new CoolException("请提取一个商品,或者刷新重新组托!"); |
| | | } |
| | | // if (param.getCombMats().size() > 1) { |
| | | // throw new CoolException("请提取一个商品,或者刷新重新组托!"); |
| | | // } |
| | | // 判断是否有相同条码的数据 |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | |
| | | if (param.getBarcode().length() != 8) { |
| | | throw new CoolException("条码长度不是8位===>>" + param.getBarcode()); |
| | | } |
| | | if (param.getCombMats().size() > 1) { |
| | | throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | } |
| | | // if (param.getCombMats().size() > 1) { |
| | | // throw new CoolException("不允许混料===>>" + param.getBarcode()); |
| | | // } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode())); |
| | |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | |
| | | param.getCombMats().forEach(elem -> { |
| | | // TODO 不考虑代码效率,因为旧代码bug少 |
| | | if (!Cools.isEmpty(elem.getVbarcode())) { |
| | | NccJcQilibcBarcodeflowWms vbarcode1 = barcodeflowWmsService.selectOne(new EntityWrapper<NccJcQilibcBarcodeflowWms>().eq("vbarcode", elem.getVbarcode())); |
| | | elem.setBatch(vbarcode1.getVbatchcode()); |
| | | elem.setMatnr(vbarcode1.getWlbm()); |
| | | elem.setAnfme(vbarcode1.getNastnum().doubleValue()); |
| | | } |
| | | |
| | | |
| | | // 订单明细数量校验 |
| | | // OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(), elem.getBrand(), elem.getStandby1(), elem.getStandby2(), elem.getStandby3(), |
| | | elem.getBoxType1(), elem.getBoxType2(), elem.getBoxType3()); |
| | | if (elem.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法,已经超过单据入库数量"); |
| | | } |
| | | // 修改订单作业数量 |
| | | // if (!orderDetlService.increaseWorkQty(order.getId(), elem.getMatnr(), elem.getBatch(), elem.getAnfme())) { |
| | |
| | | null, // 备注 |
| | | 1 |
| | | ); |
| | | |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | |
| | | orderDetl.setStandby1(detlDto.getStandby1()); |
| | | orderDetl.setStandby2(detlDto.getStandby2()); |
| | | orderDetl.setStandby3(detlDto.getStandby3()); |
| | | orderDetl.setBoxType1(detlDto.getBoxType1()); |
| | | orderDetl.setBoxType2(detlDto.getBoxType2()); |
| | | orderDetl.setBoxType3(detlDto.getBoxType3()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(9527L); |
| | |
| | | // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据 |
| | | if (!Cools.isEmpty(order)) { |
| | | if (order.getSettle() > 1L) { |
| | | throw new CoolException(param.getOrderNo() + "正在出库,无法修改单据"); |
| | | //TODO |
| | | //throw new CoolException(param.getOrderNo() + "正在出库,无法修改单据"); |
| | | } |
| | | orderService.remove(order.getId()); |
| | | } |
| | |
| | | orderDetl.setStandby1(detlDto.getStandby1()); |
| | | orderDetl.setStandby2(detlDto.getStandby2()); |
| | | orderDetl.setStandby3(detlDto.getStandby3()); |
| | | orderDetl.setBoxType1(detlDto.getBoxType1()); |
| | | orderDetl.setBoxType2(detlDto.getBoxType2()); |
| | | orderDetl.setBoxType3(detlDto.getBoxType3()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setCreateBy(9527L); |
| | |
| | | } |
| | | break; |
| | | case "转库-出库": |
| | | process1 = processZKCK(order, orderDetls); |
| | | List<Object> zkck1 = new ArrayList<>(); |
| | | zkck1.add(process1); |
| | | //发送请求 |
| | | response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, whstrans, JSONObject.toJSONString(zkck1)); |
| | | if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | log.info("转库-出库1response:{}", response); |
| | | step = 1; |
| | | } |
| | | if (step == 1) { |
| | | process2 = processGENERALOUT2(orderDetls); |
| | | List<Object> zkck2 = new ArrayList<>(); |
| | | zkck2.add(process2); |
| | | //发送请求 |
| | | response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, generalout, JSONObject.toJSONString(zkck2)); |
| | | if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | log.info("转库-出库2response:{}", response); |
| | | step = 10; |
| | | } |
| | | } else { |
| | | process1 = processZKCK(order, orderDetls); |
| | | List<Object> zkck1 = new ArrayList<>(); |
| | | zkck1.add(process1); |
| | | //发送请求 |
| | | response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, whstrans, JSONObject.toJSONString(zkck1)); |
| | | if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | log.info("转库-出库1response:{}", response); |
| | | |
| | | process2 = processGENERALOUT2(orderDetls); |
| | | List<Object> zkck2 = new ArrayList<>(); |
| | | zkck2.add(process2); |
| | | //发送请求 |
| | | response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, generalout, JSONObject.toJSONString(zkck2)); |
| | | if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | log.info("转库-出库2response:{}", response); |
| | | step = 10; |
| | | process2 = processGENERALOUT2(orderDetls); |
| | | List<Object> zkck2 = new ArrayList<>(); |
| | | zkck2.add(process2); |
| | | //发送请求 |
| | | response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, generalout, JSONObject.toJSONString(zkck2)); |
| | | if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | log.info("转库-出库2response:{}", response); |
| | | step = 10; |
| | | } |
| | | } else { |
| | | step = 1; |
| | | } |
| | | } |
| | | break; |
| | | case "集团内部调拨": |
| | |
| | | } |
| | | } else if (step != 0) { |
| | | // 修改订单状态 做标记 |
| | | if (!orderService.updateSettleStep(order.getId(), 6L, null, step)) { |
| | | if (!orderService.updateSettleStep(order.getId(), 4L, null, step)) { |
| | | throw new CoolException("服务器内部错误,请联系管理员"); |
| | | } |
| | | } |
| | |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | WhsTransBillHeaderVO whsTransBillHeaderVO = new WhsTransBillHeaderVO(); |
| | | whsTransBillHeaderVO.setPk_org("FYT"); |
| | | whsTransBillHeaderVO.setCwarehouseid(order.getItemId() + ""); |
| | | whsTransBillHeaderVO.setCotherbizid(order.getAllotItemId() + ""); |
| | | whsTransBillHeaderVO.setCtrantypeid("4K-Cxx-01"); |
| | | whsTransBillHeaderVO.setCwarehouseid(order.getItemId()); |
| | | whsTransBillHeaderVO.setCtrantypeid("4K-01"); |
| | | WhsTransBillBodyVO whsTransBillBodyVO = null; |
| | | List<WhsTransBillBodyVO> whsTransBillBodyVOS = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | |
| | | //if (!Cools.isEmpty(remark)) { |
| | | //NccSaleXsfhmxWms nccSaleXsfhmxWms = JSONObject.parseObject(remark, NccSaleXsfhmxWms.class); |
| | | whsTransBillBodyVO.setNnum(orderDetl.getQty()); |
| | | whsTransBillBodyVO.setVfree10(orderDetl.getBatch()); |
| | | whsTransBillBodyVO.setCmaterialoid(orderDetl.getMatnr()); |
| | | whsTransBillBodyVO.setVbatchcode(orderDetl.getBatch()); |
| | | //} |
| | | whsTransBillHeaderVO.setCotherbizid(orderDetl.getStandby1()); |
| | | whsTransBillBodyVOS.add(whsTransBillBodyVO); |
| | | } |
| | | data.put("WhsTransBillHeaderVO", whsTransBillHeaderVO); |
| | |
| | | private String standby2 = ""; |
| | | private String standby3 = ""; |
| | | |
| | | private String boxType1 = "1"; |
| | | private String boxType2 = "1"; |
| | | private String boxType3 = "1"; |
| | | private String boxType1 = ""; |
| | | private String boxType2 = ""; |
| | | private String boxType3 = ""; |
| | | |
| | | private String orderNo; |
| | | |
| | |
| | | package com.zy.nc.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.math.BigDecimal; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.math.BigDecimal; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | private BigDecimal ydzsl; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String vbatchcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal ydsl; |
| | |
| | | * |
| | | */ |
| | | private Integer bdr; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | */ |
| | | private String wmsMemo; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String vbatchcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String ckbm; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String ckmc; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private BigDecimal ntaxmny; |
| | | |
| | | @Override |
| | | public boolean equals(Object that) { |
| | | if (this == that) { |
| | |
| | | && (this.getBts() == null ? other.getBts() == null : this.getBts().equals(other.getBts())) |
| | | && (this.getWmsFlag() == null ? other.getWmsFlag() == null : this.getWmsFlag().equals(other.getWmsFlag())) |
| | | && (this.getHdr() == null ? other.getHdr() == null : this.getHdr().equals(other.getHdr())) |
| | | && (this.getBdr() == null ? other.getBdr() == null : this.getBdr().equals(other.getBdr())); |
| | | && (this.getBdr() == null ? other.getBdr() == null : this.getBdr().equals(other.getBdr())) |
| | | && (this.getWmsMemo() == null ? other.getWmsMemo() == null : this.getWmsMemo().equals(other.getWmsMemo())) |
| | | && (this.getVbatchcode() == null ? other.getVbatchcode() == null : this.getVbatchcode().equals(other.getVbatchcode())) |
| | | && (this.getCkbm() == null ? other.getCkbm() == null : this.getCkbm().equals(other.getCkbm())) |
| | | && (this.getCkmc() == null ? other.getCkmc() == null : this.getCkmc().equals(other.getCkmc())) |
| | | && (this.getNtaxmny() == null ? other.getNtaxmny() == null : this.getNtaxmny().equals(other.getNtaxmny())); |
| | | } |
| | | |
| | | @Override |
| | |
| | | result = prime * result + ((getWmsFlag() == null) ? 0 : getWmsFlag().hashCode()); |
| | | result = prime * result + ((getHdr() == null) ? 0 : getHdr().hashCode()); |
| | | result = prime * result + ((getBdr() == null) ? 0 : getBdr().hashCode()); |
| | | result = prime * result + ((getWmsMemo() == null) ? 0 : getWmsMemo().hashCode()); |
| | | result = prime * result + ((getVbatchcode() == null) ? 0 : getVbatchcode().hashCode()); |
| | | result = prime * result + ((getCkbm() == null) ? 0 : getCkbm().hashCode()); |
| | | result = prime * result + ((getCkmc() == null) ? 0 : getCkmc().hashCode()); |
| | | result = prime * result + ((getNtaxmny() == null) ? 0 : getNtaxmny().hashCode()); |
| | | return result; |
| | | } |
| | | |
| | |
| | | sb.append(", wmsFlag=").append(wmsFlag); |
| | | sb.append(", hdr=").append(hdr); |
| | | sb.append(", bdr=").append(bdr); |
| | | sb.append(", wmsMemo=").append(wmsMemo); |
| | | sb.append(", vbatchcode=").append(vbatchcode); |
| | | sb.append(", ckbm=").append(ckbm); |
| | | sb.append(", ckmc=").append(ckmc); |
| | | sb.append(", ntaxmny=").append(ntaxmny); |
| | | sb.append("]"); |
| | | return sb.toString(); |
| | | } |
| | |
| | | public void execute4() { |
| | | List<String> strings = nccCkPddWmsService.selectPdd(); |
| | | for (String string : strings) { |
| | | List<NccCkPddWms> wmsFlag = nccCkPddWmsService.selectList(new EntityWrapper<NccCkPddWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("hdr", 0).eq("bdr", 0)); |
| | | List<NccCkPddWms> wmsFlag = nccCkPddWmsService.selectList(new EntityWrapper<NccCkPddWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("FBILLFLAG",4).eq("hdr", 0).eq("bdr", 0)); |
| | | ReturnT<String> returnT = planOrderHandler.start4(wmsFlag); |
| | | if (!returnT.isSuccess()) { |
| | | for (NccCkPddWms wms : wmsFlag) { |
| | |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | |
| | | nccSaleXsfhmxWmsService.updateBatchById(wmsFlag); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | TransactionAspectSupport. currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | |
| | | detlDto.setBatch(nccScZkmxbWms.getVbatchcode()); |
| | | detlDto.setLineNumber(i); |
| | | detlDto.setRemark(JSONObject.toJSONString(nccScZkmxbWms)); |
| | | detlDto.setStandby1(nccScZkmxbWms.getRkckbm()); |
| | | orderDetails.add(detlDto); |
| | | i++; |
| | | nccScZkmxbWms.setWmsFlag(1); |
| | |
| | | detlDto.setBatch(nccCgCgdhdWms.getVbatchcode()); |
| | | detlDto.setLineNumber(i); |
| | | detlDto.setRemark(JSONObject.toJSONString(nccCgCgdhdWms)); |
| | | detlDto.setStandby1(nccCgCgdhdWms.getCkbm()); |
| | | orderDetails.add(detlDto); |
| | | i++; |
| | | nccCgCgdhdWms.setWmsFlag(1); |
| | |
| | | inventoryCheckOrderDetlService.insert(checkOrderDetl); |
| | | nccScZkmxbWms.setWmsFlag(1); |
| | | param.setOrderNo(nccScZkmxbWms.getVbillcode()); |
| | | param.setCreateBy(nccScZkmxbWms.getPdrmc()); |
| | | |
| | | } |
| | | param.setCreateTime(new Date()); |
| | | param.setStatus("1"); |
| | | inventoryCheckOrderService.insert(param); |
| | | nccCkPddWmsService.updateBatchById(wmsFlag); |
| | |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | insTb.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | insTb.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | |
| | | ,range: true |
| | | }); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | insTb.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 表格顶部工具栏 --> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加 |
| | | </button> |
| | |
| | | <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?v=3" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/order.js?v=6" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 表格顶部工具栏 --> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加 |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | <!-- <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加--> |
| | | <!-- </button>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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/orderPakin/order.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/orderPakin/order.js?v=1" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 表格顶部工具栏 --> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加 |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | <!-- <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加--> |
| | | <!-- </button>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <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/orderPakout/order.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/orderPakout/order.js?v=2" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |