优化根据编号查询单据信息接口

This commit is contained in:
季圣华
2021-12-05 22:23:43 +08:00
parent 46a588e75c
commit 2c395b39d1
3 changed files with 46 additions and 1 deletions

View File

@@ -7,6 +7,9 @@
<result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="userName" jdbcType="VARCHAR" property="userName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" />
<result column="contacts" jdbcType="VARCHAR" property="contacts" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="address" jdbcType="VARCHAR" property="address" />
</resultMap>
<resultMap id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.DepotHeadVo4InDetail">
@@ -447,7 +450,8 @@
</select>
<select id="getDetailByNumber" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="ResultMapEx">
select dh.*, concat(dh.sub_type,dh.type) as depotHeadType, s.supplier OrganName, a.name AccountName
select dh.*, concat(dh.sub_type,dh.type) as depotHeadType, a.name AccountName,
s.supplier OrganName, s.contacts, s.telephone, s.address
from jsh_depot_head dh
left join jsh_supplier s on dh.organ_id=s.id and ifnull(s.delete_Flag,'0') !='1'
left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'