From 3836720e3b0fc9ab884d178e0ac27e942b175da2 Mon Sep 17 00:00:00 2001 From: futian.liu <liufutianyoo@163.com> Date: 星期二, 05 十二月 2023 15:23:01 +0800 Subject: [PATCH] 报废单添加金额字段 --- consum-model-pojo/src/main/java/com/consum/model/po/LWhFormScrappedGoods_mapper.java | 33 ++++++++++++++++++++++++--------- 1 files changed, 24 insertions(+), 9 deletions(-) diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormScrappedGoods_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormScrappedGoods_mapper.java index e877fcc..f177d47 100644 --- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormScrappedGoods_mapper.java +++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhFormScrappedGoods_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,13 +13,6 @@ 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; /** * 琛ㄥ悕:L_WH_FORM_SCRAPPED_GOODS * @@ -41,6 +40,7 @@ public static final String TransBusinessId = "trans_business_id"; public static final String UserName = "user_name"; public static final String Sort = "sort"; + public static final String TotalAmount = "total_amount"; /** * 榛樿鏋勯�犲嚱鏁� @@ -92,6 +92,9 @@ } if (lWhFormScrappedGoods.isset_sort) { this.setSort(lWhFormScrappedGoods.getSort()); + } + if (lWhFormScrappedGoods.isset_totalAmount) { + this.setTotalAmount(lWhFormScrappedGoods.getTotalAmount()); } // 鍘绘帀锛�2022-09-07 // this.setDatabaseName_(l_wh_form_scrapped_goods.getDatabaseName_()); @@ -149,6 +152,7 @@ ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); ib.set(UserName, this.getUserName(), this.isset_userName); ib.set(Sort, this.getSort(), this.isset_sort); + ib.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); return ib.genMapSql(); } @@ -171,6 +175,7 @@ ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); ub.set(UserName, this.getUserName(), this.isset_userName); ub.set(Sort, this.getSort(), this.isset_sort); + ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); ub.where(this.getPkName_(), this.getPkValue_()); return ub.genMapSql(); } @@ -194,6 +199,7 @@ ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); ub.set(UserName, this.getUserName(), this.isset_userName); ub.set(Sort, this.getSort(), this.isset_sort); + ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); return ub.genMapSql(where, parameters); } @@ -216,6 +222,7 @@ ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId); ub.set(UserName, this.getUserName(), this.isset_userName); ub.set(Sort, this.getSort(), this.isset_sort); + ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount); return ub.genArraySql(where, parameters); } @@ -263,7 +270,7 @@ */ @Override public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) { - return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort, total_amount from " + this.getTableName_() + " " + where, parameters); } /** @@ -271,7 +278,7 @@ */ @Override public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) { - return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort from " + this.getTableName_() + " " + where, parameters); + return new SqlAndParameters<>("select id, counts, scrapped_code, scrapped_name, beiz, form_scrapped_id, base_goods_template_id, goods_template_name, unit, base_goods_models_id, base_goods_models_name, trans_business_id, user_name, sort, total_amount from " + this.getTableName_() + " " + where, parameters); } /** @@ -384,6 +391,14 @@ l_wh_form_scrapped_goods.setSort(rs.getLong(columnIndex)); } } + columnIndex = resultSetUtils.findColumn(rs, LWhFormScrappedGoods_mapper.TotalAmount); + if (columnIndex > 0) { + if (rs.getBigDecimal(columnIndex) == null) { + l_wh_form_scrapped_goods.setTotalAmount(null); + } else { + l_wh_form_scrapped_goods.setTotalAmount(rs.getInt(columnIndex)); + } + } return l_wh_form_scrapped_goods; } } -- Gitblit v1.9.1