| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.InOutCountDto; |
| | | import com.zy.asrs.entity.result.OpenOrderCompeteResult; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.mapper.ReportQueryMapper; |
| | | import com.zy.asrs.mapper.TagMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.utils.NodeUtils; |
| | | import com.zy.common.utils.Synchro; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ManPakOutService manPakOutService; |
| | | @Autowired |
| | | private LocOwnerService locOwnerService; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | if (Cools.isEmpty(locOwner)){ |
| | | LocOwner locOwner1 = new LocOwner(); |
| | | locOwner1.setOwner(detlDto.getOwnerName()); |
| | | locOwnerService.insert(locOwner1); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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.getOwnerName(),detail.getPayment()); |
| | | if (DetlDto.has(list, dto)) { |
| | | DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch()); |
| | | assert detlDto != null; |
| | |
| | | return R.ok().add(top100); |
| | | } |
| | | |
| | | /* |
| | | * 速腾数字孪生调用接口 |
| | | * */ |
| | | @Override |
| | | public DigitalTwin inventoryQuantity() { |
| | | DigitalTwin digitalTwin = new DigitalTwin(); |
| | | LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); |
| | | LocChartPie locUseRateL = reportQueryMapper.getLocUseRateL(); |
| | | LocChartPie locUseRateP = reportQueryMapper.getLocUseRateP(); |
| | | if(locUseRate!=null) { |
| | | digitalTwin.setCount(locUseRate.getOqty()+locUseRate.getFqty()+locUseRate.getUqty()+locUseRate.getXqty()); |
| | | digitalTwin.setOqty(locUseRate.getOqty()); |
| | | digitalTwin.setFqty(locUseRate.getFqty()); |
| | | digitalTwin.setUqty(locUseRate.getUqty()); |
| | | digitalTwin.setXqty(locUseRate.getXqty()); |
| | | } |
| | | if(locUseRateL!=null) { |
| | | digitalTwin.setCountL(locUseRateL.getOqty()+locUseRateL.getFqty()+locUseRateL.getUqty()+locUseRateL.getXqty()); |
| | | digitalTwin.setOqtyL(locUseRateL.getOqty()); |
| | | digitalTwin.setFqtyL(locUseRateL.getFqty()); |
| | | digitalTwin.setUqtyL(locUseRateL.getUqty()); |
| | | digitalTwin.setXqtyL(locUseRateL.getXqty()); |
| | | } |
| | | if (locUseRateP!=null){ |
| | | digitalTwin.setCountP(locUseRateP.getOqty()+locUseRateP.getFqty()+locUseRateP.getUqty()+locUseRateP.getXqty()); |
| | | digitalTwin.setOqtyP(locUseRateP.getOqty()); |
| | | digitalTwin.setFqtyP(locUseRateP.getFqty()); |
| | | digitalTwin.setUqtyP(locUseRateP.getUqty()); |
| | | digitalTwin.setXqtyP(locUseRateP.getXqty()); |
| | | } |
| | | return digitalTwin; |
| | | } |
| | | |
| | | } |