| | |
| | | import com.vincent.rsf.server.system.service.FieldsService; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | if (Objects.isNull(wkOrderItem.getAnfme()) || Double.compare(wkOrderItem.getAnfme(), 0.0) <= 0) { |
| | | throw new CoolException("计划数不能为空!!"); |
| | | } |
| | | |
| | | Matnr matnr = matnrService.getOne(new LambdaQueryWrapper<Matnr>().eq(Matnr::getCode, wkOrderItem.getMatnrCode())); |
| | | if (Objects.isNull(matnr)) { |
| | | throw new CoolException("数据错误:物料" + wkOrderItem.getMatnrCode() + "不存在!!"); |
| | | } |
| | | BeanUtils.copyProperties(matnr, wkOrderItem); |
| | | wkOrderItem.setMatnrCode(matnr.getCode()).setMatnrId(matnr.getId()).setMaktx(matnr.getName()); |
| | | |
| | | //保存扩展字段 |
| | | try { |
| | | StringBuffer sb = new StringBuffer(); |