Commit 9e0d35c2 by ilal Committed by chenzg

提交

parent fe3807a9
...@@ -99,7 +99,7 @@ public class AttendanceTaskTiming{ ...@@ -99,7 +99,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 39 10 * * ?") // @Scheduled(cron = "0 39 10 * * ?")
@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 {
boolean implement = true; boolean implement = true;
...@@ -622,7 +622,7 @@ public class AttendanceTaskTiming{ ...@@ -622,7 +622,7 @@ public class AttendanceTaskTiming{
/******/ /******/
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2).eq(KqglAssoRelationSummary::getOrgCode, org_code));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
String company = "未知";//请假单位 String company = "未知";//请假单位
if(lea != null) { if(lea != null) {
...@@ -638,17 +638,17 @@ public class AttendanceTaskTiming{ ...@@ -638,17 +638,17 @@ public class AttendanceTaskTiming{
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company; qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3).eq(KqglAssoRelationSummary::getOrgCode, org_code));
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天"; chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4).eq(KqglAssoRelationSummary::getOrgCode, org_code));
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天"; waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5).eq(KqglAssoRelationSummary::getOrgCode, org_code));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16); buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
} }
...@@ -656,7 +656,7 @@ public class AttendanceTaskTiming{ ...@@ -656,7 +656,7 @@ public class AttendanceTaskTiming{
String company = "未知",method = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1).eq(KqglAssoRelationSummary::getOrgCode, org_code));
for(KqglAssoRelationSummary lea : leas) { for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班 //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......
...@@ -91,7 +91,7 @@ public class LastMonthtimingExport { ...@@ -91,7 +91,7 @@ public class LastMonthtimingExport {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
// @Scheduled(cron = "0 5 11 * * ?") // @Scheduled(cron = "0 5 11 * * ?")
@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 {
//获取前月的最后一天 //获取前月的最后一天
...@@ -602,7 +602,7 @@ public class LastMonthtimingExport { ...@@ -602,7 +602,7 @@ public class LastMonthtimingExport {
/******/ /******/
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2).eq(KqglAssoRelationSummary::getOrgCode, org_code));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
String company = "未知";//请假单位 String company = "未知";//请假单位
if(lea != null) { if(lea != null) {
...@@ -620,7 +620,7 @@ public class LastMonthtimingExport { ...@@ -620,7 +620,7 @@ public class LastMonthtimingExport {
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company); // rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company);
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3).eq(KqglAssoRelationSummary::getOrgCode, org_code));
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天"; chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
...@@ -628,7 +628,7 @@ public class LastMonthtimingExport { ...@@ -628,7 +628,7 @@ public class LastMonthtimingExport {
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天"); // rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天");
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4).eq(KqglAssoRelationSummary::getOrgCode, org_code));
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天"; waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
...@@ -636,7 +636,7 @@ public class LastMonthtimingExport { ...@@ -636,7 +636,7 @@ public class LastMonthtimingExport {
// rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天"); // rowData.add(u,(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天");
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5).eq(KqglAssoRelationSummary::getOrgCode, org_code));
// rowData.remove(u); // rowData.remove(u);
// rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16)); // rowData.add(u,"已补卡:"+(lea.getStartTime()).substring(5, 16));
...@@ -646,7 +646,7 @@ public class LastMonthtimingExport { ...@@ -646,7 +646,7 @@ public class LastMonthtimingExport {
String company = "未知",method = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1).eq(KqglAssoRelationSummary::getOrgCode, org_code));
for(KqglAssoRelationSummary lea : leas) { for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班 //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......
...@@ -596,7 +596,7 @@ public class RealTimeUpdate{ ...@@ -596,7 +596,7 @@ public class RealTimeUpdate{
/******/ /******/
if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(leaves),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 2).eq(KqglAssoRelationSummary::getOrgCode, org_code));
String leavetype = "未知";//请假类型 String leavetype = "未知";//请假类型
String company = "未知";//请假单位 String company = "未知";//请假单位
if(lea != null) { if(lea != null) {
...@@ -612,17 +612,17 @@ public class RealTimeUpdate{ ...@@ -612,17 +612,17 @@ public class RealTimeUpdate{
qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company; qinjia = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"请"+leavetype+lea.getDuration()+company;
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(travels),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 3).eq(KqglAssoRelationSummary::getOrgCode, org_code));
chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天"; chuaca = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"出差"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(goouts),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 4).eq(KqglAssoRelationSummary::getOrgCode, org_code));
waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天"; waichu = "#"+(lea.getStartTime()).substring(5, 16) +"到"+ (lea.getEndTime()).substring(5, 16)+"外出"+lea.getDuration()+"天";
} }
if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) { if(ClockInTool.contains(ClockInTool.deleteArrayNull(cards),num)) {
KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5)); KqglAssoRelationSummary lea = KqglAssoRelationSummary.builder().build().selectOne(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 5).eq(KqglAssoRelationSummary::getOrgCode, org_code));
buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16); buka = "#"+"已补卡:"+(lea.getStartTime()).substring(5, 16);
} }
...@@ -630,7 +630,7 @@ public class RealTimeUpdate{ ...@@ -630,7 +630,7 @@ public class RealTimeUpdate{
String company = "未知",method = "无";//加班单位、加班补偿方式 String company = "未知",method = "无";//加班单位、加班补偿方式
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1).eq(KqglAssoRelationSummary::getOrgCode, org_code));
for(KqglAssoRelationSummary lea : leas) { for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班 //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
......
...@@ -36,7 +36,10 @@ import cn.timer.api.bean.kqgl.PunchCardDetails; ...@@ -36,7 +36,10 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import cn.timer.api.bean.kqgl.PunchRecord; import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqgl.Schedule; import cn.timer.api.bean.kqgl.Schedule;
import cn.timer.api.bean.kqgl.SpecialDate; import cn.timer.api.bean.kqgl.SpecialDate;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.sbgjj.SbgjjAssoYjzd;
import cn.timer.api.bean.xcgl.XcglAdminXzz; import cn.timer.api.bean.xcgl.XcglAdminXzz;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.xcgl.XcglAssoGsjsmx; import cn.timer.api.bean.xcgl.XcglAssoGsjsmx;
import cn.timer.api.bean.xcgl.XcglAssoGztsz; import cn.timer.api.bean.xcgl.XcglAssoGztsz;
import cn.timer.api.bean.xcgl.XcglAssoGztzt; import cn.timer.api.bean.xcgl.XcglAssoGztzt;
...@@ -61,6 +64,8 @@ import cn.timer.api.dao.kqgl.PunchCardDetailsMapper; ...@@ -61,6 +64,8 @@ import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
import cn.timer.api.dao.kqgl.PunchRecordMapper; import cn.timer.api.dao.kqgl.PunchRecordMapper;
import cn.timer.api.dao.kqgl.ScheduleMapper; import cn.timer.api.dao.kqgl.ScheduleMapper;
import cn.timer.api.dao.kqgl.SpecialDateMapper; import cn.timer.api.dao.kqgl.SpecialDateMapper;
import cn.timer.api.dao.kqmk.KqglAssoMonthPunchSummaryMapper;
import cn.timer.api.dao.sbgjj.SbgjjAssoYjzdMapper;
import cn.timer.api.dao.xcgl.XcglAdminXzzMapper; import cn.timer.api.dao.xcgl.XcglAdminXzzMapper;
import cn.timer.api.dao.xcgl.XcglAssoGsjsmxMapper; import cn.timer.api.dao.xcgl.XcglAssoGsjsmxMapper;
import cn.timer.api.dao.xcgl.XcglAssoGztszMapper; import cn.timer.api.dao.xcgl.XcglAssoGztszMapper;
...@@ -77,8 +82,10 @@ import cn.timer.api.dao.xcgl.XcglAssoXzuryMapper; ...@@ -77,8 +82,10 @@ import cn.timer.api.dao.xcgl.XcglAssoXzuryMapper;
import cn.timer.api.dao.xcgl.XcglAssoZxfjkcMapper; import cn.timer.api.dao.xcgl.XcglAssoZxfjkcMapper;
import cn.timer.api.dao.xcgl.XcglSalaryItemMapper; import cn.timer.api.dao.xcgl.XcglSalaryItemMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper; import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dto.kqmk.CalculatingCompensationDto;
import cn.timer.api.dto.sbgjj.InspersonnelDto; import cn.timer.api.dto.sbgjj.InspersonnelDto;
import cn.timer.api.dto.xcgl.AdditionalDeductionDto; import cn.timer.api.dto.xcgl.AdditionalDeductionDto;
import cn.timer.api.dto.xcgl.BuildPayGroupDto;
import cn.timer.api.dto.xcgl.CalculatedFieldDto; import cn.timer.api.dto.xcgl.CalculatedFieldDto;
import cn.timer.api.dto.xcgl.CalculationDto; import cn.timer.api.dto.xcgl.CalculationDto;
import cn.timer.api.dto.xcgl.CalculationOptionsDto; import cn.timer.api.dto.xcgl.CalculationOptionsDto;
...@@ -109,7 +116,6 @@ import cn.timer.api.dto.xcgl.SalaryItemRulesDto; ...@@ -109,7 +116,6 @@ import cn.timer.api.dto.xcgl.SalaryItemRulesDto;
import cn.timer.api.dto.xcgl.SalaryPersonFieldDto; import cn.timer.api.dto.xcgl.SalaryPersonFieldDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto; import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
import cn.timer.api.dto.xcgl.SpecialDeductionDto; import cn.timer.api.dto.xcgl.SpecialDeductionDto;
import cn.timer.api.dto.xcgl.SwitchSalaryDateDto;
import cn.timer.api.dto.xcgl.TjSalaryItemDot; import cn.timer.api.dto.xcgl.TjSalaryItemDot;
import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto; import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto;
import cn.timer.api.dto.xcgl.XcglAssoOptionDto; import cn.timer.api.dto.xcgl.XcglAssoOptionDto;
...@@ -235,23 +241,40 @@ public class SalaryManagementController { ...@@ -235,23 +241,40 @@ public class SalaryManagementController {
/** /**
* 添加薪资组(选择配薪方式:0-空白模板 df-默认模板) * 添加薪资组(选择配薪方式:0-空白模板 df-默认模板)*********
*/ */
@PostMapping(value = "/paygro") @PostMapping(value = "/paygro")
@ApiOperation(value = "添加薪资组", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加薪资组", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult PayrollGroup(@CurrentUser UserBean userBean, @RequestBody PayrollGroupDto paygro) { public ResponseResult PayrollGroup(@CurrentUser UserBean userBean, @RequestBody PayrollGroupDto paygro) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
// Calendar lastm = Calendar.getInstance();
// lastm.setTime(new Date()); // 设置为当前时间
// lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
// String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
//
// Calendar thism = Calendar.getInstance();
// lastm.set(Calendar.MONTH, thism.get(Calendar.MONTH) + 1);
// String thismonth = new SimpleDateFormat("yyyy-MM").format(thism.getTime());// 本
//
// Calendar calendar = Calendar.getInstance();
// calendar.add(Calendar.MONTH, 1);
// String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下
Calendar lastm = Calendar.getInstance(); Calendar lastm = Calendar.getInstance();
lastm.setTime(new Date()); // 设置为当前时间 lastm.setTime(SalaryTool.strToDateLong(paygro.getXzyf() + "-01 00:00:00")); // 设置为当前时间
lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1); lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上 String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
Calendar thism = Calendar.getInstance();
lastm.set(Calendar.MONTH, thism.get(Calendar.MONTH) + 1); String thismonth = paygro.getXzyf();// 本
String thismonth = new SimpleDateFormat("yyyy-MM").format(thism.getTime());// 本
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.MONTH, 1); calendar.setTime(SalaryTool.strToDateLong(paygro.getXzyf() + "-01 00:00:00")); // 设置为当前时间
calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) + 1);
String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下 String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下
XcglAdminXzz xcglxzz = XcglAdminXzz.builder().build(); XcglAdminXzz xcglxzz = XcglAdminXzz.builder().build();
xcglxzz.setName(paygro.getName());// 薪资组命名 xcglxzz.setName(paygro.getName());// 薪资组命名
xcglxzz.setPayperiod(paygro.getPayperiod());// 算薪月周期 0:上月;1:当月 xcglxzz.setPayperiod(paygro.getPayperiod());// 算薪月周期 0:上月;1:当月
...@@ -260,7 +283,7 @@ public class SalaryManagementController { ...@@ -260,7 +283,7 @@ public class SalaryManagementController {
String payrollcycle = null; String payrollcycle = null;
if (paygro.getPayperiod() == 0) {// 上月 if (paygro.getPayperiod() == 0) {// 上月
if (paygro.getPaydayperiod() == 1) { if (paygro.getPaydayperiod() == 1) {
payrollcycle = getfirstlast() + "到" + getlastlast(); payrollcycle = SalaryTool.getfirstlastTwo(paygro.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastlastTwo(paygro.getXzyf() + "-01 00:00:00");
} else { } else {
String firstnext = lastmonth + "-" + payper; String firstnext = lastmonth + "-" + payper;
int jgs = paygro.getPaydayperiod() - 1; int jgs = paygro.getPaydayperiod() - 1;
...@@ -269,7 +292,7 @@ public class SalaryManagementController { ...@@ -269,7 +292,7 @@ public class SalaryManagementController {
} }
} else {// 当月 } else {// 当月
if (paygro.getPaydayperiod() == 1) { if (paygro.getPaydayperiod() == 1) {
payrollcycle = getfirstnow() + "到" + getlastnow(); payrollcycle = SalaryTool.getfirstnowTwo(paygro.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastnowTwo(paygro.getXzyf() + "-01 00:00:00");
} else { } else {
String firstnow = thismonth + "-" + payper; String firstnow = thismonth + "-" + payper;
int jgs = paygro.getPaydayperiod() - 1; int jgs = paygro.getPaydayperiod() - 1;
...@@ -380,7 +403,7 @@ public class SalaryManagementController { ...@@ -380,7 +403,7 @@ public class SalaryManagementController {
xcglassojsgzzxmapper.insertxcglassojsgzzxList(gzzxlist); xcglassojsgzzxmapper.insertxcglassojsgzzxList(gzzxlist);
} }
}else if(("考勤").equals(grouping[g])) { }else if(("考勤").equals(grouping[g])) {
String[] att = {"病假","事假","入离职缺勤天数","入离职缺勤扣款","病假扣款","事假扣款","实出勤天数"}; String[] att = {"应出勤天数","实出勤天数","事假","病假","事假扣款","病假扣款"};
List<XcglAssoJsgzzx> gzzxlist=new ArrayList<XcglAssoJsgzzx>(); List<XcglAssoJsgzzx> gzzxlist=new ArrayList<XcglAssoJsgzzx>();
for(int a=0;a<att.length;a++) { for(int a=0;a<att.length;a++) {
XcglAssoXcjsgz xzxj = xcglassoxcjsgzmapper.QuerySalaryRules(att[a]); XcglAssoXcjsgz xzxj = xcglassoxcjsgzmapper.QuerySalaryRules(att[a]);
...@@ -394,7 +417,7 @@ public class SalaryManagementController { ...@@ -394,7 +417,7 @@ public class SalaryManagementController {
zzx.setRulestate(2);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] zzx.setRulestate(2);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
}else { }else {
String xxs = "自动提取数据"; String xxs = "自动提取数据";
String[] strxz = {"从考勤报表-"}; String[] strxz = {"从月度汇总-"};
zzx.setRule(strxz[0] + att[a] + xxs);//规则******************************** zzx.setRule(strxz[0] + att[a] + xxs);//规则********************************
zzx.setGsid(0);//公式id 0:未关联规则 zzx.setGsid(0);//公式id 0:未关联规则
zzx.setGsgs(strxz[0] + att[a] + xxs);//公式格式 系统提供/自定义公式 zzx.setGsgs(strxz[0] + att[a] + xxs);//公式格式 系统提供/自定义公式
...@@ -496,7 +519,7 @@ public class SalaryManagementController { ...@@ -496,7 +519,7 @@ public class SalaryManagementController {
xcglassojsgzzxmapper.insertxcglassojsgzzxList(gzzxlist); xcglassojsgzzxmapper.insertxcglassojsgzzxList(gzzxlist);
} }
}else if(("个税及实发").equals(grouping[g])) { }else if(("个税及实发").equals(grouping[g])) {
String[] jsjsf = {"个税","实发工资"}; String[] jsjsf = {"个税","实发工资","其他扣除"};
List<XcglAssoJsgzzx> gzzxlist=new ArrayList<XcglAssoJsgzzx>(); List<XcglAssoJsgzzx> gzzxlist=new ArrayList<XcglAssoJsgzzx>();
for(int a=0;a<jsjsf.length;a++) { for(int a=0;a<jsjsf.length;a++) {
XcglAssoXcjsgz xzxj = xcglassoxcjsgzmapper.QuerySalaryRules(jsjsf[a]); XcglAssoXcjsgz xzxj = xcglassoxcjsgzmapper.QuerySalaryRules(jsjsf[a]);
...@@ -504,9 +527,22 @@ public class SalaryManagementController { ...@@ -504,9 +527,22 @@ public class SalaryManagementController {
zzx.setSalaryitem(jsjsf[a]);//薪资项 zzx.setSalaryitem(jsjsf[a]);//薪资项
zzx.setYhmbzd(jsjsf[a]);//银行模板项 需与银行一一对应 zzx.setYhmbzd(jsjsf[a]);//银行模板项 需与银行一一对应
zzx.setRule(xzxj.getGsxs());//规则******************************** zzx.setRule(xzxj.getGsxs());//规则********************************
zzx.setGsid(xzxj.getId());//公式id 0:未关联规则 if(jsjsf[a].equals("个税")) {
zzx.setGsid(0);
}else {
zzx.setGsid(xzxj.getId());//公式id 0:未关联规则
}
zzx.setGsgs(xzxj.getGsxs());//公式格式 系统提供/自定义公式 zzx.setGsgs(xzxj.getGsxs());//公式格式 系统提供/自定义公式
zzx.setRulestate(2);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] if(jsjsf[a].equals("其他扣除")) {
zzx.setRulestate(4);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
}else {
zzx.setRulestate(2);
}
if(jsjsf[a].equals("个税")) {
zzx.setRulestate(0);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
}else {
zzx.setRulestate(2);
}
XcglAssoOption opt = new LambdaQueryChainWrapper<XcglAssoOption>(xcglassooptionmapper).eq(XcglAssoOption::getOptionname, jsjsf[a]).one(); XcglAssoOption opt = new LambdaQueryChainWrapper<XcglAssoOption>(xcglassooptionmapper).eq(XcglAssoOption::getOptionname, jsjsf[a]).one();
zzx.setOptionid(opt.getId()); zzx.setOptionid(opt.getId());
zzx.setType(2);//类型 1:系统项;2:非系统项 zzx.setType(2);//类型 1:系统项;2:非系统项
...@@ -585,7 +621,7 @@ public class SalaryManagementController { ...@@ -585,7 +621,7 @@ public class SalaryManagementController {
zzx.setGsgs(yzxs.getGsgs());//公式格式 系统提供/自定义公式 zzx.setGsgs(yzxs.getGsgs());//公式格式 系统提供/自定义公式
zzx.setXzzid(payid); zzx.setXzzid(payid);
zzx.setRulestate(yzxs.getRulestate());//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] zzx.setRulestate(yzxs.getRulestate());//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx.setOptionid(zzx.getOptionid()); zzx.setOptionid(yzxs.getOptionid());
yjrfzzzxlist.add(zzx); yjrfzzzxlist.add(zzx);
} }
if(yjrfzzzxlist.size() > 0) { if(yjrfzzzxlist.size() > 0) {
...@@ -613,7 +649,7 @@ public class SalaryManagementController { ...@@ -613,7 +649,7 @@ public class SalaryManagementController {
} }
/** /**
* 删除薪资组 * 删除薪资组 ***********
*/ */
@DeleteMapping(value = "/paydelete/{id}") @DeleteMapping(value = "/paydelete/{id}")
@ApiOperation(value = "删除薪资组", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "删除薪资组", httpMethod = "DELETE", notes = "接口发布说明")
...@@ -645,14 +681,15 @@ public class SalaryManagementController { ...@@ -645,14 +681,15 @@ public class SalaryManagementController {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
Calendar lastm = Calendar.getInstance(); Calendar lastm = Calendar.getInstance();
lastm.setTime(new Date()); // 设置为当前时间 lastm.setTime(SalaryTool.strToDateLong(paygro.getXzyf() + "-01 00:00:00")); // 设置为当前时间
lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1); lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上 String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
Calendar thism = Calendar.getInstance();
lastm.set(Calendar.MONTH, thism.get(Calendar.MONTH) + 1); String thismonth = paygro.getXzyf();// 本
String thismonth = new SimpleDateFormat("yyyy-MM").format(thism.getTime());// 本
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.MONTH, 1); calendar.setTime(SalaryTool.strToDateLong(paygro.getXzyf() + "-01 00:00:00")); // 设置为当前时间
calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) + 1);
String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下 String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下
XcglAdminXzz xcglxzz = XcglAdminXzz.builder().build(); XcglAdminXzz xcglxzz = XcglAdminXzz.builder().build();
...@@ -664,7 +701,7 @@ public class SalaryManagementController { ...@@ -664,7 +701,7 @@ public class SalaryManagementController {
String payrollcycle = null; String payrollcycle = null;
if (paygro.getPayperiod() == 0) {// 上月 if (paygro.getPayperiod() == 0) {// 上月
if (paygro.getPaydayperiod() == 1) { if (paygro.getPaydayperiod() == 1) {
payrollcycle = getfirstlast() + "到" + getlastlast(); payrollcycle = SalaryTool.getfirstlastTwo(paygro.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastlastTwo(paygro.getXzyf() + "-01 00:00:00");
} else { } else {
String firstnext = lastmonth + "-" + payper; String firstnext = lastmonth + "-" + payper;
int jgs = paygro.getPaydayperiod() - 1; int jgs = paygro.getPaydayperiod() - 1;
...@@ -673,7 +710,7 @@ public class SalaryManagementController { ...@@ -673,7 +710,7 @@ public class SalaryManagementController {
} }
} else {// 当月 } else {// 当月
if (paygro.getPaydayperiod() == 1) { if (paygro.getPaydayperiod() == 1) {
payrollcycle = getfirstnow() + "到" + getlastnow(); payrollcycle = SalaryTool.getfirstnowTwo(paygro.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastnowTwo(paygro.getXzyf() + "-01 00:00:00");
} else { } else {
String firstnow = thismonth + "-" + payper; String firstnow = thismonth + "-" + payper;
int jgs = paygro.getPaydayperiod() - 1; int jgs = paygro.getPaydayperiod() - 1;
...@@ -1040,6 +1077,7 @@ public class SalaryManagementController { ...@@ -1040,6 +1077,7 @@ public class SalaryManagementController {
return new ResponseResult().success("获取调薪记录信息", salgr); return new ResponseResult().success("获取调薪记录信息", salgr);
} }
/** /**
* 创建计薪规则组项【非自定义】 * 创建计薪规则组项【非自定义】
*/ */
...@@ -1188,11 +1226,22 @@ public class SalaryManagementController { ...@@ -1188,11 +1226,22 @@ public class SalaryManagementController {
/*******计算薪资*********/ /*******计算薪资*********/
/** /**
* 查看薪资
*/
@GetMapping(value = "/checksalary/{id}/{sxrq}")
@ApiOperation(value = "查看薪资", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult CheckSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
//计算完成 返回数据
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,sxrq,userBean.getOrgCode());
return new ResponseResult().success("查看薪资成功", jswsj);
}
/**
* 获取计薪规则组项 * 获取计薪规则组项
*/ */
@GetMapping(value = "/payrulegroupitem/{id}") @GetMapping(value = "/payrulegroupitem/{id}/{sxrq}")
@ApiOperation(value = "获取计薪规则组项", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取计薪规则组项", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult Payrulegroupitem(@CurrentUser UserBean userBean,@PathVariable Integer id) { public ResponseResult Payrulegroupitem(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
SalaryFieldDto salfie = new SalaryFieldDto(); SalaryFieldDto salfie = new SalaryFieldDto();
List<XcglAssoJsgzzx> jsgzzxlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).eq(XcglAssoJsgzzx::getType,2).list(); List<XcglAssoJsgzzx> jsgzzxlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).eq(XcglAssoJsgzzx::getType,2).list();
List<CalculatedFieldDto> fielist = new ArrayList<CalculatedFieldDto>(); List<CalculatedFieldDto> fielist = new ArrayList<CalculatedFieldDto>();
...@@ -1206,30 +1255,42 @@ public class SalaryManagementController { ...@@ -1206,30 +1255,42 @@ public class SalaryManagementController {
if(fielist.size() > 0) { if(fielist.size() > 0) {
salfie.setCalfie(fielist); salfie.setCalfie(fielist);
} }
List<SalaryPersonFieldDto> userfies = xcglassoxzurymapper.selectpersonfieldList(id,userBean.getOrgCode());
List<ComputeUserDto> usfil = new ArrayList<ComputeUserDto>();
for(SalaryPersonFieldDto usfl:userfies) { // List<SalaryPersonFieldDto> userfies = xcglassoxzurymapper.selectpersonfieldList(id,userBean.getOrgCode());
ComputeUserDto ufd = new ComputeUserDto(); // List<ComputeUserDto> usfil = new ArrayList<ComputeUserDto>();
// ufd.setName(usfl.getUsername()); // for(SalaryPersonFieldDto usfl:userfies) {
// ufd.setUsernum(usfl.getUsernum()); // ComputeUserDto ufd = new ComputeUserDto();
ufd.setEmpname(usfl.getUsername()); //// ufd.setName(usfl.getUsername());
ufd.setDept(usfl.getDept());//部门 //// ufd.setUsernum(usfl.getUsernum());
ufd.setPost(usfl.getPost());//职位 // ufd.setEmpname(usfl.getUsername());
ufd.setEmpnum(usfl.getUsernum()); // ufd.setDept(usfl.getDept());//部门
usfil.add(ufd); // ufd.setPost(usfl.getPost());//职位
} // ufd.setEmpnum(usfl.getUsernum());
if(usfil.size() > 0) { // usfil.add(ufd);
salfie.setComuser(usfil); // }
} // if(usfil.size() > 0) {
// salfie.setComuser(usfil);
// }
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,sxrq,userBean.getOrgCode());
salfie.setComuser(jswsj);
return new ResponseResult().success("获取计薪规则组项成功", salfie); return new ResponseResult().success("获取计薪规则组项成功", salfie);
} }
@Autowired
private KqglAssoMonthPunchSummaryMapper kqglassomonthpunchsummarymapper;
@Autowired
private SbgjjAssoYjzdMapper sbgjjassoyjzdmapper;
/** /**
* 计算薪资 * (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
*/ */
@GetMapping(value = "/calculatesalary/{id}/{typeid}/{sxrq}") @GetMapping(value = "/calculatesalary/{id}/{sxrq}")
@ApiOperation(value = "计算薪资", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "计算薪资", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult CalculateSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable Integer typeid,@PathVariable String sxrq) { public ResponseResult CalculateSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
//typeid--1:计算 2:重新计算 //typeid--1:计算 2:重新计算
//已知薪资组id**** //已知薪资组id****
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] //规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
...@@ -1239,8 +1300,6 @@ public class SalaryManagementController { ...@@ -1239,8 +1300,6 @@ public class SalaryManagementController {
yjs.setId(id); yjs.setId(id);
yjs.updateById(); yjs.updateById();
// List<XcglAssoJsgzzx> attsect = xcglassojsgzzxmapper.selectSalarySectionList(id);
//薪资组信息 //薪资组信息
@SuppressWarnings("unused") @SuppressWarnings("unused")
XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, id).one(); XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, id).one();
...@@ -1251,13 +1310,7 @@ public class SalaryManagementController { ...@@ -1251,13 +1310,7 @@ public class SalaryManagementController {
for(XcglAssoXzury znr:znrys) { for(XcglAssoXzury znr:znrys) {
// if(typeid.equals(1)) {//计算 xcglassoxzbmapper.deleteByuserid(znr.getUserid(),id,sxrq);//删除已经计算的薪资
//如果是重新计算 就不要删除同步考勤的数据
// xcglassoxzbmapper.deleteXcglAssoXzb(znr.getUserid());//删除已经计算的薪资
// }else {//重新计算
//如果是重新计算 就不要删除同步考勤的数据
xcglassoxzbmapper.deleteByuserid(znr.getUserid(),id,sxrq);//删除已经计算的薪资
// }
//查询员工定薪数据 //查询员工定薪数据
XcglAssoXzdadx isdx = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper).eq(XcglAssoXzdadx::getUserid,znr.getUserid()).eq(XcglAssoXzdadx::getQyid, userBean.getOrgCode()).eq(XcglAssoXzdadx::getTxzt, 0).one(); XcglAssoXzdadx isdx = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper).eq(XcglAssoXzdadx::getUserid,znr.getUserid()).eq(XcglAssoXzdadx::getQyid, userBean.getOrgCode()).eq(XcglAssoXzdadx::getTxzt, 0).one();
...@@ -1286,8 +1339,9 @@ public class SalaryManagementController { ...@@ -1286,8 +1339,9 @@ public class SalaryManagementController {
xcglassoxzbmapper.xzbinsert(xzb); xcglassoxzbmapper.xzbinsert(xzb);
} }
} }
//查询“0:系统自动提取”数据----入[薪资表] 200---姓名 //查询“0:系统自动提取”数据----入[薪资表] 200---姓名 系统项不加入薪资表
List<XcglAssoJsgzzx> xtzdtqlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).eq(XcglAssoJsgzzx::getRulestate,0).list(); List<XcglAssoJsgzzx> xtzdtqlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).eq(XcglAssoJsgzzx::getRulestate,0)
.eq(XcglAssoJsgzzx::getType, 2).list();
for(XcglAssoJsgzzx xtzd:xtzdtqlist) { for(XcglAssoJsgzzx xtzd:xtzdtqlist) {
if(xtzd.getOptionid() > 0) {//说明阔以根据表查出结果 if(xtzd.getOptionid() > 0) {//说明阔以根据表查出结果
XcglAssoOption lbcx = new LambdaQueryChainWrapper<XcglAssoOption>(xcglassooptionmapper).eq(XcglAssoOption::getId,xtzd.getOptionid()).one(); XcglAssoOption lbcx = new LambdaQueryChainWrapper<XcglAssoOption>(xcglassooptionmapper).eq(XcglAssoOption::getId,xtzd.getOptionid()).one();
...@@ -1297,15 +1351,27 @@ public class SalaryManagementController { ...@@ -1297,15 +1351,27 @@ public class SalaryManagementController {
List<Map<String, Object>> list = null; List<Map<String, Object>> list = null;
if(tablename.equals("yggl_main_emp")) {//员工管理 if(tablename.equals("yggl_main_emp")) {//员工管理
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.select(fieldname).eq("emp_num", znr.getUserid());//select #{tablename} from yggl_main_emp where emp_num = ? queryWrapper.select(fieldname).eq("emp_num", znr.getUserid()).eq("org_code", userBean.getOrgCode());//select #{tablename} from yggl_main_emp where emp_num = ?
list = ygglmainempmapper.selectMaps(queryWrapper); list = ygglmainempmapper.selectMaps(queryWrapper);
}else if(tablename.equals("kqgl_asso_month_punch_summary")) {
QueryWrapper<KqglAssoMonthPunchSummary> queryWrapper = new QueryWrapper<>();
queryWrapper.select(fieldname).eq("num", znr.getUserid()).eq("org_code", userBean.getOrgCode()).eq("belong_year", sxrq.substring(0, 4)).eq("belong_month", Integer.valueOf(sxrq.substring(5, 7)));//select #{tablename} from yggl_main_emp where emp_num = ?
list = kqglassomonthpunchsummarymapper.selectMaps(queryWrapper);
}else if(tablename.equals("sbgjj_asso_yjzd")) {
QueryWrapper<SbgjjAssoYjzd> queryWrapper = new QueryWrapper<>();
queryWrapper.select(fieldname).eq("user_num", znr.getUserid()).eq("qyid", userBean.getOrgCode()).eq("zymonth", sxrq);//select #{tablename} from yggl_main_emp where emp_num = ?
list = sbgjjassoyjzdmapper.selectMaps(queryWrapper);
} }
String autacq = ""; String autacq = "";
for(Map<String, Object> aut:list) { if(list != null) {
if(aut != null) { for(Map<String, Object> aut:list) {
autacq = aut.toString().substring(aut.toString().indexOf("=")+1).replace("}", ""); if(aut != null) {
} autacq = aut.toString().substring(aut.toString().indexOf("=")+1).replace("}", "");
} }
}
}
//处理结果 //处理结果
if(fieldname.equals("job_type")) { if(fieldname.equals("job_type")) {
if(autacq.equals("0")) {autacq="全职";}else if(autacq.equals("0")) {autacq="全职";}else
...@@ -1331,7 +1397,7 @@ public class SalaryManagementController { ...@@ -1331,7 +1397,7 @@ public class SalaryManagementController {
xzb.setXzyf(sxrq);//薪资月 xzb.setXzyf(sxrq);//薪资月
} }
xzb.setXzxid(xtzd.getId());//薪资项id xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg(autacq);//薪资项结果 xzb.setXzxjg(("").equals(autacq) ? "0" : autacq);//薪资项结果
xzb.setQyid(userBean.getOrgCode()); xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb); xcglassoxzbmapper.xzbinsert(xzb);
}else { }else {
...@@ -1362,7 +1428,6 @@ public class SalaryManagementController { ...@@ -1362,7 +1428,6 @@ public class SalaryManagementController {
} }
} }
//查询“0:系统自动提取”数据----入[薪资表] 200---姓名 //查询“0:系统自动提取”数据----入[薪资表] 200---姓名
List<XcglAssoJsgzzx> xtzdtqother = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).list(); List<XcglAssoJsgzzx> xtzdtqother = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).list();
for(XcglAssoJsgzzx xtzd:xtzdtqother) { for(XcglAssoJsgzzx xtzd:xtzdtqother) {
...@@ -1376,17 +1441,6 @@ public class SalaryManagementController { ...@@ -1376,17 +1441,6 @@ public class SalaryManagementController {
String fieldname = lbcx.getFieldname();//对应库字段名 String fieldname = lbcx.getFieldname();//对应库字段名
@SuppressWarnings("unused") @SuppressWarnings("unused")
List<Map<String, Object>> list = null; List<Map<String, Object>> list = null;
// if(tablename.equals("yggl_main_emp")) {//员工管理
// QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
// queryWrapper.select(fieldname).eq("emp_num", znr.getUserid());//select #{tablename} from yggl_main_emp where emp_num = ?
// list = ygglmainempmapper.selectMaps(queryWrapper);
// }
// String autacq = "";
// for(Map<String, Object> aut:list) {
// if(aut != null) {
// autacq = aut.toString().substring(aut.toString().indexOf("=")+1).replace("}", "");
// }
// }
//入[薪资表] //入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build(); XcglAssoXzb xzb = XcglAssoXzb.builder().build();
...@@ -1410,8 +1464,6 @@ public class SalaryManagementController { ...@@ -1410,8 +1464,6 @@ public class SalaryManagementController {
} }
} }
} }
} }
//计算完成 返回数据 //计算完成 返回数据
...@@ -1423,20 +1475,215 @@ public class SalaryManagementController { ...@@ -1423,20 +1475,215 @@ public class SalaryManagementController {
} }
} }
@PostMapping(value = "/salary_calculation")
@ApiOperation(value = "计算薪资", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> SalaryCalculation(@CurrentUser UserBean userBean, @RequestBody CalculatingCompensationDto calcomtiondto) {
//#1、计算个税 (薪资组id、薪资月份)
//查询出薪资组内成员
List<XcglAssoXzury> paygrlist = XcglAssoXzury.builder().build().selectList(new QueryWrapper<XcglAssoXzury>().lambda().eq(XcglAssoXzury::getXzzid, calcomtiondto.getPay_group_id()));
int[] noperincuser = new int[paygrlist.size()];//用来储存没有个税的用户id
int i = 0;
for(XcglAssoXzury pag : paygrlist) {
XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().selectOne(new QueryWrapper<XcglAssoGsjsmx>().lambda().eq(XcglAssoGsjsmx::getQyid, userBean.getOrgCode()).eq(XcglAssoGsjsmx::getUserNum, pag.getUserid())
.eq(XcglAssoGsjsmx::getSalaryMonth, calcomtiondto.getSalary_month()));
if(gsjs == null) {
noperincuser[i] = pag.getUserid();
i++;
}
}
//循环计算没有
for(int gsus : noperincuser) {
// XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().
}
//#2、考勤数据
//#3、套公式算结果
//#4、数据写入薪资表
return ResultUtil.data(null, "计算完成");
}
/** /**
* 查看薪资 * 新增/修改--报税周期信息
*/ */
@GetMapping(value = "/checksalary/{id}/{sxrq}") @PostMapping(value = "/taxreturncycle")
@ApiOperation(value = "查看薪资", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "新增/修改--报税周期信息", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult CheckSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) { public Result<Object> Taxreturncycle(@CurrentUser UserBean userBean,@RequestBody XcglAssoBszqsz xcglassobszqsz) {
//计算完成 返回数据 xcglassobszqsz.setQyid(userBean.getOrgCode());
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,sxrq,userBean.getOrgCode()); return xcglassobszqsz.insertOrUpdate() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
return new ResponseResult().success("查看薪资成功", jswsj);
} }
/** 构建薪资组
* @param userBean
* @param budpaygr
* @return
*/
@PostMapping(value = "/buildpaygroup")
@ApiOperation(value = "构建薪资组", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> Buildpaygroup(@CurrentUser UserBean userBean, @RequestBody BuildPayGroupDto budpaygr) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
Calendar lastm = Calendar.getInstance();
lastm.setTime(SalaryTool.strToDateLong(budpaygr.getXzyf() + "-01 00:00:00")); // 设置为当前时间
lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
String lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
String thismonth = budpaygr.getXzyf();// 本
Calendar calendar = Calendar.getInstance();
calendar.setTime(SalaryTool.strToDateLong(budpaygr.getXzyf() + "-01 00:00:00")); // 设置为当前时间
calendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) + 1);
String nextMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());// 下
//查询系统现有的薪资组
List<XcglAdminXzz> xcxz = XcglAdminXzz.builder().build().selectList(new QueryWrapper<XcglAdminXzz>().lambda().eq(XcglAdminXzz::getQyid, userBean.getOrgCode()));
for(XcglAdminXzz xzz : xcxz) {
XcglAdminXzz xcglxzz = XcglAdminXzz.builder().build();
xcglxzz.setName(xzz.getName());// 薪资组命名
xcglxzz.setPayperiod(xzz.getPayperiod());// 算薪月周期 0:上月;1:当月
xcglxzz.setPaydayperiod(xzz.getPaydayperiod());// 算薪日周期 全月
String payper = String.format("%02d", xzz.getPaydayperiod());
String payrollcycle = null;
if (xzz.getPayperiod() == 0) {// 上月
if (xzz.getPaydayperiod() == 1) {
payrollcycle = SalaryTool.getfirstlastTwo(budpaygr.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastlastTwo(budpaygr.getXzyf() + "-01 00:00:00");
} else {
String firstnext = lastmonth + "-" + payper;
int jgs = xzz.getPaydayperiod() - 1;
String lastnext = thismonth + "-" + String.format("%02d", jgs);
payrollcycle = firstnext + "到" + lastnext;
}
} else {// 当月
if (xzz.getPaydayperiod() == 1) {
payrollcycle = SalaryTool.getfirstnowTwo(budpaygr.getXzyf() + "-01 00:00:00") + "到" + SalaryTool.getlastnowTwo(budpaygr.getXzyf() + "-01 00:00:00");
} else {
String firstnow = thismonth + "-" + payper;
int jgs = xzz.getPaydayperiod() - 1;
String lastnow = nextMonth + "-" + String.format("%02d", jgs);
payrollcycle = firstnow + "到" + lastnow;
}
}
xcglxzz.setPayrollcycle(payrollcycle);// 算薪周期
xcglxzz.setDeletestate(1);// 状态 0:已删除;1:使用中
xcglxzz.setCountstate(0);// 计算状态 0:未计算;1:已计算
xcglxzz.setPxfs(xzz.getPxfs());// 选择配薪方式(0: 空白模板;df:默认)
xcglxzz.setAdduserid(empNum);// 员工工号
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(budpaygr.getXzyf());//薪资月份
xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId();
//从其他薪资组复制规则
/*****************/
//未加入分组
List<XcglAssoJsgzzx> wjrfzlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, xzz.getId()).eq(XcglAssoJsgzzx::getJxgzid,0).list();
List<XcglAssoJsgzzx> wjrfzzzxlist = new ArrayList<XcglAssoJsgzzx>();
for(XcglAssoJsgzzx zxs : wjrfzlist) {
XcglAssoJsgzzx zzx = XcglAssoJsgzzx.builder().build();
zzx.setSalaryitem(zxs.getSalaryitem());//薪资项
zzx.setYhmbzd(zxs.getYhmbzd());//银行模板项 需与银行一一对应
zzx.setRule(zxs.getRule());//规则
zzx.setType(zxs.getType());//类型 1:系统项;2:非系统项
zzx.setAddtime(new Date().getTime());//添加时间
zzx.setAdduserid(empNum);//添加人员id
zzx.setJxgzid(zxs.getJxgzid());//计薪规则组id 0:未加入组
zzx.setRemarks(zxs.getRemarks());//备注
zzx.setGsid(zxs.getGsid());//公式id 0:未关联规则
zzx.setGsgs(zxs.getGsgs());//公式格式 系统提供/自定义公式
zzx.setXzzid(payid);
zzx.setRulestate(zxs.getRulestate());//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx.setOptionid(zxs.getOptionid());
wjrfzzzxlist.add(zzx);
}
if(wjrfzzzxlist.size() > 0) {
xcglassojsgzzxmapper.insertxcglassojsgzzxList(wjrfzzzxlist);
}
/*************/
//计薪规则组
List<XcglAssoJxgz> jxgzlist = new LambdaQueryChainWrapper<XcglAssoJxgz>(xcglassojxgzmapper).eq(XcglAssoJxgz::getXzzid, xzz.getId()).list();
@SuppressWarnings("unused")
List<XcglAssoJxgz> jxgzs = new ArrayList<XcglAssoJxgz>();
for(XcglAssoJxgz jxgzl : jxgzlist) {
XcglAssoJxgz jxgz = new XcglAssoJxgz();
jxgz.setXzzid(payid);
jxgz.setName(jxgzl.getName());
jxgz.setRemarks(jxgzl.getRemarks());
jxgz.setAddtime(new Date().getTime());
jxgz.setAdduserid(empNum);
jxgz.setQyid(orgCode);
// jxgzs.add(jxgz);
xcglassojxgzmapper.jxgzinsert(jxgz);
int jxgzid = jxgz.getId();
List<XcglAssoJsgzzx> yjrfzlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, xzz.getId()).eq(XcglAssoJsgzzx::getJxgzid,jxgzl.getId()).list();
if(yjrfzlist.size() > 0) {
List<XcglAssoJsgzzx> yjrfzzzxlist = new ArrayList<XcglAssoJsgzzx>();
for(XcglAssoJsgzzx yzxs : yjrfzlist) {
XcglAssoJsgzzx zzx = XcglAssoJsgzzx.builder().build();
zzx.setSalaryitem(yzxs.getSalaryitem());//薪资项
zzx.setYhmbzd(yzxs.getYhmbzd());//银行模板项 需与银行一一对应
zzx.setRule(yzxs.getRule());//规则
zzx.setType(yzxs.getType());//类型 1:系统项;2:非系统项
zzx.setAddtime(new Date().getTime());//添加时间
zzx.setAdduserid(empNum);//添加人员id
zzx.setJxgzid(jxgzid);//计薪规则组id 0:未加入组
zzx.setRemarks(yzxs.getRemarks());//备注
zzx.setGsid(yzxs.getGsid());//公式id 0:未关联规则
zzx.setGsgs(yzxs.getGsgs());//公式格式 系统提供/自定义公式
zzx.setXzzid(payid);
zzx.setRulestate(yzxs.getRulestate());//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx.setOptionid(yzxs.getOptionid());
yjrfzzzxlist.add(zzx);
}
if(yjrfzzzxlist.size() > 0) {
xcglassojsgzzxmapper.insertxcglassojsgzzxList(yjrfzzzxlist);
}
}
}
List<XcglAssoXzury> zxzus = XcglAssoXzury.builder().build().selectList(new QueryWrapper<XcglAssoXzury>().lambda().eq(XcglAssoXzury::getXzzid, xzz.getId()));
List<XcglAssoXzury> xcgllist = new ArrayList<XcglAssoXzury>();
for (XcglAssoXzury xzr : zxzus) {
// xcglassoxzurymapper.deleteByuseridoqyid(Integer.valueOf(attser[u]), orgCode);
XcglAssoXzury kquser = new XcglAssoXzury();
kquser.setXzzid(payid);// 薪资组id
kquser.setUserid(xzr.getUserid());
kquser.setQyid(orgCode);
xcgllist.add(kquser);
}
if (xcgllist.size() > 0) {
xcglassoxzurymapper.insertxcglassoxzuryList(xcgllist);
}
}//循环结束
return ResultUtil.data(null, "完成");
}
/** /**
* 同步考勤 * 同步考勤 XXXXXXX
*/ */
@GetMapping(value = "/SynchroAtt/{id}/{sxrq}") @GetMapping(value = "/SynchroAtt/{id}/{sxrq}")
@ApiOperation(value = "同步考勤", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "同步考勤", httpMethod = "GET", notes = "接口发布说明")
...@@ -1553,10 +1800,10 @@ public class SalaryManagementController { ...@@ -1553,10 +1800,10 @@ public class SalaryManagementController {
try { try {
String sdaet = getMinMonthDate(start); String sdaet = SalaryTool.getMinMonthDate(start);
startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaet,"yyyy-MM-dd")).getTime(); startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
String edate = getMaxMonthDate(end); String edate = SalaryTool.getMaxMonthDate(end);
endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edate,"yyyy-MM-dd")).getTime(); endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edate,"yyyy-MM-dd")).getTime();
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
...@@ -1632,7 +1879,7 @@ public class SalaryManagementController { ...@@ -1632,7 +1879,7 @@ public class SalaryManagementController {
} }
int y = 0; int y = 0;
int q = 0; int q = 0;
for(int i = 1; i <= getDaysByYearMonth(year,month); i++){ for(int i = 1; i <= SalaryTool.getDaysByYearMonth(year,month); i++){
try { try {
Date date1 = sdf1.parse(yemo + "-" + i); Date date1 = sdf1.parse(yemo + "-" + i);
for(int u=0;u<week.length;u++){ for(int u=0;u<week.length;u++){
...@@ -1651,7 +1898,7 @@ public class SalaryManagementController { ...@@ -1651,7 +1898,7 @@ public class SalaryManagementController {
} }
} }
int xiuxi = getDaysByYearMonth(year,month) - q - bxdk + wxdk.size(); int xiuxi = SalaryTool.getDaysByYearMonth(year,month) - q - bxdk + wxdk.size();
attrep.setRestday(xiuxi);//休息天数 attrep.setRestday(xiuxi);//休息天数
attrep.setAnswerday(y+bxdk);//应出勤 attrep.setAnswerday(y+bxdk);//应出勤
/***********/ /***********/
...@@ -1692,7 +1939,7 @@ public class SalaryManagementController { ...@@ -1692,7 +1939,7 @@ public class SalaryManagementController {
e1.printStackTrace(); e1.printStackTrace();
} }
int y = 0; int y = 0;
for(int i = 1; i <= getDaysByYearMonth(year,month); i++){ for(int i = 1; i <= SalaryTool.getDaysByYearMonth(year,month); i++){
try { try {
Date date1 = sdf1.parse(yemo + "-" + i); Date date1 = sdf1.parse(yemo + "-" + i);
for(int u=0;u<week.length;u++){ for(int u=0;u<week.length;u++){
...@@ -1705,7 +1952,7 @@ public class SalaryManagementController { ...@@ -1705,7 +1952,7 @@ public class SalaryManagementController {
} }
} }
int xiuxi = getDaysByYearMonth(year,month) - y; int xiuxi = SalaryTool.getDaysByYearMonth(year,month) - y;
attrep.setRestday(xiuxi);//休息天数 attrep.setRestday(xiuxi);//休息天数
attrep.setAnswerday(y);//应出勤 attrep.setAnswerday(y);//应出勤
} }
...@@ -1755,49 +2002,7 @@ public class SalaryManagementController { ...@@ -1755,49 +2002,7 @@ public class SalaryManagementController {
} }
/**
* 根据 年、月 获取对应的月份 的 天数
*/
public static int getDaysByYearMonth(int year, int month)
{
Calendar a = Calendar.getInstance();
a.set(Calendar.YEAR, year);
a.set(Calendar.MONTH, month - 1);
a.set(Calendar.DATE, 1);
a.roll(Calendar.DATE, -1);
int maxDate = a.get(Calendar.DATE);
return maxDate;
}
/**
* 获取月份起始日期
*
* @param date
* @return
* @throws ParseException
*/
public String getMinMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
/**
* 获取月份最后日期
*
* @param date
* @return
* @throws ParseException
*/
public String getMaxMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
/** /**
* 导入薪资 * 导入薪资
...@@ -1854,96 +2059,108 @@ public class SalaryManagementController { ...@@ -1854,96 +2059,108 @@ public class SalaryManagementController {
@GetMapping(value = "/switchsalarydate/{sxrq}") @GetMapping(value = "/switchsalarydate/{sxrq}")
@ApiOperation(value = "切换薪资日期", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "切换薪资日期", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult SwitchSalaryDate(@CurrentUser UserBean userBean,@PathVariable String sxrq) { public ResponseResult SwitchSalaryDate(@CurrentUser UserBean userBean,@PathVariable String sxrq) {
List<SwitchSalaryDateDto> ssd = new ArrayList<SwitchSalaryDateDto>(); List<XcglAdminXzz> xcgladminxzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getQyid, userBean.getOrgCode()).eq(XcglAdminXzz::getMonthtime, sxrq).list();
List<XcglAdminXzz> xcgladminxzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getQyid, userBean.getOrgCode()).list();
for(XcglAdminXzz xzx : xcgladminxzz) {
XcglAssoXzury isck = xcglassoxzurymapper.selectISswitchdate(xzx.getId(),sxrq);
// int payperiod = xzx.getPayperiod();//算薪月周期 0:上月;1:当月
// int paydayperiod = xzx.getPaydayperiod();//算薪日周期 全月
//输入月份的开始于结束
String strstartdate = "";
String strendDate = "";
String lastmonth = "";
String nextMonth = "";
String lasstrstartdate = "";
String lasstrendDate = "";
try {
String date = sxrq+"-01";
String sdaet = getMinMonthDate(date);
Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
strstartdate = new SimpleDateFormat("yyyy-MM-dd").format(startDate);// 上
String edate = getMaxMonthDate(date);
Long endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edate,"yyyy-MM-dd")).getTime();
strendDate = new SimpleDateFormat("yyyy-MM-dd").format(endDate);// 上
String dateStr = date+" 00:00:00";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date transDate = sdf.parse(dateStr);
Calendar lastm = Calendar.getInstance();
lastm.setTime(transDate); // 设置为当前时间
lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
Calendar lastmtow = Calendar.getInstance();
lastmtow.setTime(transDate); // 设置为当前时间
lastmtow.add(Calendar.MONTH, 1);
nextMonth = new SimpleDateFormat("yyyy-MM").format(lastmtow.getTime());// 下
String lasdate = lastmonth+"-01";
String sdaetlas = getMinMonthDate(lasdate);
Long startDatelas = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaetlas,"yyyy-MM-dd")).getTime();
lasstrstartdate = new SimpleDateFormat("yyyy-MM-dd").format(startDatelas);// 上
String edatelas = getMaxMonthDate(lasdate);
Long endDatelas = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edatelas,"yyyy-MM-dd")).getTime();
lasstrendDate = new SimpleDateFormat("yyyy-MM-dd").format(endDatelas);// 上
} catch (ParseException e) {
e.printStackTrace();
}
String payper = String.format("%02d", xzx.getPaydayperiod());
String payrollcycle = "";
if (xzx.getPayperiod() == 0) {// 上月
if (xzx.getPaydayperiod() == 1) {
//上个月开始 --- 上个月结束
payrollcycle = lasstrstartdate + "到" + lasstrendDate;
} else {
String firstnext = lastmonth + "-" + payper;
int jgs = xzx.getPaydayperiod() - 1;
String lastnext = sxrq + "-" + String.format("%02d", jgs);
payrollcycle = firstnext + "到" + lastnext;
}
} else {// 当月
if (xzx.getPaydayperiod() == 1) {
//本月开始 -- 本月结束
payrollcycle = strstartdate + "到" + strendDate;//*********
} else {
String firstnow = sxrq + "-" + payper;
int jgs = xzx.getPaydayperiod() - 1;
String lastnow = nextMonth + "-" + String.format("%02d", jgs);
payrollcycle = firstnow + "到" + lastnow;
}
}
SwitchSalaryDateDto sds = new SwitchSalaryDateDto();
if(isck != null) {
sds.setGid(xzx.getId());
sds.setState(1);//已计算
sds.setCycle(payrollcycle);
ssd.add(sds);
}else {
sds.setGid(xzx.getId());
sds.setState(0);//未计算
sds.setCycle(payrollcycle);
ssd.add(sds);
}
}
return new ResponseResult().success("成功", ssd); return new ResponseResult().success("成功", xcgladminxzz);
} }
/**
* 切换薪资日期
*/
// @GetMapping(value = "/switchsalarydate/{sxrq}")
// @ApiOperation(value = "切换薪资日期", httpMethod = "GET", notes = "接口发布说明")
// public ResponseResult SwitchSalaryDate(@CurrentUser UserBean userBean,@PathVariable String sxrq) {
// List<SwitchSalaryDateDto> ssd = new ArrayList<SwitchSalaryDateDto>();
// List<XcglAdminXzz> xcgladminxzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getQyid, userBean.getOrgCode()).list();
// for(XcglAdminXzz xzx : xcgladminxzz) {
// XcglAssoXzury isck = xcglassoxzurymapper.selectISswitchdate(xzx.getId(),sxrq);
// // int payperiod = xzx.getPayperiod();//算薪月周期 0:上月;1:当月
// // int paydayperiod = xzx.getPaydayperiod();//算薪日周期 全月
// //输入月份的开始于结束
// String strstartdate = "";
// String strendDate = "";
// String lastmonth = "";
// String nextMonth = "";
//
// String lasstrstartdate = "";
// String lasstrendDate = "";
// try {
// String date = sxrq+"-01";
// String sdaet = SalaryTool.getMinMonthDate(date);
// Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaet,"yyyy-MM-dd")).getTime();
// strstartdate = new SimpleDateFormat("yyyy-MM-dd").format(startDate);// 上
// String edate = SalaryTool.getMaxMonthDate(date);
// Long endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edate,"yyyy-MM-dd")).getTime();
// strendDate = new SimpleDateFormat("yyyy-MM-dd").format(endDate);// 上
//
// String dateStr = date+" 00:00:00";
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Date transDate = sdf.parse(dateStr);
//
// Calendar lastm = Calendar.getInstance();
// lastm.setTime(transDate); // 设置为当前时间
// lastm.set(Calendar.MONTH, lastm.get(Calendar.MONTH) - 1);
// lastmonth = new SimpleDateFormat("yyyy-MM").format(lastm.getTime());// 上
//
// Calendar lastmtow = Calendar.getInstance();
// lastmtow.setTime(transDate); // 设置为当前时间
// lastmtow.add(Calendar.MONTH, 1);
// nextMonth = new SimpleDateFormat("yyyy-MM").format(lastmtow.getTime());// 下
//
// String lasdate = lastmonth+"-01";
// String sdaetlas = SalaryTool.getMinMonthDate(lasdate);
// Long startDatelas = DateUtil.getStartTime(0,DateUtil.getStringTime(sdaetlas,"yyyy-MM-dd")).getTime();
// lasstrstartdate = new SimpleDateFormat("yyyy-MM-dd").format(startDatelas);// 上
// String edatelas = SalaryTool.getMaxMonthDate(lasdate);
// Long endDatelas = DateUtil.getnowEndTime(23,DateUtil.getStringTime(edatelas,"yyyy-MM-dd")).getTime();
// lasstrendDate = new SimpleDateFormat("yyyy-MM-dd").format(endDatelas);// 上
// } catch (ParseException e) {
// e.printStackTrace();
// }
//
//
// String payper = String.format("%02d", xzx.getPaydayperiod());
// String payrollcycle = "";
// if (xzx.getPayperiod() == 0) {// 上月
// if (xzx.getPaydayperiod() == 1) {
// //上个月开始 --- 上个月结束
// payrollcycle = lasstrstartdate + "到" + lasstrendDate;
// } else {
// String firstnext = lastmonth + "-" + payper;
// int jgs = xzx.getPaydayperiod() - 1;
// String lastnext = sxrq + "-" + String.format("%02d", jgs);
// payrollcycle = firstnext + "到" + lastnext;
// }
// } else {// 当月
// if (xzx.getPaydayperiod() == 1) {
// //本月开始 -- 本月结束
// payrollcycle = strstartdate + "到" + strendDate;//*********
// } else {
// String firstnow = sxrq + "-" + payper;
// int jgs = xzx.getPaydayperiod() - 1;
// String lastnow = nextMonth + "-" + String.format("%02d", jgs);
// payrollcycle = firstnow + "到" + lastnow;
// }
// }
//
// SwitchSalaryDateDto sds = new SwitchSalaryDateDto();
// if(isck != null) {
// sds.setGid(xzx.getId());
// sds.setState(1);//已计算
// sds.setCycle(payrollcycle);
// ssd.add(sds);
// }else {
// sds.setGid(xzx.getId());
// sds.setState(0);//未计算
// sds.setCycle(payrollcycle);
// ssd.add(sds);
// }
// }
//
// return new ResponseResult().success("成功", ssd);
// }
/** /**
* 获取附加扣除数据 * 获取附加扣除数据
*/ */
...@@ -2477,60 +2694,5 @@ public class SalaryManagementController { ...@@ -2477,60 +2694,5 @@ public class SalaryManagementController {
obj.insertOrUpdate(); obj.insertOrUpdate();
return new ResponseResult().success("添加/修改成功", obj); return new ResponseResult().success("添加/修改成功", obj);
} }
// 上个月
public static String getfirstlast() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastlast() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, -1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
// 本月
public static String getfirstnow() {
String firstnow;
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
firstnow = mat.format(c.getTime());
return firstnow;
}
public static String getlastnow() {
String lastnow;
Calendar ca = Calendar.getInstance();
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnow = mat.format(ca.getTime());
return lastnow;
}
// 下个月
public static String getfirstnext() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastnext() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, 1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
} }
package cn.timer.api.controller.xcgl;
import java.text.ParseException;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class SalaryTool {
static SimpleDateFormat mat = new SimpleDateFormat("yyyy-MM-dd");
public static Date strToDateLong(String strDate) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ParsePosition pos = new ParsePosition(0);
Date strtodate = formatter.parse(strDate, pos);
return strtodate;
}
// 上个月
public static String getfirstlastTwo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastlastTwo(String time) {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.setTime(strToDateLong(time)); // 设置为当前时间
ca1.add(Calendar.MONTH, -1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
// 本月
public static String getfirstnowTwo(String time) {
String firstnow;
Calendar c = Calendar.getInstance();
c.setTime(strToDateLong(time)); // 设置为当前时间
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
firstnow = mat.format(c.getTime());
return firstnow;
}
public static String getlastnowTwo(String time) {
String lastnow;
Calendar ca = Calendar.getInstance();
ca.setTime(strToDateLong(time)); // 设置为当前时间
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnow = mat.format(ca.getTime());
return lastnow;
}
// 下个月
public static String getfirstnextTwo(String time) {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.setTime(strToDateLong(time)); // 设置为当前时间
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastnextTwo(String time) {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.setTime(strToDateLong(time)); // 设置为当前时间
ca1.add(Calendar.MONTH, 1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
/**
* 根据 年、月 获取对应的月份 的 天数
*/
public static int getDaysByYearMonth(int year, int month)
{
Calendar a = Calendar.getInstance();
a.set(Calendar.YEAR, year);
a.set(Calendar.MONTH, month - 1);
a.set(Calendar.DATE, 1);
a.roll(Calendar.DATE, -1);
int maxDate = a.get(Calendar.DATE);
return maxDate;
}
/**
* 获取月份起始日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMinMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMinimum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
/**
* 获取月份最后日期
*
* @param date
* @return
* @throws ParseException
*/
public static String getMaxMonthDate(String date) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.setTime(mat.parse(date));
calendar.set(Calendar.DAY_OF_MONTH,
calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
return mat.format(calendar.getTime());
}
//##################################################################################################################################
// 上个月
public static String getfirstlast() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, -1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastlast() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, -1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
// 本月
public static String getfirstnow() {
String firstnow;
Calendar c = Calendar.getInstance();
c.add(Calendar.MONTH, 0);
c.set(Calendar.DAY_OF_MONTH, 1);
firstnow = mat.format(c.getTime());
return firstnow;
}
public static String getlastnow() {
String lastnow;
Calendar ca = Calendar.getInstance();
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnow = mat.format(ca.getTime());
return lastnow;
}
// 下个月
public static String getfirstnext() {
String firstnext;
Calendar c1 = Calendar.getInstance();
c1.add(Calendar.MONTH, 1);
c1.set(Calendar.DAY_OF_MONTH, 1);
firstnext = mat.format(c1.getTime());
return firstnext;
}
public static String getlastnext() {
String lastnext;
Calendar ca1 = Calendar.getInstance();
ca1.add(Calendar.MONTH, 1);
ca1.set(Calendar.DAY_OF_MONTH, ca1.getActualMaximum(Calendar.DAY_OF_MONTH));
lastnext = mat.format(ca1.getTime());
return lastnext;
}
}
package cn.timer.api.dto.kqmk;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CalculatingCompensationDto {
private String salary_month;//薪资月
private Integer pay_group_id;//薪资组id
}
package cn.timer.api.dto.xcgl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BuildPayGroupDto {
@ApiModelProperty(value = "薪资月份", example = "2020-09")
String xzyf;
}
...@@ -15,6 +15,9 @@ public class SalaryFieldDto implements Serializable {/** ...@@ -15,6 +15,9 @@ public class SalaryFieldDto implements Serializable {/**
*/ */
private static final long serialVersionUID = 2131188736263992532L; private static final long serialVersionUID = 2131188736263992532L;
List<ComputeUserDto> comuser; // List<ComputeUserDto> comuser;
List<CalculationDto> comuser;
List<CalculatedFieldDto> calfie; List<CalculatedFieldDto> calfie;
} }
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid}) and c.id in (select m.id from zzgl_bmgw_m m where m.up_id = #{param.deptid}) or (c.id =#{param.deptid})
</if> </if>
and emp.org_code = #{param.orgCode} and emp.org_code = #{param.orgCode}
AND emp.job_status = #{param.orgCode} AND emp.job_status = 3
</if> </if>
<!--and c.id = #{param.deptid} <!--and c.id = #{param.deptid}
......
...@@ -119,14 +119,15 @@ ...@@ -119,14 +119,15 @@
<delete id="deleteByuserid" > <delete id="deleteByuserid" >
<!-- DELETE FROM xcgl_asso_xzb <!-- DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid} WHERE userid = #{userid}
and xzxid not in(select jsgzzx.id from xcgl_asso_jsgzzx jsgzzx and xzxid not in(select jsgzzx.id from xcgl_asso_jsgzzx jsgzzx
LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid LEFT JOIN xcgl_asso_option as opt on opt.id = jsgzzx.optionid
where opt.itemid = 2 where opt.itemid = 2
and jsgzzx.xzzid = #{xzzid}) and jsgzzx.xzzid = #{xzzid})
and xzyf = #{xzyf} -->
DELETE FROM xcgl_asso_xzb
WHERE userid = #{userid}
and xzyf = #{xzyf} and xzyf = #{xzyf}
</delete> </delete>
......
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