Commit 8df5694e by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!550
parents 2f493572 638fa38d
...@@ -2,6 +2,7 @@ package cn.timer.api.bean.kqgl; ...@@ -2,6 +2,7 @@ package cn.timer.api.bean.kqgl;
import java.io.Serializable; import java.io.Serializable;
import cn.timer.api.dto.kqmk.ResttryfixdayDto;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -27,7 +28,9 @@ public class AttendanceAssistant implements Serializable{ ...@@ -27,7 +28,9 @@ public class AttendanceAssistant implements Serializable{
String[] attWeekdaysShifts;// 周工作日班次【固定排班】 String[] attWeekdaysShifts;// 周工作日班次【固定排班】
String[] attMustPunchData;// 必须打卡的日期【固定排班】 String[] attMustPunchData;// 必须打卡的日期【固定排班】
String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】 String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】
String[] attNonPunchData;// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto[] attNonPunchData;
String[] attShifts;// 排班制 选择的班次【排班制】 String[] attShifts;// 排班制 选择的班次【排班制】
int attRemind;// 是否开启提醒:0-否、1-是【排班制】 int attRemind;// 是否开启提醒:0-否、1-是【排班制】
......
...@@ -22,7 +22,8 @@ public class SpecialDate implements Serializable{ ...@@ -22,7 +22,8 @@ public class SpecialDate implements Serializable{
private Long lusjTime;// 录入时间 private Long lusjTime;// 录入时间
private Integer luryid;// 录入人员 private Integer luryid;// 录入人员
private Integer type;// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段) private Integer type;// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
private Integer legalday;
private String bcname; private String bcname;
private String sbdk1; private String sbdk1;
private String xbdk1; private String xbdk1;
...@@ -30,7 +31,9 @@ public class SpecialDate implements Serializable{ ...@@ -30,7 +31,9 @@ public class SpecialDate implements Serializable{
private String xbdk2; private String xbdk2;
private String sbdk3; private String sbdk3;
private String xbdk3; private String xbdk3;
public Integer getId() { public Integer getId() {
return id; return id;
} }
...@@ -143,4 +146,12 @@ public class SpecialDate implements Serializable{ ...@@ -143,4 +146,12 @@ public class SpecialDate implements Serializable{
this.xbdk3 = xbdk3; this.xbdk3 = xbdk3;
} }
public Integer getLegalday() {
return legalday;
}
public void setLegalday(Integer legalday) {
this.legalday = legalday;
}
} }
\ No newline at end of file
...@@ -54,5 +54,8 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> { ...@@ -54,5 +54,8 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> {
@ApiModelProperty(value = "类型(1:必须打卡日期;2:不用打卡日期(扩展字段)) 类型(1:必须打卡日期;2:不用打卡日期(扩展字段))", example = "101") @ApiModelProperty(value = "类型(1:必须打卡日期;2:不用打卡日期(扩展字段)) 类型(1:必须打卡日期;2:不用打卡日期(扩展字段))", example = "101")
private Integer type; private Integer type;
@ApiModelProperty(value = "是否是法定节假日(0:否;1:是)", example = "0")
private Integer legalday;
} }
\ No newline at end of file
...@@ -51,6 +51,7 @@ import cn.timer.api.bean.qyzx.QyzxAdminMenu; ...@@ -51,6 +51,7 @@ import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth; import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
...@@ -640,6 +641,8 @@ public class LoginController { ...@@ -640,6 +641,8 @@ public class LoginController {
//加班基础设置 //加班基础设置
KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId()).build().insert(); KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId()).build().insert();
//报税周期设置
XcglAssoBszqsz.builder().taxReturnCycle(2).qyid(qyzxEntInfoM.getId()).build().insert();
// 绩效设置初始化 // 绩效设置初始化
JxglBasicSetting bS = jxglService.selectAT(qyId); JxglBasicSetting bS = jxglService.selectAT(qyId);
......
...@@ -162,7 +162,7 @@ public class HtzzController { ...@@ -162,7 +162,7 @@ public class HtzzController {
QueryWrapper<HtzzAdminZzda> queryWrapper = new QueryWrapper<>(); QueryWrapper<HtzzAdminZzda> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", userBean.getOrgCode()) queryWrapper.eq("org_code", userBean.getOrgCode())
.select("id", "zjmc", "czry", "czrdh", "fzrq", "yxdqr", "txkg_type").eq("is_delete", 0).eq("document_type", htzzQueryDto.getDocumentType()) .select("id", "zjmc", "czry", "fzjg", "fzrq", "yxdqr", "txkg_type").eq("is_delete", 0).eq("document_type", htzzQueryDto.getDocumentType())
.gt(!StrUtil.hasBlank(e), "yxdqr", !StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00") .gt(!StrUtil.hasBlank(e), "yxdqr", !StrUtil.hasBlank(e) ? e : "9999-01-01 00:00:00")
.and(!StrUtil.hasBlank(q), wq -> wq.like("zjmc", q).or().like("czry", q)).orderByDesc("lrsj_time"); .and(!StrUtil.hasBlank(q), wq -> wq.like("zjmc", q).or().like("czry", q)).orderByDesc("lrsj_time");
......
...@@ -101,6 +101,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper; ...@@ -101,6 +101,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto; import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.KqglAssoPbmxDto; import cn.timer.api.dto.kqmk.KqglAssoPbmxDto;
import cn.timer.api.dto.kqmk.KqglMainKqzDto; import cn.timer.api.dto.kqmk.KqglMainKqzDto;
import cn.timer.api.dto.kqmk.ResttryfixdayDto;
import cn.timer.api.utils.DateUtil; import cn.timer.api.utils.DateUtil;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -1563,7 +1564,10 @@ public class AttController { ...@@ -1563,7 +1564,10 @@ public class AttController {
List<SpecialDate> speclist=new ArrayList<SpecialDate>(); List<SpecialDate> speclist=new ArrayList<SpecialDate>();
String[] attmuspudata = attass.getAttMustPunchData();// 必须打卡的日期【固定排班】 String[] attmuspudata = attass.getAttMustPunchData();// 必须打卡的日期【固定排班】
String[] attmuspushifid = attass.getAttMustPunchShifid();// 必须打卡的班次id【固定排班】 String[] attmuspushifid = attass.getAttMustPunchShifid();// 必须打卡的班次id【固定排班】
String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】 // String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
if(attmuspudata.length>0 && attmuspushifid.length>0 && attass.getAtttype() == 1){ if(attmuspudata.length>0 && attmuspushifid.length>0 && attass.getAtttype() == 1){
for(int m=0;m<attmuspudata.length;m++){ for(int m=0;m<attmuspudata.length;m++){
SpecialDate mut = new SpecialDate(); SpecialDate mut = new SpecialDate();
...@@ -1581,12 +1585,13 @@ public class AttController { ...@@ -1581,12 +1585,13 @@ public class AttController {
for(int n=0;n<attnonpudata.length;n++){ for(int n=0;n<attnonpudata.length;n++){
SpecialDate non = new SpecialDate(); SpecialDate non = new SpecialDate();
non.setKqzid(attgrpid);//考勤组id non.setKqzid(attgrpid);//考勤组id
non.setTsrq(attnonpudata[n]);//日期 non.setTsrq(attnonpudata[n].getDate());//日期
non.setBcid(0);//班次id non.setBcid(0);//班次id
long date = new Date().getTime(); long date = new Date().getTime();
non.setLusjTime(date);//录入时间 non.setLusjTime(date);//录入时间
non.setLuryid(180658);// 录入人员*********** non.setLuryid(180658);// 录入人员***********
non.setType(2);// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段) non.setType(2);// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
non.setLegalday(attnonpudata[n].getWhether());
speclist.add(non); speclist.add(non);
} }
} }
......
...@@ -396,6 +396,10 @@ public class ClockInTool { ...@@ -396,6 +396,10 @@ public class ClockInTool {
* @return * @return
*/ */
public static String[] doChinFilters(String[] filters, String target) { public static String[] doChinFilters(String[] filters, String target) {
target = ClockInTool.Str_Time_formatting(target,"yyyy-MM-dd");
String[] res = null; String[] res = null;
if (filters.length > 0) { if (filters.length > 0) {
List<String> tempList = Arrays.asList(filters); List<String> tempList = Arrays.asList(filters);
......
...@@ -65,7 +65,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz; ...@@ -65,7 +65,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import cn.timer.api.bean.kqmk.KqglAssoYhsb; import cn.timer.api.bean.kqmk.KqglAssoYhsb;
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.qyxx.CmsContent;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
...@@ -127,6 +126,7 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto; ...@@ -127,6 +126,7 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto;
import cn.timer.api.dto.kqmk.MachinememberDto; import cn.timer.api.dto.kqmk.MachinememberDto;
import cn.timer.api.dto.kqmk.ModifyEmployeeBalanceDto; import cn.timer.api.dto.kqmk.ModifyEmployeeBalanceDto;
import cn.timer.api.dto.kqmk.OriginalRecordDto; import cn.timer.api.dto.kqmk.OriginalRecordDto;
import cn.timer.api.dto.kqmk.ResttryfixdayDto;
import cn.timer.api.dto.kqmk.SetConditionsDto; import cn.timer.api.dto.kqmk.SetConditionsDto;
import cn.timer.api.dto.kqmk.StartTimeRestDto; import cn.timer.api.dto.kqmk.StartTimeRestDto;
import cn.timer.api.dto.kqmk.UserAttendanceRelDto; import cn.timer.api.dto.kqmk.UserAttendanceRelDto;
...@@ -1428,16 +1428,19 @@ public class TimeCardController { ...@@ -1428,16 +1428,19 @@ public class TimeCardController {
List<KqglAssoTeshu> speclist = new ArrayList<KqglAssoTeshu>(); List<KqglAssoTeshu> speclist = new ArrayList<KqglAssoTeshu>();
String[] attmuspudata = attass.getAttMustPunchData();// 必须打卡的日期【固定排班】 String[] attmuspudata = attass.getAttMustPunchData();// 必须打卡的日期【固定排班】
String[] attmuspushifid = attass.getAttMustPunchShifid();// 必须打卡的班次id【固定排班】 String[] attmuspushifid = attass.getAttMustPunchShifid();// 必须打卡的班次id【固定排班】
String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】 // String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
if(attmuspudata.length>0 && attmuspushifid.length>0 && attass.getAtttype() == 1){ if(attmuspudata.length>0 && attmuspushifid.length>0 && attass.getAtttype() == 1){
for(int m=0;m<attmuspudata.length;m++){ for(int m=0;m<attmuspudata.length;m++){
KqglAssoTeshu mut = KqglAssoTeshu.builder().kqzid(attid).tsrq(attmuspudata[m]).bcid(Integer.valueOf(attmuspushifid[m])).lusjTime(new Date().getTime()).luryid(userBean.getEmpNum()).type(1).build(); KqglAssoTeshu mut = KqglAssoTeshu.builder().kqzid(attid).tsrq(attmuspudata[m]).bcid(Integer.valueOf(attmuspushifid[m])).lusjTime(new Date().getTime()).luryid(userBean.getEmpNum()).type(1).build();
speclist.add(mut); speclist.add(mut);
} }
} }
if(attnonpudata.length>0 && attass.getAtttype() == 1){ if(attnonpudata.length>0 && attass.getAtttype() == 1){
for(int n=0;n<attnonpudata.length;n++){ for(int n=0;n<attnonpudata.length;n++){
KqglAssoTeshu non = KqglAssoTeshu.builder().kqzid(attid).tsrq(attnonpudata[n]).bcid(0).lusjTime(new Date().getTime()).luryid(userBean.getEmpNum()).type(2).build(); KqglAssoTeshu non = KqglAssoTeshu.builder().kqzid(attid).tsrq(attnonpudata[n].getDate()).legalday(attnonpudata[n].getWhether()).bcid(0).lusjTime(new Date().getTime()).luryid(userBean.getEmpNum()).type(2).build();
speclist.add(non); speclist.add(non);
} }
} }
...@@ -1445,6 +1448,7 @@ public class TimeCardController { ...@@ -1445,6 +1448,7 @@ public class TimeCardController {
kqglassoteshumapper.insertKqglAssoTeshuList(speclist); kqglassoteshumapper.insertKqglAssoTeshuList(speclist);
} }
//记录排班(排班制) //记录排班(排班制)
List<KqglAssoPbmxDto> schlist=new ArrayList<KqglAssoPbmxDto>(); List<KqglAssoPbmxDto> schlist=new ArrayList<KqglAssoPbmxDto>();
KqglAssoPbmxDto[] schedules = attass.getSchedules();// 排班日期【排班制】--班次id、日期 KqglAssoPbmxDto[] schedules = attass.getSchedules();// 排班日期【排班制】--班次id、日期
......
...@@ -101,7 +101,7 @@ public class AttendanceTaskTiming{ ...@@ -101,7 +101,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组 //typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 6 17 * * ?") // @Scheduled(cron = "0 19 18 * * ?")
@Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行 @Scheduled(cron = "0 0 8,12,16,20 * * ?")//每天上午8、12点,下午16点,20点 执行
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
...@@ -170,6 +170,16 @@ public class AttendanceTaskTiming{ ...@@ -170,6 +170,16 @@ public class AttendanceTaskTiming{
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(user.getEmpnum(),org_code); KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(user.getEmpnum(),org_code);
//目前为止打卡记录 //目前为止打卡记录
List<PunchCardDetails> attendance = punchcarddetailsmapper.selectAttendanceDays(user.getEmpnum(), startDate, endDate); List<PunchCardDetails> attendance = punchcarddetailsmapper.selectAttendanceDays(user.getEmpnum(), startDate, endDate);
int fdjjrnum = 0;
if(attgro != null) {
//特殊日期中 为法定带薪休假的
List<KqglAssoTeshu> fdjjr = KqglAssoTeshu.builder().build().selectList(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId()).eq(KqglAssoTeshu::getLegalday, 1).eq(KqglAssoTeshu::getType, 2));
fdjjrnum = fdjjr.size();
}
int dkjl = 0;//目前为止打卡次数 int dkjl = 0;//目前为止打卡次数
int sbqkcs = 0,xbqkcs = 0,dk=0; int sbqkcs = 0,xbqkcs = 0,dk=0;
String[] sblacks = new String[31];//上班缺卡天数 String[] sblacks = new String[31];//上班缺卡天数
...@@ -177,7 +187,7 @@ public class AttendanceTaskTiming{ ...@@ -177,7 +187,7 @@ public class AttendanceTaskTiming{
String[] dkjtts = new String[attendance.size()];//目前打卡日期明细 String[] dkjtts = new String[attendance.size()];//目前打卡日期明细
int bccs = 0; int bccs = 0;
if(attendance.size() > 0) { if(attendance.size() > 0) {
dkjl = attendance.size(); dkjl = attendance.size() + fdjjrnum;
for(PunchCardDetails pcd:attendance){ for(PunchCardDetails pcd:attendance){
AttendanceCardListDto attdate = MethodCall(org_code, user.getEmpnum(), pcd.getData()); AttendanceCardListDto attdate = MethodCall(org_code, user.getEmpnum(), pcd.getData());
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间 List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
...@@ -320,7 +330,9 @@ public class AttendanceTaskTiming{ ...@@ -320,7 +330,9 @@ public class AttendanceTaskTiming{
} }
if(appmaps.length > 0) { if(appmaps.length > 0) {
for(String aa : ClockInTool.deleteArrayNull(zdxx)) { for(String aa : ClockInTool.deleteArrayNull(zdxx)) {
appmaps = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(appmaps), aa); if(appmaps.length > 0) {
appmaps = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(appmaps), aa);
}
} }
} }
......
...@@ -93,7 +93,7 @@ public class LastMonthtimingExport { ...@@ -93,7 +93,7 @@ public class LastMonthtimingExport {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// @Scheduled(cron = "0 48 16 * * ?") // @Scheduled(cron = "0 31 18 * * ?")
@Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行 @Scheduled(cron = "0 0 4,20 * * ?")//每天上午4点,下午20点 执行
public void LastMonthtimingAttendanceTask() throws ParseException { public void LastMonthtimingAttendanceTask() throws ParseException {
...@@ -160,6 +160,14 @@ public class LastMonthtimingExport { ...@@ -160,6 +160,14 @@ public class LastMonthtimingExport {
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(user.getEmpnum(),org_code); KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(user.getEmpnum(),org_code);
//目前为止打卡记录 //目前为止打卡记录
List<PunchCardDetails> attendance = punchcarddetailsmapper.selectAttendanceDays(user.getEmpnum(), startDate, endDate); List<PunchCardDetails> attendance = punchcarddetailsmapper.selectAttendanceDays(user.getEmpnum(), startDate, endDate);
int fdjjrnum = 0;
if(attgro != null) {
//特殊日期中 为法定带薪休假的
List<KqglAssoTeshu> fdjjr = KqglAssoTeshu.builder().build().selectList(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId()).eq(KqglAssoTeshu::getLegalday, 1).eq(KqglAssoTeshu::getType, 2));
fdjjrnum = fdjjr.size();
}
int dkjl = 0;//目前为止打卡次数 int dkjl = 0;//目前为止打卡次数
int sbqkcs = 0,xbqkcs = 0,dk=0; int sbqkcs = 0,xbqkcs = 0,dk=0;
String[] sblacks = new String[31];//上班缺卡天数 String[] sblacks = new String[31];//上班缺卡天数
...@@ -167,7 +175,7 @@ public class LastMonthtimingExport { ...@@ -167,7 +175,7 @@ public class LastMonthtimingExport {
String[] dkjtts = new String[attendance.size()];//目前打卡日期明细 String[] dkjtts = new String[attendance.size()];//目前打卡日期明细
int bccs = 0; int bccs = 0;
if(attendance.size() > 0) { if(attendance.size() > 0) {
dkjl = attendance.size(); dkjl = attendance.size() + fdjjrnum;
for(PunchCardDetails pcd:attendance){ for(PunchCardDetails pcd:attendance){
AttendanceCardListDto attdate = MethodCall(org_code, user.getEmpnum(), pcd.getData()); AttendanceCardListDto attdate = MethodCall(org_code, user.getEmpnum(), pcd.getData());
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间 List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
...@@ -312,7 +320,9 @@ public class LastMonthtimingExport { ...@@ -312,7 +320,9 @@ public class LastMonthtimingExport {
// System.out.println(zdxx); // System.out.println(zdxx);
if(appmaps.length > 0) { if(appmaps.length > 0) {
for(String aa : ClockInTool.deleteArrayNull(zdxx)) { for(String aa : ClockInTool.deleteArrayNull(zdxx)) {
appmaps = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(appmaps), aa); if(appmaps.length > 0) {
appmaps = ClockInTool.doChinFilters(ClockInTool.deleteArrayNull(appmaps), aa);
}
} }
} }
......
...@@ -7,7 +7,9 @@ import java.text.SimpleDateFormat; ...@@ -7,7 +7,9 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -25,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -25,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.sbgjj.SbgjjAdminCbry; import cn.timer.api.bean.sbgjj.SbgjjAdminCbry;
...@@ -35,7 +39,7 @@ import cn.timer.api.bean.sbgjj.SbgjjAssoDetailed; ...@@ -35,7 +39,7 @@ import cn.timer.api.bean.sbgjj.SbgjjAssoDetailed;
import cn.timer.api.bean.sbgjj.SbgjjAssoYjzd; import cn.timer.api.bean.sbgjj.SbgjjAssoYjzd;
import cn.timer.api.bean.sbgjj.SbgjjTypeDetails; import cn.timer.api.bean.sbgjj.SbgjjTypeDetails;
import cn.timer.api.bean.sbgjj.SbgjjYjCsbh; import cn.timer.api.bean.sbgjj.SbgjjYjCsbh;
import cn.timer.api.bean.xcgl.XcglAssoJsgzzx; import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
...@@ -57,6 +61,9 @@ import cn.timer.api.dto.sbgjj.SearchPlanDto; ...@@ -57,6 +61,9 @@ import cn.timer.api.dto.sbgjj.SearchPlanDto;
import cn.timer.api.dto.sbgjj.SocialSecurityFundDto; import cn.timer.api.dto.sbgjj.SocialSecurityFundDto;
import cn.timer.api.dto.sbgjj.SocialfundDto; import cn.timer.api.dto.sbgjj.SocialfundDto;
import cn.timer.api.dto.sbgjj.StopimmediatelyDto; import cn.timer.api.dto.sbgjj.StopimmediatelyDto;
import cn.timer.api.dto.sbgjj.VerifyInsuredDto;
import cn.timer.api.dto.sbgjj.VerifyInsuredDtoListDto;
import cn.timer.api.dto.xcgl.ImportDescriptionDto;
import cn.timer.api.utils.ResponseResult; import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -1514,6 +1521,65 @@ public class SocialSecurityFundController { ...@@ -1514,6 +1521,65 @@ public class SocialSecurityFundController {
return ResultUtil.data(yjzlist, "成功"); return ResultUtil.data(yjzlist, "成功");
} }
@PostMapping(value = "/verifytheinsured")
@ApiOperation(value = "验证参保人员", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 40)
public Result<Object> Verifytheinsured(@CurrentUser UserBean userBean,@RequestBody VerifyInsuredDtoListDto verinlist) {
int toinsert = 0;//新增
int toupdate = 0;//更新
int failure = 0;//失败
List<Map<String, String>> reasons = Lists.newArrayList();
List<YgglMainEmp> ygs = new ArrayList<YgglMainEmp>();
VerifyInsuredDto[] verin = verinlist.getVerin();
if(verin.length>0){
for(int n=0;n<verin.length;n++){
Map<String, String> map = Maps.newHashMap();
String name = verin[n].getEmpname();
try {
YgglMainEmp yg = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, verin[n].getEmpname()).eq(YgglMainEmp::getPhone, verin[n].getPhone())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if(yg != null) {
YgglMainEmp ygl = YgglMainEmp.builder().build();
ygl.setName(yg.getName());
ygl.setEmpNum(yg.getEmpNum());
ygs.add(ygl);
toinsert++;
}else {
failure++;
map.put("name", name);
map.put("msg", "该员工不存在");
reasons.add(map);
}
} catch (Exception e) {
failure++;
map.put("name", name);
map.put("msg", StringUtils.isBlank(e.getMessage()) ? "必填数据出现空值" : e.getMessage());
reasons.add(map);
}
}
}
ImportDescriptionDto imds = new ImportDescriptionDto();
imds.setSuccess(toinsert + toupdate);//成功
imds.setToinsert(toinsert);
imds.setToupdate(toupdate);//更新
imds.setFailure(failure);//失败
imds.setReasons(reasons);
// return ResultUtil.data(ygs, "成功");
return ResultUtil.datas(ygs, imds, "成功");
}
@Value("${config-8timer.environmental-science}") @Value("${config-8timer.environmental-science}")
public String environmental_science; public String environmental_science;
......
...@@ -1497,6 +1497,153 @@ public class SalaryManagementController { ...@@ -1497,6 +1497,153 @@ public class SalaryManagementController {
return ResultUtil.data(imds,"导入成功"); return ResultUtil.data(imds,"导入成功");
} }
/**
* 导入薪资
* @throws ParseException
*/
@PostMapping(value = "/paysalaryfile")
@ApiOperation(value = "导入薪资", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> paySalaryfile(@CurrentUser UserBean userBean,@Validated @RequestBody ValidList<ImportSalaryfileDto> impor) {
int toinsert = 0;//新增
int toupdate = 0;//更新
int failure = 0;//失败
List<Map<String, String>> reasons = Lists.newArrayList();
for(ImportSalaryfileDto file : impor) {
String name = file.getEmpname();
Map<String, String> map = Maps.newHashMap();
try {
YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, file.getEmpname()).eq(YgglMainEmp::getPhone, file.getPhone())
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()));
if(emp != null) {
if(ClockInTool.Str_Time_formatting(file.getSxrq().replace("/", "-"),"yyyy-MM-dd").length() == 10) {
//0:定薪 1:调薪
if(file.getSfdx() == 0) {
XcglAssoXzdadx xzdadx = XcglAssoXzdadx.builder().build();
xzdadx.setUserid(emp.getEmpNum());//用户id
xzdadx.setSxrq(file.getSxrq().replace("/", "-"));//生效日期
xzdadx.setAddtime(new Date().getTime());
xzdadx.setRemarks("");
xzdadx.setQyid(userBean.getOrgCode());
xzdadx.setTxzt(0);//0:使用中;1:历史, 2: 未生效
xcglassoxzdadxmapper.xzdadxinsert(xzdadx);
int zdyid = xzdadx.getId();
List<XcglAssoXzdaz> xzdazlist=new ArrayList<XcglAssoXzdaz>();
CustomDto[] cus = file.getCus();
List<XcglAssoXzdazdy> xzs = XcglAssoXzdazdy.builder().build().selectList(new QueryWrapper<XcglAssoXzdazdy>().lambda().eq(XcglAssoXzdazdy::getQyid, userBean.getOrgCode()));
for(XcglAssoXzdazdy xz : xzs) {
XcglAssoXzdaz xzdaz = XcglAssoXzdaz.builder().build();
xzdaz.setXzdazdyid(xz.getId());//薪资档案自定义id
xzdaz.setRsz("0");//输入值
xzdaz.setXzdadxid(zdyid);//薪资档案-定薪id
xzdaz.insert();
}
if(cus.length>0){
for(int p=0;p<cus.length;p++){
XcglAssoXzdaz.builder().build().delete(new QueryWrapper<XcglAssoXzdaz>().lambda().eq(XcglAssoXzdaz::getXzdazdyid, cus[p].getId()).eq(XcglAssoXzdaz::getXzdadxid, zdyid));
XcglAssoXzdaz xzdaz = new XcglAssoXzdaz();
xzdaz.setXzdazdyid(cus[p].getId());//薪资档案自定义id
xzdaz.setRsz(cus[p].getVal());//输入值
xzdaz.setXzdadxid(zdyid);//薪资档案-定薪id
xzdazlist.add(xzdaz);
}
}
if(xzdazlist.size()>0){
xcglassoxzdazmapper.insertxcglassoxzdazList(xzdazlist);
}
toinsert++;
}else {
// 当前日期
String curDate = DateUtil.getStringFormat(new Date().getTime());
// 未生效的调薪记录同一天只能有一条
XcglAssoXzdadx tmp = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper)
.eq(XcglAssoXzdadx::getUserid, emp.getEmpNum())
.eq(XcglAssoXzdadx::getTxzt, 2)
.eq(XcglAssoXzdadx::getSxrq, file.getSxrq())
.one();
if (!Objects.isNull(tmp)) {
return ResultUtil.error("调薪成功失败, 已存在生效日期" + file.getSxrq() + "的待生效记录, 请到调薪记录页面查看!");
}
int txzt = 2;
if (DateUtil.getFormat(file.getSxrq()) <= DateUtil.getFormat(curDate)) {
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx xzds = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper)
.eq(XcglAssoXzdadx::getUserid, emp.getEmpNum())
.eq(XcglAssoXzdadx::getTxzt, 0)
.one();
if(xzds != null) {
XcglAssoXzdadx txrz = XcglAssoXzdadx.builder().build();
txrz.setTxzt(1);//0:使用中;1:历史, 2: 未生效
txrz.setId(xzds.getId());
txrz.updateById();
}
txzt = 0;
}
XcglAssoXzdadx xzdadx = XcglAssoXzdadx.builder().build();
xzdadx.setUserid(emp.getEmpNum());//用户id
xzdadx.setSxrq(file.getSxrq());//生效日期
xzdadx.setAddtime(new Date().getTime());
xzdadx.setXgyhid(userBean.getEmpNum());//修改用户id
xzdadx.setRemarks("");
xzdadx.setQyid(userBean.getOrgCode());
xzdadx.setTxzt(txzt);
xcglassoxzdadxmapper.xzdadxinsert(xzdadx);
int zdyid = xzdadx.getId();
List<XcglAssoXzdaz> xzdazlist=new ArrayList<XcglAssoXzdaz>();
CustomDto[] cus = file.getCus();
if(cus.length>0){
for(int p=0;p<cus.length;p++){
XcglAssoXzdaz xzdaz = new XcglAssoXzdaz();
xzdaz.setXzdazdyid(cus[p].getId());//薪资档案自定义id
xzdaz.setRsz(cus[p].getVal());//输入值
xzdaz.setXzdadxid(zdyid);//薪资档案-定薪id
xzdazlist.add(xzdaz);
}
}
if(xzdazlist.size()>0){
xcglassoxzdazmapper.insertxcglassoxzdazList(xzdazlist);
}
toinsert++;
}
}else {
failure++;
map.put("name", name);
map.put("msg", "日期格式不对(Excel中输入时间处设置为“短日期”即可)");
reasons.add(map);
}
}else {
failure++;
map.put("name", name);
map.put("msg", "该员工不存在");
reasons.add(map);
}
}catch (Exception e) {
failure++;
map.put("name", name);
map.put("msg", StringUtils.isBlank(e.getMessage()) ? "必填数据出现空值" : e.getMessage());
reasons.add(map);
}
}
ImportDescriptionDto imds = new ImportDescriptionDto();
imds.setSuccess(toinsert + toupdate);//成功
imds.setToinsert(toinsert);
imds.setToupdate(toupdate);//更新
imds.setFailure(failure);//失败
imds.setReasons(reasons);
return ResultUtil.data(imds,"成功");
}
@PostMapping(value = "/determinesalaryrules") @PostMapping(value = "/determinesalaryrules")
@ApiOperation(value = "是否确定薪资规则", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "是否确定薪资规则", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> DetermineSalaryRules(@CurrentUser UserBean userBean,@RequestBody SalaryRulesDto salaryrulesdto) { public Result<Object> DetermineSalaryRules(@CurrentUser UserBean userBean,@RequestBody SalaryRulesDto salaryrulesdto) {
...@@ -3334,9 +3481,10 @@ public class SalaryManagementController { ...@@ -3334,9 +3481,10 @@ public class SalaryManagementController {
XcglAssoBszqsz bssz = XcglAssoBszqsz.builder().build().selectOne(new QueryWrapper<XcglAssoBszqsz>().lambda().eq(XcglAssoBszqsz::getQyid, orgCode)); XcglAssoBszqsz bssz = XcglAssoBszqsz.builder().build().selectOne(new QueryWrapper<XcglAssoBszqsz>().lambda().eq(XcglAssoBszqsz::getQyid, orgCode));
String taxmonth = ""; String taxmonth = "";
if(bssz.getTaxReturnCycle().equals(1)) { if(bssz.getTaxReturnCycle().equals(1)) {
taxmonth = indv.getTaxMonth(); // taxmonth = indv.getTaxMonth();
taxmonth = indv.getSalaryMonth();
}else{ }else{
taxmonth = SalaryTool.getfirstnextMo(indv.getTaxMonth()+"-01 00:00:00"); taxmonth = SalaryTool.getfirstnextMo(indv.getSalaryMonth()+"-01 00:00:00");
} }
YgglMainEmp ygl = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, userName) YgglMainEmp ygl = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getName, userName)
.eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode)); .eq(YgglMainEmp::getPhone, phone).eq(YgglMainEmp::getOrgCode, orgCode));
......
...@@ -25,7 +25,12 @@ import javax.transaction.Transactional; ...@@ -25,7 +25,12 @@ import javax.transaction.Transactional;
import cn.timer.api.utils.redis.RedisUtil; import cn.timer.api.utils.redis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -34,6 +39,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -34,6 +39,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -63,9 +69,13 @@ import cn.hutool.poi.excel.ExcelUtil; ...@@ -63,9 +69,13 @@ import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.ExcelWriter;
import cn.timer.api.bean.clazz.CommonArea; import cn.timer.api.bean.clazz.CommonArea;
import cn.timer.api.bean.clazz.SysRegion; import cn.timer.api.bean.clazz.SysRegion;
import cn.timer.api.bean.kqgl.UserEquiRelation;
import cn.timer.api.bean.kqmk.KqglAssoKqj;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance; import cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules; import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoYhkqz; import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import cn.timer.api.bean.kqmk.KqglAssoYhsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin; import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.yggl.YgglAttaClfjb; import cn.timer.api.bean.yggl.YgglAttaClfjb;
...@@ -95,6 +105,8 @@ import cn.timer.api.controller.kqgl.ClockInTool; ...@@ -95,6 +105,8 @@ import cn.timer.api.controller.kqgl.ClockInTool;
import cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate; import cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService; import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.clazz.CommonAreaMapper; import cn.timer.api.dao.clazz.CommonAreaMapper;
import cn.timer.api.dao.kqgl.UserEquiRelationMapper;
import cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper; import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
...@@ -235,6 +247,14 @@ public class YgglController { ...@@ -235,6 +247,14 @@ public class YgglController {
@Autowired @Autowired
private RealTimeUpdate realtimeupdate; private RealTimeUpdate realtimeupdate;
@Autowired
private KqglAssoKqzdkfsMapper kqglassokqzdkfsmapper;
@Value("${config-8timer.machine8timerUrl}")
public String mac_command; // 回调地址
@Autowired
private UserEquiRelationMapper userequirelationmapper;
/** /**
* 添加员工档案 * 添加员工档案
* *
...@@ -312,6 +332,40 @@ public class YgglController { ...@@ -312,6 +332,40 @@ public class YgglController {
if(addygdaDto.getAttgroupid() != null) { if(addygdaDto.getAttgroupid() != null) {
KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert(); KqglAssoYhkqz.builder().kqzid(attgroupid).userid(login.getId()).qyid(userBean.getOrgCode()).build().insert();
List<KqglAssoKqzdkfs> kqjs = kqglassokqzdkfsmapper.selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, addygdaDto.getAttgroupid()).eq(KqglAssoKqzdkfs::getType, 1));
for(KqglAssoKqzdkfs abp:kqjs) {
KqglAssoKqj kqj = KqglAssoKqj.builder().id(abp.getDkfsid()).build().selectById();
KqglAssoYhsb kqjry = KqglAssoYhsb.builder().build().selectOne(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
if(kqjry == null) {
// YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId()));
String url = mac_command+"/addUserName";
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("devId", kqj.getCode());
params.add("userId", login.getId());
params.add("userName", ygglMainEmp.getName());
RestTemplate restTemplate = new RestTemplate();
HttpEntity httpEntity = new HttpEntity(params, headers);
ResponseEntity<String> request = restTemplate.postForEntity(url, httpEntity, String.class);
KqglAssoYhsb.builder().build().delete(new QueryWrapper<KqglAssoYhsb>().lambda().eq(KqglAssoYhsb::getUserId, login.getId()).eq(KqglAssoYhsb::getKqjid, kqj.getId()));
KqglAssoYhsb uskqj = KqglAssoYhsb.builder().userId(login.getId()).kqjid(kqj.getId()).type(1).build();
UserEquiRelation isgly = userequirelationmapper.selectByuserId(login.getId());
if(isgly != null) {
uskqj.setIsGly(isgly.getIsGly());
}else {
uskqj.setIsGly(0);
}
if (!uskqj.insert())
return ResultUtil.error("操作失败--新增用户与设备关系");
}
}
} }
if(syq == 0) { if(syq == 0) {
...@@ -483,10 +537,14 @@ public class YgglController { ...@@ -483,10 +537,14 @@ public class YgglController {
List<YgglMainEmp> listYmp = new ArrayList<YgglMainEmp>(); List<YgglMainEmp> listYmp = new ArrayList<YgglMainEmp>();
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合和证件号码
// List<AddygdaDto> list = listAddygdaDto.stream()
// .filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum()))
// .collect(Collectors.toList());
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合 // 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合
List<AddygdaDto> list = listAddygdaDto.stream() List<AddygdaDto> list = listAddygdaDto.stream()
.filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum())) .filter(o -> o != null && !listPhone.contains(o.getPhone())).collect(Collectors.toList());
.collect(Collectors.toList());
// 过滤出 导入数据中, listPhone已存在 的 phone 的对象集合 // 过滤出 导入数据中, listPhone已存在 的 phone 的对象集合
List<AddygdaDto> phoneRepetitions = listAddygdaDto.stream() List<AddygdaDto> phoneRepetitions = listAddygdaDto.stream()
......
...@@ -29,7 +29,9 @@ public class AttendanceAssistantDto implements Serializable{ ...@@ -29,7 +29,9 @@ public class AttendanceAssistantDto implements Serializable{
String[] attWeekdaysShifts;// 周工作日班次【固定排班】 String[] attWeekdaysShifts;// 周工作日班次【固定排班】
String[] attMustPunchData;// 必须打卡的日期【固定排班】 String[] attMustPunchData;// 必须打卡的日期【固定排班】
String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】 String[] attMustPunchShifid;// 必须打卡的班次id【固定排班】
String[] attNonPunchData;// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto[] attNonPunchData;
String[] attShifts;// 排班制 选择的班次【排班制】 String[] attShifts;// 排班制 选择的班次【排班制】
int attRemind;// 是否开启提醒:0-否、1-是【排班制】 int attRemind;// 是否开启提醒:0-否、1-是【排班制】
......
package cn.timer.api.dto.kqmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResttryfixdayDto {
private String date;//日期
private Integer whether;//是否法定节假日
}
package cn.timer.api.dto.sbgjj;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class VerifyInsuredDto {
private String empname;
private String phone;
}
package cn.timer.api.dto.sbgjj;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class VerifyInsuredDtoListDto {
VerifyInsuredDto[] verin;
}
...@@ -31,5 +31,8 @@ public class FixedSalaryStaffDto implements Serializable { ...@@ -31,5 +31,8 @@ public class FixedSalaryStaffDto implements Serializable {
int id; int id;
String remarks; //备注 String remarks; //备注
String phone; //
String sxrq; //
List<DefinedItemsDto> defdto = new ArrayList<DefinedItemsDto>(); List<DefinedItemsDto> defdto = new ArrayList<DefinedItemsDto>();
} }
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ImportSalaryfileDto {
String empname;// 用户姓名
String phone;// 电话号码
String sxrq;// 生效日期
Integer sfdx;//0:定薪 1:调薪
CustomDto[] cus;// 自定义输入值
}
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<result column="lusj_time" property="lusjTime" jdbcType="BIGINT" /> <result column="lusj_time" property="lusjTime" jdbcType="BIGINT" />
<result column="luryid" property="luryid" jdbcType="INTEGER" /> <result column="luryid" property="luryid" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="INTEGER" /> <result column="type" property="type" jdbcType="INTEGER" />
<result column="legalday" property="legalday" jdbcType="INTEGER" />
<result column="bcname" property="bcname" jdbcType="VARCHAR" /> <result column="bcname" property="bcname" jdbcType="VARCHAR" />
<result column="sbdk1" property="sbdk1" jdbcType="VARCHAR" /> <result column="sbdk1" property="sbdk1" jdbcType="VARCHAR" />
...@@ -124,7 +125,7 @@ ...@@ -124,7 +125,7 @@
</update> </update>
<insert id="insertKqglAssoTeshuList" parameterType="java.util.List" > <insert id="insertKqglAssoTeshuList" parameterType="java.util.List" >
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type) insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type,legalday)
<foreach collection="list" item="item" index="index" open="values " close="" separator=","> <foreach collection="list" item="item" index="index" open="values " close="" separator=",">
( (
<if test="item.kqzid != null" > <if test="item.kqzid != null" >
...@@ -143,7 +144,10 @@ ...@@ -143,7 +144,10 @@
#{item.luryid,jdbcType=INTEGER}, #{item.luryid,jdbcType=INTEGER},
</if> </if>
<if test="item.type != null" > <if test="item.type != null" >
#{item.type,jdbcType=INTEGER} #{item.type,jdbcType=INTEGER},
</if>
<if test="item.legalday != null" >
#{item.legalday,jdbcType=INTEGER}
</if> </if>
) )
</foreach> </foreach>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<result column="lusj_time" property="lusjTime" /> <result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" /> <result column="luryid" property="luryid" />
<result column="type" property="type" /> <result column="type" property="type" />
<result column="legalday" property="legalday" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
</sql> </sql>
<insert id="insertKqglAssoTeshuList" parameterType="java.util.List" > <insert id="insertKqglAssoTeshuList" parameterType="java.util.List" >
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type) insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type,legalday)
<foreach collection="list" item="item" index="index" open="values " close="" separator=","> <foreach collection="list" item="item" index="index" open="values " close="" separator=",">
( (
<if test="item.kqzid != null" > <if test="item.kqzid != null" >
...@@ -53,7 +54,10 @@ ...@@ -53,7 +54,10 @@
#{item.luryid,jdbcType=INTEGER}, #{item.luryid,jdbcType=INTEGER},
</if> </if>
<if test="item.type != null" > <if test="item.type != null" >
#{item.type,jdbcType=INTEGER} #{item.type,jdbcType=INTEGER},
</if>
<if test="item.legalday != null" >
#{item.legalday,jdbcType=INTEGER}
</if> </if>
) )
</foreach> </foreach>
...@@ -65,6 +69,7 @@ ...@@ -65,6 +69,7 @@
where teshu.kqzid = #{kqzid} where teshu.kqzid = #{kqzid}
and SUBSTR(teshu.tsrq,1,7) = #{tsrq} and SUBSTR(teshu.tsrq,1,7) = #{tsrq}
and teshu.type = #{type} and teshu.type = #{type}
and teshu.legalday = 0
</select> </select>
<!-- <!--
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
<result column="tratime" property="tratime" /> <result column="tratime" property="tratime" />
<result column="txzt" property="txzt" /> <result column="txzt" property="txzt" />
<result column="remarks" property="remarks" /> <result column="remarks" property="remarks" />
<result column="phone" property="phone" />
<result column="sxrq" property="sxrq" />
<collection property="defdto" ofType="cn.timer.api.dto.xcgl.DefinedItemsDto"> <collection property="defdto" ofType="cn.timer.api.dto.xcgl.DefinedItemsDto">
...@@ -202,6 +205,8 @@ ...@@ -202,6 +205,8 @@
when 1 then '正式' when 1 then '正式'
when 2 then '离职中' when 2 then '离职中'
else '已离职' end as empjobstatus, else '已离职' end as empjobstatus,
emp.phone,
(select xsz.sxrq from xcgl_asso_xzdadx xsz where xsz.txzt = 0 and xsz.userid = emp.emp_num) as sxrq,
SUBSTR(emp.rz_time,1,10) emprztime , SUBSTR(emp.rz_time,1,10) emprztime ,
SUBSTR(emp.zz_time,1,10) empzztime, SUBSTR(emp.zz_time,1,10) empzztime,
IF(dadx.userid IS NOT NULL,1,0) as sfdx, IF(dadx.userid IS NOT NULL,1,0) as sfdx,
......
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