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,6 +2361,20 @@ public class TimeCardController {
String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String yue = new SimpleDateFormat("yyyy-MM").format(new Date());
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)) {
......@@ -2396,7 +2413,7 @@ public class TimeCardController {
int bcid = 0;
List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
// 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();
......@@ -2545,6 +2562,9 @@ public class TimeCardController {
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,
......
......@@ -225,6 +225,22 @@
</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