Commit b3090653 by lal Committed by chenzg

提交

parent 0358f559
...@@ -2138,15 +2138,35 @@ public class TimeCardController { ...@@ -2138,15 +2138,35 @@ public class TimeCardController {
@ApiOperation(value = "45:获取假期余额列表数据", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "45:获取假期余额列表数据", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 45) @ApiOperationSupport(order = 45)
public Result<Object> LeaveBalanceList(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto) { public Result<Object> LeaveBalanceList(@CurrentUser UserBean userBean, @Validated @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<EmployeeLeaveBalanceDto> page = new Page<EmployeeLeaveBalanceDto>( IPage<EmployeeLeaveBalanceDto> page = new Page<EmployeeLeaveBalanceDto>(attquerycriteriadto.getCurrentPage(),attquerycriteriadto.getTotalPage());
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == 10 ? 9999 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode()); attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum()); attquerycriteriadto.setEmpNum(userBean.getEmpNum());
// 缺-部门id 搜索 // 缺-部门id 搜索
IPage<EmployeeLeaveBalanceDto> pageAs = kqglassoleavebalancemapper.selectPageByQueryLeaveBalance(page, attquerycriteriadto); IPage<EmployeeLeaveBalanceDto> pageAs = kqglassoleavebalancemapper.selectPageByQueryLeaveBalance(page, attquerycriteriadto);
List<EmployeeLeaveBalanceDto> listAs = pageAs.getRecords(); List<EmployeeLeaveBalanceDto> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
List<EmployeeLeaveBalanceDto> sumlist = new ArrayList<EmployeeLeaveBalanceDto>();
for(EmployeeLeaveBalanceDto endo : listAs) {
EmployeeLeaveBalanceDto dets = EmployeeLeaveBalanceDto.builder().build();
BeanUtil.copyProperties(endo, dets , "balanceTo");
List<KqglAssoLeaveEmployeeBalance> empye = KqglAssoLeaveEmployeeBalance.builder().build().selectList(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getUserid, endo.getEmpnum())
.eq(KqglAssoLeaveEmployeeBalance::getOrgCode, endo.getOrgcode()));
List<BalanceSheetDataDto> balanceTo = new ArrayList<BalanceSheetDataDto>();
for(KqglAssoLeaveEmployeeBalance empyes : empye) {
BalanceSheetDataDto bal = BalanceSheetDataDto.builder().build();
bal.setBalancedays(empyes.getBalanceDays());
bal.setLeaverulesid(empyes.getLeaveRulesId());
balanceTo.add(bal);
}
dets.setBalanceTo(balanceTo);
sumlist.add(dets);
}
return ResultUtil.data(pageAs, sumlist, "操作成功!");
} }
......
...@@ -105,7 +105,7 @@ public class AttendanceTaskTiming{ ...@@ -105,7 +105,7 @@ public class AttendanceTaskTiming{
*/ */
//3.添加定时任务 每天下午七点执行一次 //3.添加定时任务 每天下午七点执行一次
@Scheduled(cron = "0 50 8 * * ?") @Scheduled(cron = "0 0 19 * * ?")
//或直接指定时间间隔,例如:5秒 //或直接指定时间间隔,例如:5秒
//@Scheduled(fixedRate=5000) //@Scheduled(fixedRate=5000)
......
...@@ -26,6 +26,9 @@ public class EmployeeLeaveBalanceDto { ...@@ -26,6 +26,9 @@ public class EmployeeLeaveBalanceDto {
@ApiModelProperty(value = "入职日期 ", example = "字段说明") @ApiModelProperty(value = "入职日期 ", example = "字段说明")
private String rztime; private String rztime;
@ApiModelProperty(value = "入职日期 ", example = "字段说明")
private Integer orgcode;
@ApiModelProperty(value = "表数据", example = "字段说明") @ApiModelProperty(value = "表数据", example = "字段说明")
List<BalanceSheetDataDto> balanceTo; List<BalanceSheetDataDto> balanceTo;
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<result column="empname" property="empname" /> <result column="empname" property="empname" />
<result column="department" property="department" /> <result column="department" property="department" />
<result column="rztime" property="rztime" /> <result column="rztime" property="rztime" />
<result column="orgcode" property="orgcode" />
<collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto"> <collection property="balanceTo" ofType="cn.timer.api.dto.kqmk.BalanceSheetDataDto">
<result column="leaverulesid" property="leaverulesid"/> <result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/> <result column="balancedays" property="balancedays"/>
...@@ -86,15 +87,14 @@ ...@@ -86,15 +87,14 @@
SELECT emp.emp_num as empnum, SELECT emp.emp_num as empnum,
emp.`name` as empname, emp.`name` as empname,
emp.org_code as orgcode,
IFNULL(c.name,'') as department, IFNULL(c.name,'') as department,
IFNULL(emp.rz_time,'') as rztime, IFNULL(emp.rz_time,'') as rztime
yz.leave_rules_id as leaverulesid,
yz.balance_days as balancedays
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num
where emp.org_code = #{param.orgCode} where emp.org_code = #{param.orgCode}
and emp.job_status != 3
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
and ( emp.`name` like CONCAT('%',#{param.query},'%') or and ( emp.`name` like CONCAT('%',#{param.query},'%') or
emp.emp_num like CONCAT('%',#{param.query},'%') or emp.emp_num like CONCAT('%',#{param.query},'%') or
...@@ -103,7 +103,10 @@ ...@@ -103,7 +103,10 @@
<if test="param.deptid != null and param.deptid != ''"> <if test="param.deptid != null and param.deptid != ''">
and c.id = #{param.deptid} and c.id = #{param.deptid}
</if> </if>
ORDER BY emp.emp_num DESC <!-- ORDER BY emp.emp_num DESC
LEFT JOIN kqgl_asso_leave_employee_balance as yz on yz.userid = emp.emp_num
yz.leave_rules_id as leaverulesid,
yz.balance_days as balancedays-->
</select> </select>
...@@ -128,7 +131,7 @@ ...@@ -128,7 +131,7 @@
LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id LEFT JOIN zzgl_bmgw_m as gw on gw.id = emp.bmgw_id
LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id LEFT JOIN zzgl_bmgw_m as c ON c.id = gw.up_id
where emp.org_code = #{orgcode} where emp.org_code = #{orgcode}
and emp.job_status in (0,1) and emp.job_status != 3
</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