给计量单位表增加三个字段

This commit is contained in:
季圣华
2020-03-27 00:43:31 +08:00
parent f1fba5f705
commit 89d2e29779
7 changed files with 498 additions and 534 deletions

View File

@@ -1062,6 +1062,9 @@ DROP TABLE IF EXISTS `jsh_unit`;
CREATE TABLE `jsh_unit` ( CREATE TABLE `jsh_unit` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键', `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`UName` varchar(50) DEFAULT NULL 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', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
`delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除', `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记0未删除1删除',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
@@ -1070,13 +1073,10 @@ CREATE TABLE `jsh_unit` (
-- ---------------------------- -- ----------------------------
-- Records of jsh_unit -- Records of jsh_unit
-- ---------------------------- -- ----------------------------
INSERT INTO `jsh_unit` VALUES ('2', 'kg,包(1:25)', null, '0'); INSERT INTO `jsh_unit` VALUES ('2', 'kg,包(1:25)', 'kg', '', '25', NULL, '0');
INSERT INTO `jsh_unit` VALUES ('8', '瓶,箱(1:12)', null, '0'); INSERT INTO `jsh_unit` VALUES ('8', '瓶,箱(1:12)', '', '', '12', NULL, '0');
INSERT INTO `jsh_unit` VALUES ('11', 'qwe,sed(1:33)', null, '0'); INSERT INTO `jsh_unit` VALUES ('14', '个,箱(1:12)', '', '', '12', '117', '0');
INSERT INTO `jsh_unit` VALUES ('12', '1,2(1:33)', null, '0'); INSERT INTO `jsh_unit` VALUES ('15', '个,箱(1:12)', '', '', '12', '63', '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');
-- ---------------------------- -- ----------------------------
-- Table structure for jsh_user -- Table structure for jsh_user

View File

@@ -741,3 +741,12 @@ alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT
-- ---------------------------- -- ----------------------------
alter table jsh_depothead drop column ProjectId; alter table jsh_depothead drop column ProjectId;
alter table jsh_depothead drop column AllocationProjectId; 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;

View File

@@ -348,7 +348,10 @@
dataType: "json", dataType: "json",
data: ({ data: ({
info: JSON.stringify({ info: JSON.stringify({
uname: name uname: name,
basicUnit: basicName,
otherUnit: otherName,
ratio: otherNum
}) })
}), }),
success: function(res) { success: function(res) {
@@ -370,22 +373,14 @@
//编辑信息 //编辑信息
function editUnit(index) { function editUnit(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index]; var rowsdata = $("#tableData").datagrid("getRows")[index];
oldUnit = rowsdata.uname; oldUnit = rowsdata.uname;
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑计量单位'); $('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑计量单位');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
unitID = rowsdata.id; unitID = rowsdata.id;
//焦点在名称输入框==定焦在输入文字后面 $("#basicName").textbox("setValue", rowsdata.basicUnit);
var name = rowsdata.uname; $("#otherName").textbox("setValue", rowsdata.otherUnit);
var basicName = name.substring(0, name.indexOf(",")); //基础单位 $("#otherNum").textbox("setValue", rowsdata.ratio);
$("#basicName").textbox("setValue", basicName); $("#unitName").text(rowsdata.basicUnit);
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);
url = '/unit/update?id=' + rowsdata.id; url = '/unit/update?id=' + rowsdata.id;
} }

View File

@@ -1,130 +1,72 @@
package com.jsh.erp.datasource.entities; package com.jsh.erp.datasource.entities;
public class Unit { public class Unit {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_unit.id
*
* @mbggenerated
*/
private Long id; private Long id;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_unit.UName
*
* @mbggenerated
*/
private String uname; private String uname;
/** private String basicUnit;
* This field was generated by MyBatis Generator.
* This field corresponds to the database column jsh_unit.tenant_id private String otherUnit;
*
* @mbggenerated private Integer ratio;
*/
private Long tenantId; 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; 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() { public Long getId() {
return id; 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) { public void setId(Long id) {
this.id = 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() { public String getUname() {
return uname; 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) { public void setUname(String uname) {
this.uname = uname == null ? null : uname.trim(); this.uname = uname == null ? null : uname.trim();
} }
/** public String getBasicUnit() {
* This method was generated by MyBatis Generator. return basicUnit;
* This method returns the value of the database column jsh_unit.tenant_id }
*
* @return the value of jsh_unit.tenant_id public void setBasicUnit(String basicUnit) {
* this.basicUnit = basicUnit == null ? null : basicUnit.trim();
* @mbggenerated }
*/
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() { public Long getTenantId() {
return tenantId; 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) { public void setTenantId(Long tenantId) {
this.tenantId = 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() { public String getDeleteFlag() {
return deleteFlag; 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) { public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
} }

View File

@@ -4,118 +4,46 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
public class UnitExample { public class UnitExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_unit
*
* @mbggenerated
*/
protected String orderByClause; protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_unit
*
* @mbggenerated
*/
protected boolean distinct; protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table jsh_unit
*
* @mbggenerated
*/
protected List<Criteria> oredCriteria; protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public UnitExample() { public UnitExample() {
oredCriteria = new ArrayList<Criteria>(); 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) { public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause; this.orderByClause = orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public String getOrderByClause() { public String getOrderByClause() {
return orderByClause; return orderByClause;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public void setDistinct(boolean distinct) { public void setDistinct(boolean distinct) {
this.distinct = distinct; this.distinct = distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public boolean isDistinct() { public boolean isDistinct() {
return distinct; return distinct;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public List<Criteria> getOredCriteria() { public List<Criteria> getOredCriteria() {
return oredCriteria; return oredCriteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public void or(Criteria criteria) { public void or(Criteria criteria) {
oredCriteria.add(criteria); oredCriteria.add(criteria);
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public Criteria or() { public Criteria or() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria); oredCriteria.add(criteria);
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public Criteria createCriteria() { public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal(); Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) { if (oredCriteria.size() == 0) {
@@ -124,41 +52,23 @@ public class UnitExample {
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
protected Criteria createCriteriaInternal() { protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
return criteria; return criteria;
} }
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public void clear() { public void clear() {
oredCriteria.clear(); oredCriteria.clear();
orderByClause = null; orderByClause = null;
distinct = false; 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 abstract static class GeneratedCriteria {
protected List<Criterion> criteria; protected List<Criterion> criteria;
protected GeneratedCriteria() { protected GeneratedCriteria() {
super(); super();
criteria = new ArrayList<Criterion>(); criteria = new ArrayList<>();
} }
public boolean isValid() { public boolean isValid() {
@@ -324,6 +234,206 @@ public class UnitExample {
return (Criteria) this; 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<String> values) {
addCriterion("basic_unit in", values, "basicUnit");
return (Criteria) this;
}
public Criteria andBasicUnitNotIn(List<String> 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<String> values) {
addCriterion("other_unit in", values, "otherUnit");
return (Criteria) this;
}
public Criteria andOtherUnitNotIn(List<String> 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<Integer> values) {
addCriterion("ratio in", values, "ratio");
return (Criteria) this;
}
public Criteria andRatioNotIn(List<Integer> 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() { public Criteria andTenantIdIsNull() {
addCriterion("tenant_id is null"); addCriterion("tenant_id is null");
return (Criteria) this; 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 { public static class Criteria extends GeneratedCriteria {
protected Criteria() { protected Criteria() {
super(); super();
} }
} }
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table jsh_unit
*
* @mbggenerated
*/
public static class Criterion { public static class Criterion {
private String condition; private String condition;

View File

@@ -6,91 +6,25 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface UnitMapper { public interface UnitMapper {
/** long countByExample(UnitExample example);
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
int countByExample(UnitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
int deleteByExample(UnitExample example); 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); 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); 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); int insertSelective(Unit record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
List<Unit> selectByExample(UnitExample example); List<Unit> selectByExample(UnitExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table jsh_unit
*
* @mbggenerated
*/
Unit selectByPrimaryKey(Long id); 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); 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); 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); 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); int updateByPrimaryKey(Unit record);
} }

View File

@@ -2,20 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.UnitMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.UnitMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Unit"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="UName" jdbcType="VARCHAR" property="uname" /> <result column="UName" jdbcType="VARCHAR" property="uname" />
<result column="basic_unit" jdbcType="VARCHAR" property="basicUnit" />
<result column="other_unit" jdbcType="VARCHAR" property="otherUnit" />
<result column="ratio" jdbcType="INTEGER" property="ratio" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
@@ -45,10 +40,6 @@
</where> </where>
</sql> </sql>
<sql id="Update_By_Example_Where_Clause"> <sql id="Update_By_Example_Where_Clause">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where> <where>
<foreach collection="example.oredCriteria" item="criteria" separator="or"> <foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid"> <if test="criteria.valid">
@@ -78,17 +69,9 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
<!-- id, UName, basic_unit, other_unit, ratio, tenant_id, delete_Flag
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, UName, tenant_id, delete_Flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select select
<if test="distinct"> <if test="distinct">
distinct distinct
@@ -103,48 +86,30 @@
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_unit from jsh_unit
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_unit delete from jsh_unit
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_unit delete from jsh_unit
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit">
<!-- insert into jsh_unit (id, UName, basic_unit,
WARNING - @mbggenerated other_unit, ratio, tenant_id,
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit (id, UName, tenant_id,
delete_Flag) delete_Flag)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
#{otherUnit,jdbcType=VARCHAR}, #{ratio,jdbcType=INTEGER}, #{tenantId,jdbcType=BIGINT},
#{deleteFlag,jdbcType=VARCHAR}) #{deleteFlag,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit insert into jsh_unit
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@@ -153,6 +118,15 @@
<if test="uname != null"> <if test="uname != null">
UName, UName,
</if> </if>
<if test="basicUnit != null">
basic_unit,
</if>
<if test="otherUnit != null">
other_unit,
</if>
<if test="ratio != null">
ratio,
</if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id, tenant_id,
</if> </if>
@@ -167,6 +141,15 @@
<if test="uname != null"> <if test="uname != null">
#{uname,jdbcType=VARCHAR}, #{uname,jdbcType=VARCHAR},
</if> </if>
<if test="basicUnit != null">
#{basicUnit,jdbcType=VARCHAR},
</if>
<if test="otherUnit != null">
#{otherUnit,jdbcType=VARCHAR},
</if>
<if test="ratio != null">
#{ratio,jdbcType=INTEGER},
</if>
<if test="tenantId != null"> <if test="tenantId != null">
#{tenantId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
</if> </if>
@@ -175,21 +158,13 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Integer"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Long">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_unit select count(*) from jsh_unit
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</select> </select>
<update id="updateByExampleSelective" parameterType="map"> <update id="updateByExampleSelective" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit update jsh_unit
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
@@ -198,6 +173,15 @@
<if test="record.uname != null"> <if test="record.uname != null">
UName = #{record.uname,jdbcType=VARCHAR}, UName = #{record.uname,jdbcType=VARCHAR},
</if> </if>
<if test="record.basicUnit != null">
basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
</if>
<if test="record.otherUnit != null">
other_unit = #{record.otherUnit,jdbcType=VARCHAR},
</if>
<if test="record.ratio != null">
ratio = #{record.ratio,jdbcType=INTEGER},
</if>
<if test="record.tenantId != null"> <if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if> </if>
@@ -210,13 +194,12 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit update jsh_unit
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR}, 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}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
@@ -224,15 +207,20 @@
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit"> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit update jsh_unit
<set> <set>
<if test="uname != null"> <if test="uname != null">
UName = #{uname,jdbcType=VARCHAR}, UName = #{uname,jdbcType=VARCHAR},
</if> </if>
<if test="basicUnit != null">
basic_unit = #{basicUnit,jdbcType=VARCHAR},
</if>
<if test="otherUnit != null">
other_unit = #{otherUnit,jdbcType=VARCHAR},
</if>
<if test="ratio != null">
ratio = #{ratio,jdbcType=INTEGER},
</if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT}, tenant_id = #{tenantId,jdbcType=BIGINT},
</if> </if>
@@ -243,12 +231,11 @@
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit update jsh_unit
set UName = #{uname,jdbcType=VARCHAR}, set UName = #{uname,jdbcType=VARCHAR},
basic_unit = #{basicUnit,jdbcType=VARCHAR},
other_unit = #{otherUnit,jdbcType=VARCHAR},
ratio = #{ratio,jdbcType=INTEGER},
tenant_id = #{tenantId,jdbcType=BIGINT}, tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR} delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}