从源更新

This commit is contained in:
qiankunpingtai
2019-06-10 10:48:04 +08:00
parent 71c7f20360
commit d90841a665
22 changed files with 242 additions and 83 deletions

View File

@@ -49,6 +49,8 @@
left join jsh_person p on dh.HandsPersonId=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_depot dd on dh.AllocationProjectId=dd.id and ifnull(dd.delete_Flag,'0') !='1'
inner join jsh_depotitem di on dh.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
inner join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1'
where 1=1
<if test="type != null and type != ''">
and dh.Type=#{type}
@@ -66,6 +68,12 @@
<if test="endTime != null and endTime != ''">
and dh.OperTime &lt;= #{endTime}
</if>
<if test="materialParam != null">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
</if>
<if test="depotIds != null">
and di.DepotId in (${depotIds})
</if>
and ifnull(dh.delete_Flag,'0') !='1'
order by dh.Id desc
<if test="offset != null and rows != null">
@@ -74,24 +82,26 @@
</select>
<select id="countsByDepotHead" resultType="java.lang.Long">
SELECT
COUNT(id)
FROM jsh_depothead
COUNT(dh.id)
FROM jsh_depothead dh
inner join jsh_depotitem di on dh.Id = di.HeaderId and ifnull(di.delete_Flag,'0') !='1'
inner join jsh_material m on di.MaterialId = m.Id and ifnull(m.delete_Flag,'0') !='1'
WHERE 1=1
<if test="type != null and type != ''">
and Type=#{type}
and dh.Type=#{type}
</if>
<if test="subType != null and subType != ''">
and SubType=#{subType}
and dh.SubType=#{subType}
</if>
<if test="number != null and number != ''">
<bind name="number" value="'%' + _parameter.number + '%'"/>
and Number like #{number}
and dh.Number like #{number}
</if>
<if test="beginTime != null and beginTime != ''">
and OperTime >= #{beginTime}
and dh.OperTime >= #{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and OperTime &lt;= #{endTime}
and dh.OperTime &lt;= #{endTime}
</if>
<if test="materialParam != null">
and (m.`Name` like '%${materialParam}%' or m.Model like '%${materialParam}%')
@@ -99,7 +109,7 @@
<if test="depotIds != null">
and di.DepotId in (${depotIds})
</if>
and ifnull(jsh_depothead.delete_Flag,'0') !='1'
and ifnull(dh.delete_Flag,'0') !='1'
</select>

View File

@@ -606,7 +606,7 @@
and dh.id=di.HeaderId
and di.MaterialId=#{materialId}
and ifnull(dh.delete_Flag,'0') !='1'
and ifnull(di.delete_Flag,'0') !='1') curep
and ifnull(di.delete_Flag,'0') !='1') curep
</select>
</mapper>

View File

@@ -116,15 +116,12 @@
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<select id="getUserListByUserNameOrLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
<select id="getUserListByLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem
user.description, user.remark,user.isystem,user.tenant_id
FROM jsh_user user
where 1=1
and ifnull(user.status,'0') not in('1','2')
<if test="userName != null and userName != ''">
and user.userName = #{userName}
</if>
<if test="loginame != null and loginame != ''">
and user.loginame = #{loginame}
</if>
@@ -213,6 +210,20 @@
<select id="addRegisterUserNotInclueUser" resultType="java.lang.String">
select registerUserTemplate(#{userId},#{tenantId},#{roleId}) from dual;
</select>
<select id="getUserListByloginNameAndPassword" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem,user.tenant_id
FROM jsh_user user
where 1=1
and ifnull(user.status,'0') not in('1','2')
<if test="loginame != null and loginame != ''">
and user.loginame = #{loginame}
</if>
<if test="password != null and password != ''">
and user.password = #{password}
</if>
order by user.id desc
</select>
</mapper>