Commit a1f5fda5 by ilal Committed by chenzg

提交

parent cbf8c6ff
......@@ -717,6 +717,18 @@ public class ClockInTool {
return res;
}
/**
* 时间戳转换时间
*/
public static String stampToDate5(String s){
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("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) {
SimpleDateFormat sdf = new SimpleDateFormat(Format);
......
......@@ -40,6 +40,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqgl.SpecialDate;
import cn.timer.api.bean.kqmk.KqglAssoDkjl;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoRelationSummary;
import cn.timer.api.bean.sbgjj.SbgjjAssoDetailed;
......@@ -71,6 +72,7 @@ import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
import cn.timer.api.dao.kqgl.PunchRecordMapper;
import cn.timer.api.dao.kqgl.ScheduleMapper;
import cn.timer.api.dao.kqgl.SpecialDateMapper;
import cn.timer.api.dao.kqmk.KqglAssoDkjlMapper;
import cn.timer.api.dao.kqmk.KqglAssoMonthPunchSummaryMapper;
import cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper;
import cn.timer.api.dao.sbgjj.SbgjjAssoDetailedMapper;
......@@ -3368,6 +3370,9 @@ public class SalaryManagementController {
@Autowired
private KqglAssoRelationSummaryMapper kqglassorelationsummarymapper;
@Autowired
private KqglAssoDkjlMapper kqglassodkjlmapper;
@PostMapping(value = "/pushpayslip")
@ApiOperation(value = "发送工资条", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> PushPayslip(@CurrentUser UserBean userBean,@RequestBody PushPayslipDto pays) {
......@@ -3502,10 +3507,32 @@ public class SalaryManagementController {
if(xzx.getOptionid() == 30) {
spe.setItemname(xzx.getSalaryitem());//
spe.setDeduction(xzb == null ? 0 : xzb.getXzxjg());//扣款金额
if(xzx.getGsid() == 1) {//次数
HolidayInquiryDto cdcs = kqglassodkjlmapper.TimesBeingLateLeavingEarly(userBean.getOrgCode(), pays.getUserid(), 1, pays.getXzyf().substring(2, 7));
HolidayInquiryDto ztcs = kqglassodkjlmapper.TimesBeingLateLeavingEarly(userBean.getOrgCode(), pays.getUserid(), 2, pays.getXzyf().substring(2, 7));
spe.setFieldone("迟到"+cdcs.getNum()+"次");//迟到
spe.setFieldtwo("早退"+ztcs.getNum()+"次");//早退
}else if(xzx.getGsid() == 2) {//分钟
HolidayInquiryDto cdfz = kqglassodkjlmapper.MinutesLateLeaveEarly(userBean.getOrgCode(), pays.getUserid(), 1, pays.getXzyf().substring(2, 7));
HolidayInquiryDto ztfz = kqglassodkjlmapper.MinutesLateLeaveEarly(userBean.getOrgCode(), pays.getUserid(), 2, pays.getXzyf().substring(2, 7));
spe.setFieldone("迟到"+cdfz.getBalance()+"分钟");//迟到
spe.setFieldtwo("早退"+ztfz.getBalance()+"分钟");//早退
}
List<KqglAssoDkjl> cdzts = kqglassodkjlmapper.LateleaveEarly(userBean.getOrgCode(), pays.getUserid(), pays.getXzyf().substring(2, 7));
for(KqglAssoDkjl cz : cdzts) {
AppPaysSalaryTwoDto two = new AppPaysSalaryTwoDto();
if(cz.getType() == 1) {//上班
two.setTerm("迟到日期");
}else if(cz.getType() == 2) {//下班
two.setTerm("早退日期");
}
two.setSpecifictime(ClockInTool.stampToDate5(String.valueOf(cz.getDktime())));
two.setField(Double.valueOf(String.valueOf(cz.getResults())));
detailed.add(two);
}
spe.setDetailed(detailed);
......
......@@ -7,6 +7,7 @@ import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoDkjl;
import cn.timer.api.dto.xcgl.HolidayInquiryDto;
/**
* 打卡记录表
......@@ -16,4 +17,10 @@ import cn.timer.api.bean.kqmk.KqglAssoDkjl;
@Repository
public interface KqglAssoDkjlMapper extends BaseMapper<KqglAssoDkjl> {
List<KqglAssoDkjl> getDetailedRecordClock(Long start,Long end,Integer userId,String attdate,Integer qyid);
List<KqglAssoDkjl> LateleaveEarly(int qyid,int userid,String attdate);
HolidayInquiryDto MinutesLateLeaveEarly(int qyid,int userid,int mark,String attdate);
HolidayInquiryDto TimesBeingLateLeavingEarly(int qyid,int userid,int mark,String attdate);
}
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