Commit 672b5c1a by 邓实川 Committed by chenzg

员工查询列表优化

parent 98daa48f
...@@ -42,7 +42,6 @@ import cn.timer.api.bean.dzht.DzhtAssoQyyz; ...@@ -42,7 +42,6 @@ import cn.timer.api.bean.dzht.DzhtAssoQyyz;
import cn.timer.api.bean.dzht.DzhtAssoQyzc; import cn.timer.api.bean.dzht.DzhtAssoQyzc;
import cn.timer.api.bean.dzht.DzhtAssoSdgzq; import cn.timer.api.bean.dzht.DzhtAssoSdgzq;
import cn.timer.api.bean.dzht.DzhtAssoTpyz; import cn.timer.api.bean.dzht.DzhtAssoTpyz;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity; import cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity;
import cn.timer.api.bean.qyzx.businessService.QyzxUseRecord; import cn.timer.api.bean.qyzx.businessService.QyzxUseRecord;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
...@@ -206,16 +205,16 @@ public class DzhtController2 { ...@@ -206,16 +205,16 @@ public class DzhtController2 {
@GetMapping("/getOrganizations") @GetMapping("/getOrganizations")
@ApiOperation(value = "查询企业信息s", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查询企业信息s", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getOrganizations(@CurrentUser UserBean userBean) { public Result<Object> getOrganizations(@CurrentUser UserBean userBean) {
List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build().selectList( // List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build().selectList(
new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum())); // new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode()); // List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode());
List<String> orgIds = new ArrayList<String>(); List<String> orgIds = new ArrayList<String>();
for (Integer orgCode : orgCodeList) { // for (Integer orgCode : orgCodeList) {
DzhtAssoQyzc qyzc = DzhtAssoQyzc.builder().build().selectOne(new QueryWrapper<DzhtAssoQyzc>().lambda() DzhtAssoQyzc qyzc = DzhtAssoQyzc.builder().build().selectOne(new QueryWrapper<DzhtAssoQyzc>().lambda()
.eq(DzhtAssoQyzc::getOrgCode, orgCode).select(DzhtAssoQyzc::getOrgId)); .eq(DzhtAssoQyzc::getOrgCode, userBean.getOrgCode()).select(DzhtAssoQyzc::getOrgId));
if (qyzc != null) if (qyzc != null)
orgIds.add(qyzc.getOrgId()); orgIds.add(qyzc.getOrgId());
} // }
JSONObject j = null; JSONObject j = null;
List<JSONObject> result = new ArrayList<JSONObject>(); List<JSONObject> result = new ArrayList<JSONObject>();
try { try {
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
FROM yggl_main_emp a FROM yggl_main_emp a
<where> <where>
AND a.org_code = #{param.orgCode} AND a.org_code = #{param.orgCode}
AND a.job_status IN (0,1,2) AND a.job_status != 3
<if test="param.jobType != null"> <if test="param.jobType != null">
AND a.job_type = #{param.jobType} AND a.job_type = #{param.jobType}
</if> </if>
......
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