园历展示增加幼儿考勤人数统计
This commit is contained in:
parent
ebe4d92d1f
commit
56fd60a4cf
@ -65,6 +65,8 @@ public class ByCalendarController extends BaseController {
|
|||||||
private IByChildService byChildService;
|
private IByChildService byChildService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IByClassService byClassService;
|
private IByClassService byClassService;
|
||||||
|
@Autowired
|
||||||
|
private IByChildCheckinDetailService byChildCheckinDetailService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询园历管理(本一)列表
|
* 查询园历管理(本一)列表
|
||||||
@ -185,6 +187,9 @@ public class ByCalendarController extends BaseController {
|
|||||||
listvi.addAll(getbychilds(classId, formatter));
|
listvi.addAll(getbychilds(classId, formatter));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//幼儿出勤人数
|
||||||
|
listvi.addAll(getbychildcheckdata(classId,formatter));
|
||||||
|
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
ajax.put("calendarData", listvi);
|
ajax.put("calendarData", listvi);
|
||||||
return ajax;
|
return ajax;
|
||||||
@ -398,4 +403,30 @@ public class ByCalendarController extends BaseController {
|
|||||||
return listvi;
|
return listvi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取学校或班级考勤数据列表
|
||||||
|
private List<ByCalendarShow> getbychildcheckdata(String classId, SimpleDateFormat formatter) {
|
||||||
|
List<ByCalendarShow> listvi = new ArrayList<>();
|
||||||
|
|
||||||
|
Long deptId = SecurityUtils.getLoginUser().getUser().getDept().getDeptId();
|
||||||
|
ByChildCheckinDetail byChildCheckinDetail = new ByChildCheckinDetail();
|
||||||
|
byChildCheckinDetail.setSchoolid(deptId);
|
||||||
|
byChildCheckinDetail.setClassid(classId);
|
||||||
|
List<ByChildCheckinDetail> list = byChildCheckinDetailService.selectByChildCheckinGroupDaysList(byChildCheckinDetail);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
ByCalendarShow by = null;
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
by = new ByCalendarShow();
|
||||||
|
ByChildCheckinDetail byNewChildCheckinDetail = list.get(i);
|
||||||
|
|
||||||
|
by.setTitle("幼儿出勤人数:"+byNewChildCheckinDetail.getCount());
|
||||||
|
String timefor = formatter.format(byNewChildCheckinDetail.getCreateTime());
|
||||||
|
by.setStart(timefor);
|
||||||
|
by.setEnd(timefor);
|
||||||
|
by.setColor("#85a5ff");
|
||||||
|
listvi.add(by);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return listvi;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,8 @@ public class ByChildCheckinDetail extends BaseEntity {
|
|||||||
@Excel(name = "创建人")
|
@Excel(name = "创建人")
|
||||||
private Long createuserid;
|
private Long createuserid;
|
||||||
|
|
||||||
|
private int count;
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -111,6 +113,10 @@ public class ByChildCheckinDetail extends BaseEntity {
|
|||||||
return createuserid;
|
return createuserid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCount(int count){this.count=count;}
|
||||||
|
|
||||||
|
public int getCount(){return count;}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@ -122,6 +128,7 @@ public class ByChildCheckinDetail extends BaseEntity {
|
|||||||
.append("type", getType())
|
.append("type", getType())
|
||||||
.append("createuserid", getCreateuserid())
|
.append("createuserid", getCreateuserid())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
.append("count", getCount())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,14 @@ public interface ByChildCheckinDetailMapper {
|
|||||||
*/
|
*/
|
||||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿考勤列表根据每天进行分组
|
||||||
|
*
|
||||||
|
* @param byChildCheckinDetail 幼儿考勤
|
||||||
|
* @return 幼儿考勤集合
|
||||||
|
*/
|
||||||
|
public List<ByChildCheckinDetail> selectByChildCheckinGroupDaysList(ByChildCheckinDetail byChildCheckinDetail);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增幼儿考勤
|
* 新增幼儿考勤
|
||||||
*
|
*
|
||||||
|
@ -27,6 +27,15 @@ public interface IByChildCheckinDetailService
|
|||||||
*/
|
*/
|
||||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿考勤列表根据每天进行分组
|
||||||
|
*
|
||||||
|
* @param byChildCheckinDetail 幼儿考勤
|
||||||
|
* @return 幼儿考勤集合
|
||||||
|
*/
|
||||||
|
public List<ByChildCheckinDetail> selectByChildCheckinGroupDaysList(ByChildCheckinDetail byChildCheckinDetail);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增幼儿考勤
|
* 新增幼儿考勤
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.project.benyi.service.impl;
|
package com.ruoyi.project.benyi.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -15,8 +16,7 @@ import com.ruoyi.project.benyi.service.IByChildCheckinDetailService;
|
|||||||
* @date 2020-07-21
|
* @date 2020-07-21
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailService
|
public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ByChildCheckinDetailMapper byChildCheckinDetailMapper;
|
private ByChildCheckinDetailMapper byChildCheckinDetailMapper;
|
||||||
|
|
||||||
@ -27,8 +27,7 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 幼儿考勤
|
* @return 幼儿考勤
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ByChildCheckinDetail selectByChildCheckinDetailById(Long id)
|
public ByChildCheckinDetail selectByChildCheckinDetailById(Long id) {
|
||||||
{
|
|
||||||
return byChildCheckinDetailMapper.selectByChildCheckinDetailById(id);
|
return byChildCheckinDetailMapper.selectByChildCheckinDetailById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,11 +38,21 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 幼儿考勤
|
* @return 幼儿考勤
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail)
|
public List<ByChildCheckinDetail> selectByChildCheckinDetailList(ByChildCheckinDetail byChildCheckinDetail) {
|
||||||
{
|
|
||||||
return byChildCheckinDetailMapper.selectByChildCheckinDetailList(byChildCheckinDetail);
|
return byChildCheckinDetailMapper.selectByChildCheckinDetailList(byChildCheckinDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询幼儿考勤列表根据每天进行分组
|
||||||
|
*
|
||||||
|
* @param byChildCheckinDetail 幼儿考勤
|
||||||
|
* @return 幼儿考勤集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ByChildCheckinDetail> selectByChildCheckinGroupDaysList(ByChildCheckinDetail byChildCheckinDetail) {
|
||||||
|
return byChildCheckinDetailMapper.selectByChildCheckinGroupDaysList(byChildCheckinDetail);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增幼儿考勤
|
* 新增幼儿考勤
|
||||||
*
|
*
|
||||||
@ -51,8 +60,7 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail)
|
public int insertByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail) {
|
||||||
{
|
|
||||||
byChildCheckinDetail.setCreateTime(DateUtils.getNowDate());
|
byChildCheckinDetail.setCreateTime(DateUtils.getNowDate());
|
||||||
return byChildCheckinDetailMapper.insertByChildCheckinDetail(byChildCheckinDetail);
|
return byChildCheckinDetailMapper.insertByChildCheckinDetail(byChildCheckinDetail);
|
||||||
}
|
}
|
||||||
@ -64,8 +72,7 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail)
|
public int updateByChildCheckinDetail(ByChildCheckinDetail byChildCheckinDetail) {
|
||||||
{
|
|
||||||
return byChildCheckinDetailMapper.updateByChildCheckinDetail(byChildCheckinDetail);
|
return byChildCheckinDetailMapper.updateByChildCheckinDetail(byChildCheckinDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,8 +83,7 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteByChildCheckinDetailByIds(Long[] ids)
|
public int deleteByChildCheckinDetailByIds(Long[] ids) {
|
||||||
{
|
|
||||||
return byChildCheckinDetailMapper.deleteByChildCheckinDetailByIds(ids);
|
return byChildCheckinDetailMapper.deleteByChildCheckinDetailByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +94,7 @@ public class ByChildCheckinDetailServiceImpl implements IByChildCheckinDetailSer
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteByChildCheckinDetailById(Long id)
|
public int deleteByChildCheckinDetailById(Long id) {
|
||||||
{
|
|
||||||
return byChildCheckinDetailMapper.deleteByChildCheckinDetailById(id);
|
return byChildCheckinDetailMapper.deleteByChildCheckinDetailById(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<result property="type" column="type"/>
|
<result property="type" column="type"/>
|
||||||
<result property="createuserid" column="createuserid"/>
|
<result property="createuserid" column="createuserid"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="count" column="count"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectByChildCheckinDetailVo">
|
<sql id="selectByChildCheckinDetailVo">
|
||||||
@ -33,6 +34,17 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByChildCheckinGroupDaysList" parameterType="ByChildCheckinDetail"
|
||||||
|
resultMap="ByChildCheckinDetailResult">
|
||||||
|
select count(*) as count, t.create_time from (select id, schoolid, classid, childid, childname, type, createuserid, DATE_FORMAT(create_time,'%Y-%m-%d') as create_time
|
||||||
|
from by_child_checkin_detail
|
||||||
|
where type='01'
|
||||||
|
<if test="schoolid != null ">and schoolid = #{schoolid}</if>
|
||||||
|
<if test="classid != null and classid != ''">and classid = #{classid}</if>
|
||||||
|
) t
|
||||||
|
group by t.create_time
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectByChildCheckinDetailById" parameterType="Long" resultMap="ByChildCheckinDetailResult">
|
<select id="selectByChildCheckinDetailById" parameterType="Long" resultMap="ByChildCheckinDetailResult">
|
||||||
<include refid="selectByChildCheckinDetailVo"/>
|
<include refid="selectByChildCheckinDetailVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user