Commit 2f010017 by mobh Committed by chenzg

修改部分代码及 增加保存薪资明细修改接口

parent 815aa215
......@@ -92,6 +92,7 @@ import cn.timer.api.dto.xcgl.CalculationOptionsDto;
import cn.timer.api.dto.xcgl.ChangeSalaryDto;
import cn.timer.api.dto.xcgl.CheckSalaryStaffDto;
import cn.timer.api.dto.xcgl.CjPayrollGroupDto;
import cn.timer.api.dto.xcgl.ComputeUserDto;
import cn.timer.api.dto.xcgl.CustomDto;
import cn.timer.api.dto.xcgl.FixedSalaryStaffDto;
import cn.timer.api.dto.xcgl.FixedsalaryDto;
......@@ -100,7 +101,6 @@ import cn.timer.api.dto.xcgl.ImportSalaryDto;
import cn.timer.api.dto.xcgl.ImportSalarySetDto;
import cn.timer.api.dto.xcgl.IndividualTaxDetailsDto;
import cn.timer.api.dto.xcgl.ModifyPayslipDto;
import cn.timer.api.dto.xcgl.ModifysalaryruleDto;
import cn.timer.api.dto.xcgl.PayCustomDto;
import cn.timer.api.dto.xcgl.PayCustomZDYDto;
import cn.timer.api.dto.xcgl.PayGroupedDataDto;
......@@ -113,6 +113,7 @@ import cn.timer.api.dto.xcgl.SalaryCustomizationDto;
import cn.timer.api.dto.xcgl.SalaryFieldDto;
import cn.timer.api.dto.xcgl.SalaryGroupGroupingDto;
import cn.timer.api.dto.xcgl.SalaryItemRulesDto;
import cn.timer.api.dto.xcgl.SalaryPersonFieldDto;
import cn.timer.api.dto.xcgl.SearchSalariedPeopleDto;
import cn.timer.api.dto.xcgl.SpecialDeductionDto;
import cn.timer.api.dto.xcgl.TjSalaryItemDot;
......@@ -307,7 +308,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(paygro.getXzyf());//薪资月份
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//开始);//算薪月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//开始);//算薪月份
xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId();
......@@ -649,34 +650,6 @@ public class SalaryManagementController {
}
/**
* @param userBean
* @param modifysalaryruledto
* @return
*/
@PostMapping(value = "/modifysalaryrule")
@ApiOperation(value = "修改薪资规则", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> Modifysalaryrule(@CurrentUser UserBean userBean,@RequestBody ModifysalaryruleDto modifysalaryruledto) {
return XcglAssoJsgzzx.builder().gsid(modifysalaryruledto.getXcjsgzid()).gsgs(modifysalaryruledto.getFormula()).id(modifysalaryruledto.getJsgzzxid()).build().updateById() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
/**
* @param userBean
* @param id 薪资选项id
* @return
*/
@GetMapping(value="/popupsalaryrule/{id}")
@ApiOperation(value = "弹出薪资规则", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> Popupsalaryrule(@CurrentUser UserBean userBean,@PathVariable("id") Integer id) {
List<XcglAssoXcjsgz> gzgs = XcglAssoXcjsgz.builder().build().selectList(new QueryWrapper<XcglAssoXcjsgz>().lambda().eq(XcglAssoXcjsgz::getOptionid, id));
return ResultUtil.data(gzgs,"操作成功!");
}
/**
* 删除薪资组 ***********
*/
@DeleteMapping(value = "/paydelete/{id}")
......@@ -752,7 +725,7 @@ public class SalaryManagementController {
xcglxzz.setPxfs(paygro.getPxfs());// 选择配薪方式(0:空白模板;df:默认)
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setId(paygro.getId());
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.updateById();
int payid = paygro.getId();
xcglassoxzurymapper.xzurydelete(payid);
......@@ -1217,7 +1190,6 @@ public class SalaryManagementController {
zzx.setRemarks(payc.getRemarks());//备注
zzx.setXzzid(payc.getGid());//
zzx.setOptionid(0);
zzx.setIsCustom(1);//是否自定义项(0:否;1:是)
xcglassojsgzzxmapper.jsgzzxinsert(zzx);
return new ResponseResult().success("创建薪资组成功", zzx);
}
......@@ -1255,89 +1227,24 @@ public class SalaryManagementController {
/*******计算薪资*********/
/**
* 每月手动导入所需导出的表头数据
*/
@GetMapping(value = "/monthly_manual_import/{id}")
@ApiOperation(value = "每月手动导入所需导出的表头数据", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> MonthlyManualImport(@CurrentUser UserBean userBean,@PathVariable Integer id) {
//rulestate:规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
List<XcglAssoJsgzzx> jsgzzx = XcglAssoJsgzzx.builder().build().selectList(new QueryWrapper<XcglAssoJsgzzx>().lambda().eq(XcglAssoJsgzzx::getXzzid, id)
.eq(XcglAssoJsgzzx::getRulestate, 4));
return ResultUtil.data(jsgzzx);
}
/**
* 导入浮动数据薪资
*/
@PostMapping(value = "/payimport")
@ApiOperation(value = "导入薪资", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ImportSalaryData(@CurrentUser UserBean userBean,@RequestBody ImportSalarySetDto impor) {
// XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, impor.getGid()).one();
//用户工号来匹配入库
//XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, orgCode).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, impor.getUsernum()).one();
//用户名称来匹配入库
//XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),impor.getUsername(),String.valueOf(orgCode));
ImportSalaryDto[] ims = impor.getImsalary();//
if(ims.length>0){
for(int p=0;p<ims.length;p++){
//用户工号来匹配入库
XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, userBean.getOrgCode()).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, ims[p].getUsernum()).one();
//用户名称来匹配入库
XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
int k = 0;
if(xzuryone != null) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(xzuryone.getUserid());//
xzb.setXzyf(impor.getSxrq());//
xzb.setXzxid(ims[p].getJsgzzx());//
xzb.setXzxjg(String.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
k++;
}
if(yhmpp != null && k == 0) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(yhmpp.getUserid());//
xzb.setXzyf(impor.getSxrq());//
xzb.setXzxid(ims[p].getJsgzzx());//
xzb.setXzxjg(String.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
}
}
}
return new ResponseResult().success("考勤数据同步成功");
}
/**
* 查看薪资
*/
@GetMapping(value = "/checksalary/{id}")
@ApiOperation(value = "查看薪资", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult CheckSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
@PostMapping(value = "/checksalary")
@ApiOperation(value = "查看薪资", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult CheckSalary(@CurrentUser UserBean userBean, @RequestBody CheckSalaryStaffDto checksalary) {
//计算完成 返回数据
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
checksalary.setOrgcode(userBean.getOrgCode());
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(checksalary);
return new ResponseResult().success("查看薪资成功", jswsj);
}
/**
* 获取计薪规则组项
*/
@GetMapping(value = "/payrulegroupitem/{id}")
@GetMapping(value = "/payrulegroupitem/{id}/{xzyf}")
@ApiOperation(value = "获取计薪规则组项", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult Payrulegroupitem(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
public ResponseResult Payrulegroupitem(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String xzyf) {
SalaryFieldDto salfie = new SalaryFieldDto();
List<XcglAssoJsgzzx> jsgzzxlist = new LambdaQueryChainWrapper<XcglAssoJsgzzx>(xcglassojsgzzxmapper).eq(XcglAssoJsgzzx::getXzzid, id).eq(XcglAssoJsgzzx::getType,2).list();
List<CalculatedFieldDto> fielist = new ArrayList<CalculatedFieldDto>();
......@@ -1368,8 +1275,11 @@ public class SalaryManagementController {
// if(usfil.size() > 0) {
// salfie.setComuser(usfil);
// }
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
checksalary.setXzyf(xzyf);
checksalary.setOrgcode(userBean.getOrgCode());
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(checksalary);
salfie.setComuser(jswsj);
return new ResponseResult().success("获取计薪规则组项成功", salfie);
......@@ -1387,7 +1297,7 @@ public class SalaryManagementController {
@ApiOperation(value = "计算薪资", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult CalculateSalary(@CurrentUser UserBean userBean,@PathVariable Integer id) {
String sxrq = "";
String xzyf = "";
//typeid--1:计算 2:重新计算
//已知薪资组id****
......@@ -1401,7 +1311,7 @@ public class SalaryManagementController {
//薪资组信息
@SuppressWarnings("unused")
XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, id).one();
sxrq = xzz.getXzyf();
xzyf = xzz.getSalarymonth();
//当前薪资组内人员
List<XcglAssoXzury> znrys = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getXzzid, id).eq(XcglAssoXzury::getQyid,userBean.getOrgCode()).list();
List<CalculationDto> jswsj = null;
......@@ -1409,7 +1319,7 @@ public class SalaryManagementController {
for(XcglAssoXzury znr:znrys) {
xcglassoxzbmapper.deleteByuserid(znr.getUserid(),id,sxrq);//删除已经计算的薪资
xcglassoxzbmapper.deleteByuserid(znr.getUserid(),id,xzyf);//删除已经计算的薪资
//查询员工定薪数据
XcglAssoXzdadx isdx = new LambdaQueryChainWrapper<XcglAssoXzdadx>(xcglassoxzdadxmapper).eq(XcglAssoXzdadx::getUserid,znr.getUserid()).eq(XcglAssoXzdadx::getQyid, userBean.getOrgCode()).eq(XcglAssoXzdadx::getTxzt, 0).one();
......@@ -1419,7 +1329,7 @@ public class SalaryManagementController {
for(CalculationOptionsDto cal:gdxzx) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(cal.getId());//薪资项id
xzb.setXzxjg(cal.getRsz());//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1431,7 +1341,7 @@ public class SalaryManagementController {
for(XcglAssoJsgzzx cal:jsgzzxlist) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(cal.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1454,12 +1364,12 @@ public class SalaryManagementController {
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 = ?
queryWrapper.select(fieldname).eq("num", znr.getUserid()).eq("org_code", userBean.getOrgCode()).eq("belong_year", xzyf.substring(0, 4)).eq("belong_month", Integer.valueOf(xzyf.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 = ?
queryWrapper.select(fieldname).eq("user_num", znr.getUserid()).eq("qyid", userBean.getOrgCode()).eq("zymonth", xzyf);//select #{tablename} from yggl_main_emp where emp_num = ?
list = sbgjjassoyjzdmapper.selectMaps(queryWrapper);
}
......@@ -1493,7 +1403,7 @@ public class SalaryManagementController {
if(fieldname.equals("name") || fieldname.equals("emp_num")) {
xzb.setXzyf("");//薪资月
}else {
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
}
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg(("").equals(autacq) ? "0" : autacq);//薪资项结果
......@@ -1507,7 +1417,7 @@ public class SalaryManagementController {
if(("部门").equals(lbcx.getOptionname()) || ("职位").equals(lbcx.getOptionname())) {
xzb.setXzyf("");//薪资月
}else {
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
}
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("");//薪资项结果
......@@ -1517,7 +1427,7 @@ public class SalaryManagementController {
//入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1544,7 +1454,7 @@ public class SalaryManagementController {
//入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1554,7 +1464,7 @@ public class SalaryManagementController {
//入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1566,7 +1476,11 @@ public class SalaryManagementController {
}
//计算完成 返回数据
jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
checksalary.setXzyf(xzyf);
checksalary.setOrgcode(userBean.getOrgCode());
jswsj = xcglassoxzbmapper.CalculationResults(checksalary);
return new ResponseResult().success("计算完成", jswsj);
}else {//该组无人
......@@ -1611,7 +1525,6 @@ public class SalaryManagementController {
//#2、考勤数据
//#3、套公式算结果
//#4、数据写入薪资表
......@@ -1619,8 +1532,6 @@ public class SalaryManagementController {
return ResultUtil.data(null, "计算完成");
}
/**
* 新增/修改--报税周期信息
*/
......@@ -1692,7 +1603,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(budpaygr.getXzyf());//薪资月份
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId();
......@@ -1798,9 +1709,9 @@ public class SalaryManagementController {
/**
* 同步考勤 XXXXXXX
*/
@GetMapping(value = "/SynchroAtt/{id}/{sxrq}")
@GetMapping(value = "/SynchroAtt/{id}/{xzyf}")
@ApiOperation(value = "同步考勤", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult SynchroAttendance(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) {
public ResponseResult SynchroAttendance(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String xzyf) {
//已知薪资组id****
//规则状态[0:系统自动提取;1:系统固定值;2:固定公式计算;3:自定义公式计算;4:每月自动导入]
//薪资组信息
......@@ -1812,7 +1723,7 @@ public class SalaryManagementController {
if(znrys.size() > 0) {//该薪资组有成员
for(XcglAssoXzury znr:znrys) {
//删除已经计算的考勤薪资
xcglassoxzbmapper.deleteByAttendance(znr.getUserid(), id,sxrq);
xcglassoxzbmapper.deleteByAttendance(znr.getUserid(), id,xzyf);
//计算得出考勤相关数据
AttendanceReport attrep = getAttendanceReport(userBean.getOrgCode(),znr.getUserid(),xzz.getPayrollcycle());
......@@ -1852,7 +1763,7 @@ public class SalaryManagementController {
//入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(payatt.getId());//薪资项id
xzb.setXzxjg(String.valueOf(autacq));//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1862,7 +1773,7 @@ public class SalaryManagementController {
//入[薪资表]
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(sxrq);//薪资月
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(payatt.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setQyid(userBean.getOrgCode());
......@@ -1876,7 +1787,11 @@ public class SalaryManagementController {
}
//计算完成 返回数据
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
checksalary.setXzyf(xzyf);
checksalary.setOrgcode(userBean.getOrgCode());
List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(checksalary);
return new ResponseResult().success("考勤数据同步成功", jswsj);
......@@ -1893,7 +1808,6 @@ public class SalaryManagementController {
* @param orgCode 企业id
* @param userid 用户id
* @param payrolldate 计薪日期
* @param attendancedetails
* @return
*/
public AttendanceReport getAttendanceReport(int orgCode,int userid,String payrolldate) {
......@@ -2116,6 +2030,56 @@ public class SalaryManagementController {
}
/**
* 导入薪资
*/
@PostMapping(value = "/payimport")
@ApiOperation(value = "导入薪资", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult ImportSalaryData(@CurrentUser UserBean userBean,@RequestBody ImportSalarySetDto impor) {
// XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, impor.getGid()).one();
//用户工号来匹配入库
//XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, orgCode).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, impor.getUsernum()).one();
//用户名称来匹配入库
//XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),impor.getUsername(),String.valueOf(orgCode));
ImportSalaryDto[] ims = impor.getImsalary();//
if(ims.length>0){
for(int p=0;p<ims.length;p++){
//用户工号来匹配入库
XcglAssoXzury xzuryone = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getQyid, userBean.getOrgCode()).eq(XcglAssoXzury::getXzzid, impor.getGid()).eq(XcglAssoXzury::getUserid, ims[p].getUsernum()).one();
//用户名称来匹配入库
XcglAssoXzury yhmpp = xcglassoxzurymapper.selectImportedSalary(impor.getGid(),ims[p].getUsername(),String.valueOf(userBean.getOrgCode()));
int k = 0;
if(xzuryone != null) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(xzuryone.getUserid());//
xzb.setXzyf(impor.getSxrq());//
xzb.setXzxid(ims[p].getJsgzzx());//
xzb.setXzxjg(String.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
k++;
}
if(yhmpp != null && k == 0) {
XcglAssoXzb xzb = XcglAssoXzb.builder().build();
xzb.setUserid(yhmpp.getUserid());//
xzb.setXzyf(impor.getSxrq());//
xzb.setXzxid(ims[p].getJsgzzx());//
xzb.setXzxjg(String.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
}
}
}
return new ResponseResult().success("考勤数据同步成功");
}
/**
* 切换薪资日期
*/
......@@ -2758,4 +2722,10 @@ public class SalaryManagementController {
return new ResponseResult().success("添加/修改成功", obj);
}
@PostMapping(value = "/saveSalaryDetails")
@ApiOperation(value = "保存薪资明细修改", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult saveSalaryDetails(@CurrentUser UserBean userBean,@RequestBody List<XcglAssoXzb> list) {
xcglassoxzbmapper.updateBatchXzxjg(list);
return new ResponseResult().success("保存成功");
}
}
package cn.timer.api.dao.xcgl;
import java.util.List;
import cn.timer.api.dto.xcgl.CheckSalaryStaffDto;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -20,7 +21,7 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
int deleteByuserid(int userid,int xzzid,String xzyf);
List<CalculationDto> CalculationResults(int xzzid,int orgcode);
List<CalculationDto> CalculationResults(CheckSalaryStaffDto checksalary);
int deleteByAttendance(int userid,int xzzid,String xzyf);
......@@ -31,4 +32,6 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
CalculationValueDto lateearlyDeduction(int empnum,int xzzid,String salaryitem);
int ModifyImportedSalary(XcglAssoXzb xcglassoxzb);
void updateBatchXzxjg(List<XcglAssoXzb> list);
}
......@@ -19,6 +19,9 @@ public class CheckSalaryStaffDto extends Page{
@ApiModelProperty(value="薪资组id ",example="薪资组id")
int paygroupid;
@ApiModelProperty(value="薪资月份 ",example="薪资月份")
private String xzyf;
@ApiModelProperty(value="企业编号 ",example="企业编号")
int orgcode;
}
......@@ -73,8 +73,12 @@
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{xzzid})
and xzbs.xzyf = (select xzz.xzyf from xcgl_admin_xzz xzz where xzz.id = #{xzzid})
where emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{paygroupid})
and (xzbs.xzyf = #{xzyf} or xzbs.xzyf = '')
and emp.emp_num in (select xzury.userid from xcgl_asso_xzury xzury where xzury.xzzid = #{paygroupid})
<if test="text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
) as aa
where aa.orgcode = #{orgcode}
</select>
......@@ -193,6 +197,17 @@
and xzxid = #{xzxid}
</update>
<!-- 批量更新薪资结果 -->
<update id="updateBatchXzxjg" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
UPDATE xcgl_asso_xzb
<set>
xzxjg=${item.xzxjg}
</set>
where id = ${item.id}
</foreach>
</update>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzb
WHERE id = #{id}
......
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