| | |
| | | List<DetlDto> list = new ArrayList<>(); |
| | | List<DetlDto> orderDetails = param.getOrderDetails(); |
| | | for (DetlDto detail : orderDetails) { |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme()); |
| | | DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme(), detail.getQcStatus()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setInspect(Integer.valueOf(detlDto.getQcStatus())); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | |
| | | |
| | | private String batch; |
| | | |
| | | private String spec; |
| | | private String model; |
| | | private String unit; |
| | | private String planNo; |
| | | private String qcStatus; |
| | | |
| | | private Double anfme; |
| | | |
| | | public DetlDto() { |
| | |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | } |
| | | public DetlDto(String matnr, String batch, Double anfme, String qcStatus) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | this.qcStatus = qcStatus; |
| | | } |
| | | |
| | | |
| | | public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) { |
| | | for (DetlDto dto : detlDtos) { |
| | |
| | | /** |
| | | * 获取入出库订单信息 |
| | | */ |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | // @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InOrOutOrder() { |
| | | if (!erpEnabledErpDetTb) return; |
| | | String sqlSelectErpDetTb = "select BIL_NO as billNo,prd_no as prdNo,ITM as itm,ADD_ID as addId2,QTY as qty,PRD_MARK as prdMark,WH as wh,STATUS as status,Temp1 as temp1,Temp2 as temp2,Temp3 as temp3 from ERP_DETTB where 1=1"; |
| | |
| | | /** |
| | | * ERP与lk库存数据比对 |
| | | */ |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | // @Scheduled(cron = "${erp.refreshtime}") |
| | | public void proofread() { |
| | | if (!erpEnabled) return; |
| | | String sqlSelectErpLk = "select prd_no as prdNo,prd_mark as prdMark,qty,wh,status,temp1,temp2,temp3 from bas_erp_lk where 1=1"; |
| | |
| | | /** |
| | | * 获取商品信息表资料 |
| | | */ |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | // @Scheduled(cron = "${erp.refreshtime}") |
| | | public void obtainPedt() { |
| | | if (!enabledErpPrdt) return; |
| | | String sqlSelectPrdt = "select prd_no as prdNo,name,ut,spc,status,type,temp1,temp2,temp3 from ERP_PRDT where 1=1 and temp1 is null"; |
| | |
| | | /** |
| | | * 获取商品信息表资料 年前 |
| | | */ |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | // @Scheduled(cron = "${erp.refreshtime}") |
| | | public void obtainPedt() { |
| | | if (!erpEnabledNew) return; |
| | | String sqlSelectPrdt = "select PRD_NO as prdNo,NAME as name,UT as ut,SPC as spc from PRDT where 1=1"; |
| | |
| | | /** |
| | | * 上报入出库完结订单信息 |
| | | */ |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | // @Scheduled(cron = "${erp.refreshtime}") |
| | | public void reportOrder() { |
| | | if (!erpEnabled) return; |
| | | String sqlSelectLkDetTb = "select bill_no as billNo,prd_no as prdNo,iokindid,add_id as addId,qty,prd_mark as prdMark,wh,billdate,status,temp1,temp2,temp3 from lk_det_tb where 1=1"; |