Commit 8c8e2c62 by ilal Committed by chenzg

提交

parent e0bde6b1
......@@ -49,7 +49,7 @@ public class XcglAssoXzb extends Model<XcglAssoXzb> {
private Integer xzxid;
@ApiModelProperty(value="薪资项结果 ",example="薪资项结果")
private String xzxjg;
private Double xzxjg;
@ApiModelProperty(value="企业id ",example="企业id")
private Integer qyid;
......
......@@ -92,7 +92,6 @@ 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;
......@@ -101,6 +100,7 @@ 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,7 +113,6 @@ 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;
......@@ -308,7 +307,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(paygro.getXzyf());//薪资月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//开始);//算薪月份
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//开始);//算薪月份
xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId();
......@@ -650,6 +649,34 @@ 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}")
......@@ -725,7 +752,7 @@ public class SalaryManagementController {
xcglxzz.setPxfs(paygro.getPxfs());// 选择配薪方式(0:空白模板;df:默认)
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setId(paygro.getId());
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.updateById();
int payid = paygro.getId();
xcglassoxzurymapper.xzurydelete(payid);
......@@ -1190,6 +1217,7 @@ 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);
}
......@@ -1227,6 +1255,72 @@ 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(Double.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(Double.valueOf(ims[p].getSrz()));//
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.ModifyImportedSalary(xzb);
}
}
}
return new ResponseResult().success("考勤数据同步成功");
}
/**
* 查看薪资
*/
......@@ -1242,7 +1336,7 @@ public class SalaryManagementController {
/**
* 获取计薪规则组项
*/
@GetMapping(value = "/payrulegroupitem/{id}/{xzyf}")
@GetMapping(value = "/payrulegroupitem/{id}")
@ApiOperation(value = "获取计薪规则组项", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult Payrulegroupitem(@CurrentUser UserBean userBean,@PathVariable Integer id) {
SalaryFieldDto salfie = new SalaryFieldDto();
......@@ -1275,6 +1369,8 @@ 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);
......@@ -1311,7 +1407,8 @@ public class SalaryManagementController {
//薪资组信息
@SuppressWarnings("unused")
XcglAdminXzz xzz = new LambdaQueryChainWrapper<XcglAdminXzz>(xcgladminxzzmapper).eq(XcglAdminXzz::getId, id).one();
xzyf = xzz.getSalarymonth();
// sxrq = xzz.getXzyf();
xzyf = xzz.getXzyf();
//当前薪资组内人员
List<XcglAssoXzury> znrys = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getXzzid, id).eq(XcglAssoXzury::getQyid,userBean.getOrgCode()).list();
List<CalculationDto> jswsj = null;
......@@ -1331,7 +1428,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(cal.getId());//薪资项id
xzb.setXzxjg(cal.getRsz());//薪资项结果
xzb.setXzxjg(Double.valueOf(cal.getRsz()));//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}
......@@ -1343,7 +1440,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(cal.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setXzxjg(0.0);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}
......@@ -1406,7 +1503,7 @@ public class SalaryManagementController {
xzb.setXzyf(xzyf);//薪资月
}
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg(("").equals(autacq) ? "0" : autacq);//薪资项结果
xzb.setXzxjg(("").equals(autacq) ? 0.0 : Double.valueOf(autacq));//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}else {
......@@ -1420,7 +1517,7 @@ public class SalaryManagementController {
xzb.setXzyf(xzyf);//薪资月
}
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("");//薪资项结果
xzb.setXzxjg(null);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}else {
......@@ -1429,7 +1526,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setXzxjg(0.0);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}
......@@ -1456,7 +1553,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setXzxjg(0.0);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
......@@ -1466,7 +1563,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(xtzd.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setXzxjg(0.0);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}
......@@ -1476,6 +1573,7 @@ public class SalaryManagementController {
}
//计算完成 返回数据
// jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
checksalary.setXzyf(xzyf);
......@@ -1525,12 +1623,15 @@ public class SalaryManagementController {
//#2、考勤数据
//#3、套公式算结果
//#4、数据写入薪资表
return ResultUtil.data(null, "计算完成");
}
/**
* 新增/修改--报税周期信息
......@@ -1603,7 +1704,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(budpaygr.getXzyf());//薪资月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.setXzyf(payrollcycle.substring(0, 7));//算薪月份
xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId();
......@@ -1765,7 +1866,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(payatt.getId());//薪资项id
xzb.setXzxjg(String.valueOf(autacq));//薪资项结果
xzb.setXzxjg(Double.valueOf(autacq));//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
}else {
......@@ -1775,7 +1876,7 @@ public class SalaryManagementController {
xzb.setUserid(znr.getUserid());//用户id
xzb.setXzyf(xzyf);//薪资月
xzb.setXzxid(payatt.getId());//薪资项id
xzb.setXzxjg("0");//薪资项结果
xzb.setXzxjg(0.0);//薪资项结果
xzb.setQyid(userBean.getOrgCode());
xcglassoxzbmapper.xzbinsert(xzb);
......@@ -1787,6 +1888,7 @@ public class SalaryManagementController {
}
//计算完成 返回数据
// List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
checksalary.setXzyf(xzyf);
......@@ -2030,56 +2132,6 @@ 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("考勤数据同步成功");
}
/**
* 切换薪资日期
*/
......
......@@ -74,9 +74,7 @@
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 = #{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 != ''" >
<if test="text != null and text != ''" >
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
) as aa
......
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