Commit 044f62c4 authored by daijunxiong's avatar daijunxiong

新增考勤统计

parent 4cad9a2a
...@@ -2,7 +2,7 @@ package com.mortals.xhx.module.attendance.dao; ...@@ -2,7 +2,7 @@ package com.mortals.xhx.module.attendance.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity; import com.mortals.xhx.module.attendance.model.AttendanceStatEntity;
import java.util.List;
/** /**
* 考勤汇总信息Dao * 考勤汇总信息Dao
* 考勤汇总信息 DAO接口 * 考勤汇总信息 DAO接口
...@@ -12,6 +12,9 @@ import java.util.List; ...@@ -12,6 +12,9 @@ import java.util.List;
*/ */
public interface AttendanceStatDao extends ICRUDDao<AttendanceStatEntity,Long>{ public interface AttendanceStatDao extends ICRUDDao<AttendanceStatEntity,Long>{
/**
* 通过员工id查询
* */
AttendanceStatEntity queryEntity(Long staffId);
} }
...@@ -2,7 +2,6 @@ package com.mortals.xhx.module.attendance.dao; ...@@ -2,7 +2,6 @@ package com.mortals.xhx.module.attendance.dao;
import com.mortals.framework.dao.ICRUDDao; import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity; import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity;
import java.util.List;
/** /**
* 员工假期余额信息Dao * 员工假期余额信息Dao
* 员工假期余额信息 DAO接口 * 员工假期余额信息 DAO接口
...@@ -13,5 +12,8 @@ import java.util.List; ...@@ -13,5 +12,8 @@ import java.util.List;
public interface AttendanceVacationBalanceDao extends ICRUDDao<AttendanceVacationBalanceEntity,Long>{ public interface AttendanceVacationBalanceDao extends ICRUDDao<AttendanceVacationBalanceEntity,Long>{
/**
* 通过员工id查询
* */
AttendanceVacationBalanceEntity queryEntity(Long staffId);
} }
package com.mortals.xhx.module.attendance.dao.ibatis; package com.mortals.xhx.module.attendance.dao.ibatis;
import org.springframework.stereotype.Repository; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.attendance.dao.AttendanceStatDao; import com.mortals.xhx.module.attendance.dao.AttendanceStatDao;
import com.mortals.xhx.module.attendance.model.AttendanceStatEntity; import com.mortals.xhx.module.attendance.model.AttendanceStatEntity;
import java.util.Date; import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/** /**
* 考勤汇总信息DaoImpl DAO接口 * 考勤汇总信息DaoImpl DAO接口
* *
...@@ -17,5 +15,8 @@ import java.util.List; ...@@ -17,5 +15,8 @@ import java.util.List;
public class AttendanceStatDaoImpl extends BaseCRUDDaoMybatis<AttendanceStatEntity,Long> implements AttendanceStatDao { public class AttendanceStatDaoImpl extends BaseCRUDDaoMybatis<AttendanceStatEntity,Long> implements AttendanceStatDao {
@Override
public AttendanceStatEntity queryEntity(Long staffId) {
return getSqlSession().selectOne(getSqlId("queryEntity"),staffId);
}
} }
package com.mortals.xhx.module.attendance.dao.ibatis; package com.mortals.xhx.module.attendance.dao.ibatis;
import org.springframework.stereotype.Repository; import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import com.mortals.xhx.module.attendance.dao.AttendanceVacationBalanceDao; import com.mortals.xhx.module.attendance.dao.AttendanceVacationBalanceDao;
import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity; import com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity;
import java.util.Date; import org.springframework.stereotype.Repository;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/** /**
* 员工假期余额信息DaoImpl DAO接口 * 员工假期余额信息DaoImpl DAO接口
* *
...@@ -17,5 +15,8 @@ import java.util.List; ...@@ -17,5 +15,8 @@ import java.util.List;
public class AttendanceVacationBalanceDaoImpl extends BaseCRUDDaoMybatis<AttendanceVacationBalanceEntity,Long> implements AttendanceVacationBalanceDao { public class AttendanceVacationBalanceDaoImpl extends BaseCRUDDaoMybatis<AttendanceVacationBalanceEntity,Long> implements AttendanceVacationBalanceDao {
@Override
public AttendanceVacationBalanceEntity queryEntity(Long staffId) {
return getSqlSession().selectOne(getSqlId("queryEntity"),staffId);
}
} }
...@@ -857,7 +857,7 @@ public class AttendanceStatEntity extends AttendanceStatVo { ...@@ -857,7 +857,7 @@ public class AttendanceStatEntity extends AttendanceStatVo {
public void initAttrValue(){ public void initAttrValue(){
this.windowCategory = ""; this.windowCategory = "考勤机打卡";
this.staffId = null; this.staffId = null;
......
...@@ -36,8 +36,5 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{ ...@@ -36,8 +36,5 @@ public interface DeptDao extends ICRUDDao<DeptEntity,Long>{
* */ * */
DeptEntity queryDeptParient(String parentCode); DeptEntity queryDeptParient(String parentCode);
/**
*
* */
int queryDeptParentId(Long deptId);
} }
...@@ -37,10 +37,7 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements ...@@ -37,10 +37,7 @@ public class DeptDaoImpl extends BaseCRUDDaoMybatis<DeptEntity,Long> implements
return getSqlSession().selectOne(getSqlId("queryDeptParient"),parentCode); return getSqlSession().selectOne(getSqlId("queryDeptParient"),parentCode);
} }
@Override
public int queryDeptParentId(Long deptId) {
return getSqlSession().selectOne(getSqlId("queryDeptParentId"),deptId);
}
} }
...@@ -51,6 +51,4 @@ public interface DeptService extends ICRUDService<DeptEntity,Long>{ ...@@ -51,6 +51,4 @@ public interface DeptService extends ICRUDService<DeptEntity,Long>{
int queryParentId(Long deptId);
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -56,7 +56,7 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
DeptEntity newParentEntity = this.get(entity.getParentId()); DeptEntity newParentEntity = this.get(entity.getParentId());
DeptEntity oldEntity = this.get(entity.getId()); DeptEntity oldEntity = this.get(entity.getId());
if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) { if (!ObjectUtils.isEmpty(newParentEntity) && !ObjectUtils.isEmpty(oldEntity)) {
String newAncestors = newParentEntity.getAncestors() + "," + newParentEntity.getId(); String newAncestors = newParentEntity.getAncestors() + "," +entity.getId();
String oldAncestors = oldEntity.getAncestors(); String oldAncestors = oldEntity.getAncestors();
entity.setAncestors(newAncestors); entity.setAncestors(newAncestors);
updateDeptChildren(entity.getId(), newAncestors, oldAncestors, context); updateDeptChildren(entity.getId(), newAncestors, oldAncestors, context);
...@@ -154,7 +154,6 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -154,7 +154,6 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
if (returnList.isEmpty()) { if (returnList.isEmpty()) {
returnList = list; returnList = list;
} }
return returnList.stream().map(DeptTreeSelect::new).collect(Collectors.toList()); return returnList.stream().map(DeptTreeSelect::new).collect(Collectors.toList());
} }
...@@ -209,9 +208,5 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -209,9 +208,5 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override
public int queryParentId(Long deptId) {
return dao.queryDeptParentId(deptId);
}
} }
...@@ -132,8 +132,17 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -132,8 +132,17 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
@Override @Override
protected int doListAfter(DeptEntity query, Map<String, Object> model, Context context) throws AppException { protected int doListAfter(DeptEntity query, Map<String, Object> model, Context context) throws AppException {
int Allperson =staffService.queryAllPerson(); int allPerson =staffService.queryAllPerson();
model.put("AllPerson",Allperson); model.put("allPerson",allPerson);
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
} }
} }
\ No newline at end of file
...@@ -52,11 +52,6 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{ ...@@ -52,11 +52,6 @@ public interface StaffDao extends ICRUDDao<StaffEntity,Long>{
* */ * */
int queryConcurrently(); int queryConcurrently();
/**
* 统计部门
* */
int queryPersonNum(Long deptId);
/** /**
* 查询部门信息 * 查询部门信息
......
...@@ -53,10 +53,6 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement ...@@ -53,10 +53,6 @@ public class StaffDaoImpl extends BaseCRUDDaoMybatis<StaffEntity,Long> implement
return this.getSqlSession().selectOne(this.getSqlId("queryConcurrently")); return this.getSqlSession().selectOne(this.getSqlId("queryConcurrently"));
} }
@Override
public int queryPersonNum(Long deptId) {
return this.getSqlSession().selectOne(this.getSqlId("queryPersonNum"),deptId);
}
@Override @Override
public StaffEntity queryHik(String remarkId) { public StaffEntity queryHik(String remarkId) {
......
...@@ -18,5 +18,4 @@ public class StaffVo extends BaseEntityLong { ...@@ -18,5 +18,4 @@ public class StaffVo extends BaseEntityLong {
private List<StaffInfoVo>staffInfoVos; private List<StaffInfoVo>staffInfoVos;
private Integer personNum;
} }
\ No newline at end of file
...@@ -15,7 +15,6 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> { ...@@ -15,7 +15,6 @@ public interface StaffService extends ICRUDCacheService<StaffEntity,Long> {
StaffInfoVo queryAll(); StaffInfoVo queryAll();
int queryDeptNum(Long deptId);
int queryAllPerson(); int queryAllPerson();
......
...@@ -54,10 +54,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -54,10 +54,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
return staffInfoVo; return staffInfoVo;
} }
@Override
public int queryDeptNum(Long deptId) {
return staffDao.queryPersonNum(deptId);
}
@Override @Override
public int queryAllPerson() { public int queryAllPerson() {
......
...@@ -4,6 +4,9 @@ import com.mortals.framework.exception.AppException; ...@@ -4,6 +4,9 @@ import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.dept.model.DeptEntity;
import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.model.DeptTreeSelect;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.job.model.JobQuery; import com.mortals.xhx.module.job.model.JobQuery;
import com.mortals.xhx.module.job.service.JobService; import com.mortals.xhx.module.job.service.JobService;
...@@ -50,7 +53,9 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -50,7 +53,9 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
this.addDict(model, "staffType", paramService.getParamBySecondOrganize("Staff","staffType")); this.addDict(model, "staffType", paramService.getParamBySecondOrganize("Staff","staffType"));
this.addDict(model, "status", paramService.getParamBySecondOrganize("Staff","status")); this.addDict(model, "status", paramService.getParamBySecondOrganize("Staff","status"));
this.addDict(model, "positionId", jobService.find(new JobQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(),y->y.getJobName(),(o,n)->n))); this.addDict(model, "positionId", jobService.find(new JobQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(),y->y.getJobName(),(o,n)->n)));
List<DeptEntity> list = deptService.find(new DeptQuery());
List<DeptTreeSelect> treeSelects = deptService.buildDeptTreeSelect(list);
this.addDict(model,"deptPerson",treeSelects);
super.init(model, context); super.init(model, context);
} }
......
...@@ -2562,4 +2562,7 @@ ...@@ -2562,4 +2562,7 @@
</trim> </trim>
</if> </if>
</sql> </sql>
<select id="queryEntity" resultType="com.mortals.xhx.module.attendance.model.AttendanceStatEntity">
select * from mortals_xhx_attendance_vacation_balance where staffId = #{staffId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -1800,4 +1800,7 @@ ...@@ -1800,4 +1800,7 @@
</trim> </trim>
</if> </if>
</sql> </sql>
<select id="queryEntity" resultType="com.mortals.xhx.module.attendance.model.AttendanceVacationBalanceEntity">
select * from mortals_xhx_attendance_vacation_balance where staffId = #{staffId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -884,7 +884,5 @@ ...@@ -884,7 +884,5 @@
<select id="queryDeptParient" resultType="com.mortals.xhx.module.dept.model.DeptEntity"> <select id="queryDeptParient" resultType="com.mortals.xhx.module.dept.model.DeptEntity">
select * from mortals_xhx_dept where deptCode = #{parentCode} select * from mortals_xhx_dept where deptCode = #{parentCode}
</select> </select>
<select id="queryDeptParentId" resultType="integer">
select parentId from mortals_xhx_dept where deptId = #{deptId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -1417,9 +1417,6 @@ ...@@ -1417,9 +1417,6 @@
select count(1) pricateStaff from mortals_xhx_staff where staffType = 3 select count(1) pricateStaff from mortals_xhx_staff where staffType = 3
</select> </select>
<select id="queryPersonNum" resultType="integer">
select count(1) personNum from mortals_xhx_staff where deptId = #{deptId}
</select>
<select id="queryHik" resultType="com.mortals.xhx.module.staff.model.StaffEntity"> <select id="queryHik" resultType="com.mortals.xhx.module.staff.model.StaffEntity">
select * from mortals_xhx_staff where remarkId = #{remarkId} select * from mortals_xhx_staff where remarkId = #{remarkId}
</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