From 89d2e29779b3ad90e261efd006f9eba78c1e2a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Fri, 27 Mar 2020 00:43:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E4=B8=89=E4=B8=AA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/jsh_erp.sql | 14 +- docs/数据库更新记录-方便升级.txt | 11 +- erp_web/pages/manage/unit.html | 21 +- .../com/jsh/erp/datasource/entities/Unit.java | 118 ++--- .../erp/datasource/entities/UnitExample.java | 307 +++++++---- .../erp/datasource/mappers/UnitMapper.java | 68 +-- src/main/resources/mapper_xml/UnitMapper.xml | 493 +++++++++--------- 7 files changed, 498 insertions(+), 534 deletions(-) diff --git a/docs/jsh_erp.sql b/docs/jsh_erp.sql index d9b74ea2..593ceaf0 100644 --- a/docs/jsh_erp.sql +++ b/docs/jsh_erp.sql @@ -1062,6 +1062,9 @@ DROP TABLE IF EXISTS `jsh_unit`; CREATE TABLE `jsh_unit` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `UName` varchar(50) DEFAULT NULL COMMENT '名称,支持多单位', + `basic_unit` varchar(50) DEFAULT NULL COMMENT '基础单位' , + `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位' , + `ratio` int(11) NULL DEFAULT NULL COMMENT '比例' , `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', PRIMARY KEY (`id`) @@ -1070,13 +1073,10 @@ CREATE TABLE `jsh_unit` ( -- ---------------------------- -- Records of jsh_unit -- ---------------------------- -INSERT INTO `jsh_unit` VALUES ('2', 'kg,包(1:25)', null, '0'); -INSERT INTO `jsh_unit` VALUES ('8', '瓶,箱(1:12)', null, '0'); -INSERT INTO `jsh_unit` VALUES ('11', 'qwe,sed(1:33)', null, '0'); -INSERT INTO `jsh_unit` VALUES ('12', '1,2(1:33)', null, '0'); -INSERT INTO `jsh_unit` VALUES ('13', 'aa,vv(1:22)', '1', '0'); -INSERT INTO `jsh_unit` VALUES ('14', '个,箱(1:12)', '117', '0'); -INSERT INTO `jsh_unit` VALUES ('15', '个,箱(1:12)', '63', '0'); +INSERT INTO `jsh_unit` VALUES ('2', 'kg,包(1:25)', 'kg', '包', '25', NULL, '0'); +INSERT INTO `jsh_unit` VALUES ('8', '瓶,箱(1:12)', '瓶', '箱', '12', NULL, '0'); +INSERT INTO `jsh_unit` VALUES ('14', '个,箱(1:12)', '个', '箱', '12', '117', '0'); +INSERT INTO `jsh_unit` VALUES ('15', '个,箱(1:12)', '个', '箱', '12', '63', '0'); -- ---------------------------- -- Table structure for jsh_user diff --git a/docs/数据库更新记录-方便升级.txt b/docs/数据库更新记录-方便升级.txt index 46430cb9..21c2a0ec 100644 --- a/docs/数据库更新记录-方便升级.txt +++ b/docs/数据库更新记录-方便升级.txt @@ -740,4 +740,13 @@ alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT -- by jishenghua -- ---------------------------- alter table jsh_depothead drop column ProjectId; -alter table jsh_depothead drop column AllocationProjectId; \ No newline at end of file +alter table jsh_depothead drop column AllocationProjectId; + +-- ---------------------------- +-- 给计量单位表增加基础单位、副单位、比例三个字段 +-- 时间 2020-03-24 +-- by jishenghua +-- ---------------------------- +alter table jsh_unit add basic_unit varchar(50) DEFAULT NULL COMMENT '基础单位' after UName; +alter table jsh_unit add other_unit varchar(50) DEFAULT NULL COMMENT '副单位' after basic_unit; +alter table jsh_unit add ratio INT DEFAULT NULL COMMENT '比例' after other_unit; diff --git a/erp_web/pages/manage/unit.html b/erp_web/pages/manage/unit.html index 9b141ce5..b771655c 100644 --- a/erp_web/pages/manage/unit.html +++ b/erp_web/pages/manage/unit.html @@ -348,7 +348,10 @@ dataType: "json", data: ({ info: JSON.stringify({ - uname: name + uname: name, + basicUnit: basicName, + otherUnit: otherName, + ratio: otherNum }) }), success: function(res) { @@ -370,22 +373,14 @@ //编辑信息 function editUnit(index) { var rowsdata = $("#tableData").datagrid("getRows")[index]; - oldUnit = rowsdata.uname; $('#unitDlg').dialog('open').dialog('setTitle', ' 编辑计量单位'); $(".window-mask").css({width: webW, height: webH}); unitID = rowsdata.id; - //焦点在名称输入框==定焦在输入文字后面 - var name = rowsdata.uname; - var basicName = name.substring(0, name.indexOf(",")); //基础单位 - $("#basicName").textbox("setValue", basicName); - var otherItem = name.substring(name.indexOf(",") + 1); - var otherName = otherItem.substring(0, otherItem.indexOf("(")); - $("#otherName").textbox("setValue", otherName); - var lastNum = otherItem.substring(otherItem.indexOf(":") + 1); - lastNum = lastNum.replace(")", ""); - $("#otherNum").textbox("setValue", lastNum); - $("#unitName").text(basicName); + $("#basicName").textbox("setValue", rowsdata.basicUnit); + $("#otherName").textbox("setValue", rowsdata.otherUnit); + $("#otherNum").textbox("setValue", rowsdata.ratio); + $("#unitName").text(rowsdata.basicUnit); url = '/unit/update?id=' + rowsdata.id; } diff --git a/src/main/java/com/jsh/erp/datasource/entities/Unit.java b/src/main/java/com/jsh/erp/datasource/entities/Unit.java index 25cce1c7..75f6121b 100644 --- a/src/main/java/com/jsh/erp/datasource/entities/Unit.java +++ b/src/main/java/com/jsh/erp/datasource/entities/Unit.java @@ -1,130 +1,72 @@ package com.jsh.erp.datasource.entities; public class Unit { - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_unit.id - * - * @mbggenerated - */ private Long id; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_unit.UName - * - * @mbggenerated - */ private String uname; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_unit.tenant_id - * - * @mbggenerated - */ + private String basicUnit; + + private String otherUnit; + + private Integer ratio; + private Long tenantId; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_unit.delete_Flag - * - * @mbggenerated - */ private String deleteFlag; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_unit.id - * - * @return the value of jsh_unit.id - * - * @mbggenerated - */ public Long getId() { return id; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_unit.id - * - * @param id the value for jsh_unit.id - * - * @mbggenerated - */ public void setId(Long id) { this.id = id; } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_unit.UName - * - * @return the value of jsh_unit.UName - * - * @mbggenerated - */ public String getUname() { return uname; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_unit.UName - * - * @param uname the value for jsh_unit.UName - * - * @mbggenerated - */ public void setUname(String uname) { this.uname = uname == null ? null : uname.trim(); } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_unit.tenant_id - * - * @return the value of jsh_unit.tenant_id - * - * @mbggenerated - */ + public String getBasicUnit() { + return basicUnit; + } + + public void setBasicUnit(String basicUnit) { + this.basicUnit = basicUnit == null ? null : basicUnit.trim(); + } + + public String getOtherUnit() { + return otherUnit; + } + + public void setOtherUnit(String otherUnit) { + this.otherUnit = otherUnit == null ? null : otherUnit.trim(); + } + + public Integer getRatio() { + return ratio; + } + + public void setRatio(Integer ratio) { + this.ratio = ratio; + } + public Long getTenantId() { return tenantId; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_unit.tenant_id - * - * @param tenantId the value for jsh_unit.tenant_id - * - * @mbggenerated - */ public void setTenantId(Long tenantId) { this.tenantId = tenantId; } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_unit.delete_Flag - * - * @return the value of jsh_unit.delete_Flag - * - * @mbggenerated - */ public String getDeleteFlag() { return deleteFlag; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_unit.delete_Flag - * - * @param deleteFlag the value for jsh_unit.delete_Flag - * - * @mbggenerated - */ public void setDeleteFlag(String deleteFlag) { this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); } diff --git a/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java b/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java index 89a0c0b0..976bd8bd 100644 --- a/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java +++ b/src/main/java/com/jsh/erp/datasource/entities/UnitExample.java @@ -4,118 +4,46 @@ import java.util.ArrayList; import java.util.List; public class UnitExample { - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_unit - * - * @mbggenerated - */ protected String orderByClause; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_unit - * - * @mbggenerated - */ protected boolean distinct; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_unit - * - * @mbggenerated - */ protected List oredCriteria; - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public UnitExample() { - oredCriteria = new ArrayList(); + oredCriteria = new ArrayList<>(); } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public String getOrderByClause() { return orderByClause; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public void setDistinct(boolean distinct) { this.distinct = distinct; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public boolean isDistinct() { return distinct; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public List getOredCriteria() { return oredCriteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public void or(Criteria criteria) { oredCriteria.add(criteria); } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { @@ -124,41 +52,23 @@ public class UnitExample { return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_unit - * - * @mbggenerated - */ protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); - criteria = new ArrayList(); + criteria = new ArrayList<>(); } public boolean isValid() { @@ -324,6 +234,206 @@ public class UnitExample { return (Criteria) this; } + public Criteria andBasicUnitIsNull() { + addCriterion("basic_unit is null"); + return (Criteria) this; + } + + public Criteria andBasicUnitIsNotNull() { + addCriterion("basic_unit is not null"); + return (Criteria) this; + } + + public Criteria andBasicUnitEqualTo(String value) { + addCriterion("basic_unit =", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitNotEqualTo(String value) { + addCriterion("basic_unit <>", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitGreaterThan(String value) { + addCriterion("basic_unit >", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitGreaterThanOrEqualTo(String value) { + addCriterion("basic_unit >=", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitLessThan(String value) { + addCriterion("basic_unit <", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitLessThanOrEqualTo(String value) { + addCriterion("basic_unit <=", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitLike(String value) { + addCriterion("basic_unit like", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitNotLike(String value) { + addCriterion("basic_unit not like", value, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitIn(List values) { + addCriterion("basic_unit in", values, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitNotIn(List values) { + addCriterion("basic_unit not in", values, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitBetween(String value1, String value2) { + addCriterion("basic_unit between", value1, value2, "basicUnit"); + return (Criteria) this; + } + + public Criteria andBasicUnitNotBetween(String value1, String value2) { + addCriterion("basic_unit not between", value1, value2, "basicUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitIsNull() { + addCriterion("other_unit is null"); + return (Criteria) this; + } + + public Criteria andOtherUnitIsNotNull() { + addCriterion("other_unit is not null"); + return (Criteria) this; + } + + public Criteria andOtherUnitEqualTo(String value) { + addCriterion("other_unit =", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitNotEqualTo(String value) { + addCriterion("other_unit <>", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitGreaterThan(String value) { + addCriterion("other_unit >", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitGreaterThanOrEqualTo(String value) { + addCriterion("other_unit >=", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitLessThan(String value) { + addCriterion("other_unit <", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitLessThanOrEqualTo(String value) { + addCriterion("other_unit <=", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitLike(String value) { + addCriterion("other_unit like", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitNotLike(String value) { + addCriterion("other_unit not like", value, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitIn(List values) { + addCriterion("other_unit in", values, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitNotIn(List values) { + addCriterion("other_unit not in", values, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitBetween(String value1, String value2) { + addCriterion("other_unit between", value1, value2, "otherUnit"); + return (Criteria) this; + } + + public Criteria andOtherUnitNotBetween(String value1, String value2) { + addCriterion("other_unit not between", value1, value2, "otherUnit"); + return (Criteria) this; + } + + public Criteria andRatioIsNull() { + addCriterion("ratio is null"); + return (Criteria) this; + } + + public Criteria andRatioIsNotNull() { + addCriterion("ratio is not null"); + return (Criteria) this; + } + + public Criteria andRatioEqualTo(Integer value) { + addCriterion("ratio =", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotEqualTo(Integer value) { + addCriterion("ratio <>", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThan(Integer value) { + addCriterion("ratio >", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThanOrEqualTo(Integer value) { + addCriterion("ratio >=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThan(Integer value) { + addCriterion("ratio <", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThanOrEqualTo(Integer value) { + addCriterion("ratio <=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioIn(List values) { + addCriterion("ratio in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotIn(List values) { + addCriterion("ratio not in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioBetween(Integer value1, Integer value2) { + addCriterion("ratio between", value1, value2, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotBetween(Integer value1, Integer value2) { + addCriterion("ratio not between", value1, value2, "ratio"); + return (Criteria) this; + } + public Criteria andTenantIdIsNull() { addCriterion("tenant_id is null"); return (Criteria) this; @@ -455,25 +565,12 @@ public class UnitExample { } } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_unit - * - * @mbggenerated do_not_delete_during_merge - */ public static class Criteria extends GeneratedCriteria { - protected Criteria() { super(); } } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_unit - * - * @mbggenerated - */ public static class Criterion { private String condition; diff --git a/src/main/java/com/jsh/erp/datasource/mappers/UnitMapper.java b/src/main/java/com/jsh/erp/datasource/mappers/UnitMapper.java index c75fa61a..83b78138 100644 --- a/src/main/java/com/jsh/erp/datasource/mappers/UnitMapper.java +++ b/src/main/java/com/jsh/erp/datasource/mappers/UnitMapper.java @@ -6,91 +6,25 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface UnitMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ - int countByExample(UnitExample example); + long countByExample(UnitExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int deleteByExample(UnitExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int insert(Unit record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int insertSelective(Unit record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ List selectByExample(UnitExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ Unit selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int updateByExampleSelective(@Param("record") Unit record, @Param("example") UnitExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int updateByExample(@Param("record") Unit record, @Param("example") UnitExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int updateByPrimaryKeySelective(Unit record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_unit - * - * @mbggenerated - */ int updateByPrimaryKey(Unit record); } \ No newline at end of file diff --git a/src/main/resources/mapper_xml/UnitMapper.xml b/src/main/resources/mapper_xml/UnitMapper.xml index 8f6db27d..aa0f2364 100644 --- a/src/main/resources/mapper_xml/UnitMapper.xml +++ b/src/main/resources/mapper_xml/UnitMapper.xml @@ -1,256 +1,243 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - id, UName, tenant_id, delete_Flag - - - - - - delete from jsh_unit - where id = #{id,jdbcType=BIGINT} - - - - delete from jsh_unit - - - - - - - insert into jsh_unit (id, UName, tenant_id, - delete_Flag) - values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, - #{deleteFlag,jdbcType=VARCHAR}) - - - - insert into jsh_unit - - - id, - - - UName, - - - tenant_id, - - - delete_Flag, - - - - - #{id,jdbcType=BIGINT}, - - - #{uname,jdbcType=VARCHAR}, - - - #{tenantId,jdbcType=BIGINT}, - - - #{deleteFlag,jdbcType=VARCHAR}, - - - - - - - update jsh_unit - - - id = #{record.id,jdbcType=BIGINT}, - - - UName = #{record.uname,jdbcType=VARCHAR}, - - - tenant_id = #{record.tenantId,jdbcType=BIGINT}, - - - delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, - - - - - - - - - update jsh_unit - set id = #{record.id,jdbcType=BIGINT}, - UName = #{record.uname,jdbcType=VARCHAR}, - tenant_id = #{record.tenantId,jdbcType=BIGINT}, - delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} - - - - - - - update jsh_unit - - - UName = #{uname,jdbcType=VARCHAR}, - - - tenant_id = #{tenantId,jdbcType=BIGINT}, - - - delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=BIGINT} - - - - update jsh_unit - set UName = #{uname,jdbcType=VARCHAR}, - tenant_id = #{tenantId,jdbcType=BIGINT}, - delete_Flag = #{deleteFlag,jdbcType=VARCHAR} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, UName, basic_unit, other_unit, ratio, tenant_id, delete_Flag + + + + + delete from jsh_unit + where id = #{id,jdbcType=BIGINT} + + + delete from jsh_unit + + + + + + insert into jsh_unit (id, UName, basic_unit, + other_unit, ratio, tenant_id, + delete_Flag) + values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR}, + #{otherUnit,jdbcType=VARCHAR}, #{ratio,jdbcType=INTEGER}, #{tenantId,jdbcType=BIGINT}, + #{deleteFlag,jdbcType=VARCHAR}) + + + insert into jsh_unit + + + id, + + + UName, + + + basic_unit, + + + other_unit, + + + ratio, + + + tenant_id, + + + delete_Flag, + + + + + #{id,jdbcType=BIGINT}, + + + #{uname,jdbcType=VARCHAR}, + + + #{basicUnit,jdbcType=VARCHAR}, + + + #{otherUnit,jdbcType=VARCHAR}, + + + #{ratio,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=BIGINT}, + + + #{deleteFlag,jdbcType=VARCHAR}, + + + + + + update jsh_unit + + + id = #{record.id,jdbcType=BIGINT}, + + + UName = #{record.uname,jdbcType=VARCHAR}, + + + basic_unit = #{record.basicUnit,jdbcType=VARCHAR}, + + + other_unit = #{record.otherUnit,jdbcType=VARCHAR}, + + + ratio = #{record.ratio,jdbcType=INTEGER}, + + + tenant_id = #{record.tenantId,jdbcType=BIGINT}, + + + delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, + + + + + + + + update jsh_unit + set id = #{record.id,jdbcType=BIGINT}, + UName = #{record.uname,jdbcType=VARCHAR}, + basic_unit = #{record.basicUnit,jdbcType=VARCHAR}, + other_unit = #{record.otherUnit,jdbcType=VARCHAR}, + ratio = #{record.ratio,jdbcType=INTEGER}, + tenant_id = #{record.tenantId,jdbcType=BIGINT}, + delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} + + + + + + update jsh_unit + + + UName = #{uname,jdbcType=VARCHAR}, + + + basic_unit = #{basicUnit,jdbcType=VARCHAR}, + + + other_unit = #{otherUnit,jdbcType=VARCHAR}, + + + ratio = #{ratio,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=BIGINT}, + + + delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update jsh_unit + set UName = #{uname,jdbcType=VARCHAR}, + basic_unit = #{basicUnit,jdbcType=VARCHAR}, + other_unit = #{otherUnit,jdbcType=VARCHAR}, + ratio = #{ratio,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=BIGINT}, + delete_Flag = #{deleteFlag,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + \ No newline at end of file