diff --git a/.gitignore b/.gitignore index 024ffd5..879446a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ hs_err_pid* **/target/ /log/ +.vscode/ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java b/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java index e999610..72ac359 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/service/IToErpService.java @@ -28,6 +28,7 @@ public interface IToErpService { String login(); AjaxResult callErp(ReceiveOutStockConfirm receiveOutStockConfirm); + AjaxResult receiveOutStockList(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java index 2b34a4a..53e56ad 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToErpServiceImpl.java @@ -38,6 +38,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; import java.util.concurrent.TimeUnit; @@ -130,10 +131,10 @@ public class ToErpServiceImpl implements IToErpService { AspResponse responseBean = JSONUtil.toBean(body, AspResponse.class); for (List row : responseBean.getBody().getSource().getTable().getRows()) { BasProduct product = new BasProduct(); - product.setProductGuid(row.get(0)); - product.setProductId(row.get(0)); + product.setProductGuid(row.get(2)); + product.setProductId(row.get(2)); product.setProductName(row.get(1)); - product.setCargoNo(row.get(2)); + product.setCargoNo(row.get(0)); product.setSpec(row.get(3)); product.setUnit(row.get(4)); product.setSpare1(row.get(5)); @@ -283,9 +284,12 @@ public class ToErpServiceImpl implements IToErpService { outStockout.setWarehouseId(Convert.toStr(row.get(2))); outStockout.setErpStockoutId(Convert.toStr(row.get(0))); outStockout.setStockoutGuid(stockOutId); - outStockout.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); + outStockout.setCreateDate(Convert.toStr(row.get(3))); outStockout.setOutType("1"); outStockout.setStatus("1"); + outStockout.setFID(Convert.toStr(row.get(1))); + outStockout.setStockoutSource("2"); + outStockout.setCustomerNo(Convert.toStr(row.get(24))); ErpOutStock erpOutStock1 = erpOutStockService.selectErpOutStockByStockoutId(erpOutStock.getStockoutId()); OutStockout outStockout1 = outStockoutService.selectOutStockoutByStockoutGuid(outStockout.getStockoutGuid()); if (ObjUtil.isNotNull(erpOutStock1)){ @@ -346,6 +350,8 @@ public class ToErpServiceImpl implements IToErpService { outStockoutDetail.setQuantity(detail.getQuantity()); outStockoutDetail.setProductName(detail.getProductName()); outStockoutDetail.setFid(Convert.toStr(detail.getId())); + outStockoutDetail.setAssignNum(BigDecimal.valueOf(0)); + outStockoutDetail.setAllotQuantity(BigDecimal.valueOf(0)); ErpOutStockDetail erpOutStockDetail1 = erpOutStockDetailService.selectErpOutStockDetailById(detail.getId()); OutStockoutDetail outStockoutDetail1 = outStockoutDetailService.selectOutStockoutDetailByStockoutDetailId(outStockoutDetail.getStockoutDetailId()); if (ObjUtil.isNotNull(erpOutStockDetail1)){ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/kpi/controller/KpiController.java b/ruoyi-admin/src/main/java/com/ruoyi/kpi/controller/KpiController.java index c1bae58..641ca8c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/kpi/controller/KpiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/kpi/controller/KpiController.java @@ -107,6 +107,18 @@ public class KpiController extends BaseController { return success(kpiService.getRoadways(warehouseId)); } + /** + * 获取货位楼层数据 + * + * @param warehouseId 仓库ID + * @return 货位楼层数据 + */ + + @GetMapping("/getFloors") + public AjaxResult getFloors(@RequestParam("warehouseId") String warehouseId){ + return success(kpiService.getFloors(warehouseId)); + } + /** * 获取货位排数据 * @@ -116,23 +128,22 @@ public class KpiController extends BaseController { */ @GetMapping("/getPlatoons") public AjaxResult getPlatoons(@RequestParam("warehouseId") String warehouseId, - @RequestParam("roadwayId") String roadwayId){ - return success(kpiService.getPlatoons(warehouseId,roadwayId)); + @RequestParam("theFloor") String theFloor){ + return success(kpiService.getPlatoons(warehouseId,theFloor)); } /** * 获取库存平面图 * * @param warehouseId 仓库ID - * @param roadwayId 巷道ID - * @param thePlatoon 排 + * @param theFloor 层数 * @return 库存平面图数据 */ @GetMapping("/getChartData") public AjaxResult getChartData(@RequestParam("warehouseId") String warehouseId, - @RequestParam("roadwayId") String roadwayId, - @RequestParam("thePlatoon") String thePlatoon){ - return success(kpiService.getChartData(warehouseId,roadwayId,thePlatoon)); + @RequestParam("theFloor") String theFloor + ){ + return success(kpiService.getChartData(warehouseId,theFloor)); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/KpiService.java b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/KpiService.java index f9265fd..efb404e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/KpiService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/KpiService.java @@ -40,7 +40,7 @@ public interface KpiService { Map getPlatoons(String warehouseId, String roadwayId); - Map getChartData(String warehouseId, String roadwayId, String thePlatoon); + Map getChartData(String warehouseId, String theFloor); Map getChartMag(String warehouseId, String theColumn, String theFloor, String thePlatoon); @@ -48,4 +48,6 @@ public interface KpiService { // 新增:根据仓库和巷道统计各状态货位数量 Map getSpaceStatusCounts(String warehouseId, String roadwayId); + + Map getFloors(String warehouseId); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java index 8653548..ddebc44 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/kpi/service/impl/KpiServiceImpl.java @@ -33,7 +33,7 @@ public class KpiServiceImpl implements KpiService @Autowired private BasCargoSpaceMapper basCargoSpaceMapper; - + @Autowired private BasStockMapper basStockMapper; /** @@ -53,7 +53,7 @@ public class KpiServiceImpl implements KpiService Map roadwayCount = new HashMap<>(); for (MydoJob job : list) { - // 检查入库作业标识是否小于10 + // 检查入库作业标识是否小于20 if (job.getInOrOut() == null || Integer.parseInt(job.getInOrOut()) >= 20) { continue; } @@ -317,6 +317,36 @@ public class KpiServiceImpl implements KpiService return res; } + @Override + public Map getFloors(String warehouseId) { + Map response = new HashMap<>(); + + // 查询指定仓库和巷道的排号信息 + BasCargoSpace queryParams = new BasCargoSpace(); + queryParams.setWarehouseId(warehouseId); + List list = basCargoSpaceMapper.selectBasCargoSpaceList(queryParams); + + // 使用TreeSet去重并排序排号 + Set platoonSet = new TreeSet<>(); + for (BasCargoSpace space : list) { + if (space.getTheFloor() != null) { + platoonSet.add(space.getTheFloor()); + } + } + + // 转换为前端下拉框所需的格式 + List> platoons = new ArrayList<>(); + for (Long platoon : platoonSet) { + Map platoonMap = new HashMap<>(); + platoonMap.put("value", platoon.toString()); + platoonMap.put("label", platoon + "层"); + platoons.add(platoonMap); + } + + response.put("data", platoons); + return response; + } + @Override public Map getRoadways(String warehouseId){ Map response = new HashMap<>(); @@ -348,13 +378,13 @@ public class KpiServiceImpl implements KpiService } @Override - public Map getPlatoons(String warehouseId, String roadwayId){ + public Map getPlatoons(String warehouseId, String theFloor){ Map response = new HashMap<>(); // 查询指定仓库和巷道的排号信息 BasCargoSpace queryParams = new BasCargoSpace(); queryParams.setWarehouseId(warehouseId); - queryParams.setRoadwayId(roadwayId); + queryParams.setTheFloor(Long.valueOf(theFloor)); List list = basCargoSpaceMapper.selectBasCargoSpaceList(queryParams); // 使用TreeSet去重并排序排号 @@ -379,14 +409,11 @@ public class KpiServiceImpl implements KpiService } @Override - public Map getChartData(String warehouseId, String roadwayId, String thePlatoon) { + public Map getChartData(String warehouseId, String theFloor) { // 查询指定仓库、巷道和排号的货位信息 BasCargoSpace queryParams = new BasCargoSpace(); queryParams.setWarehouseId(warehouseId); - queryParams.setRoadwayId(roadwayId); - if (thePlatoon != null) { - queryParams.setThePlatoon(Long.parseLong(thePlatoon)); - } + queryParams.setTheFloor(Long.valueOf(theFloor)); List list = basCargoSpaceMapper.selectBasCargoSpaceList(queryParams); // 用于存储不同状态的货位坐标 @@ -405,11 +432,11 @@ public class KpiServiceImpl implements KpiService for (BasCargoSpace space : list) { // 收集列和层信息 columnSet.add(space.getTheColumn()); - floorSet.add(space.getTheFloor()); + floorSet.add(space.getThePlatoon()); // 根据状态分类处理 if (space.getStatus() != null) { - String coordinate = "[" + space.getTheColumn() + "," + space.getTheFloor() + "," + space.getStatus() + "],"; + String coordinate = "[" + space.getTheColumn() + "," + space.getThePlatoon() + "," + space.getStatus() + "],"; switch (Integer.parseInt(space.getStatus())) { case 1: empty += coordinate; break; case 2: full += coordinate; break; @@ -424,15 +451,19 @@ public class KpiServiceImpl implements KpiService // 构建列和层的标签 StringBuilder columnLabels = new StringBuilder(); for (Long col : columnSet) { - columnLabels.append("'").append(col).append(MessageUtils.message("kpi.spacePlan.column")).append("',"); + columnLabels.append("'").append(col).append("列").append("',"); } - String column = "[" + columnLabels.toString() + "]"; + String column = "[" + columnLabels + "]"; StringBuilder floorLabels = new StringBuilder(); for (Long floor : floorSet) { - floorLabels.append("'").append(floor).append(MessageUtils.message("kpi.spacePlan.floor")).append("',"); + if (floor==7){ + floorLabels.append("'").append(6).append("排").append("',"); + } + floorLabels.append("'").append(floor).append("排").append("',"); } - String floor = "[" + floorLabels.toString() + "]"; + //floorLabels.append("6排"); + String floor = "[" + floorLabels + "]"; // 返回结果 Map map = new HashMap<>(); @@ -469,7 +500,7 @@ public class KpiServiceImpl implements KpiService info.append("货位名称:").append(space.getCargoSpaceName()).append("
"); info.append("是否锁定:").append("Y".equals(space.getLocked()) ? "是" : "否").append("
"); info.append("托盘条码:").append(space.getTrayCode() != null ? space.getTrayCode() : "无").append("
"); - + // 根据cargoSpaceId查询BasStock表,获取productId和productName BasStock stockQuery = new BasStock(); stockQuery.setCargoSpaceId(space.getCargoSpaceId()); @@ -489,7 +520,7 @@ public class KpiServiceImpl implements KpiService } @Override - public AjaxResult getInAnalysisByData(String warehouseId, String startTime, String endTime,String inOut) { + public AjaxResult getInAnalysisByData(String warehouseId, String startTime, String endTime, String inOut) { Map res = new HashMap<>(); MydoJob mydoJobParam = new MydoJob(); mydoJobParam.setWarehouseId(warehouseId); @@ -497,47 +528,92 @@ public class KpiServiceImpl implements KpiService mydoJobParam.setCreateLeftTime(startTime); mydoJobParam.setCreateRightTime(endTime); mydoJobParam.setInOut(inOut); - List datesBetween = DateUtil.rangeToList(DateUtil.parseDate(startTime), DateUtil.parseDate(endTime), DateField.DAY_OF_MONTH); List list = mydoJobFinishMapper.selectMydoJobFinishListByMydoJob(mydoJobParam); - - // 获取所有巷道ID(1和2) - List roadwayIds = Arrays.asList("1", "2"); - + + // 收集所有涉及的楼层 + Set floorSet = new HashSet<>(); + Map cargoSpaceCache = new HashMap<>(); + + // 遍历作业记录,收集涉及的货位ID并查询对应楼层 + for (MydoJob job : list) { + if (job.getCargoSpaceId() != null) { + // 检查缓存中是否有该货位信息 + if (!cargoSpaceCache.containsKey(job.getCargoSpaceId())) { + // 使用现有的查询方法查询货位信息 + BasCargoSpace queryParam = new BasCargoSpace(); + queryParam.setCargoSpaceId(job.getCargoSpaceId()); + List cargoSpaces = basCargoSpaceMapper.selectBasCargoSpaceList(queryParam); + + if (!cargoSpaces.isEmpty()) { + BasCargoSpace cargoSpace = cargoSpaces.get(0); + cargoSpaceCache.put(job.getCargoSpaceId(), cargoSpace); + if (cargoSpace.getTheFloor() != null) { + floorSet.add(cargoSpace.getTheFloor()); + } + } + } else { + BasCargoSpace cachedSpace = cargoSpaceCache.get(job.getCargoSpaceId()); + if (cachedSpace.getTheFloor() != null) { + floorSet.add(cachedSpace.getTheFloor()); + } + } + } + } + + // 将楼层排序 + List floors = new ArrayList<>(floorSet); + Collections.sort(floors); + + // 生成日期范围 + List datesBetween = DateUtil.rangeToList(DateUtil.parseDate(startTime), DateUtil.parseDate(endTime), DateField.DAY_OF_MONTH); + List xAxis = new ArrayList<>(); List> series = new ArrayList<>(); - - // 为每个巷道创建一个系列 - for (String roadwayId : roadwayIds) { + + // 为每个楼层创建一个系列 + for (Long floor : floors) { Map seriesItem = new HashMap<>(); - seriesItem.put("name", roadwayId + "号巷道"); + seriesItem.put("name", floor + "层"); seriesItem.put("type", "line"); List data = new ArrayList<>(); seriesItem.put("data", data); series.add(seriesItem); } - - // 按日期统计每个巷道的数量 + + // 按日期统计每个楼层的数量 for (DateTime dateTime : datesBetween) { xAxis.add(DateUtil.format(dateTime, "yyyy-MM-dd")); - - // 统计每个巷道在当天的数量 - for (int i = 0; i < roadwayIds.size(); i++) { - String roadwayId = roadwayIds.get(i); - long count = list.stream() - .filter(mydoJob -> roadwayId.equals(mydoJob.getRoadwayId()) - && DateUtil.isIn(mydoJob.getCreateTime(), DateUtil.beginOfDay(dateTime), DateUtil.endOfDay(dateTime))) - .count(); - + + // 统计每个楼层在当天的数量 + for (int i = 0; i < floors.size(); i++) { + Long floor = floors.get(i); + long count = 0; + + // 遍历作业记录,统计该楼层在当天的作业数量 + for (MydoJob job : list) { + if (DateUtil.isIn(job.getCreateTime(), DateUtil.beginOfDay(dateTime), DateUtil.endOfDay(dateTime))) { + // 查找该作业对应的货位是否属于当前楼层 + if (job.getCargoSpaceId() != null && cargoSpaceCache.containsKey(job.getCargoSpaceId())) { + BasCargoSpace space = cargoSpaceCache.get(job.getCargoSpaceId()); + if (space.getTheFloor() != null && space.getTheFloor().equals(floor)) { + count++; + } + } + } + } + @SuppressWarnings("unchecked") List data = (List) series.get(i).get("data"); data.add(count); } } - + res.put("xAxis", xAxis); res.put("series", series); return AjaxResult.success(res); } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/controller/OutStockoutController.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/controller/OutStockoutController.java index f53e452..67df607 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/controller/OutStockoutController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/controller/OutStockoutController.java @@ -40,10 +40,10 @@ public class OutStockoutController extends BaseController { public TableDataInfo list(OutStockout outStockout) { startPage(); List list = new ArrayList<>(); - if(Integer.parseInt(outStockout.getStatus())<4){ - list =outStockoutService.selectOutStockoutList(outStockout); - }else{ - list=outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout); + if (Integer.parseInt(outStockout.getStatus()) < 4) { + list = outStockoutService.selectOutStockoutList(outStockout); + } else { + list = outStockoutFinishService.selectOutStockoutFinishListByOutStockout(outStockout); } return getDataTable(list); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java index 0ed3d38..1acc55e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/domain/OutStockout.java @@ -94,8 +94,17 @@ public class OutStockout extends BaseEntity private String remark; + private String theme; + private List typeData; + public String getTheme() { + return theme; + } + + public void setTheme(String theme) { + this.theme = theme; + } public String getSupplierName() { return supplierName; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/service/impl/OutStockoutServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/service/impl/OutStockoutServiceImpl.java index 64d7f87..2395ed3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/service/impl/OutStockoutServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockout/service/impl/OutStockoutServiceImpl.java @@ -135,7 +135,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService String username = SecurityContextHolder.getContext().getAuthentication().getName(); outStockout.setCreateManId(username); outStockout.setStatus("1"); - outStockout.setStockoutSource("0"); + outStockout.setStockoutSource("1"); // outStockout.setWarehouseId("01"); for (int i = 0; i < detailList.size(); i++) { OutStockoutDetail outStockoutDetail = detailList.get(i); @@ -155,7 +155,7 @@ public class OutStockoutServiceImpl implements IOutStockoutService public String updateOutStockoutStatus(String[] stockoutIds, String status, String newStatus,String exitId) { HashMap map = new HashMap<>(); StringBuilder stringBuilder = new StringBuilder(); - if (status.equals("4")){ + if ("4".equals(status)){ for(String stockoutId:stockoutIds){ ReceiveOutStockConfirm receiveOutStockConfirm = new ReceiveOutStockConfirm(); OutStockout outStockout = selectOutStockoutByStockoutGuid(stockoutId); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/controller/ViewProductAndStockController.java b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/controller/ViewProductAndStockController.java index 5fc381e..7f502a8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/controller/ViewProductAndStockController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/controller/ViewProductAndStockController.java @@ -23,9 +23,9 @@ import com.ruoyi.common.core.page.TableDataInfo; /** * 库存物资Controller - * + * * @author ruoyi - * @date 2025-09-12 + * @date 2025-12-08 */ @RestController @RequestMapping("/out/productAndStock") @@ -45,17 +45,6 @@ public class ViewProductAndStockController extends BaseController List list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock); return getDataTable(list); } - /** - * 查询库存物资列表 - */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:list')") - @GetMapping("/pd/list") - public TableDataInfo pdList(ViewProductAndStock viewProductAndStock) - { - startPage(); - List list = viewProductAndStockService.selectViewProductAndStockPdList(viewProductAndStock); - return getDataTable(list); - } /** * 导出库存物资列表 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/domain/ViewProductAndStock.java b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/domain/ViewProductAndStock.java index c0dfd8a..248f524 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/domain/ViewProductAndStock.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/domain/ViewProductAndStock.java @@ -9,135 +9,29 @@ import com.ruoyi.common.core.domain.BaseEntity; * 库存物资对象 view_product_and_stock * * @author ruoyi - * @date 2025-10-21 + * @date 2025-12-08 */ -public class ViewProductAndStock +public class ViewProductAndStock extends BaseEntity { private static final long serialVersionUID = 1L; - /** 序号 */ - @Excel(name = "序号") + /** 唯一id */ + @Excel(name = "唯一id") private Long onlyIdentity; - /** 物料编码 */ - @Excel(name = "物料编码") + /** 产品编码 */ + @Excel(name = "产品编码") private String productId; - /** 批次 */ - @Excel(name = "批次") - private String lotNo; - - /** 物料名称 */ - @Excel(name = "物料名称") + /** 产品名称 */ + @Excel(name = "产品名称") private String productName; /** 库存数量 */ @Excel(name = "库存数量") private String quantity; - /** 仓库 */ - @Excel(name = "仓库") - private String warehouseId; - - /** 来源 */ - @Excel(name = "来源") - private String spare1; - - /** 套账 */ - @Excel(name = "套账") - private String spare3; - - /** 用途 */ - @Excel(name = "用途") - private String spare4; - - /** 台次 */ - @Excel(name = "台次") - private String spare5; - - /** 入库单价 */ - @Excel(name = "入库单价") - private String spare6; - - /** 状态 */ - @Excel(name = "状态") - private String voltage; - - /** 件次 */ - @Excel(name = "件次") - private String power; - - /** 供应商 */ -// @Excel(name = "供应商") - private String phase; - - private String supplierName; - - /** 管理号 */ - @Excel(name = "管理号") - private String distribution; - - /** 合同号 */ - @Excel(name = "合同号") - private String orderId; - - /** 质量等级 */ - @Excel(name = "质量等级") - private String spare8; - - /** 单价 */ - @Excel(name = "单价") - private String price; - - /** 图号 */ - @Excel(name = "图号") - private String cargoNo; - - /** 物料状态 */ - @Excel(name = "物料状态") - private String productStatus; - - /** 常用编码 */ - @Excel(name = "常用编码") - private String parentId; - - /** 启用标识 */ - @Excel(name = "启用标识") - private String spare7; - - @Excel(name = "创建时间") - private String createTime; - - /** 创建用户 */ - @Excel(name = "创建用户") - private String createSys; - - /** 规格型号 */ - @Excel(name = "规格型号") - private String spec; - - /** 单位 */ - @Excel(name = "单位") - private String unit; - - - public String getSupplierName() { - return supplierName; - } - - public void setSupplierName(String supplierName) { - this.supplierName = supplierName; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public void setOnlyIdentity(Long onlyIdentity) + public void setOnlyIdentity(Long onlyIdentity) { this.onlyIdentity = onlyIdentity; } @@ -157,16 +51,6 @@ public class ViewProductAndStock return productId; } - public void setLotNo(String lotNo) - { - this.lotNo = lotNo; - } - - public String getLotNo() - { - return lotNo; - } - public void setProductName(String productName) { this.productName = productName; @@ -187,235 +71,13 @@ public class ViewProductAndStock return quantity; } - public void setWarehouseId(String warehouseId) - { - this.warehouseId = warehouseId; - } - - public String getWarehouseId() - { - return warehouseId; - } - - public void setSpare1(String spare1) - { - this.spare1 = spare1; - } - - public String getSpare1() - { - return spare1; - } - - public void setSpare3(String spare3) - { - this.spare3 = spare3; - } - - public String getSpare3() - { - return spare3; - } - - public void setSpare4(String spare4) - { - this.spare4 = spare4; - } - - public String getSpare4() - { - return spare4; - } - - public void setSpare5(String spare5) - { - this.spare5 = spare5; - } - - public String getSpare5() - { - return spare5; - } - - public void setSpare6(String spare6) - { - this.spare6 = spare6; - } - - public String getSpare6() - { - return spare6; - } - - public void setVoltage(String voltage) - { - this.voltage = voltage; - } - - public String getVoltage() - { - return voltage; - } - - public void setPower(String power) - { - this.power = power; - } - - public String getPower() - { - return power; - } - - public void setPhase(String phase) - { - this.phase = phase; - } - - public String getPhase() - { - return phase; - } - - public void setDistribution(String distribution) - { - this.distribution = distribution; - } - - public String getDistribution() - { - return distribution; - } - - public void setOrderId(String orderId) - { - this.orderId = orderId; - } - - public String getOrderId() - { - return orderId; - } - - public void setSpare8(String spare8) - { - this.spare8 = spare8; - } - - public String getSpare8() - { - return spare8; - } - - public void setPrice(String price) - { - this.price = price; - } - - public String getPrice() - { - return price; - } - - public void setCargoNo(String cargoNo) - { - this.cargoNo = cargoNo; - } - - public String getCargoNo() - { - return cargoNo; - } - - public void setProductStatus(String productStatus) - { - this.productStatus = productStatus; - } - - public String getProductStatus() - { - return productStatus; - } - - public void setParentId(String parentId) - { - this.parentId = parentId; - } - - public String getParentId() - { - return parentId; - } - - public void setSpare7(String spare7) - { - this.spare7 = spare7; - } - - public String getSpare7() - { - return spare7; - } - - public void setCreateSys(String createSys) - { - this.createSys = createSys; - } - - public String getCreateSys() - { - return createSys; - } - - public void setSpec(String spec) - { - this.spec = spec; - } - - public String getSpec() - { - return spec; - } - - public void setUnit(String unit) - { - this.unit = unit; - } - - public String getUnit() - { - return unit; - } - @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("onlyIdentity", getOnlyIdentity()) .append("productId", getProductId()) - .append("lotNo", getLotNo()) .append("productName", getProductName()) .append("quantity", getQuantity()) - .append("warehouseId", getWarehouseId()) - .append("spare1", getSpare1()) - .append("spare3", getSpare3()) - .append("spare4", getSpare4()) - .append("spare5", getSpare5()) - .append("spare6", getSpare6()) - .append("voltage", getVoltage()) - .append("power", getPower()) - .append("phase", getPhase()) - .append("distribution", getDistribution()) - .append("orderId", getOrderId()) - .append("spare8", getSpare8()) - .append("price", getPrice()) - .append("cargoNo", getCargoNo()) - .append("productStatus", getProductStatus()) - .append("parentId", getParentId()) - .append("spare7", getSpare7()) - .append("createTime", getCreateTime()) - .append("createSys", getCreateSys()) - .append("spec", getSpec()) - .append("unit", getUnit()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/mapper/ViewProductAndStockMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/mapper/ViewProductAndStockMapper.java index bd83a92..2678f3b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/mapper/ViewProductAndStockMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/mapper/ViewProductAndStockMapper.java @@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock; /** * 库存物资Mapper接口 - * + * * @author ruoyi - * @date 2025-09-12 + * @date 2025-12-08 */ -public interface ViewProductAndStockMapper +public interface ViewProductAndStockMapper { /** * 查询库存物资 - * + * * @param onlyIdentity 库存物资主键 * @return 库存物资 */ @@ -21,7 +21,7 @@ public interface ViewProductAndStockMapper /** * 查询库存物资列表 - * + * * @param viewProductAndStock 库存物资 * @return 库存物资集合 */ @@ -29,7 +29,7 @@ public interface ViewProductAndStockMapper /** * 新增库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -37,7 +37,7 @@ public interface ViewProductAndStockMapper /** * 修改库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -45,7 +45,7 @@ public interface ViewProductAndStockMapper /** * 删除库存物资 - * + * * @param onlyIdentity 库存物资主键 * @return 结果 */ @@ -53,11 +53,9 @@ public interface ViewProductAndStockMapper /** * 批量删除库存物资 - * + * * @param onlyIdentitys 需要删除的数据主键集合 * @return 结果 */ public int deleteViewProductAndStockByOnlyIdentitys(Long[] onlyIdentitys); - - List selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/IViewProductAndStockService.java b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/IViewProductAndStockService.java index 0b36e25..0c94529 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/IViewProductAndStockService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/IViewProductAndStockService.java @@ -5,15 +5,15 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock; /** * 库存物资Service接口 - * + * * @author ruoyi - * @date 2025-09-12 + * @date 2025-12-08 */ -public interface IViewProductAndStockService +public interface IViewProductAndStockService { /** * 查询库存物资 - * + * * @param onlyIdentity 库存物资主键 * @return 库存物资 */ @@ -21,7 +21,7 @@ public interface IViewProductAndStockService /** * 查询库存物资列表 - * + * * @param viewProductAndStock 库存物资 * @return 库存物资集合 */ @@ -29,7 +29,7 @@ public interface IViewProductAndStockService /** * 新增库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -37,7 +37,7 @@ public interface IViewProductAndStockService /** * 修改库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -45,7 +45,7 @@ public interface IViewProductAndStockService /** * 批量删除库存物资 - * + * * @param onlyIdentitys 需要删除的库存物资主键集合 * @return 结果 */ @@ -53,11 +53,9 @@ public interface IViewProductAndStockService /** * 删除库存物资信息 - * + * * @param onlyIdentity 库存物资主键 * @return 结果 */ public int deleteViewProductAndStockByOnlyIdentity(Long onlyIdentity); - - List selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/impl/ViewProductAndStockServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/impl/ViewProductAndStockServiceImpl.java index fd22268..3eda9b9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/impl/ViewProductAndStockServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/productAndStock/service/impl/ViewProductAndStockServiceImpl.java @@ -9,19 +9,19 @@ import com.ruoyi.out.productAndStock.service.IViewProductAndStockService; /** * 库存物资Service业务层处理 - * + * * @author ruoyi - * @date 2025-09-12 + * @date 2025-12-08 */ @Service -public class ViewProductAndStockServiceImpl implements IViewProductAndStockService +public class ViewProductAndStockServiceImpl implements IViewProductAndStockService { @Autowired private ViewProductAndStockMapper viewProductAndStockMapper; /** * 查询库存物资 - * + * * @param onlyIdentity 库存物资主键 * @return 库存物资 */ @@ -33,7 +33,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi /** * 查询库存物资列表 - * + * * @param viewProductAndStock 库存物资 * @return 库存物资 */ @@ -45,7 +45,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi /** * 新增库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -57,7 +57,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi /** * 修改库存物资 - * + * * @param viewProductAndStock 库存物资 * @return 结果 */ @@ -69,7 +69,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi /** * 批量删除库存物资 - * + * * @param onlyIdentitys 需要删除的库存物资主键 * @return 结果 */ @@ -81,7 +81,7 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi /** * 删除库存物资信息 - * + * * @param onlyIdentity 库存物资主键 * @return 结果 */ @@ -90,10 +90,4 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi { return viewProductAndStockMapper.deleteViewProductAndStockByOnlyIdentity(onlyIdentity); } - - @Override - public List selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock) { - return viewProductAndStockMapper.selectViewProductAndStockPdList(viewProductAndStock); - - } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/domain/BasStockFreezeRecord.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/domain/BasStockFreezeRecord.java index bb8fa38..a3dec3b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/domain/BasStockFreezeRecord.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/freeze/domain/BasStockFreezeRecord.java @@ -90,6 +90,15 @@ public class BasStockFreezeRecord extends BaseEntity /** 物料guid */ // @Excel(name = "${stock.Freeze.productGuid}") private String productGuid; + + /** 单位名称 */ + @Excel(name = "单位名称") + private String unitName; + + /** 产品型号 */ + @Excel(name = "产品型号") + private String productModel; + // 创建时间 @Excel(name = "操作时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/domain/BasStockMaintainRecord.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/domain/BasStockMaintainRecord.java index 8352542..2666d8d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/domain/BasStockMaintainRecord.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/maintain/domain/BasStockMaintainRecord.java @@ -101,6 +101,14 @@ public class BasStockMaintainRecord extends BaseEntity // @Excel(name = "${stock.Maintain.barCodeQuantity}") private String barCodeQuantity; + /** 单位名称 */ + @Excel(name = "单位名称") + private String unitName; + + /** 产品型号 */ + @Excel(name = "产品型号") + private String productModel; + /** 物料guid */ // @Excel(name = "${stock.Maintain.productGuid}") private String productGuid; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/domain/BasStock.java b/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/domain/BasStock.java index d885ef5..353ae45 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/domain/BasStock.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/stock/stock/domain/BasStock.java @@ -81,8 +81,7 @@ public class BasStock extends BaseEntity { private String spare8; private String voltage; - @Excel(name = "件次",sort=18) - private String power; + private String phase; private String netWeight; private String grossWeight; @@ -217,4 +216,112 @@ public class BasStock extends BaseEntity { private String cargoNo; @Excel(name = "备注",sort=31) private String remark; + private String power; + + /** 产品型号 */ + @Excel(name = "产品型号") + private String productModel; + + // ---------- 产品明细 pd_ 字段 (来自产品明细 JSON) ---------- + /** 入库明细ID */ + private String pdDetailId; + /** 产品名称(明细) */ + private String pdProductName; + /** 型号(明细) */ + private String pdModel; + /** 单位(明细) */ + private String pdUnit; + /** 单价(明细) */ + private String pdUnitPrice; + /** 辅助单位(明细) */ + private String pdAuxUnit; + /** 产品属性1(明细) */ + private String pdAttr1; + /** 产品属性2(明细) */ + private String pdAttr2; + /** 数量(明细) */ + private String pdQuantity; + /** 入库数(明细) */ + private String pdInQty; + /** 辅助数量(明细) */ + private String pdAuxQuantity; + /** 总价(明细) */ + private String pdTotalPrice; + /** 成本单价(明细) */ + private String pdCostUnitPrice; + /** 总价2(明细) */ + private String pdTotalPrice2; + /** 核算成本总价(明细) */ + private String pdAccountCostTotal; + /** 核算数量(明细) */ + private String pdAccountQuantity; + /** 核算状态(明细) */ + private String pdAccountStatus; + /** 批号(明细) */ + private String pdBatchNo; + /** 序列号(明细) */ + private String pdSerialNo; + /** 生产日期(明细) */ + private String pdProdDate; + /** 有效日期(明细) */ + private String pdValidDate; + /** 到货日期(明细) */ + private String pdArrivalDate; + /** 备注(明细) */ + private String pdRemark; + /** 自定义字段1(明细) */ + private String pdCustom1; + /** 自定义字段2(明细) */ + private String pdCustom2; + /** 自定义字段3(明细) */ + private String pdCustom3; + /** 自定义字段4(明细) */ + private String pdCustom4; + /** 自定义字段5(明细) */ + private String pdCustom5; + /** 自定义字段6(明细) */ + private String pdCustom6; + /** 装卸工(明细) */ + private String pdLoader; + // ---------- SQL 脚本中新增的其他字段 ---------- + /** 集合数据(JSON/序列化) */ + private String Rows; + /** 入库主题 */ + private String Title; + /** 入库id */ + private String Kuin; + /** 入库状态 */ + private String Complete1; + /** 申请人 */ + private String Cateid; + /** 申请日期 */ + private String Date3; + /** 确认日期 */ + private String Date5; + /** 审批人 */ + private String Catein; + /** 审批意见 */ + private String Intro2; + /** 入库备注 */ + private String Intro; + /** 关联其他单据id */ + private String Caigou; + /** 添加时间 */ + private String Date7; + /** 库管id */ + private String Kg; + /** 入库类别 */ + private String Sort1; + /** 入库编号 */ + private String Rkbh; + /** 审批状态 */ + private String Status; + /** 产品明细(JSON/集合) */ + private String KuinList; + /** 客户名称 */ + private String sysIcusIInheritIdIidI413; + /** 磅单编号 */ + private String sysIcusIInheritIdIidI414; + /** 入库车号 */ + private String sysIcusIInheritIdIidI415; } diff --git a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml index 2eecd7c..a065c1a 100644 --- a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml @@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -34,12 +35,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -43,30 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and only_identity = #{onlyIdentity} and product_id like concat('%', #{productId}, '%') - and lot_no = #{lotNo} and product_name like concat('%', #{productName}, '%') and quantity = #{quantity} - and warehouse_id = #{warehouseId} - and spare1 = #{spare1} - and spare3 = #{spare3} - and spare4 = #{spare4} - and spare5 = #{spare5} - and spare6 = #{spare6} - and voltage = #{voltage} - and power = #{power} - and phase = #{phase} - and distribution like concat('%', #{distribution}, '%') - and order_id like concat('%', #{orderId}, '%') - and spare8 = #{spare8} - and price = #{price} - and cargo_no like concat('%', #{cargoNo}, '%') - and product_status = #{productStatus} - and parent_id = #{parentId} - and spare7 = #{spare7} - and create_sys like concat('%', #{createSys}, '%') - and spec like concat('%', #{spec}, '%') - and unit like concat('%', #{unit}, '%') - @@ -80,60 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" only_identity, product_id, - lot_no, product_name, quantity, - warehouse_id, - spare1, - spare3, - spare4, - spare5, - spare6, - voltage, - power, - phase, - distribution, - order_id, - spare8, - price, - cargo_no, - product_status, - parent_id, - spare7, - create_time, - create_sys, - spec, - unit, - supplier_name, #{onlyIdentity}, #{productId}, - #{lotNo}, #{productName}, #{quantity}, - #{warehouseId}, - #{spare1}, - #{spare3}, - #{spare4}, - #{spare5}, - #{spare6}, - #{voltage}, - #{power}, - #{phase}, - #{distribution}, - #{orderId}, - #{spare8}, - #{price}, - #{cargoNo}, - #{productStatus}, - #{parentId}, - #{spare7}, - #{createTime}, - #{createSys}, - #{spec}, - #{unit}, - #{supplierName}, @@ -141,31 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update view_product_and_stock product_id = #{productId}, - lot_no = #{lotNo}, product_name = #{productName}, quantity = #{quantity}, - warehouse_id = #{warehouseId}, - spare1 = #{spare1}, - spare3 = #{spare3}, - spare4 = #{spare4}, - spare5 = #{spare5}, - spare6 = #{spare6}, - voltage = #{voltage}, - power = #{power}, - phase = #{phase}, - distribution = #{distribution}, - order_id = #{orderId}, - spare8 = #{spare8}, - price = #{price}, - cargo_no = #{cargoNo}, - product_status = #{productStatus}, - parent_id = #{parentId}, - spare7 = #{spare7}, - create_time = #{createTime}, - create_sys = #{createSys}, - spec = #{spec}, - unit = #{unit}, - supplier_name = #{supplierName}, where only_identity = #{onlyIdentity} diff --git a/ruoyi-admin/src/main/resources/mapper/search/ViewStockDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/search/ViewStockDetailMapper.xml index d0cbcfd..5694d7a 100644 --- a/ruoyi-admin/src/main/resources/mapper/search/ViewStockDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/search/ViewStockDetailMapper.xml @@ -5,81 +5,115 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + - - - - - + + + - - - - + + + - - + + + - - + + - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - select bs.spare3, --账套 - bs.cargo_space_id, --库位编码 - bs.tray_code, --托盘 - bs.product_id, --产品编码 - bs.product_name,--产品名称 - bp.spec, -- 规格 - bs.quantity, -- 数量 - bs.spare6, -- 金额 - bp.price, --单价 - bp.spare1 as productType, --产品状态 - bp.unit, -- 单位 - bp.cargo_no, --图号 - bs.order_id, --合同号 - bs.spare5, --台次 - bs.power, --件次 - bs.spare8, --质量 - bp.parent_id, --常用编码 - bs.stockin_id, --入库单号 - bs2.supplier_name, --供应商名称 - bs2.supplier_no, --供应商编号 - bw.warehouse_id, --仓库编码 - bw.warehouse_name, --仓库名称 - bs.in_date, --入库时间 - bs.stacking_id, --出库时间 - bs.spare7, --盘点标识 - bs.back_date, --盘点时间 - bp.remark, --备注 - bs.stock_id, --库存编码 - bs.stock_status, --库存状态 - bs.lot_no, --批次号 - bs.out_quantity, - bs.spare4, --来源 - bs.spare1 --用途 - from bas_stock bs + select bs.cargo_space_id, --库位编码 + bs.tray_code, --托盘 + bs.product_id, --产品编码 + bs.product_name,--产品名称 + bs.quantity, -- 数量 + + bs.order_id, --合同号 + + bs.stockin_id, --入库单号 + + bw.warehouse_id, --仓库编码 + bw.warehouse_name, --仓库名称 + bs.in_date, --入库时间 + + bs.back_date, --盘点时间 + + -- bas_stock 的 pd_ 明细字段 + bs.pd_product_name, -- 明细产品名称 + bs.pd_batch_no, -- 明细批次号 + bs.pd_serial_no, -- 明细序列号 + bs.pd_model, -- 明细型号 + bs.pd_unit, -- 明细单位 + bs.pd_unit_price, -- 明细单价 + bs.pd_quantity, -- 明细数量 + bs.pd_total_price, -- 明细金额 + bs.pd_cost_unit_price, + bs.pd_prod_date, -- 明细生产日期 + bs.pd_valid_date, -- 明细有效日期 + bs.pd_arrival_date, -- 明细到货日期 + bs.pd_remark, -- 明细备注 + + bs.stock_id, --库存编码 + bs.stock_status, --库存状态 + bs.lot_no, --批次号 + bs.out_quantity + + from bas_stock bs left join bas_product bp on bs.product_id = bp.product_id left join bas_warehouse bw on bs.warehouse_id = bw.warehouse_id left join bas_cargo_space bcs on bs.cargo_space_id = bcs.cargo_space_id - left join bas_supplier bs2 on bs.phase = bs2.supplier_no + - and stock_id = #{stockId} + and bsfr.stock_id = #{stockId} and bsfr.cargo_space_id = #{cargoSpaceId} and bsfr.tray_code = #{trayCode} - and product_id = #{productId} + and bsfr.product_id = #{productId} and product_name like concat('%', #{productName}, '%') and print_date = #{printDate} and lot_no = #{lotNo} diff --git a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml index d3ee88d..2c8c0a8 100644 --- a/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/stock/BasStockMaintainRecordMapper.xml @@ -25,22 +25,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - - select wh_guid, stock_id, bsmr.cargo_space_id,bw.warehouse_name, bcs.cargo_space_name, bsmr.tray_code, product_id, product_name, print_date, lot_no, old_quantity, quantity, method, bsmr.warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid - from bas_stock_maintain_record bsmr - left join bas_cargo_space bcs on bsmr.cargo_space_id=bcs.cargo_space_id - left join bas_warehouse bw on bsmr.warehouse_id=bw.warehouse_id - + + select bsmr.wh_guid, bsmr.stock_id, bsmr.cargo_space_id, bw.warehouse_name, bcs.cargo_space_name, bsmr.tray_code, + bsmr.product_id, bsmr.product_name, bsmr.print_date, bsmr.lot_no, bsmr.old_quantity, bsmr.quantity, bsmr.method, + bsmr.warehouse_id, bsmr.create_time, bsmr.stock_detail_id, bsmr.operating_target, bsmr.bar_code_old_quantity, + bsmr.bar_code_quantity, bsmr.product_guid + + from bas_stock_maintain_record bsmr + left join bas_cargo_space bcs on bsmr.cargo_space_id = bcs.cargo_space_id + left join bas_warehouse bw on bsmr.warehouse_id = bw.warehouse_id + left join bas_stock bs on bsmr.stock_id = bs.stock_id + @@ -123,20 +185,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bs.in_type = #{inType} and bs.in_class_id = #{inClassId} and bs.warehouse_id = #{warehouseId} - and bs.stacking_id = #{stackingId} - and bs.spare1 = #{spare1} - and bs.spare2 = #{spare2} - and bs.spare3 = #{spare3} - and bs.spare4 = #{spare4} - and bs.spare5 = #{spare5} - and bs.spare6 = #{spare6} - and bs.voltage = #{voltage} - and bs.power = #{power} - and bs.phase = #{phase} - and bs.net_weight = #{netWeight} - and bs.gross_weight = #{grossWeight} - and bs.distribution = #{distribution} - and bs.model = #{model} + + + + and bp.unit like concat('%', #{unit}, '%') + and bp.model like concat('%', #{productModel}, '%') and bs.order_id = #{orderId} and bs.product_id = #{productId} and bcs.status = #{cargoSpaceStockStatus} @@ -147,13 +200,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bcs.the_column = #{theColumn} and bp.spec = #{spec} and bp.parent_id = #{parentId} - and bs2.supplier_no = #{supplierId} - and bs2.supplier_name = #{supplierName} + and bp.price = #{price} and bs.in_date >= #{inDateStart} and bs.in_date <= #{inDateEnd} and bp.spare1 = #{productType} + + and bs.pd_product_name like concat('%', #{pdProductName}, '%') + and bs.pd_batch_no = #{pdBatchNo} + and bs.pd_serial_no = #{pdSerialNo} + @@ -166,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into bas_stock + stock_id, cargo_space_id, stock_status, @@ -183,27 +241,73 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" in_type, in_class_id, warehouse_id, - stacking_id, - spare1, - spare2, - spare3, - spare4, - spare5, - spare6, + + + Rows, + Title, + Kuin, + Complete1, + Cateid, + Date3, + Date5, + Catein, + Intro2, + Intro, + Caigou, + Date7, + Kg, + Sort1, + Rkbh, + Status, + KuinList, + sysIcusIInheritIdIidI413, + sysIcusIInheritIdIidI414, + sysIcusIInheritIdIidI415, + + + pd_detail_id, + pd_product_name, + pd_model, + pd_unit, + pd_unit_price, + pd_aux_unit, + pd_attr1, + pd_attr2, + pd_quantity, + pd_in_qty, + pd_aux_quantity, + pd_total_price, + pd_cost_unit_price, + pd_total_price_2, + pd_account_cost_total, + pd_account_quantity, + pd_account_status, + pd_batch_no, + pd_serial_no, + pd_prod_date, + pd_valid_date, + pd_arrival_date, + pd_remark, + pd_custom1, + pd_custom2, + pd_custom3, + pd_custom4, + pd_custom5, + pd_custom6, + pd_loader, + product_id, product_name, - voltage, - power, - phase, - net_weight, - gross_weight, - distribution, - model, - order_id, - spare7, - spare8, + + + + + + + + #{stockId}, #{cargoSpaceId}, #{stockStatus}, @@ -221,25 +325,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{inType}, #{inClassId}, #{warehouseId}, - #{stackingId}, - #{spare1}, - #{spare2}, - #{spare3}, - #{spare4}, - #{spare5}, - #{spare6}, + + + #{Rows}, + #{Title}, + #{Kuin}, + #{Complete1}, + #{Cateid}, + #{Date3}, + #{Date5}, + #{Catein}, + #{Intro2}, + #{Intro}, + #{Caigou}, + #{Date7}, + #{Kg}, + #{Sort1}, + #{Rkbh}, + #{Status}, + #{KuinList}, + #{sysIcusIInheritIdIidI413}, + #{sysIcusIInheritIdIidI414}, + #{sysIcusIInheritIdIidI415}, + + + #{pdDetailId}, + #{pdProductName}, + #{pdModel}, + #{pdUnit}, + #{pdUnitPrice}, + #{pdAuxUnit}, + #{pdAttr1}, + #{pdAttr2}, + #{pdQuantity}, + #{pdInQty}, + #{pdAuxQuantity}, + #{pdTotalPrice}, + #{pdCostUnitPrice}, + #{pdTotalPrice2}, + #{pdAccountCostTotal}, + #{pdAccountQuantity}, + #{pdAccountStatus}, + #{pdBatchNo}, + #{pdSerialNo}, + #{pdProdDate}, + #{pdValidDate}, + #{pdArrivalDate}, + #{pdRemark}, + #{pdCustom1}, + #{pdCustom2}, + #{pdCustom3}, + #{pdCustom4}, + #{pdCustom5}, + #{pdCustom6}, + #{pdLoader}, + #{productId}, #{productName}, - #{voltage}, - #{power}, - #{phase}, - #{netWeight}, - #{grossWeight}, - #{distribution}, - #{model}, - #{orderId}, - #{spare7}, - #{spare8}, + + + + + @@ -262,35 +409,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" in_type = #{inType}, in_class_id = #{inClassId}, warehouse_id = #{warehouseId}, - stacking_id = #{stackingId}, - spare1 = #{spare1}, - spare2 = #{spare2}, - spare3 = #{spare3}, - spare4 = #{spare4}, - spare5 = #{spare5}, - spare6 = #{spare6}, + + product_id = #{productId}, - product_name = #{productName}, - voltage = #{voltage}, - power = #{power}, - phase = #{phase}, - net_weight = #{netWeight}, - gross_weight = #{grossWeight}, - distribution = #{distribution}, - model = #{model}, + + + + + + + + order_id = #{orderId}, - spare7 = #{spare7}, - spare8 = #{spare8}, + + + Rows = #{Rows}, + Title = #{Title}, + Kuin = #{Kuin}, + Complete1 = #{Complete1}, + Cateid = #{Cateid}, + Date3 = #{Date3}, + Date5 = #{Date5}, + Catein = #{Catein}, + Intro2 = #{Intro2}, + Intro = #{Intro}, + Caigou = #{Caigou}, + Date7 = #{Date7}, + Kg = #{Kg}, + Sort1 = #{Sort1}, + Rkbh = #{Rkbh}, + Status = #{Status}, + KuinList = #{KuinList}, + sysIcusIInheritIdIidI413 = #{sysIcusIInheritIdIidI413}, + sysIcusIInheritIdIidI414 = #{sysIcusIInheritIdIidI414}, + sysIcusIInheritIdIidI415 = #{sysIcusIInheritIdIidI415}, + + pd_detail_id = #{pdDetailId}, + pd_product_name = #{pdProductName}, + pd_model = #{pdModel}, + pd_unit = #{pdUnit}, + pd_unit_price = #{pdUnitPrice}, + pd_aux_unit = #{pdAuxUnit}, + pd_attr1 = #{pdAttr1}, + pd_attr2 = #{pdAttr2}, + pd_quantity = #{pdQuantity}, + pd_in_qty = #{pdInQty}, + pd_aux_quantity = #{pdAuxQuantity}, + pd_total_price = #{pdTotalPrice}, + pd_cost_unit_price = #{pdCostUnitPrice}, + pd_total_price_2 = #{pdTotalPrice2}, + pd_account_cost_total = #{pdAccountCostTotal}, + pd_account_quantity = #{pdAccountQuantity}, + pd_account_status = #{pdAccountStatus}, + pd_batch_no = #{pdBatchNo}, + pd_serial_no = #{pdSerialNo}, + pd_prod_date = #{pdProdDate}, + pd_valid_date = #{pdValidDate}, + pd_arrival_date = #{pdArrivalDate}, + pd_remark = #{pdRemark}, + pd_custom1 = #{pdCustom1}, + pd_custom2 = #{pdCustom2}, + pd_custom3 = #{pdCustom3}, + pd_custom4 = #{pdCustom4}, + pd_custom5 = #{pdCustom5}, + pd_custom6 = #{pdCustom6}, + pd_loader = #{pdLoader}, where stock_id = #{stockId} INSERT INTO bas_stock - (stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,stacking_id,spare1,spare2,spare3,spare4,spare5,spare6,product_id,product_name,voltage,power,phase,net_weight,gross_weight,distribution,model,order_id,spare7,spare8) + (stock_id,cargo_space_id,stock_status,product_status,lot_no,in_date,back_date,product_guid,quantity,job_id,tray_code,out_quantity,stockin_detail_id,stockin_id,in_type,in_class_id,warehouse_id,product_id,product_name,/*voltage,net_weight,gross_weight,distribution,*/order_id, + pd_detail_id,pd_product_name,pd_model,pd_unit,pd_unit_price,pd_aux_unit,pd_attr1,pd_attr2,pd_quantity,pd_in_qty,pd_aux_quantity,pd_total_price,pd_cost_unit_price,pd_total_price_2,pd_account_cost_total,pd_account_quantity,pd_account_status,pd_batch_no,pd_serial_no,pd_prod_date,pd_valid_date,pd_arrival_date,pd_remark,pd_custom1,pd_custom2,pd_custom3,pd_custom4,pd_custom5,pd_custom6,pd_loader) VALUES - (#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.stackingId},#{item.spare1},#{item.spare2},#{item.spare3},#{item.spare4},#{item.spare5},#{item.spare6},#{item.productId} - ,#{item.productName},#{item.voltage},#{item.power},#{item.phase},#{item.netWeight},#{item.grossWeight},#{item.distribution},#{item.model},#{item.orderId},#{item.spare7},#{item.spare8}) + (#{item.stockId},#{item.cargoSpaceId},#{item.stockStatus},#{item.productStatus},#{item.lotNo},#{item.inDate},#{item.backDate},#{item.productGuid},#{item.quantity},#{item.jobId},#{item.trayCode},#{item.outQuantity},#{item.stockinDetailId},#{item.stockinId},#{item.inType},#{item.inClassId},#{item.warehouseId},#{item.productId} + ,#{item.productName},/*#{item.voltage},#{item.netWeight},#{item.grossWeight},#{item.distribution},*/#{item.orderId}, + #{item.pdDetailId},#{item.pdProductName},#{item.pdModel},#{item.pdUnit},#{item.pdUnitPrice},#{item.pdAuxUnit},#{item.pdAttr1},#{item.pdAttr2},#{item.pdQuantity},#{item.pdInQty},#{item.pdAuxQuantity},#{item.pdTotalPrice},#{item.pdCostUnitPrice},#{item.pdTotalPrice2},#{item.pdAccountCostTotal},#{item.pdAccountQuantity},#{item.pdAccountStatus},#{item.pdBatchNo},#{item.pdSerialNo},#{item.pdProdDate},#{item.pdValidDate},#{item.pdArrivalDate},#{item.pdRemark},#{item.pdCustom1},#{item.pdCustom2},#{item.pdCustom3},#{item.pdCustom4},#{item.pdCustom5},#{item.pdCustom6},#{item.pdLoader}) @@ -298,7 +493,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update bas_stock set stock_status = #{stockStatus} where tray_code = #{trayCode} - update bas_stock set spare7 = '0' + update bas_stock set pd_account_status = '0' diff --git a/ruoyi-ui/src/api/kpi/spacePlan.js b/ruoyi-ui/src/api/kpi/spacePlan.js index fbe3330..88417ee 100644 --- a/ruoyi-ui/src/api/kpi/spacePlan.js +++ b/ruoyi-ui/src/api/kpi/spacePlan.js @@ -9,6 +9,13 @@ export function getRoadways(query) { params: query }) } +export function getFloors(query) { + return request({ + url: '/kpi/getFloors', + method: 'get', + params: query + }) +} //获取排列表 export function getPlatoons(query) { return request({ diff --git a/ruoyi-ui/src/views/bas/basProduct/index.vue b/ruoyi-ui/src/views/bas/basProduct/index.vue index 4f1e474..6cec3c4 100644 --- a/ruoyi-ui/src/views/bas/basProduct/index.vue +++ b/ruoyi-ui/src/views/bas/basProduct/index.vue @@ -98,7 +98,7 @@ - + diff --git a/ruoyi-ui/src/views/kpi/spaceAnalysis/index.vue b/ruoyi-ui/src/views/kpi/spaceAnalysis/index.vue index ec88752..ea536d4 100644 --- a/ruoyi-ui/src/views/kpi/spaceAnalysis/index.vue +++ b/ruoyi-ui/src/views/kpi/spaceAnalysis/index.vue @@ -13,7 +13,7 @@ - + 搜索 diff --git a/ruoyi-ui/src/views/kpi/spacePlan/index.vue b/ruoyi-ui/src/views/kpi/spacePlan/index.vue index be43080..72d1876 100644 --- a/ruoyi-ui/src/views/kpi/spacePlan/index.vue +++ b/ruoyi-ui/src/views/kpi/spacePlan/index.vue @@ -13,18 +13,18 @@ /> - - - - + + + + - + @@ -36,7 +36,7 @@