|
|
|
|
@ -16,14 +16,14 @@ public class DynamicBaseSqlProvider {
|
|
|
|
|
sql.INSERT_INTO(tableName);
|
|
|
|
|
switch (tableNamePrefix) {
|
|
|
|
|
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",
|
|
|
|
|
"import_flag", "class_team_id", "model_code", "create_dept", "create_by", "create_time",
|
|
|
|
|
"product_order_id", "dispatch_code", "process_order", "material_bom_id");
|
|
|
|
|
sql.INTO_VALUES("#{entity.planCode}", "#{entity.materialId}", "#{entity.materialBomVersion}", "#{entity.planAmount}", "#{entity.dispatchAmount}",
|
|
|
|
|
"product_order_id", "dispatch_code", "process_order", "material_bom_id", "recipe_id");
|
|
|
|
|
sql.INTO_VALUES("#{entity.planCode}", "#{entity.materialId}", "#{entity.planAmount}", "#{entity.dispatchAmount}",
|
|
|
|
|
"#{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.productOrderId}", "#{entity.dispatchCode}", "#{entity.processOrder}", "#{entity.materialBomId}");
|
|
|
|
|
"#{entity.productOrderId}", "#{entity.dispatchCode}", "#{entity.processOrder}", "#{entity.materialBomId}", "#{entity.recipeId}");
|
|
|
|
|
break;
|
|
|
|
|
case "prod_product_plan_detail":
|
|
|
|
|
sql.INTO_COLUMNS("plan_detail_code", "plan_id", "plan_code",
|
|
|
|
|
@ -67,6 +67,9 @@ public class DynamicBaseSqlProvider {
|
|
|
|
|
if (hasFieldValue(entity, "materialBomId")) {
|
|
|
|
|
sql.SET("material_bom_id = #{entity.materialBomId}");
|
|
|
|
|
}
|
|
|
|
|
if (hasFieldValue(entity, "recipeId")) {
|
|
|
|
|
sql.SET("recipe_id = #{entity.recipeId}");
|
|
|
|
|
}
|
|
|
|
|
if (hasFieldValue(entity, "processId")) {
|
|
|
|
|
sql.SET("process_id = #{entity.processId}");
|
|
|
|
|
}
|
|
|
|
|
|