diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java b/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java index 3f6f70d..7f42882 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/controller/ToErpApiController.java @@ -2,6 +2,7 @@ package com.ruoyi.api.controller; import com.ruoyi.api.service.IToErpService; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.log.service.IRequestLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -16,13 +17,21 @@ public class ToErpApiController { @Autowired private IToErpService toErpService; + @Autowired + private IRequestLogService requestLogService; /** * 接收入出库通知单 */ @PostMapping("/receiveDeliveryNotice") + @ResponseBody public AjaxResult receiveDeliveryNotice(@RequestBody DeliveryNoticeVo deliveryNoticeVo) { - return toErpService.receiveDeliveryNotice(deliveryNoticeVo); + + AjaxResult ajaxResult = toErpService.receiveDeliveryNotice(deliveryNoticeVo); + requestLogService.insertRequestLog(requestLogService.getRequestLog(deliveryNoticeVo.toString(), "接收入出库通知单", ajaxResult)); + return ajaxResult; + + } @@ -30,7 +39,9 @@ public class ToErpApiController { * 回传其他出入库单 */ // @Scheduled(fixedDelay = 1500) - public void callbackTransferBill() { - toErpService.callbackTransferBill(); + @RequestMapping("/callbackDeliveryNotice") + @ResponseBody + public AjaxResult callbackDeliveryNotice(String billNo) { + return toErpService.callbackDeliveryNotice(billNo); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java index 1264a65..52bb862 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/domain/DeliveryNoticeItemVo.java @@ -13,8 +13,12 @@ import lombok.ToString; @NoArgsConstructor @ToString public class DeliveryNoticeItemVo { + + /** 行号 */ private String lineNo; + /** 单据号 */ + private String billNo; /** 存货编码 */ private String inventoryCode; /** 存货名称 */ 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 f1999d0..8859608 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 @@ -12,7 +12,7 @@ public interface IToErpService { AjaxResult receiveDeliveryNotice(DeliveryNoticeVo deliveryNoticeVo); - void callbackTransferBill(); + AjaxResult callbackDeliveryNotice(String billNo); AjaxResult createWorkshopInboundOrder(BasProduct basProduct); } 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 605843e..bec31b8 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 @@ -14,6 +14,8 @@ import com.ruoyi.in.stockin.domain.InStockin; import com.ruoyi.in.stockin.service.IInStockinService; import com.ruoyi.in.stockindetail.domain.InStockinDetail; import com.ruoyi.in.stockindetail.service.IInStockinDetailService; +import com.ruoyi.in.stockinfinish.domain.InStockinFinish; +import com.ruoyi.in.stockinfinish.service.IInStockinFinishService; import com.ruoyi.job.mydojob.service.IMydoJobService; import com.ruoyi.job.mydojobdetail.domain.MydoJobDetail; import com.ruoyi.job.mydojobdetail.service.IMydoJobDetailService; @@ -25,7 +27,9 @@ import com.ruoyi.out.outStockoutDetail.domain.OutStockoutDetail; import com.ruoyi.out.outStockoutDetail.service.IOutStockoutDetailService; import com.ruoyi.out.outStockoutDetail.mapper.OutStockoutDetailMapper; import com.ruoyi.out.outStockout.mapper.OutStockoutMapper; +import io.swagger.v3.oas.models.security.SecurityScheme; import org.apache.pdfbox.pdmodel.interactive.viewerpreferences.PDViewerPreferences; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -65,6 +69,9 @@ public class ToErpServiceImpl implements IToErpService { @Autowired private IOutStockoutDetailService outStockoutDetailService; + @Autowired + private IInStockinFinishService inStockinFinishService; + private static final String TO_ERP_URL = "http://192.168.1.100:8080/api/"; //todo 需要调试 @@ -119,6 +126,9 @@ public class ToErpServiceImpl implements IToErpService { if ("2".equals(opType) && exist == null) { return AjaxResult.error("单据不存在,无法修改"); } + if("1".equals(opType) && exist != null){ + return AjaxResult.error("单据已存在,请勿重复添加"); + } if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType)) { return AjaxResult.error("单据已执行,禁止修改"); } @@ -149,12 +159,12 @@ public class ToErpServiceImpl implements IToErpService { inStockinDetailService.deleteInStockinDetailByStockinGuid(inStockin.getStockinGuid()); } List items = deliveryNoticeVo.getDetailList(); - List detailList = new ArrayList<>(); - int i = 1; + + for (DeliveryNoticeItemVo item : items) { InStockinDetail detail = new InStockinDetail(); detail.setStockinGuid(inStockin.getStockinGuid()); - detail.setStockinDetailId(item.getLineNo()); + detail.setStockinDetailId(inStockin.getStockinId()+"-"+item.getLineNo()); detail.setStockinId(inStockin.getStockinId()); detail.setProductId(item.getInventoryCode()); detail.setProductName(item.getInventoryName()); @@ -162,13 +172,17 @@ public class ToErpServiceImpl implements IToErpService { detail.setUnit(item.getUnit()); detail.setQuantity(item.getQuantity()); detail.setLotNo(item.getLotNo()); - detail.setStockStatus("0"); + detail.setSpare1(item.getLevelRelation()); + detail.setSpare2(item.getUpperMaterial()); + detail.setSpare3(item.getTopMaterial()); + detail.setSpare6(item.getLineNo()); + detail.setRemark(item.getRemark()); detail.setAssignNum("0"); detail.setScanNum("0"); - detailList.add(detail); - i++; + inStockinDetailService.insertInStockinDetail(detail); + } - inStockinDetailService.insertInStockinDetailList(detailList); + return AjaxResult.success(); } } @@ -182,14 +196,14 @@ public class ToErpServiceImpl implements IToErpService { // 删除操作(操作类型3) if ("3".equals(opType)) { if (exist == null) { - return AjaxResult.success(); + return AjaxResult.error("单据不存在"); } if ("3".equals(exist.getStatus())) { - return AjaxResult.error("单据已完成,禁止删除"); + return AjaxResult.error("单据已执行,禁止删除"); } - OutStockoutDetail q = new OutStockoutDetail(); - q.setStockoutId(deliveryNoticeVo.getBillNo()); - List details = outStockoutDetailService.selectOutStockoutDetailList(q); + OutStockoutDetail outStockoutDetail = new OutStockoutDetail(); + outStockoutDetail.setStockoutId(deliveryNoticeVo.getBillNo()); + List details = outStockoutDetailService.selectOutStockoutDetailList(outStockoutDetail); if (details != null && !details.isEmpty()) { String[] ids = details.stream().map(OutStockoutDetail::getStockoutDetailId).toArray(String[]::new); outStockoutDetailService.deleteOutStockoutDetailByStockoutDetailIds(ids); @@ -203,15 +217,19 @@ public class ToErpServiceImpl implements IToErpService { if ("2".equals(opType) && exist == null) { return AjaxResult.error("单据不存在,无法修改"); } - if (exist != null && "3".equals(exist.getStatus())) { - return AjaxResult.error("单据已完成,禁止修改"); + if ("1".equals(opType) && exist != null){ + return AjaxResult.error("单据已存在,请勿重复添加"); + } + if (exist != null && "3".equals(exist.getStatus()) && "2".equals(opType) ) { + return AjaxResult.error("单据已执行,禁止修改"); } OutStockout out = exist != null ? exist : new OutStockout(); + if (exist == null) { out.setStockoutGuid(UUID.randomUUID().toString()); } out.setStockoutId(deliveryNoticeVo.getBillNo()); - out.setOutType(deliveryNoticeVo.getOutType()); + out.setOutType(deliveryNoticeVo.getBillType()); out.setCreateDate(deliveryNoticeVo.getBillDate()); out.setCreateManId(deliveryNoticeVo.getCreateMan()); out.setStatus("1"); @@ -219,6 +237,13 @@ public class ToErpServiceImpl implements IToErpService { out.setStockoutSource("1"); out.setDepartmentNo(deliveryNoticeVo.getProjectNo()); out.setCustomerNo(deliveryNoticeVo.getCustomerId()); + out.setClassNowId(deliveryNoticeVo.getCustomerName()); + out.setSpare1(deliveryNoticeVo.getContractNo());//合同号 + out.setSpare2(deliveryNoticeVo.getSalesOrderNo());//销售订单号 + out.setSpare3(deliveryNoticeVo.getApproveDate());//审核时间 + out.setSpare4(deliveryNoticeVo.getApproveMan());//审核人 + out.setSpare5(deliveryNoticeVo.getRemark()); + if (exist == null) { outStockoutService.insertOutStockout(out); } else { @@ -231,22 +256,33 @@ public class ToErpServiceImpl implements IToErpService { outStockoutDetailService.deleteOutStockoutDetailByStockoutDetailIds(ids); } } - int i = 1; + for (DeliveryNoticeItemVo item : deliveryNoticeVo.getDetailList()) { OutStockoutDetail d = new OutStockoutDetail(); - String line = item.getLineNo() != null ? item.getLineNo() : String.valueOf(i); - d.setStockoutDetailId(out.getStockoutId()+"-"+line); + + d.setStockoutDetailId(out.getStockoutId()+"-"+item.getLineNo()); d.setStockoutGuid(out.getStockoutGuid()); d.setStockoutId(out.getStockoutId()); d.setProductId(item.getInventoryCode()); + d.setProductId(item.getInventoryCode()); d.setLotNo(item.getLotNo()); + d.setSpec(item.getSpecModel()); + d.setUnit(item.getUnit()); + d.setSpare1(item.getLevelRelation()); + d.setSpare2(item.getUpperMaterial()); + d.setSpare3(item.getTopMaterial()); + d.setSpare6(item.getLineNo()); + d.setRemark(item.getRemark()); + try { d.setQuantity(new BigDecimal(item.getQuantity())); + d.setAllotQuantity(BigDecimal.ZERO); + d.setAssignNum(BigDecimal.ZERO); } catch (Exception e) { d.setQuantity(BigDecimal.ZERO); } outStockoutDetailService.insertOutStockoutDetail(d); - i++; + } return AjaxResult.success(); } @@ -257,19 +293,63 @@ public class ToErpServiceImpl implements IToErpService { @Override - public void callbackTransferBill() { - TransferBillCallback param = new TransferBillCallback(); - param.setStatus("0"); - List list = transferBillCallbackService.selectTransferBillCallbackList(param); - for (TransferBillCallback transferBillCallback : list) { - //todo 请求其他出入库单回传接口 - AjaxResult otherInOutboundOrder = createOtherInOutboundOrder(transferBillCallback); - if (otherInOutboundOrder.isSuccess()){ - transferBillCallback.setStatus("1"); - transferBillCallback.setFinishTime(DateUtil.formatDateTime(new Date())); - transferBillCallbackService.updateTransferBillCallback(transferBillCallback); + public AjaxResult callbackDeliveryNotice(String billNo) { + InStockin inStockin = null; + + inStockin = inStockinService.selectInStockinByStockinId(billNo); + if(inStockin==null) { + InStockinFinish inStockinFinish = inStockinFinishService.selectInStockinFinishByStockinId(billNo); + + if (inStockinFinish == null) { + return AjaxResult.error("单据不存在"); + }else{ + //将inStockinFinish对象中的所有值赋给inStockin + inStockin = new InStockin(); + BeanUtils.copyProperties(inStockinFinish, inStockin); } } + + DeliveryNoticeVo deliveryNoticeVo = new DeliveryNoticeVo(); + deliveryNoticeVo.setBillNo(inStockin.getStockinId()); + deliveryNoticeVo.setBillType(inStockin.getInType()); + deliveryNoticeVo.setBillDate(inStockin.getCreateDate()); + deliveryNoticeVo.setCreateMan(inStockin.getCreateManId()); + deliveryNoticeVo.setWarehouseId(inStockin.getWarehouseId()); + deliveryNoticeVo.setProjectNo(inStockin.getDepartmentNo()); + deliveryNoticeVo.setCustomerId(inStockin.getSupplierNo()); + deliveryNoticeVo.setCustomerName(inStockin.getClassNo()); // 对应receiveDeliveryNotice中的映射 + deliveryNoticeVo.setContractNo(inStockin.getSpare1()); + deliveryNoticeVo.setSalesOrderNo(inStockin.getSpare2()); + deliveryNoticeVo.setApproveDate(inStockin.getSpare3()); + deliveryNoticeVo.setApproveMan(inStockin.getSpare4()); + deliveryNoticeVo.setRemark(inStockin.getSpare5()); + + InStockinDetail inStockinDetailParam = new InStockinDetail(); + inStockinDetailParam.setStockinId(billNo); + List inStockinDetails = inStockinDetailService.selectInStockinDetailList(inStockinDetailParam); + + List detailList = new ArrayList<>(); + if (inStockinDetails != null && !inStockinDetails.isEmpty()) { + for (InStockinDetail detail : inStockinDetails) { + DeliveryNoticeItemVo item = new DeliveryNoticeItemVo(); + item.setLineNo(detail.getStockinDetailId()); + item.setBillNo(detail.getStockinId()); + item.setInventoryCode(detail.getProductId()); + item.setInventoryName(detail.getProductName()); + item.setSpecModel(detail.getSpec()); + item.setUnit(detail.getUnit()); + item.setQuantity(detail.getAssignNum()); + item.setLotNo(detail.getLotNo()); + item.setLevelRelation(detail.getSpare1()); + item.setUpperMaterial(detail.getSpare2()); + item.setTopMaterial(detail.getSpare3()); + item.setRemark(detail.getRemark()); + detailList.add(item); + } + } + deliveryNoticeVo.setDetailList(detailList); + + return AjaxResult.success(deliveryNoticeVo); } @Override diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToWcsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToWcsServiceImpl.java index 048ef4f..967dda8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToWcsServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/service/impl/ToWcsServiceImpl.java @@ -43,7 +43,7 @@ public class ToWcsServiceImpl implements IToWcsService { @Override - @Scheduled(fixedDelay=1500) +// @Scheduled(fixedDelay=1500) public void pushOutMydoJob() { //查询所有未推送的料箱出库作业 MydoJob mydoJobParam = new MydoJob(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/check/stockcheck/service/impl/CheckStockinServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/check/stockcheck/service/impl/CheckStockinServiceImpl.java index 53be5f9..e280463 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/check/stockcheck/service/impl/CheckStockinServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/check/stockcheck/service/impl/CheckStockinServiceImpl.java @@ -175,7 +175,7 @@ public class CheckStockinServiceImpl implements ICheckStockinService { checkStockin.setStatus("1"); checkStockin.setStockSource("0"); checkStockin.setCheckType(checkStockin.getCheckType()); - //checkStockin.setErpBill(checkStockin.getErpBill()); + checkStockin.setErpBill(checkStockin.getErpBill()); if ("1".equals(checkStockin.getCheckType())) { //物料盘点 for (int i = 0; i < detailList.size(); i++) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/mapper/InStockinMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/mapper/InStockinMapper.java index 8f5b652..3be6e24 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/mapper/InStockinMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/mapper/InStockinMapper.java @@ -20,6 +20,9 @@ public interface InStockinMapper */ public InStockin selectInStockinByStockinGuid(String stockinGuid); + + public InStockin selectInStockinByStockinId(String stockinId); + /** * 查询入库单据列表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/IInStockinService.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/IInStockinService.java index 6d1c8e1..6ceece1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/IInStockinService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/IInStockinService.java @@ -21,6 +21,7 @@ public interface IInStockinService * @return 入库单据 */ public InStockin selectInStockinByStockinGuid(String stockinGuid); + public InStockin selectInStockinByStockinId(String stockinId); /** * 查询入库单据列表 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/impl/InStockinServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/impl/InStockinServiceImpl.java index 508d469..9418000 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/impl/InStockinServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockin/service/impl/InStockinServiceImpl.java @@ -50,6 +50,11 @@ public class InStockinServiceImpl implements IInStockinService return inStockinMapper.selectInStockinByStockinGuid(stockinGuid); } + @Override + public InStockin selectInStockinByStockinId(String stockinId) { + return inStockinMapper.selectInStockinByStockinId(stockinId); + } + /** * 查询入库单据列表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/mapper/InStockinFinishMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/mapper/InStockinFinishMapper.java index ee2d0ee..f80c475 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/mapper/InStockinFinishMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/mapper/InStockinFinishMapper.java @@ -20,6 +20,7 @@ public interface InStockinFinishMapper * @return 历史入库单据主信息 */ public InStockinFinish selectInStockinFinishByStockinGuid(String stockinGuid); + public InStockinFinish selectInStockinFinishByStockinId(String stockinId); /** * 查询历史入库单据主信息列表 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/IInStockinFinishService.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/IInStockinFinishService.java index 34cd6b2..ededdfc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/IInStockinFinishService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/IInStockinFinishService.java @@ -20,6 +20,7 @@ public interface IInStockinFinishService * @return 历史入库单据主信息 */ public InStockinFinish selectInStockinFinishByStockinGuid(String stockinGuid); + public InStockinFinish selectInStockinFinishByStockinId(String stockinId); /** * 查询历史入库单据主信息列表 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java index d6bef4c..ad28711 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/in/stockinfinish/service/impl/InStockinFinishServiceImpl.java @@ -34,6 +34,13 @@ public class InStockinFinishServiceImpl implements IInStockinFinishService return inStockinFinishMapper.selectInStockinFinishByStockinGuid(stockinGuid); } + + @Override + public InStockinFinish selectInStockinFinishByStockinId(String stockinId) + { + return inStockinFinishMapper.selectInStockinFinishByStockinId(stockinId); + } + /** * 查询历史入库单据主信息列表 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/log/service/impl/RequestLogServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/log/service/impl/RequestLogServiceImpl.java index cf4ef50..f605af0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/log/service/impl/RequestLogServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/log/service/impl/RequestLogServiceImpl.java @@ -62,11 +62,9 @@ public class RequestLogServiceImpl implements IRequestLogService @Override public int insertRequestLog(RequestLog requestLog) { - if (requestLog.getIsSuccessful().equals("1")){ + return requestLogMapper.insertRequestLog(requestLog); - }else { - return 0; - } + } /** 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 052d271..8403648 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 @@ -82,6 +82,15 @@ public class OutStockout extends BaseEntity @Excel(name = "确认时间") private String finishDate; + private String spare1; + + private String spare2; + + private String spare3; + + private String spare4; + + private String spare5; private String customerName; @@ -299,24 +308,76 @@ public class OutStockout extends BaseEntity return erpStockoutId; } + public String getSpare1() { + return spare1; + } + + public void setSpare1(String spare1) { + this.spare1 = spare1; + } + + public String getSpare2() { + return spare2; + } + + public void setSpare2(String spare2) { + this.spare2 = spare2; + } + + public String getSpare3() { + return spare3; + } + + public void setSpare3(String spare3) { + this.spare3 = spare3; + } + + public String getSpare4() { + return spare4; + } + + public void setSpare4(String spare4) { + this.spare4 = spare4; + } + + public String getSpare5() { + return spare5; + } + + public void setSpare5(String spare5) { + this.spare5 = spare5; + } + @Override public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("stockoutGuid", getStockoutGuid()) - .append("stockoutId", getStockoutId()) - .append("outType", getOutType()) - .append("createDate", getCreateDate()) - .append("departmentNo", getDepartmentNo()) - .append("customerNo", getCustomerNo()) - .append("createManId", getCreateManId()) - .append("status", getStatus()) - .append("stockoutSource", getStockoutSource()) - .append("warehouseId", getWarehouseId()) - .append("classNowId", getClassNowId()) - .append("exitId", getExitId()) - .append("carNumber", getCarNumber()) - .append("FID", getFID()) - .append("erpStockoutId", getErpStockoutId()) - .toString(); + return "OutStockout{" + + "stockoutGuid='" + stockoutGuid + '\'' + + ", stockoutId='" + stockoutId + '\'' + + ", outType='" + outType + '\'' + + ", createDate='" + createDate + '\'' + + ", departmentNo='" + departmentNo + '\'' + + ", customerNo='" + customerNo + '\'' + + ", createManId='" + createManId + '\'' + + ", status='" + status + '\'' + + ", stockoutSource='" + stockoutSource + '\'' + + ", warehouseId='" + warehouseId + '\'' + + ", classNowId='" + classNowId + '\'' + + ", exitId='" + exitId + '\'' + + ", carNumber='" + carNumber + '\'' + + ", FID='" + FID + '\'' + + ", erpStockoutId='" + erpStockoutId + '\'' + + ", startDate='" + startDate + '\'' + + ", finishDate='" + finishDate + '\'' + + ", spare1='" + spare1 + '\'' + + ", spare2='" + spare2 + '\'' + + ", spare3='" + spare3 + '\'' + + ", spare4='" + spare4 + '\'' + + ", spare5='" + spare5 + '\'' + + ", customerName='" + customerName + '\'' + + ", warehouseName='" + warehouseName + '\'' + + ", productId='" + productId + '\'' + + ", productName='" + productName + '\'' + + ", typeData=" + typeData + + '}'; } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/domain/OutStockoutDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/domain/OutStockoutDetail.java index f6b3843..4027dd2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/domain/OutStockoutDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/domain/OutStockoutDetail.java @@ -171,6 +171,108 @@ public class OutStockoutDetail extends BaseEntity @Excel(name = "订单号") private String orderId; + @Excel(name = "型号") + private String spare1; + + /** 备用字段2 */ + @Excel(name = "净重") + private String spare2; + + /** 备用字段3 */ + @Excel(name = "颜色") + private String spare3; + + /** 备用字段4 */ + @Excel(name = "序列号") + private String spare4; + + /** 备用字段5 */ + @Excel(name = "电压") + private String spare5; + + /** 备用字段6 */ + @Excel(name = "功率") + private String spare6; + @Excel(name = "相位") + private String spare7; + @Excel(name = "毛重") + private String spare8; + + private String spare9; + + + public String getSpare1() { + return spare1; + } + + public void setSpare1(String spare1) { + this.spare1 = spare1; + } + + public String getSpare2() { + return spare2; + } + + public void setSpare2(String spare2) { + this.spare2 = spare2; + } + + public String getSpare3() { + return spare3; + } + + public void setSpare3(String spare3) { + this.spare3 = spare3; + } + + public String getSpare4() { + return spare4; + } + + public void setSpare4(String spare4) { + this.spare4 = spare4; + } + + public String getSpare5() { + return spare5; + } + + public void setSpare5(String spare5) { + this.spare5 = spare5; + } + + public String getSpare6() { + return spare6; + } + + public void setSpare6(String spare6) { + this.spare6 = spare6; + } + + public String getSpare7() { + return spare7; + } + + public void setSpare7(String spare7) { + this.spare7 = spare7; + } + + public String getSpare8() { + return spare8; + } + + public void setSpare8(String spare8) { + this.spare8 = spare8; + } + + public String getSpare9() { + return spare9; + } + + public void setSpare9(String spare9) { + this.spare9 = spare9; + } + public String getVoltage() { return voltage; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/service/impl/OutStockoutDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/service/impl/OutStockoutDetailServiceImpl.java index bae467f..8dd0960 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/service/impl/OutStockoutDetailServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/out/outStockoutDetail/service/impl/OutStockoutDetailServiceImpl.java @@ -54,7 +54,7 @@ public class OutStockoutDetailServiceImpl implements IOutStockoutDetailService @Override public int insertOutStockoutDetail(OutStockoutDetail outStockoutDetail) { - outStockoutDetail.setCreateTime(DateUtils.getNowDate()); +// outStockoutDetail.setCreateTime(DateUtils.getNowDate()); return outStockoutDetailMapper.insertOutStockoutDetail(outStockoutDetail); } 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..e536960 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 @@ -25,7 +25,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * 库存物资Controller * * @author ruoyi - * @date 2025-09-12 + * @date 2026-01-06 */ @RestController @RequestMapping("/out/productAndStock") @@ -37,7 +37,7 @@ public class ViewProductAndStockController extends BaseController /** * 查询库存物资列表 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:list')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:list')") @GetMapping("/list") public TableDataInfo list(ViewProductAndStock viewProductAndStock) { @@ -45,10 +45,11 @@ public class ViewProductAndStockController extends BaseController List list = viewProductAndStockService.selectViewProductAndStockList(viewProductAndStock); return getDataTable(list); } + /** * 查询库存物资列表 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:list')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:list')") @GetMapping("/pd/list") public TableDataInfo pdList(ViewProductAndStock viewProductAndStock) { @@ -60,7 +61,7 @@ public class ViewProductAndStockController extends BaseController /** * 导出库存物资列表 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:export')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:export')") @Log(title = "库存物资", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ViewProductAndStock viewProductAndStock) @@ -73,7 +74,7 @@ public class ViewProductAndStockController extends BaseController /** * 获取库存物资详细信息 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:query')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:query')") @GetMapping(value = "/{onlyIdentity}") public AjaxResult getInfo(@PathVariable("onlyIdentity") Long onlyIdentity) { @@ -83,7 +84,7 @@ public class ViewProductAndStockController extends BaseController /** * 新增库存物资 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:add')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:add')") @Log(title = "库存物资", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ViewProductAndStock viewProductAndStock) @@ -94,7 +95,7 @@ public class ViewProductAndStockController extends BaseController /** * 修改库存物资 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:edit')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:edit')") @Log(title = "库存物资", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ViewProductAndStock viewProductAndStock) @@ -105,7 +106,7 @@ public class ViewProductAndStockController extends BaseController /** * 删除库存物资 */ - @PreAuthorize("@ss.hasPermi('out:productAndStock:remove')") + @PreAuthorize("@ss.hasPermi('productAndStock:productAndStock:remove')") @Log(title = "库存物资", businessType = BusinessType.DELETE) @DeleteMapping("/{onlyIdentitys}") public AjaxResult remove(@PathVariable Long[] onlyIdentitys) 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 593ec2b..f98ce57 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 @@ -1,6 +1,5 @@ package com.ruoyi.out.productAndStock.domain; -import java.math.BigDecimal; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -8,9 +7,9 @@ import com.ruoyi.common.core.domain.BaseEntity; /** * 库存物资对象 view_product_and_stock - * + * * @author ruoyi - * @date 2025-09-12 + * @date 2026-01-06 */ public class ViewProductAndStock extends BaseEntity { @@ -20,278 +19,226 @@ public class ViewProductAndStock extends BaseEntity @Excel(name = "序号") private Long onlyIdentity; - /** 品号 */ - @Excel(name = "品号") + /** 物料编码 */ + @Excel(name = "物料编码") private String productId; - /** 批次号 */ - @Excel(name = "批次号") + /** 批号 */ + @Excel(name = "批号") private String lotNo; - /** 品名 */ - @Excel(name = "品名") + /** 物料名称 */ + @Excel(name = "物料名称") private String productName; - /** 数量 */ - @Excel(name = "数量") - private BigDecimal quantity; + /** 库存数量 */ + @Excel(name = "库存数量") + private String quantity; - /** 仓库 */ - @Excel(name = "仓库") + /** 仓库编码 */ + @Excel(name = "仓库编码") private String warehouseId; - /** 规格 */ - @Excel(name = "规格") + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String stackingId; + + /** 层次关系 */ + @Excel(name = "层次关系") private String spare1; - /** 单位 */ - @Excel(name = "单位") + /** 上层物料 */ + @Excel(name = "上层物料") + private String spare2; + + /** 顶层物料 */ + @Excel(name = "顶层物料") private String spare3; - /** 型号 */ - @Excel(name = "型号") + /** 项目号 */ + @Excel(name = "项目号") private String spare4; - /** 颜色 */ - @Excel(name = "颜色") + /** 合同号 */ + @Excel(name = "合同号") private String spare5; - /** 序列号 */ - @Excel(name = "序列号") + /** 销售订单号 */ + @Excel(name = "销售订单号") private String spare6; - @Excel(name = "是否盘点") - private String spare7; - /** 电压 */ - @Excel(name = "电压") + /** 供应商编码 */ + @Excel(name = "供应商编码") private String voltage; - /** 功率 */ - @Excel(name = "功率") + /** 规格型号 */ + @Excel(name = "规格型号") private String power; - /** 相位 */ - @Excel(name = "相位") + /** 计量单位 */ + @Excel(name = "计量单位") private String phase; - /** 净重 */ - @Excel(name = "净重") - private BigDecimal netWeight; - - /** 毛重 */ - @Excel(name = "毛重") - private BigDecimal grossWeight; - - /** 分销 */ - @Excel(name = "分销") - private String distribution; - - /** 机型 */ - @Excel(name = "机型") - private String model; - - /** 订单号 */ - @Excel(name = "订单号") - private String orderId; - - public String getSpare7() { - return spare7; - } - - public void setSpare7(String spare7) { - this.spare7 = spare7; - } - - public void setOnlyIdentity(Long onlyIdentity) + public void setOnlyIdentity(Long onlyIdentity) { this.onlyIdentity = onlyIdentity; } - public Long getOnlyIdentity() + public Long getOnlyIdentity() { return onlyIdentity; } - public void setProductId(String productId) + public void setProductId(String productId) { this.productId = productId; } - public String getProductId() + public String getProductId() { return productId; } - public void setLotNo(String lotNo) + public void setLotNo(String lotNo) { this.lotNo = lotNo; } - public String getLotNo() + public String getLotNo() { return lotNo; } - public void setProductName(String productName) + public void setProductName(String productName) { this.productName = productName; } - public String getProductName() + public String getProductName() { return productName; } - public void setQuantity(BigDecimal quantity) + public void setQuantity(String quantity) { this.quantity = quantity; } - public BigDecimal getQuantity() + public String getQuantity() { return quantity; } - public void setWarehouseId(String warehouseId) + public void setWarehouseId(String warehouseId) { this.warehouseId = warehouseId; } - public String getWarehouseId() + public String getWarehouseId() { return warehouseId; } - public void setSpare1(String spare1) + public void setStackingId(String stackingId) + { + this.stackingId = stackingId; + } + + public String getStackingId() + { + return stackingId; + } + + public void setSpare1(String spare1) { this.spare1 = spare1; } - public String getSpare1() + public String getSpare1() { return spare1; } - public void setSpare3(String spare3) + public void setSpare2(String spare2) + { + this.spare2 = spare2; + } + + public String getSpare2() + { + return spare2; + } + + public void setSpare3(String spare3) { this.spare3 = spare3; } - public String getSpare3() + public String getSpare3() { return spare3; } - public void setSpare4(String spare4) + public void setSpare4(String spare4) { this.spare4 = spare4; } - public String getSpare4() + public String getSpare4() { return spare4; } - public void setSpare5(String spare5) + public void setSpare5(String spare5) { this.spare5 = spare5; } - public String getSpare5() + public String getSpare5() { return spare5; } - public void setSpare6(String spare6) + public void setSpare6(String spare6) { this.spare6 = spare6; } - public String getSpare6() + public String getSpare6() { return spare6; } - public void setVoltage(String voltage) + public void setVoltage(String voltage) { this.voltage = voltage; } - public String getVoltage() + public String getVoltage() { return voltage; } - public void setPower(String power) + public void setPower(String power) { this.power = power; } - public String getPower() + public String getPower() { return power; } - public void setPhase(String phase) + public void setPhase(String phase) { this.phase = phase; } - public String getPhase() + public String getPhase() { return phase; } - public void setNetWeight(BigDecimal netWeight) - { - this.netWeight = netWeight; - } - - public BigDecimal getNetWeight() - { - return netWeight; - } - - public void setGrossWeight(BigDecimal grossWeight) - { - this.grossWeight = grossWeight; - } - - public BigDecimal getGrossWeight() - { - return grossWeight; - } - - public void setDistribution(String distribution) - { - this.distribution = distribution; - } - - public String getDistribution() - { - return distribution; - } - - public void setModel(String model) - { - this.model = model; - } - - public String getModel() - { - return model; - } - - public void setOrderId(String orderId) - { - this.orderId = orderId; - } - - public String getOrderId() - { - return orderId; - } - @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -301,7 +248,9 @@ public class ViewProductAndStock extends BaseEntity .append("productName", getProductName()) .append("quantity", getQuantity()) .append("warehouseId", getWarehouseId()) + .append("stackingId", getStackingId()) .append("spare1", getSpare1()) + .append("spare2", getSpare2()) .append("spare3", getSpare3()) .append("spare4", getSpare4()) .append("spare5", getSpare5()) @@ -309,11 +258,6 @@ public class ViewProductAndStock extends BaseEntity .append("voltage", getVoltage()) .append("power", getPower()) .append("phase", getPhase()) - .append("netWeight", getNetWeight()) - .append("grossWeight", getGrossWeight()) - .append("distribution", getDistribution()) - .append("model", getModel()) - .append("orderId", getOrderId()) .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..34ee239 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 @@ -7,7 +7,7 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock; * 库存物资Mapper接口 * * @author ruoyi - * @date 2025-09-12 + * @date 2026-01-06 */ public interface ViewProductAndStockMapper { 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..0b0a07d 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 @@ -7,7 +7,7 @@ import com.ruoyi.out.productAndStock.domain.ViewProductAndStock; * 库存物资Service接口 * * @author ruoyi - * @date 2025-09-12 + * @date 2026-01-06 */ public interface IViewProductAndStockService { @@ -26,6 +26,14 @@ public interface IViewProductAndStockService * @return 库存物资集合 */ public List selectViewProductAndStockList(ViewProductAndStock viewProductAndStock); + /** + * 查询库存物资列表 + * + * @param viewProductAndStock 库存物资 + * @return 库存物资集合 + */ + List selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock); + /** * 新增库存物资 @@ -59,5 +67,4 @@ public interface IViewProductAndStockService */ 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..ad2708b 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 @@ -11,7 +11,7 @@ import com.ruoyi.out.productAndStock.service.IViewProductAndStockService; * 库存物资Service业务层处理 * * @author ruoyi - * @date 2025-09-12 + * @date 2026-01-06 */ @Service public class ViewProductAndStockServiceImpl implements IViewProductAndStockService @@ -43,6 +43,18 @@ public class ViewProductAndStockServiceImpl implements IViewProductAndStockServi return viewProductAndStockMapper.selectViewProductAndStockList(viewProductAndStock); } + /** + * 查询库存物资列表 + * + * @param viewProductAndStock 库存物资 + * @return 库存物资 + */ + @Override + public List selectViewProductAndStockPdList(ViewProductAndStock viewProductAndStock) { + return viewProductAndStockMapper.selectViewProductAndStockPdList(viewProductAndStock); + + } + /** * 新增库存物资 * @@ -90,10 +102,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/pda/service/PdaServiceImp.java b/ruoyi-admin/src/main/java/com/ruoyi/pda/service/PdaServiceImp.java index 27a5d56..1a34114 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/pda/service/PdaServiceImp.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/pda/service/PdaServiceImp.java @@ -107,7 +107,10 @@ public class PdaServiceImp implements PdaService { @Override public AjaxResult confirmIn(String trayCode) { - //如果有出库作业,修改作业类型改为合盘入库类型 + //如果有出库作业,修改作业类型改为合盘入库类型,合盘出库放历史表 + + + //如果没有出库作业,正常生成入库作业 return null; } 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 248262a..d8d9a22 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 @@ -1,5 +1,6 @@ package com.ruoyi.stock.freeze.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -90,6 +91,7 @@ public class BasStockFreezeRecord extends BaseEntity private String productGuid; // 创建时间 @Excel(name = "${stock.Maintain.createTime}", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; @Override 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 2b131e2..9f2edb3 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 @@ -1,9 +1,11 @@ package com.ruoyi.stock.maintain.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @@ -69,6 +71,7 @@ public class BasStockMaintainRecord extends BaseEntity private String warehouseId; @Excel(name = "${stock.Maintain.createTime}", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; @Override diff --git a/ruoyi-admin/src/main/resources/mapper/check/CheckStockinFinishMapper.xml b/ruoyi-admin/src/main/resources/mapper/check/CheckStockinFinishMapper.xml index b48a9fc..c098c28 100644 --- a/ruoyi-admin/src/main/resources/mapper/check/CheckStockinFinishMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/check/CheckStockinFinishMapper.xml @@ -109,6 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${params.warehouseDataScope} + order by cs.create_date asc diff --git a/ruoyi-admin/src/main/resources/mapper/check/CheckStockinMapper.xml b/ruoyi-admin/src/main/resources/mapper/check/CheckStockinMapper.xml index 282ffd1..5a369f9 100644 --- a/ruoyi-admin/src/main/resources/mapper/check/CheckStockinMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/check/CheckStockinMapper.xml @@ -80,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ${params.warehouseDataScope} + order by cs.create_date asc + + + + + + insert into in_stockin diff --git a/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailFinishMapper.xml b/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailFinishMapper.xml index 2056937..af5d578 100644 --- a/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailFinishMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailFinishMapper.xml @@ -139,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mjd.spare3, mjd.spare4, mjd.pick_quantity, - bp.product_name, + mjd.product_name, mjd.spare5, mjd.spare6, mjd.spare7, diff --git a/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailMapper.xml index 88cca12..283e3e2 100644 --- a/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/job/MydoJobDetailMapper.xml @@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mjd.spare4, mjd.pick_quantity, mjd.out_quantity-mjd.pick_quantity as pick_quantity_real, - bp.product_name, + mjd.product_name, mjd.spare5, mjd.spare6, mjd.spare7, diff --git a/ruoyi-admin/src/main/resources/mapper/job/MydoJobFinishMapper.xml b/ruoyi-admin/src/main/resources/mapper/job/MydoJobFinishMapper.xml index 47b8788..b799378 100644 --- a/ruoyi-admin/src/main/resources/mapper/job/MydoJobFinishMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/job/MydoJobFinishMapper.xml @@ -104,7 +104,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + select distinct mj.job_id, mj.status, mj.on_line_type, mj.task_no, mj.supplier_id, + mj.customer_id, mj.department_id, mj.tray_code, mj.roadway_id, mj.cargo_space_id, + mj.target_roadway_id, mj.target_cargo_space_id, mj.line_id, mj.workshop_id, mj.priority, + mj.execution_phase, mj.in_or_out, mj.create_time, mj.start_time, mj.finish_time, mj.entrance_id, + mj.exit_id, mj.class_id, mj.warehouse_id, mj.fault_flag, + bs.supplier_name as supplier_name, bc.customer_name as customer_name, + bcs.cargo_space_name as cargo_space_name, bcst.cargo_space_name as target_cargo_space_name, + bw.warehouse_name as warehouse_name + from mydo_job mj + left join bas_supplier bs on mj.supplier_id = bs.id + left join bas_customer bc on mj.customer_id = bc.id + left join bas_cargo_space bcs on mj.cargo_space_id = bcs.cargo_space_id + left join bas_cargo_space bcst on mj.target_cargo_space_id = bcst.cargo_space_id + left join bas_warehouse bw on mj.warehouse_id = bw.warehouse_id + left join mydo_job_detail mjd on mj.job_id = mjd.job_id and mj.job_id = #{jobId} and mj.status = #{status} @@ -88,18 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and mj.in_or_out < 20 and mj.in_or_out not in(5,6) and mj.in_or_out in (5,6) and mj.in_or_out in (25,26) - and mj.job_id in (select job_id from mydo_job_detail where product_id like concat('%', #{productId}, '%')) - - and mj.in_or_out in - - #{item} - - - - ${params.warehouseDataScope} - + and mjd.product_id like concat('%', #{productId}, '%') - order by mj.create_time desc + order by mj.create_time desc @@ -138,61 +132,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" erp_stockout_id, unit, spec, - supplier_id, - cargo_no, - create_time, - print_date, - voltage, - power, - phase, - net_weight, - gross_weight, - distribution, - model, - order_id, - + spare1, + spare2, + spare3, + spare4, + spare5, + spare6, + spare7, + spare8, + spare9, + + - #{stockoutDetailId}, - #{stockoutGuid}, - #{stockoutId}, - #{lotNo}, - #{productGuid}, - #{productId}, - #{productName}, - #{quantity}, - #{quantityX}, - #{quantityJ}, - #{assignNum}, - #{assignNumX}, - #{assignNumJ}, - #{allotQuantity}, - #{allotQuantityX}, - #{allotQuantityJ}, - #{price}, - #{remark}, - #{warehouseId}, - #{outId}, - #{bukechaiQuantity}, - #{kechaiQuantity}, - #{entryid}, - #{flatQuantity}, - #{fid}, - #{erpStockoutId}, - #{unit}, - #{spec}, - #{supplierId}, - #{cargoNo}, - #{createTime}, - #{printDate}, - #{voltage}, - #{power}, - #{phase}, - #{netWeight}, - #{grossWeight}, - #{distribution}, - #{model}, - #{orderId}, - + #{stockoutDetailId}, + #{stockoutGuid}, + #{stockoutId}, + #{lotNo}, + #{productGuid}, + #{productId}, + #{productName}, + #{quantity}, + #{quantityX}, + #{quantityJ}, + #{assignNum}, + #{assignNumX}, + #{assignNumJ}, + #{allotQuantity}, + #{allotQuantityX}, + #{allotQuantityJ}, + #{price}, + #{remark}, + #{warehouseId}, + #{outId}, + #{bukechaiQuantity}, + #{kechaiQuantity}, + #{entryid}, + #{flatQuantity}, + #{fid}, + #{erpStockoutId}, + #{unit}, + #{spec}, + #{spare1}, + #{spare2}, + #{spare3}, + #{spare4}, + #{spare5}, + #{spare6}, + #{spare7}, + #{spare8}, + #{spare9}, + @@ -224,18 +213,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" erp_stockout_id = #{erpStockoutId}, unit = #{unit}, spec = #{spec}, - supplier_id = #{supplierId}, - cargo_no = #{cargoNo}, - create_time = #{createTime}, - print_date = #{printDate}, - voltage = #{voltage}, - power = #{power}, - phase = #{phase}, - net_weight = #{netWeight}, - gross_weight = #{grossWeight}, - distribution = #{distribution}, - model = #{model}, - order_id = #{orderId}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare3 = #{spare3}, + spare4 = #{spare4}, + spare5 = #{spare5}, + spare6 = #{spare6}, + spare7 = #{spare7}, + spare8 = #{spare8}, + spare9 = #{spare9}, + where stockout_detail_id = #{stockoutDetailId} @@ -255,10 +242,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select d.stockout_detail_id, d.stockout_guid, d.stockout_id, d.lot_no, d.product_guid, d.product_id, d.quantity, d.quantity_x, d.quantity_j, d.assign_num, d.assign_num_x, d.assign_num_j, d.allot_quantity, d.allot_quantity_x, d.allot_quantity_j, d.price, d.remark, d.warehouse_id, d.out_id, d.bukechai_quantity, d.kechai_quantity, d.entryid, d.flat_quantity, d.fid, - d.erp_stockout_id, d.unit, d.spec, d.supplier_id, d.cargo_no, d.create_time, d.print_date, - d.voltage, d.power, d.phase, d.net_weight, d.gross_weight, d.distribution, d.model, d.order_id, - p.product_name + d.erp_stockout_id, d.unit, d.spec, + d.product_name,d.spare1, d.spare2, d.spare3, d.spare4,d.spare5, d.spare6,d.spare7,d.spare8,d.spare9 from out_stockout_detail d left join bas_product p on d.product_id = p.product_id where d.stockout_guid = #{stockoutGuid} - \ No newline at end of file + diff --git a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml index 039f7ef..84ac0fb 100644 --- a/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml @@ -24,15 +24,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + - select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date from out_stockout + select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date,spare1,spare2,spare3,spare4,spare5 from out_stockout @@ -84,6 +95,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" car_number, FID, erp_stockout_id, + spare1, + spare2, + spare4, + spare3, + spare5, #{stockoutGuid}, @@ -101,6 +117,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{carNumber}, #{FID}, #{erpStockoutId}, + #{spare1}, + #{spare2}, + #{spare4}, + #{spare3}, + #{spare5}, @@ -123,6 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" erp_stockout_id = #{erpStockoutId}, start_date = #{startDate}, finish_date = #{finishDate}, + spare1 = #{spare1}, + spare2 = #{spare2}, + spare4 = #{spare4}, + spare3 = #{spare3}, + spare5 = #{spare5}, where stockout_guid = #{stockoutGuid} @@ -188,6 +214,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" o.erp_stockout_id, o.start_date, o.finish_date, + o.spare1, + o.spare2, + o.spare4, + o.spare3, + o.spare5, bw.warehouse_name, bc.customer_name from out_stockout o diff --git a/ruoyi-admin/src/main/resources/mapper/out/ViewProductAndStockMapper.xml b/ruoyi-admin/src/main/resources/mapper/productAndStock/ViewProductAndStockMapper.xml similarity index 69% rename from ruoyi-admin/src/main/resources/mapper/out/ViewProductAndStockMapper.xml rename to ruoyi-admin/src/main/resources/mapper/productAndStock/ViewProductAndStockMapper.xml index 262948d..8b9d313 100644 --- a/ruoyi-admin/src/main/resources/mapper/out/ViewProductAndStockMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/productAndStock/ViewProductAndStockMapper.xml @@ -11,52 +11,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - - - - - - - select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id from view_product_and_stock + select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, voltage, power, phase from view_product_and_stock - select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, spare1, spare3, spare4, spare5, spare6, voltage, power, phase, net_weight, gross_weight, distribution, model, order_id, spare7 from view_product_and_stock_pd + select only_identity, product_id, lot_no, product_name, quantity, warehouse_id, stacking_id, spare1, spare2, spare3, spare4, spare5, spare6, voltage, power, phase from view_product_and_stock_pd @@ -64,29 +56,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where only_identity = #{onlyIdentity} - and only_identity = #{onlyIdentity} - and product_id like concat('%', #{productId}, '%') - and lot_no like concat('%', #{lotNo}, '%') - and product_name like concat('%', #{productName}, '%') - and quantity = #{quantity} + and product_id = #{productId} + and lot_no = #{lotNo} + and product_name like concat('%', #{productName}, + '%') + + and quantity = #{quantity} and warehouse_id = #{warehouseId} + and stacking_id = #{stackingId} and spare1 = #{spare1} + and spare2 = #{spare2} and spare3 = #{spare3} and spare4 = #{spare4} and spare5 = #{spare5} and spare6 = #{spare6} - and spare7 = #{spare7} and voltage = #{voltage} and power = #{power} and phase = #{phase} - and net_weight = #{netWeight} - and gross_weight = #{grossWeight} - and distribution = #{distribution} - and model = #{model} - and order_id = #{orderId} @@ -99,7 +90,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" product_name, quantity, warehouse_id, + stacking_id, spare1, + spare2, spare3, spare4, spare5, @@ -107,11 +100,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" voltage, power, phase, - net_weight, - gross_weight, - distribution, - model, - order_id, #{onlyIdentity}, @@ -120,7 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{productName}, #{quantity}, #{warehouseId}, + #{stackingId}, #{spare1}, + #{spare2}, #{spare3}, #{spare4}, #{spare5}, @@ -128,11 +118,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{voltage}, #{power}, #{phase}, - #{netWeight}, - #{grossWeight}, - #{distribution}, - #{model}, - #{orderId}, @@ -144,7 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" product_name = #{productName}, quantity = #{quantity}, warehouse_id = #{warehouseId}, + stacking_id = #{stackingId}, spare1 = #{spare1}, + spare2 = #{spare2}, spare3 = #{spare3}, spare4 = #{spare4}, spare5 = #{spare5}, @@ -152,11 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" voltage = #{voltage}, power = #{power}, phase = #{phase}, - net_weight = #{netWeight}, - gross_weight = #{grossWeight}, - distribution = #{distribution}, - model = #{model}, - order_id = #{orderId}, where only_identity = #{onlyIdentity} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index cbb7999..edd56ef 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -104,7 +104,7 @@ public class SecurityConfig // 静态资源,可匿名访问 .requestMatchers(HttpMethod.GET, "/", "/*.html", "/**.html", "/**.css", "/**.js", "/profile/**").permitAll() .requestMatchers("/swagger-ui.html", "/v3/api-docs/**", "/swagger-ui/**", "/druid/**").permitAll() - .requestMatchers("/api/**","/api2wms/**").permitAll() + .requestMatchers("/api/**","/api2wms/**","api2erp/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); }) diff --git a/ruoyi-ui/src/views/bas/basCustomer/index.vue b/ruoyi-ui/src/views/bas/basCustomer/index.vue index 1699eb2..b83473b 100644 --- a/ruoyi-ui/src/views/bas/basCustomer/index.vue +++ b/ruoyi-ui/src/views/bas/basCustomer/index.vue @@ -1,12 +1,12 @@