仓库添加负责人字段

This commit is contained in:
qiankunpingtai
2019-02-26 15:18:38 +08:00
parent c60568380e
commit 86b9ae9005
101 changed files with 402 additions and 118 deletions

View File

@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG
#日志
logging.config=classpath:logback-spring.xml
logging.level.com.didispace=DEBUG
#pagehelper配置
pagehelper.helperDialect=mysql
pagehelper.offsetAsPageNum=true
pagehelper.rowBoundsWithCount=true
pagehelper.pageSizeZero=true
pagehelper.reasonable=false
pagehelper.params=pageNum=pageHelperStart;pageSize=pageHelperRows;
pagehelper.supportMethodsArguments=false

View File

@@ -34,7 +34,7 @@
</select>
<select id="countsByAccountHead" resultType="java.lang.Integer">
<select id="countsByAccountHead" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_accounthead

View File

@@ -24,7 +24,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByAccountItem" resultType="java.lang.Integer">
<select id="countsByAccountItem" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_accountitem

View File

@@ -33,7 +33,7 @@
</if>
</select>
<select id="countsByAccount" resultType="java.lang.Integer">
<select id="countsByAccount" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_account

View File

@@ -16,7 +16,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByApp" resultType="java.lang.Integer">
<select id="countsByApp" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_app

View File

@@ -73,7 +73,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotHead" resultType="java.lang.Integer">
<select id="countsByDepotHead" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_depothead

View File

@@ -59,7 +59,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepotItem" resultType="java.lang.Integer">
<select id="countsByDepotItem" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_depotitem
@@ -93,7 +93,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Integer">
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Long">
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
and SubType!='调拨'
@@ -110,7 +110,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Integer">
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Long">
select count(*) from jsh_depotitem where 1=1
<if test="mId != null">
and MaterialId=${mId}

View File

@@ -14,6 +14,7 @@
<result column="type" jdbcType="INTEGER" property="type" />
<result column="sort" jdbcType="VARCHAR" property="sort" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="principal" jdbcType="BIGINT" property="principal" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
@@ -86,7 +87,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, address, warehousing, truckage, type, sort, remark
id, name, address, warehousing, truckage, type, sort, remark, principal
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
<!--
@@ -141,10 +142,12 @@
-->
insert into jsh_depot (id, name, address,
warehousing, truckage, type,
sort, remark)
sort, remark, principal
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
<!--
@@ -177,6 +180,9 @@
<if test="remark != null">
remark,
</if>
<if test="principal != null">
principal,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -203,6 +209,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="principal != null">
#{principal,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
@@ -246,6 +255,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.principal != null">
principal = #{record.principal,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -264,7 +276,8 @@
truckage = #{record.truckage,jdbcType=DECIMAL},
type = #{record.type,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
principal = #{record.principal,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -297,6 +310,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="principal != null">
principal = #{principal,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -312,7 +328,8 @@
truckage = #{truckage,jdbcType=DECIMAL},
type = #{type,jdbcType=INTEGER},
sort = #{sort,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
principal = #{principal,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -1,6 +1,10 @@
<?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">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotMapperEx">
<resultMap extends="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.DepotEx">
<result column="principalName" jdbcType="VARCHAR" property="principalName" />
</resultMap>
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap">
select *
FROM jsh_depot
@@ -19,7 +23,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByDepot" resultType="java.lang.Integer">
<select id="countsByDepot" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_depot
@@ -34,4 +38,25 @@
and remark like '%${remark}%'
</if>
</select>
<select id="getDepotList" parameterType="java.util.Map" resultMap="ResultMapEx">
select dep.*,usr.username as principalName
FROM jsh_depot dep
left join jsh_user usr on usr.id=dep.principal
where 1=1
<if test="name != null and name != ''">
<bind name="name" value="'%' + _parameter.name + '%'" />
and dep.name like #{name}
</if>
<if test="type != null and type != ''">
and dep.type=#{type}
</if>
<if test="remark != null and remark != ''">
<bind name="remark" value="'%' + _parameter.remark + '%'" />
and dep.remark like #{remark}
</if>
order by dep.sort asc
</select>
</mapper>

View File

@@ -16,7 +16,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByFunctions" resultType="java.lang.Integer">
<select id="countsByFunctions" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_functions

View File

@@ -18,7 +18,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByInOutItem" resultType="java.lang.Integer">
<select id="countsByInOutItem" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_inoutitem

View File

@@ -36,7 +36,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByLog" resultType="java.lang.Integer">
<select id="countsByLog" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_log

View File

@@ -16,7 +16,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialCategory" resultType="java.lang.Integer">
<select id="countsByMaterialCategory" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_materialcategory

View File

@@ -31,7 +31,7 @@
</if>
</select>
<select id="countsByMaterial" resultType="java.lang.Integer">
<select id="countsByMaterial" resultType="java.lang.Long">
SELECT
COUNT(m.id)
FROM jsh_material m

View File

@@ -12,7 +12,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByMaterialProperty" resultType="java.lang.Integer">
<select id="countsByMaterialProperty" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_materialproperty

View File

@@ -15,7 +15,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByPerson" resultType="java.lang.Integer">
<select id="countsByPerson" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_person

View File

@@ -12,7 +12,7 @@
limit #{offset},#{rows}
</if>;
</select>
<select id="countsByRole" resultType="java.lang.Integer">
<select id="countsByRole" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_role

View File

@@ -31,7 +31,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countSerialNumber" resultType="java.lang.Integer">
<select id="countSerialNumber" resultType="java.lang.Long">
SELECT
COUNT(ser.id)
FROM jsh_serial_number ser

View File

@@ -24,7 +24,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySupplier" resultType="java.lang.Integer">
<select id="countsBySupplier" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_supplier

View File

@@ -9,7 +9,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsBySystemConfig" resultType="java.lang.Integer">
<select id="countsBySystemConfig" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_systemconfig

View File

@@ -12,7 +12,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUnit" resultType="java.lang.Integer">
<select id="countsByUnit" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_unit

View File

@@ -15,7 +15,7 @@
limit #{offset},#{rows}
</if>
</select>
<select id="countsByUser" resultType="java.lang.Integer">
<select id="countsByUser" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_user