| | |
| | | import com.walker.jdbc.sqlgen.InsertBuilder; |
| | | import com.walker.jdbc.sqlgen.SelectBuilder; |
| | | import com.walker.jdbc.sqlgen.UpdateBuilder; |
| | | import com.walker.jdbc.util.StringUtils; |
| | | |
| | | import org.springframework.jdbc.core.RowMapper; |
| | | |
| | | import java.sql.ResultSet; |
| | |
| | | public static final String Id = "id"; |
| | | // 普通属性 |
| | | public static final String InWarehouseFormId = "in_warehouse_form_id"; |
| | | public static final String InWarehouseFlowId = "in_warehouse_flow_id"; |
| | | public static final String OutWarehouseFlowId = "out_warehouse_flow_id"; |
| | | public static final String OutWarehouseFormId = "out_warehouse_form_id"; |
| | | public static final String BusinessType = "business_type"; |
| | | public static final String BusinessFormCode = "business_form_code"; |
| | |
| | | //普通属性 |
| | | if (lWhFormTransfer.isset_inWarehouseFormId) { |
| | | this.setInWarehouseFormId(lWhFormTransfer.getInWarehouseFormId()); |
| | | } |
| | | if (lWhFormTransfer.isset_inWarehouseFlowId) { |
| | | this.setInWarehouseFlowId(lWhFormTransfer.getInWarehouseFlowId()); |
| | | } |
| | | if (lWhFormTransfer.isset_outWarehouseFlowId) { |
| | | this.setOutWarehouseFlowId(lWhFormTransfer.getOutWarehouseFlowId()); |
| | | } |
| | | if (lWhFormTransfer.isset_outWarehouseFormId) { |
| | | this.setOutWarehouseFormId(lWhFormTransfer.getOutWarehouseFormId()); |
| | |
| | | InsertBuilder ib = new InsertBuilder(this.getTableName_()); |
| | | ib.set(Id, this.getId()); |
| | | ib.set(InWarehouseFormId, this.getInWarehouseFormId(), this.isset_inWarehouseFormId); |
| | | ib.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); |
| | | ib.set(OutWarehouseFlowId, this.getOutWarehouseFlowId(), this.isset_outWarehouseFlowId); |
| | | ib.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); |
| | | ib.set(BusinessType, this.getBusinessType(), this.isset_businessType); |
| | | ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_() { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(InWarehouseFormId, this.getInWarehouseFormId(), this.isset_inWarehouseFormId); |
| | | ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); |
| | | ub.set(OutWarehouseFlowId, this.getOutWarehouseFlowId(), this.isset_outWarehouseFlowId); |
| | | ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); |
| | | ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | |
| | | public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(InWarehouseFormId, this.getInWarehouseFormId(), this.isset_inWarehouseFormId); |
| | | ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); |
| | | ub.set(OutWarehouseFlowId, this.getOutWarehouseFlowId(), this.isset_outWarehouseFlowId); |
| | | ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); |
| | | ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | |
| | | public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) { |
| | | UpdateBuilder ub = new UpdateBuilder(this.getTableName_()); |
| | | ub.set(InWarehouseFormId, this.getInWarehouseFormId(), this.isset_inWarehouseFormId); |
| | | ub.set(InWarehouseFlowId, this.getInWarehouseFlowId(), this.isset_inWarehouseFlowId); |
| | | ub.set(OutWarehouseFlowId, this.getOutWarehouseFlowId(), this.isset_outWarehouseFlowId); |
| | | ub.set(OutWarehouseFormId, this.getOutWarehouseFormId(), this.isset_outWarehouseFormId); |
| | | ub.set(BusinessType, this.getBusinessType(), this.isset_businessType); |
| | | ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode); |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { |
| | | return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, in_warehouse_form_id, in_warehouse_flow_id, out_warehouse_flow_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { |
| | | return new SqlAndParameters<>("select id, in_warehouse_form_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); |
| | | return new SqlAndParameters<>("select id, in_warehouse_form_id, in_warehouse_flow_id, out_warehouse_flow_id, out_warehouse_form_id, business_type, business_form_code, in_warehouse_type, in_warehouse_id, in_warehouse_name, out_warehouse_type, out_warehouse_id, out_warehouse_name, in_agency_id, in_agency_name, out_agency_id, out_agency_name, operator_id, operator_name, create_time, states, in_operator_id, in_operator_name, in_time, out_operator_id, out_operator_name, output_time, beiz1, beiz2, beiz3, procure_doc from " + this.getTableName_() + " " + where, parameters); |
| | | } |
| | | |
| | | /** |
| | |
| | | l_wh_form_transfer.setInWarehouseFormId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.InWarehouseFlowId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_form_transfer.setInWarehouseFlowId(null); |
| | | } else { |
| | | l_wh_form_transfer.setInWarehouseFlowId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.OutWarehouseFlowId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |
| | | l_wh_form_transfer.setOutWarehouseFlowId(null); |
| | | } else { |
| | | l_wh_form_transfer.setOutWarehouseFlowId(rs.getLong(columnIndex)); |
| | | } |
| | | } |
| | | columnIndex = resultSetUtils.findColumn(rs, LWhFormTransfer_mapper.OutWarehouseFormId); |
| | | if (columnIndex > 0) { |
| | | if (rs.getBigDecimal(columnIndex) == null) { |