Commit b8bbe0d9 by Administrator

Merge branch 'develop' into 'master'

Develop

See merge request 8timerv2/8timerapiv200!536
parents 41a0b8c9 59a93bcd
...@@ -87,4 +87,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> { ...@@ -87,4 +87,7 @@ public class XcglAssoJsgzzx extends Model<XcglAssoJsgzzx> {
@ApiModelProperty(value="是否自定义项(0:否;1:是)",example="0") @ApiModelProperty(value="是否自定义项(0:否;1:是)",example="0")
private Integer isCustom; private Integer isCustom;
@ApiModelProperty(value="薪资档案自定义id",example="0")
private Integer xzdazdyid;
} }
\ No newline at end of file
...@@ -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 10 9 * * ?") // @Scheduled(cron = "0 33 9 * * ?")
@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 {
......
...@@ -756,7 +756,7 @@ public class LastMonthtimingExport { ...@@ -756,7 +756,7 @@ public class LastMonthtimingExport {
} }
if(shif != null && shif.getSxbcs() != null) { if(shif != null && shif.getSxbcs() != null) {
System.out.println(shif.getSxbcs()); // System.out.println(shif.getSxbcs());
answer = shif.getSxbcs();//1=2次 2=4次 3=6次 answer = shif.getSxbcs();//1=2次 2=4次 3=6次
//未打最后一次卡的时候 判断最后一次打卡时间是否在请假范围内 相对应减少下班缺卡次数 //未打最后一次卡的时候 判断最后一次打卡时间是否在请假范围内 相对应减少下班缺卡次数
//最后一次应打卡时间 //最后一次应打卡时间
......
...@@ -825,14 +825,6 @@ public class SalaryManagementController { ...@@ -825,14 +825,6 @@ public class SalaryManagementController {
@ApiOperation(value = "查询定薪人员/分页", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "查询定薪人员/分页", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> FixedSalarStaff(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) { public Result<Object> FixedSalarStaff(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) {
search.setOrgcode(userBean.getOrgCode()); search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
Page<FixedSalaryStaffDto> page = new Page<FixedSalaryStaffDto>( Page<FixedSalaryStaffDto> page = new Page<FixedSalaryStaffDto>(
search.getCurrentPage() == null ? 1 : search.getCurrentPage(), search.getCurrentPage() == null ? 1 : search.getCurrentPage(),
search.getTotalPage() == null ? 10 : search.getTotalPage()); search.getTotalPage() == null ? 10 : search.getTotalPage());
...@@ -923,6 +915,10 @@ public class SalaryManagementController { ...@@ -923,6 +915,10 @@ public class SalaryManagementController {
@ApiOperation(value = "删除薪资组自定义表头", httpMethod = "DELETE", notes = "接口发布说明") @ApiOperation(value = "删除薪资组自定义表头", httpMethod = "DELETE", notes = "接口发布说明")
public ResponseResult customdelete(@CurrentUser UserBean userBean,@PathVariable Integer id) { public ResponseResult customdelete(@CurrentUser UserBean userBean,@PathVariable Integer id) {
XcglAssoXzdazdy.builder().build().deleteById(id); XcglAssoXzdazdy.builder().build().deleteById(id);
// 同时删除已添加到薪资组(未锁定的组)中的薪资项
xcglassojsgzzxmapper.deleteByxzdazdyid(id);
return new ResponseResult().success("删除成功", id); return new ResponseResult().success("删除成功", id);
} }
...@@ -1272,6 +1268,13 @@ public class SalaryManagementController { ...@@ -1272,6 +1268,13 @@ public class SalaryManagementController {
zzx.setGsid(0);//公式id 0:未关联规则 zzx.setGsid(0);//公式id 0:未关联规则
zzx.setGsgs("从薪资档案-"+term[a].getOptname()+"自动提取数据");//公式格式 系统提供/自定义公式 zzx.setGsgs("从薪资档案-"+term[a].getOptname()+"自动提取数据");//公式格式 系统提供/自定义公式
zzx.setRulestate(1);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] zzx.setRulestate(1);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
XcglAssoXzdazdy xzd = XcglAssoXzdazdy.builder().build().selectOne(new QueryWrapper<XcglAssoXzdazdy>().lambda().eq(XcglAssoXzdazdy::getQyid, userBean.getOrgCode())
.eq(XcglAssoXzdazdy::getZdmc, term[a].getOptname()));
int xzdazdyid = 0;
if(xzd != null) {
xzdazdyid = xzd.getId();
}
zzx.setXzdazdyid(xzdazdyid);
}else {// }else {//
String xxs = "自动提取数据"; String xxs = "自动提取数据";
String[] strxz = {"从人事花名册-","从月度汇总-","从社保账单-"}; String[] strxz = {"从人事花名册-","从月度汇总-","从社保账单-"};
...@@ -1294,6 +1297,8 @@ public class SalaryManagementController { ...@@ -1294,6 +1297,8 @@ public class SalaryManagementController {
zzx.setGsid(0);//公式id 0:未关联规则 zzx.setGsid(0);//公式id 0:未关联规则
zzx.setGsgs(describe);//公式格式 系统提供/自定义公式 zzx.setGsgs(describe);//公式格式 系统提供/自定义公式
zzx.setRulestate(rule);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入] zzx.setRulestate(rule);//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
zzx.setXzdazdyid(0);
} }
} }
if(term[a].getOptitemid() != 0) { if(term[a].getOptitemid() != 0) {
...@@ -1320,7 +1325,7 @@ public class SalaryManagementController { ...@@ -1320,7 +1325,7 @@ public class SalaryManagementController {
} }
} }
if(gzzxlist.size() > 0) { if(gzzxlist.size() > 0) {
xcglassojsgzzxmapper.insertxcglassojsgzzxList(gzzxlist); xcglassojsgzzxmapper.insertxcglassojsgzzxListTwo(gzzxlist);
} }
return new ResponseResult().success("创建薪资组成功", gzzxlist); return new ResponseResult().success("创建薪资组成功", gzzxlist);
} }
...@@ -1943,15 +1948,15 @@ public class SalaryManagementController { ...@@ -1943,15 +1948,15 @@ public class SalaryManagementController {
String formula = xzx.getGsgs();//#基本工资#/#应出勤天数#*#事假天数# String formula = xzx.getGsgs();//#基本工资#/#应出勤天数#*#事假天数#
if(xzx.getGsid() == 3) {//事假天数 if(xzx.getGsid() == 3) {//事假天数
matter_leave = SalaryTool.formatDouble_(matter_leave/prescription);//转化天数 matter_leave = matter_leave/prescription;//转化天数
String qaz = formula.replace("#基本工资#", String.valueOf(base_pay)).replace("#应出勤天数#", String.valueOf(attendance_days)).replace("#事假天数#", String.valueOf(matter_leave)); String qaz = formula.replace("#基本工资#", String.valueOf(base_pay)).replace("#应出勤天数#", String.valueOf(attendance_days)).replace("#事假天数#", String.valueOf(matter_leave));
if(attendance_days > 0) { if(attendance_days > 0) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
} }
}else if(xzx.getGsid() == 4) {//事假次数 #事假次数#*200 }else if(xzx.getGsid() == 4) {//事假次数 #事假次数#*200
String qaz = formula.replace("#事假次数#", String.valueOf(matter_leave_num)); String qaz = formula.replace("#事假次数#", String.valueOf(matter_leave_num));
if(attendance_days > 0) { if(attendance_days > 0) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
} }
} }
...@@ -1961,15 +1966,15 @@ public class SalaryManagementController { ...@@ -1961,15 +1966,15 @@ public class SalaryManagementController {
String formula = xzx.getGsgs();//#基本工资#/#应出勤天数#*#病假天数#*0.4 String formula = xzx.getGsgs();//#基本工资#/#应出勤天数#*#病假天数#*0.4
if(xzx.getGsid() == 5) {//病假天数 if(xzx.getGsid() == 5) {//病假天数
sick_leave = SalaryTool.formatDouble_(sick_leave/prescription);//转化天数 sick_leave = sick_leave/prescription;//转化天数
String qaz = formula.replace("#基本工资#", String.valueOf(base_pay)).replace("#应出勤天数#", String.valueOf(attendance_days)).replace("#病假天数#", String.valueOf(sick_leave)); String qaz = formula.replace("#基本工资#", String.valueOf(base_pay)).replace("#应出勤天数#", String.valueOf(attendance_days)).replace("#病假天数#", String.valueOf(sick_leave));
if(attendance_days > 0) { if(attendance_days > 0) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
} }
}else if(xzx.getGsid() == 6) {//病假次数 #病假次数#*100 }else if(xzx.getGsid() == 6) {//病假次数 #病假次数#*100
String qaz = formula.replace("#病假次数#", String.valueOf(sick_leave_num)); String qaz = formula.replace("#病假次数#", String.valueOf(sick_leave_num));
if(attendance_days > 0) { if(attendance_days > 0) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
} }
} }
...@@ -1992,7 +1997,7 @@ public class SalaryManagementController { ...@@ -1992,7 +1997,7 @@ public class SalaryManagementController {
qaz = formula.replace("#迟到时长#", String.valueOf(late_sc)).replace("#早退时长数#", String.valueOf(leave_early_sc)); qaz = formula.replace("#迟到时长#", String.valueOf(late_sc)).replace("#早退时长数#", String.valueOf(leave_early_sc));
} }
if(!("").equals(qaz)) { if(!("").equals(qaz)) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
} }
} }
...@@ -2043,7 +2048,7 @@ public class SalaryManagementController { ...@@ -2043,7 +2048,7 @@ public class SalaryManagementController {
} }
if(!qaz.contains("#")) { if(!qaz.contains("#")) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
}else { }else {
System.err.println(xzx.getOptionid() + ":"+qaz+"有误!!!"); System.err.println(xzx.getOptionid() + ":"+qaz+"有误!!!");
} }
...@@ -2107,7 +2112,7 @@ public class SalaryManagementController { ...@@ -2107,7 +2112,7 @@ public class SalaryManagementController {
} }
if(!qaz.contains("#")) { if(!qaz.contains("#")) {
result = Double.valueOf(String.valueOf(js.eval(qaz))); result = SalaryTool.formatDouble_(Double.valueOf(String.valueOf(js.eval(qaz))));
}else { }else {
System.err.println(xzx.getOptionid() + ":"+qaz+"有误!!!"); System.err.println(xzx.getOptionid() + ":"+qaz+"有误!!!");
} }
...@@ -2152,6 +2157,10 @@ public class SalaryManagementController { ...@@ -2152,6 +2157,10 @@ public class SalaryManagementController {
public double CalculationOfIndividualIncomeTax(String gsus,String salary_month,int orgcode,double wages_payable,double other_deductions) throws ParseException { public double CalculationOfIndividualIncomeTax(String gsus,String salary_month,int orgcode,double wages_payable,double other_deductions) throws ParseException {
double personalincome = 0; double personalincome = 0;
String strY = new SimpleDateFormat("yyyy").format(new Date()); String strY = new SimpleDateFormat("yyyy").format(new Date());
XcglAssoGsjsmx.builder().build().delete(new QueryWrapper<XcglAssoGsjsmx>().lambda().eq(XcglAssoGsjsmx::getUserNum, gsus).eq(XcglAssoGsjsmx::getSalaryMonth, salary_month)
.eq(XcglAssoGsjsmx::getQyid, orgcode));
//当月个税存在则直接获取 无则根据计算薪资月的上月个税为基准计算 //当月个税存在则直接获取 无则根据计算薪资月的上月个税为基准计算
XcglAssoGsjsmx dyxzgs = XcglAssoGsjsmx.builder().build().selectOne(new QueryWrapper<XcglAssoGsjsmx>().lambda().eq(XcglAssoGsjsmx::getUserNum, gsus).eq(XcglAssoGsjsmx::getQyid, orgcode) XcglAssoGsjsmx dyxzgs = XcglAssoGsjsmx.builder().build().selectOne(new QueryWrapper<XcglAssoGsjsmx>().lambda().eq(XcglAssoGsjsmx::getUserNum, gsus).eq(XcglAssoGsjsmx::getQyid, orgcode)
.eq(XcglAssoGsjsmx::getSalaryMonth, salary_month)); .eq(XcglAssoGsjsmx::getSalaryMonth, salary_month));
...@@ -2191,23 +2200,24 @@ public class SalaryManagementController { ...@@ -2191,23 +2200,24 @@ public class SalaryManagementController {
gsmx.setCurrentSpecialDeduction(cuspde == null ? 0 : Double.valueOf(cuspde.getGrjltotal()));//本期专项扣除 【个人的社保公积金缴纳扣除】 gsmx.setCurrentSpecialDeduction(cuspde == null ? 0 : Double.valueOf(cuspde.getGrjltotal()));//本期专项扣除 【个人的社保公积金缴纳扣除】
gsmx.setCumSre(wages_payable+(sygs == null ? 0 : sygs.getCumSre()));//累计收入额 【本期收入+累计收入额(上月)】 gsmx.setCumSre(wages_payable+(sygs == null ? 0 : sygs.getCumSre()));//累计收入额 【本期收入+累计收入额(上月)】
double cumjcfy = 0; double cumjcfy = 0;
if(sygs.getCumJcfy() > 0) { if(sygs != null && sygs.getCumJcfy() > 0) {
cumjcfy = sygs.getCumJcfy() + 5000; cumjcfy = sygs.getCumJcfy() + 5000;
}else { }else {
int xcy = 0; int xcy = 0;
YgglMainEmp xzrz = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, gsus).eq(YgglMainEmp::getOrgCode, orgcode)); YgglMainEmp xzrz = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, gsus).eq(YgglMainEmp::getOrgCode, orgcode));
if(xzrz != null) { if(xzrz != null) {
String entry_date = ClockInTool.SunNovCSTYMD(xzrz.getRzTime());//yyyyMMdd // String entry_date = ClockInTool.SunNovCSTYMD(xzrz.getRzTime());//yyyyMMdd
String entry_date = ClockInTool.SunNovCSTYM(xzrz.getRzTime());//yyyyMM
if(bssz.getTaxReturnCycle().equals(1)) {//当月报税 if(bssz.getTaxReturnCycle().equals(1)) {//当月报税
if(entry_date.substring(0,4).equals(strY)) {//判断是否是本年 if(entry_date.substring(0,4).equals(strY)) {//判断是否是本年
xcy = SalaryTool.getMonthDiff(entry_date, salary_month+"-01"); xcy = SalaryTool.getMonthDiff(entry_date+"-01", salary_month+"-01");
}else { }else {
xcy = SalaryTool.getMonthDiff(strY+"-01-01", salary_month+"-01"); xcy = SalaryTool.getMonthDiff(strY+"-01-01", salary_month+"-01");
} }
cumjcfy = xcy*5000; cumjcfy = xcy*5000;
}else {//次月报税 }else {//次月报税
if(entry_date.substring(0,4).equals(strY)) {//判断是否是本年 if(entry_date.substring(0,4).equals(strY)) {//判断是否是本年
xcy = SalaryTool.getMonthDiff(entry_date, salary_month+"-01")+1; xcy = SalaryTool.getMonthDiff(entry_date+"-01", salary_month+"-01")+1;
}else { }else {
xcy = SalaryTool.getMonthDiff(strY+"-01-01", salary_month+"-01")+1; xcy = SalaryTool.getMonthDiff(strY+"-01-01", salary_month+"-01")+1;
} }
...@@ -2222,7 +2232,7 @@ public class SalaryManagementController { ...@@ -2222,7 +2232,7 @@ public class SalaryManagementController {
double cumynssde = 0; double cumynssde = 0;
cumynssde = gsmx.getCumSre() - cumjcfy - gsmx.getCumZxkc() - gsmx.getCumZxfjkc() - gsmx.getCumQtkc(); cumynssde = gsmx.getCumSre() - cumjcfy - gsmx.getCumZxkc() - gsmx.getCumZxfjkc() - gsmx.getCumQtkc();
gsmx.setCumYnssde(cumynssde);//累计应纳税所得额 【累计收入额-累计减除费用-累计专项扣除-累计专项附加扣除-累计其他扣除】 gsmx.setCumYnssde(SalaryTool.formatDouble_(cumynssde));//累计应纳税所得额 【累计收入额-累计减除费用-累计专项扣除-累计专项附加扣除-累计其他扣除】
String[] miscalculation = getPersonalincometax(cumynssde); String[] miscalculation = getPersonalincometax(cumynssde);
gsmx.setTaxRate(Double.valueOf(miscalculation[0]));//税率 gsmx.setTaxRate(Double.valueOf(miscalculation[0]));//税率
...@@ -2258,7 +2268,7 @@ public class SalaryManagementController { ...@@ -2258,7 +2268,7 @@ public class SalaryManagementController {
List<XcglAssoTaxFormula> taxratelist = XcglAssoTaxFormula.builder().build().selectList(new QueryWrapper<XcglAssoTaxFormula>().lambda().eq(XcglAssoTaxFormula::getQyid, 0)); List<XcglAssoTaxFormula> taxratelist = XcglAssoTaxFormula.builder().build().selectList(new QueryWrapper<XcglAssoTaxFormula>().lambda().eq(XcglAssoTaxFormula::getQyid, 0));
double personalIncomeTax=0;//个税 double personalIncomeTax=0;//个税
double money=36000;//应交税工资最低点 double money=36000;//应交税工资最低点
if(taxpayroll>money){//应交税 if(taxpayroll>0){//应交税
for (XcglAssoTaxFormula tax : taxratelist) {//计算个税 for (XcglAssoTaxFormula tax : taxratelist) {//计算个税
if(tax.getTaxablestart()<=taxpayroll&&taxpayroll<tax.getTaxableend()){ if(tax.getTaxablestart()<=taxpayroll&&taxpayroll<tax.getTaxableend()){
//个人所得税=计税工资*税率-速算扣除数 //个人所得税=计税工资*税率-速算扣除数
...@@ -2273,6 +2283,7 @@ public class SalaryManagementController { ...@@ -2273,6 +2283,7 @@ public class SalaryManagementController {
} }
} }
}else{ }else{
perinctax[0] = "0"; perinctax[0] = "0";
perinctax[1] = "0"; perinctax[1] = "0";
perinctax[2] = "0"; perinctax[2] = "0";
...@@ -2914,15 +2925,7 @@ public class SalaryManagementController { ...@@ -2914,15 +2925,7 @@ public class SalaryManagementController {
@PostMapping(value = "/obtainidedu") @PostMapping(value = "/obtainidedu")
@ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "获取附加扣除数据", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) { public ResponseResult ObtainAdditionalDeduction(@CurrentUser UserBean userBean,@RequestBody SearchSalariedPeopleDto search) {
search.setOrgcode(userBean.getOrgCode()); search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeductiontwo(search); List<AdditionalDeductionDto> fjkclist = xcglassozxfjkcmapper.selectAdditionalDeductiontwo(search);
return new ResponseResult().success("获取附加扣除数据成功", fjkclist); return new ResponseResult().success("获取附加扣除数据成功", fjkclist);
...@@ -2939,13 +2942,6 @@ public class SalaryManagementController { ...@@ -2939,13 +2942,6 @@ public class SalaryManagementController {
search.getTotalPage() == null ? 10 : search.getTotalPage()); search.getTotalPage() == null ? 10 : search.getTotalPage());
search.setOrgcode(userBean.getOrgCode()); search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("66");
}else {
search.setStatus("3");
}
IPage<AdditionalDeductionDto> pageAs = xcglassozxfjkcmapper.selectAdditionalDeduction(page, search); IPage<AdditionalDeductionDto> pageAs = xcglassozxfjkcmapper.selectAdditionalDeduction(page, search);
List<AdditionalDeductionDto> listAs = pageAs.getRecords(); List<AdditionalDeductionDto> listAs = pageAs.getRecords();
...@@ -3394,18 +3390,11 @@ public class SalaryManagementController { ...@@ -3394,18 +3390,11 @@ public class SalaryManagementController {
search.getTotalPage() == null ? 10 : search.getTotalPage()); search.getTotalPage() == null ? 10 : search.getTotalPage());
search.setOrgcode(userBean.getOrgCode()); search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
IPage<XcglAssoGsjsmxDto> pageAs = xcglassogsjsmxmapper.SelectIndividualincomedetails(page, search); page.setTotal(xcglassogsjsmxmapper.listPageCount(search));
List<XcglAssoGsjsmxDto> listAs = pageAs.getRecords(); List<XcglAssoGsjsmxDto> listAs = xcglassogsjsmxmapper.listPage(search);
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(page, listAs, "操作成功!");
} }
/** /**
...@@ -3415,14 +3404,7 @@ public class SalaryManagementController { ...@@ -3415,14 +3404,7 @@ public class SalaryManagementController {
@ApiOperation(value = "获取个税明细数据", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "获取个税明细数据", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> IndividualIncomeDetailsAll(@CurrentUser UserBean userBean, @RequestBody SearchSalariedPeopleDto search) { public Result<Object> IndividualIncomeDetailsAll(@CurrentUser UserBean userBean, @RequestBody SearchSalariedPeopleDto search) {
search.setOrgcode(userBean.getOrgCode()); search.setOrgcode(userBean.getOrgCode());
if(("0").equals(search.getStatus())) {//全部 List<XcglAssoGsjsmxDto> listAs = xcglassogsjsmxmapper.SelectIndividualincomedetailsAll(search);
search.setStatus("");
}else if(("1").equals(search.getStatus())) {//在职
search.setStatus("0");
}else {
search.setStatus("3");
}
List<XcglAssoGsjsmxDto> listAs = xcglassogsjsmxmapper.SelectIndividualincomedetails(search);
return ResultUtil.data(listAs, "操作成功!"); return ResultUtil.data(listAs, "操作成功!");
} }
......
...@@ -17,9 +17,18 @@ import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto; ...@@ -17,9 +17,18 @@ import cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto;
*/ */
@Repository @Repository
public interface XcglAssoGsjsmxMapper extends BaseMapper<XcglAssoGsjsmx> { public interface XcglAssoGsjsmxMapper extends BaseMapper<XcglAssoGsjsmx> {
List<XcglAssoGsjsmxDto> SelectIndividualincomedetails(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto); List<XcglAssoGsjsmxDto> SelectIndividualincomedetailsAll(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
IPage<XcglAssoGsjsmxDto> SelectIndividualincomedetails(IPage<XcglAssoGsjsmxDto> page,@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto); /**
* 分页统计总数
* @return
*/
Integer listPageCount(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
/**
* 分页数据
* @return
*/
List<XcglAssoGsjsmxDto> listPage(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
List<XcglAssoGsjsmx> Allyearround(String year,String usernum,Integer qyid); List<XcglAssoGsjsmx> Allyearround(String year,String usernum,Integer qyid);
......
...@@ -31,4 +31,13 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> { ...@@ -31,4 +31,13 @@ public interface XcglAssoJsgzzxMapper extends BaseMapper<XcglAssoJsgzzx> {
List<XcglAssoJsgzzx> selectSalarySectionList(int xzzid); List<XcglAssoJsgzzx> selectSalarySectionList(int xzzid);
List<XcglAssoJsgzzx> SalaryRuleGroupItem(int xzzid); List<XcglAssoJsgzzx> SalaryRuleGroupItem(int xzzid);
int insertxcglassojsgzzxListTwo(List<XcglAssoJsgzzx> xcglassojsgzzx);
/**
* 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项
* @param xzdazdyid
* @return
*/
int deleteByxzdazdyid(int xzdazdyid);
} }
...@@ -23,7 +23,7 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> { ...@@ -23,7 +23,7 @@ public interface XcglAssoZxfjkcMapper extends BaseMapper<XcglAssoZxfjkc> {
int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int insertXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
List<AdditionalDeductionDto> selectAdditionalDeductiontwo(SearchSalariedPeopleDto searchsalariedpeopledto); List<AdditionalDeductionDto> selectAdditionalDeductiontwo(@Param("param") SearchSalariedPeopleDto searchsalariedpeopledto);
int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc); int updateXcglAssoZxfjkc(XcglAssoZxfjkc xcglassozxfjkc);
......
package cn.timer.api.dto.xcgl; package cn.timer.api.dto.xcgl;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
import cn.timer.api.utils.Page; import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -20,8 +21,8 @@ public class SearchSalariedPeopleDto extends Page { ...@@ -20,8 +21,8 @@ public class SearchSalariedPeopleDto extends Page {
private static final long serialVersionUID = 6251994337286870380L; private static final long serialVersionUID = 6251994337286870380L;
@ApiModelProperty(value="员工状态 ",example="员工状态") @ApiModelProperty(value="员工状态列表 ",example="员工状态列表")
String status; List<Integer> status;
@ApiModelProperty(value="姓名/工号 ",example="姓名/工号") @ApiModelProperty(value="姓名/工号 ",example="姓名/工号")
String text; String text;
......
...@@ -24,9 +24,9 @@ import lombok.NoArgsConstructor; ...@@ -24,9 +24,9 @@ import lombok.NoArgsConstructor;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class YgQueryDto extends Page implements Serializable { public class YgQueryDto extends Page {
private static final long serialVersionUID = -1230023773946170942L; // private static final long serialVersionUID = -1230023773946170942L;
@ApiModelProperty(value = "员工姓名", example = "华仔") @ApiModelProperty(value = "员工姓名", example = "华仔")
private String empName; private String empName;
......
...@@ -41,7 +41,7 @@ public class Page { ...@@ -41,7 +41,7 @@ public class Page {
this.totalPage = totalPage; this.totalPage = totalPage;
} }
public Integer getOffset() { public Integer getOffset() {
return this.currentPage > 0 ? (this.currentPage - 1) * this.totalPage : 0; return this.getCurrentPage() > 0 ? (this.getCurrentPage() - 1) * this.getTotalPage() : 0;
} }
public void setOffset(Integer offset) { public void setOffset(Integer offset) {
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<resultMap id="BaseXcglAssoGsjsmxDto" type="cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto" > <resultMap id="BaseXcglAssoGsjsmxDto" type="cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto" >
<result column="phone" property="phone" /> <result column="phone" property="phone" />
<result column="user_num" property="userNum" /> <result column="emp_num" property="userNum" />
<result column="user_name" property="userName" /> <result column="emp_name" property="userName" />
<result column="salary_month" property="salaryMonth" /> <result column="salary_month" property="salaryMonth" />
<result column="tax_month" property="taxMonth" /> <result column="tax_month" property="taxMonth" />
<result column="thmonth_personal" property="thmonthPersonal" /> <result column="thmonth_personal" property="thmonthPersonal" />
...@@ -61,20 +61,60 @@ ...@@ -61,20 +61,60 @@
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
</resultMap> </resultMap>
<select id="SelectIndividualincomedetails" resultMap="BaseXcglAssoGsjsmxDto"> <!-- 分页 -->
select em.phone, <select id="listPageCount" resultType="java.lang.Integer">
gs.* select count(*)
from xcgl_asso_gsjsmx gs from yggl_main_emp emp
LEFT JOIN yggl_main_emp as em on em.emp_num = gs.user_num and em.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
where gs.qyid = #{param.orgcode} <if test="param.status != null and param.status.size() >0" >
and emp.job_status in
<foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select id="listPage" resultMap="BaseXcglAssoGsjsmxDto">
select emp.phone, emp.emp_num, emp.name as emp_name, gs.*
from (select emp.phone, emp.emp_num, emp.name
from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if test="param.status != null and param.status.size() >0" >
and emp.job_status in
<foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if>
<if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
limit #{param.offset}, #{param.totalPage}) emp
LEFT JOIN xcgl_asso_gsjsmx gs on emp.emp_num = gs.user_num and gs.qyid = #{param.orgcode}
<if test="param.datetime != ''" > <if test="param.datetime != ''" >
and gs.salary_month = #{param.datetime} and gs.salary_month = #{param.datetime}
</if> </if>
<if test="param.status != ''" > </select>
and em.job_status = #{param.status}
<select id="SelectIndividualincomedetailsAll" resultMap="BaseXcglAssoGsjsmxDto">
select emp.phone, emp.emp_num, emp.name as emp_name,gs.*
from (select emp.phone, emp.emp_num, emp.name
from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if test="param.status != null and param.status.size() >0" >
and emp.job_status in
<foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if> </if>
<if test="param.text != ''" > <if test="param.text != ''" >
and (em.`name` like CONCAT('%',#{param.text},'%') or em.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
) emp
LEFT JOIN xcgl_asso_gsjsmx gs on emp.emp_num = gs.user_num and gs.qyid = #{param.orgcode}
<if test="param.datetime != ''" >
and gs.salary_month = #{param.datetime}
</if> </if>
</select> </select>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<result column="rulestate" property="rulestate" /> <result column="rulestate" property="rulestate" />
<result column="optionid" property="optionid" /> <result column="optionid" property="optionid" />
<result column="is_custom" property="isCustom" /> <result column="is_custom" property="isCustom" />
<result column="xzdazdyid" property="xzdazdyid" />
</resultMap> </resultMap>
...@@ -96,6 +97,12 @@ ...@@ -96,6 +97,12 @@
DELETE FROM xcgl_asso_jsgzzx DELETE FROM xcgl_asso_jsgzzx
WHERE xzzid = #{xzzid} WHERE xzzid = #{xzzid}
</delete> </delete>
<!-- 删除薪资档案值的同时删除已添加到薪资组(未锁定的组)中的薪资项 -->
<delete id="deleteByxzdazdyid">
delete jsgzzx from xcgl_asso_jsgzzx jsgzzx, xcgl_admin_xzz xxz
where jsgzzx.xzdazdyid = #{xzdazdyid} and xxz.is_xzsd = 0
and jsgzzx.xzzid = xxz.id
</delete>
<insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" > <insert id="insertxcglassojsgzzxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" >
insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid) insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid)
...@@ -152,6 +159,62 @@ ...@@ -152,6 +159,62 @@
</foreach> </foreach>
</insert> </insert>
<insert id="insertxcglassojsgzzxListTwo" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" >
insert into xcgl_asso_jsgzzx (salaryitem,yhmbzd,rule,type,addtime,adduserid,jxgzid,remarks,gsid,gsgs,dygk,degk,xzzid,rulestate,optionid,xzdazdyid)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.salaryitem != null" >
#{item.salaryitem,jdbcType=VARCHAR},
</if>
<if test="item.yhmbzd != null" >
#{item.yhmbzd,jdbcType=VARCHAR},
</if>
<if test="item.rule != null" >
#{item.rule,jdbcType=VARCHAR},
</if>
<if test="item.type != null" >
#{item.type,jdbcType=INTEGER},
</if>
<if test="item.addtime != null" >
#{item.addtime,jdbcType=BIGINT},
</if>
<if test="item.adduserid != null" >
#{item.adduserid,jdbcType=INTEGER},
</if>
<if test="item.jxgzid != null" >
#{item.jxgzid,jdbcType=INTEGER},
</if>
<if test="item.remarks != null" >
#{item.remarks,jdbcType=VARCHAR},
</if>
<if test="item.gsid != null" >
#{item.gsid,jdbcType=INTEGER},
</if>
<if test="item.gsgs != null" >
#{item.gsgs,jdbcType=VARCHAR},
</if>
<if test="item.dygk != null" >
#{item.dygk,jdbcType=DOUBLE},
</if>
<if test="item.degk != null" >
#{item.degk,jdbcType=DOUBLE},
</if>
<if test="item.xzzid != null" >
#{item.xzzid,jdbcType=INTEGER},
</if>
<if test="item.rulestate != null" >
#{item.rulestate,jdbcType=INTEGER},
</if>
<if test="item.optionid != null" >
#{item.optionid,jdbcType=INTEGER},
</if>
<if test="item.xzdazdyid != null" >
#{item.xzdazdyid,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<insert id="jsgzzxinsert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoJsgzzx"> <insert id="jsgzzxinsert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoJsgzzx">
INSERT INTO xcgl_asso_jsgzzx INSERT INTO xcgl_asso_jsgzzx
......
...@@ -175,8 +175,11 @@ ...@@ -175,8 +175,11 @@
<select id="selectFixedSalaryStaffCount" resultType="java.lang.Long"> <select id="selectFixedSalaryStaffCount" resultType="java.lang.Long">
select COUNT(*) from yggl_main_emp emp select COUNT(*) from yggl_main_emp emp
where emp.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != ''" > <if test="param.status != null and param.status.size() >0" >
and emp.job_status = #{param.status} and emp.job_status in
<foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if> </if>
<if test="param.text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
...@@ -209,8 +212,11 @@ ...@@ -209,8 +212,11 @@
xzdaz.xzdadxid as xzdadxid xzdaz.xzdadxid as xzdadxid
from (select * from yggl_main_emp emp from (select * from yggl_main_emp emp
where emp.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != ''" > <if test="param.status != null and param.status.size() >0" >
and emp.job_status = #{param.status} and emp.job_status in
<foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if> </if>
<if test="param.text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
......
...@@ -77,12 +77,11 @@ ...@@ -77,12 +77,11 @@
and zxfj.taxmonth = #{param.datetime} and zxfj.taxmonth = #{param.datetime}
</if> </if>
where emp.org_code = #{param.orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != null and param.status.size() >0" >
<if test="param.status != '' and param.status != '66'" > and emp.job_status in
and emp.job_status = #{param.status} <foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
</if> #{item, jdbcType=INTEGER}
<if test="param.status != '' and param.status == '66'" > </foreach>
and emp.job_status in (0,1)
</if> </if>
<if test="param.text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
...@@ -103,16 +102,18 @@ ...@@ -103,16 +102,18 @@
zxfj.totalmoney as lj zxfj.totalmoney as lj
from yggl_main_emp emp from yggl_main_emp emp
LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num LEFT JOIN xcgl_asso_zxfjkc as zxfj on zxfj.userid = emp.emp_num
<if test="datetime != ''" > <if test="param.datetime != ''" >
and zxfj.taxmonth = #{datetime} and zxfj.taxmonth = #{param.datetime}
</if> </if>
where emp.org_code = #{orgcode} where emp.org_code = #{param.orgcode}
<if test="param.status != null and param.status.size() >0" >
<if test="status != ''" > and emp.job_status in
and emp.job_status = #{status} <foreach collection="param.status" open="(" close=")" separator="," index="i" item="item">
#{item, jdbcType=INTEGER}
</foreach>
</if> </if>
<if test="text != ''" > <if test="param.text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text}) and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if> </if>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment