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

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

@@ -27,6 +27,14 @@ public class DepotHeadVo4List extends DepotHead{
private String depotHeadType; private String depotHeadType;
private String creatorName;
private String contacts;
private String telephone;
private String address;
public String getProjectName() { public String getProjectName() {
return projectName; return projectName;
} }
@@ -106,4 +114,36 @@ public class DepotHeadVo4List extends DepotHead{
public void setDepotHeadType(String depotHeadType) { public void setDepotHeadType(String depotHeadType) {
this.depotHeadType = depotHeadType; this.depotHeadType = depotHeadType;
} }
public String getCreatorName() {
return creatorName;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getContacts() {
return contacts;
}
public void setContacts(String contacts) {
this.contacts = contacts;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
} }

View File

@@ -652,6 +652,7 @@ public class DepotHeadService {
} }
dh.setOperTimeStr(getCenternTime(dh.getOperTime())); dh.setOperTimeStr(getCenternTime(dh.getOperTime()));
dh.setMaterialsList(findMaterialsListByHeaderId(dh.getId())); dh.setMaterialsList(findMaterialsListByHeaderId(dh.getId()));
dh.setCreatorName(userService.getUser(dh.getCreator()).getUsername());
resList.add(dh); resList.add(dh);
} }
} }

View File

@@ -7,6 +7,9 @@
<result column="OrganName" jdbcType="VARCHAR" property="organName" /> <result column="OrganName" jdbcType="VARCHAR" property="organName" />
<result column="userName" jdbcType="VARCHAR" property="userName" /> <result column="userName" jdbcType="VARCHAR" property="userName" />
<result column="AccountName" jdbcType="VARCHAR" property="accountName" /> <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>
<resultMap id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.DepotHeadVo4InDetail"> <resultMap id="ResultWithInfoExMap" type="com.jsh.erp.datasource.vo.DepotHeadVo4InDetail">
@@ -447,7 +450,8 @@
</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.*, 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 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_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' left join jsh_account a on dh.account_id=a.id and ifnull(a.delete_Flag,'0') !='1'