Commit 54da3686 by mobh

Merge branch 'develop' into dev-mobh

parents 61d2daa7 216beddf
...@@ -73,6 +73,9 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> { ...@@ -73,6 +73,9 @@ public class XcglAdminXzz extends Model<XcglAdminXzz> {
@ApiModelProperty(value="所属月份时间",example="2019-12") @ApiModelProperty(value="所属月份时间",example="2019-12")
private String monthtime; private String monthtime;
@ApiModelProperty(value="算薪月份",example="2019-12")
private String salarymonth;
} }
\ No newline at end of file
...@@ -308,6 +308,7 @@ public class SalaryManagementController { ...@@ -308,6 +308,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码 xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间 xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(paygro.getXzyf());//薪资月份 xcglxzz.setMonthtime(paygro.getXzyf());//薪资月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//开始);//算薪月份
xcgladminxzzmapper.insert(xcglxzz); xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId(); int payid = xcglxzz.getId();
...@@ -724,6 +725,7 @@ public class SalaryManagementController { ...@@ -724,6 +725,7 @@ public class SalaryManagementController {
xcglxzz.setPxfs(paygro.getPxfs());// 选择配薪方式(0:空白模板;df:默认) xcglxzz.setPxfs(paygro.getPxfs());// 选择配薪方式(0:空白模板;df:默认)
xcglxzz.setQyid(orgCode);// 企业编码 xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setId(paygro.getId()); xcglxzz.setId(paygro.getId());
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcglxzz.updateById(); xcglxzz.updateById();
int payid = paygro.getId(); int payid = paygro.getId();
xcglassoxzurymapper.xzurydelete(payid); xcglassoxzurymapper.xzurydelete(payid);
...@@ -1287,9 +1289,11 @@ public class SalaryManagementController { ...@@ -1287,9 +1289,11 @@ public class SalaryManagementController {
/** /**
* (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() * (保存,下一步)计算薪资 ()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
*/ */
@GetMapping(value = "/calculatesalary/{id}/{sxrq}") @GetMapping(value = "/calculatesalary/{id}")
@ApiOperation(value = "计算薪资", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "计算薪资", httpMethod = "GET", notes = "接口发布说明")
public ResponseResult CalculateSalary(@CurrentUser UserBean userBean,@PathVariable Integer id,@PathVariable String sxrq) { public ResponseResult CalculateSalary(@CurrentUser UserBean userBean,@PathVariable Integer id) {
String sxrq = "";
//typeid--1:计算 2:重新计算 //typeid--1:计算 2:重新计算
//已知薪资组id**** //已知薪资组id****
...@@ -1303,6 +1307,7 @@ public class SalaryManagementController { ...@@ -1303,6 +1307,7 @@ public class SalaryManagementController {
//薪资组信息 //薪资组信息
@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();
sxrq = xzz.getSalarymonth();
//当前薪资组内人员 //当前薪资组内人员
List<XcglAssoXzury> znrys = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getXzzid, id).eq(XcglAssoXzury::getQyid,userBean.getOrgCode()).list(); List<XcglAssoXzury> znrys = new LambdaQueryChainWrapper<XcglAssoXzury>(xcglassoxzurymapper).eq(XcglAssoXzury::getXzzid, id).eq(XcglAssoXzury::getQyid,userBean.getOrgCode()).list();
List<CalculationDto> jswsj = null; List<CalculationDto> jswsj = null;
...@@ -1478,7 +1483,7 @@ public class SalaryManagementController { ...@@ -1478,7 +1483,7 @@ public class SalaryManagementController {
/** /**
* 计算薪资 * 计算薪资!@#$%^&*()_+
* @param userBean * @param userBean
* @param calcomtiondto * @param calcomtiondto
* @return * @return
...@@ -1488,21 +1493,25 @@ public class SalaryManagementController { ...@@ -1488,21 +1493,25 @@ public class SalaryManagementController {
public Result<Object> SalaryCalculation(@CurrentUser UserBean userBean, @RequestBody CalculatingCompensationDto calcomtiondto) { public Result<Object> SalaryCalculation(@CurrentUser UserBean userBean, @RequestBody CalculatingCompensationDto calcomtiondto) {
//#1、计算个税 (薪资组id、薪资月份) //#1、计算个税 (薪资组id、薪资月份)
//薪资组信息
XcglAdminXzz xzz = XcglAdminXzz.builder().id(calcomtiondto.getPay_group_id()).build().selectById();
String start = xzz.getPayrollcycle().substring(0, 10);//开始
String end = xzz.getPayrollcycle().substring(11, 21);//结束
//查询出薪资组内成员 //查询出薪资组内成员
List<XcglAssoXzury> paygrlist = XcglAssoXzury.builder().build().selectList(new QueryWrapper<XcglAssoXzury>().lambda().eq(XcglAssoXzury::getXzzid, calcomtiondto.getPay_group_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 String[] noperincuser = new String[paygrlist.size()];//用来储存没有个税的用户id
int i = 0; int i = 0;
for(XcglAssoXzury pag : paygrlist) { for(XcglAssoXzury pag : paygrlist) {
XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().selectOne(new QueryWrapper<XcglAssoGsjsmx>().lambda().eq(XcglAssoGsjsmx::getQyid, userBean.getOrgCode()).eq(XcglAssoGsjsmx::getUserNum, pag.getUserid()) 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())); .eq(XcglAssoGsjsmx::getSalaryMonth, calcomtiondto.getSalary_month()));
if(gsjs == null) { if(gsjs == null) {
noperincuser[i] = pag.getUserid(); noperincuser[i] = String.valueOf(pag.getUserid());
i++; i++;
} }
} }
//循环计算当前薪资月没有个税的用户 //循环计算当前薪资月没有个税的用户 根据
for(int gsus : noperincuser) { for(String gsus : ClockInTool.deleteArrayNull(noperincuser)) {
// XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build(). // XcglAssoGsjsmx gsjs = XcglAssoGsjsmx.builder().build().
} }
...@@ -1586,6 +1595,7 @@ public class SalaryManagementController { ...@@ -1586,6 +1595,7 @@ public class SalaryManagementController {
xcglxzz.setQyid(orgCode);// 企业编码 xcglxzz.setQyid(orgCode);// 企业编码
xcglxzz.setAddtime(new Date().getTime());// 添加时间 xcglxzz.setAddtime(new Date().getTime());// 添加时间
xcglxzz.setMonthtime(budpaygr.getXzyf());//薪资月份 xcglxzz.setMonthtime(budpaygr.getXzyf());//薪资月份
xcglxzz.setSalarymonth(payrollcycle.substring(0, 7));//算薪月份
xcgladminxzzmapper.insert(xcglxzz); xcgladminxzzmapper.insert(xcglxzz);
int payid = xcglxzz.getId(); int payid = xcglxzz.getId();
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
<result column="pxfs" property="pxfs" /> <result column="pxfs" property="pxfs" />
<result column="monthtime" property="monthtime" /> <result column="monthtime" property="monthtime" />
<result column="salarymonth" property="salarymonth" />
</resultMap> </resultMap>
<resultMap id="PayrollExceptionDtoMap" type="cn.timer.api.dto.xcgl.PayrollExceptionDto" > <resultMap id="PayrollExceptionDtoMap" type="cn.timer.api.dto.xcgl.PayrollExceptionDto" >
......
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