Commit a4774016 authored by 季圣华's avatar 季圣华
Browse files

优化表结构

parent 70f0dae4
<?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.AccountItemMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.AccountItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountItem"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.AccountItem">
<!-- <id column="id" jdbcType="BIGINT" property="id" />
WARNING - @mbggenerated <result column="header_id" jdbcType="BIGINT" property="headerId" />
This element is automatically generated by MyBatis Generator, do not modify. <result column="account_id" jdbcType="BIGINT" property="accountId" />
--> <result column="in_out_item_id" jdbcType="BIGINT" property="inOutItemId" />
<id column="Id" jdbcType="BIGINT" property="id" /> <result column="each_amount" jdbcType="DECIMAL" property="eachAmount" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" /> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="InOutItemId" jdbcType="BIGINT" property="inoutitemid" /> <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="EachAmount" jdbcType="DECIMAL" property="eachamount" /> </resultMap>
<result column="Remark" jdbcType="VARCHAR" property="remark" /> <sql id="Example_Where_Clause">
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <where>
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <foreach collection="oredCriteria" item="criteria" separator="or">
</resultMap> <if test="criteria.valid">
<sql id="Example_Where_Clause"> <trim prefix="(" prefixOverrides="and" suffix=")">
<!-- <foreach collection="criteria.criteria" item="criterion">
WARNING - @mbggenerated <choose>
This element is automatically generated by MyBatis Generator, do not modify. <when test="criterion.noValue">
--> and ${criterion.condition}
<where> </when>
<foreach collection="oredCriteria" item="criteria" separator="or"> <when test="criterion.singleValue">
<if test="criteria.valid"> and ${criterion.condition} #{criterion.value}
<trim prefix="(" prefixOverrides="and" suffix=")"> </when>
<foreach collection="criteria.criteria" item="criterion"> <when test="criterion.betweenValue">
<choose> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<when test="criterion.noValue"> </when>
and ${criterion.condition} <when test="criterion.listValue">
</when> and ${criterion.condition}
<when test="criterion.singleValue"> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
and ${criterion.condition} #{criterion.value} #{listItem}
</when> </foreach>
<when test="criterion.betweenValue"> </when>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </choose>
</when> </foreach>
<when test="criterion.listValue"> </trim>
and ${criterion.condition} </if>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </where>
</foreach> </sql>
</when> <sql id="Update_By_Example_Where_Clause">
</choose> <where>
</foreach> <foreach collection="example.oredCriteria" item="criteria" separator="or">
</trim> <if test="criteria.valid">
</if> <trim prefix="(" prefixOverrides="and" suffix=")">
</foreach> <foreach collection="criteria.criteria" item="criterion">
</where> <choose>
</sql> <when test="criterion.noValue">
<sql id="Update_By_Example_Where_Clause"> and ${criterion.condition}
<!-- </when>
WARNING - @mbggenerated <when test="criterion.singleValue">
This element is automatically generated by MyBatis Generator, do not modify. and ${criterion.condition} #{criterion.value}
--> </when>
<where> <when test="criterion.betweenValue">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<if test="criteria.valid"> </when>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.listValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition}
<choose> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<when test="criterion.noValue"> #{listItem}
and ${criterion.condition} </foreach>
</when> </when>
<when test="criterion.singleValue"> </choose>
and ${criterion.condition} #{criterion.value} </foreach>
</when> </trim>
<when test="criterion.betweenValue"> </if>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </foreach>
</when> </where>
<when test="criterion.listValue"> </sql>
and ${criterion.condition} <sql id="Base_Column_List">
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> id, header_id, account_id, in_out_item_id, each_amount, remark, tenant_id, delete_flag
#{listItem} </sql>
</foreach> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
</when> select
</choose> <if test="distinct">
</foreach> distinct
</trim> </if>
</if> <include refid="Base_Column_List" />
</foreach> from jsh_account_item
</where> <if test="_parameter != null">
</sql> <include refid="Example_Where_Clause" />
<sql id="Base_Column_List"> </if>
<!-- <if test="orderByClause != null">
WARNING - @mbggenerated order by ${orderByClause}
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> </select>
Id, HeaderId, AccountId, InOutItemId, EachAmount, Remark, tenant_id, delete_Flag <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
</sql> select
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap"> <include refid="Base_Column_List" />
<!-- from jsh_account_item
WARNING - @mbggenerated where id = #{id,jdbcType=BIGINT}
This element is automatically generated by MyBatis Generator, do not modify. </select>
--> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
select delete from jsh_account_item
<if test="distinct"> where id = #{id,jdbcType=BIGINT}
distinct </delete>
</if> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample">
<include refid="Base_Column_List" /> delete from jsh_account_item
from jsh_accountitem <if test="_parameter != null">
<if test="_parameter != null"> <include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause" /> </if>
</if> </delete>
<if test="orderByClause != null"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.AccountItem">
order by ${orderByClause} insert into jsh_account_item (id, header_id, account_id,
</if> in_out_item_id, each_amount, remark,
</select> tenant_id, delete_flag)
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT},
<!-- #{inOutItemId,jdbcType=BIGINT}, #{eachAmount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
WARNING - @mbggenerated #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
This element is automatically generated by MyBatis Generator, do not modify. </insert>
--> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
select insert into jsh_account_item
<include refid="Base_Column_List" /> <trim prefix="(" suffix=")" suffixOverrides=",">
from jsh_accountitem <if test="id != null">
where Id = #{id,jdbcType=BIGINT} id,
</select> </if>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <if test="headerId != null">
<!-- header_id,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="accountId != null">
--> account_id,
delete from jsh_accountitem </if>
where Id = #{id,jdbcType=BIGINT} <if test="inOutItemId != null">
</delete> in_out_item_id,
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample"> </if>
<!-- <if test="eachAmount != null">
WARNING - @mbggenerated each_amount,
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="remark != null">
delete from jsh_accountitem remark,
<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.AccountItem"> <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_accountitem (Id, HeaderId, AccountId, <if test="id != null">
InOutItemId, EachAmount, Remark, #{id,jdbcType=BIGINT},
tenant_id, delete_Flag) </if>
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT}, <if test="headerId != null">
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{headerId,jdbcType=BIGINT},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) </if>
</insert> <if test="accountId != null">
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem"> #{accountId,jdbcType=BIGINT},
<!-- </if>
WARNING - @mbggenerated <if test="inOutItemId != null">
This element is automatically generated by MyBatis Generator, do not modify. #{inOutItemId,jdbcType=BIGINT},
--> </if>
insert into jsh_accountitem <if test="eachAmount != null">
<trim prefix="(" suffix=")" suffixOverrides=","> #{eachAmount,jdbcType=DECIMAL},
<if test="id != null"> </if>
Id, <if test="remark != null">
</if> #{remark,jdbcType=VARCHAR},
<if test="headerid != null"> </if>
HeaderId, <if test="tenantId != null">
</if> #{tenantId,jdbcType=BIGINT},
<if test="accountid != null"> </if>
AccountId, <if test="deleteFlag != null">
</if> #{deleteFlag,jdbcType=VARCHAR},
<if test="inoutitemid != null"> </if>
InOutItemId, </trim>
</if> </insert>
<if test="eachamount != null"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultType="java.lang.Long">
EachAmount, select count(*) from jsh_account_item
</if> <if test="_parameter != null">
<if test="remark != null"> <include refid="Example_Where_Clause" />
Remark, </if>
</if> </select>
<if test="tenantId != null"> <update id="updateByExampleSelective" parameterType="map">
tenant_id, update jsh_account_item
</if> <set>
<if test="deleteFlag != null"> <if test="record.id != null">
delete_Flag, id = #{record.id,jdbcType=BIGINT},
</if> </if>
</trim> <if test="record.headerId != null">
<trim prefix="values (" suffix=")" suffixOverrides=","> header_id = #{record.headerId,jdbcType=BIGINT},
<if test="id != null"> </if>
#{id,jdbcType=BIGINT}, <if test="record.accountId != null">
</if> account_id = #{record.accountId,jdbcType=BIGINT},
<if test="headerid != null"> </if>
#{headerid,jdbcType=BIGINT}, <if test="record.inOutItemId != null">
</if> in_out_item_id = #{record.inOutItemId,jdbcType=BIGINT},
<if test="accountid != null"> </if>
#{accountid,jdbcType=BIGINT}, <if test="record.eachAmount != null">
</if> each_amount = #{record.eachAmount,jdbcType=DECIMAL},
<if test="inoutitemid != null"> </if>
#{inoutitemid,jdbcType=BIGINT}, <if test="record.remark != null">
</if> remark = #{record.remark,jdbcType=VARCHAR},
<if test="eachamount != null"> </if>
#{eachamount,jdbcType=DECIMAL}, <if test="record.tenantId != null">
</if> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<if test="remark != null"> </if>
#{remark,jdbcType=VARCHAR}, <if test="record.deleteFlag != null">
</if> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
<if test="tenantId != null"> </if>
#{tenantId,jdbcType=BIGINT}, </set>
</if> <if test="_parameter != null">
<if test="deleteFlag != null"> <include refid="Update_By_Example_Where_Clause" />
#{deleteFlag,jdbcType=VARCHAR}, </if>
</if> </update>
</trim> <update id="updateByExample" parameterType="map">
</insert> update jsh_account_item
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultType="java.lang.Integer"> set id = #{record.id,jdbcType=BIGINT},
<!-- header_id = #{record.headerId,jdbcType=BIGINT},
WARNING - @mbggenerated account_id = #{record.accountId,jdbcType=BIGINT},
This element is automatically generated by MyBatis Generator, do not modify. in_out_item_id = #{record.inOutItemId,jdbcType=BIGINT},
--> each_amount = #{record.eachAmount,jdbcType=DECIMAL},
select count(*) from jsh_accountitem remark = #{record.remark,jdbcType=VARCHAR},
<if test="_parameter != null"> tenant_id = #{record.tenantId,jdbcType=BIGINT},
<include refid="Example_Where_Clause" /> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
</if> <if test="_parameter != null">
</select> <include refid="Update_By_Example_Where_Clause" />
<update id="updateByExampleSelective" parameterType="map"> </if>
<!-- </update>
WARNING - @mbggenerated <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
This element is automatically generated by MyBatis Generator, do not modify. update jsh_account_item
--> <set>
update jsh_accountitem <if test="headerId != null">
<set> header_id = #{headerId,jdbcType=BIGINT},
<if test="record.id != null"> </if>
Id = #{record.id,jdbcType=BIGINT}, <if test="accountId != null">
</if> account_id = #{accountId,jdbcType=BIGINT},
<if test="record.headerid != null"> </if>
HeaderId = #{record.headerid,jdbcType=BIGINT}, <if test="inOutItemId != null">
</if> in_out_item_id = #{inOutItemId,jdbcType=BIGINT},
<if test="record.accountid != null"> </if>
AccountId = #{record.accountid,jdbcType=BIGINT}, <if test="eachAmount != null">
</if> each_amount = #{eachAmount,jdbcType=DECIMAL},
<if test="record.inoutitemid != null"> </if>
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT}, <if test="remark != null">
</if> remark = #{remark,jdbcType=VARCHAR},
<if test="record.eachamount != null"> </if>
EachAmount = #{record.eachamount,jdbcType=DECIMAL}, <if test="tenantId != null">
</if> tenant_id = #{tenantId,jdbcType=BIGINT},
<if test="record.remark != null"> </if>
Remark = #{record.remark,jdbcType=VARCHAR}, <if test="deleteFlag != null">
</if> delete_flag = #{deleteFlag,jdbcType=VARCHAR},
<if test="record.tenantId != null"> </if>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, </set>
</if> where id = #{id,jdbcType=BIGINT}
<if test="record.deleteFlag != null"> </update>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountItem">
</if> update jsh_account_item
</set> set header_id = #{headerId,jdbcType=BIGINT},
<if test="_parameter != null"> account_id = #{accountId,jdbcType=BIGINT},
<include refid="Update_By_Example_Where_Clause" /> in_out_item_id = #{inOutItemId,jdbcType=BIGINT},
</if> each_amount = #{eachAmount,jdbcType=DECIMAL},
</update> remark = #{remark,jdbcType=VARCHAR},
<update id="updateByExample" parameterType="map"> tenant_id = #{tenantId,jdbcType=BIGINT},
<!-- delete_flag = #{deleteFlag,jdbcType=VARCHAR}
WARNING - @mbggenerated where id = #{id,jdbcType=BIGINT}
This element is automatically generated by MyBatis Generator, do not modify. </update>
-->
update jsh_accountitem
set Id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
EachAmount = #{record.eachamount,jdbcType=DECIMAL},
Remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
<set>
<if test="headerid != null">
HeaderId = #{headerid,jdbcType=BIGINT},
</if>
<if test="accountid != null">
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if test="inoutitemid != null">
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
</if>
<if test="eachamount != null">
EachAmount = #{eachamount,jdbcType=DECIMAL},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_accountitem
set HeaderId = #{headerid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
EachAmount = #{eachamount,jdbcType=DECIMAL},
Remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<select id="selectByConditionAccountItem" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap"> <select id="selectByConditionAccountItem" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap">
select * select *
FROM jsh_accountitem FROM jsh_account_item
where 1=1 where 1=1
<if test="name != null"> <if test="name != null">
and name like '%${name}%' and name like '%${name}%'
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<if test="remark != null"> <if test="remark != null">
and remark like '%${remark}%' and remark like '%${remark}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<select id="countsByAccountItem" resultType="java.lang.Long"> <select id="countsByAccountItem" resultType="java.lang.Long">
SELECT SELECT
COUNT(id) COUNT(id)
FROM jsh_accountitem FROM jsh_account_item
WHERE 1=1 WHERE 1=1
<if test="name != null"> <if test="name != null">
and name like '%${name}%' and name like '%${name}%'
...@@ -39,20 +39,20 @@ ...@@ -39,20 +39,20 @@
<if test="remark != null"> <if test="remark != null">
and remark like '%${remark}%' and remark like '%${remark}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="ResultWithInfoExMap"> <select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="ResultWithInfoExMap">
select ai.*,a.Name AccountName,ioi.Name InOutItemName select ai.*,a.Name AccountName,ioi.Name InOutItemName
from jsh_accountitem ai left join jsh_account a on ai.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1' from jsh_account_item ai left join jsh_account a on ai.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_inoutitem ioi on ai.InOutItemId = ioi.id and ifnull(ioi.delete_Flag,'0') !='1' left join jsh_in_out_item ioi on ai.in_out_item_id = ioi.id and ifnull(ioi.delete_Flag,'0') !='1'
where ai.HeaderId = ${headerId} where ai.header_id = ${headerId}
and ifnull(ai.delete_Flag,'0') !='1' and ifnull(ai.delete_flag,'0') !='1'
order by ai.id asc order by ai.id asc
</select> </select>
<update id="batchDeleteAccountItemByIds"> <update id="batchDeleteAccountItemByIds">
update jsh_accountitem update jsh_account_item
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
...@@ -63,37 +63,37 @@ ...@@ -63,37 +63,37 @@
<select id="getAccountItemListByAccountIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap"> <select id="getAccountItemListByAccountIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" />
from jsh_accountitem from jsh_account_item
where 1=1 where 1=1
and accountId in ( and account_id in (
<foreach collection="accountIds" item="accountId" separator=","> <foreach collection="accountIds" item="accountId" separator=",">
#{accountId} #{accountId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getAccountItemListByHeaderIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap"> <select id="getAccountItemListByHeaderIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" />
from jsh_accountitem from jsh_account_item
where 1=1 where 1=1
and headerId in ( and header_id in (
<foreach collection="headerIds" item="headerId" separator=","> <foreach collection="headerIds" item="headerId" separator=",">
#{headerId} #{headerId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getAccountItemListByInOutItemIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap"> <select id="getAccountItemListByInOutItemIds" resultMap="com.jsh.erp.datasource.mappers.AccountItemMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.AccountItemMapper.Base_Column_List" />
from jsh_accountitem from jsh_account_item
where 1=1 where 1=1
and inOutItemId in ( and in_out_item_id in (
<foreach collection="inOutItemIds" item="inOutItemId" separator=","> <foreach collection="inOutItemIds" item="inOutItemId" separator=",">
#{inOutItemId} #{inOutItemId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<result column="Number" jdbcType="VARCHAR" property="number" /> <result column="Number" jdbcType="VARCHAR" property="number" />
<result column="newType" jdbcType="VARCHAR" property="type" /> <result column="newType" jdbcType="VARCHAR" property="type" />
<result column="supplier" jdbcType="VARCHAR" property="supplierName" /> <result column="supplier" jdbcType="VARCHAR" property="supplierName" />
<result column="ChangeAmount" jdbcType="DECIMAL" property="changeAmount" /> <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="oTime" jdbcType="VARCHAR" property="operTime" /> <result column="oTime" jdbcType="VARCHAR" property="operTime" />
<result column="AList" jdbcType="VARCHAR" property="aList" /> <result column="AList" jdbcType="VARCHAR" property="aList" />
<result column="AMList" jdbcType="VARCHAR" property="amList" /> <result column="AMList" jdbcType="VARCHAR" property="amList" />
...@@ -53,61 +53,61 @@ ...@@ -53,61 +53,61 @@
<select id="findAccountInOutList" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultInOutList"> <select id="findAccountInOutList" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="ResultInOutList">
<!--主表出入库涉及的账户 --> <!--主表出入库涉及的账户 -->
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select dh.number,concat(dh.sub_type,dh.type) as newType,s.supplier,dh.change_amount,date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_depothead dh left join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_depot_head dh left join jsh_supplier s on dh.organ_id = s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and dh.AccountId=${accountId} and dh.account_id=${accountId}
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
<!--主表收入和支出涉及的账户 --> <!--主表收入和支出涉及的账户 -->
UNION ALL UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select ah.bill_no,ah.type as newType,s.supplier,ah.change_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah left join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and ah.AccountId=${accountId} and ah.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--明细中涉及的账户(收款,付款,收预付款) --> <!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL UNION ALL
select ah.BillNo,ah.Type as newType,s.supplier,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select ah.bill_no,ah.type as newType,s.supplier,ai.each_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah left join jsh_supplier s on ah.OrganId=s.id from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' inner join jsh_account_item ai on ai.header_id=ah.id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type in ('收款','付款','收预付款') where ah.type in ('收款','付款','收预付款')
<if test="accountId != null"> <if test="accountId != null">
and ai.AccountId=${accountId} and ai.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--主表中转出的账户 --> <!--主表中转出的账户 -->
UNION ALL UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ah.ChangeAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select ah.bill_no,ah.type as newType, '' as sName,ah.change_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' from jsh_account_head ah inner join jsh_account_item ai on ai.header_id=ah.id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type='转账' where ah.type='转账'
<if test="accountId != null"> <if test="accountId != null">
and ah.AccountId=${accountId} and ah.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--明细中被转入的账户 --> <!--明细中被转入的账户 -->
UNION ALL UNION ALL
select ah.BillNo,ah.Type as newType, '' as sName,ai.EachAmount,date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList select ah.bill_no,ah.type as newType, '' as sName,ai.each_amount,date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime,'' as AList,'' as AMList
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' from jsh_account_head ah inner join jsh_account_item ai on ai.header_id=ah.id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type='转账' where ah.type='转账'
<if test="accountId != null"> <if test="accountId != null">
and ai.AccountId=${accountId} and ai.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--多账户的情况 --> <!--多账户的情况 -->
UNION ALL UNION ALL
select dh.Number,concat(dh.SubType,dh.Type) as newType,s.supplier,dh.ChangeAmount,date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime, select dh.number,concat(dh.sub_type,dh.type) as newType,s.supplier,dh.change_amount,date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime,
dh.AccountIdList as AList,dh.AccountMoneyList as AMList dh.account_id_list as AList,dh.account_money_list as AMList
from jsh_depothead dh left join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_depot_head dh left join jsh_supplier s on dh.organ_id = s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and dh.AccountIdList like '%${accountId}%' and dh.account_id_list like '%${accountId}%'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oTime desc ORDER BY oTime desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -119,58 +119,58 @@ ...@@ -119,58 +119,58 @@
( (
<!--主表出入库涉及的账户 --> <!--主表出入库涉及的账户 -->
select count(1) a select count(1) a
from jsh_depothead dh left join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_depot_head dh left join jsh_supplier s on dh.organ_id = s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and dh.AccountId=${accountId} and dh.account_id=${accountId}
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
<!--主表收入和支出涉及的账户 --> <!--主表收入和支出涉及的账户 -->
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_accounthead ah left join jsh_supplier s on ah.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and ah.AccountId=${accountId} and ah.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--明细中涉及的账户(收款,付款,收预付款) --> <!--明细中涉及的账户(收款,付款,收预付款) -->
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_accounthead ah left join jsh_supplier s on ah.OrganId=s.id from jsh_account_head ah left join jsh_supplier s on ah.organ_id=s.id
inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' inner join jsh_account_item ai on ai.header_id=ah.Id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type in ('收款','付款','收预付款') where ah.Type in ('收款','付款','收预付款')
<if test="accountId != null"> <if test="accountId != null">
and ai.AccountId=${accountId} and ai.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--主表中转出的账户 --> <!--主表中转出的账户 -->
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' from jsh_account_head ah inner join jsh_account_item ai on ai.header_id=ah.id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type='转账' where ah.type='转账'
<if test="accountId != null"> <if test="accountId != null">
and ah.AccountId=${accountId} and ah.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--明细中被转入的账户 --> <!--明细中被转入的账户 -->
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_accounthead ah inner join jsh_accountitem ai on ai.HeaderId=ah.Id and ifnull(ai.delete_Flag,'0') !='1' from jsh_account_head ah inner join jsh_account_item ai on ai.header_id=ah.id and ifnull(ai.delete_flag,'0') !='1'
where ah.Type='转账' where ah.type='转账'
<if test="accountId != null"> <if test="accountId != null">
and ai.AccountId=${accountId} and ai.account_id=${accountId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
<!--多账户的情况 --> <!--多账户的情况 -->
UNION ALL UNION ALL
select count(1) a select count(1) a
from jsh_depothead dh left join jsh_supplier s on dh.OrganId = s.id and ifnull(s.delete_Flag,'0') !='1' from jsh_depot_head dh left join jsh_supplier s on dh.organ_id = s.id and ifnull(s.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="accountId != null"> <if test="accountId != null">
and dh.AccountIdList like '%${accountId}%' and dh.account_id_list like '%${accountId}%'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
) cc ) cc
</select> </select>
<update id="batchDeleteAccountByIds"> <update id="batchDeleteAccountByIds">
......
...@@ -2,35 +2,35 @@ ...@@ -2,35 +2,35 @@
<!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.DepotHeadMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead">
<id column="Id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="Type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="SubType" jdbcType="VARCHAR" property="subtype" /> <result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="DefaultNumber" jdbcType="VARCHAR" property="defaultnumber" /> <result column="default_number" jdbcType="VARCHAR" property="defaultNumber" />
<result column="Number" jdbcType="VARCHAR" property="number" /> <result column="number" jdbcType="VARCHAR" property="number" />
<result column="OperPersonName" jdbcType="VARCHAR" property="operpersonname" /> <result column="oper_person_name" jdbcType="VARCHAR" property="operPersonName" />
<result column="CreateTime" jdbcType="TIMESTAMP" property="createtime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="OperTime" jdbcType="TIMESTAMP" property="opertime" /> <result column="oper_time" jdbcType="TIMESTAMP" property="operTime" />
<result column="OrganId" jdbcType="BIGINT" property="organid" /> <result column="organ_id" jdbcType="BIGINT" property="organId" />
<result column="HandsPersonId" jdbcType="BIGINT" property="handspersonid" /> <result column="hands_person_id" jdbcType="BIGINT" property="handsPersonId" />
<result column="AccountId" jdbcType="BIGINT" property="accountid" /> <result column="account_id" jdbcType="BIGINT" property="accountId" />
<result column="ChangeAmount" jdbcType="DECIMAL" property="changeamount" /> <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="TotalPrice" jdbcType="DECIMAL" property="totalprice" /> <result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
<result column="PayType" jdbcType="VARCHAR" property="paytype" /> <result column="pay_type" jdbcType="VARCHAR" property="payType" />
<result column="Remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="Salesman" jdbcType="VARCHAR" property="salesman" /> <result column="sales_man" jdbcType="VARCHAR" property="salesMan" />
<result column="AccountIdList" jdbcType="VARCHAR" property="accountidlist" /> <result column="account_id_list" jdbcType="VARCHAR" property="accountIdList" />
<result column="AccountMoneyList" jdbcType="VARCHAR" property="accountmoneylist" /> <result column="account_money_list" jdbcType="VARCHAR" property="accountMoneyList" />
<result column="Discount" jdbcType="DECIMAL" property="discount" /> <result column="discount" jdbcType="DECIMAL" property="discount" />
<result column="DiscountMoney" jdbcType="DECIMAL" property="discountmoney" /> <result column="discount_money" jdbcType="DECIMAL" property="discountMoney" />
<result column="DiscountLastMoney" jdbcType="DECIMAL" property="discountlastmoney" /> <result column="discount_last_money" jdbcType="DECIMAL" property="discountLastMoney" />
<result column="OtherMoney" jdbcType="DECIMAL" property="othermoney" /> <result column="other_money" jdbcType="DECIMAL" property="otherMoney" />
<result column="OtherMoneyList" jdbcType="VARCHAR" property="othermoneylist" /> <result column="other_money_list" jdbcType="VARCHAR" property="otherMoneyList" />
<result column="OtherMoneyItem" jdbcType="VARCHAR" property="othermoneyitem" /> <result column="other_money_item" jdbcType="VARCHAR" property="otherMoneyItem" />
<result column="AccountDay" jdbcType="INTEGER" property="accountday" /> <result column="account_day" jdbcType="INTEGER" property="accountDay" />
<result column="Status" jdbcType="VARCHAR" property="status" /> <result column="status" jdbcType="VARCHAR" property="status" />
<result column="LinkNumber" jdbcType="VARCHAR" property="linknumber" /> <result column="link_number" jdbcType="VARCHAR" property="linkNumber" />
<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> <where>
...@@ -91,10 +91,11 @@ ...@@ -91,10 +91,11 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
Id, Type, SubType, DefaultNumber, Number, OperPersonName, CreateTime, OperTime, OrganId, id, type, sub_type, default_number, number, oper_person_name, create_time, oper_time,
HandsPersonId, AccountId, ChangeAmount, TotalPrice, PayType, Remark, Salesman, AccountIdList, organ_id, hands_person_id, account_id, change_amount, total_price, pay_type, remark,
AccountMoneyList, Discount, DiscountMoney, DiscountLastMoney, OtherMoney, OtherMoneyList, sales_man, account_id_list, account_money_list, discount, discount_money, discount_last_money,
OtherMoneyItem, AccountDay, Status, LinkNumber, tenant_id, delete_Flag other_money, other_money_list, other_money_item, account_day, status, link_number,
tenant_id, delete_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
select select
...@@ -102,7 +103,7 @@ ...@@ -102,7 +103,7 @@
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_depothead from jsh_depot_head
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
...@@ -113,130 +114,130 @@ ...@@ -113,130 +114,130 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_depothead from jsh_depot_head
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">
delete from jsh_depothead delete from jsh_depot_head
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample">
delete from jsh_depothead delete from jsh_depot_head
<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.DepotHead"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotHead">
insert into jsh_depothead (Id, Type, SubType, insert into jsh_depot_head (id, type, sub_type,
DefaultNumber, Number, OperPersonName, default_number, number, oper_person_name,
CreateTime, OperTime, OrganId, create_time, oper_time, organ_id,
HandsPersonId, AccountId, ChangeAmount, hands_person_id, account_id, change_amount,
TotalPrice, PayType, Remark, total_price, pay_type, remark,
Salesman, AccountIdList, AccountMoneyList, sales_man, account_id_list, account_money_list,
Discount, DiscountMoney, DiscountLastMoney, discount, discount_money, discount_last_money,
OtherMoney, OtherMoneyList, OtherMoneyItem, other_money, other_money_list, other_money_item,
AccountDay, Status, LinkNumber, account_day, status, link_number,
tenant_id, delete_Flag) tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
#{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{operpersonname,jdbcType=VARCHAR}, #{defaultNumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{operPersonName,jdbcType=VARCHAR},
#{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP}, #{organid,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{operTime,jdbcType=TIMESTAMP}, #{organId,jdbcType=BIGINT},
#{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT}, #{changeamount,jdbcType=DECIMAL}, #{handsPersonId,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalprice,jdbcType=DECIMAL}, #{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{totalPrice,jdbcType=DECIMAL}, #{payType,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{salesman,jdbcType=VARCHAR}, #{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{salesMan,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR},
#{discount,jdbcType=DECIMAL}, #{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{discount,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL},
#{othermoney,jdbcType=DECIMAL}, #{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{otherMoney,jdbcType=DECIMAL}, #{otherMoneyList,jdbcType=VARCHAR}, #{otherMoneyItem,jdbcType=VARCHAR},
#{accountday,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR}, #{accountDay,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{linkNumber,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
insert into jsh_depothead insert into jsh_depot_head
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
Id, id,
</if> </if>
<if test="type != null"> <if test="type != null">
Type, type,
</if> </if>
<if test="subtype != null"> <if test="subType != null">
SubType, sub_type,
</if> </if>
<if test="defaultnumber != null"> <if test="defaultNumber != null">
DefaultNumber, default_number,
</if> </if>
<if test="number != null"> <if test="number != null">
Number, number,
</if> </if>
<if test="operpersonname != null"> <if test="operPersonName != null">
OperPersonName, oper_person_name,
</if> </if>
<if test="createtime != null"> <if test="createTime != null">
CreateTime, create_time,
</if> </if>
<if test="opertime != null"> <if test="operTime != null">
OperTime, oper_time,
</if> </if>
<if test="organid != null"> <if test="organId != null">
OrganId, organ_id,
</if> </if>
<if test="handspersonid != null"> <if test="handsPersonId != null">
HandsPersonId, hands_person_id,
</if> </if>
<if test="accountid != null"> <if test="accountId != null">
AccountId, account_id,
</if> </if>
<if test="changeamount != null"> <if test="changeAmount != null">
ChangeAmount, change_amount,
</if> </if>
<if test="totalprice != null"> <if test="totalPrice != null">
TotalPrice, total_price,
</if> </if>
<if test="paytype != null"> <if test="payType != null">
PayType, pay_type,
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark, remark,
</if> </if>
<if test="salesman != null"> <if test="salesMan != null">
Salesman, sales_man,
</if> </if>
<if test="accountidlist != null"> <if test="accountIdList != null">
AccountIdList, account_id_list,
</if> </if>
<if test="accountmoneylist != null"> <if test="accountMoneyList != null">
AccountMoneyList, account_money_list,
</if> </if>
<if test="discount != null"> <if test="discount != null">
Discount, discount,
</if> </if>
<if test="discountmoney != null"> <if test="discountMoney != null">
DiscountMoney, discount_money,
</if> </if>
<if test="discountlastmoney != null"> <if test="discountLastMoney != null">
DiscountLastMoney, discount_last_money,
</if> </if>
<if test="othermoney != null"> <if test="otherMoney != null">
OtherMoney, other_money,
</if> </if>
<if test="othermoneylist != null"> <if test="otherMoneyList != null">
OtherMoneyList, other_money_list,
</if> </if>
<if test="othermoneyitem != null"> <if test="otherMoneyItem != null">
OtherMoneyItem, other_money_item,
</if> </if>
<if test="accountday != null"> <if test="accountDay != null">
AccountDay, account_day,
</if> </if>
<if test="status != null"> <if test="status != null">
Status, status,
</if> </if>
<if test="linknumber != null"> <if test="linkNumber != null">
LinkNumber, link_number,
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id, tenant_id,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -246,80 +247,80 @@ ...@@ -246,80 +247,80 @@
<if test="type != null"> <if test="type != null">
#{type,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
</if> </if>
<if test="subtype != null"> <if test="subType != null">
#{subtype,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
</if> </if>
<if test="defaultnumber != null"> <if test="defaultNumber != null">
#{defaultnumber,jdbcType=VARCHAR}, #{defaultNumber,jdbcType=VARCHAR},
</if> </if>
<if test="number != null"> <if test="number != null">
#{number,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
</if> </if>
<if test="operpersonname != null"> <if test="operPersonName != null">
#{operpersonname,jdbcType=VARCHAR}, #{operPersonName,jdbcType=VARCHAR},
</if> </if>
<if test="createtime != null"> <if test="createTime != null">
#{createtime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="opertime != null"> <if test="operTime != null">
#{opertime,jdbcType=TIMESTAMP}, #{operTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="organid != null"> <if test="organId != null">
#{organid,jdbcType=BIGINT}, #{organId,jdbcType=BIGINT},
</if> </if>
<if test="handspersonid != null"> <if test="handsPersonId != null">
#{handspersonid,jdbcType=BIGINT}, #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="accountid != null"> <if test="accountId != null">
#{accountid,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT},
</if> </if>
<if test="changeamount != null"> <if test="changeAmount != null">
#{changeamount,jdbcType=DECIMAL}, #{changeAmount,jdbcType=DECIMAL},
</if> </if>
<if test="totalprice != null"> <if test="totalPrice != null">
#{totalprice,jdbcType=DECIMAL}, #{totalPrice,jdbcType=DECIMAL},
</if> </if>
<if test="paytype != null"> <if test="payType != null">
#{paytype,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="salesman != null"> <if test="salesMan != null">
#{salesman,jdbcType=VARCHAR}, #{salesMan,jdbcType=VARCHAR},
</if> </if>
<if test="accountidlist != null"> <if test="accountIdList != null">
#{accountidlist,jdbcType=VARCHAR}, #{accountIdList,jdbcType=VARCHAR},
</if> </if>
<if test="accountmoneylist != null"> <if test="accountMoneyList != null">
#{accountmoneylist,jdbcType=VARCHAR}, #{accountMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="discount != null"> <if test="discount != null">
#{discount,jdbcType=DECIMAL}, #{discount,jdbcType=DECIMAL},
</if> </if>
<if test="discountmoney != null"> <if test="discountMoney != null">
#{discountmoney,jdbcType=DECIMAL}, #{discountMoney,jdbcType=DECIMAL},
</if> </if>
<if test="discountlastmoney != null"> <if test="discountLastMoney != null">
#{discountlastmoney,jdbcType=DECIMAL}, #{discountLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="othermoney != null"> <if test="otherMoney != null">
#{othermoney,jdbcType=DECIMAL}, #{otherMoney,jdbcType=DECIMAL},
</if> </if>
<if test="othermoneylist != null"> <if test="otherMoneyList != null">
#{othermoneylist,jdbcType=VARCHAR}, #{otherMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="othermoneyitem != null"> <if test="otherMoneyItem != null">
#{othermoneyitem,jdbcType=VARCHAR}, #{otherMoneyItem,jdbcType=VARCHAR},
</if> </if>
<if test="accountday != null"> <if test="accountDay != null">
#{accountday,jdbcType=INTEGER}, #{accountDay,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="status != null">
#{status,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
</if> </if>
<if test="linknumber != null"> <if test="linkNumber != null">
#{linknumber,jdbcType=VARCHAR}, #{linkNumber,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
#{tenantId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
...@@ -330,100 +331,100 @@ ...@@ -330,100 +331,100 @@
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultType="java.lang.Long">
select count(*) from jsh_depothead select count(*) from jsh_depot_head
<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">
update jsh_depothead update jsh_depot_head
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.type != null"> <if test="record.type != null">
Type = #{record.type,jdbcType=VARCHAR}, type = #{record.type,jdbcType=VARCHAR},
</if> </if>
<if test="record.subtype != null"> <if test="record.subType != null">
SubType = #{record.subtype,jdbcType=VARCHAR}, sub_type = #{record.subType,jdbcType=VARCHAR},
</if> </if>
<if test="record.defaultnumber != null"> <if test="record.defaultNumber != null">
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR}, default_number = #{record.defaultNumber,jdbcType=VARCHAR},
</if> </if>
<if test="record.number != null"> <if test="record.number != null">
Number = #{record.number,jdbcType=VARCHAR}, number = #{record.number,jdbcType=VARCHAR},
</if> </if>
<if test="record.operpersonname != null"> <if test="record.operPersonName != null">
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR}, oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
</if> </if>
<if test="record.createtime != null"> <if test="record.createTime != null">
CreateTime = #{record.createtime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.opertime != null"> <if test="record.operTime != null">
OperTime = #{record.opertime,jdbcType=TIMESTAMP}, oper_time = #{record.operTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.organid != null"> <if test="record.organId != null">
OrganId = #{record.organid,jdbcType=BIGINT}, organ_id = #{record.organId,jdbcType=BIGINT},
</if> </if>
<if test="record.handspersonid != null"> <if test="record.handsPersonId != null">
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="record.accountid != null"> <if test="record.accountId != null">
AccountId = #{record.accountid,jdbcType=BIGINT}, account_id = #{record.accountId,jdbcType=BIGINT},
</if> </if>
<if test="record.changeamount != null"> <if test="record.changeAmount != null">
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL}, change_amount = #{record.changeAmount,jdbcType=DECIMAL},
</if> </if>
<if test="record.totalprice != null"> <if test="record.totalPrice != null">
TotalPrice = #{record.totalprice,jdbcType=DECIMAL}, total_price = #{record.totalPrice,jdbcType=DECIMAL},
</if> </if>
<if test="record.paytype != null"> <if test="record.payType != null">
PayType = #{record.paytype,jdbcType=VARCHAR}, pay_type = #{record.payType,jdbcType=VARCHAR},
</if> </if>
<if test="record.remark != null"> <if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.salesman != null"> <if test="record.salesMan != null">
Salesman = #{record.salesman,jdbcType=VARCHAR}, sales_man = #{record.salesMan,jdbcType=VARCHAR},
</if> </if>
<if test="record.accountidlist != null"> <if test="record.accountIdList != null">
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR}, account_id_list = #{record.accountIdList,jdbcType=VARCHAR},
</if> </if>
<if test="record.accountmoneylist != null"> <if test="record.accountMoneyList != null">
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR}, account_money_list = #{record.accountMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="record.discount != null"> <if test="record.discount != null">
Discount = #{record.discount,jdbcType=DECIMAL}, discount = #{record.discount,jdbcType=DECIMAL},
</if> </if>
<if test="record.discountmoney != null"> <if test="record.discountMoney != null">
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL}, discount_money = #{record.discountMoney,jdbcType=DECIMAL},
</if> </if>
<if test="record.discountlastmoney != null"> <if test="record.discountLastMoney != null">
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL}, discount_last_money = #{record.discountLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="record.othermoney != null"> <if test="record.otherMoney != null">
OtherMoney = #{record.othermoney,jdbcType=DECIMAL}, other_money = #{record.otherMoney,jdbcType=DECIMAL},
</if> </if>
<if test="record.othermoneylist != null"> <if test="record.otherMoneyList != null">
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR}, other_money_list = #{record.otherMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="record.othermoneyitem != null"> <if test="record.otherMoneyItem != null">
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR}, other_money_item = #{record.otherMoneyItem,jdbcType=VARCHAR},
</if> </if>
<if test="record.accountday != null"> <if test="record.accountDay != null">
AccountDay = #{record.accountday,jdbcType=INTEGER}, account_day = #{record.accountDay,jdbcType=INTEGER},
</if> </if>
<if test="record.status != null"> <if test="record.status != null">
Status = #{record.status,jdbcType=VARCHAR}, status = #{record.status,jdbcType=VARCHAR},
</if> </if>
<if test="record.linknumber != null"> <if test="record.linkNumber != null">
LinkNumber = #{record.linknumber,jdbcType=VARCHAR}, link_number = #{record.linkNumber,jdbcType=VARCHAR},
</if> </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>
<if test="record.deleteFlag != null"> <if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -431,160 +432,160 @@ ...@@ -431,160 +432,160 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update jsh_depothead update jsh_depot_head
set Id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
Type = #{record.type,jdbcType=VARCHAR}, type = #{record.type,jdbcType=VARCHAR},
SubType = #{record.subtype,jdbcType=VARCHAR}, sub_type = #{record.subType,jdbcType=VARCHAR},
DefaultNumber = #{record.defaultnumber,jdbcType=VARCHAR}, default_number = #{record.defaultNumber,jdbcType=VARCHAR},
Number = #{record.number,jdbcType=VARCHAR}, number = #{record.number,jdbcType=VARCHAR},
OperPersonName = #{record.operpersonname,jdbcType=VARCHAR}, oper_person_name = #{record.operPersonName,jdbcType=VARCHAR},
CreateTime = #{record.createtime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
OperTime = #{record.opertime,jdbcType=TIMESTAMP}, oper_time = #{record.operTime,jdbcType=TIMESTAMP},
OrganId = #{record.organid,jdbcType=BIGINT}, organ_id = #{record.organId,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT}, hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT}, account_id = #{record.accountId,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=DECIMAL}, change_amount = #{record.changeAmount,jdbcType=DECIMAL},
TotalPrice = #{record.totalprice,jdbcType=DECIMAL}, total_price = #{record.totalPrice,jdbcType=DECIMAL},
PayType = #{record.paytype,jdbcType=VARCHAR}, pay_type = #{record.payType,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR}, sales_man = #{record.salesMan,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR}, account_id_list = #{record.accountIdList,jdbcType=VARCHAR},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR}, account_money_list = #{record.accountMoneyList,jdbcType=VARCHAR},
Discount = #{record.discount,jdbcType=DECIMAL}, discount = #{record.discount,jdbcType=DECIMAL},
DiscountMoney = #{record.discountmoney,jdbcType=DECIMAL}, discount_money = #{record.discountMoney,jdbcType=DECIMAL},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=DECIMAL}, discount_last_money = #{record.discountLastMoney,jdbcType=DECIMAL},
OtherMoney = #{record.othermoney,jdbcType=DECIMAL}, other_money = #{record.otherMoney,jdbcType=DECIMAL},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR}, other_money_list = #{record.otherMoneyList,jdbcType=VARCHAR},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR}, other_money_item = #{record.otherMoneyItem,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER}, account_day = #{record.accountDay,jdbcType=INTEGER},
Status = #{record.status,jdbcType=VARCHAR}, status = #{record.status,jdbcType=VARCHAR},
LinkNumber = #{record.linknumber,jdbcType=VARCHAR}, link_number = #{record.linkNumber,jdbcType=VARCHAR},
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">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
update jsh_depothead update jsh_depot_head
<set> <set>
<if test="type != null"> <if test="type != null">
Type = #{type,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR},
</if> </if>
<if test="subtype != null"> <if test="subType != null">
SubType = #{subtype,jdbcType=VARCHAR}, sub_type = #{subType,jdbcType=VARCHAR},
</if> </if>
<if test="defaultnumber != null"> <if test="defaultNumber != null">
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR}, default_number = #{defaultNumber,jdbcType=VARCHAR},
</if> </if>
<if test="number != null"> <if test="number != null">
Number = #{number,jdbcType=VARCHAR}, number = #{number,jdbcType=VARCHAR},
</if> </if>
<if test="operpersonname != null"> <if test="operPersonName != null">
OperPersonName = #{operpersonname,jdbcType=VARCHAR}, oper_person_name = #{operPersonName,jdbcType=VARCHAR},
</if> </if>
<if test="createtime != null"> <if test="createTime != null">
CreateTime = #{createtime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="opertime != null"> <if test="operTime != null">
OperTime = #{opertime,jdbcType=TIMESTAMP}, oper_time = #{operTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="organid != null"> <if test="organId != null">
OrganId = #{organid,jdbcType=BIGINT}, organ_id = #{organId,jdbcType=BIGINT},
</if> </if>
<if test="handspersonid != null"> <if test="handsPersonId != null">
HandsPersonId = #{handspersonid,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
</if> </if>
<if test="accountid != null"> <if test="accountId != null">
AccountId = #{accountid,jdbcType=BIGINT}, account_id = #{accountId,jdbcType=BIGINT},
</if> </if>
<if test="changeamount != null"> <if test="changeAmount != null">
ChangeAmount = #{changeamount,jdbcType=DECIMAL}, change_amount = #{changeAmount,jdbcType=DECIMAL},
</if> </if>
<if test="totalprice != null"> <if test="totalPrice != null">
TotalPrice = #{totalprice,jdbcType=DECIMAL}, total_price = #{totalPrice,jdbcType=DECIMAL},
</if> </if>
<if test="paytype != null"> <if test="payType != null">
PayType = #{paytype,jdbcType=VARCHAR}, pay_type = #{payType,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="salesman != null"> <if test="salesMan != null">
Salesman = #{salesman,jdbcType=VARCHAR}, sales_man = #{salesMan,jdbcType=VARCHAR},
</if> </if>
<if test="accountidlist != null"> <if test="accountIdList != null">
AccountIdList = #{accountidlist,jdbcType=VARCHAR}, account_id_list = #{accountIdList,jdbcType=VARCHAR},
</if> </if>
<if test="accountmoneylist != null"> <if test="accountMoneyList != null">
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR}, account_money_list = #{accountMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="discount != null"> <if test="discount != null">
Discount = #{discount,jdbcType=DECIMAL}, discount = #{discount,jdbcType=DECIMAL},
</if> </if>
<if test="discountmoney != null"> <if test="discountMoney != null">
DiscountMoney = #{discountmoney,jdbcType=DECIMAL}, discount_money = #{discountMoney,jdbcType=DECIMAL},
</if> </if>
<if test="discountlastmoney != null"> <if test="discountLastMoney != null">
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL}, discount_last_money = #{discountLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="othermoney != null"> <if test="otherMoney != null">
OtherMoney = #{othermoney,jdbcType=DECIMAL}, other_money = #{otherMoney,jdbcType=DECIMAL},
</if> </if>
<if test="othermoneylist != null"> <if test="otherMoneyList != null">
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR}, other_money_list = #{otherMoneyList,jdbcType=VARCHAR},
</if> </if>
<if test="othermoneyitem != null"> <if test="otherMoneyItem != null">
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR}, other_money_item = #{otherMoneyItem,jdbcType=VARCHAR},
</if> </if>
<if test="accountday != null"> <if test="accountDay != null">
AccountDay = #{accountday,jdbcType=INTEGER}, account_day = #{accountDay,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="status != null">
Status = #{status,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR},
</if> </if>
<if test="linknumber != null"> <if test="linkNumber != null">
LinkNumber = #{linknumber,jdbcType=VARCHAR}, link_number = #{linkNumber,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT}, tenant_id = #{tenantId,jdbcType=BIGINT},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotHead">
update jsh_depothead update jsh_depot_head
set Type = #{type,jdbcType=VARCHAR}, set type = #{type,jdbcType=VARCHAR},
SubType = #{subtype,jdbcType=VARCHAR}, sub_type = #{subType,jdbcType=VARCHAR},
DefaultNumber = #{defaultnumber,jdbcType=VARCHAR}, default_number = #{defaultNumber,jdbcType=VARCHAR},
Number = #{number,jdbcType=VARCHAR}, number = #{number,jdbcType=VARCHAR},
OperPersonName = #{operpersonname,jdbcType=VARCHAR}, oper_person_name = #{operPersonName,jdbcType=VARCHAR},
CreateTime = #{createtime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
OperTime = #{opertime,jdbcType=TIMESTAMP}, oper_time = #{operTime,jdbcType=TIMESTAMP},
OrganId = #{organid,jdbcType=BIGINT}, organ_id = #{organId,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT}, hands_person_id = #{handsPersonId,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT}, account_id = #{accountId,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=DECIMAL}, change_amount = #{changeAmount,jdbcType=DECIMAL},
TotalPrice = #{totalprice,jdbcType=DECIMAL}, total_price = #{totalPrice,jdbcType=DECIMAL},
PayType = #{paytype,jdbcType=VARCHAR}, pay_type = #{payType,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR}, sales_man = #{salesMan,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR}, account_id_list = #{accountIdList,jdbcType=VARCHAR},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR}, account_money_list = #{accountMoneyList,jdbcType=VARCHAR},
Discount = #{discount,jdbcType=DECIMAL}, discount = #{discount,jdbcType=DECIMAL},
DiscountMoney = #{discountmoney,jdbcType=DECIMAL}, discount_money = #{discountMoney,jdbcType=DECIMAL},
DiscountLastMoney = #{discountlastmoney,jdbcType=DECIMAL}, discount_last_money = #{discountLastMoney,jdbcType=DECIMAL},
OtherMoney = #{othermoney,jdbcType=DECIMAL}, other_money = #{otherMoney,jdbcType=DECIMAL},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR}, other_money_list = #{otherMoneyList,jdbcType=VARCHAR},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR}, other_money_item = #{otherMoneyItem,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER}, account_day = #{accountDay,jdbcType=INTEGER},
Status = #{status,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR},
LinkNumber = #{linknumber,jdbcType=VARCHAR}, link_number = #{linkNumber,jdbcType=VARCHAR},
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}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -31,47 +31,47 @@ ...@@ -31,47 +31,47 @@
</resultMap> </resultMap>
<resultMap id="ResultStatementAccount" type="com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount"> <resultMap id="ResultStatementAccount" type="com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount">
<result column="Number" jdbcType="VARCHAR" property="number" /> <result column="number" jdbcType="VARCHAR" property="number" />
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="DiscountLastMoney" jdbcType="DECIMAL" property="discountLastMoney" /> <result column="discount_last_money" jdbcType="DECIMAL" property="discountLastMoney" />
<result column="OtherMoney" jdbcType="DECIMAL" property="otherMoney" /> <result column="other_money" jdbcType="DECIMAL" property="otherMoney" />
<result column="ChangeAmount" jdbcType="DECIMAL" property="changeAmount" /> <result column="change_amount" jdbcType="DECIMAL" property="changeAmount" />
<result column="supplierName" jdbcType="VARCHAR" property="supplierName" /> <result column="supplierName" jdbcType="VARCHAR" property="supplierName" />
<result column="oTime" jdbcType="VARCHAR" property="oTime" /> <result column="oTime" jdbcType="VARCHAR" property="oTime" />
</resultMap> </resultMap>
<select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx"> <select id="selectByConditionDepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select distinct dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName select distinct dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName
from jsh_depothead dh from jsh_depot_head dh
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1' left join jsh_person p on dh.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1' left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
left join jsh_depotitem di on dh.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1' left join jsh_depot_item di on dh.id = di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1' left join jsh_material m on di.material_id = m.id and ifnull(m.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="type != null"> <if test="type != null">
and dh.Type='${type}' and dh.type='${type}'
</if> </if>
<if test="subType != null"> <if test="subType != null">
and dh.SubType='${subType}' and dh.sub_type='${subType}'
</if> </if>
<if test="number != null"> <if test="number != null">
and dh.Number like '%${number}%' and dh.number like '%${number}%'
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and dh.OperTime >= '${beginTime}' and dh.oper_time >= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and dh.OperTime &lt;= '${endTime}' and dh.oper_time &lt;= '${endTime}'
</if> </if>
<if test="materialParam != null"> <if test="materialParam != null">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%') and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
</if> </if>
<if test="depotIds != null"> <if test="depotIds != null">
and di.DepotId in (${depotIds}) and di.depot_id in (${depotIds})
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
order by dh.Id desc order by dh.id desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -79,69 +79,69 @@ ...@@ -79,69 +79,69 @@
<select id="countsByDepotHead" resultType="java.lang.Long"> <select id="countsByDepotHead" resultType="java.lang.Long">
SELECT SELECT
COUNT(1) from COUNT(1) from
(select distinct jsh_depothead.* FROM jsh_depothead (select distinct jsh_depot_head.* FROM jsh_depot_head
left join jsh_depotitem di on jsh_depothead.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1' left join jsh_depot_item di on jsh_depot_head.Id = di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1' left join jsh_material m on di.material_id = m.Id and ifnull(m.delete_Flag,'0') !='1'
WHERE 1=1 WHERE 1=1
<if test="type != null"> <if test="type != null">
and Type='${type}' and type='${type}'
</if> </if>
<if test="subType != null"> <if test="subType != null">
and SubType='${subType}' and sub_type='${subType}'
</if> </if>
<if test="number != null"> <if test="number != null">
and Number like '%${number}%' and number like '%${number}%'
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and OperTime >= '${beginTime}' and oper_time >= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and OperTime &lt;= '${endTime}' and oper_time &lt;= '${endTime}'
</if> </if>
<if test="materialParam != null"> <if test="materialParam != null">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%') and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
</if> </if>
<if test="depotIds != null"> <if test="depotIds != null">
and di.DepotId in (${depotIds}) and di.depot_id in (${depotIds})
</if> </if>
and ifnull(jsh_depothead.delete_Flag,'0') !='1') tb and ifnull(jsh_depot_head.delete_Flag,'0') !='1') tb
</select> </select>
<select id="getMaxId" resultType="java.lang.Long"> <select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_depothead select max(id) as id from jsh_depot_head
</select> </select>
<select id="findMaterialsListByHeaderId" resultType="java.lang.String"> <select id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName
from jsh_depotitem from jsh_depot_item
inner join jsh_material on jsh_depotitem.MaterialId = jsh_material.Id and ifnull(jsh_material.delete_Flag,'0') !='1' inner join jsh_material on jsh_depot_item.material_id = jsh_material.Id and ifnull(jsh_material.delete_Flag,'0') !='1'
where jsh_depotitem.HeaderId = ${id} where jsh_depot_item.header_id = ${id}
and ifnull(jsh_depotitem.delete_Flag,'0') !='1' and ifnull(jsh_depot_item.delete_flag,'0') !='1'
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap"> <select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select dh.Number,m.`name` MName,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier SName,d.dName DName, select dh.number,m.`name` MName,m.model,di.unit_price,di.oper_number,di.all_price,s.supplier SName,d.dName DName,
date_format(dh.OperTime, '%Y-%m-%d') OperTime, concat(dh.SubType,dh.Type) as NewType date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType
from jsh_depothead dh from jsh_depot_head dh
inner join jsh_depotitem di on di.HeaderId=dh.id and ifnull(di.delete_Flag,'0') !='1' inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
inner join jsh_material m on m.id=di.MaterialId and ifnull(m.delete_Flag,'0') !='1' inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
inner join (select id,name as dName,delete_Flag from jsh_depot ) d on d.id=di.DepotId and ifnull(d.delete_Flag,'0') !='1' inner join (select id,name as dName,delete_Flag from jsh_depot ) d on d.id=di.depot_id and ifnull(d.delete_Flag,'0') !='1'
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' where dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and dh.OrganId = ${oId} and dh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and di.DepotId = ${pid} and di.depot_id = ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and di.DepotId in (${dids}) and di.depot_id in (${dids})
</if> </if>
<if test="type != null"> <if test="type != null">
and dh.Type='${type}' and dh.type='${type}'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
ORDER BY OperTime DESC,Number desc ORDER BY oper_time DESC,number desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -149,81 +149,81 @@ ...@@ -149,81 +149,81 @@
<select id="findByAllCount" resultType="java.lang.Integer"> <select id="findByAllCount" resultType="java.lang.Integer">
select count(1) select count(1)
from jsh_depothead dh from jsh_depot_head dh
inner join jsh_depotitem di on di.HeaderId=dh.id and ifnull(di.delete_Flag,'0') !='1' inner join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
inner join jsh_material m on m.id=di.MaterialId and ifnull(m.delete_Flag,'0') !='1' inner join jsh_material m on m.id=di.material_id and ifnull(m.delete_Flag,'0') !='1'
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
inner join (select id,name as dName,delete_Flag from jsh_depot) d on d.id=di.DepotId and ifnull(d.delete_Flag,'0') !='1' inner join (select id,name as dName,delete_Flag from jsh_depot) d on d.id=di.depot_id and ifnull(d.delete_Flag,'0') !='1'
where dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' where dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and dh.OrganId = ${oId} and dh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and di.DepotId = ${pid} and di.depot_id = ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and di.DepotId in (${dids}) and di.depot_id in (${dids})
</if> </if>
<if test="type != null"> <if test="type != null">
and dh.Type='${type}' and dh.type='${type}'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
ORDER BY OperTime DESC,Number desc ORDER BY oper_time DESC,number desc
</select> </select>
<select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount"> <select id="findInOutMaterialCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultInOutMaterialCount">
select di.MaterialId, m.mName,m.Model,m.categoryName, select di.material_id, m.mName,m.Model,m.categoryName,
(select sum(jdi.BasicNumber) numSum from jsh_depothead jdh (select sum(jdi.basic_number) numSum from jsh_depot_head jdh
INNER JOIN jsh_depotitem jdi on jdh.id=jdi.HeaderId and ifnull(jdi.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item jdi on jdh.id=jdi.header_id and ifnull(jdi.delete_flag,'0') !='1'
where jdi.MaterialId=di.MaterialId where jdi.material_id=di.material_id
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}' and jdh.type='${type}' and jdh.oper_time >='${beginTime}' and jdh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and jdh.OrganId = ${oId} and jdh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and jdi.DepotId= ${pid} and jdi.depot_id= ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and jdi.DepotId in (${dids}) and jdi.depot_id in (${dids})
</if> </if>
and ifnull(jdh.delete_Flag,'0') !='1' and ifnull(jdh.delete_flag,'0') !='1'
) numSum, ) numSum,
(select sum(jdi.AllPrice) priceSum from jsh_depothead jdh (select sum(jdi.all_price) priceSum from jsh_depot_head jdh
INNER JOIN jsh_depotitem jdi on jdh.id=jdi.HeaderId and ifnull(jdi.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item jdi on jdh.id=jdi.header_id and ifnull(jdi.delete_flag,'0') !='1'
where jdi.MaterialId=di.MaterialId where jdi.material_id=di.material_id
and jdh.type='${type}' and jdh.OperTime >='${beginTime}' and jdh.OperTime &lt;='${endTime}' and jdh.type='${type}' and jdh.oper_time >='${beginTime}' and jdh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and jdh.OrganId = ${oId} and jdh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and jdi.DepotId= ${pid} and jdi.depot_id= ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and jdi.DepotId in (${dids}) and jdi.depot_id in (${dids})
</if> </if>
and ifnull(jdh.delete_Flag,'0') !='1' and ifnull(jdh.delete_flag,'0') !='1'
) priceSum ) priceSum
from jsh_depothead dh from jsh_depot_head dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
from jsh_material from jsh_material
LEFT JOIN jsh_material_category on jsh_material.CategoryId=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2' LEFT JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1' where ifnull(jsh_material.delete_Flag,'0') !='1'
) m ) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' on m.Id=di.material_id where dh.type='${type}' and dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and dh.OrganId = ${oId} and dh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and di.DepotId= ${pid} and di.depot_id= ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and di.DepotId in (${dids}) and di.depot_id in (${dids})
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName GROUP BY di.material_id,m.mName,m.Model,m.categoryName
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -231,46 +231,46 @@ ...@@ -231,46 +231,46 @@
<select id="findInOutMaterialCountTotal" resultType="java.lang.Integer"> <select id="findInOutMaterialCountTotal" resultType="java.lang.Integer">
select count(1) from select count(1) from
(select di.MaterialId, m.mName,m.Model,m.categoryName from jsh_depothead dh (select di.material_id, m.mName,m.Model,m.categoryName from jsh_depot_head dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_material_category.`Name` categoryName
from jsh_material from jsh_material
LEFT JOIN jsh_material_category on jsh_material.CategoryId=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2' LEFT JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.status,'0') !='2'
where ifnull(jsh_material.delete_Flag,'0') !='1' where ifnull(jsh_material.delete_Flag,'0') !='1'
) m on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' ) m on m.Id=di.material_id where dh.type='${type}' and dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="oId != null"> <if test="oId != null">
and dh.OrganId = ${oId} and dh.organ_id = ${oId}
</if> </if>
<if test="pid != null"> <if test="pid != null">
and di.DepotId= ${pid} and di.depot_id= ${pid}
</if> </if>
<if test="pid == null"> <if test="pid == null">
and di.DepotId in (${dids}) and di.depot_id in (${dids})
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName) a GROUP BY di.material_id,m.mName,m.Model,m.categoryName) a
</select> </select>
<select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount"> <select id="findStatementAccount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStatementAccount">
select dh.Number,concat(dh.SubType,dh.Type) as type,dh.DiscountLastMoney,dh.OtherMoney,dh.ChangeAmount,s.supplier supplierName, select dh.number,concat(dh.sub_type,dh.type) as type,dh.discount_last_money,dh.other_money,dh.change_amount,s.supplier supplierName,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depothead dh date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_depot_head dh
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
where s.type='${supType}' and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单') where s.type='${supType}' and (dh.sub_type!='其它' and dh.sub_type!='采购订单' and dh.sub_type!='销售订单')
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' and dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="organId != null"> <if test="organId != null">
and dh.OrganId=${organId} and dh.organ_id=${organId}
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
UNION ALL UNION ALL
select ah.BillNo Number,ah.Type as newType,ah.TotalPrice DiscountLastMoney, 0 OtherMoney,ah.ChangeAmount,s.supplier supplierName, select ah.bill_no number,ah.type as newType,ah.total_price discount_last_money, 0 other_money,ah.change_amount,s.supplier supplierName,
date_format(ah.BillTime,'%Y-%m-%d %H:%i:%S') as oTime from jsh_accounthead ah date_format(ah.bill_time,'%Y-%m-%d %H:%i:%S') as oTime from jsh_account_head ah
inner join jsh_supplier s on s.id=ah.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=ah.organ_id and ifnull(s.delete_Flag,'0') !='1'
where s.type='${supType}' where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}' and ah.bill_time >='${beginTime}' and ah.bill_time &lt;='${endTime}'
<if test="organId != null"> <if test="organId != null">
and ah.OrganId=${organId} and ah.organ_id=${organId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
ORDER BY oTime ORDER BY oTime
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -280,49 +280,49 @@ ...@@ -280,49 +280,49 @@
<select id="findStatementAccountCount" resultType="java.lang.Integer"> <select id="findStatementAccountCount" resultType="java.lang.Integer">
select sum(a) from select sum(a) from
( (
select count(1) a from jsh_depothead dh select count(1) a from jsh_depot_head dh
inner join jsh_supplier s on s.id=dh.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=dh.organ_id and ifnull(s.delete_Flag,'0') !='1'
where s.type='${supType}' and (dh.SubType!='其它' and dh.SubType!='采购订单' and dh.SubType!='销售订单') where s.type='${supType}' and (dh.sub_type!='其它' and dh.sub_type!='采购订单' and dh.sub_type!='销售订单')
and dh.OperTime >='${beginTime}' and dh.OperTime &lt;='${endTime}' and dh.oper_time >='${beginTime}' and dh.oper_time &lt;='${endTime}'
<if test="organId != null"> <if test="organId != null">
and dh.OrganId=${organId} and dh.organ_id=${organId}
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
UNION ALL UNION ALL
select count(1) a from jsh_accounthead ah select count(1) a from jsh_account_head ah
inner join jsh_supplier s on s.id=ah.OrganId and ifnull(s.delete_Flag,'0') !='1' inner join jsh_supplier s on s.id=ah.organ_id and ifnull(s.delete_Flag,'0') !='1'
where s.type='${supType}' where s.type='${supType}'
and ah.BillTime >='${beginTime}' and ah.BillTime &lt;='${endTime}' and ah.bill_time >='${beginTime}' and ah.bill_time &lt;='${endTime}'
<if test="organId != null"> <if test="organId != null">
and ah.OrganId=${organId} and ah.organ_id=${organId}
</if> </if>
and ifnull(ah.delete_Flag,'0') !='1' and ifnull(ah.delete_flag,'0') !='1'
) cc ) cc
</select> </select>
<select id="findAllMoney" resultType="java.math.BigDecimal"> <select id="findAllMoney" resultType="java.math.BigDecimal">
select ifnull(sum(${modeName}),0) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}' select ifnull(sum(${modeName}),0) as allMoney from jsh_depot_head where type='${type}' and sub_type = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}' and organ_id =${supplierId} and oper_time &lt;='${endTime}'
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="findAllOtherMoney" resultType="java.math.BigDecimal"> <select id="findAllOtherMoney" resultType="java.math.BigDecimal">
select ifnull(sum(OtherMoney),0) as allOtherMoney from jsh_depothead where Type='${type}' and SubType = '${subType}' select ifnull(sum(other_money),0) as allOtherMoney from jsh_depot_head where type='${type}' and sub_type = '${subType}'
and OrganId =${supplierId} and OperTime &lt;='${endTime}' and organ_id =${supplierId} and oper_time &lt;='${endTime}'
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx"> <select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName select dh.*, s.supplier OrganName, p.name HandsPersonName, a.name AccountName
from jsh_depothead dh from jsh_depot_head dh
left join jsh_supplier s on dh.OrganId=s.id and ifnull(s.delete_Flag,'0') !='1' left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_person p on dh.HandsPersonId=p.id and ifnull(p.delete_Flag,'0') !='1' left join jsh_person p on dh.hands_person_id=p.id and ifnull(p.delete_Flag,'0') !='1'
left join jsh_account a on dh.AccountId=a.id and ifnull(a.delete_Flag,'0') !='1' left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'
where 1=1 where 1=1
<if test="number != null"> <if test="number != null">
and dh.Number='${number}' and dh.number='${number}'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
</select> </select>
<update id="updateBuildOnlyNumber"> <update id="updateBuildOnlyNumber">
...@@ -334,8 +334,8 @@ ...@@ -334,8 +334,8 @@
</select> </select>
<update id="batchDeleteDepotHeadByIds"> <update id="batchDeleteDepotHeadByIds">
update jsh_depothead update jsh_depot_head
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
...@@ -346,89 +346,89 @@ ...@@ -346,89 +346,89 @@
<select id="getDepotHeadListByAccountIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"> <select id="getDepotHeadListByAccountIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" />
from jsh_depothead from jsh_depot_head
where 1=1 where 1=1
and accountId in ( and account_id in (
<foreach collection="accountIds" item="accountId" separator=","> <foreach collection="accountIds" item="accountId" separator=",">
#{accountId} #{accountId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDepotHeadListByOrganIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"> <select id="getDepotHeadListByOrganIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" />
from jsh_depothead from jsh_depot_head
where 1=1 where 1=1
and organId in ( and organ_id in (
<foreach collection="organIds" item="organId" separator=","> <foreach collection="organIds" item="organId" separator=",">
#{organId} #{organId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDepotHeadListByHandsPersonIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap"> <select id="getDepotHeadListByHandsPersonIds" resultMap="com.jsh.erp.datasource.mappers.DepotHeadMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotHeadMapper.Base_Column_List" />
from jsh_depothead from jsh_depot_head
where 1=1 where 1=1
and handsPersonId in ( and hands_person_id in (
<foreach collection="handsPersonIds" item="handsPersonId" separator=","> <foreach collection="handsPersonIds" item="handsPersonId" separator=",">
#{handsPersonId} #{handsPersonId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getBuyAndSaleStatistics" resultType="java.math.BigDecimal"> <select id="getBuyAndSaleStatistics" resultType="java.math.BigDecimal">
SELECT SELECT
ifnull(sum(DiscountLastMoney),0) ifnull(sum(discount_last_money),0)
FROM jsh_depothead FROM jsh_depot_head
WHERE 1=1 WHERE 1=1
<if test="type != null"> <if test="type != null">
and Type='${type}' and type='${type}'
</if> </if>
<if test="subType != null"> <if test="subType != null">
and SubType='${subType}' and sub_type='${subType}'
</if> </if>
<if test="hasSupplier == 1"> <if test="hasSupplier == 1">
and OrganId is not null and organ_id is not null
</if> </if>
<if test="hasSupplier == 0"> <if test="hasSupplier == 0">
and OrganId is null and organ_id is null
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and OperTime >= '${beginTime}' and oper_time >= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and OperTime &lt;= '${endTime}' and oper_time &lt;= '${endTime}'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getBuyAndSaleRetailStatistics" resultType="java.math.BigDecimal"> <select id="getBuyAndSaleRetailStatistics" resultType="java.math.BigDecimal">
SELECT SELECT
ifnull(sum(TotalPrice),0) ifnull(sum(total_price),0)
FROM jsh_depothead FROM jsh_depot_head
WHERE 1=1 WHERE 1=1
<if test="type != null"> <if test="type != null">
and Type='${type}' and type='${type}'
</if> </if>
<if test="subType != null"> <if test="subType != null">
and SubType='${subType}' and sub_type='${subType}'
</if> </if>
<if test="hasSupplier == 1"> <if test="hasSupplier == 1">
and OrganId is not null and organ_id is not null
</if> </if>
<if test="hasSupplier == 0"> <if test="hasSupplier == 0">
and OrganId is null and organ_id is null
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and OperTime >= '${beginTime}' and oper_time >= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and OperTime &lt;= '${endTime}' and oper_time &lt;= '${endTime}'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -2,32 +2,32 @@ ...@@ -2,32 +2,32 @@
<!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.DepotItemMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotItem"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotItem">
<id column="Id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="HeaderId" jdbcType="BIGINT" property="headerid" /> <result column="header_id" jdbcType="BIGINT" property="headerId" />
<result column="MaterialId" jdbcType="BIGINT" property="materialid" /> <result column="material_id" jdbcType="BIGINT" property="materialId" />
<result column="material_extend_id" jdbcType="BIGINT" property="materialExtendId" /> <result column="material_extend_id" jdbcType="BIGINT" property="materialExtendId" />
<result column="MUnit" jdbcType="VARCHAR" property="munit" /> <result column="material_unit" jdbcType="VARCHAR" property="materialUnit" />
<result column="OperNumber" jdbcType="DECIMAL" property="opernumber" /> <result column="oper_number" jdbcType="DECIMAL" property="operNumber" />
<result column="BasicNumber" jdbcType="DECIMAL" property="basicnumber" /> <result column="basic_number" jdbcType="DECIMAL" property="basicNumber" />
<result column="UnitPrice" jdbcType="DECIMAL" property="unitprice" /> <result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
<result column="TaxUnitPrice" jdbcType="DECIMAL" property="taxunitprice" /> <result column="tax_unit_price" jdbcType="DECIMAL" property="taxUnitPrice" />
<result column="AllPrice" jdbcType="DECIMAL" property="allprice" /> <result column="all_price" jdbcType="DECIMAL" property="allPrice" />
<result column="Remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="Img" jdbcType="VARCHAR" property="img" /> <result column="img" jdbcType="VARCHAR" property="img" />
<result column="Incidentals" jdbcType="DECIMAL" property="incidentals" /> <result column="incidentals" jdbcType="DECIMAL" property="incidentals" />
<result column="DepotId" jdbcType="BIGINT" property="depotid" /> <result column="depot_id" jdbcType="BIGINT" property="depotId" />
<result column="AnotherDepotId" jdbcType="BIGINT" property="anotherdepotid" /> <result column="another_depot_id" jdbcType="BIGINT" property="anotherDepotId" />
<result column="TaxRate" jdbcType="DECIMAL" property="taxrate" /> <result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="TaxMoney" jdbcType="DECIMAL" property="taxmoney" /> <result column="tax_money" jdbcType="DECIMAL" property="taxMoney" />
<result column="TaxLastMoney" jdbcType="DECIMAL" property="taxlastmoney" /> <result column="tax_last_money" jdbcType="DECIMAL" property="taxLastMoney" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" /> <result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" /> <result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" /> <result column="other_field3" jdbcType="VARCHAR" property="otherField3" />
<result column="OtherField4" jdbcType="VARCHAR" property="otherfield4" /> <result column="other_field4" jdbcType="VARCHAR" property="otherField4" />
<result column="OtherField5" jdbcType="VARCHAR" property="otherfield5" /> <result column="other_field5" jdbcType="VARCHAR" property="otherField5" />
<result column="MType" jdbcType="VARCHAR" property="mtype" /> <result column="material_type" jdbcType="VARCHAR" property="materialType" />
<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> <where>
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
Id, HeaderId, MaterialId, material_extend_id, MUnit, OperNumber, BasicNumber, UnitPrice, id, header_id, material_id, material_extend_id, material_unit, oper_number, basic_number,
TaxUnitPrice, AllPrice, Remark, Img, Incidentals, DepotId, AnotherDepotId, TaxRate, unit_price, tax_unit_price, all_price, remark, img, incidentals, depot_id, another_depot_id,
TaxMoney, TaxLastMoney, OtherField1, OtherField2, OtherField3, OtherField4, OtherField5, tax_rate, tax_money, tax_last_money, other_field1, other_field2, other_field3, other_field4,
MType, tenant_id, delete_Flag other_field5, material_type, tenant_id, delete_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
select select
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
distinct distinct
</if> </if>
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_depotitem from jsh_depot_item
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
...@@ -110,151 +110,151 @@ ...@@ -110,151 +110,151 @@
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_depotitem from jsh_depot_item
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">
delete from jsh_depotitem delete from jsh_depot_item
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample">
delete from jsh_depotitem delete from jsh_depot_item
<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.DepotItem"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.DepotItem">
insert into jsh_depotitem (Id, HeaderId, MaterialId, insert into jsh_depot_item (id, header_id, material_id,
material_extend_id, MUnit, OperNumber, material_extend_id, material_unit, oper_number,
BasicNumber, UnitPrice, TaxUnitPrice, basic_number, unit_price, tax_unit_price,
AllPrice, Remark, Img, all_price, remark, img,
Incidentals, DepotId, AnotherDepotId, incidentals, depot_id, another_depot_id,
TaxRate, TaxMoney, TaxLastMoney, tax_rate, tax_money, tax_last_money,
OtherField1, OtherField2, OtherField3, other_field1, other_field2, other_field3,
OtherField4, OtherField5, MType, other_field4, other_field5, material_type,
tenant_id, delete_Flag) tenant_id, delete_flag)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{materialid,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
#{materialExtendId,jdbcType=BIGINT}, #{munit,jdbcType=VARCHAR}, #{opernumber,jdbcType=DECIMAL}, #{materialExtendId,jdbcType=BIGINT}, #{materialUnit,jdbcType=VARCHAR}, #{operNumber,jdbcType=DECIMAL},
#{basicnumber,jdbcType=DECIMAL}, #{unitprice,jdbcType=DECIMAL}, #{taxunitprice,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL}, #{taxUnitPrice,jdbcType=DECIMAL},
#{allprice,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{allPrice,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR},
#{incidentals,jdbcType=DECIMAL}, #{depotid,jdbcType=BIGINT}, #{anotherdepotid,jdbcType=BIGINT}, #{incidentals,jdbcType=DECIMAL}, #{depotId,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT},
#{taxrate,jdbcType=DECIMAL}, #{taxmoney,jdbcType=DECIMAL}, #{taxlastmoney,jdbcType=DECIMAL}, #{taxRate,jdbcType=DECIMAL}, #{taxMoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL},
#{otherfield1,jdbcType=VARCHAR}, #{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR}, #{otherField1,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR},
#{otherfield4,jdbcType=VARCHAR}, #{otherfield5,jdbcType=VARCHAR}, #{mtype,jdbcType=VARCHAR}, #{otherField4,jdbcType=VARCHAR}, #{otherField5,jdbcType=VARCHAR}, #{materialType,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
insert into jsh_depotitem insert into jsh_depot_item
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
Id, id,
</if> </if>
<if test="headerid != null"> <if test="headerId != null">
HeaderId, header_id,
</if> </if>
<if test="materialid != null"> <if test="materialId != null">
MaterialId, material_id,
</if> </if>
<if test="materialExtendId != null"> <if test="materialExtendId != null">
material_extend_id, material_extend_id,
</if> </if>
<if test="munit != null"> <if test="materialUnit != null">
MUnit, material_unit,
</if> </if>
<if test="opernumber != null"> <if test="operNumber != null">
OperNumber, oper_number,
</if> </if>
<if test="basicnumber != null"> <if test="basicNumber != null">
BasicNumber, basic_number,
</if> </if>
<if test="unitprice != null"> <if test="unitPrice != null">
UnitPrice, unit_price,
</if> </if>
<if test="taxunitprice != null"> <if test="taxUnitPrice != null">
TaxUnitPrice, tax_unit_price,
</if> </if>
<if test="allprice != null"> <if test="allPrice != null">
AllPrice, all_price,
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark, remark,
</if> </if>
<if test="img != null"> <if test="img != null">
Img, img,
</if> </if>
<if test="incidentals != null"> <if test="incidentals != null">
Incidentals, incidentals,
</if> </if>
<if test="depotid != null"> <if test="depotId != null">
DepotId, depot_id,
</if> </if>
<if test="anotherdepotid != null"> <if test="anotherDepotId != null">
AnotherDepotId, another_depot_id,
</if> </if>
<if test="taxrate != null"> <if test="taxRate != null">
TaxRate, tax_rate,
</if> </if>
<if test="taxmoney != null"> <if test="taxMoney != null">
TaxMoney, tax_money,
</if> </if>
<if test="taxlastmoney != null"> <if test="taxLastMoney != null">
TaxLastMoney, tax_last_money,
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
OtherField1, other_field1,
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
OtherField2, other_field2,
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
OtherField3, other_field3,
</if> </if>
<if test="otherfield4 != null"> <if test="otherField4 != null">
OtherField4, other_field4,
</if> </if>
<if test="otherfield5 != null"> <if test="otherField5 != null">
OtherField5, other_field5,
</if> </if>
<if test="mtype != null"> <if test="materialType != null">
MType, material_type,
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id, tenant_id,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="headerid != null"> <if test="headerId != null">
#{headerid,jdbcType=BIGINT}, #{headerId,jdbcType=BIGINT},
</if> </if>
<if test="materialid != null"> <if test="materialId != null">
#{materialid,jdbcType=BIGINT}, #{materialId,jdbcType=BIGINT},
</if> </if>
<if test="materialExtendId != null"> <if test="materialExtendId != null">
#{materialExtendId,jdbcType=BIGINT}, #{materialExtendId,jdbcType=BIGINT},
</if> </if>
<if test="munit != null"> <if test="materialUnit != null">
#{munit,jdbcType=VARCHAR}, #{materialUnit,jdbcType=VARCHAR},
</if> </if>
<if test="opernumber != null"> <if test="operNumber != null">
#{opernumber,jdbcType=DECIMAL}, #{operNumber,jdbcType=DECIMAL},
</if> </if>
<if test="basicnumber != null"> <if test="basicNumber != null">
#{basicnumber,jdbcType=DECIMAL}, #{basicNumber,jdbcType=DECIMAL},
</if> </if>
<if test="unitprice != null"> <if test="unitPrice != null">
#{unitprice,jdbcType=DECIMAL}, #{unitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="taxunitprice != null"> <if test="taxUnitPrice != null">
#{taxunitprice,jdbcType=DECIMAL}, #{taxUnitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="allprice != null"> <if test="allPrice != null">
#{allprice,jdbcType=DECIMAL}, #{allPrice,jdbcType=DECIMAL},
</if> </if>
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
...@@ -265,38 +265,38 @@ ...@@ -265,38 +265,38 @@
<if test="incidentals != null"> <if test="incidentals != null">
#{incidentals,jdbcType=DECIMAL}, #{incidentals,jdbcType=DECIMAL},
</if> </if>
<if test="depotid != null"> <if test="depotId != null">
#{depotid,jdbcType=BIGINT}, #{depotId,jdbcType=BIGINT},
</if> </if>
<if test="anotherdepotid != null"> <if test="anotherDepotId != null">
#{anotherdepotid,jdbcType=BIGINT}, #{anotherDepotId,jdbcType=BIGINT},
</if> </if>
<if test="taxrate != null"> <if test="taxRate != null">
#{taxrate,jdbcType=DECIMAL}, #{taxRate,jdbcType=DECIMAL},
</if> </if>
<if test="taxmoney != null"> <if test="taxMoney != null">
#{taxmoney,jdbcType=DECIMAL}, #{taxMoney,jdbcType=DECIMAL},
</if> </if>
<if test="taxlastmoney != null"> <if test="taxLastMoney != null">
#{taxlastmoney,jdbcType=DECIMAL}, #{taxLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
#{otherfield1,jdbcType=VARCHAR}, #{otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
#{otherfield2,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
#{otherfield3,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield4 != null"> <if test="otherField4 != null">
#{otherfield4,jdbcType=VARCHAR}, #{otherField4,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield5 != null"> <if test="otherField5 != null">
#{otherfield5,jdbcType=VARCHAR}, #{otherField5,jdbcType=VARCHAR},
</if> </if>
<if test="mtype != null"> <if test="materialType != null">
#{mtype,jdbcType=VARCHAR}, #{materialType,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
#{tenantId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
...@@ -307,91 +307,91 @@ ...@@ -307,91 +307,91 @@
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultType="java.lang.Long">
select count(*) from jsh_depotitem select count(*) from jsh_depot_item
<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">
update jsh_depotitem update jsh_depot_item
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.headerid != null"> <if test="record.headerId != null">
HeaderId = #{record.headerid,jdbcType=BIGINT}, header_id = #{record.headerId,jdbcType=BIGINT},
</if> </if>
<if test="record.materialid != null"> <if test="record.materialId != null">
MaterialId = #{record.materialid,jdbcType=BIGINT}, material_id = #{record.materialId,jdbcType=BIGINT},
</if> </if>
<if test="record.materialExtendId != null"> <if test="record.materialExtendId != null">
material_extend_id = #{record.materialExtendId,jdbcType=BIGINT}, material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
</if> </if>
<if test="record.munit != null"> <if test="record.materialUnit != null">
MUnit = #{record.munit,jdbcType=VARCHAR}, material_unit = #{record.materialUnit,jdbcType=VARCHAR},
</if> </if>
<if test="record.opernumber != null"> <if test="record.operNumber != null">
OperNumber = #{record.opernumber,jdbcType=DECIMAL}, oper_number = #{record.operNumber,jdbcType=DECIMAL},
</if> </if>
<if test="record.basicnumber != null"> <if test="record.basicNumber != null">
BasicNumber = #{record.basicnumber,jdbcType=DECIMAL}, basic_number = #{record.basicNumber,jdbcType=DECIMAL},
</if> </if>
<if test="record.unitprice != null"> <if test="record.unitPrice != null">
UnitPrice = #{record.unitprice,jdbcType=DECIMAL}, unit_price = #{record.unitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="record.taxunitprice != null"> <if test="record.taxUnitPrice != null">
TaxUnitPrice = #{record.taxunitprice,jdbcType=DECIMAL}, tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="record.allprice != null"> <if test="record.allPrice != null">
AllPrice = #{record.allprice,jdbcType=DECIMAL}, all_price = #{record.allPrice,jdbcType=DECIMAL},
</if> </if>
<if test="record.remark != null"> <if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.img != null"> <if test="record.img != null">
Img = #{record.img,jdbcType=VARCHAR}, img = #{record.img,jdbcType=VARCHAR},
</if> </if>
<if test="record.incidentals != null"> <if test="record.incidentals != null">
Incidentals = #{record.incidentals,jdbcType=DECIMAL}, incidentals = #{record.incidentals,jdbcType=DECIMAL},
</if> </if>
<if test="record.depotid != null"> <if test="record.depotId != null">
DepotId = #{record.depotid,jdbcType=BIGINT}, depot_id = #{record.depotId,jdbcType=BIGINT},
</if> </if>
<if test="record.anotherdepotid != null"> <if test="record.anotherDepotId != null">
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT}, another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
</if> </if>
<if test="record.taxrate != null"> <if test="record.taxRate != null">
TaxRate = #{record.taxrate,jdbcType=DECIMAL}, tax_rate = #{record.taxRate,jdbcType=DECIMAL},
</if> </if>
<if test="record.taxmoney != null"> <if test="record.taxMoney != null">
TaxMoney = #{record.taxmoney,jdbcType=DECIMAL}, tax_money = #{record.taxMoney,jdbcType=DECIMAL},
</if> </if>
<if test="record.taxlastmoney != null"> <if test="record.taxLastMoney != null">
TaxLastMoney = #{record.taxlastmoney,jdbcType=DECIMAL}, tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="record.otherfield1 != null"> <if test="record.otherField1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR}, other_field1 = #{record.otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield2 != null"> <if test="record.otherField2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR}, other_field2 = #{record.otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield3 != null"> <if test="record.otherField3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}, other_field3 = #{record.otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield4 != null"> <if test="record.otherField4 != null">
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR}, other_field4 = #{record.otherField4,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield5 != null"> <if test="record.otherField5 != null">
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR}, other_field5 = #{record.otherField5,jdbcType=VARCHAR},
</if> </if>
<if test="record.mtype != null"> <if test="record.materialType != null">
MType = #{record.mtype,jdbcType=VARCHAR}, material_type = #{record.materialType,jdbcType=VARCHAR},
</if> </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>
<if test="record.deleteFlag != null"> <if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -399,145 +399,145 @@ ...@@ -399,145 +399,145 @@
</if> </if>
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update jsh_depotitem update jsh_depot_item
set Id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
HeaderId = #{record.headerid,jdbcType=BIGINT}, header_id = #{record.headerId,jdbcType=BIGINT},
MaterialId = #{record.materialid,jdbcType=BIGINT}, material_id = #{record.materialId,jdbcType=BIGINT},
material_extend_id = #{record.materialExtendId,jdbcType=BIGINT}, material_extend_id = #{record.materialExtendId,jdbcType=BIGINT},
MUnit = #{record.munit,jdbcType=VARCHAR}, material_unit = #{record.materialUnit,jdbcType=VARCHAR},
OperNumber = #{record.opernumber,jdbcType=DECIMAL}, oper_number = #{record.operNumber,jdbcType=DECIMAL},
BasicNumber = #{record.basicnumber,jdbcType=DECIMAL}, basic_number = #{record.basicNumber,jdbcType=DECIMAL},
UnitPrice = #{record.unitprice,jdbcType=DECIMAL}, unit_price = #{record.unitPrice,jdbcType=DECIMAL},
TaxUnitPrice = #{record.taxunitprice,jdbcType=DECIMAL}, tax_unit_price = #{record.taxUnitPrice,jdbcType=DECIMAL},
AllPrice = #{record.allprice,jdbcType=DECIMAL}, all_price = #{record.allPrice,jdbcType=DECIMAL},
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
Img = #{record.img,jdbcType=VARCHAR}, img = #{record.img,jdbcType=VARCHAR},
Incidentals = #{record.incidentals,jdbcType=DECIMAL}, incidentals = #{record.incidentals,jdbcType=DECIMAL},
DepotId = #{record.depotid,jdbcType=BIGINT}, depot_id = #{record.depotId,jdbcType=BIGINT},
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT}, another_depot_id = #{record.anotherDepotId,jdbcType=BIGINT},
TaxRate = #{record.taxrate,jdbcType=DECIMAL}, tax_rate = #{record.taxRate,jdbcType=DECIMAL},
TaxMoney = #{record.taxmoney,jdbcType=DECIMAL}, tax_money = #{record.taxMoney,jdbcType=DECIMAL},
TaxLastMoney = #{record.taxlastmoney,jdbcType=DECIMAL}, tax_last_money = #{record.taxLastMoney,jdbcType=DECIMAL},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR}, other_field1 = #{record.otherField1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR}, other_field2 = #{record.otherField2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}, other_field3 = #{record.otherField3,jdbcType=VARCHAR},
OtherField4 = #{record.otherfield4,jdbcType=VARCHAR}, other_field4 = #{record.otherField4,jdbcType=VARCHAR},
OtherField5 = #{record.otherfield5,jdbcType=VARCHAR}, other_field5 = #{record.otherField5,jdbcType=VARCHAR},
MType = #{record.mtype,jdbcType=VARCHAR}, material_type = #{record.materialType,jdbcType=VARCHAR},
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">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotItem"> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.DepotItem">
update jsh_depotitem update jsh_depot_item
<set> <set>
<if test="headerid != null"> <if test="headerId != null">
HeaderId = #{headerid,jdbcType=BIGINT}, header_id = #{headerId,jdbcType=BIGINT},
</if> </if>
<if test="materialid != null"> <if test="materialId != null">
MaterialId = #{materialid,jdbcType=BIGINT}, material_id = #{materialId,jdbcType=BIGINT},
</if> </if>
<if test="materialExtendId != null"> <if test="materialExtendId != null">
material_extend_id = #{materialExtendId,jdbcType=BIGINT}, material_extend_id = #{materialExtendId,jdbcType=BIGINT},
</if> </if>
<if test="munit != null"> <if test="materialUnit != null">
MUnit = #{munit,jdbcType=VARCHAR}, material_unit = #{materialUnit,jdbcType=VARCHAR},
</if> </if>
<if test="opernumber != null"> <if test="operNumber != null">
OperNumber = #{opernumber,jdbcType=DECIMAL}, oper_number = #{operNumber,jdbcType=DECIMAL},
</if> </if>
<if test="basicnumber != null"> <if test="basicNumber != null">
BasicNumber = #{basicnumber,jdbcType=DECIMAL}, basic_number = #{basicNumber,jdbcType=DECIMAL},
</if> </if>
<if test="unitprice != null"> <if test="unitPrice != null">
UnitPrice = #{unitprice,jdbcType=DECIMAL}, unit_price = #{unitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="taxunitprice != null"> <if test="taxUnitPrice != null">
TaxUnitPrice = #{taxunitprice,jdbcType=DECIMAL}, tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
</if> </if>
<if test="allprice != null"> <if test="allPrice != null">
AllPrice = #{allprice,jdbcType=DECIMAL}, all_price = #{allPrice,jdbcType=DECIMAL},
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="img != null"> <if test="img != null">
Img = #{img,jdbcType=VARCHAR}, img = #{img,jdbcType=VARCHAR},
</if> </if>
<if test="incidentals != null"> <if test="incidentals != null">
Incidentals = #{incidentals,jdbcType=DECIMAL}, incidentals = #{incidentals,jdbcType=DECIMAL},
</if> </if>
<if test="depotid != null"> <if test="depotId != null">
DepotId = #{depotid,jdbcType=BIGINT}, depot_id = #{depotId,jdbcType=BIGINT},
</if> </if>
<if test="anotherdepotid != null"> <if test="anotherDepotId != null">
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT}, another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
</if> </if>
<if test="taxrate != null"> <if test="taxRate != null">
TaxRate = #{taxrate,jdbcType=DECIMAL}, tax_rate = #{taxRate,jdbcType=DECIMAL},
</if> </if>
<if test="taxmoney != null"> <if test="taxMoney != null">
TaxMoney = #{taxmoney,jdbcType=DECIMAL}, tax_money = #{taxMoney,jdbcType=DECIMAL},
</if> </if>
<if test="taxlastmoney != null"> <if test="taxLastMoney != null">
TaxLastMoney = #{taxlastmoney,jdbcType=DECIMAL}, tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR}, other_field1 = #{otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR}, other_field2 = #{otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR}, other_field3 = #{otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield4 != null"> <if test="otherField4 != null">
OtherField4 = #{otherfield4,jdbcType=VARCHAR}, other_field4 = #{otherField4,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield5 != null"> <if test="otherField5 != null">
OtherField5 = #{otherfield5,jdbcType=VARCHAR}, other_field5 = #{otherField5,jdbcType=VARCHAR},
</if> </if>
<if test="mtype != null"> <if test="materialType != null">
MType = #{mtype,jdbcType=VARCHAR}, material_type = #{materialType,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT}, tenant_id = #{tenantId,jdbcType=BIGINT},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotItem"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.DepotItem">
update jsh_depotitem update jsh_depot_item
set HeaderId = #{headerid,jdbcType=BIGINT}, set header_id = #{headerId,jdbcType=BIGINT},
MaterialId = #{materialid,jdbcType=BIGINT}, material_id = #{materialId,jdbcType=BIGINT},
material_extend_id = #{materialExtendId,jdbcType=BIGINT}, material_extend_id = #{materialExtendId,jdbcType=BIGINT},
MUnit = #{munit,jdbcType=VARCHAR}, material_unit = #{materialUnit,jdbcType=VARCHAR},
OperNumber = #{opernumber,jdbcType=DECIMAL}, oper_number = #{operNumber,jdbcType=DECIMAL},
BasicNumber = #{basicnumber,jdbcType=DECIMAL}, basic_number = #{basicNumber,jdbcType=DECIMAL},
UnitPrice = #{unitprice,jdbcType=DECIMAL}, unit_price = #{unitPrice,jdbcType=DECIMAL},
TaxUnitPrice = #{taxunitprice,jdbcType=DECIMAL}, tax_unit_price = #{taxUnitPrice,jdbcType=DECIMAL},
AllPrice = #{allprice,jdbcType=DECIMAL}, all_price = #{allPrice,jdbcType=DECIMAL},
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
Img = #{img,jdbcType=VARCHAR}, img = #{img,jdbcType=VARCHAR},
Incidentals = #{incidentals,jdbcType=DECIMAL}, incidentals = #{incidentals,jdbcType=DECIMAL},
DepotId = #{depotid,jdbcType=BIGINT}, depot_id = #{depotId,jdbcType=BIGINT},
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT}, another_depot_id = #{anotherDepotId,jdbcType=BIGINT},
TaxRate = #{taxrate,jdbcType=DECIMAL}, tax_rate = #{taxRate,jdbcType=DECIMAL},
TaxMoney = #{taxmoney,jdbcType=DECIMAL}, tax_money = #{taxMoney,jdbcType=DECIMAL},
TaxLastMoney = #{taxlastmoney,jdbcType=DECIMAL}, tax_last_money = #{taxLastMoney,jdbcType=DECIMAL},
OtherField1 = #{otherfield1,jdbcType=VARCHAR}, other_field1 = #{otherField1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR}, other_field2 = #{otherField2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR}, other_field3 = #{otherField3,jdbcType=VARCHAR},
OtherField4 = #{otherfield4,jdbcType=VARCHAR}, other_field4 = #{otherField4,jdbcType=VARCHAR},
OtherField5 = #{otherfield5,jdbcType=VARCHAR}, other_field5 = #{otherField5,jdbcType=VARCHAR},
MType = #{mtype,jdbcType=VARCHAR}, material_type = #{materialType,jdbcType=VARCHAR},
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}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapperEx"> <mapper namespace="com.jsh.erp.datasource.mappers.DepotItemMapperEx">
<resultMap id="DetailByTypeAndMIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4DetailByTypeAndMId"> <resultMap id="DetailByTypeAndMIdResultMap" type="com.jsh.erp.datasource.entities.DepotItemVo4DetailByTypeAndMId">
<result column="Number" jdbcType="VARCHAR" property="number" /> <result column="number" jdbcType="VARCHAR" property="number" />
<result column="Type" jdbcType="VARCHAR" property="type" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="SubType" jdbcType="VARCHAR" property="subType" /> <result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="b_num" jdbcType="BIGINT" property="bnum" /> <result column="b_num" jdbcType="BIGINT" property="bnum" />
<result column="oTime" jdbcType="TIMESTAMP" property="otime" /> <result column="oTime" jdbcType="TIMESTAMP" property="otime" />
</resultMap> </resultMap>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap"> <select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap">
select * select *
FROM jsh_depotitem FROM jsh_depot_item
where 1=1 where 1=1
<if test="name != null"> <if test="name != null">
and name like '%${name}%' and name like '%${name}%'
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<if test="remark != null"> <if test="remark != null">
and remark like '%${remark}%' and remark like '%${remark}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<select id="countsByDepotItem" resultType="java.lang.Long"> <select id="countsByDepotItem" resultType="java.lang.Long">
SELECT SELECT
COUNT(id) COUNT(id)
FROM jsh_depotitem FROM jsh_depot_item
WHERE 1=1 WHERE 1=1
<if test="name != null"> <if test="name != null">
and name like '%${name}%' and name like '%${name}%'
...@@ -94,31 +94,31 @@ ...@@ -94,31 +94,31 @@
<if test="remark != null"> <if test="remark != null">
and remark like '%${remark}%' and remark like '%${remark}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="findDetailByTypeAndMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="DetailByTypeAndMIdResultMap"> <select id="findDetailByTypeAndMaterialIdList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="DetailByTypeAndMIdResultMap">
select dh.Number,dh.Type,dh.SubType, select dh.number,dh.type,dh.sub_type,
case case
when type='入库' then ifnull(di.BasicNumber,0) when type='入库' then ifnull(di.basic_number,0)
when type='出库' then 0-di.BasicNumber when type='出库' then 0-di.basic_number
when dh.SubType='组装单' and di.MType='组合件' then ifnull(di.BasicNumber,0) when dh.sub_type='组装单' and di.material_type='组合件' then ifnull(di.basic_number,0)
when dh.SubType='组装单' and di.MType='普通子件' then 0-di.BasicNumber when dh.sub_type='组装单' and di.material_type='普通子件' then 0-di.basic_number
when dh.SubType='拆卸单' and di.MType='普通子件' then ifnull(di.BasicNumber,0) when dh.sub_type='拆卸单' and di.material_type='普通子件' then ifnull(di.basic_number,0)
when dh.SubType='拆卸单' and di.MType='组合件' then 0-di.BasicNumber when dh.sub_type='拆卸单' and di.material_type='组合件' then 0-di.basic_number
when dh.SubType='盘点复盘' then ifnull(di.BasicNumber,0) when dh.sub_type='盘点复盘' then ifnull(di.basic_number,0)
else 0 else 0
end end
as b_num, as b_num,
date_format(dh.OperTime,'%Y-%m-%d %H:%i:%S') as oTime date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depothead dh from jsh_depot_head dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
where ((dh.type!='其它' and dh.SubType!='调拨') where ((dh.type!='其它' and dh.sub_type!='调拨')
or (dh.type='其它' and dh.SubType='组装单') or (dh.type='其它' and dh.sub_type='组装单')
or (dh.type='其它' and dh.SubType='拆卸单') or (dh.type='其它' and dh.sub_type='拆卸单')
or (dh.type='其它' and dh.SubType='盘点复盘' and dh.Status=1)) or (dh.type='其它' and dh.sub_type='盘点复盘' and dh.Status=1))
and di.MaterialId =${mId} and di.material_id =${mId}
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oTime desc ORDER BY oTime desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -127,39 +127,39 @@ ...@@ -127,39 +127,39 @@
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Long"> <select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Long">
select count(1) select count(1)
from jsh_depothead dh from jsh_depot_head dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId and ifnull(di.delete_Flag,'0') !='1' INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
where ((dh.type!='其它' and dh.SubType!='调拨') where ((dh.type!='其它' and dh.sub_type!='调拨')
or (dh.type='其它' and dh.SubType='组装单') or (dh.type='其它' and dh.sub_type='组装单')
or (dh.type='其它' and dh.SubType='拆卸单') or (dh.type='其它' and dh.sub_type='拆卸单')
or (dh.type='其它' and dh.SubType='盘点复盘' and dh.Status=1)) or (dh.type='其它' and dh.sub_type='盘点复盘' and dh.Status=1))
and di.MaterialId =${mId} and di.material_id =${mId}
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
</select> </select>
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap"> <select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*,m.Name MName,m.Model MModel,m.Unit MaterialUnit,m.Color MColor,m.Standard MStandard,m.Mfrs MMfrs, select di.*,m.name MName,m.model MModel,m.unit MaterialUnit,m.color MColor,m.standard MStandard,m.mfrs MMfrs,
m.OtherField1 MOtherField1,m.OtherField2 MOtherField2,m.OtherField3 MOtherField3, m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.name unit_name, me.bar_code barCode dp1.name DepotName,dp2.name AnotherDepotName, u.id UnitId, u.name unit_name, me.bar_code barCode
from jsh_depotitem di from jsh_depot_item di
left join jsh_material m on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1' left join jsh_material m on di.material_id=m.id and ifnull(m.delete_flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left join jsh_depot dp1 on di.DepotId=dp1.id and ifnull(dp1.delete_Flag,'0') !='1' left join jsh_depot dp1 on di.depot_id=dp1.id and ifnull(dp1.delete_Flag,'0') !='1'
left join jsh_depot dp2 on di.AnotherDepotId=dp2.id and ifnull(dp2.delete_Flag,'0') !='1' left join jsh_depot dp2 on di.another_depot_id=dp2.id and ifnull(dp2.delete_Flag,'0') !='1'
where di.HeaderId = ${headerId} where di.header_id = ${headerId}
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
order by di.id asc order by di.id asc
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial"> <select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, m.Name MName, m.Mfrs MMfrs, m.Model MModel, m.Unit MaterialUnit, m.Color MColor, select m.id MId, m.name MName, m.mfrs MMfrs, m.model MModel, m.unit MaterialUnit, m.color MColor,
me.purchase_decimal, u.name unit_name me.purchase_decimal, u.name unit_name
from jsh_material m from jsh_material m
left join jsh_depotitem di on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1' left join jsh_depot_item di on di.material_id=m.id and ifnull(m.delete_Flag,'0') !='1'
left join jsh_depothead dh on di.HeaderId=dh.id and ifnull(dh.delete_Flag,'0') !='1' left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where 1=1 where 1=1
and me.default_flag=1 and me.default_flag=1
<if test="name != null"> <if test="name != null">
...@@ -169,11 +169,11 @@ ...@@ -169,11 +169,11 @@
and m.model like '%${model}%' and m.model like '%${model}%'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and dh.OperTime &lt;= '${endTime}' and dh.oper_time &lt;= '${endTime}'
</if> </if>
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
group by m.id,m.Name, m.Model, m.Unit, m.Color, me.purchase_decimal, u.name group by m.id,m.name, m.model, m.unit, m.color, me.purchase_decimal, u.name
order by m.Name, m.Model asc order by m.name, m.model asc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -182,8 +182,8 @@ ...@@ -182,8 +182,8 @@
<select id="findByAllCount" resultType="java.lang.Integer"> <select id="findByAllCount" resultType="java.lang.Integer">
select count(1) from (select m.id select count(1) from (select m.id
from jsh_material m from jsh_material m
left join jsh_depotitem di on di.MaterialId=m.id and ifnull(m.delete_Flag,'0') !='1' left join jsh_depot_item di on di.material_id=m.id and ifnull(m.delete_Flag,'0') !='1'
left join jsh_depothead dh on di.HeaderId=dh.id and ifnull(dh.delete_Flag,'0') !='1' left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="name != null"> <if test="name != null">
and m.name like '%${name}%' and m.name like '%${name}%'
...@@ -192,117 +192,117 @@ ...@@ -192,117 +192,117 @@
and m.model like '%${model}%' and m.model like '%${model}%'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and dh.OperTime &lt;= '${endTime}' and dh.oper_time &lt;= '${endTime}'
</if> </if>
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
group by m.id) cc group by m.id) cc
</select> </select>
<select id="buyOrSaleNumber" resultType="java.math.BigDecimal"> <select id="buyOrSaleNumber" resultType="java.math.BigDecimal">
select ifnull(sum(BasicNumber),0) as BasicNumber from jsh_depotitem di,jsh_depothead dh select ifnull(sum(basic_number),0) as BasicNumber from jsh_depot_item di,jsh_depot_head dh
where di.HeaderId = dh.id where di.header_id = dh.id
and dh.type='${type}' and dh.subType='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and di.MaterialId =${MId} and di.material_id =${MId}
and dh.OperTime &gt;= '${MonthTime}-01 00:00:00' and dh.oper_time &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59' and dh.oper_time &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
</select> </select>
<select id="buyOrSalePrice" resultType="java.math.BigDecimal"> <select id="buyOrSalePrice" resultType="java.math.BigDecimal">
select ifnull(sum(AllPrice),0) as AllPrice from jsh_depotitem di,jsh_depothead dh select ifnull(sum(all_price),0) as AllPrice from jsh_depot_item di,jsh_depot_head dh
where di.HeaderId = dh.id where di.header_id = dh.id
and dh.type='${type}' and dh.subType='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and di.MaterialId =${MId} and di.material_id =${MId}
and dh.OperTime &gt;= '${MonthTime}-01 00:00:00' and dh.oper_time &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59' and dh.oper_time &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
</select> </select>
<select id="inOrOutPrice" resultType="java.math.BigDecimal"> <select id="inOrOutPrice" resultType="java.math.BigDecimal">
select ifnull(sum(DiscountLastMoney),0) as allMoney from jsh_depothead dh select ifnull(sum(discount_last_money),0) as allMoney from jsh_depot_head dh
where 1=1 where 1=1
and dh.type='${type}' and dh.subType='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and dh.OperTime &gt;= '${MonthTime}-01 00:00:00' and dh.oper_time &gt;= '${MonthTime}-01 00:00:00'
and dh.OperTime &lt;= '${MonthTime}-31 23:59:59' and dh.oper_time &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
</select> </select>
<select id="getStockCheckSum" resultType="java.math.BigDecimal"> <select id="getStockCheckSum" resultType="java.math.BigDecimal">
select ifnull(sum(di.BasicNumber),0) stockCheckSum from jsh_depothead dh select ifnull(sum(di.basic_number),0) stockCheckSum from jsh_depot_head dh
INNER JOIN jsh_depotitem di on dh.id=di.HeaderId INNER JOIN jsh_depot_item di on dh.id=di.header_id
where 1=1 where 1=1
<if test="mId != null"> <if test="mId != null">
and di.MaterialId=#{mId} and di.material_id=#{mId}
</if> </if>
and dh.SubType='盘点复盘' and dh.`Status`='1' and dh.sub_type='盘点复盘' and dh.`Status`='1'
<if test="depotId != null"> <if test="depotId != null">
and di.DepotId=#{depotId} and di.depot_id=#{depotId}
</if> </if>
<if test="beginTime != null"> <if test="beginTime != null">
and dh.OperTime &gt;= '${beginTime}' and dh.oper_time &gt;= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and dh.OperTime &lt;= '${endTime}' and dh.oper_time &lt;= '${endTime}'
</if> </if>
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_Flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
</select> </select>
<select id="getStockByParam" resultMap="StockMap"> <select id="getStockByParam" resultMap="StockMap">
select ifnull((curep.inTotal+curep.transfInTotal+curep.assemInTotal+curep.disAssemInTotal),0) as in_stock, select ifnull((curep.inTotal+curep.transfInTotal+curep.assemInTotal+curep.disAssemInTotal),0) as in_stock,
ifnull((curep.transfOutTotal+curep.outTotal+curep.assemOutTotal+curep.disAssemOutTotal),0) out_stock ifnull((curep.transfOutTotal+curep.outTotal+curep.assemOutTotal+curep.disAssemOutTotal),0) out_stock
from from
(select sum(if(dh.type='入库' <if test="depotId != null">and di.DepotId=#{depotId}</if>, di.BasicNumber,0)) as inTotal, (select sum(if(dh.type='入库' <if test="depotId != null">and di.depot_id=#{depotId}</if>, di.basic_number,0)) as inTotal,
sum(if(dh.SubType='调拨' <if test="depotId != null">and di.AnotherDepotId=#{depotId}</if>,di.BasicNumber,0)) as transfInTotal, sum(if(dh.sub_type='调拨' <if test="depotId != null">and di.another_depot_id=#{depotId}</if>,di.basic_number,0)) as transfInTotal,
sum(if(dh.SubType='调拨' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as transfOutTotal, sum(if(dh.sub_type='调拨' <if test="depotId != null">and di.depot_id=#{depotId}</if>,di.basic_number,0)) as transfOutTotal,
sum(if(dh.type='出库' and dh.SubType!='调拨' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as outTotal, sum(if(dh.type='出库' and dh.sub_type!='调拨' <if test="depotId != null">and di.depot_id=#{depotId}</if>,di.basic_number,0)) as outTotal,
sum(if(dh.SubType='组装单' and di.MType='组合件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as assemInTotal, sum(if(dh.sub_type='组装单' and di.material_type='组合件' <if test="depotId != null">and di.depot_id=#{depotId}</if>,di.basic_number,0)) as assemInTotal,
sum(if(dh.SubType='组装单' and di.MType='普通子件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as assemOutTotal, sum(if(dh.sub_type='组装单' and di.material_type='普通子件' <if test="depotId != null">and di.depot_id=#{depotId}</if>,di.basic_number,0)) as assemOutTotal,
sum(if(dh.SubType='拆卸单' and di.MType='普通子件' <if test="depotId != null">and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as disAssemInTotal, sum(if(dh.sub_type='拆卸单' and di.material_type='普通子件' <if test="depotId != null">and di.depot_id=#{depotId}</if>,di.basic_number,0)) as disAssemInTotal,
sum(if(dh.SubType='拆卸单' and di.MType='组合件' <if test="depotId != null"> and di.DepotId=#{depotId}</if>,di.BasicNumber,0)) as disAssemOutTotal sum(if(dh.sub_type='拆卸单' and di.material_type='组合件' <if test="depotId != null"> and di.depot_id=#{depotId}</if>,di.basic_number,0)) as disAssemOutTotal
from from
jsh_depothead dh,jsh_depotitem di jsh_depot_head dh,jsh_depot_item di
where 1=1 where 1=1
and dh.id=di.HeaderId and dh.id=di.header_id
and di.MaterialId=#{mId} and di.material_id=#{mId}
<if test="beginTime != null"> <if test="beginTime != null">
and dh.OperTime &gt;= '${beginTime}' and dh.oper_time &gt;= '${beginTime}'
</if> </if>
<if test="endTime != null"> <if test="endTime != null">
and dh.OperTime &lt;= '${endTime}' and dh.oper_time &lt;= '${endTime}'
</if> </if>
and dh.tenant_id=#{tenantId} and dh.tenant_id=#{tenantId}
and di.tenant_id=#{tenantId} and di.tenant_id=#{tenantId}
and ifnull(dh.delete_Flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_Flag,'0') !='1') as curep and ifnull(di.delete_flag,'0') !='1') as curep
</select> </select>
<select id="findDepotItemListBydepotheadId" resultType="com.jsh.erp.datasource.entities.DepotItem"> <select id="findDepotItemListBydepotheadId" resultType="com.jsh.erp.datasource.entities.DepotItem">
select select
dep.id,dep.headerId,dep.materialid,dep.munit,dep.opernumber, dep.id,dep.header_id,dep.material_id,dep.materialUnit,dep.oper_number,
dep.basicnumber,dep.unitprice,dep.taxunitprice,dep.allprice,dep.remark, dep.basic_number,dep.unit_price,dep.tax_unit_price,dep.all_price,dep.remark,
dep.img,dep.incidentals,dep.depotid,dep.anotherdepotid,dep.taxrate, dep.img,dep.incidentals,dep.depot_id,dep.another_depot_id,dep.tax_rate,
dep.taxmoney,dep.taxlastmoney,dep.otherfield1,dep.otherfield2,dep.otherfield3, dep.tax_money,dep.tax_last_money,dep.other_field1,dep.other_field2,dep.other_field3,
dep.otherfield4,dep.otherfield5,dep.mtype dep.other_field4,dep.other_field5,dep.material_type
from jsh_depotitem dep,jsh_material mat from jsh_depot_item dep,jsh_material mat
where 1=1 where 1=1
<if test="depotheadId != null"> <if test="depotheadId != null">
and dep.HeaderId = #{depotheadId} and dep.header_id = #{depotheadId}
</if> </if>
and dep.materialid=mat.id and dep.material_id=mat.id
<if test="enableSerialNumber != null"> <if test="enableSerialNumber != null">
and mat.enableSerialNumber = #{enableSerialNumber} and mat.enable_serial_number = #{enableSerialNumber}
</if> </if>
and ifnull(dep.delete_Flag,'0') !='1' and ifnull(dep.delete_flag,'0') !='1'
and ifnull(mat.delete_Flag,'0') !='1' and ifnull(mat.delete_flag,'0') !='1'
</select> </select>
<delete id="deleteDepotItemByDepotHeadIds"> <delete id="deleteDepotItemByDepotHeadIds">
delete from jsh_depotitem delete from jsh_depot_item
where 1=1 where 1=1
and HeaderId in and header_id in
( (
<foreach collection="depotheadIds" item="depotheadId" separator=","> <foreach collection="depotheadIds" item="depotheadId" separator=",">
#{depotheadId} #{depotheadId}
...@@ -311,10 +311,10 @@ ...@@ -311,10 +311,10 @@
</delete> </delete>
<update id="batchDeleteDepotItemByDepotHeadIds"> <update id="batchDeleteDepotItemByDepotHeadIds">
update jsh_depotitem update jsh_depot_item
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and HeaderId in and header_id in
( (
<foreach collection="depotheadIds" item="depotheadId" separator=","> <foreach collection="depotheadIds" item="depotheadId" separator=",">
#{depotheadId} #{depotheadId}
...@@ -323,8 +323,8 @@ ...@@ -323,8 +323,8 @@
</update> </update>
<update id="batchDeleteDepotItemByIds"> <update id="batchDeleteDepotItemByIds">
update jsh_depotitem update jsh_depot_item
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
...@@ -336,90 +336,90 @@ ...@@ -336,90 +336,90 @@
<select id="getDepotItemListListByDepotIds" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap"> <select id="getDepotItemListListByDepotIds" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotItemMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotItemMapper.Base_Column_List" />
from jsh_depotitem from jsh_depot_item
where 1=1 where 1=1
and DepotId in ( and depot_id in (
<foreach collection="depotIds" item="depotId" separator=","> <foreach collection="depotIds" item="depotId" separator=",">
#{depotId} #{depotId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getDepotItemListListByMaterialIds" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap"> <select id="getDepotItemListListByMaterialIds" resultMap="com.jsh.erp.datasource.mappers.DepotItemMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.DepotItemMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.DepotItemMapper.Base_Column_List" />
from jsh_depotitem from jsh_depot_item
where 1=1 where 1=1
and materialId in ( and material_id in (
<foreach collection="materialIds" item="materialId" separator=","> <foreach collection="materialIds" item="materialId" separator=",">
#{materialId} #{materialId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount"> <select id="findStockWarningCount" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultStockWarningCount">
SELECT SELECT
m. NAME MaterialName, m.name MaterialName,
m.Model MaterialModel, m.model MaterialModel,
mc.`Name` categoryName, mc.`Name` categoryName,
CONCAT( CONCAT(
'(', '(',
m.Standard, m.standard,
')', ')',
'(', '(',
m.Color, m.color,
')' ')'
) AS MaterialOther, ) AS MaterialOther,
m.unit MaterialUnit, m.unit MaterialUnit,
ifnull(m.safetystock,0) safetystock, ifnull(m.safety_stock,0) safetystock,
IFNULL(intype.BasicInNumber ,0) BasicInNumber, IFNULL(intype.BasicInNumber ,0) BasicInNumber,
IFNULL(outtype.BasicOutNumber ,0) BasicOutNumber, IFNULL(outtype.BasicOutNumber ,0) BasicOutNumber,
( (
IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0)
) BasicNumber, ) BasicNumber,
(IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) - ifnull(m.safetystock,0)) BasicLinjieNumber (IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) - ifnull(m.safety_stock,0)) BasicLinjieNumber
FROM FROM
jsh_material m jsh_material m
LEFT JOIN jsh_material_category mc ON mc.Id = m.CategoryId LEFT JOIN jsh_material_category mc ON mc.id = m.category_id
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
di.MaterialId, di.material_id,
ifnull(sum(BasicNumber), 0) AS BasicInNumber ifnull(sum(basic_number), 0) AS BasicInNumber
FROM FROM
jsh_depothead dh jsh_depot_head dh
INNER JOIN jsh_depotitem di ON dh.id = di.HeaderId INNER JOIN jsh_depot_item di ON dh.id = di.header_id
AND ifnull(di.delete_Flag, '0') != '1' AND ifnull(di.delete_flag, '0') != '1'
WHERE WHERE
dh.type = '入库' dh.type = '入库'
<if test="pid != null"> <if test="pid != null">
and di.DepotId= ${pid} and di.depot_id= ${pid}
</if> </if>
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId AND ifnull(dh.delete_flag, '0') != '1' group by di.material_id
) intype ON intype.MaterialId = m.id ) intype ON intype.material_id = m.id
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
di.MaterialId, di.material_id,
ifnull(sum(BasicNumber), 0) AS BasicOutNumber ifnull(sum(basic_number), 0) AS BasicOutNumber
FROM FROM
jsh_depothead dh jsh_depot_head dh
INNER JOIN jsh_depotitem di ON dh.id = di.HeaderId INNER JOIN jsh_depot_item di ON dh.id = di.header_id
AND ifnull(di.delete_Flag, '0') != '1' AND ifnull(di.delete_flag, '0') != '1'
WHERE WHERE
dh.type = '出库' dh.type = '出库'
AND dh.SubType != '调拨' AND dh.sub_type != '调拨'
<if test="pid != null"> <if test="pid != null">
and di.DepotId= ${pid} and di.depot_id= ${pid}
</if> </if>
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId AND ifnull(dh.delete_flag, '0') != '1' group by di.material_id
) outtype ON outtype.MaterialId = m.id ) outtype ON outtype.material_id = m.id
WHERE WHERE
1 = 1 1 = 1
AND ifnull(m.delete_Flag, '0') != '1' AND ifnull(m.delete_flag, '0') != '1'
AND intype.BasicInNumber > 0 AND intype.BasicInNumber > 0
ORDER BY ORDER BY
(IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) - ifnull(m.safetystock,0)) (IFNULL(intype.BasicInNumber ,0) - IFNULL(outtype.BasicOutNumber ,0) - ifnull(m.safety_stock,0))
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -430,19 +430,19 @@ ...@@ -430,19 +430,19 @@
jsh_material m jsh_material m
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
di.MaterialId, di.material_id,
ifnull(sum(BasicNumber), 0) AS BasicInNumber ifnull(sum(basic_number), 0) AS BasicInNumber
FROM FROM
jsh_depothead dh jsh_depot_head dh
INNER JOIN jsh_depotitem di ON dh.id = di.HeaderId INNER JOIN jsh_depot_item di ON dh.id = di.header_id
AND ifnull(di.delete_Flag, '0') != '1' AND ifnull(di.delete_flag, '0') != '1'
WHERE WHERE
dh.type = '入库' dh.type = '入库'
<if test="pid != null"> <if test="pid != null">
and di.DepotId= ${pid} and di.depot_id= ${pid}
</if> </if>
AND ifnull(dh.delete_Flag, '0') != '1' group by di.MaterialId AND ifnull(dh.delete_flag, '0') != '1' group by di.material_id
) intype ON intype.MaterialId = m.id ) intype ON intype.material_id = m.id
WHERE WHERE
1 = 1 1 = 1
......
...@@ -2,24 +2,24 @@ ...@@ -2,24 +2,24 @@
<!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.MaterialMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.MaterialMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Material">
<id column="Id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="CategoryId" jdbcType="BIGINT" property="categoryid" /> <result column="category_id" jdbcType="BIGINT" property="categoryId" />
<result column="Name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="Mfrs" jdbcType="VARCHAR" property="mfrs" /> <result column="mfrs" jdbcType="VARCHAR" property="mfrs" />
<result column="SafetyStock" jdbcType="DECIMAL" property="safetystock" /> <result column="safety_stock" jdbcType="DECIMAL" property="safetyStock" />
<result column="Model" jdbcType="VARCHAR" property="model" /> <result column="model" jdbcType="VARCHAR" property="model" />
<result column="Standard" jdbcType="VARCHAR" property="standard" /> <result column="standard" jdbcType="VARCHAR" property="standard" />
<result column="Color" jdbcType="VARCHAR" property="color" /> <result column="color" jdbcType="VARCHAR" property="color" />
<result column="Unit" jdbcType="VARCHAR" property="unit" /> <result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="Remark" jdbcType="VARCHAR" property="remark" /> <result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="UnitId" jdbcType="BIGINT" property="unitid" /> <result column="unit_id" jdbcType="BIGINT" property="unitId" />
<result column="Enabled" jdbcType="BIT" property="enabled" /> <result column="enabled" jdbcType="BIT" property="enabled" />
<result column="OtherField1" jdbcType="VARCHAR" property="otherfield1" /> <result column="other_field1" jdbcType="VARCHAR" property="otherField1" />
<result column="OtherField2" jdbcType="VARCHAR" property="otherfield2" /> <result column="other_field2" jdbcType="VARCHAR" property="otherField2" />
<result column="OtherField3" jdbcType="VARCHAR" property="otherfield3" /> <result column="other_field3" jdbcType="VARCHAR" property="otherField3" />
<result column="enableSerialNumber" jdbcType="VARCHAR" property="enableserialnumber" /> <result column="enable_serial_number" jdbcType="VARCHAR" property="enableSerialNumber" />
<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> <where>
...@@ -80,8 +80,9 @@ ...@@ -80,8 +80,9 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
Id, CategoryId, Name, Mfrs, SafetyStock, Model, Standard, Color, Unit, Remark, UnitId, id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark,
Enabled, OtherField1, OtherField2, OtherField3, enableSerialNumber, tenant_id, delete_Flag unit_id, enabled, other_field1, other_field2, other_field3, enable_serial_number,
tenant_id, delete_flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="BaseResultMap">
select select
...@@ -101,11 +102,11 @@ ...@@ -101,11 +102,11 @@
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from jsh_material from jsh_material
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">
delete from jsh_material delete from jsh_material
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</delete> </delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample"> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MaterialExample">
delete from jsh_material delete from jsh_material
...@@ -114,85 +115,85 @@ ...@@ -114,85 +115,85 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Material">
insert into jsh_material (Id, CategoryId, Name, insert into jsh_material (id, category_id, name,
Mfrs, SafetyStock, Model, mfrs, safety_stock, model,
Standard, Color, Unit, standard, color, unit,
Remark, UnitId, Enabled, remark, unit_id, enabled,
OtherField1, OtherField2, OtherField3, other_field1, other_field2, other_field3,
enableSerialNumber, tenant_id, delete_Flag enable_serial_number, tenant_id, delete_flag
) )
values (#{id,jdbcType=BIGINT}, #{categoryid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{mfrs,jdbcType=VARCHAR}, #{safetystock,jdbcType=DECIMAL}, #{model,jdbcType=VARCHAR}, #{mfrs,jdbcType=VARCHAR}, #{safetyStock,jdbcType=DECIMAL}, #{model,jdbcType=VARCHAR},
#{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{unitid,jdbcType=BIGINT}, #{enabled,jdbcType=BIT}, #{remark,jdbcType=VARCHAR}, #{unitId,jdbcType=BIGINT}, #{enabled,jdbcType=BIT},
#{otherfield1,jdbcType=VARCHAR}, #{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR}, #{otherField1,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR},
#{enableserialnumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR} #{enableSerialNumber,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Material">
insert into jsh_material insert into jsh_material
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
Id, id,
</if> </if>
<if test="categoryid != null"> <if test="categoryId != null">
CategoryId, category_id,
</if> </if>
<if test="name != null"> <if test="name != null">
Name, name,
</if> </if>
<if test="mfrs != null"> <if test="mfrs != null">
Mfrs, mfrs,
</if> </if>
<if test="safetystock != null"> <if test="safetyStock != null">
SafetyStock, safety_stock,
</if> </if>
<if test="model != null"> <if test="model != null">
Model, model,
</if> </if>
<if test="standard != null"> <if test="standard != null">
Standard, standard,
</if> </if>
<if test="color != null"> <if test="color != null">
Color, color,
</if> </if>
<if test="unit != null"> <if test="unit != null">
Unit, unit,
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark, remark,
</if> </if>
<if test="unitid != null"> <if test="unitId != null">
UnitId, unit_id,
</if> </if>
<if test="enabled != null"> <if test="enabled != null">
Enabled, enabled,
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
OtherField1, other_field1,
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
OtherField2, other_field2,
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
OtherField3, other_field3,
</if> </if>
<if test="enableserialnumber != null"> <if test="enableSerialNumber != null">
enableSerialNumber, enable_serial_number,
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id, tenant_id,
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag, delete_flag,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="categoryid != null"> <if test="categoryId != null">
#{categoryid,jdbcType=BIGINT}, #{categoryId,jdbcType=BIGINT},
</if> </if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
...@@ -200,8 +201,8 @@ ...@@ -200,8 +201,8 @@
<if test="mfrs != null"> <if test="mfrs != null">
#{mfrs,jdbcType=VARCHAR}, #{mfrs,jdbcType=VARCHAR},
</if> </if>
<if test="safetystock != null"> <if test="safetyStock != null">
#{safetystock,jdbcType=DECIMAL}, #{safetyStock,jdbcType=DECIMAL},
</if> </if>
<if test="model != null"> <if test="model != null">
#{model,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR},
...@@ -218,23 +219,23 @@ ...@@ -218,23 +219,23 @@
<if test="remark != null"> <if test="remark != null">
#{remark,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="unitid != null"> <if test="unitId != null">
#{unitid,jdbcType=BIGINT}, #{unitId,jdbcType=BIGINT},
</if> </if>
<if test="enabled != null"> <if test="enabled != null">
#{enabled,jdbcType=BIT}, #{enabled,jdbcType=BIT},
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
#{otherfield1,jdbcType=VARCHAR}, #{otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
#{otherfield2,jdbcType=VARCHAR}, #{otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
#{otherfield3,jdbcType=VARCHAR}, #{otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="enableserialnumber != null"> <if test="enableSerialNumber != null">
#{enableserialnumber,jdbcType=VARCHAR}, #{enableSerialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
#{tenantId,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT},
...@@ -254,58 +255,58 @@ ...@@ -254,58 +255,58 @@
update jsh_material update jsh_material
<set> <set>
<if test="record.id != null"> <if test="record.id != null">
Id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.categoryid != null"> <if test="record.categoryId != null">
CategoryId = #{record.categoryid,jdbcType=BIGINT}, category_id = #{record.categoryId,jdbcType=BIGINT},
</if> </if>
<if test="record.name != null"> <if test="record.name != null">
Name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
</if> </if>
<if test="record.mfrs != null"> <if test="record.mfrs != null">
Mfrs = #{record.mfrs,jdbcType=VARCHAR}, mfrs = #{record.mfrs,jdbcType=VARCHAR},
</if> </if>
<if test="record.safetystock != null"> <if test="record.safetyStock != null">
SafetyStock = #{record.safetystock,jdbcType=DECIMAL}, safety_stock = #{record.safetyStock,jdbcType=DECIMAL},
</if> </if>
<if test="record.model != null"> <if test="record.model != null">
Model = #{record.model,jdbcType=VARCHAR}, model = #{record.model,jdbcType=VARCHAR},
</if> </if>
<if test="record.standard != null"> <if test="record.standard != null">
Standard = #{record.standard,jdbcType=VARCHAR}, standard = #{record.standard,jdbcType=VARCHAR},
</if> </if>
<if test="record.color != null"> <if test="record.color != null">
Color = #{record.color,jdbcType=VARCHAR}, color = #{record.color,jdbcType=VARCHAR},
</if> </if>
<if test="record.unit != null"> <if test="record.unit != null">
Unit = #{record.unit,jdbcType=VARCHAR}, unit = #{record.unit,jdbcType=VARCHAR},
</if> </if>
<if test="record.remark != null"> <if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
</if> </if>
<if test="record.unitid != null"> <if test="record.unitId != null">
UnitId = #{record.unitid,jdbcType=BIGINT}, unit_id = #{record.unitId,jdbcType=BIGINT},
</if> </if>
<if test="record.enabled != null"> <if test="record.enabled != null">
Enabled = #{record.enabled,jdbcType=BIT}, enabled = #{record.enabled,jdbcType=BIT},
</if> </if>
<if test="record.otherfield1 != null"> <if test="record.otherField1 != null">
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR}, other_field1 = #{record.otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield2 != null"> <if test="record.otherField2 != null">
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR}, other_field2 = #{record.otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="record.otherfield3 != null"> <if test="record.otherField3 != null">
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}, other_field3 = #{record.otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="record.enableserialnumber != null"> <if test="record.enableSerialNumber != null">
enableSerialNumber = #{record.enableserialnumber,jdbcType=VARCHAR}, enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
</if> </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>
<if test="record.deleteFlag != null"> <if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -314,24 +315,24 @@ ...@@ -314,24 +315,24 @@
</update> </update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update jsh_material update jsh_material
set Id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
CategoryId = #{record.categoryid,jdbcType=BIGINT}, category_id = #{record.categoryId,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR}, name = #{record.name,jdbcType=VARCHAR},
Mfrs = #{record.mfrs,jdbcType=VARCHAR}, mfrs = #{record.mfrs,jdbcType=VARCHAR},
SafetyStock = #{record.safetystock,jdbcType=DECIMAL}, safety_stock = #{record.safetyStock,jdbcType=DECIMAL},
Model = #{record.model,jdbcType=VARCHAR}, model = #{record.model,jdbcType=VARCHAR},
Standard = #{record.standard,jdbcType=VARCHAR}, standard = #{record.standard,jdbcType=VARCHAR},
Color = #{record.color,jdbcType=VARCHAR}, color = #{record.color,jdbcType=VARCHAR},
Unit = #{record.unit,jdbcType=VARCHAR}, unit = #{record.unit,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR},
UnitId = #{record.unitid,jdbcType=BIGINT}, unit_id = #{record.unitId,jdbcType=BIGINT},
Enabled = #{record.enabled,jdbcType=BIT}, enabled = #{record.enabled,jdbcType=BIT},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR}, other_field1 = #{record.otherField1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR}, other_field2 = #{record.otherField2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR}, other_field3 = #{record.otherField3,jdbcType=VARCHAR},
enableSerialNumber = #{record.enableserialnumber,jdbcType=VARCHAR}, enable_serial_number = #{record.enableSerialNumber,jdbcType=VARCHAR},
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">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -339,79 +340,79 @@ ...@@ -339,79 +340,79 @@
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material"> <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Material">
update jsh_material update jsh_material
<set> <set>
<if test="categoryid != null"> <if test="categoryId != null">
CategoryId = #{categoryid,jdbcType=BIGINT}, category_id = #{categoryId,jdbcType=BIGINT},
</if> </if>
<if test="name != null"> <if test="name != null">
Name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="mfrs != null"> <if test="mfrs != null">
Mfrs = #{mfrs,jdbcType=VARCHAR}, mfrs = #{mfrs,jdbcType=VARCHAR},
</if> </if>
<if test="safetystock != null"> <if test="safetyStock != null">
SafetyStock = #{safetystock,jdbcType=DECIMAL}, safety_stock = #{safetyStock,jdbcType=DECIMAL},
</if> </if>
<if test="model != null"> <if test="model != null">
Model = #{model,jdbcType=VARCHAR}, model = #{model,jdbcType=VARCHAR},
</if> </if>
<if test="standard != null"> <if test="standard != null">
Standard = #{standard,jdbcType=VARCHAR}, standard = #{standard,jdbcType=VARCHAR},
</if> </if>
<if test="color != null"> <if test="color != null">
Color = #{color,jdbcType=VARCHAR}, color = #{color,jdbcType=VARCHAR},
</if> </if>
<if test="unit != null"> <if test="unit != null">
Unit = #{unit,jdbcType=VARCHAR}, unit = #{unit,jdbcType=VARCHAR},
</if> </if>
<if test="remark != null"> <if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
</if> </if>
<if test="unitid != null"> <if test="unitId != null">
UnitId = #{unitid,jdbcType=BIGINT}, unit_id = #{unitId,jdbcType=BIGINT},
</if> </if>
<if test="enabled != null"> <if test="enabled != null">
Enabled = #{enabled,jdbcType=BIT}, enabled = #{enabled,jdbcType=BIT},
</if> </if>
<if test="otherfield1 != null"> <if test="otherField1 != null">
OtherField1 = #{otherfield1,jdbcType=VARCHAR}, other_field1 = #{otherField1,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield2 != null"> <if test="otherField2 != null">
OtherField2 = #{otherfield2,jdbcType=VARCHAR}, other_field2 = #{otherField2,jdbcType=VARCHAR},
</if> </if>
<if test="otherfield3 != null"> <if test="otherField3 != null">
OtherField3 = #{otherfield3,jdbcType=VARCHAR}, other_field3 = #{otherField3,jdbcType=VARCHAR},
</if> </if>
<if test="enableserialnumber != null"> <if test="enableSerialNumber != null">
enableSerialNumber = #{enableserialnumber,jdbcType=VARCHAR}, enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
</if> </if>
<if test="tenantId != null"> <if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT}, tenant_id = #{tenantId,jdbcType=BIGINT},
</if> </if>
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where Id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material"> <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Material">
update jsh_material update jsh_material
set CategoryId = #{categoryid,jdbcType=BIGINT}, set category_id = #{categoryId,jdbcType=BIGINT},
Name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
Mfrs = #{mfrs,jdbcType=VARCHAR}, mfrs = #{mfrs,jdbcType=VARCHAR},
SafetyStock = #{safetystock,jdbcType=DECIMAL}, safety_stock = #{safetyStock,jdbcType=DECIMAL},
Model = #{model,jdbcType=VARCHAR}, model = #{model,jdbcType=VARCHAR},
Standard = #{standard,jdbcType=VARCHAR}, standard = #{standard,jdbcType=VARCHAR},
Color = #{color,jdbcType=VARCHAR}, color = #{color,jdbcType=VARCHAR},
Unit = #{unit,jdbcType=VARCHAR}, unit = #{unit,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR},
UnitId = #{unitid,jdbcType=BIGINT}, unit_id = #{unitId,jdbcType=BIGINT},
Enabled = #{enabled,jdbcType=BIT}, enabled = #{enabled,jdbcType=BIT},
OtherField1 = #{otherfield1,jdbcType=VARCHAR}, other_field1 = #{otherField1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR}, other_field2 = #{otherField2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR}, other_field3 = #{otherField3,jdbcType=VARCHAR},
enableSerialNumber = #{enableserialnumber,jdbcType=VARCHAR}, enable_serial_number = #{enableSerialNumber,jdbcType=VARCHAR},
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}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal,me.low_decimal me.purchase_decimal, me.commodity_decimal, me.wholesale_decimal,me.low_decimal
FROM jsh_material m FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1' left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1' left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2' left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.status,'0') !='2'
where 1=1 where 1=1
and me.default_flag=1 and me.default_flag=1
<if test="barCode != null"> <if test="barCode != null">
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
and m.name like '%${name}%' and m.name like '%${name}%'
</if> </if>
<if test="standard != null"> <if test="standard != null">
and m.Standard like '%${standard}%' and m.standard like '%${standard}%'
</if> </if>
<if test="model != null"> <if test="model != null">
and m.model like '%${model}%' and m.model like '%${model}%'
</if> </if>
<if test="categoryIds != null"> <if test="categoryIds != null">
and m.CategoryId in (${categoryIds}) and m.category_id in (${categoryIds})
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
order by m.id desc order by m.id desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
COUNT(m.id) COUNT(m.id)
FROM jsh_material m FROM jsh_material m
left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1' left JOIN jsh_material_extend me on m.id = me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1' left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2' left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.status,'0') !='2'
WHERE 1=1 WHERE 1=1
and me.default_flag=1 and me.default_flag=1
<if test="barCode != null"> <if test="barCode != null">
...@@ -63,29 +63,29 @@ ...@@ -63,29 +63,29 @@
and m.name like '%${name}%' and m.name like '%${name}%'
</if> </if>
<if test="standard != null"> <if test="standard != null">
and m.Standard like '%${standard}%' and m.standard like '%${standard}%'
</if> </if>
<if test="model != null"> <if test="model != null">
and m.model like '%${model}%' and m.model like '%${model}%'
</if> </if>
<if test="categoryIds != null"> <if test="categoryIds != null">
and m.CategoryId in (${categoryIds}) and m.category_id in (${categoryIds})
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="findUnitName" resultType="java.lang.String"> <select id="findUnitName" resultType="java.lang.String">
select u.name from jsh_unit u select u.name from jsh_unit u
left join jsh_material m on m.UnitId=u.id and ifnull(m.delete_Flag,'0') !='1' left join jsh_material m on m.unit_id=u.id and ifnull(m.delete_flag,'0') !='1'
where m.id = ${mId} where m.id = ${mId}
and ifnull(u.delete_Flag,'0') !='1' and ifnull(u.delete_flag,'0') !='1'
</select> </select>
<select id="findById" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap"> <select id="findById" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.name unit_name from jsh_material m select m.*,u.name unit_name from jsh_material m
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_flag,'0') !='1'
where m.id = ${id} where m.id = ${id}
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="findByIdWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap"> <select id="findByIdWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
...@@ -93,21 +93,21 @@ ...@@ -93,21 +93,21 @@
me.wholesale_decimal, me.low_decimal me.wholesale_decimal, me.low_decimal
from jsh_material m from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where me.id = ${meId} where me.id = ${meId}
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="findBySelectWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap"> <select id="findBySelectWithBarCode" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultAndUnitMap">
select m.*,u.name unit_name,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m select m.*,u.name unit_name,me.bar_code m_bar_code,me.id meId,me.commodity_unit from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.enabled=1 and me.id is not null where m.enabled=1 and me.id is not null
<if test="q != null"> <if test="q != null">
and (m.name like '%${q}%' or me.bar_code like '%${q}%') and (m.name like '%${q}%' or me.bar_code like '%${q}%')
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
ORDER BY Id desc ORDER BY id desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -116,12 +116,12 @@ ...@@ -116,12 +116,12 @@
<select id="findBySelectWithBarCodeCount" resultType="java.lang.Integer"> <select id="findBySelectWithBarCodeCount" resultType="java.lang.Integer">
select count(1) from jsh_material m select count(1) from jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.UnitId=u.id and ifnull(u.delete_Flag,'0') !='1' left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where m.enabled=1 and me.id is not null where m.enabled=1 and me.id is not null
<if test="q != null"> <if test="q != null">
and (m.name like '%${q}%' or me.bar_code like '%${q}%') and (m.name like '%${q}%' or me.bar_code like '%${q}%')
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList"> <select id="findByAll" parameterType="com.jsh.erp.datasource.entities.MaterialExample" resultMap="ResultMapList">
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
me.wholesale_decimal, me.low_decimal me.wholesale_decimal, me.low_decimal
FROM jsh_material m FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1' left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2' left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.status,'0') !='2'
where 1=1 where 1=1
and me.default_flag=1 and me.default_flag=1
<if test="name != null"> <if test="name != null">
...@@ -140,9 +140,9 @@ ...@@ -140,9 +140,9 @@
and m.model like '%${model}%' and m.model like '%${model}%'
</if> </if>
<if test="categoryIds != null"> <if test="categoryIds != null">
and m.CategoryId in (${categoryIds}) and m.category_id in (${categoryIds})
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
order by m.id desc order by m.id desc
</select> </select>
<select id="findByMaterialName" resultType="com.jsh.erp.datasource.entities.Material"> <select id="findByMaterialName" resultType="com.jsh.erp.datasource.entities.Material">
...@@ -152,18 +152,17 @@ ...@@ -152,18 +152,17 @@
<if test="name != null"> <if test="name != null">
and m.name =#{name} and m.name =#{name}
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="getMaterialEnableSerialNumberList" parameterType="java.util.Map" resultMap="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"> <select id="getMaterialEnableSerialNumberList" parameterType="java.util.Map" resultMap="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap">
select select
Id, CategoryId, name, Mfrs, SafetyStock, Model, Standard, Color, Unit, Remark, id, category_id, name, mfrs, safety_stock, model, standard, color, unit, remark,
UnitId, Enabled,enableSerialNumber unit_id, enabled,enable_serial_number
FROM jsh_material FROM jsh_material
where 1=1 where 1=1
and enabled ='1' and enabled ='1'
and enableSerialNumber ='1' and enable_serial_number ='1'
<if test="name != null and name != ''"> <if test="name != null and name != ''">
<bind name="name" value="'%' + _parameter.name + '%'" /> <bind name="name" value="'%' + _parameter.name + '%'" />
and name like #{name} and name like #{name}
...@@ -172,7 +171,7 @@ ...@@ -172,7 +171,7 @@
<bind name="model" value="'%' + _parameter.model + '%'" /> <bind name="model" value="'%' + _parameter.model + '%'" />
and model like #{model} and model like #{model}
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
order by id desc order by id desc
</select> </select>
...@@ -181,7 +180,7 @@ ...@@ -181,7 +180,7 @@
FROM jsh_material FROM jsh_material
where 1=1 where 1=1
and enabled ='1' and enabled ='1'
and enableSerialNumber ='1' and enable_serial_number ='1'
<if test="name != null and name != ''"> <if test="name != null and name != ''">
<bind name="name" value="'%' + _parameter.name + '%'" /> <bind name="name" value="'%' + _parameter.name + '%'" />
and name like #{name} and name like #{name}
...@@ -190,14 +189,14 @@ ...@@ -190,14 +189,14 @@
<bind name="model" value="'%' + _parameter.model + '%'" /> <bind name="model" value="'%' + _parameter.model + '%'" />
and model like #{model} and model like #{model}
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<update id="batchDeleteMaterialByIds"> <update id="batchDeleteMaterialByIds">
update jsh_material update jsh_material
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
#{id} #{id}
...@@ -209,24 +208,24 @@ ...@@ -209,24 +208,24 @@
<include refid="com.jsh.erp.datasource.mappers.MaterialMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.MaterialMapper.Base_Column_List" />
from jsh_material from jsh_material
where 1=1 where 1=1
and categoryId in ( and category_id in (
<foreach collection="categoryIds" item="categoryId" separator=","> <foreach collection="categoryIds" item="categoryId" separator=",">
#{categoryId} #{categoryId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getMaterialListByUnitIds" resultMap="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap"> <select id="getMaterialListByUnitIds" resultMap="com.jsh.erp.datasource.mappers.MaterialMapper.BaseResultMap">
select select
<include refid="com.jsh.erp.datasource.mappers.MaterialMapper.Base_Column_List" /> <include refid="com.jsh.erp.datasource.mappers.MaterialMapper.Base_Column_List" />
from jsh_material from jsh_material
where 1=1 where 1=1
and unitId in ( and unit_id in (
<foreach collection="unitIds" item="unitId" separator=","> <foreach collection="unitIds" item="unitId" separator=",">
#{unitId} #{unitId}
</foreach> </foreach>
) )
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="getMaxBarCode" resultType="java.lang.String"> <select id="getMaxBarCode" resultType="java.lang.String">
...@@ -239,18 +238,18 @@ ...@@ -239,18 +238,18 @@
select m.*,me.bar_code m_bar_code,u.name unitName, mc.name categoryName select m.*,me.bar_code m_bar_code,u.name unitName, mc.name categoryName
FROM jsh_material m FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1' left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_flag,'0') !='1' left JOIN jsh_unit u on m.unit_id = u.id and ifnull(u.delete_flag,'0') !='1'
left JOIN jsh_material_category mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2' left JOIN jsh_material_category mc on m.category_id = mc.id and ifnull(mc.status,'0') !='2'
where 1=1 where 1=1
<if test="meId != null"> <if test="meId != null">
and me.id = ${meId} and me.id = ${meId}
</if> </if>
and ifnull(m.delete_Flag,'0') !='1' and ifnull(m.delete_flag,'0') !='1'
</select> </select>
<select id="getMaterialNameList" resultType="java.lang.String"> <select id="getMaterialNameList" resultType="java.lang.String">
select m.name from jsh_material m select m.name from jsh_material m
where m.name is not null and m.name !='' and ifnull(m.delete_Flag,'0') !='1' where m.name is not null and m.name !='' and ifnull(m.delete_flag,'0') !='1'
group by m.name group by m.name
order by m.name asc order by m.name asc
</select> </select>
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
select select
ser.id, ser.material_id, ser.serial_number, ser.is_sell, ser.remark, ser.delete_flag, ser.create_time, ser.id, ser.material_id, ser.serial_number, ser.is_sell, ser.remark, ser.delete_flag, ser.create_time,
ser.update_time,mat.name as materialName,null as creator,null as updater,null as creatorName, ser.update_time,mat.name as materialName,null as creator,null as updater,null as creatorName,
null as updaterName,ser.depot_head_id, dh.number as depotHeadNumber,concat(dh.SubType,dh.Type) as depotHeadType null as updaterName,ser.depot_head_id, dh.number as depotHeadNumber,concat(dh.sub_type,dh.type) as depotHeadType
FROM jsh_serial_number ser FROM jsh_serial_number ser
left join jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_Flag,'0') !='1' left join jsh_material mat on mat.id = ser.material_Id and ifnull(mat.delete_flag,'0') !='1'
left join jsh_depothead dh on dh.id= ser.depot_head_id and ifnull(dh.delete_Flag,'0') !='1' left join jsh_depot_head dh on dh.id= ser.depot_head_id and ifnull(dh.delete_flag,'0') !='1'
where 1=1 where 1=1
<if test="serialNumber != null"> <if test="serialNumber != null">
<bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" /> <bind name="serialNumber" value="'%' + _parameter.serialNumber + '%'" />
......
<?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.SupplierMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.SupplierMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Supplier"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Supplier">
<!-- <id column="id" jdbcType="BIGINT" property="id" />
WARNING - @mbggenerated <result column="supplier" jdbcType="VARCHAR" property="supplier" />
This element is automatically generated by MyBatis Generator, do not modify. <result column="contacts" jdbcType="VARCHAR" property="contacts" />
--> <result column="phone_num" jdbcType="VARCHAR" property="phoneNum" />
<id column="id" jdbcType="BIGINT" property="id" /> <result column="email" jdbcType="VARCHAR" property="email" />
<result column="supplier" jdbcType="VARCHAR" property="supplier" /> <result column="description" jdbcType="VARCHAR" property="description" />
<result column="contacts" jdbcType="VARCHAR" property="contacts" /> <result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="email" jdbcType="VARCHAR" property="email" /> <result column="enabled" jdbcType="BIT" property="enabled" />
<result column="description" jdbcType="VARCHAR" property="description" /> <result column="advance_in" jdbcType="DECIMAL" property="advanceIn" />
<result column="isystem" jdbcType="TINYINT" property="isystem" /> <result column="begin_need_get" jdbcType="DECIMAL" property="beginNeedGet" />
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="begin_need_pay" jdbcType="DECIMAL" property="beginNeedPay" />
<result column="enabled" jdbcType="BIT" property="enabled" /> <result column="all_need_get" jdbcType="DECIMAL" property="allNeedGet" />
<result column="AdvanceIn" jdbcType="DECIMAL" property="advancein" /> <result column="all_need_pay" jdbcType="DECIMAL" property="allNeedPay" />
<result column="BeginNeedGet" jdbcType="DECIMAL" property="beginneedget" /> <result column="fax" jdbcType="VARCHAR" property="fax" />
<result column="BeginNeedPay" jdbcType="DECIMAL" property="beginneedpay" /> <result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="AllNeedGet" jdbcType="DECIMAL" property="allneedget" /> <result column="address" jdbcType="VARCHAR" property="address" />
<result column="AllNeedPay" jdbcType="DECIMAL" property="allneedpay" /> <result column="tax_num" jdbcType="VARCHAR" property="taxNum" />
<result column="fax" jdbcType="VARCHAR" property="fax" /> <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" /> <result column="account_number" jdbcType="VARCHAR" property="accountNumber" />
<result column="address" jdbcType="VARCHAR" property="address" /> <result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="taxNum" jdbcType="VARCHAR" property="taxnum" /> <result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="bankName" jdbcType="VARCHAR" property="bankname" /> <result column="delete_flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="accountNumber" jdbcType="VARCHAR" property="accountnumber" /> </resultMap>
<result column="taxRate" jdbcType="DECIMAL" property="taxrate" /> <sql id="Example_Where_Clause">
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> <where>
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <foreach collection="oredCriteria" item="criteria" separator="or">
</resultMap> <if test="criteria.valid">
<sql id="Example_Where_Clause"> <trim prefix="(" prefixOverrides="and" suffix=")">
<!-- <foreach collection="criteria.criteria" item="criterion">
WARNING - @mbggenerated <choose>
This element is automatically generated by MyBatis Generator, do not modify. <when test="criterion.noValue">
--> and ${criterion.condition}
<where> </when>
<foreach collection="oredCriteria" item="criteria" separator="or"> <when test="criterion.singleValue">
<if test="criteria.valid"> and ${criterion.condition} #{criterion.value}
<trim prefix="(" prefixOverrides="and" suffix=")"> </when>
<foreach collection="criteria.criteria" item="criterion"> <when test="criterion.betweenValue">
<choose> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<when test="criterion.noValue"> </when>
and ${criterion.condition} <when test="criterion.listValue">
</when> and ${criterion.condition}
<when test="criterion.singleValue"> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
and ${criterion.condition} #{criterion.value} #{listItem}
</when> </foreach>
<when test="criterion.betweenValue"> </when>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </choose>
</when> </foreach>
<when test="criterion.listValue"> </trim>
and ${criterion.condition} </if>
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> </foreach>
#{listItem} </where>
</foreach> </sql>
</when> <sql id="Update_By_Example_Where_Clause">
</choose> <where>
</foreach> <foreach collection="example.oredCriteria" item="criteria" separator="or">
</trim> <if test="criteria.valid">
</if> <trim prefix="(" prefixOverrides="and" suffix=")">
</foreach> <foreach collection="criteria.criteria" item="criterion">
</where> <choose>
</sql> <when test="criterion.noValue">
<sql id="Update_By_Example_Where_Clause"> and ${criterion.condition}
<!-- </when>
WARNING - @mbggenerated <when test="criterion.singleValue">
This element is automatically generated by MyBatis Generator, do not modify. and ${criterion.condition} #{criterion.value}
--> </when>
<where> <when test="criterion.betweenValue">
<foreach collection="example.oredCriteria" item="criteria" separator="or"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
<if test="criteria.valid"> </when>
<trim prefix="(" prefixOverrides="and" suffix=")"> <when test="criterion.listValue">
<foreach collection="criteria.criteria" item="criterion"> and ${criterion.condition}
<choose> <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<when test="criterion.noValue"> #{listItem}
and ${criterion.condition} </foreach>
</when> </when>
<when test="criterion.singleValue"> </choose>
and ${criterion.condition} #{criterion.value} </foreach>
</when> </trim>
<when test="criterion.betweenValue"> </if>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </foreach>
</when> </where>
<when test="criterion.listValue"> </sql>
and ${criterion.condition} <sql id="Base_Column_List">
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> id, supplier, contacts, phone_num, email, description, isystem, type, enabled, advance_in,
#{listItem} begin_need_get, begin_need_pay, all_need_get, all_need_pay, fax, telephone, address,
</foreach> tax_num, bank_name, account_number, tax_rate, tenant_id, delete_flag
</when> </sql>
</choose> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="BaseResultMap">
</foreach> select
</trim> <if test="distinct">
</if> distinct
</foreach> </if>
</where> <include refid="Base_Column_List" />
</sql> from jsh_supplier
<sql id="Base_Column_List"> <if test="_parameter != null">
<!-- <include refid="Example_Where_Clause" />
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="orderByClause != null">
--> order by ${orderByClause}
id, supplier, contacts, phonenum, email, description, isystem, type, enabled, AdvanceIn, </if>
BeginNeedGet, BeginNeedPay, AllNeedGet, AllNeedPay, fax, telephone, address, taxNum, </select>
bankName, accountNumber, taxRate, tenant_id, delete_Flag <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
</sql> select
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="BaseResultMap"> <include refid="Base_Column_List" />
<!-- from jsh_supplier
WARNING - @mbggenerated where id = #{id,jdbcType=BIGINT}
This element is automatically generated by MyBatis Generator, do not modify. </select>
--> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
select delete from jsh_supplier
<if test="distinct"> where id = #{id,jdbcType=BIGINT}
distinct </delete>
</if> <delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample">
<include refid="Base_Column_List" /> delete from jsh_supplier
from jsh_supplier <if test="_parameter != null">
<if test="_parameter != null"> <include refid="Example_Where_Clause" />
<include refid="Example_Where_Clause" /> </if>
</if> </delete>
<if test="orderByClause != null"> <insert id="insert" parameterType="com.jsh.erp.datasource.entities.Supplier">
order by ${orderByClause} insert into jsh_supplier (id, supplier, contacts,
</if> phone_num, email, description,
</select> isystem, type, enabled,
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> advance_in, begin_need_get, begin_need_pay,
<!-- all_need_get, all_need_pay, fax,
WARNING - @mbggenerated telephone, address, tax_num,
This element is automatically generated by MyBatis Generator, do not modify. bank_name, account_number, tax_rate,
--> tenant_id, delete_flag)
select values (#{id,jdbcType=BIGINT}, #{supplier,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR},
<include refid="Base_Column_List" /> #{phoneNum,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
from jsh_supplier #{isystem,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT},
where id = #{id,jdbcType=BIGINT} #{advanceIn,jdbcType=DECIMAL}, #{beginNeedGet,jdbcType=DECIMAL}, #{beginNeedPay,jdbcType=DECIMAL},
</select> #{allNeedGet,jdbcType=DECIMAL}, #{allNeedPay,jdbcType=DECIMAL}, #{fax,jdbcType=VARCHAR},
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> #{telephone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{taxNum,jdbcType=VARCHAR},
<!-- #{bankName,jdbcType=VARCHAR}, #{accountNumber,jdbcType=VARCHAR}, #{taxRate,jdbcType=DECIMAL},
WARNING - @mbggenerated #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
This element is automatically generated by MyBatis Generator, do not modify. </insert>
--> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
delete from jsh_supplier insert into jsh_supplier
where id = #{id,jdbcType=BIGINT} <trim prefix="(" suffix=")" suffixOverrides=",">
</delete> <if test="id != null">
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample"> id,
<!-- </if>
WARNING - @mbggenerated <if test="supplier != null">
This element is automatically generated by MyBatis Generator, do not modify. supplier,
--> </if>
delete from jsh_supplier <if test="contacts != null">
<if test="_parameter != null"> contacts,
<include refid="Example_Where_Clause" /> </if>
</if> <if test="phoneNum != null">
</delete> phone_num,
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Supplier"> </if>
<!-- <if test="email != null">
WARNING - @mbggenerated email,
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="description != null">
insert into jsh_supplier (id, supplier, contacts, description,
phonenum, email, description, </if>
isystem, type, enabled, <if test="isystem != null">
AdvanceIn, BeginNeedGet, BeginNeedPay, isystem,
AllNeedGet, AllNeedPay, fax, </if>
telephone, address, taxNum, <if test="type != null">
bankName, accountNumber, taxRate, type,
tenant_id, delete_Flag) </if>
values (#{id,jdbcType=BIGINT}, #{supplier,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, <if test="enabled != null">
#{phonenum,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, enabled,
#{isystem,jdbcType=TINYINT}, #{type,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, </if>
#{advancein,jdbcType=DECIMAL}, #{beginneedget,jdbcType=DECIMAL}, #{beginneedpay,jdbcType=DECIMAL}, <if test="advanceIn != null">
#{allneedget,jdbcType=DECIMAL}, #{allneedpay,jdbcType=DECIMAL}, #{fax,jdbcType=VARCHAR}, advance_in,
#{telephone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{taxnum,jdbcType=VARCHAR}, </if>
#{bankname,jdbcType=VARCHAR}, #{accountnumber,jdbcType=VARCHAR}, #{taxrate,jdbcType=DECIMAL}, <if test="beginNeedGet != null">
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) begin_need_get,
</insert> </if>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Supplier"> <if test="beginNeedPay != null">
<!-- begin_need_pay,
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. <if test="allNeedGet != null">
--> all_need_get,
insert into jsh_supplier </if>
<trim prefix="(" suffix=")" suffixOverrides=","> <if test="allNeedPay != null">
<if test="id != null"> all_need_pay,
id, </if>
</if> <if test="fax != null">
<if test="supplier != null"> fax,
supplier, </if>
</if> <if test="telephone != null">
<if test="contacts != null"> telephone,
contacts, </if>
</if> <if test="address != null">
<if test="phonenum != null"> address,
phonenum, </if>
</if> <if test="taxNum != null">
<if test="email != null"> tax_num,
email, </if>
</if> <if test="bankName != null">
<if test="description != null"> bank_name,
description, </if>
</if> <if test="accountNumber != null">
<if test="isystem != null"> account_number,
isystem, </if>
</if> <if test="taxRate != null">
<if test="type != null"> tax_rate,
type, </if>
</if> <if test="tenantId != null">
<if test="enabled != null"> tenant_id,
enabled, </if>
</if> <if test="deleteFlag != null">
<if test="advancein != null"> delete_flag,
AdvanceIn, </if>
</if> </trim>
<if test="beginneedget != null"> <trim prefix="values (" suffix=")" suffixOverrides=",">
BeginNeedGet, <if test="id != null">
</if> #{id,jdbcType=BIGINT},
<if test="beginneedpay != null"> </if>
BeginNeedPay, <if test="supplier != null">
</if> #{supplier,jdbcType=VARCHAR},
<if test="allneedget != null"> </if>
AllNeedGet, <if test="contacts != null">
</if> #{contacts,jdbcType=VARCHAR},
<if test="allneedpay != null"> </if>
AllNeedPay, <if test="phoneNum != null">
</if> #{phoneNum,jdbcType=VARCHAR},
<if test="fax != null"> </if>
fax, <if test="email != null">
</if> #{email,jdbcType=VARCHAR},
<if test="telephone != null"> </if>
telephone, <if test="description != null">
</if> #{description,jdbcType=VARCHAR},
<if test="address != null"> </if>
address, <if test="isystem != null">
</if> #{isystem,jdbcType=TINYINT},
<if test="taxnum != null"> </if>
taxNum, <if test="type != null">
</if> #{type,jdbcType=VARCHAR},
<if test="bankname != null"> </if>
bankName, <if test="enabled != null">
</if> #{enabled,jdbcType=BIT},
<if test="accountnumber != null"> </if>
accountNumber, <if test="advanceIn != null">
</if> #{advanceIn,jdbcType=DECIMAL},
<if test="taxrate != null"> </if>
taxRate, <if test="beginNeedGet != null">
</if> #{beginNeedGet,jdbcType=DECIMAL},
<if test="tenantId != null"> </if>
tenant_id, <if test="beginNeedPay != null">
</if> #{beginNeedPay,jdbcType=DECIMAL},
<if test="deleteFlag != null"> </if>
delete_Flag, <if test="allNeedGet != null">
</if> #{allNeedGet,jdbcType=DECIMAL},
</trim> </if>
<trim prefix="values (" suffix=")" suffixOverrides=","> <if test="allNeedPay != null">
<if test="id != null"> #{allNeedPay,jdbcType=DECIMAL},
#{id,jdbcType=BIGINT}, </if>
</if> <if test="fax != null">
<if test="supplier != null"> #{fax,jdbcType=VARCHAR},
#{supplier,jdbcType=VARCHAR}, </if>
</if> <if test="telephone != null">
<if test="contacts != null"> #{telephone,jdbcType=VARCHAR},
#{contacts,jdbcType=VARCHAR}, </if>
</if> <if test="address != null">
<if test="phonenum != null"> #{address,jdbcType=VARCHAR},
#{phonenum,jdbcType=VARCHAR}, </if>
</if> <if test="taxNum != null">
<if test="email != null"> #{taxNum,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, </if>
</if> <if test="bankName != null">
<if test="description != null"> #{bankName,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, </if>
</if> <if test="accountNumber != null">
<if test="isystem != null"> #{accountNumber,jdbcType=VARCHAR},
#{isystem,jdbcType=TINYINT}, </if>
</if> <if test="taxRate != null">
<if test="type != null"> #{taxRate,jdbcType=DECIMAL},
#{type,jdbcType=VARCHAR}, </if>
</if> <if test="tenantId != null">
<if test="enabled != null"> #{tenantId,jdbcType=BIGINT},
#{enabled,jdbcType=BIT}, </if>
</if> <if test="deleteFlag != null">
<if test="advancein != null"> #{deleteFlag,jdbcType=VARCHAR},
#{advancein,jdbcType=DECIMAL}, </if>
</if> </trim>
<if test="beginneedget != null"> </insert>
#{beginneedget,jdbcType=DECIMAL}, <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultType="java.lang.Long">
</if> select count(*) from jsh_supplier
<if test="beginneedpay != null"> <if test="_parameter != null">
#{beginneedpay,jdbcType=DECIMAL}, <include refid="Example_Where_Clause" />
</if> </if>
<if test="allneedget != null"> </select>
#{allneedget,jdbcType=DECIMAL}, <update id="updateByExampleSelective" parameterType="map">
</if> update jsh_supplier
<if test="allneedpay != null"> <set>
#{allneedpay,jdbcType=DECIMAL}, <if test="record.id != null">
</if> id = #{record.id,jdbcType=BIGINT},
<if test="fax != null"> </if>
#{fax,jdbcType=VARCHAR}, <if test="record.supplier != null">
</if> supplier = #{record.supplier,jdbcType=VARCHAR},
<if test="telephone != null"> </if>
#{telephone,jdbcType=VARCHAR}, <if test="record.contacts != null">
</if> contacts = #{record.contacts,jdbcType=VARCHAR},
<if test="address != null"> </if>
#{address,jdbcType=VARCHAR}, <if test="record.phoneNum != null">
</if> phone_num = #{record.phoneNum,jdbcType=VARCHAR},
<if test="taxnum != null"> </if>
#{taxnum,jdbcType=VARCHAR}, <if test="record.email != null">
</if> email = #{record.email,jdbcType=VARCHAR},
<if test="bankname != null"> </if>
#{bankname,jdbcType=VARCHAR}, <if test="record.description != null">
</if> description = #{record.description,jdbcType=VARCHAR},
<if test="accountnumber != null"> </if>
#{accountnumber,jdbcType=VARCHAR}, <if test="record.isystem != null">
</if> isystem = #{record.isystem,jdbcType=TINYINT},
<if test="taxrate != null"> </if>
#{taxrate,jdbcType=DECIMAL}, <if test="record.type != null">
</if> type = #{record.type,jdbcType=VARCHAR},
<if test="tenantId != null"> </if>
#{tenantId,jdbcType=BIGINT}, <if test="record.enabled != null">
</if> enabled = #{record.enabled,jdbcType=BIT},
<if test="deleteFlag != null"> </if>
#{deleteFlag,jdbcType=VARCHAR}, <if test="record.advanceIn != null">
</if> advance_in = #{record.advanceIn,jdbcType=DECIMAL},
</trim> </if>
</insert> <if test="record.beginNeedGet != null">
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultType="java.lang.Integer"> begin_need_get = #{record.beginNeedGet,jdbcType=DECIMAL},
<!-- </if>
WARNING - @mbggenerated <if test="record.beginNeedPay != null">
This element is automatically generated by MyBatis Generator, do not modify. begin_need_pay = #{record.beginNeedPay,jdbcType=DECIMAL},
--> </if>
select count(*) from jsh_supplier <if test="record.allNeedGet != null">
<if test="_parameter != null"> all_need_get = #{record.allNeedGet,jdbcType=DECIMAL},
<include refid="Example_Where_Clause" /> </if>
</if> <if test="record.allNeedPay != null">
</select> all_need_pay = #{record.allNeedPay,jdbcType=DECIMAL},
<update id="updateByExampleSelective" parameterType="map"> </if>
<!-- <if test="record.fax != null">
WARNING - @mbggenerated fax = #{record.fax,jdbcType=VARCHAR},
This element is automatically generated by MyBatis Generator, do not modify. </if>
--> <if test="record.telephone != null">
update jsh_supplier telephone = #{record.telephone,jdbcType=VARCHAR},
<set> </if>
<if test="record.id != null"> <if test="record.address != null">
id = #{record.id,jdbcType=BIGINT}, address = #{record.address,jdbcType=VARCHAR},
</if> </if>
<if test="record.supplier != null"> <if test="record.taxNum != null">
supplier = #{record.supplier,jdbcType=VARCHAR}, tax_num = #{record.taxNum,jdbcType=VARCHAR},
</if> </if>
<if test="record.contacts != null"> <if test="record.bankName != null">
contacts = #{record.contacts,jdbcType=VARCHAR}, bank_name = #{record.bankName,jdbcType=VARCHAR},
</if> </if>
<if test="record.phonenum != null"> <if test="record.accountNumber != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR}, account_number = #{record.accountNumber,jdbcType=VARCHAR},
</if> </if>
<if test="record.email != null"> <if test="record.taxRate != null">
email = #{record.email,jdbcType=VARCHAR}, tax_rate = #{record.taxRate,jdbcType=DECIMAL},
</if> </if>
<if test="record.description != null"> <if test="record.tenantId != null">
description = #{record.description,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if> </if>
<if test="record.isystem != null"> <if test="record.deleteFlag != null">
isystem = #{record.isystem,jdbcType=TINYINT}, delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if> </if>
<if test="record.type != null"> </set>
type = #{record.type,jdbcType=VARCHAR}, <if test="_parameter != null">
</if> <include refid="Update_By_Example_Where_Clause" />
<if test="record.enabled != null"> </if>
enabled = #{record.enabled,jdbcType=BIT}, </update>
</if> <update id="updateByExample" parameterType="map">
<if test="record.advancein != null"> update jsh_supplier
AdvanceIn = #{record.advancein,jdbcType=DECIMAL}, set id = #{record.id,jdbcType=BIGINT},
</if> supplier = #{record.supplier,jdbcType=VARCHAR},
<if test="record.beginneedget != null"> contacts = #{record.contacts,jdbcType=VARCHAR},
BeginNeedGet = #{record.beginneedget,jdbcType=DECIMAL}, phone_num = #{record.phoneNum,jdbcType=VARCHAR},
</if> email = #{record.email,jdbcType=VARCHAR},
<if test="record.beginneedpay != null"> description = #{record.description,jdbcType=VARCHAR},
BeginNeedPay = #{record.beginneedpay,jdbcType=DECIMAL}, isystem = #{record.isystem,jdbcType=TINYINT},
</if> type = #{record.type,jdbcType=VARCHAR},
<if test="record.allneedget != null"> enabled = #{record.enabled,jdbcType=BIT},
AllNeedGet = #{record.allneedget,jdbcType=DECIMAL}, advance_in = #{record.advanceIn,jdbcType=DECIMAL},
</if> begin_need_get = #{record.beginNeedGet,jdbcType=DECIMAL},
<if test="record.allneedpay != null"> begin_need_pay = #{record.beginNeedPay,jdbcType=DECIMAL},
AllNeedPay = #{record.allneedpay,jdbcType=DECIMAL}, all_need_get = #{record.allNeedGet,jdbcType=DECIMAL},
</if> all_need_pay = #{record.allNeedPay,jdbcType=DECIMAL},
<if test="record.fax != null"> fax = #{record.fax,jdbcType=VARCHAR},
fax = #{record.fax,jdbcType=VARCHAR}, telephone = #{record.telephone,jdbcType=VARCHAR},
</if> address = #{record.address,jdbcType=VARCHAR},
<if test="record.telephone != null"> tax_num = #{record.taxNum,jdbcType=VARCHAR},
telephone = #{record.telephone,jdbcType=VARCHAR}, bank_name = #{record.bankName,jdbcType=VARCHAR},
</if> account_number = #{record.accountNumber,jdbcType=VARCHAR},
<if test="record.address != null"> tax_rate = #{record.taxRate,jdbcType=DECIMAL},
address = #{record.address,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if> delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if test="record.taxnum != null"> <if test="_parameter != null">
taxNum = #{record.taxnum,jdbcType=VARCHAR}, <include refid="Update_By_Example_Where_Clause" />
</if> </if>
<if test="record.bankname != null"> </update>
bankName = #{record.bankname,jdbcType=VARCHAR}, <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Supplier">
</if> update jsh_supplier
<if test="record.accountnumber != null"> <set>
accountNumber = #{record.accountnumber,jdbcType=VARCHAR}, <if test="supplier != null">
</if> supplier = #{supplier,jdbcType=VARCHAR},
<if test="record.taxrate != null"> </if>
taxRate = #{record.taxrate,jdbcType=DECIMAL}, <if test="contacts != null">
</if> contacts = #{contacts,jdbcType=VARCHAR},
<if test="record.tenantId != null"> </if>
tenant_id = #{record.tenantId,jdbcType=BIGINT}, <if test="phoneNum != null">
</if> phone_num = #{phoneNum,jdbcType=VARCHAR},
<if test="record.deleteFlag != null"> </if>
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, <if test="email != null">
</if> email = #{email,jdbcType=VARCHAR},
</set> </if>
<if test="_parameter != null"> <if test="description != null">
<include refid="Update_By_Example_Where_Clause" /> description = #{description,jdbcType=VARCHAR},
</if> </if>
</update> <if test="isystem != null">
<update id="updateByExample" parameterType="map"> isystem = #{isystem,jdbcType=TINYINT},
<!-- </if>
WARNING - @mbggenerated <if test="type != null">
This element is automatically generated by MyBatis Generator, do not modify. type = #{type,jdbcType=VARCHAR},
--> </if>
update jsh_supplier <if test="enabled != null">
set id = #{record.id,jdbcType=BIGINT}, enabled = #{enabled,jdbcType=BIT},
supplier = #{record.supplier,jdbcType=VARCHAR}, </if>
contacts = #{record.contacts,jdbcType=VARCHAR}, <if test="advanceIn != null">
phonenum = #{record.phonenum,jdbcType=VARCHAR}, advance_in = #{advanceIn,jdbcType=DECIMAL},
email = #{record.email,jdbcType=VARCHAR}, </if>
description = #{record.description,jdbcType=VARCHAR}, <if test="beginNeedGet != null">
isystem = #{record.isystem,jdbcType=TINYINT}, begin_need_get = #{beginNeedGet,jdbcType=DECIMAL},
type = #{record.type,jdbcType=VARCHAR}, </if>
enabled = #{record.enabled,jdbcType=BIT}, <if test="beginNeedPay != null">
AdvanceIn = #{record.advancein,jdbcType=DECIMAL}, begin_need_pay = #{beginNeedPay,jdbcType=DECIMAL},
BeginNeedGet = #{record.beginneedget,jdbcType=DECIMAL}, </if>
BeginNeedPay = #{record.beginneedpay,jdbcType=DECIMAL}, <if test="allNeedGet != null">
AllNeedGet = #{record.allneedget,jdbcType=DECIMAL}, all_need_get = #{allNeedGet,jdbcType=DECIMAL},
AllNeedPay = #{record.allneedpay,jdbcType=DECIMAL}, </if>
fax = #{record.fax,jdbcType=VARCHAR}, <if test="allNeedPay != null">
telephone = #{record.telephone,jdbcType=VARCHAR}, all_need_pay = #{allNeedPay,jdbcType=DECIMAL},
address = #{record.address,jdbcType=VARCHAR}, </if>
taxNum = #{record.taxnum,jdbcType=VARCHAR}, <if test="fax != null">
bankName = #{record.bankname,jdbcType=VARCHAR}, fax = #{fax,jdbcType=VARCHAR},
accountNumber = #{record.accountnumber,jdbcType=VARCHAR}, </if>
taxRate = #{record.taxrate,jdbcType=DECIMAL}, <if test="telephone != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT}, telephone = #{telephone,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} </if>
<if test="_parameter != null"> <if test="address != null">
<include refid="Update_By_Example_Where_Clause" /> address = #{address,jdbcType=VARCHAR},
</if> </if>
</update> <if test="taxNum != null">
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Supplier"> tax_num = #{taxNum,jdbcType=VARCHAR},
<!-- </if>
WARNING - @mbggenerated <if test="bankName != null">
This element is automatically generated by MyBatis Generator, do not modify. bank_name = #{bankName,jdbcType=VARCHAR},
--> </if>
update jsh_supplier <if test="accountNumber != null">
<set> account_number = #{accountNumber,jdbcType=VARCHAR},
<if test="supplier != null"> </if>
supplier = #{supplier,jdbcType=VARCHAR}, <if test="taxRate != null">
</if> tax_rate = #{taxRate,jdbcType=DECIMAL},
<if test="contacts != null"> </if>
contacts = #{contacts,jdbcType=VARCHAR}, <if test="tenantId != null">
</if> tenant_id = #{tenantId,jdbcType=BIGINT},
<if test="phonenum != null"> </if>
phonenum = #{phonenum,jdbcType=VARCHAR}, <if test="deleteFlag != null">
</if> delete_flag = #{deleteFlag,jdbcType=VARCHAR},
<if test="email != null"> </if>
email = #{email,jdbcType=VARCHAR}, </set>
</if> where id = #{id,jdbcType=BIGINT}
<if test="description != null"> </update>
description = #{description,jdbcType=VARCHAR}, <update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Supplier">
</if> update jsh_supplier
<if test="isystem != null"> set supplier = #{supplier,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT}, contacts = #{contacts,jdbcType=VARCHAR},
</if> phone_num = #{phoneNum,jdbcType=VARCHAR},
<if test="type != null"> email = #{email,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
</if> isystem = #{isystem,jdbcType=TINYINT},
<if test="enabled != null"> type = #{type,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT}, enabled = #{enabled,jdbcType=BIT},
</if> advance_in = #{advanceIn,jdbcType=DECIMAL},
<if test="advancein != null"> begin_need_get = #{beginNeedGet,jdbcType=DECIMAL},
AdvanceIn = #{advancein,jdbcType=DECIMAL}, begin_need_pay = #{beginNeedPay,jdbcType=DECIMAL},
</if> all_need_get = #{allNeedGet,jdbcType=DECIMAL},
<if test="beginneedget != null"> all_need_pay = #{allNeedPay,jdbcType=DECIMAL},
BeginNeedGet = #{beginneedget,jdbcType=DECIMAL}, fax = #{fax,jdbcType=VARCHAR},
</if> telephone = #{telephone,jdbcType=VARCHAR},
<if test="beginneedpay != null"> address = #{address,jdbcType=VARCHAR},
BeginNeedPay = #{beginneedpay,jdbcType=DECIMAL}, tax_num = #{taxNum,jdbcType=VARCHAR},
</if> bank_name = #{bankName,jdbcType=VARCHAR},
<if test="allneedget != null"> account_number = #{accountNumber,jdbcType=VARCHAR},
AllNeedGet = #{allneedget,jdbcType=DECIMAL}, tax_rate = #{taxRate,jdbcType=DECIMAL},
</if> tenant_id = #{tenantId,jdbcType=BIGINT},
<if test="allneedpay != null"> delete_flag = #{deleteFlag,jdbcType=VARCHAR}
AllNeedPay = #{allneedpay,jdbcType=DECIMAL}, where id = #{id,jdbcType=BIGINT}
</if> </update>
<if test="fax != null">
fax = #{fax,jdbcType=VARCHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="taxnum != null">
taxNum = #{taxnum,jdbcType=VARCHAR},
</if>
<if test="bankname != null">
bankName = #{bankname,jdbcType=VARCHAR},
</if>
<if test="accountnumber != null">
accountNumber = #{accountnumber,jdbcType=VARCHAR},
</if>
<if test="taxrate != null">
taxRate = #{taxrate,jdbcType=DECIMAL},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Supplier">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_supplier
set supplier = #{supplier,jdbcType=VARCHAR},
contacts = #{contacts,jdbcType=VARCHAR},
phonenum = #{phonenum,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
type = #{type,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BIT},
AdvanceIn = #{advancein,jdbcType=DECIMAL},
BeginNeedGet = #{beginneedget,jdbcType=DECIMAL},
BeginNeedPay = #{beginneedpay,jdbcType=DECIMAL},
AllNeedGet = #{allneedget,jdbcType=DECIMAL},
AllNeedPay = #{allneedpay,jdbcType=DECIMAL},
fax = #{fax,jdbcType=VARCHAR},
telephone = #{telephone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
taxNum = #{taxnum,jdbcType=VARCHAR},
bankName = #{bankname,jdbcType=VARCHAR},
accountNumber = #{accountnumber,jdbcType=VARCHAR},
taxRate = #{taxrate,jdbcType=DECIMAL},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
and type='${type}' and type='${type}'
</if> </if>
<if test="phonenum != null"> <if test="phonenum != null">
and phonenum like '%${phonenum}%' and phone_num like '%${phonenum}%'
</if> </if>
<if test="telephone != null"> <if test="telephone != null">
and telephone like '%${telephone}%' and telephone like '%${telephone}%'
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
order by id desc order by id desc
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
and type='${type}' and type='${type}'
</if> </if>
<if test="phonenum != null"> <if test="phonenum != null">
and phonenum like '%${phonenum}%' and phone_num like '%${phonenum}%'
</if> </if>
<if test="telephone != null"> <if test="telephone != null">
and telephone like '%${telephone}%' and telephone like '%${telephone}%'
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="com.jsh.erp.datasource.mappers.SupplierMapper.BaseResultMap"> <select id="findByAll" parameterType="com.jsh.erp.datasource.entities.SupplierExample" resultMap="com.jsh.erp.datasource.mappers.SupplierMapper.BaseResultMap">
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
and type='${type}' and type='${type}'
</if> </if>
<if test="phonenum != null"> <if test="phonenum != null">
and phonenum like '%${phonenum}%' and phone_num like '%${phonenum}%'
</if> </if>
<if test="telephone != null"> <if test="telephone != null">
and telephone like '%${telephone}%' and telephone like '%${telephone}%'
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
<if test="description != null"> <if test="description != null">
and description like '%${description}%' and description like '%${description}%'
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
</select> </select>
<update id="batchDeleteSupplierByIds"> <update id="batchDeleteSupplierByIds">
update jsh_supplier update jsh_supplier
set delete_Flag='1' set delete_flag='1'
where 1=1 where 1=1
and id in ( and id in (
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="id" separator=",">
......
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
<property name="exampleMethodVisibility" value="public"/> <property name="exampleMethodVisibility" value="public"/>
</javaClientGenerator> </javaClientGenerator>
<!-- <table tableName="jsh_account" domainObjectName="Account"></table> <!-- <table tableName="jsh_account" domainObjectName="Account"></table>
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table> <table tableName="jsh_account_head" domainObjectName="AccountHead"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table> <table tableName="jsh_account_item" domainObjectName="AccountItem"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table> <table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table> <table tableName="jsh_depot_head" domainObjectName="DepotHead"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table> <table tableName="jsh_depot_item" domainObjectName="DepotItem"></table>
<table tableName="jsh_function" domainObjectName="Functions"></table> <table tableName="jsh_function" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table> <table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
<table tableName="jsh_log" domainObjectName="Log"></table> <table tableName="jsh_log" domainObjectName="Log"></table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment