update add密炼生产计划

master
yinq 3 days ago
parent 1da704861c
commit 31f0e6af49

@ -16,14 +16,14 @@ public class DynamicBaseSqlProvider {
sql.INSERT_INTO(tableName); sql.INSERT_INTO(tableName);
switch (tableNamePrefix) { switch (tableNamePrefix) {
case "prod_plan_info": case "prod_plan_info":
sql.INTO_COLUMNS("plan_code", "material_id", "material_bom_version", "plan_amount", "dispatch_amount", sql.INTO_COLUMNS("plan_code", "material_id", "plan_amount", "dispatch_amount",
"process_id", "plan_begin_time", "plan_end_time", "release_type", "release_id", "shift_id", "process_id", "plan_begin_time", "plan_end_time", "release_type", "release_id", "shift_id",
"import_flag", "class_team_id", "model_code", "create_dept", "create_by", "create_time", "import_flag", "class_team_id", "model_code", "create_dept", "create_by", "create_time",
"product_order_id", "dispatch_code", "process_order", "material_bom_id"); "product_order_id", "dispatch_code", "process_order", "material_bom_id", "recipe_id");
sql.INTO_VALUES("#{entity.planCode}", "#{entity.materialId}", "#{entity.materialBomVersion}", "#{entity.planAmount}", "#{entity.dispatchAmount}", sql.INTO_VALUES("#{entity.planCode}", "#{entity.materialId}", "#{entity.planAmount}", "#{entity.dispatchAmount}",
"#{entity.processId}", "#{entity.planBeginTime}", "#{entity.planEndTime}", "#{entity.releaseType}", "#{entity.releaseId}", "#{entity.shiftId}", "#{entity.processId}", "#{entity.planBeginTime}", "#{entity.planEndTime}", "#{entity.releaseType}", "#{entity.releaseId}", "#{entity.shiftId}",
"#{entity.importFlag}", "#{entity.classTeamId}", "#{entity.modelCode}", "#{entity.createDept}", "#{entity.createBy}", "#{entity.createTime}", "#{entity.importFlag}", "#{entity.classTeamId}", "#{entity.modelCode}", "#{entity.createDept}", "#{entity.createBy}", "#{entity.createTime}",
"#{entity.productOrderId}", "#{entity.dispatchCode}", "#{entity.processOrder}", "#{entity.materialBomId}"); "#{entity.productOrderId}", "#{entity.dispatchCode}", "#{entity.processOrder}", "#{entity.materialBomId}", "#{entity.recipeId}");
break; break;
case "prod_product_plan_detail": case "prod_product_plan_detail":
sql.INTO_COLUMNS("plan_detail_code", "plan_id", "plan_code", sql.INTO_COLUMNS("plan_detail_code", "plan_id", "plan_code",
@ -67,6 +67,9 @@ public class DynamicBaseSqlProvider {
if (hasFieldValue(entity, "materialBomId")) { if (hasFieldValue(entity, "materialBomId")) {
sql.SET("material_bom_id = #{entity.materialBomId}"); sql.SET("material_bom_id = #{entity.materialBomId}");
} }
if (hasFieldValue(entity, "recipeId")) {
sql.SET("recipe_id = #{entity.recipeId}");
}
if (hasFieldValue(entity, "processId")) { if (hasFieldValue(entity, "processId")) {
sql.SET("process_id = #{entity.processId}"); sql.SET("process_id = #{entity.processId}");
} }

@ -71,6 +71,11 @@ public class ProdPlanInfo extends TenantEntity {
*/ */
private String materialBomVersion; private String materialBomVersion;
/**
* ID
*/
private Long recipeId;
/** /**
* ID * ID
*/ */

@ -71,9 +71,12 @@ public class ProdPlanInfoBo extends BaseEntity {
/** /**
* bom * bom
*/ */
@NotNull(message = "物料BOM版本不能为空", groups = { AddGroup.class, EditGroup.class })
private String materialBomVersion; private String materialBomVersion;
/**
* ID
*/
private Long recipeId;
/** /**
* ID * ID

@ -88,6 +88,12 @@ public class ProdPlanInfoVo implements Serializable {
*/ */
private String materialBomVersion; private String materialBomVersion;
/**
* ID
*/
@ExcelProperty(value = "配方ID")
private Long recipeId;
/** /**
* ID * ID
*/ */

@ -130,6 +130,7 @@ public class ProdBaseProcessInfoServiceImpl implements IProdBaseProcessInfoServi
.like(StringUtils.isNotBlank(bo.getProcessName()), ProdBaseProcessInfo::getProcessName, bo.getProcessName()) .like(StringUtils.isNotBlank(bo.getProcessName()), ProdBaseProcessInfo::getProcessName, bo.getProcessName())
.eq(StringUtils.isNotBlank(bo.getProcessType()), ProdBaseProcessInfo::getProcessType, bo.getProcessType()) .eq(StringUtils.isNotBlank(bo.getProcessType()), ProdBaseProcessInfo::getProcessType, bo.getProcessType())
.eq(bo.getProcessQueue() != null, ProdBaseProcessInfo::getProcessQueue, bo.getProcessQueue()) .eq(bo.getProcessQueue() != null, ProdBaseProcessInfo::getProcessQueue, bo.getProcessQueue())
.eq(bo.getWorkshopId() != null, ProdBaseProcessInfo::getWorkshopId, bo.getWorkshopId())
.eq(bo.getProductionTime() != null, ProdBaseProcessInfo::getProductionTime, bo.getProductionTime()) .eq(bo.getProductionTime() != null, ProdBaseProcessInfo::getProductionTime, bo.getProductionTime())
.eq(StringUtils.isNotBlank(bo.getActiveFlag()), ProdBaseProcessInfo::getActiveFlag, bo.getActiveFlag()) .eq(StringUtils.isNotBlank(bo.getActiveFlag()), ProdBaseProcessInfo::getActiveFlag, bo.getActiveFlag())
.orderByAsc(ProdBaseProcessInfo::getProcessQueue); .orderByAsc(ProdBaseProcessInfo::getProcessQueue);

@ -132,6 +132,7 @@ public class ProdPlanInfoServiceImpl implements IProdPlanInfoService {
.eq(StringUtils.isNotBlank(bo.getDispatchCode()), ProdPlanInfo::getDispatchCode, bo.getDispatchCode()) .eq(StringUtils.isNotBlank(bo.getDispatchCode()), ProdPlanInfo::getDispatchCode, bo.getDispatchCode())
.eq(bo.getMaterialId() != null, ProdPlanInfo::getMaterialId, bo.getMaterialId()) .eq(bo.getMaterialId() != null, ProdPlanInfo::getMaterialId, bo.getMaterialId())
.eq(bo.getMaterialBomId() != null, ProdPlanInfo::getMaterialBomId, bo.getMaterialBomId()) .eq(bo.getMaterialBomId() != null, ProdPlanInfo::getMaterialBomId, bo.getMaterialBomId())
.eq(bo.getRecipeId() != null, ProdPlanInfo::getRecipeId, bo.getRecipeId())
.eq(bo.getProcessId() != null, ProdPlanInfo::getProcessId, bo.getProcessId()) .eq(bo.getProcessId() != null, ProdPlanInfo::getProcessId, bo.getProcessId())
.eq(bo.getProcessOrder() != null, ProdPlanInfo::getProcessOrder, bo.getProcessOrder()) .eq(bo.getProcessOrder() != null, ProdPlanInfo::getProcessOrder, bo.getProcessOrder())
.eq(bo.getLastProcessId() != null, ProdPlanInfo::getLastProcessId, bo.getLastProcessId()) .eq(bo.getLastProcessId() != null, ProdPlanInfo::getLastProcessId, bo.getLastProcessId())
@ -676,6 +677,7 @@ public class ProdPlanInfoServiceImpl implements IProdPlanInfoService {
.eq(StringUtils.isNotBlank(bo.getDispatchCode()), ProdPlanInfo::getDispatchCode, bo.getDispatchCode()) .eq(StringUtils.isNotBlank(bo.getDispatchCode()), ProdPlanInfo::getDispatchCode, bo.getDispatchCode())
.eq(bo.getMaterialId() != null, ProdPlanInfo::getMaterialId, bo.getMaterialId()) .eq(bo.getMaterialId() != null, ProdPlanInfo::getMaterialId, bo.getMaterialId())
.eq(bo.getMaterialBomId() != null, ProdPlanInfo::getMaterialBomId, bo.getMaterialBomId()) .eq(bo.getMaterialBomId() != null, ProdPlanInfo::getMaterialBomId, bo.getMaterialBomId())
.eq(bo.getRecipeId() != null, ProdPlanInfo::getRecipeId, bo.getRecipeId())
.eq(bo.getProcessId() != null, ProdPlanInfo::getProcessId, bo.getProcessId()) .eq(bo.getProcessId() != null, ProdPlanInfo::getProcessId, bo.getProcessId())
.eq(bo.getProcessOrder() != null, ProdPlanInfo::getProcessOrder, bo.getProcessOrder()) .eq(bo.getProcessOrder() != null, ProdPlanInfo::getProcessOrder, bo.getProcessOrder())
.eq(bo.getLastProcessId() != null, ProdPlanInfo::getLastProcessId, bo.getLastProcessId()) .eq(bo.getLastProcessId() != null, ProdPlanInfo::getLastProcessId, bo.getLastProcessId())

Loading…
Cancel
Save