Commit 1cc98d58 by lal Committed by chenzg

提交

parent f6dd0294
......@@ -1090,7 +1090,7 @@ public class JxglController {
@PostMapping(value = "/selects_emp_appraisal")
@ApiOperation(value = "18.查询-某员工考核-列表", httpMethod = "POST", notes = "查询-某员工考核-列表")
@ApiOperationSupport(order = 18)
@Role
// @Role
public Result<Object> selectsEA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) {
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),
......
......@@ -23,6 +23,22 @@ public class ClockInTool {
static SimpleDateFormat famt = new SimpleDateFormat("yyyy-MM-dd");
/**
* 将传入的日期的年月得到一个值
* @param date 日期
* @return 获取一个唯一的年月数值
*/
public static int getYearMonth(Date date){
//传入日期
Calendar calder = Calendar.getInstance();
calder.setTime(date);//设置时间
int year = calder.get(Calendar.YEAR);//获取年份
int month=calder.get(Calendar.MONTH);//获取月份
//返回年份乘以100加上月份的值,因为月份最多2位数,
// 所以年份乘以100可以获取一个唯一的年月数值
return year*100+month;
}
public static double round(double value){
return Math.round(value*100)/100.0;
}
......
......@@ -1711,13 +1711,16 @@ public class TimeCardController {
BeanUtil.copyProperties(endo, dets , "balanceTo");
List<KqglAssoLeaveEmployeeBalance> empye = KqglAssoLeaveEmployeeBalance.builder().build().selectList(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getUserid, endo.getNum())
.eq(KqglAssoLeaveEmployeeBalance::getOrgCode, endo.getOrgcode()));
// List<KqglAssoLeaveEmployeeBalance> empye = KqglAssoLeaveEmployeeBalance.builder().build().selectList(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getUserid, endo.getNum())
// .eq(KqglAssoLeaveEmployeeBalance::getOrgCode, endo.getOrgcode()));
List<BalanceSheetDataDto> empye = kqglassomonthpunchsummarymapper.AttenSumDailyDetails(endo.getOrgcode(), endo.getNum(), attesummqueto.getTimes());
List<BalanceSheetDataDto> balanceTo = new ArrayList<BalanceSheetDataDto>();
for(KqglAssoLeaveEmployeeBalance empyes : empye) {
for(BalanceSheetDataDto empyes : empye) {
BalanceSheetDataDto bal = BalanceSheetDataDto.builder().build();
bal.setBalancedays(empyes.getBalanceDays());
bal.setLeaverulesid(empyes.getLeaveRulesId());
bal.setBalancedays(empyes.getBalancedays());
bal.setLeaverulesid(empyes.getLeaverulesid());
balanceTo.add(bal);
}
dets.setBalanceTo(balanceTo);
......@@ -2358,193 +2361,210 @@ public class TimeCardController {
String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String yue = new SimpleDateFormat("yyyy-MM").format(new Date());
Long startMonth = 0l;
Long endMonth = 0l;
if(date == null || ("").equals(date)) {
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天
String first = mat.format(c.getTime());
startMonth = DateUtil.getStartTime(0,DateUtil.getStringTime(first,"yyyy-MM-dd")).getTime();
endMonth = new Date().getTime();
// //获取当前月最后一天
// Calendar ca = Calendar.getInstance();
// ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
// String last = mat.format(ca.getTime());
// endMonth = DateUtil.getnowEndTime(23,DateUtil.getStringTime(last,"yyyy-MM-dd")).getTime();
}else {
String time = date+"-01";
String sdaet = ClockInTool.getMinMonthDate(time);
startMonth = ClockInTool.getStartTime(0,ClockInTool.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
String edate = ClockInTool.getMaxMonthDate(time);
endMonth = ClockInTool.getnowEndTime(23,ClockInTool.getStringTime(edate,"yyyy-MM-dd")).getTime();
if(date.equals(yue)) {
endMonth = new Date().getTime();
}
}
String[] rangeArray=ClockInTool.listToString(ClockInTool.getDays(df.format(startMonth),df.format(endMonth))).split(";");//目前为止所有日期
String[] range=rangeArray[0].split(",");
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userBean.getEmpNum(),userBean.getOrgCode()); //考勤组信息
SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM");
Date date_;
try {
date_ = df1.parse(date);
}catch (ParseException e){
e.printStackTrace();
date_=new Date();
}
int dateOne= ClockInTool.getYearMonth(date_);
int dangqian = ClockInTool.getYearMonth(new Date());//当前
List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
if(dateOne<=dangqian){
Long startMonth = 0l;
Long endMonth = 0l;
if(date == null || ("").equals(date)) {
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天
String first = mat.format(c.getTime());
startMonth = DateUtil.getStartTime(0,DateUtil.getStringTime(first,"yyyy-MM-dd")).getTime();
endMonth = new Date().getTime();
// //获取当前月最后一天
// Calendar ca = Calendar.getInstance();
// ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
// String last = mat.format(ca.getTime());
// endMonth = DateUtil.getnowEndTime(23,DateUtil.getStringTime(last,"yyyy-MM-dd")).getTime();
}else {
String time = date+"-01";
String sdaet = ClockInTool.getMinMonthDate(time);
startMonth = ClockInTool.getStartTime(0,ClockInTool.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
String edate = ClockInTool.getMaxMonthDate(time);
endMonth = ClockInTool.getnowEndTime(23,ClockInTool.getStringTime(edate,"yyyy-MM-dd")).getTime();
if(date.equals(yue)) {
endMonth = new Date().getTime();
}
}
String[] rangeArray=ClockInTool.listToString(ClockInTool.getDays(df.format(startMonth),df.format(endMonth))).split(";");//目前为止所有日期
String[] range=rangeArray[0].split(",");
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userBean.getEmpNum(),userBean.getOrgCode()); //考勤组信息
int bcid = 0;
// List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
for(String num : range) {
Long start_time = DateUtil.getStartTime(0,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime();
Long end_time = DateUtil.getnowEndTime(23,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime();
WorkbenchCalendarDto wocal = WorkbenchCalendarDto.builder().build();
wocal.setDate(num);
if(attgro != null) {//有无考勤组
AttendanceCardListDto attdate = MethodCall(userBean.getOrgCode(),userBean.getEmpNum(),num);//获取当天所打卡班次
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {//班次不为空
if(date == null || ("").equals(date)) {//未输入 当月
if(current.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}else {//输入
if(date.equals(yue)) {//输入为当月
if(current.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}else {//输入不是当月
String time = date+"-01";
if(time.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}
}
if(ashss.get(0).getId() != 0) {
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, start_time).le(KqglAssoDkmx::getDksj, end_time));
if(dkmc != null) {
if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk1() != null && dkmc.getSbdk1jg() == 0 && dkmc.getXbdk1() != null && dkmc.getXbdk1jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
if(attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk2() != null && dkmc.getSbdk2jg() == 0 && dkmc.getXbdk2() != null && dkmc.getXbdk2jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
if(attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk3() != null && dkmc.getSbdk3jg() == 0 && dkmc.getXbdk3() != null && dkmc.getXbdk3jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
KqglAssoRelationSummary asssum = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, userBean.getEmpNum())
.eq(KqglAssoRelationSummary::getAppTime, num).last("LIMIT 1"));
if(asssum != null) {
wocal.setCalendar_status(2);//事务(请假,加班,调休,出差)
}
}else {
wocal.setCalendar_status(3);//打卡异常
}
}else {
wocal.setCalendar_status(4);//休息
}
}else {
wocal.setCalendar_status(0);//无排班
}
}else {
wocal.setCalendar_status(0);//无排班
}
workcal.add(wocal);
}
List<CalendarPunchDetailsDto> detailed = new ArrayList<CalendarPunchDetailsDto>();
CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
// dets.setDate(current);
// detailed.add(dets1);
Long starttime = DateUtil.getStartTime(0,DateUtil.getStringTime(current,"yyyy-MM-dd")).getTime();
Long endtime = DateUtil.getnowEndTime(23,DateUtil.getStringTime(current,"yyyy-MM-dd")).getTime();
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
if(date == null || ("").equals(date)) {//未输入 当月
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
dets.setDate(current);
}else {//输入
if(date.equals(yue)) {//输入为当月
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
dets.setDate(current);
}else {//输入不是当月
String time = date+"-01";
Long starttime_ = DateUtil.getStartTime(0,DateUtil.getStringTime(time,"yyyy-MM-dd")).getTime();
Long endtime_ = DateUtil.getnowEndTime(23,DateUtil.getStringTime(time,"yyyy-MM-dd")).getTime();
dets.setDate(time);
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime_).le(KqglAssoDkmx::getDksj, endtime_));
}
}
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
// .ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
if(dkmc!=null && dkmc.getData() != null) {
// CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
dets.setSbdksj1(dkmc.getSbdk1() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk1())));
dets.setSbdksj1jg(dkmc.getSbdk1jg());
dets.setXbdksj1(dkmc.getXbdk1() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk1())));
dets.setXbdksj1jg(dkmc.getXbdk1jg());
dets.setSbdksj2(dkmc.getSbdk2() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk2())));
dets.setSbdksj2jg(dkmc.getSbdk2jg());
dets.setXbdksj2(dkmc.getXbdk2() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk2())));
dets.setXbdksj2jg(dkmc.getXbdk2jg());
dets.setSbdksj3(dkmc.getSbdk3() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk3())));
dets.setSbdksj3jg(dkmc.getSbdk3jg());
dets.setXbdksj3(dkmc.getXbdk3() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk3())));
dets.setXbdksj3jg(dkmc.getXbdk3jg());
// detailed.add(dets);
}
if(bcid > 0) {
KqglAssoBcsz bcs = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, bcid));
if(bcs != null) {
// CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
dets.setClock_num(bcs.getSxbcs()*2);
dets.setBcsbdk1(bcs.getSbdk1() == null ? "" : bcs.getSbdk1().replaceAll("\r|\n", ""));
dets.setBcxbdk1(bcs.getXbdk1() == null ? "" : bcs.getXbdk1().replaceAll("\r|\n", ""));
dets.setBcsbdk2(bcs.getSbdk2() == null ? "" : bcs.getSbdk2().replaceAll("\r|\n", ""));
dets.setBcxbdk2(bcs.getXbdk2() == null ? "" : bcs.getXbdk2().replaceAll("\r|\n", ""));
dets.setBcsbdk3(bcs.getSbdk3() == null ? "" : bcs.getSbdk3().replaceAll("\r|\n", ""));
dets.setBcxbdk3(bcs.getXbdk3() == null ? "" : bcs.getXbdk3().replaceAll("\r|\n", ""));
// detailed.add(dets);
}
}
detailed.add(dets);
WorkbenchCalendarDto wocal1 = WorkbenchCalendarDto.builder().build();
wocal1.setDetailed(detailed);
workcal.add(wocal1);
}
int bcid = 0;
List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
for(String num : range) {
Long start_time = DateUtil.getStartTime(0,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime();
Long end_time = DateUtil.getnowEndTime(23,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime();
WorkbenchCalendarDto wocal = WorkbenchCalendarDto.builder().build();
wocal.setDate(num);
if(attgro != null) {//有无考勤组
AttendanceCardListDto attdate = MethodCall(userBean.getOrgCode(),userBean.getEmpNum(),num);//获取当天所打卡班次
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {//班次不为空
if(date == null || ("").equals(date)) {//未输入 当月
if(current.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}else {//输入
if(date.equals(yue)) {//输入为当月
if(current.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}else {//输入不是当月
String time = date+"-01";
if(time.equals(num)) {
bcid = ashss.get(0).getId();//班次id
}
}
}
if(ashss.get(0).getId() != 0) {
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, start_time).le(KqglAssoDkmx::getDksj, end_time));
if(dkmc != null) {
if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk1() != null && dkmc.getSbdk1jg() == 0 && dkmc.getXbdk1() != null && dkmc.getXbdk1jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
if(attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk2() != null && dkmc.getSbdk2jg() == 0 && dkmc.getXbdk2() != null && dkmc.getXbdk2jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
if(attdate.getAttsch().size() == 6) {
if(dkmc.getSbdk3() != null && dkmc.getSbdk3jg() == 0 && dkmc.getXbdk3() != null && dkmc.getXbdk3jg() == 0) {
wocal.setCalendar_status(1);//打卡正常
}else {
wocal.setCalendar_status(3);//打卡异常
}
}
KqglAssoRelationSummary asssum = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, userBean.getEmpNum())
.eq(KqglAssoRelationSummary::getAppTime, num).last("LIMIT 1"));
if(asssum != null) {
wocal.setCalendar_status(2);//事务(请假,加班,调休,出差)
}
}else {
wocal.setCalendar_status(3);//打卡异常
}
}else {
wocal.setCalendar_status(4);//休息
}
}else {
wocal.setCalendar_status(0);//无排班
}
}else {
wocal.setCalendar_status(0);//无排班
}
workcal.add(wocal);
}
List<CalendarPunchDetailsDto> detailed = new ArrayList<CalendarPunchDetailsDto>();
CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
// dets.setDate(current);
// detailed.add(dets1);
Long starttime = DateUtil.getStartTime(0,DateUtil.getStringTime(current,"yyyy-MM-dd")).getTime();
Long endtime = DateUtil.getnowEndTime(23,DateUtil.getStringTime(current,"yyyy-MM-dd")).getTime();
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
if(date == null || ("").equals(date)) {//未输入 当月
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
dets.setDate(current);
}else {//输入
if(date.equals(yue)) {//输入为当月
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
dets.setDate(current);
}else {//输入不是当月
String time = date+"-01";
Long starttime_ = DateUtil.getStartTime(0,DateUtil.getStringTime(time,"yyyy-MM-dd")).getTime();
Long endtime_ = DateUtil.getnowEndTime(23,DateUtil.getStringTime(time,"yyyy-MM-dd")).getTime();
dets.setDate(time);
dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
.ge(KqglAssoDkmx::getDksj, starttime_).le(KqglAssoDkmx::getDksj, endtime_));
}
}
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userBean.getEmpNum()).eq(KqglAssoDkmx::getQyid, userBean.getOrgCode())
// .ge(KqglAssoDkmx::getDksj, starttime).le(KqglAssoDkmx::getDksj, endtime));
if(dkmc!=null && dkmc.getData() != null) {
// CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
dets.setSbdksj1(dkmc.getSbdk1() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk1())));
dets.setSbdksj1jg(dkmc.getSbdk1jg());
dets.setXbdksj1(dkmc.getXbdk1() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk1())));
dets.setXbdksj1jg(dkmc.getXbdk1jg());
dets.setSbdksj2(dkmc.getSbdk2() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk2())));
dets.setSbdksj2jg(dkmc.getSbdk2jg());
dets.setXbdksj2(dkmc.getXbdk2() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk2())));
dets.setXbdksj2jg(dkmc.getXbdk2jg());
dets.setSbdksj3(dkmc.getSbdk3() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getSbdk3())));
dets.setSbdksj3jg(dkmc.getSbdk3jg());
dets.setXbdksj3(dkmc.getXbdk3() == null ? "" : ClockInTool.stampToDate3(String.valueOf(dkmc.getXbdk3())));
dets.setXbdksj3jg(dkmc.getXbdk3jg());
// detailed.add(dets);
}
if(bcid > 0) {
KqglAssoBcsz bcs = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, bcid));
if(bcs != null) {
// CalendarPunchDetailsDto dets = CalendarPunchDetailsDto.builder().build();
dets.setClock_num(bcs.getSxbcs()*2);
dets.setBcsbdk1(bcs.getSbdk1() == null ? "" : bcs.getSbdk1().replaceAll("\r|\n", ""));
dets.setBcxbdk1(bcs.getXbdk1() == null ? "" : bcs.getXbdk1().replaceAll("\r|\n", ""));
dets.setBcsbdk2(bcs.getSbdk2() == null ? "" : bcs.getSbdk2().replaceAll("\r|\n", ""));
dets.setBcxbdk2(bcs.getXbdk2() == null ? "" : bcs.getXbdk2().replaceAll("\r|\n", ""));
dets.setBcsbdk3(bcs.getSbdk3() == null ? "" : bcs.getSbdk3().replaceAll("\r|\n", ""));
dets.setBcxbdk3(bcs.getXbdk3() == null ? "" : bcs.getXbdk3().replaceAll("\r|\n", ""));
// detailed.add(dets);
}
}
detailed.add(dets);
WorkbenchCalendarDto wocal1 = WorkbenchCalendarDto.builder().build();
wocal1.setDetailed(detailed);
workcal.add(wocal1);
return ResultUtil.data(workcal, "操作成功!");
}
......
package cn.timer.api.dao.kqmk;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -8,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto;
import cn.timer.api.dto.kqmk.BalanceSheetDataDto;
import cn.timer.api.dto.kqmk.DailyDetailsDto;
import cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto;
......@@ -22,4 +25,6 @@ public interface KqglAssoMonthPunchSummaryMapper extends BaseMapper<KqglAssoMont
IPage<KqglAssoMonthPunchSummaryDto> AttendanceSummaryData(IPage<KqglAssoMonthPunchSummaryDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto);
IPage<DailyDetailsDto> Dailydetails(IPage<DailyDetailsDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto);
List<BalanceSheetDataDto> AttenSumDailyDetails(int orgcode,int userid,String apptime);
}
......@@ -210,10 +210,11 @@
</select>
<select id="selectMyByQuery" resultMap="BaseResultMap_ALl" >
<!-- c.comprehensive_score c_comprehensive_score, -->
SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time,
b.id b_id,b.sts b_sts,
c.comprehensive_score c_comprehensive_score,
b.total c_comprehensive_score,
c.level c_level,
d.sts note_sts,
e.name b_user_name, e.phone b_phone,
......
......@@ -224,7 +224,23 @@
<result column="balancedays" property="balancedays"/>
</collection>
</resultMap>
<resultMap id="BalanceSheetDataMap" type="cn.timer.api.dto.kqmk.BalanceSheetDataDto" >
<id column="yzid" property="yzid"/>
<result column="leaverulesid" property="leaverulesid"/>
<result column="balancedays" property="balancedays"/>
</resultMap>
<select id="AttenSumDailyDetails" resultMap="BalanceSheetDataMap">
select SUM(su.duration) as balancedays,su.leave_type_id as leaverulesid from kqgl_asso_relation_summary su
where su.org_code = #{orgcode}
and su.approval_type = 2
and su.user_id = #{userid}
and su.app_time = #{apptime}
GROUP BY su.leave_type_id
</select>
<select id="AttendanceSummaryData" resultMap="SummarydataMap">
select sum.*,
......@@ -390,13 +406,22 @@
sum.days_off as daysoff,
sum.length_business_trip as lengthbusinesstrip,
sum.time_out as timeout,
sum.total_overtime_hours as totalovertimehours,
sum.working_turn_compen_leave as workingturncompenleave,
sum.rest_turn_compen_leave as restturncompenleave,
sum.holiday_turn_compen_leave as holidayturncompenleave,
sum.working_transfer_overtime as workingtransferovertime,
sum.rest_transfer_overtime as resttransferovertime,
sum.holiday_transfer_overtime as holidaytransferovertime
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1 and su.overtime_type_id = 1
and su.app_time = #{param.times}) as totalovertimehours,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 1 or su.compensate_id = 3) and su.overtime_type_id = 1 and su.app_time = #{param.times}) as workingturncompenleave,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 1 or su.compensate_id = 3) and su.overtime_type_id = 2 and su.app_time = #{param.times}) as restturncompenleave,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 1 or su.compensate_id = 3) and su.overtime_type_id = 3 and su.app_time = #{param.times}) as holidayturncompenleave,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 2 or su.compensate_id = 4) and su.overtime_type_id = 1 and su.app_time = #{param.times}) as workingtransferovertime,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 2 or su.compensate_id = 4) and su.overtime_type_id = 2 and su.app_time = #{param.times}) as resttransferovertime,
(select SUM(su.duration) as duration from kqgl_asso_relation_summary su where su.user_id = sum.num and su.approval_type = 1
and (su.compensate_id = 2 or su.compensate_id = 4) and su.overtime_type_id = 3 and su.app_time = #{param.times}) as holidaytransferovertime
from kqgl_asso_month_punch_summary sum
LEFT JOIN (
select DISTINCT info.`name` as username ,
......@@ -427,6 +452,15 @@
<!-- LEFT JOIN kqgl_asso_leave_employee_balance as mrtj on mrtj.userid = sum.num
IFNULL(mrtj.leave_rules_id,'') as leaverulesid,
IFNULL(mrtj.balance_days,'') as balancedays-->
<!--
sum.total_overtime_hours as totalovertimehours,
sum.working_turn_compen_leave as workingturncompenleave,
sum.rest_turn_compen_leave as restturncompenleave,
sum.holiday_turn_compen_leave as holidayturncompenleave,
sum.working_transfer_overtime as workingtransferovertime,
sum.rest_transfer_overtime as resttransferovertime,
sum.holiday_transfer_overtime as holidaytransferovertime -->
</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