| | |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | throw new CoolException("数据错误:当前物料不存在!!"); |
| | | } |
| | | // //TODO barcode生成策略 |
| | | String trackCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_LABEL_CODE, item); |
| | | if (StringUtils.isBlank(trackCode)) { |
| | | throw new CoolException("单据跟踪码生成失败:请检查「sys_asn_mantr_label」是否配置完成!!"); |
| | | } |
| | | // String barcode = code + matnr.getCode(); |
| | | orderItem.setAnfme(item.getAnfme()) |
| | | .setAsnId(order.getId()) |
| | |
| | | .setSplrCode(item.getSplrCode()) |
| | | .setPoDetlId(item.getId()) |
| | | .setPlatItemId(item.getPlatItemId()) |
| | | .setTrackCode(trackCode) |
| | | // .setBarcode(barcode) |
| | | .setPoCode(purchase.getCode()) |
| | | .setPurQty(item.getAnfme()) |