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; ...@@ -136,7 +136,6 @@ import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0[1]考勤模块") @Api(tags = "3.0[1]考勤模块")
...@@ -1132,7 +1131,27 @@ public class TimeCardController { ...@@ -1132,7 +1131,27 @@ public class TimeCardController {
// 缺-部门id 搜索 // 缺-部门id 搜索
IPage<KqglMainKqzDto> pageAs = kqglmainkqzmapper.selectPageByQueryKqglMain(page, attquerycriteriadto); IPage<KqglMainKqzDto> pageAs = kqglmainkqzmapper.selectPageByQueryKqglMain(page, attquerycriteriadto);
List<KqglMainKqzDto> listAs = pageAs.getRecords(); 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; package cn.timer.api.dto.kqmk;
import java.util.List;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
...@@ -87,5 +90,6 @@ public class KqglMainKqzDto { ...@@ -87,5 +90,6 @@ public class KqglMainKqzDto {
private String dkfs; private String dkfs;
@ApiModelProperty(value = "考勤机id", example = "3") @ApiModelProperty(value = "考勤机id", example = "3")
private Integer kqjid; private Integer kqjid;
private List<KqglAssoKqzdkfs> kqzdkfslist;
} }
\ No newline at end of file
...@@ -54,6 +54,11 @@ ...@@ -54,6 +54,11 @@
<result column="pbfsnm" property="pbfsnm" /> <result column="pbfsnm" property="pbfsnm" />
<result column="dkfs" property="dkfs" /> <result column="dkfs" property="dkfs" />
<result column="kqjid" property="kqjid" /> <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> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -151,22 +156,25 @@ ...@@ -151,22 +156,25 @@
WHEN '2' then '排班制' WHEN '2' then '排班制'
else '自由工时' else '自由工时'
end as pbfsnm, end as pbfsnm,
znm.kqznum, znm.kqznum
dkfs.type
from kqgl_main_kqz kqz from kqgl_main_kqz kqz
LEFT JOIN (select count(yhkqz.kqzid) as kqznum, LEFT JOIN (select count(yhkqz.kqzid) as kqznum,
yhkqz.kqzid as kqzid yhkqz.kqzid as kqzid
from kqgl_asso_yhkqz yhkqz from kqgl_asso_yhkqz yhkqz
where yhkqz.qyid = #{param.orgCode} where yhkqz.qyid = #{param.orgCode}
GROUP BY yhkqz.kqzid) as znm on znm.kqzid = kqz.id 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 where 1=1
and kqz.qyid = #{param.orgCode} and kqz.qyid = #{param.orgCode}
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and kqz.`name` like CONCAT('%',#{param.query},'%') and kqz.`name` like CONCAT('%',#{param.query},'%')
</if> </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> </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