Commit 30d28cd5 by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!299
parents b200b71c f5374de7
...@@ -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,6 +2361,20 @@ public class TimeCardController { ...@@ -2358,6 +2361,20 @@ 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());
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 startMonth = 0l;
Long endMonth = 0l; Long endMonth = 0l;
if(date == null || ("").equals(date)) { if(date == null || ("").equals(date)) {
...@@ -2396,7 +2413,7 @@ public class TimeCardController { ...@@ -2396,7 +2413,7 @@ public class TimeCardController {
int bcid = 0; int bcid = 0;
List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>(); // List<WorkbenchCalendarDto> workcal = new ArrayList<WorkbenchCalendarDto>();
for(String num : range) { for(String num : range) {
Long start_time = DateUtil.getStartTime(0,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime(); 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(); Long end_time = DateUtil.getnowEndTime(23,DateUtil.getStringTime(num,"yyyy-MM-dd")).getTime();
...@@ -2545,6 +2562,9 @@ public class TimeCardController { ...@@ -2545,6 +2562,9 @@ public class TimeCardController {
wocal1.setDetailed(detailed); wocal1.setDetailed(detailed);
workcal.add(wocal1); 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,
......
...@@ -225,6 +225,22 @@ ...@@ -225,6 +225,22 @@
</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