Commit c6424672 by dengshichuan

Merge branch 'dsc' into 'develop'

登录部门岗位名返回

See merge request 8timerv2/8timerapiv200!249
parents ee0953a8 2bbb1e16
......@@ -670,6 +670,22 @@ public class LoginController {
qyzxEmpLogin1.setUserType(eEA != null ? eEA.getUserType() : null);
List<QysDto> qys = qyzxEmpLoginMapper.getQys(qyzxEmpLogin1.getId());
// 查询部门放进去
for (QysDto qysDto : qys) {
Integer bmgwId = qysDto.getBmgwId();
ZzglBmgwM gw = ZzglBmgwM.builder().build()
.selectOne(new LambdaQueryWrapper<ZzglBmgwM>().eq(ZzglBmgwM::getId, bmgwId));
if (gw != null) {
qysDto.setGwName(gw.getName());
if (gw.getUpId() != null) {
Integer upId = gw.getUpId();
ZzglBmgwM bm = ZzglBmgwM.builder().build()
.selectOne(new LambdaQueryWrapper<ZzglBmgwM>().eq(ZzglBmgwM::getId, upId));
qysDto.setBmName(bm.getName());
}
}
}
if (qys.size() == 0)
return ResultUtil.error("没有任何公司可以查看!");
qyzxEmpLogin1.setQys(qys);
......
......@@ -219,7 +219,6 @@ public class CrmController {
// YgglMainEmp yg = YgglMainEmp.builder().build()
// .selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, orgCode)
// .eq(YgglMainEmp::getEmpNum, nowEmpNum).select(YgglMainEmp::getIsManager));
// TODO
QyzxEmpEntAsso qyzxEmpEntAsso = QyzxEmpEntAsso.builder().build()
.selectOne(new LambdaQueryWrapper<QyzxEmpEntAsso>().eq(QyzxEmpEntAsso::getOrgCode, orgCode)
.eq(QyzxEmpEntAsso::getEmpNum, nowEmpNum));
......@@ -365,6 +364,7 @@ public class CrmController {
crmClientData.setCreateUser(empNum);
SysRegion district = getSysRegion(crmClientData.getDistrictId());
// crmClientData.setZipCode(district.getZipCode());
if (district != null) {
crmClientData.setDistrict(district.getRegionName());
SysRegion city = getSysRegion(district.getRegionCode());
crmClientData.setCity(city.getRegionName());
......@@ -372,6 +372,7 @@ public class CrmController {
SysRegion province = getSysRegion(city.getRegionCode());
crmClientData.setProvinceId(province.getKeyId());
crmClientData.setProvince(province.getRegionName());
}
crmClientData.setBelongUserName(getEmpName(orgCode, crmClientData.getBelongUser()));
crmClientData.setOrgCode(getOrgCode(userBean));
......
......@@ -61,12 +61,19 @@ public class QysDto implements Serializable{
private String enName;
@ApiModelProperty(value = "部门岗位编号", example = "123")
private Integer bmgwId;
@ApiModelProperty(value = "部门名", example = "123")
private String bmName;
@ApiModelProperty(value = "岗位名", example = "123")
private String gwName;
@ApiModelProperty(value = "在企业中的员工工号", example = "123")
private Integer jobNum;
@ApiModelProperty(value = "性别", example = "女")
private String sex;
@ApiModelProperty(value = "是否企业中心账号", example = "0-否 1-主账号 2-子账号")
private Integer isManager;
// @ApiModelProperty(value = "是否企业中心账号", example = "0-否 1-主账号 2-子账号")
// private Integer isManager;
}
......@@ -38,14 +38,16 @@
<result column="bmgw_id" property="bmgwId" />
<result column="job_num" property="jobNum" />
<result column="sex" property="sex" />
<result column="is_manager" property="isManager" />
<!-- <result column="is_manager" property="isManager" /> -->
</resultMap>
<select id="getQys" resultMap="qysdto">
select b.id,b.name,b.credit_code,b.codes,b.is_on_stock,b.logo_url,b.register_time,b.end_time,b.size,b.level,a.user_type,b.auth_type,a.status
,c.name empname,c.english_name,c.bmgw_id,c.job_num,c.sex,c.is_manager
select b.id,b.name,b.credit_code,b.codes,b.is_on_stock,b.logo_url,b.register_time,
b.end_time,b.size,b.level,a.user_type,b.auth_type,a.status,
c.name empname,c.english_name,c.bmgw_id,c.job_num,c.sex,c.is_manager
from qyzx_emp_ent_asso a
left join qyzx_ent_info_m b on a.org_code = b.id
left join yggl_main_emp c on a.emp_num = c.emp_num and a.org_code = c.org_code
<!-- left join zzgl_bmgw_m d on d.id = c.bmgw_id -->
where a.emp_num = #{emp_num}
order by a.status desc,a.user_type desc,b.id
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment