This commit is contained in:
mashuai 2025-05-21 18:14:55 +08:00
parent dd4f7af324
commit 9f7e611850
3 changed files with 16 additions and 2 deletions

View File

@ -17,4 +17,7 @@ public class BmConfigItems {
/** 物资状态流转: 【】允许一个新购单的部分物资提前流转到下一个阶段 */ /** 物资状态流转: 【】允许一个新购单的部分物资提前流转到下一个阶段 */
public static final String BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER = "allow_purchase_part_transfer"; public static final String BOOLEAN_ALLOW_PURCHASE_PART_TRANSFER = "allow_purchase_part_transfer";
// 安徽省公司短信平台key
public static final String ANHUI_COMPANY_SMS_KEY = "Wq1FZobZC5iJIAGKWh6gpKUmdGKBOQq7koHmx+Vg49g/dSjSFlw+2qRQmMmyXvJT";
} }

View File

@ -127,6 +127,12 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
} }
} }
} }
List<MaCodeVo> list = backApplyInfoMapper.selectByCode(details.getParentId());
if (CollectionUtils.isNotEmpty(list)) {
// 将goodNum和badNum分别相加
details.setGoodNum(list.stream().map(MaCodeVo::getGoodNum).reduce(BigDecimal.ZERO, BigDecimal::add));
details.setBadNum(list.stream().map(MaCodeVo::getBadNum).reduce(BigDecimal.ZERO, BigDecimal::add));
}
// 为每个退料详情设置附件信息 // 为每个退料详情设置附件信息
setBmFileInfosForDetails(details, bmFileInfos); setBmFileInfosForDetails(details, bmFileInfos);
// 如果是编码设备查询并设置相关的编码信息和附件 // 如果是编码设备查询并设置相关的编码信息和附件
@ -242,6 +248,8 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
maCodeDto.setTypeId(maCodeVo.getTypeId()); maCodeDto.setTypeId(maCodeVo.getTypeId());
maCodeDto.setMaStatus(maCodeVo.getMaStatus()); maCodeDto.setMaStatus(maCodeVo.getMaStatus());
maCodeDto.setMaterialType(maCodeVo.getMaterialType()); maCodeDto.setMaterialType(maCodeVo.getMaterialType());
maCodeDto.setGoodNum(maCodeVo.getGoodNum());
maCodeDto.setBadNum(maCodeVo.getBadNum());
// 查询并设置编码附件 // 查询并设置编码附件
List<BmFileInfo> bmFileInfoList = fetchBmFileInfos(details.getId(), maCodeVo.getMaId()); List<BmFileInfo> bmFileInfoList = fetchBmFileInfos(details.getId(), maCodeVo.getMaId());
if (CollectionUtils.isNotEmpty(bmFileInfoList)) { if (CollectionUtils.isNotEmpty(bmFileInfoList)) {
@ -925,7 +933,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
// 插入 CheckDetails // 插入 CheckDetails
result += backApplyInfoMapper.insertCheckDetails(details); result += backApplyInfoMapper.insertCheckDetails(details);
//更新ma_machine表状态为11退料暂存 //更新ma_machine表状态为11退料暂存
result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.RETURNED_MATERIAL.getStatus()); //result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.RETURNED_MATERIAL.getStatus());
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) { for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getUsername());
@ -1039,7 +1047,7 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
result += backApplyInfoMapper.insertCheckDetails(details); result += backApplyInfoMapper.insertCheckDetails(details);
} }
//更新ma_machine表状态为3退料检修 //更新ma_machine表状态为3退料检修
result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus()); // result += machineMapper.updateStatus(details.getMaId(), MaMachineStatusEnum.BACK_REPAIR.getStatus());
if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) { if (CollectionUtils.isNotEmpty(details.getBmFileInfos())) {
for (BmFileInfo bmFileInfo : details.getBmFileInfos()) { for (BmFileInfo bmFileInfo : details.getBmFileInfos()) {
bmFileInfo.setCreateBy(SecurityUtils.getUsername()); bmFileInfo.setCreateBy(SecurityUtils.getUsername());

View File

@ -139,6 +139,9 @@ public class PurchaseCheckInfo extends BaseEntity {
private String checkUser; private String checkUser;
@ApiModelProperty(value = "会签层级 1 代表供应科层级2 代表技术科层级3 代表库管班层级")
private String signLevel;
public String getCheckUser() { public String getCheckUser() {
return checkUser; return checkUser;
} }