| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OpenOrderPakinParam; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.common.constant.MesConstant; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.model.MesCombParam; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private OpenService openService; |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private WorkLogHandler workLogHandler; |
| | | @Autowired |
| | | private AdjDetlService adjDetlService; |
| | | @Autowired |
| | | private CheckRecordService checkRecordService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | // 判断是否有相同条码的数据 |
| | | // if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | // eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | // throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | // } |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | eq("zpallet", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "组托数据已存在"); |
| | | } |
| | | |
| | | // todo: 不下线重新入库 |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(param.getBarcode()); |
| | | if (wrkMast != null && wrkMast.getWrkSts() == 18) { |
| | | ReturnT<String> start = workLogHandler.start(wrkMast); |
| | | if (!start.isSuccess()) { |
| | | log.error("工作档[workNo={}]历史档处理失败", wrkMast.getWrkNo()); |
| | | } |
| | | } |
| | | |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet",param.getBarcode())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode())); |
| | | // int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet",param.getBarcode()) |
| | | // .last(" wrk_no IN ( SELECT wrk_no FROM asr_wrk_mast WHERE wrk_sts != 15 )")); |
| | | if (wrkMast != null && wrkMast.getWrkSts()==18) countWrk = 0; |
| | | if (countLoc > 0 || countWrk > 0) { |
| | | throw new CoolException("工作档/库存条码数据已存在===>>" + param.getBarcode()); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | Integer matType = 0; |
| | | |
| | | // 无单组托 |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | // elem.setBatch(""); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getMemo(), elem.getCstmr(),elem.getOwner()); |
| | | |
| | | if (Cools.isEmpty(detlDto.getBatch())){ |
| | | String batch = DateUtils.convert(new Date(),DateUtils.yyyyMMdd); |
| | | detlDto.setBatch(batch); |
| | | } |
| | | |
| | | if (Cools.isEmpty(detlDto.getOwner())){ |
| | | detlDto.setOwner(1L); |
| | | } |
| | | |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |
| | |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | | // waitPakin.setBatch(""); |
| | | waitPakin.setBatch(detlDto.getBatch()); |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | waitPakin.setOwner(detlDto.getOwner()); |
| | | waitPakin.setMemo(detlDto.getMemo()); |
| | | waitPakin.setFrozen(param.getFrozen()); // 是否冻结 |
| | | waitPakin.setManu(detlDto.getCstmr()); |
| | | waitPakin.setMatType(mat.getMatType());//物料类型 |
| | | waitPakin.setMatTypeIn(param.getMatTypeIn());//强制物料类型 |
| | | if (Cools.isEmpty(mat.getMatType())){ |
| | | throw new CoolException("物料类型异常"+mat.getMatnr()); |
| | | }else { |
| | | if (matType == 0){ |
| | | matType = mat.getMatType(); |
| | | }else if (!matType.equals(mat.getMatType())){ |
| | | throw new CoolException("请组托同一类型的物料"); |
| | | } |
| | | } |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | |
| | | //elem.setBatch(""); |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch()); |
| | | if (elem.getAnfme() > orderDetl.getEnableQty()) { |
| | |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getOwner()); |
| | | |
| | | if (Cools.isEmpty(detlDto.getOwner())){ |
| | | detlDto.setOwner(1L); |
| | | } |
| | | |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |
| | |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | | waitPakin.setOrderNo(order.getOrderNo()); // 单据编号 |
| | | waitPakin.setBatch(detlDto.getBatch()); // 批号 |
| | | //waitPakin.setBatch(""); // 序列码 |
| | | waitPakin.setZpallet(param.getBarcode()); // 托盘码 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | | waitPakin.setAnfme(detlDto.getAnfme()); // 数量 |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | waitPakin.setOwner(detlDto.getOwner()); |
| | | waitPakin.setMatType(mat.getMatType());//物料类型 |
| | | waitPakin.setMatTypeIn(param.getMatTypeIn()); //强制物料类型 |
| | | // if (Cools.isEmpty(mat.getMatType())){ |
| | | // throw new CoolException("物料类型异常"+mat.getMatnr()); |
| | | // }else { |
| | | // if (matType == 0){ |
| | | // matType = mat.getMatType(); |
| | | // }else if (matType!=mat.getMatType()){ |
| | | // throw new CoolException("请组托同一类型的物料"); |
| | | // } |
| | | // } |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | |
| | | orderService.updateSettle(order.getId(), 2L, userId); |
| | | } |
| | | |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public void adjustNew(MobileAdjustParam param, Boolean re, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", param.getBarcode())); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException("托盘码:"+param.getBarcode()+" 无有效工作档"); |
| | | }else if (wrkMast.getIoType()!=107){ |
| | | throw new CoolException("托盘码:"+param.getBarcode()+" 所属工作档非盘点任务"); |
| | | }else if (wrkMast.getWrkSts()!=17.0){ |
| | | throw new CoolException("托盘码:"+param.getBarcode()+" 所属工作档工作状态不是出库完成"); |
| | | }else { } |
| | | |
| | | List<WrkDetl> wrkDetls = param.getWrkDetls(); |
| | | String recordRecordLog="托盘码"+param.getBarcode()+"盘点记录:"; |
| | | AdjDetl adjDetl=new AdjDetl(); |
| | | adjDetl.setAppeTime(new Date()); |
| | | adjDetl.setAppeUser(userId); |
| | | adjDetl.setModiTime(new Date()); |
| | | adjDetl.setModiUser(userId); |
| | | adjDetl.setLocNo(wrkMast.getSourceLocNo()); |
| | | CheckRecord checkRecord=new CheckRecord(); |
| | | checkRecord.setLocNo(wrkMast.getSourceLocNo()); |
| | | checkRecord.setBarcode(param.getBarcode()); |
| | | checkRecord.setCreateTime(new Date()); |
| | | for (WrkDetl wrkDetl:wrkDetls){ |
| | | WrkDetl wrkDetlOld = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>() |
| | | .eq("wrk_no", wrkMast.getWrkNo()) |
| | | .eq("matnr",wrkDetl.getMatnr()) |
| | | // .eq("batch",Cools.isEmpty(wrkDetl.getBatch())?"":wrkDetl.getBatch()) |
| | | ); |
| | | // LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>() |
| | | // .eq("loc_no", wrkMast.getLocNo()) |
| | | // .eq("matnr",wrkDetl.getMatnr()) |
| | | // .eq("batch",wrkDetl.getBatch()) |
| | | // ); |
| | | |
| | | adjDetl.setMatnr(wrkDetl.getMatnr()); |
| | | adjDetl.setBatch(wrkDetl.getBatch()); |
| | | adjDetl.setAdjQty(wrkDetl.getAnfme()); |
| | | |
| | | checkRecord.setMatnr(wrkDetl.getMatnr()); |
| | | checkRecord.setMaktx(wrkDetl.getMaktx()); |
| | | checkRecord.setSpecs(wrkDetl.getSpecs()); |
| | | checkRecord.setBatch(wrkDetl.getBatch()); |
| | | checkRecord.setConfirmQty(wrkDetl.getAnfme()); |
| | | if (Cools.isEmpty(wrkDetlOld)){ |
| | | wrkDetl.setWrkNo(wrkMast.getWrkNo()); |
| | | wrkDetl.setZpallet(wrkMast.getBarcode()); |
| | | wrkDetlService.insert(wrkDetl); |
| | | recordRecordLog=recordRecordLog+"\n"+"新增一条明细:"+"\t商品编号:"+wrkDetl.getMatnr()+"\t批号:"+wrkDetl.getBatch()+"\t数量:"+wrkDetl.getAnfme(); |
| | | adjDetl.setOriQty(0.0); |
| | | adjDetlService.insert(adjDetl); |
| | | checkRecord.setAnfme(0.0); |
| | | if (!re) { |
| | | checkRecordService.insert(checkRecord); |
| | | } |
| | | }else if (wrkDetlOld.getAnfme()!=wrkDetl.getAnfme()){ |
| | | wrkDetlService.updateAnfme(wrkDetl.getAnfme(),wrkMast.getWrkNo(),wrkDetl.getMatnr(),wrkDetl.getBatch()); |
| | | recordRecordLog=recordRecordLog+"\n"+"更新一条明细:"+"\t商品编号:"+wrkDetl.getMatnr()+"\t批号:"+wrkDetl.getBatch()+"\t原数量:"+wrkDetlOld.getAnfme()+"\t新数量:"+wrkDetl.getAnfme(); |
| | | adjDetl.setOriQty(wrkDetlOld.getAnfme()); |
| | | adjDetlService.insert(adjDetl); |
| | | |
| | | checkRecord.setAnfme(wrkDetlOld.getAnfme()); |
| | | if (!re) { |
| | | checkRecordService.insert(checkRecord); |
| | | } |
| | | }else if (wrkDetlOld.getAnfme()==wrkDetl.getAnfme()){ |
| | | recordRecordLog=recordRecordLog+"\n"+"一条明细保持不变:"+"\t商品编号:"+wrkDetl.getMatnr()+"\t批号:"+wrkDetl.getBatch()+"\t数量:"+wrkDetlOld.getAnfme(); |
| | | continue; |
| | | }else { |
| | | throw new CoolException("托盘码:"+param.getBarcode()+" 未知异常,请联系管理员"); |
| | | } |
| | | } |
| | | log.info(recordRecordLog); |
| | | } |
| | | |
| | | @Override |
| | |
| | | // todo 盘点记录、保存调整记录 |
| | | // 修改明细 |
| | | if (!wrkDetlService.updateAnfme(wrkDetl1.getAnfme(), wrkMast.getWrkNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) { |
| | | throw new CoolException(wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "批号修改数量失败"); |
| | | throw new CoolException(wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "序列码修改数量失败"); |
| | | } |
| | | } |
| | | iterator.remove(); |
| | |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | // todo 盘点记录、保存调整记录 |
| | | if (!wrkDetlService.updateAnfme(-1.0D, wrkMast.getWrkNo(), wrkDetl.getMatnr(), wrkDetl.getBatch())) { |
| | | throw new CoolException("删除" + wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "批号任务明细失败"); |
| | | throw new CoolException("删除" + wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "序列码任务明细失败"); |
| | | } |
| | | } |
| | | |
| | |
| | | wrkDetl.setAppeTime(now); |
| | | wrkDetl.setAppeUser(userId); |
| | | if (!wrkDetlService.insert(wrkDetl)) { |
| | | throw new CoolException("添加" + wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "批号任务明细失败"); |
| | | throw new CoolException("添加" + wrkMast.getWrkNo() + "盘点任务," + wrkDetl.getMatnr() + "商品," + wrkDetl.getBatch() + "序列码任务明细失败"); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void packComb(CombParam param, Long userId) { |
| | | if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | |
| | | throw new CoolException(elem.getMatnr() + "条码已下线,请检查!"); |
| | | } |
| | | } |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | Mat analyse = MatUtils.analyseMat(elem.getMatnr()); |
| | | // 条码、物料代码、序列号、数量 |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), analyse.getMatnr(), analyse.getBarcode(), elem.getAnfme()); |
| | | // DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme()); |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |
| | |
| | | }); |
| | | |
| | | if (packDown) { |
| | | // 数据上报 todo |
| | | MesCombParam mesCombParam = new MesCombParam(); |
| | | mesCombParam.setZpallet(param.getBarcode()); |
| | | mesCombParam.setPakinTime(DateUtils.convert(now)); |
| | | mesCombParam.setLgort("5008"); |
| | | mesCombParam.setPlantCode("5000"); |
| | | mesCombParam.setFromCode("5012-20"); |
| | | mesCombParam.setStationCode("JJQ-PFZPDB-XX"); |
| | | for (DetlDto detlDto : detlDtos) { |
| | | mesCombParam.getList().add(new MesCombParam.Detl(detlDto.getOrderNo(), detlDto.getAnfme())); |
| | | } |
| | | String response = ""; |
| | | boolean success = false; |
| | | try { |
| | | response = new HttpHandler.Builder() |
| | | .setUri(MesConstant.URL) |
| | | .setPath(MesConstant.PACK_DOWN_URL) |
| | | .setJson(JSON.toJSONString(mesCombParam)) |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("code").equals(200)) { |
| | | success = true; |
| | | } else if (jsonObject.getInteger("code").equals(500)) { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | throw new CoolException(jsonObject.getString("msg")); |
| | | } else { |
| | | log.error("请求接口失败!!!url:{};request:{};response:{}", MesConstant.URL+MesConstant.PACK_DOWN_URL, JSON.toJSONString(mesCombParam), response); |
| | | throw new CoolException("上报mes系统失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("fail", e); |
| | | throw new CoolException(e.getMessage()); |
| | | } finally { |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "打包下线帮托上报", |
| | | MesConstant.URL + MesConstant.PACK_DOWN_URL, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(mesCombParam), |
| | | response, |
| | | success |
| | | ); |
| | | } catch (Exception e) { log.error("", e); } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 生成入库单据 |
| | |
| | | if (null == order) { |
| | | throw new CoolException("生成单据失败"); |
| | | } |
| | | if (orderService.updateSettle(order.getId(), 2L, userId)) { |
| | | if (!orderService.updateSettle(order.getId(), 2L, userId)) { |
| | | throw new CoolException("修改单据状态失败"); |
| | | } |
| | | |
| | | // 生成入库通知档 |
| | | for (DetlDto detlDto : detlDtos) { |
| | | |
| | | // 修改作业数量 ---------------------------------------- |
| | | // 订单明细数量校验 |
| | | OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), detlDto.getMatnr(), detlDto.getBatch()); |
| | | if (detlDto.getAnfme() > orderDetl.getEnableQty()) { |
| | | throw new CoolException(orderDetl.getMatnr() + "入库数量不合法"); |
| | | } |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(), detlDto.getAnfme())) { |
| | | throw new CoolException("修改单据明细数量失败"); |
| | | } |
| | | |
| | | // 保存入库通知档 |
| | | Mat mat = matService.selectByMatnr(detlDto.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(detlDto.getMatnr() + "商品档案不存在"); |
| | |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | waitPakin.setMatType(mat.getMatType());//物料类型 |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | // 修改打包数据状态 |
| | | Pack pack = packService.selectByBarcode(detlDto.getMatnr()); |
| | | Pack pack = packService.selectByBarcode(detlDto.getOrderNo()); |
| | | pack.setSettle(2L); |
| | | pack.setUpdateTime(now); |
| | | pack.setUpdateBy(userId); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void pikingToFull(String barcode) { |
| | | wrkMastService.selectByBarcode(barcode); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public List<WrkDetl> pikingToFull2(Integer wrkNo) { |
| | | List<WrkDetl> wrkDetlsNew= new ArrayList<WrkDetl>(); |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkNo); |
| | | for (WrkDetl wrkDetl:wrkDetls){ |
| | | String[] orderNos = GetOrderNo(wrkDetl.getOrderNo()); |
| | | if (!Cools.isEmpty(orderNos) && orderNos.length!=0) { |
| | | Double anfme = wrkDetl.getAnfme(); |
| | | for (String orderNo : orderNos) { |
| | | OrderDetl orderDetl = orderDetlService.selectItem(orderNo, wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | if (orderDetl == null) { |
| | | orderDetl = orderDetlService.selectItem(orderNo, wrkDetl.getMatnr(), null); |
| | | if (orderDetl == null) { |
| | | log.error("ww"); |
| | | return wrkDetlsNew; |
| | | } |
| | | } |
| | | if (orderDetl.getAnfme() <= anfme) { |
| | | WrkDetl wrkDetl1 = new WrkDetl(); |
| | | wrkDetl1.sync(wrkDetl); |
| | | wrkDetl1.setOrderNo(orderNo); |
| | | wrkDetl1.setAnfme(anfme); |
| | | wrkDetlsNew.add(wrkDetl1); |
| | | anfme = anfme - orderDetl.getAnfme(); |
| | | } else { |
| | | WrkDetl wrkDetl1 = new WrkDetl(); |
| | | wrkDetl1.sync(wrkDetl); |
| | | wrkDetl1.setOrderNo(orderNo); |
| | | wrkDetl1.setAnfme(anfme); |
| | | wrkDetlsNew.add(wrkDetl1); |
| | | } |
| | | } |
| | | }else { |
| | | wrkDetlsNew.add(wrkDetl); |
| | | } |
| | | } |
| | | return wrkDetlsNew; |
| | | } |
| | | |
| | | private static String[] GetOrderNo(String orderNo) { |
| | | String[] s3 = orderNo.split("\""); |
| | | String[] s = new String[(s3.length - 1) / 6]; |
| | | if (!Cools.isEmpty(s3)){ |
| | | int i = 0; |
| | | int j = 0; |
| | | for (String ss : s3) { |
| | | if (ss.equals("orderNo")) { |
| | | s[i] = s3[j + 2]; |
| | | i++; |
| | | } |
| | | j++; |
| | | } |
| | | }else { |
| | | s=null; |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | private String[] GetAnfme(String orderNo) { |
| | | String[] s3 = orderNo.split("\""); |
| | | String[] s = new String[(s3.length - 1) / 6]; |
| | | int i = 0; |
| | | int j = 0; |
| | | for (String ss : s3) { |
| | | if (ss.equals("anfme")) { |
| | | String[] s4 = s3[j + 1].split(":"); |
| | | String[] s5 = s4[1].split("\\."); |
| | | s[i] = s5[0]; |
| | | i++; |
| | | } |
| | | j++; |
| | | } |
| | | return s; |
| | | } |
| | | } |