Commit f5374de7 by lal

提交

parent b200b71c
...@@ -1090,7 +1090,7 @@ public class JxglController { ...@@ -1090,7 +1090,7 @@ public class JxglController {
@PostMapping(value = "/selects_emp_appraisal") @PostMapping(value = "/selects_emp_appraisal")
@ApiOperation(value = "18.查询-某员工考核-列表", httpMethod = "POST", notes = "查询-某员工考核-列表") @ApiOperation(value = "18.查询-某员工考核-列表", httpMethod = "POST", notes = "查询-某员工考核-列表")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
@Role // @Role
public Result<Object> selectsEA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) { public Result<Object> selectsEA(@CurrentUser UserBean userBean,@Validated @RequestBody EmpAppraisalQuery query) {
IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(), IPage<JxglPerformanceAppraisal> page = new Page<JxglPerformanceAppraisal>(query.getCurrentPage(),
......
...@@ -23,6 +23,22 @@ public class ClockInTool { ...@@ -23,6 +23,22 @@ public class ClockInTool {
static SimpleDateFormat famt = new SimpleDateFormat("yyyy-MM-dd"); 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){ public static double round(double value){
return Math.round(value*100)/100.0; return Math.round(value*100)/100.0;
} }
......
...@@ -1711,13 +1711,16 @@ public class TimeCardController { ...@@ -1711,13 +1711,16 @@ public class TimeCardController {
BeanUtil.copyProperties(endo, dets , "balanceTo"); BeanUtil.copyProperties(endo, dets , "balanceTo");
List<KqglAssoLeaveEmployeeBalance> empye = KqglAssoLeaveEmployeeBalance.builder().build().selectList(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getUserid, endo.getNum()) // List<KqglAssoLeaveEmployeeBalance> empye = KqglAssoLeaveEmployeeBalance.builder().build().selectList(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getUserid, endo.getNum())
.eq(KqglAssoLeaveEmployeeBalance::getOrgCode, endo.getOrgcode())); // .eq(KqglAssoLeaveEmployeeBalance::getOrgCode, endo.getOrgcode()));
List<BalanceSheetDataDto> empye = kqglassomonthpunchsummarymapper.AttenSumDailyDetails(endo.getOrgcode(), endo.getNum(), attesummqueto.getTimes());
List<BalanceSheetDataDto> balanceTo = new ArrayList<BalanceSheetDataDto>(); List<BalanceSheetDataDto> balanceTo = new ArrayList<BalanceSheetDataDto>();
for(KqglAssoLeaveEmployeeBalance empyes : empye) { for(BalanceSheetDataDto empyes : empye) {
BalanceSheetDataDto bal = BalanceSheetDataDto.builder().build(); BalanceSheetDataDto bal = BalanceSheetDataDto.builder().build();
bal.setBalancedays(empyes.getBalanceDays()); bal.setBalancedays(empyes.getBalancedays());
bal.setLeaverulesid(empyes.getLeaveRulesId()); bal.setLeaverulesid(empyes.getLeaverulesid());
balanceTo.add(bal); balanceTo.add(bal);
} }
dets.setBalanceTo(balanceTo); dets.setBalanceTo(balanceTo);
...@@ -2358,193 +2361,210 @@ public class TimeCardController { ...@@ -2358,193 +2361,210 @@ public class TimeCardController {
String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String yue = new SimpleDateFormat("yyyy-MM").format(new Date()); String yue = new SimpleDateFormat("yyyy-MM").format(new Date());
Long startMonth = 0l; SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM");
Long endMonth = 0l; Date date_;
if(date == null || ("").equals(date)) { try {
Calendar c = Calendar.getInstance(); date_ = df1.parse(date);
c.add(Calendar.MONTH, 0); }catch (ParseException e){
c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天 e.printStackTrace();
String first = mat.format(c.getTime()); date_=new Date();
startMonth = DateUtil.getStartTime(0,DateUtil.getStringTime(first,"yyyy-MM-dd")).getTime(); }
int dateOne= ClockInTool.getYearMonth(date_);
endMonth = new Date().getTime(); int dangqian = ClockInTool.getYearMonth(new Date());//当前
// //获取当前月最后一天 List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
// Calendar ca = Calendar.getInstance();
// ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH)); if(dateOne<=dangqian){
// String last = mat.format(ca.getTime()); Long startMonth = 0l;
// endMonth = DateUtil.getnowEndTime(23,DateUtil.getStringTime(last,"yyyy-MM-dd")).getTime(); Long endMonth = 0l;
}else { if(date == null || ("").equals(date)) {
String time = date+"-01"; Calendar c = Calendar.getInstance();
String sdaet = ClockInTool.getMinMonthDate(time); c.add(Calendar.MONTH, 0);
startMonth = ClockInTool.getStartTime(0,ClockInTool.getStringTime(sdaet,"yyyy-MM-dd")).getTime(); c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天
String edate = ClockInTool.getMaxMonthDate(time); String first = mat.format(c.getTime());
endMonth = ClockInTool.getnowEndTime(23,ClockInTool.getStringTime(edate,"yyyy-MM-dd")).getTime(); startMonth = DateUtil.getStartTime(0,DateUtil.getStringTime(first,"yyyy-MM-dd")).getTime();
if(date.equals(yue)) { endMonth = new Date().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());
String[] rangeArray=ClockInTool.listToString(ClockInTool.getDays(df.format(startMonth),df.format(endMonth))).split(";");//目前为止所有日期 // endMonth = DateUtil.getnowEndTime(23,DateUtil.getStringTime(last,"yyyy-MM-dd")).getTime();
}else {
String time = date+"-01";
String[] range=rangeArray[0].split(","); String sdaet = ClockInTool.getMinMonthDate(time);
startMonth = ClockInTool.getStartTime(0,ClockInTool.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userBean.getEmpNum(),userBean.getOrgCode()); //考勤组信息 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, "操作成功!"); return ResultUtil.data(workcal, "操作成功!");
} }
......
package cn.timer.api.dao.kqmk; package cn.timer.api.dao.kqmk;
import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -8,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -8,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary; import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.dto.kqmk.AttendanceSummaryQueryDto; 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.DailyDetailsDto;
import cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto; import cn.timer.api.dto.kqmk.KqglAssoMonthPunchSummaryDto;
...@@ -22,4 +25,6 @@ public interface KqglAssoMonthPunchSummaryMapper extends BaseMapper<KqglAssoMont ...@@ -22,4 +25,6 @@ public interface KqglAssoMonthPunchSummaryMapper extends BaseMapper<KqglAssoMont
IPage<KqglAssoMonthPunchSummaryDto> AttendanceSummaryData(IPage<KqglAssoMonthPunchSummaryDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto); IPage<KqglAssoMonthPunchSummaryDto> AttendanceSummaryData(IPage<KqglAssoMonthPunchSummaryDto> page,@Param("param") AttendanceSummaryQueryDto attendancesummaryquerydto);
IPage<DailyDetailsDto> Dailydetails(IPage<DailyDetailsDto> 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 @@ ...@@ -210,10 +210,11 @@
</select> </select>
<select id="selectMyByQuery" resultMap="BaseResultMap_ALl" > <select id="selectMyByQuery" resultMap="BaseResultMap_ALl" >
<!-- c.comprehensive_score c_comprehensive_score, -->
SELECT SELECT
a.name,a.appraisal_start_time,a.appraisal_end_time, a.name,a.appraisal_start_time,a.appraisal_end_time,
b.id b_id,b.sts b_sts, b.id b_id,b.sts b_sts,
c.comprehensive_score c_comprehensive_score, b.total c_comprehensive_score,
c.level c_level, c.level c_level,
d.sts note_sts, d.sts note_sts,
e.name b_user_name, e.phone b_phone, e.name b_user_name, e.phone b_phone,
......
...@@ -224,7 +224,23 @@ ...@@ -224,7 +224,23 @@
<result column="balancedays" property="balancedays"/> <result column="balancedays" property="balancedays"/>
</collection> </collection>
</resultMap> </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 id="AttendanceSummaryData" resultMap="SummarydataMap">
select sum.*, select sum.*,
...@@ -390,13 +406,22 @@ ...@@ -390,13 +406,22 @@
sum.days_off as daysoff, sum.days_off as daysoff,
sum.length_business_trip as lengthbusinesstrip, sum.length_business_trip as lengthbusinesstrip,
sum.time_out as timeout, sum.time_out as timeout,
sum.total_overtime_hours 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.overtime_type_id = 1
sum.working_turn_compen_leave as workingturncompenleave, and su.app_time = #{param.times}) as totalovertimehours,
sum.rest_turn_compen_leave as restturncompenleave,
sum.holiday_turn_compen_leave 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
sum.working_transfer_overtime as workingtransferovertime, and (su.compensate_id = 1 or su.compensate_id = 3) and su.overtime_type_id = 1 and su.app_time = #{param.times}) as workingturncompenleave,
sum.rest_transfer_overtime 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
sum.holiday_transfer_overtime as holidaytransferovertime 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 from kqgl_asso_month_punch_summary sum
LEFT JOIN ( LEFT JOIN (
select DISTINCT info.`name` as username , select DISTINCT info.`name` as username ,
...@@ -427,6 +452,15 @@ ...@@ -427,6 +452,15 @@
<!-- LEFT JOIN kqgl_asso_leave_employee_balance as mrtj on mrtj.userid = sum.num <!-- LEFT JOIN kqgl_asso_leave_employee_balance as mrtj on mrtj.userid = sum.num
IFNULL(mrtj.leave_rules_id,'') as leaverulesid, IFNULL(mrtj.leave_rules_id,'') as leaverulesid,
IFNULL(mrtj.balance_days,'') as balancedays--> 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> </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