zc
3 天以前 f1148a16d18e7d0f095fbd2341410104de665fc1
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java
@@ -753,8 +753,8 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R matUpdate(BaseMatParms baseMatParms) {
        if (StringUtils.isNotBlank(baseMatParms.getMatnr())) {
            throw new CoolException("基础信息变更失败!!");
        if (StringUtils.isBlank(baseMatParms.getMatnr())) {
            throw new CoolException("物料编码不能为空!!");
        }
        Matnr matnr = matnrService.getOne(new LambdaQueryWrapper<Matnr>().eq(Matnr::getCode, baseMatParms.getMatnr()));
        if (Objects.isNull(matnr)) {
@@ -772,15 +772,13 @@
                throw new CoolException("物料新增失败!!");
            }
        } else {
            if (!Objects.isNull(baseMatParms.getGroupName())) {
                MatnrGroup matnrGroup = matnrGroupService.getOne(new LambdaQueryWrapper<MatnrGroup>()
                        .eq(MatnrGroup::getName, baseMatParms.getGroupName()));
                if (Objects.isNull(matnrGroup)) {
                if (!Objects.isNull(matnrGroup)) {
                    matnr.setGroupCode(matnrGroup.getCode()).setGroupId(matnrGroup.getId());
                }
            }
            matnr.setName(baseMatParms.getMaktx())
                    .setColor(baseMatParms.getColor())
                    .setModel(baseMatParms.getModel())