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

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

@@ -740,4 +740,13 @@ alter table jsh_depotitem add material_extend_id bigint(20) DEFAULT NULL COMMENT
-- by jishenghua -- by jishenghua
-- ---------------------------- -- ----------------------------
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

@@ -1,256 +1,243 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!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">
<!-- <id column="id" jdbcType="BIGINT" property="id" />
WARNING - @mbggenerated <result column="UName" jdbcType="VARCHAR" property="uname" />
This element is automatically generated by MyBatis Generator, do not modify. <result column="basic_unit" jdbcType="VARCHAR" property="basicUnit" />
--> <result column="other_unit" jdbcType="VARCHAR" property="otherUnit" />
<id column="id" jdbcType="BIGINT" property="id" /> <result column="ratio" jdbcType="INTEGER" property="ratio" />
<result column="UName" jdbcType="VARCHAR" property="uname" /> <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"> <where>
<!-- <foreach collection="oredCriteria" item="criteria" separator="or">
WARNING - @mbggenerated <if test="criteria.valid">
This element is automatically generated by MyBatis Generator, do not modify. <trim prefix="(" prefixOverrides="and" suffix=")">
--> <foreach collection="criteria.criteria" item="criterion">
<where> <choose>
<foreach collection="oredCriteria" item="criteria" separator="or"> <when test="criterion.noValue">
<if test="criteria.valid"> and ${criterion.condition}
<trim prefix="(" prefixOverrides="and" suffix=")"> </when>
<foreach collection="criteria.criteria" item="criterion"> <when test="criterion.singleValue">
<choose> and ${criterion.condition} #{criterion.value}
<when test="criterion.noValue"> </when>
and ${criterion.condition} <when test="criterion.betweenValue">
</when> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<when test="criterion.singleValue"> </when>
and ${criterion.condition} #{criterion.value} <when test="criterion.listValue">
</when> and ${criterion.condition}
<when test="criterion.betweenValue"> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} #{listItem}
</when> </foreach>
<when test="criterion.listValue"> </when>
and ${criterion.condition} </choose>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </trim>
</foreach> </if>
</when> </foreach>
</choose> </where>
</foreach> </sql>
</trim> <sql id="Update_By_Example_Where_Clause">
</if> <where>
</foreach> <foreach collection="example.oredCriteria" item="criteria" separator="or">
</where> <if test="criteria.valid">
</sql> <trim prefix="(" prefixOverrides="and" suffix=")">
<sql id="Update_By_Example_Where_Clause"> <foreach collection="criteria.criteria" item="criterion">
<!-- <choose>
WARNING - @mbggenerated <when test="criterion.noValue">
This element is automatically generated by MyBatis Generator, do not modify. and ${criterion.condition}
--> </when>
<where> <when test="criterion.singleValue">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> and ${criterion.condition} #{criterion.value}
<if test="criteria.valid"> </when>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.betweenValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<choose> </when>
<when test="criterion.noValue"> <when test="criterion.listValue">
and ${criterion.condition} and ${criterion.condition}
</when> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<when test="criterion.singleValue"> #{listItem}
and ${criterion.condition} #{criterion.value} </foreach>
</when> </when>
<when test="criterion.betweenValue"> </choose>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </foreach>
</when> </trim>
<when test="criterion.listValue"> </if>
and ${criterion.condition} </foreach>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </where>
#{listItem} </sql>
</foreach> <sql id="Base_Column_List">
</when> id, UName, basic_unit, other_unit, ratio, tenant_id, delete_Flag
</choose> </sql>
</foreach> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
</trim> select
</if> <if test="distinct">
</foreach> distinct
</where> </if>
</sql> <include refid="Base_Column_List" />
<sql id="Base_Column_List"> from jsh_unit
<!-- <if test="_parameter != null">
WARNING - @mbggenerated <include refid="Example_Where_Clause" />
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="orderByClause != null">
id, UName, tenant_id, delete_Flag order by ${orderByClause}
</sql> </if>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap"> </select>
<!-- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
WARNING - @mbggenerated select
This element is automatically generated by MyBatis Generator, do not modify. <include refid="Base_Column_List" />
--> from jsh_unit
select where id = #{id,jdbcType=BIGINT}
<if test="distinct"> </select>
distinct <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
</if> delete from jsh_unit
<include refid="Base_Column_List" /> where id = #{id,jdbcType=BIGINT}
from jsh_unit </delete>
<if test="_parameter != null"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample">
<include refid="Example_Where_Clause" /> delete from jsh_unit
</if> <if test="_parameter != null">
<if test="orderByClause != null"> <include refid="Example_Where_Clause" />
order by ${orderByClause} </if>
</if> </delete>
</select> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> insert into jsh_unit (id, UName, basic_unit,
<!-- other_unit, ratio, tenant_id,
WARNING - @mbggenerated delete_Flag)
This element is automatically generated by MyBatis Generator, do not modify. values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{basicUnit,jdbcType=VARCHAR},
--> #{otherUnit,jdbcType=VARCHAR}, #{ratio,jdbcType=INTEGER}, #{tenantId,jdbcType=BIGINT},
select #{deleteFlag,jdbcType=VARCHAR})
<include refid="Base_Column_List" /> </insert>
from jsh_unit <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit">
where id = #{id,jdbcType=BIGINT} insert into jsh_unit
</select> <trim prefix="(" suffix=")" suffixOverrides=",">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <if test="id != null">
<!-- id,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="uname != null">
--> UName,
delete from jsh_unit </if>
where id = #{id,jdbcType=BIGINT} <if test="basicUnit != null">
</delete> basic_unit,
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample"> </if>
<!-- <if test="otherUnit != null">
WARNING - @mbggenerated other_unit,
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="ratio != null">
delete from jsh_unit ratio,
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> <if test="tenantId != null">
</if> tenant_id,
</delete> </if>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Unit"> <if test="deleteFlag != null">
<!-- delete_Flag,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. </trim>
--> <trim prefix="values (" suffix=")" suffixOverrides=",">
insert into jsh_unit (id, UName, tenant_id, <if test="id != null">
delete_Flag) #{id,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, </if>
#{deleteFlag,jdbcType=VARCHAR}) <if test="uname != null">
</insert> #{uname,jdbcType=VARCHAR},
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit"> </if>
<!-- <if test="basicUnit != null">
WARNING - @mbggenerated #{basicUnit,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="otherUnit != null">
insert into jsh_unit #{otherUnit,jdbcType=VARCHAR},
<trim prefix="(" suffix=")" suffixOverrides=","> </if>
<if test="id != null"> <if test="ratio != null">
id, #{ratio,jdbcType=INTEGER},
</if> </if>
<if test="uname != null"> <if test="tenantId != null">
UName, #{tenantId,jdbcType=BIGINT},
</if> </if>
<if test="tenantId != null"> <if test="deleteFlag != null">
tenant_id, #{deleteFlag,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null"> </trim>
delete_Flag, </insert>
</if> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Long">
</trim> select count(*) from jsh_unit
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="_parameter != null">
<if test="id != null"> <include refid="Example_Where_Clause" />
#{id,jdbcType=BIGINT}, </if>
</if> </select>
<if test="uname != null"> <update id="updateByExampleSelective" parameterType="map">
#{uname,jdbcType=VARCHAR}, update jsh_unit
</if> <set>
<if test="tenantId != null"> <if test="record.id != null">
#{tenantId,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="deleteFlag != null"> <if test="record.uname != null">
#{deleteFlag,jdbcType=VARCHAR}, UName = #{record.uname,jdbcType=VARCHAR},
</if> </if>
</trim> <if test="record.basicUnit != null">
</insert> basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Integer"> </if>
<!-- <if test="record.otherUnit != null">
WARNING - @mbggenerated other_unit = #{record.otherUnit,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="record.ratio != null">
select count(*) from jsh_unit ratio = #{record.ratio,jdbcType=INTEGER},
<if test="_parameter != null"> </if>
<include refid="Example_Where_Clause" /> <if test="record.tenantId != null">
</if> tenant_id = #{record.tenantId,jdbcType=BIGINT},
</select> </if>
<update id="updateByExampleSelective" parameterType="map"> <if test="record.deleteFlag != null">
<!-- delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. </set>
--> <if test="_parameter != null">
update jsh_unit <include refid="Update_By_Example_Where_Clause" />
<set> </if>
<if test="record.id != null"> </update>
id = #{record.id,jdbcType=BIGINT}, <update id="updateByExample" parameterType="map">
</if> update jsh_unit
<if test="record.uname != null"> set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR}, UName = #{record.uname,jdbcType=VARCHAR},
</if> basic_unit = #{record.basicUnit,jdbcType=VARCHAR},
<if test="record.tenantId != null"> other_unit = #{record.otherUnit,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}, ratio = #{record.ratio,jdbcType=INTEGER},
</if> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<if test="record.deleteFlag != null"> delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, <if test="_parameter != null">
</if> <include refid="Update_By_Example_Where_Clause" />
</set> </if>
<if test="_parameter != null"> </update>
<include refid="Update_By_Example_Where_Clause" /> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit">
</if> update jsh_unit
</update> <set>
<update id="updateByExample" parameterType="map"> <if test="uname != null">
<!-- UName = #{uname,jdbcType=VARCHAR},
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="basicUnit != null">
--> basic_unit = #{basicUnit,jdbcType=VARCHAR},
update jsh_unit </if>
set id = #{record.id,jdbcType=BIGINT}, <if test="otherUnit != null">
UName = #{record.uname,jdbcType=VARCHAR}, other_unit = #{otherUnit,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}, </if>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} <if test="ratio != null">
<if test="_parameter != null"> ratio = #{ratio,jdbcType=INTEGER},
<include refid="Update_By_Example_Where_Clause" /> </if>
</if> <if test="tenantId != null">
</update> tenant_id = #{tenantId,jdbcType=BIGINT},
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Unit"> </if>
<!-- <if test="deleteFlag != null">
WARNING - @mbggenerated delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> </set>
update jsh_unit where id = #{id,jdbcType=BIGINT}
<set> </update>
<if test="uname != null"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Unit">
UName = #{uname,jdbcType=VARCHAR}, update jsh_unit
</if> set UName = #{uname,jdbcType=VARCHAR},
<if test="tenantId != null"> basic_unit = #{basicUnit,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}, other_unit = #{otherUnit,jdbcType=VARCHAR},
</if> ratio = #{ratio,jdbcType=INTEGER},
<if test="deleteFlag != null"> tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
</if> where id = #{id,jdbcType=BIGINT}
</set> </update>
where id = #{id,jdbcType=BIGINT}
</update>
<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
set UName = #{uname,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>