|
|
@ -89,6 +89,9 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MesPrdBarcodeInfoMapper mesPrdBarcodeInfoMapper;
|
|
|
|
private MesPrdBarcodeInfoMapper mesPrdBarcodeInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private QmsCheckResultDetailMapper qmsCheckResultDetailMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MesConfig mesConfig;
|
|
|
|
private MesConfig mesConfig;
|
|
|
@ -172,7 +175,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
|
|
|
|
|
|
|
|
public void generateRawBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
|
|
|
|
public void generateRawBarcode(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
|
|
|
|
Date currentDate = new Date();
|
|
|
|
Date currentDate = new Date();
|
|
|
|
String userName = SecurityUtils.getUsername();
|
|
|
|
String userName = SecurityUtils.getLoginUser() == null ?
|
|
|
|
|
|
|
|
SecurityUtils.getUsername() : SecurityUtils.getLoginUser().getNickname();
|
|
|
|
Long purchaseOrderId = mesBaseBarcodeInfo.getPurchaseOrderId();
|
|
|
|
Long purchaseOrderId = mesBaseBarcodeInfo.getPurchaseOrderId();
|
|
|
|
|
|
|
|
|
|
|
|
Long materialId = mesBaseBarcodeInfo.getMaterialId();
|
|
|
|
Long materialId = mesBaseBarcodeInfo.getMaterialId();
|
|
|
@ -368,7 +372,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
//五楼自检工序根据原材料条码生成成品条码
|
|
|
|
//五楼自检工序根据原材料条码生成成品条码
|
|
|
|
if (StringUtils.isNotEmpty(mesBaseBarcodeInfo.getSingleFlag()) &&
|
|
|
|
if (StringUtils.isNotEmpty(mesBaseBarcodeInfo.getSingleFlag()) &&
|
|
|
|
mesBaseBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_YES)) {
|
|
|
|
mesBaseBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_YES)) {
|
|
|
|
String rawMaterialBarcode = mesBaseBarcodeInfo.getProductBarcode();
|
|
|
|
String rawMaterialBarcode = mesBaseBarcodeInfo.getProductBarcode();//原材料条码
|
|
|
|
|
|
|
|
|
|
|
|
MesBaseBarcodeInfo rawBarcode = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(rawMaterialBarcode);
|
|
|
|
MesBaseBarcodeInfo rawBarcode = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(rawMaterialBarcode);
|
|
|
|
if (rawBarcode == null) {
|
|
|
|
if (rawBarcode == null) {
|
|
|
@ -379,6 +383,25 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
throw new ServiceException("此条码为非原材料条码,不能生成成品条码");
|
|
|
|
throw new ServiceException("此条码为非原材料条码,不能生成成品条码");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断质检状态
|
|
|
|
|
|
|
|
QmsCheckResultDetail queryCheckResultDetail = new QmsCheckResultDetail();
|
|
|
|
|
|
|
|
queryCheckResultDetail.setMaterialBarcode(rawMaterialBarcode);
|
|
|
|
|
|
|
|
List<QmsCheckResultDetail> qmsCheckResultDetails = qmsCheckResultDetailMapper.selectQmsCheckResultDetailList(queryCheckResultDetail);
|
|
|
|
|
|
|
|
if (qmsCheckResultDetails == null || qmsCheckResultDetails.isEmpty()) {
|
|
|
|
|
|
|
|
throw new ServiceException("此物料还未质检,不能生成成品条码");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
QmsCheckResultDetail qmsCheckResultDetail = qmsCheckResultDetails.get(0);
|
|
|
|
|
|
|
|
String checkStatus = qmsCheckResultDetail.getCheckStatus() == null ? "" : qmsCheckResultDetail.getCheckStatus();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (checkStatus.equals("0")) {
|
|
|
|
|
|
|
|
throw new ServiceException("此物料待检验,不能生成成品条码");
|
|
|
|
|
|
|
|
} else if (checkStatus.equals("1")) {
|
|
|
|
|
|
|
|
throw new ServiceException("此物料检验中,不能生成成品条码");
|
|
|
|
|
|
|
|
} else if (checkStatus.equals("3")) {
|
|
|
|
|
|
|
|
throw new ServiceException("此物料质检不通过,不能生成成品条码");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (rawMaterialBarcode.contains(Seq.mesPurchaseVirtualBarcodeCode)) {//采购合并虚拟条码
|
|
|
|
if (rawMaterialBarcode.contains(Seq.mesPurchaseVirtualBarcodeCode)) {//采购合并虚拟条码
|
|
|
|
barcode = Seq.getId(Seq.mesPurchaseVirtualProductBarcodeSeqType, Seq.mesPurchaseVirtualProductBarcodeCode);
|
|
|
|
barcode = Seq.getId(Seq.mesPurchaseVirtualProductBarcodeSeqType, Seq.mesPurchaseVirtualProductBarcodeCode);
|
|
|
|
} else if (rawMaterialBarcode.contains(Seq.mesInternalVirtualBarcodeCode)) {//内部生产合并虚拟条码
|
|
|
|
} else if (rawMaterialBarcode.contains(Seq.mesInternalVirtualBarcodeCode)) {//内部生产合并虚拟条码
|
|
|
@ -400,7 +423,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
// throw new ServiceException("生产明细还未结束");
|
|
|
|
// throw new ServiceException("生产明细还未结束");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String rawBarCodePlanCode = rawBarcodeMesProductPlanDetail.getPlanCode();
|
|
|
|
String rawBarCodePlanCode = rawBarcodeMesProductPlanDetail.getPlanCode();
|
|
|
|
String rawBarCodePlanDetailCode = rawBarcodeMesProductPlanDetail.getPlanDetailCode();
|
|
|
|
String rawBarCodePlanDetailCode = rawBarcodeMesProductPlanDetail.getPlanDetailCode();
|
|
|
|
|
|
|
|
|
|
|
@ -422,6 +444,10 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
+ ",原材料条码派工单号:" + rawBarcodeProductPlan.getDispatchCode());
|
|
|
|
+ ",原材料条码派工单号:" + rawBarcodeProductPlan.getDispatchCode());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mesBaseBarcodeInfo.setPalletInfoCode(rawBarcode.getPalletInfoCode());//重新绑定托盘号
|
|
|
|
mesBaseBarcodeInfo.setPalletInfoCode(rawBarcode.getPalletInfoCode());//重新绑定托盘号
|
|
|
|
mesBaseBarcodeInfo.setBindStatus(MesConstants.MES_BARCODE_BIND_STATUS_BINDING);
|
|
|
|
mesBaseBarcodeInfo.setBindStatus(MesConstants.MES_BARCODE_BIND_STATUS_BINDING);
|
|
|
|
|
|
|
|
|
|
|
@ -910,14 +936,14 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
//先根据之前的成品条码信息获取托盘信息
|
|
|
|
//先根据之前的成品条码信息获取托盘信息
|
|
|
|
|
|
|
|
|
|
|
|
MesBaseBarcodeInfo productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(oriProductBarcode);
|
|
|
|
MesBaseBarcodeInfo productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(oriProductBarcode);
|
|
|
|
log.info("1:"+productBarcodeInfo.toString());
|
|
|
|
log.info("1:" + productBarcodeInfo.toString());
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
allErrorMsgBuilder.append("成品/配对码").append(oriProductBarcode).append("不存在;");
|
|
|
|
allErrorMsgBuilder.append("成品/配对码").append(oriProductBarcode).append("不存在;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(productBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_BIND)){
|
|
|
|
if (productBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_BIND)) {
|
|
|
|
productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodeInfo.getBindBarcode());
|
|
|
|
productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodeInfo.getBindBarcode());
|
|
|
|
log.info("2:"+productBarcodeInfo.toString());
|
|
|
|
log.info("2:" + productBarcodeInfo.toString());
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
allErrorMsgBuilder.append("成品/配对码[").append(oriProductBarcode).append("]的成品不存在;");
|
|
|
|
allErrorMsgBuilder.append("成品/配对码[").append(oriProductBarcode).append("]的成品不存在;");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -927,7 +953,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
MesSaleOrderRelate querySaleOrderRelate = new MesSaleOrderRelate();
|
|
|
|
MesSaleOrderRelate querySaleOrderRelate = new MesSaleOrderRelate();
|
|
|
|
querySaleOrderRelate.setBindBarcode(productBarcodeInfo.getBarcodeInfo());
|
|
|
|
querySaleOrderRelate.setBindBarcode(productBarcodeInfo.getBarcodeInfo());
|
|
|
|
List<MesSaleOrderRelate> mesSaleOrderRelates = mesSaleOrderRelateMapper.selectMesSaleOrderRelateList(querySaleOrderRelate);
|
|
|
|
List<MesSaleOrderRelate> mesSaleOrderRelates = mesSaleOrderRelateMapper.selectMesSaleOrderRelateList(querySaleOrderRelate);
|
|
|
|
if(mesSaleOrderRelates!=null && !mesSaleOrderRelates.isEmpty()){
|
|
|
|
if (mesSaleOrderRelates != null && !mesSaleOrderRelates.isEmpty()) {
|
|
|
|
allErrorMsgBuilder.append("此条码[").append(oriProductBarcode).append("]已经生成过原材料条码;");
|
|
|
|
allErrorMsgBuilder.append("此条码[").append(oriProductBarcode).append("]已经生成过原材料条码;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -951,26 +977,26 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
allErrorMsgBuilder.append(this.checkInternalMesBaseBarcode(productBarcodeInfo.getBarcodeInfo(), productBarcodeInfo, mesBaseBarcodeInfo));
|
|
|
|
allErrorMsgBuilder.append(this.checkInternalMesBaseBarcode(productBarcodeInfo.getBarcodeInfo(), productBarcodeInfo, mesBaseBarcodeInfo));
|
|
|
|
|
|
|
|
|
|
|
|
String materialName = productBarcodeInfo.getMaterialName();
|
|
|
|
String materialName = productBarcodeInfo.getMaterialName();
|
|
|
|
materialName = materialName.substring(0,materialNameLength);
|
|
|
|
materialName = materialName.substring(0, materialNameLength);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
barcodeInfo = Seq.getId(Seq.mesInternalVirtualBarcodeSeqType, Seq.mesInternalVirtualBarcodeCode);
|
|
|
|
barcodeInfo = Seq.getId(Seq.mesInternalVirtualBarcodeSeqType, Seq.mesInternalVirtualBarcodeCode);
|
|
|
|
|
|
|
|
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter,"");
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter, "");
|
|
|
|
|
|
|
|
|
|
|
|
//新建虚拟物料
|
|
|
|
//新建虚拟物料
|
|
|
|
materialId = this.insertNewVirtualMaterial(barcodeInfo,mergeMaterialName, userName, currentDate);
|
|
|
|
materialId = this.insertNewVirtualMaterial(barcodeInfo, mergeMaterialName, userName, currentDate);
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
MesBaseBarcodeInfo productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodes);
|
|
|
|
MesBaseBarcodeInfo productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodes);
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
allErrorMsgBuilder.append("此成品/配对码不存在;");
|
|
|
|
allErrorMsgBuilder.append("此成品/配对码不存在;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(productBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_BIND)){
|
|
|
|
if (productBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_BIND)) {
|
|
|
|
productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodeInfo.getBindBarcode());
|
|
|
|
productBarcodeInfo = mesBaseBarcodeInfoMapper.selectMesBaseBarcodeInfoByBarcodeInfo(productBarcodeInfo.getBindBarcode());
|
|
|
|
log.info("2:"+productBarcodeInfo.toString());
|
|
|
|
log.info("2:" + productBarcodeInfo.toString());
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
if (productBarcodeInfo == null) {
|
|
|
|
allErrorMsgBuilder.append("成品/配对码[").append(productBarcodes).append("]的成品不存在;");
|
|
|
|
allErrorMsgBuilder.append("成品/配对码[").append(productBarcodes).append("]的成品不存在;");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -985,7 +1011,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allErrorMsgBuilder.append(this.checkInternalMesBaseBarcode(productBarcodeInfo.getBarcodeInfo(), productBarcodeInfo, mesBaseBarcodeInfo));
|
|
|
|
allErrorMsgBuilder.append(this.checkInternalMesBaseBarcode(productBarcodeInfo.getBarcodeInfo(), productBarcodeInfo, mesBaseBarcodeInfo));
|
|
|
|
|
|
|
|
|
|
|
|
productBarcodeInfoList.add(productBarcodeInfo);
|
|
|
|
productBarcodeInfoList.add(productBarcodeInfo);
|
|
|
@ -1087,8 +1112,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//四楼到五楼,主要是多个成品合并到一个托盘后生成原材料条码需要保存以下信息,一个成品的保不保存无所谓
|
|
|
|
//四楼到五楼,主要是多个成品合并到一个托盘后生成原材料条码需要保存以下信息,一个成品的保不保存无所谓
|
|
|
|
MesSaleOrderRelate saleOrderRelate = new MesSaleOrderRelate();
|
|
|
|
MesSaleOrderRelate saleOrderRelate = new MesSaleOrderRelate();
|
|
|
|
saleOrderRelate.setBarcodeInfo(barcodeInfo);
|
|
|
|
saleOrderRelate.setBarcodeInfo(barcodeInfo);
|
|
|
@ -1452,7 +1475,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
mesOrderBindMapper.updateMesOrderBind(dbOrderBind);
|
|
|
|
mesOrderBindMapper.updateMesOrderBind(dbOrderBind);
|
|
|
|
|
|
|
|
|
|
|
|
String materialName = mesSaleOrderRelate.getMaterialName();
|
|
|
|
String materialName = mesSaleOrderRelate.getMaterialName();
|
|
|
|
materialName = materialName.substring(0,materialNameLength);
|
|
|
|
materialName = materialName.substring(0, materialNameLength);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
// materialCodes.add(mesPurchaseOrderVo.getMaterialCode());
|
|
|
|
// materialCodes.add(mesPurchaseOrderVo.getMaterialCode());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1461,12 +1484,12 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
throw new ServiceException(errorMsgBuilder.toString());
|
|
|
|
throw new ServiceException(errorMsgBuilder.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter,"");
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter, "");
|
|
|
|
|
|
|
|
|
|
|
|
String barcodeInfo = Seq.getId(Seq.mesPurchaseVirtualBarcodeSeqType, Seq.mesPurchaseVirtualBarcodeCode);
|
|
|
|
String barcodeInfo = Seq.getId(Seq.mesPurchaseVirtualBarcodeSeqType, Seq.mesPurchaseVirtualBarcodeCode);
|
|
|
|
|
|
|
|
|
|
|
|
//新建虚拟物料
|
|
|
|
//新建虚拟物料
|
|
|
|
Long materialId = this.insertNewVirtualMaterial(barcodeInfo, mergeMaterialName,userName, currentDate);
|
|
|
|
Long materialId = this.insertNewVirtualMaterial(barcodeInfo, mergeMaterialName, userName, currentDate);
|
|
|
|
|
|
|
|
|
|
|
|
//创建虚拟销售订单,保存对应的销售订单列表
|
|
|
|
//创建虚拟销售订单,保存对应的销售订单列表
|
|
|
|
MesSaleOrder virtualSaleOrder = this.insertNewVirtualSaleOrder(materialId, barcodeInfo, mesBaseBarcodeInfo.getSaleorderCode(), mesSaleOrderRelateList, userName, currentDate);
|
|
|
|
MesSaleOrder virtualSaleOrder = this.insertNewVirtualSaleOrder(materialId, barcodeInfo, mesBaseBarcodeInfo.getSaleorderCode(), mesSaleOrderRelateList, userName, currentDate);
|
|
|
@ -1507,7 +1530,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public long insertNewVirtualMaterial(String barcodeInfo, String materialName,String userName, Date currentDate) {
|
|
|
|
public long insertNewVirtualMaterial(String barcodeInfo, String materialName, String userName, Date currentDate) {
|
|
|
|
//虚拟成品和虚拟原材料用一个物料
|
|
|
|
//虚拟成品和虚拟原材料用一个物料
|
|
|
|
MesBaseMaterialInfo mesBaseMaterialInfo = new MesBaseMaterialInfo();
|
|
|
|
MesBaseMaterialInfo mesBaseMaterialInfo = new MesBaseMaterialInfo();
|
|
|
|
mesBaseMaterialInfo.setMaterialCode(barcodeInfo);
|
|
|
|
mesBaseMaterialInfo.setMaterialCode(barcodeInfo);
|
|
|
@ -1591,7 +1614,6 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
mesMaterialBomMapper.insertMesMaterialBom(virtualMaterialBom);
|
|
|
|
mesMaterialBomMapper.insertMesMaterialBom(virtualMaterialBom);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toUpdatedMaterialBoms.forEach(umb -> {
|
|
|
|
toUpdatedMaterialBoms.forEach(umb -> {
|
|
|
|
MesMaterialBom queryChildBom = new MesMaterialBom();
|
|
|
|
MesMaterialBom queryChildBom = new MesMaterialBom();
|
|
|
|
queryChildBom.setParentId(umb.getMaterialBomId());
|
|
|
|
queryChildBom.setParentId(umb.getMaterialBomId());
|
|
|
@ -1689,13 +1711,13 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
|
|
|
|
|
|
|
|
StringBuilder materialNameBuilder = new StringBuilder();
|
|
|
|
StringBuilder materialNameBuilder = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
|
|
for(MesSaleOrderRelate mesSaleOrderRelate:mesSaleOrderRelateList){
|
|
|
|
for (MesSaleOrderRelate mesSaleOrderRelate : mesSaleOrderRelateList) {
|
|
|
|
String materialName = mesSaleOrderRelate.getMaterialName();
|
|
|
|
String materialName = mesSaleOrderRelate.getMaterialName();
|
|
|
|
materialName = materialName.substring(0,materialNameLength);
|
|
|
|
materialName = materialName.substring(0, materialNameLength);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
materialNameBuilder.append(splitCharacter).append(materialName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter,"");
|
|
|
|
String mergeMaterialName = materialNameBuilder.toString().replaceFirst(splitCharacter, "");
|
|
|
|
mesBaseBarcodeInfo.setAmount(new BigDecimal(mesSaleOrderRelateList.size()));
|
|
|
|
mesBaseBarcodeInfo.setAmount(new BigDecimal(mesSaleOrderRelateList.size()));
|
|
|
|
|
|
|
|
|
|
|
|
//数据库中的合并信息
|
|
|
|
//数据库中的合并信息
|
|
|
@ -1829,7 +1851,7 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
public StringBuilder handleInsertSaleOrderRelates(List<MesSaleOrderRelate> toInsertedSaleOrderRelateList, MesBaseBarcodeInfo baseBarcodeInfo,
|
|
|
|
public StringBuilder handleInsertSaleOrderRelates(List<MesSaleOrderRelate> toInsertedSaleOrderRelateList, MesBaseBarcodeInfo baseBarcodeInfo,
|
|
|
|
MesMaterialBom virtualMaterialBom, String userName, Date currentDate) {
|
|
|
|
MesMaterialBom virtualMaterialBom, String userName, Date currentDate) {
|
|
|
|
StringBuilder errorMsgBuilder = new StringBuilder();
|
|
|
|
StringBuilder errorMsgBuilder = new StringBuilder();
|
|
|
|
if(toInsertedSaleOrderRelateList==null || toInsertedSaleOrderRelateList.isEmpty()){
|
|
|
|
if (toInsertedSaleOrderRelateList == null || toInsertedSaleOrderRelateList.isEmpty()) {
|
|
|
|
return errorMsgBuilder;
|
|
|
|
return errorMsgBuilder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1927,11 +1949,12 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取小包条码信息
|
|
|
|
* 获取小包条码信息
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param mesPrdBarcodeInfo
|
|
|
|
* @param mesPrdBarcodeInfo
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<MesPrdBarcodeInfo> selectMesPrdBarcodeInfoList(MesPrdBarcodeInfo mesPrdBarcodeInfo){
|
|
|
|
public List<MesPrdBarcodeInfo> selectMesPrdBarcodeInfoList(MesPrdBarcodeInfo mesPrdBarcodeInfo) {
|
|
|
|
|
|
|
|
|
|
|
|
return mesPrdBarcodeInfoMapper.selectMesPrdBarcodeInfoList(mesPrdBarcodeInfo);
|
|
|
|
return mesPrdBarcodeInfoMapper.selectMesPrdBarcodeInfoList(mesPrdBarcodeInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|