工步调配原料功能

mes-uat-changshu0609^2
jason 2 weeks ago
parent 1b22d0a8bc
commit 56e9bc09e2

@ -136,7 +136,7 @@ public class MesFunctionDialogInputRawMixWeightService extends BaseSwsService im
List<MesProductionAssemblyContext> productionAssemblyContextList = prodRuleContext.getAssemblyDataContext(workCenter);
for (MesProductionAssemblyContext productionAssemblyContext : productionAssemblyContextList) {
if (StringUtils.isEmpty(productionAssemblyContext.getIsCheckedRawMix()) && Objects.equals(productionAssemblyContext.getAssemblyStatus(), MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_10.getValue())) {
double remainQty = getRemainQty(organizeCode, productionAssemblyContext.getAssemblyPartNo());
double remainQty = getRemainQty(organizeCode, productionAssemblyContext.getAssemblyPartNo(), productionAssemblyContext.getAssemblySn());
if (rawWeight > remainQty) {
productionAssemblyContext.setIsCheckedRawMix(null);
productionAssemblyContext.setAssemblyStatus(MesExtEnumUtil.ASSEMBLY_STATUS.ASSEMBLY_STATUS_30.getValue());
@ -233,9 +233,10 @@ public class MesFunctionDialogInputRawMixWeightService extends BaseSwsService im
return true;
}
private double getRemainQty(String organizeCode, String partNo) {
private double getRemainQty(String organizeCode, String partNo, String barcode) {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(organizeCode);
DdlPreparedPack.getStringEqualPack(partNo, "partNo", ddlPackBean);
DdlPreparedPack.getStringEqualPack(barcode, "barCode", ddlPackBean);
DdlPreparedPack.getOrderBy("createDatetime", CommonEnumUtil.ASC_OR_DESC.DESC.getValue(), ddlPackBean);
MesRawSnWeightRecord record = rawSnWeightRecordRDao.getByProperty(ddlPackBean);
if (record != null) {

Loading…
Cancel
Save