Commit a3209075 by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!351
parents cdcc950d c43327ff
......@@ -136,7 +136,6 @@ import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0[1]考勤模块")
......@@ -1132,7 +1131,27 @@ public class TimeCardController {
// 缺-部门id 搜索
IPage<KqglMainKqzDto> pageAs = kqglmainkqzmapper.selectPageByQueryKqglMain(page, attquerycriteriadto);
List<KqglMainKqzDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
List<KqglMainKqzDto> sumlistAs = new ArrayList<KqglMainKqzDto>();
for(KqglMainKqzDto makq : listAs) {
KqglMainKqzDto mas = KqglMainKqzDto.builder().build();
BeanUtil.copyProperties(makq, mas , "kqzdkfslist");
List<KqglAssoKqzdkfs> assfs = KqglAssoKqzdkfs.builder().build().selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getQyid, userBean.getOrgCode())
.eq(KqglAssoKqzdkfs::getKqzId, mas.getId()));
List<KqglAssoKqzdkfs> kqzdkfslist = new ArrayList<KqglAssoKqzdkfs>();
for(KqglAssoKqzdkfs fs : assfs) {
KqglAssoKqzdkfs dkfs = KqglAssoKqzdkfs.builder().build();
dkfs.setKqzId(fs.getKqzId());
dkfs.setType(fs.getType());
kqzdkfslist.add(dkfs);
}
mas.setKqzdkfslist(kqzdkfslist);
sumlistAs.add(mas);
}
return ResultUtil.data(pageAs, sumlistAs, "操作成功!");
}
/**
......
package cn.timer.api.dto.kqmk;
import java.util.List;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -88,4 +91,5 @@ public class KqglMainKqzDto {
@ApiModelProperty(value = "考勤机id", example = "3")
private Integer kqjid;
private List<KqglAssoKqzdkfs> kqzdkfslist;
}
\ No newline at end of file
......@@ -54,6 +54,11 @@
<result column="pbfsnm" property="pbfsnm" />
<result column="dkfs" property="dkfs" />
<result column="kqjid" property="kqjid" />
<collection property="kqzdkfslist" ofType="cn.timer.api.bean.kqmk.KqglAssoKqzdkfs">
<result column="kqzId" property="kqzId" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="INTEGER" />
</collection>
</resultMap>
<sql id="Base_Column_List">
......@@ -151,22 +156,25 @@
WHEN '2' then '排班制'
else '自由工时'
end as pbfsnm,
znm.kqznum,
dkfs.type
znm.kqznum
from kqgl_main_kqz kqz
LEFT JOIN (select count(yhkqz.kqzid) as kqznum,
yhkqz.kqzid as kqzid
from kqgl_asso_yhkqz yhkqz
where yhkqz.qyid = #{param.orgCode}
GROUP BY yhkqz.kqzid) as znm on znm.kqzid = kqz.id
LEFT JOIN (select kqzdkfs.kqz_id as kqzId,kqzdkfs.type as type from kqgl_asso_kqzdkfs kqzdkfs
where kqzdkfs.qyid = #{param.orgCode} ) as dkfs on dkfs.kqzId = kqz.id
where 1=1
and kqz.qyid = #{param.orgCode}
<if test="param.query != null and param.query != ''">
and kqz.`name` like CONCAT('%',#{param.query},'%')
</if>
ORDER BY kqz.id DESC;
ORDER BY kqz.id DESC
<!-- LEFT JOIN (select kqzdkfs.kqz_id as kqzId,kqzdkfs.type as type from kqgl_asso_kqzdkfs kqzdkfs
where kqzdkfs.qyid = #{param.orgCode} ) as dkfs on dkfs.kqzId = kqz.id
dkfs.type-->
</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