mes:物料信息绑定标识改为常备物料标识,完善采购订单绑定
master
xs 7 months ago
parent 6dd27687ca
commit 720682f03c

@ -152,7 +152,7 @@ public class MesBaseBarcodeInfo extends BaseEntity
private String materialSpec;
private String bindFlag;//物料信息中的绑定标识
private String alwaysFlag;//物料信息中的常备物料标识
private String checkStatus;//质检状态
@ -470,12 +470,12 @@ public class MesBaseBarcodeInfo extends BaseEntity
this.materialSpec = materialSpec;
}
public String getBindFlag() {
return bindFlag;
public String getAlwaysFlag() {
return alwaysFlag;
}
public void setBindFlag(String bindFlag) {
this.bindFlag = bindFlag;
public void setAlwaysFlag(String alwaysFlag) {
this.alwaysFlag = alwaysFlag;
}
public String getCheckStatus() {

@ -86,8 +86,8 @@ public class MesBaseMaterialInfo extends BaseEntity
private BigDecimal grossWeight;
/** 绑定标识(1是0否),如果需要绑定,则需要将销售订单绑定具体的采购订单明细 */
@Excel(name = "绑定标识(1是0否),如果需要绑定,则需要将销售订单绑定具体的采购订单明细")
private String bindFlag;
@Excel(name = "常备物料(1是0否),如果不是常备物料,则需要将销售订单绑定具体的采购订单明细")
private String alwaysFlag;
/** 所属工厂关联mes_base_factory_info的factory_id */
@Excel(name = "所属工厂关联mes_base_factory_info的factory_id")
@ -278,12 +278,12 @@ public class MesBaseMaterialInfo extends BaseEntity
return grossWeight;
}
public String getBindFlag() {
return bindFlag;
public String getAlwaysFlag() {
return alwaysFlag;
}
public void setBindFlag(String bindFlag) {
this.bindFlag = bindFlag;
public void setAlwaysFlag(String alwaysFlag) {
this.alwaysFlag = alwaysFlag;
}
public void setFactoryId(Long factoryId)

@ -129,8 +129,8 @@ public class MesConstants {
/**物料信息常备物料标识,是否需要采购订单明细绑定销售订单*/
public static final String MES_MATERIAL_BIND_FLAG_YES = "1";//是
public static final String MES_MATERIAL_BIND_FLAG_NO = "0";//否
public static final String MES_MATERIAL_ALWAYS_FLAG_YES = "1";//是
public static final String MES_MATERIAL_ALWAYS_FLAG_NO = "0";//否
/**物料条码打印标识*/
public static final String MES_BARCODE_PRINT_FLAG_YES = "1";//是

@ -146,14 +146,14 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
if (mesBaseMaterialInfo == null) {
throw new ServiceException("物料信息不存在");
}
if (mesBaseMaterialInfo.getBindFlag() == null) {
if (mesBaseMaterialInfo.getAlwaysFlag() == null) {
throw new ServiceException("请先设置此物料信息[物料编码:" + mesBaseBarcodeInfo.getMaterialCode()
+ ",物料名称:" + mesBaseBarcodeInfo.getMaterialName() + "]的常备物料标识");
}
//如果物料信息为非常备物料,则判断是否有绑定的信息
BigDecimal barcodeAmount = mesBaseBarcodeInfo.getBarcodeAmount();
if (mesBaseMaterialInfo.getBindFlag().equals(MesConstants.MES_MATERIAL_BIND_FLAG_NO)) {
if (!mesBaseMaterialInfo.getAlwaysFlag().equals(MesConstants.MES_MATERIAL_ALWAYS_FLAG_YES)) {
MesOrderBind queryOrderBind = new MesOrderBind();
queryOrderBind.setPurchaseOrderId(purchaseOrderId);
List<MesOrderBind> mesOrderBinds = mesOrderBindMapper.selectMesOrderBindList(queryOrderBind);
@ -511,7 +511,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
printPoNo.setValue(mesBaseBarcodeInfo.getPoNo());
printPoNo.setType(PrintContentVo.TYPE_TEXT);
String printPreMaterialKey = mesBaseBarcodeInfo.getBindFlag() != null && mesBaseBarcodeInfo.getBindFlag().equals(MesConstants.MES_MATERIAL_BIND_FLAG_YES)
//常备物料为安全库存
String printPreMaterialKey = mesBaseBarcodeInfo.getAlwaysFlag() != null && mesBaseBarcodeInfo.getAlwaysFlag().equals(MesConstants.MES_MATERIAL_ALWAYS_FLAG_YES)
? PrintContentVo.RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_YES : PrintContentVo.RAW_MATERIAL_LABEL_KEY_PRE_MATERIAL_NO;
printPreMaterial.setKey(printPreMaterialKey);
printPreMaterial.setType(PrintContentVo.TYPE_CHECKBOX);

@ -122,13 +122,13 @@ public class MesPurchaseOrderServiceImpl implements IMesPurchaseOrderService {
if (mesBaseMaterialInfo == null) {
throw new ServiceException("物料信息不存在");
}
String bindFlag = mesBaseMaterialInfo.getBindFlag();
if (bindFlag == null) {
throw new ServiceException("请先设置物料信息的绑定标识");
String alwaysFlag = mesBaseMaterialInfo.getAlwaysFlag();
if (alwaysFlag == null) {
throw new ServiceException("请先设置物料信息是否为常备物料");
}
if (!bindFlag.equals(MesConstants.MES_MATERIAL_BIND_FLAG_YES)) {
throw new ServiceException("此物料绑定标识为否,不需要绑定");
if (alwaysFlag.equals(MesConstants.MES_MATERIAL_ALWAYS_FLAG_YES)) {
throw new ServiceException("此物料为常备物料,不需要绑定");
}
Long purchaseOrderId = mesPurchaseOrder.getPurchaseOrderId();

Loading…
Cancel
Save