src/main/java/com/zy/asrs/controller/OpenController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/entity/param/DigitalTwin.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/service/OpenService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -1,7 +1,6 @@ package com.zy.asrs.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.core.annotations.AppAuth; import com.core.common.*; import com.core.exception.CoolException; @@ -12,7 +11,6 @@ import com.zy.common.web.BaseController; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -73,6 +71,16 @@ return R.ok(); } /* * 速腾数字孪生调用接口 * */ @PostMapping("/digital/twin/inventory/quantity") public synchronized R inventoryQuantity(@RequestHeader(required = false) String appkey, HttpServletRequest request) { auth(appkey, null, request); return R.ok(openService.inventoryQuantity()); } /** * 添加出库单 src/main/java/com/zy/asrs/entity/param/DigitalTwin.java
New file @@ -0,0 +1,24 @@ package com.zy.asrs.entity.param; import lombok.Data; @Data public class DigitalTwin { private Integer count; //总量 // private Integer countO; //空总量 // private Integer countF; //非空总量 private int fqty; //在库库位 private int oqty;//空库位 private int uqty;//使用库位 private int xqty;//禁用库位 // private Integer artificialWarehousecount; //平库总量 // private Integer automatedWarehousecount; //立库总量 // private Integer artificialWarehouseF; //平库非空总量 // private Integer automatedWarehouseF; //立库非空总量 // private Integer artificialWarehouseO; //平库空总量 // private Integer automatedWarehouseO; //立库空总量 public DigitalTwin(){} public DigitalTwin(Integer count){ this.count=count; } } src/main/java/com/zy/asrs/service/OpenService.java
@@ -46,4 +46,5 @@ void syncMat(MatSyncParam param); R getInOutDetl(); DigitalTwin inventoryQuantity(); } src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -1,7 +1,5 @@ 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; @@ -11,15 +9,13 @@ 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; @@ -64,6 +60,8 @@ private ManPakOutService manPakOutService; @Autowired private LocOwnerService locOwnerService; @Autowired private ReportQueryMapper reportQueryMapper; @Override @Transactional @@ -509,4 +507,21 @@ return R.ok().add(top100); } /* * 速腾数字孪生调用接口 * */ @Override public DigitalTwin inventoryQuantity() { DigitalTwin digitalTwin = new DigitalTwin(); LocChartPie locUseRate = reportQueryMapper.getLocUseRate(); 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()); } return digitalTwin; } }