From 439536142af23793ba0c932a6a78bd4d691c72e3 Mon Sep 17 00:00:00 2001 From: dingjie Date: Fri, 22 Dec 2023 21:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E5=85=A5=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PurchaseMacodeInfoServiceImpl.java | 8 +++++--- .../resources/mapper/material/PurchaseCheckInfoMapper.xml | 2 +- .../mapper/material/PurchaseMacodeInfoMapper.xml | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java index 64373612..6122bf84 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseMacodeInfoServiceImpl.java @@ -137,7 +137,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService purchaseCheckDetails.setBindNum(bindNum + purchaseMacodeInfoList.size()); purchaseCheckDetails.setUpdateTime(new Date()); checkDetailsMapper.updateBindByTaskIdTypeId(purchaseCheckDetails); - return AjaxResult.success(); + return AjaxResult.success(new ArrayList()); } @@ -286,10 +286,11 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService @Override public int modifyManageStatus(MaInputVO maInputVO) { Long taskId = maInputVO.getTaskId(); + String checkResult = maInputVO.getCheckResult(); List inputRecordList = maInputVO.getInputRecordList(); for (MaInputRecord maInputRecord : inputRecordList) { Long typeId = maInputRecord.getTypeId(); - String checkResult = maInputRecord.getCheckResult(); + // 修改机具入库状态 MaMachine maMachine = new MaMachine(); @@ -303,7 +304,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService // 修改编码管理的入库状态 MaType maType = purchaseMacodeInfoMapper.selectTypeByTypeId(typeId); // 库存添加 - maType.setNum(String.valueOf(maInputRecord.getInputNum().add(new BigDecimal(Integer.parseInt(maType.getNum()))))); + maType.setNum(maInputRecord.getInputNum().add(maType.getNum() == null ? new BigDecimal(0):maType.getNum())); purchaseMacodeInfoMapper.updateTypeByTypeId(maType); BigDecimal inputNum = checkDetailsMapper.selectInputNUmByTypeId(taskId, typeId); @@ -319,6 +320,7 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo(); purchaseMacodeInfo.setTaskId(taskId); purchaseMacodeInfo.setTypeId(typeId); + purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode()); purchaseMacodeInfo.setStatus("1".equals(checkResult) ? "1" : "0"); purchaseMacodeInfoMapper.updateMacodeByType(purchaseMacodeInfo); // 新增入库记录 diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index 021380bd..dd57cac0 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -144,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"