从jsh远程仓库更新

(cherry picked from commit 36139e26a4)
This commit is contained in:
cjl
2019-01-15 11:48:38 +08:00
parent 1e1e5f6ed5
commit 693a7558ba
39 changed files with 12153 additions and 10992 deletions

View File

@@ -33,6 +33,14 @@
<result column="UName" jdbcType="VARCHAR" property="UName" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultByMaterial" type="com.jsh.erp.datasource.entities.DepotItemVo4WithInfoEx">
<result column="MId" jdbcType="VARCHAR" property="MId" />
<result column="MName" jdbcType="VARCHAR" property="MName" />
<result column="MModel" jdbcType="VARCHAR" property="MModel" />
<result column="MaterialUnit" jdbcType="VARCHAR" property="MaterialUnit" />
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
</resultMap>
<select id="selectByConditionDepotItem" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="BaseResultMap">
select *
FROM jsh_depotitem
@@ -125,40 +133,40 @@
from jsh_depotitem di left join jsh_material m on di.MaterialId=m.id
left join jsh_unit u on m.UnitId = u.id
left join jsh_depot dp1 on di.DepotId=dp1.id
left join jsh_depot dp2 on di.AnotherDepotId=dp1.id
left join jsh_depot dp2 on di.AnotherDepotId=dp2.id
where di.HeaderId = ${headerId}
order by di.id asc
</select>
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
select di.*, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
select m.id MId, m.Name MName, m.Model MModel, m.Unit MaterialUnit, m.Color MColor
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
and di.HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
and di.MaterialId in (${materialIds})
</if>
group by MaterialId
group by m.id,m.Name, m.Model, m.Unit, m.Color
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
</select>
<select id="findByAllCount" resultType="java.lang.Integer">
select count(1) from (select di.Id
select count(1) from (select m.id
from jsh_depotitem di
inner join jsh_material m on di.MaterialId=m.id
where 1=1
<if test="headIds != null">
and HeaderId in (${headIds})
and di.HeaderId in (${headIds})
</if>
<if test="materialIds != null">
and MaterialId in (${materialIds})
and di.MaterialId in (${materialIds})
</if>
group by MaterialId) cc
group by m.id) cc
</select>
<select id="findByTypeInIsPrev" resultType="java.lang.Double">