From b4adff68a07b783fc90da1c9370d8be5f383e700 Mon Sep 17 00:00:00 2001 From: 黎星凯 <13949086503@163.com> Date: 星期三, 08 五月 2024 13:46:34 +0800 Subject: [PATCH] 20240528修改: bug41、42、43修改 领用单(分发单),调拨单,流程优化 --- consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 34 insertions(+), 20 deletions(-) diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java index 108c247..ddcf3f4 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/BaseGoodsTemplate_mapper.java @@ -1,5 +1,11 @@ package com.consum.model.po; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +import org.springframework.jdbc.core.RowMapper; + import com.walker.jdbc.BaseMapper; import com.walker.jdbc.ResultSetUtils; import com.walker.jdbc.SqlAndParameters; @@ -7,16 +13,10 @@ 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; -import java.sql.SQLException; -import java.util.Map; /** * 琛ㄥ悕:BASE_GOODS_TEMPLATE * + * * @author genrator */ public class BaseGoodsTemplate_mapper extends BaseGoodsTemplate implements BaseMapper<BaseGoodsTemplate> { @@ -33,6 +33,7 @@ public static final String Classification = "classification"; public static final String States = "states"; public static final String CategoryId = "category_id"; + public static final String CategoryName = "category_name"; public static final String FAgencyId = "f_agency_id"; public static final String SAgencyId = "s_agency_id"; public static final String TAgencyId = "t_agency_id"; @@ -52,11 +53,11 @@ if (baseGoodsTemplate == null) { throw new IllegalArgumentException("po鍙傛暟涓嶅厑璁镐负绌猴紒"); } - //涓婚敭 + // 涓婚敭 if (baseGoodsTemplate.isset_id) { this.setId(baseGoodsTemplate.getId()); } - //鏅�氬睘鎬� + // 鏅�氬睘鎬� if (baseGoodsTemplate.isset_goodsCode) { this.setGoodsCode(baseGoodsTemplate.getGoodsCode()); } @@ -71,6 +72,9 @@ } if (baseGoodsTemplate.isset_categoryId) { this.setCategoryId(baseGoodsTemplate.getCategoryId()); + } + if (baseGoodsTemplate.isset_categoryName) { + this.setCategoryName(baseGoodsTemplate.getCategoryName()); } if (baseGoodsTemplate.isset_fAgencyId) { this.setFAgencyId(baseGoodsTemplate.getFAgencyId()); @@ -116,12 +120,9 @@ public String getTableName_() { String tableName = "base_goods_template"; /** - if (StringUtils.isNotEmpty(this.getDatabaseName_())) { - return this.getDatabaseName_() + "." + tableName; - } else { - return tableName; - } - */ + * if (StringUtils.isNotEmpty(this.getDatabaseName_())) { return this.getDatabaseName_() + "." + tableName; } + * else { return tableName; } + */ return tableName; } @@ -153,6 +154,7 @@ ib.set(Classification, this.getClassification(), this.isset_classification); ib.set(States, this.getStates(), this.isset_states); ib.set(CategoryId, this.getCategoryId(), this.isset_categoryId); + ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName); ib.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ib.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ib.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -178,6 +180,7 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); + ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -204,6 +207,7 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); + ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -229,6 +233,7 @@ ub.set(Classification, this.getClassification(), this.isset_classification); ub.set(States, this.getStates(), this.isset_states); ub.set(CategoryId, this.getCategoryId(), this.isset_categoryId); + ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName); ub.set(FAgencyId, this.getFAgencyId(), this.isset_fAgencyId); ub.set(SAgencyId, this.getSAgencyId(), this.isset_sAgencyId); ub.set(TAgencyId, this.getTAgencyId(), this.isset_tAgencyId); @@ -281,13 +286,15 @@ return sb.genMapSql(); } - /** * 鑾峰彇鏌ヨ璇彞鍜屽弬鏁� */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>( + "select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + + this.getTableName_() + " " + where, + parameters); } /** @@ -295,7 +302,10 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, goods_code, goods_name, classification, states, category_id, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>( + "select id, goods_code, goods_name, classification, states, category_id, category_name, f_agency_id, s_agency_id, t_agency_id, parent_agency_id, agency_level, agency_id, agency_name, create_date, d_time, d_user_id, d_user_name from " + + this.getTableName_() + " " + where, + parameters); } /** @@ -326,12 +336,12 @@ ResultSetUtils resultSetUtils = new ResultSetUtils(); BaseGoodsTemplate base_goods_template = new BaseGoodsTemplate(); Integer columnIndex; - //涓婚敭 + // 涓婚敭 columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.Id); if (columnIndex > 0) { base_goods_template.setId(rs.getLong(columnIndex)); } - //鏅�氬睘鎬� + // 鏅�氬睘鎬� columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.GoodsCode); if (columnIndex > 0) { base_goods_template.setGoodsCode(rs.getString(columnIndex)); @@ -360,6 +370,10 @@ base_goods_template.setCategoryId(rs.getLong(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.CategoryName); + if (columnIndex > 0) { + base_goods_template.setCategoryName(rs.getString(columnIndex)); + } columnIndex = resultSetUtils.findColumn(rs, BaseGoodsTemplate_mapper.FAgencyId); if (columnIndex > 0) { if (rs.getBigDecimal(columnIndex) == null) { -- Gitblit v1.9.1