| | |
| | | HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName()); |
| | | productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null); |
| | | productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0); |
| | | productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null); |
| | | |
| | | if (!checkProductSnUnique(productBasic)) { |
| | | throw new ApiException("产品编号已存在"); |
| | |
| | | SysUser currentUser = SecurityUtils.getLoginUser().getUser(); |
| | | checkUserAllowed(productBasic,currentUser); |
| | | productBasic.setUpdateBy(currentUser.getUsername()); |
| | | HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName()); |
| | | productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null); |
| | | productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0); |
| | | productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null); |
| | | int row=baseMapper.updateById(productBasic); |
| | | if(row<1){ |
| | | throw new ApiException("更新成品基础信息失败"); |
| | |
| | | HzSecientificVo hzSecientificVo = secientificMapper.selectBySecientificName(productBasic.getName()); |
| | | productBasic.setPeculiarityType(hzSecientificVo!=null? hzSecientificVo.getPeculiarityType() : null); |
| | | productBasic.setPeculiarityNumber(hzSecientificVo!=null ? hzSecientificVo.getPeculiarityNumber() : 0); |
| | | productBasic.setSecientificId(hzSecientificVo!=null? hzSecientificVo.getId() : null); |
| | | productBasic.setKind(kind); |
| | | productBasic.setMinPackage(minPackage); |
| | | productBasic.setCompanyId(currentUser.getCompanyId()); |