Commit c928be85 by lal Committed by chenzg

提交

parent 131e5ab3
...@@ -658,6 +658,7 @@ public class ClockInTool { ...@@ -658,6 +658,7 @@ public class ClockInTool {
return res; return res;
} }
/** /**
* 时间戳转换时间 * 时间戳转换时间
*/ */
...@@ -682,6 +683,18 @@ public class ClockInTool { ...@@ -682,6 +683,18 @@ public class ClockInTool {
return res; return res;
} }
/**
* 时间戳转换时间
*/
public static String stampToDate4(String s){
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
long lt = new Long(s);
Date date = new Date(lt);
res = simpleDateFormat.format(date);
return res;
}
public static String Str_Time_formatting(String str,String Format) { public static String Str_Time_formatting(String str,String Format) {
SimpleDateFormat sdf = new SimpleDateFormat(Format); SimpleDateFormat sdf = new SimpleDateFormat(Format);
......
...@@ -31,7 +31,9 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu; ...@@ -31,7 +31,9 @@ import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban; import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz; import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.controller.kqgl.ClockInController;
import cn.timer.api.controller.kqgl.ClockInTool; import cn.timer.api.controller.kqgl.ClockInTool;
import cn.timer.api.controller.kqgl.EmptyUtil;
import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper; import cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper;
import cn.timer.api.dao.kqgl.PunchCardDetailsMapper; import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
import cn.timer.api.dao.kqgl.PunchRecordMapper; import cn.timer.api.dao.kqgl.PunchRecordMapper;
...@@ -43,7 +45,9 @@ import cn.timer.api.dao.kqmk.KqglAssoTeshuMapper; ...@@ -43,7 +45,9 @@ import cn.timer.api.dao.kqmk.KqglAssoTeshuMapper;
import cn.timer.api.dao.kqmk.KqglMainKqzMapper; import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper; import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper;
import cn.timer.api.dto.kqmk.AdditionalDto; import cn.timer.api.dto.kqmk.AdditionalDto;
import cn.timer.api.dto.kqmk.AttSchedule;
import cn.timer.api.dto.kqmk.AttSubsidiaryDto; import cn.timer.api.dto.kqmk.AttSubsidiaryDto;
import cn.timer.api.dto.kqmk.AttendanceCardListDto;
import cn.timer.api.utils.DateUtil; import cn.timer.api.utils.DateUtil;
/** /**
...@@ -99,6 +103,10 @@ public class AttendanceTaskTiming{ ...@@ -99,6 +103,10 @@ public class AttendanceTaskTiming{
private PunchRecordMapper punchrecordmapper; private PunchRecordMapper punchrecordmapper;
@Autowired @Autowired
private KqglAssoDkmxMapper kqglassodkmxmapper; private KqglAssoDkmxMapper kqglassodkmxmapper;
@Autowired
private ClockInController clockincontroller;
/** /**
* @return * @return
* @throws ParseException * @throws ParseException
...@@ -109,7 +117,7 @@ public class AttendanceTaskTiming{ ...@@ -109,7 +117,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 40 17 * * ?") // @Scheduled(cron = "0 24 10 * * ?")
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -179,12 +187,18 @@ public class AttendanceTaskTiming{ ...@@ -179,12 +187,18 @@ public class AttendanceTaskTiming{
String[] sblacks = new String[31];//上班缺卡天数 String[] sblacks = new String[31];//上班缺卡天数
String[] xblacks = new String[31];//下班缺卡天数 String[] xblacks = new String[31];//下班缺卡天数
String[] dkjtts = new String[attendance.size()];//目前打卡日期明细 String[] dkjtts = new String[attendance.size()];//目前打卡日期明细
int bccs = 0;
if(attendance.size() > 0) { if(attendance.size() > 0) {
dkjl = attendance.size(); dkjl = attendance.size();
for(PunchCardDetails pcd:attendance){ for(PunchCardDetails pcd:attendance){
AttendanceCardListDto attdate = clockincontroller.MethodCall(org_code, user.getEmpnum(), pcd.getData());
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && ashss.get(0).getId() != 0) {//班次不为空
bccs = attdate.getAttsch().size();
}
dkjtts[dk] = pcd.getData(); dkjtts[dk] = pcd.getData();
dk++; dk++;
if(pcd.getYdkcs() == 2 || pcd.getYdkcs() == 4 || pcd.getYdkcs() == 6){ if(bccs == 2 || bccs == 4 || bccs == 6){
if(pcd.getSbdk1() == null){ if(pcd.getSbdk1() == null){
sblacks[sbqkcs] = pcd.getData(); sblacks[sbqkcs] = pcd.getData();
sbqkcs++; sbqkcs++;
...@@ -194,7 +208,7 @@ public class AttendanceTaskTiming{ ...@@ -194,7 +208,7 @@ public class AttendanceTaskTiming{
xbqkcs++; xbqkcs++;
} }
} }
if(pcd.getYdkcs() == 4 || pcd.getYdkcs() == 6){ if(bccs == 4 || bccs == 6){
if(pcd.getSbdk2() == null){ if(pcd.getSbdk2() == null){
sblacks[sbqkcs] = pcd.getData(); sblacks[sbqkcs] = pcd.getData();
sbqkcs++; sbqkcs++;
...@@ -204,7 +218,7 @@ public class AttendanceTaskTiming{ ...@@ -204,7 +218,7 @@ public class AttendanceTaskTiming{
xbqkcs++; xbqkcs++;
} }
} }
if(pcd.getYdkcs() == 6){ if(bccs == 6){
if(pcd.getSbdk3() == null){ if(pcd.getSbdk3() == null){
sblacks[sbqkcs] = pcd.getData(); sblacks[sbqkcs] = pcd.getData();
sbqkcs++; sbqkcs++;
...@@ -215,6 +229,12 @@ public class AttendanceTaskTiming{ ...@@ -215,6 +229,12 @@ public class AttendanceTaskTiming{
} }
} }
} }
sblacks = ClockInTool.deleteArrayNull(sblacks);
sbqkcs= sblacks.length;
xblacks = ClockInTool.deleteArrayNull(xblacks);
xbqkcs = xblacks.length;
} }
//具体打卡时间入汇总表(打卡成功才会录入汇总表) //具体打卡时间入汇总表(打卡成功才会录入汇总表)
// KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda() // KqglAssoMonthPunchSummary isyessum = KqglAssoMonthPunchSummary.builder().build().selectOne(new QueryWrapper<KqglAssoMonthPunchSummary>().lambda()
...@@ -789,6 +809,4 @@ public class AttendanceTaskTiming{ ...@@ -789,6 +809,4 @@ public class AttendanceTaskTiming{
// return null; // return null;
// } // }
} }
} }
...@@ -76,6 +76,7 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper; ...@@ -76,6 +76,7 @@ import cn.timer.api.dao.spmk.SpmkApproveSummaryMapper;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper; import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dao.spmk.SpmkExecutorMapper; import cn.timer.api.dao.spmk.SpmkExecutorMapper;
import cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper; import cn.timer.api.dao.spmk.SpmkInitiatorConfigMapper;
import cn.timer.api.dto.spmk.ApprovedQuantityDto;
import cn.timer.api.dto.spmk.ApprovingDto; import cn.timer.api.dto.spmk.ApprovingDto;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -926,4 +927,44 @@ public class SpmkController { ...@@ -926,4 +927,44 @@ public class SpmkController {
return ResultUtil.data(msg); return ResultUtil.data(msg);
} }
@PostMapping(value = "/approved_quantity")
@ApiOperation(value = "APP-我发起的/我审批的/抄送我的-数量", httpMethod = "POST", notes = "")
public Result<Object> ApprovedQuantity(@CurrentUser UserBean userBean, @Validated @RequestBody MySummaryQueryDto mysummaryquerydto){
ApprovedQuantityDto qna = ApprovedQuantityDto.builder().build();
mysummaryquerydto.setEndTime(null);
mysummaryquerydto.setStartTime(null);
mysummaryquerydto.setOrgCode(userBean.getOrgCode());
mysummaryquerydto.setEmpNum(userBean.getEmpNum());
mysummaryquerydto.setSts(5);//状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝 4:(2/3) 5:全部
int istartedit=0,ccme=0,iapprovedit=0;
mysummaryquerydto.setType(0);//我发起的
List<SpmkApproveSummary> istartedit_ = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(mysummaryquerydto);
if(istartedit_.size() > 0) {
istartedit = istartedit_.size();
}
mysummaryquerydto.setType(1);//抄送我的
List<SpmkApproveSummary> ccme_ = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(mysummaryquerydto);
if(ccme_.size() > 0) {
ccme = ccme_.size();
}
mysummaryquerydto.setType(2);//我审批的
List<SpmkApproveSummary> iapprovedit_ = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(mysummaryquerydto);
if(iapprovedit_.size() > 0) {
iapprovedit = iapprovedit_.size();
}
qna.setIstartedit(istartedit);
qna.setCcme(ccme);
qna.setIapprovedit(iapprovedit);
return ResultUtil.data(qna);
}
} }
...@@ -23,4 +23,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati ...@@ -23,4 +23,6 @@ public interface KqglAssoRelationSummaryMapper extends BaseMapper<KqglAssoRelati
List<KqglAssoRelationSummary> LeaveInvestigation(int userid,int approvaltype,String apptime,int orgcode); List<KqglAssoRelationSummary> LeaveInvestigation(int userid,int approvaltype,String apptime,int orgcode);
KqglAssoRelationSummary selectTabledata(int userid,int approvaltype,String apptime); KqglAssoRelationSummary selectTabledata(int userid,int approvaltype,String apptime);
KqglAssoRelationSummary leaveinvesti(int userid,int approvaltype,String apptime,int orgcode);
} }
package cn.timer.api.dao.spmk; package cn.timer.api.dao.spmk;
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;
...@@ -22,4 +24,6 @@ public interface SpmkApproveSummaryMapper extends BaseMapper<SpmkApproveSummary> ...@@ -22,4 +24,6 @@ public interface SpmkApproveSummaryMapper extends BaseMapper<SpmkApproveSummary>
IPage<SpmkApproveSummary> selectPageByQueryForEmpNum(IPage<SpmkApproveSummary> page,@Param("param") MySummaryQueryDto mySummaryQueryDto); IPage<SpmkApproveSummary> selectPageByQueryForEmpNum(IPage<SpmkApproveSummary> page,@Param("param") MySummaryQueryDto mySummaryQueryDto);
List<SpmkApproveSummary> selectPageByQueryForEmpNum(@Param("param") MySummaryQueryDto mySummaryQueryDto);
} }
...@@ -26,6 +26,7 @@ public class AttSchedule implements Serializable{ ...@@ -26,6 +26,7 @@ public class AttSchedule implements Serializable{
private Long starttime; private Long starttime;
private Long endtime; private Long endtime;
private int isleave;//是否请假
private int isupdate;//是否跟新打卡 private int isupdate;//是否跟新打卡
private int isdk;//0:当前打卡 1:已过打卡 private int isdk;//0:当前打卡 1:已过打卡
private KqglAssoDkjl dajl; private KqglAssoDkjl dajl;
......
package cn.timer.api.dto.spmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ApprovedQuantityDto {
@ApiModelProperty(value = "我发起的", example = "11")
private Integer istartedit;
@ApiModelProperty(value = "抄送我的", example = "22")
private Integer ccme;
@ApiModelProperty(value = "我审批的", example = "33")
private Integer iapprovedit;
}
...@@ -24,16 +24,16 @@ public class MySummaryQueryDto extends Page{ ...@@ -24,16 +24,16 @@ public class MySummaryQueryDto extends Page{
private Integer empNum; private Integer empNum;
@ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "请假") @ApiModelProperty(value = "关键字 标题/审批人名称/审批总汇id", example = "")
private String query; private String query;
@ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0") @ApiModelProperty(value = "状态 0审批中 1审批撤销 2审批通过/审批完成 3审批拒绝", example = "0")
private Integer sts; private Integer sts;
@ApiModelProperty(value = "开始时间 ", example = "2000-10-10 10:10:10") @ApiModelProperty(value = "开始时间 ", example = "")
private String startTime; private String startTime;
@ApiModelProperty(value = "结束时间 ", example = "2020-10-10 10:10:10") @ApiModelProperty(value = "结束时间 ", example = "")
private String endTime; private String endTime;
@NotNull(message = ValidationMsg.NOTNULL) @NotNull(message = ValidationMsg.NOTNULL)
......
...@@ -68,6 +68,16 @@ ...@@ -68,6 +68,16 @@
and SUBSTR(res.app_time,1,7) = #{apptime} and SUBSTR(res.app_time,1,7) = #{apptime}
GROUP BY res.start_time,res.end_time; GROUP BY res.start_time,res.end_time;
</select> </select>
<select id="leaveinvesti" resultMap="BaseResultMap">
select res.start_time,
res.end_time
from kqgl_asso_relation_summary res
where res.user_id = #{userid}
and res.org_code = #{orgcode}
and res.approval_type = #{approvaltype}
and res.app_time = #{apptime}
GROUP BY res.start_time,res.end_time;
</select>
<select id="selectTabledata" resultMap="BaseResultMap"> <select id="selectTabledata" resultMap="BaseResultMap">
select SUM(res.duration) as duration select SUM(res.duration) as duration
......
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