| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.beust.jcommander.internal.Lists; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.MesBuyPakinReportParam; |
| | | import com.zy.asrs.entity.param.MesOrderReportParam; |
| | | import com.zy.asrs.entity.param.MesPakinReportParam; |
| | | import com.zy.asrs.entity.param.MesPakoutReportParam; |
| | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import io.swagger.models.auth.In; |
| | | import lombok.Synchronized; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private AgvWorkService agvWorkService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> completedPutWayWrk(AgvWrkMast agvWrkMast) { |
| | |
| | | private void reportMesPakinOrder(AgvWrkMast agvWrkMast, List<AgvWrkDetl> agvWrkDetls){ |
| | | |
| | | for (AgvWrkDetl agvWrkDetl : agvWrkDetls){ |
| | | MesPakinReportParam mesPakinReportParam = new MesPakinReportParam(); |
| | | mesPakinReportParam.setInboundOrderCode(agvWrkDetl.getOrderNo()); |
| | | mesPakinReportParam.setBizType("0"); |
| | | mesPakinReportParam.setInventoryAttr(new MesPakinReportParam.InventoryAttr(agvWrkDetl.getThreeCode().trim(),agvWrkDetl.getMatnr(),agvWrkMast.getLocNo())); |
| | | mesPakinReportParam.setNoQrCodeExecAmount(new MesPakinReportParam.NoQrCodeExecAmount(agvWrkDetl.getAnfme(),agvWrkDetl.getUnit(),null)); |
| | | //判断是否采购入库 |
| | | |
| | | doHttpRequest(mesPakinReportParam,getMesTokenInfo(),"上报mes入库信息",url,pakinReportPath,null,"127.0.0.1"); |
| | | String orderNo = agvWrkDetl.getOrderNo(); |
| | | Order order = orderService.selectByNo(orderNo); |
| | | |
| | | DocType docType = docTypeService.selectById(order.getDocType()); |
| | | |
| | | if (docType.getDocName().contains("采购")){ |
| | | |
| | | OrderDetl orderDetl = orderDetlService.selectByOrderNoAndMatnr(orderNo, agvWrkDetl.getMatnr(), agvWrkDetl.getThreeCode(), agvWrkDetl.getDeadTime()); |
| | | |
| | | MesBuyPakinReportParam mesBuyPakinReportParam = new MesBuyPakinReportParam(); |
| | | List<MesBuyPakinReportParam.Iteam> iteams = new ArrayList<>(); |
| | | MesBuyPakinReportParam.Iteam iteam = new MesBuyPakinReportParam.Iteam(); |
| | | iteam.setMaterialCode(agvWrkDetl.getMatnr()); |
| | | iteam.setBatchNo(agvWrkDetl.getBatch()); |
| | | iteam.setAmount(agvWrkDetl.getAnfme()); |
| | | iteam.setStorageLocationCode(agvWrkMast.getLocNo()); |
| | | iteam.setLineNo(orderDetl.getItemNum()); |
| | | iteam.setSupplierCode(order.getSalesman()); |
| | | |
| | | mesBuyPakinReportParam.setCode(orderNo); |
| | | mesBuyPakinReportParam.setIteam(iteams); |
| | | |
| | | doHttpRequest(mesBuyPakinReportParam,getMesTokenInfo(),"上报mes采购入库信息",url,pakinReportPath,null,"127.0.0.1"); |
| | | |
| | | }else { |
| | | MesPakinReportParam mesPakinReportParam = new MesPakinReportParam(); |
| | | mesPakinReportParam.setInboundOrderCode(agvWrkDetl.getOrderNo()); |
| | | mesPakinReportParam.setBizType("0"); |
| | | mesPakinReportParam.setInventoryAttr(new MesPakinReportParam.InventoryAttr(agvWrkDetl.getThreeCode().trim(),agvWrkDetl.getMatnr(),agvWrkMast.getLocNo())); |
| | | mesPakinReportParam.setNoQrCodeExecAmount(new MesPakinReportParam.NoQrCodeExecAmount(agvWrkDetl.getAnfme(),agvWrkDetl.getUnit(),null)); |
| | | |
| | | doHttpRequest(mesPakinReportParam,getMesTokenInfo(),"上报mes入库信息",url,pakinReportPath,null,"127.0.0.1"); |
| | | } |
| | | } |
| | | |
| | | } |