Browse Source

工具的表格字段active字段添加默认值

master
DouDou 1 year ago
parent
commit
c2ce3b521b
  1. 2
      src/main/java/com/spring/modules/Tooling/dao/impl/ToolDaoImpl.java
  2. 9
      src/main/java/com/spring/modules/Tooling/entity/IfsTool.java
  3. 1
      src/main/java/com/spring/modules/Tooling/service/impl/ToolServiceImpl.java

2
src/main/java/com/spring/modules/Tooling/dao/impl/ToolDaoImpl.java

@ -145,9 +145,11 @@ public class ToolDaoImpl implements ToolDao {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.append("INSERT INTO tool_header(site, tool_id, tool_description, c_tool_type, c_calendar_id, c_sched_capacity,"); sql.append("INSERT INTO tool_header(site, tool_id, tool_description, c_tool_type, c_calendar_id, c_sched_capacity,");
sql.append(" c_calibration_control, c_calibration_time, c_alternate_tool_id, c_last_used, c_enabled_for_control_plan_db, c_note_text,"); sql.append(" c_calibration_control, c_calibration_time, c_alternate_tool_id, c_last_used, c_enabled_for_control_plan_db, c_note_text,");
sql.append(" active,"); //2024-11-21新增字段
sql.append(" created_by, create_date, c_state, c_property_no, ifs_row_id, ifs_row_version)"); sql.append(" created_by, create_date, c_state, c_property_no, ifs_row_id, ifs_row_version)");
sql.append("VALUES(:site, :toolId, :toolDesc, :toolType, :calendarId, :schedCapacity,"); sql.append("VALUES(:site, :toolId, :toolDesc, :toolType, :calendarId, :schedCapacity,");
sql.append(" :calibrationControl, :calibrationTime, :alternateToolId, :lastUsed, :enabledForControlPlanDb, :noteText,"); sql.append(" :calibrationControl, :calibrationTime, :alternateToolId, :lastUsed, :enabledForControlPlanDb, :noteText,");
sql.append(" :active,"); //2024-11-21新增字段
sql.append(" :username, :createDate, :state, :propertyNo, :ifsRowId, :ifsRowVersion)"); sql.append(" :username, :createDate, :state, :propertyNo, :ifsRowId, :ifsRowVersion)");
parameterJdbcTemplate.update(sql.toString(), new BeanPropertySqlParameterSource(inData)); parameterJdbcTemplate.update(sql.toString(), new BeanPropertySqlParameterSource(inData));
} }

9
src/main/java/com/spring/modules/Tooling/entity/IfsTool.java

@ -25,6 +25,7 @@ public class IfsTool extends PageData {
private String state; private String state;
private String propertyNo; private String propertyNo;
private Date updatedDate; private Date updatedDate;
private String active;//2024-11-21 新增的字段
public IfsTool() { public IfsTool() {
} }
@ -189,4 +190,12 @@ public class IfsTool extends PageData {
public void setUpdatedDate(Date updatedDate) { public void setUpdatedDate(Date updatedDate) {
this.updatedDate = updatedDate; this.updatedDate = updatedDate;
} }
public String getActive() {
return active;
}
public void setActive(String active) {
this.active = active;
}
} }

1
src/main/java/com/spring/modules/Tooling/service/impl/ToolServiceImpl.java

@ -119,6 +119,7 @@ public class ToolServiceImpl implements ToolService {
String resultMsg = String.valueOf(resultMap.get("result_msg")); String resultMsg = String.valueOf(resultMap.get("result_msg"));
throw new RuntimeException(resultMsg); throw new RuntimeException(resultMsg);
} }
inData.setActive("Y");
inData.setState("Active"); inData.setState("Active");
inData.setCreateDate(new Date()); inData.setCreateDate(new Date());
//3.校验是否需要插入属性模版的数据 //3.校验是否需要插入属性模版的数据

Loading…
Cancel
Save