Commit b8684558 by ilal Committed by chenzg

提交

parent 12f28869
......@@ -1351,22 +1351,6 @@ public class SalaryManagementController {
}
// List<SalaryPersonFieldDto> userfies = xcglassoxzurymapper.selectpersonfieldList(id,userBean.getOrgCode());
// List<ComputeUserDto> usfil = new ArrayList<ComputeUserDto>();
// for(SalaryPersonFieldDto usfl:userfies) {
// ComputeUserDto ufd = new ComputeUserDto();
//// ufd.setName(usfl.getUsername());
//// ufd.setUsernum(usfl.getUsernum());
// ufd.setEmpname(usfl.getUsername());
// ufd.setDept(usfl.getDept());//部门
// ufd.setPost(usfl.getPost());//职位
// ufd.setEmpnum(usfl.getUsernum());
// usfil.add(ufd);
// }
// if(usfil.size() > 0) {
// salfie.setComuser(usfil);
// }
//
// List<CalculationDto> jswsj = xcglassoxzbmapper.CalculationResults(id,userBean.getOrgCode());
CheckSalaryStaffDto checksalary = new CheckSalaryStaffDto();
checksalary.setPaygroupid(id);
......@@ -1455,6 +1439,7 @@ public class SalaryManagementController {
List<Map<String, Object>> list = null;
double vacation = 0;//假期
int numover = 0;
double workover = 0;//加班
if(tablename.equals("yggl_main_emp")) {//员工管理
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.select(fieldname).eq("emp_num", znr.getUserid()).eq("org_code", userBean.getOrgCode());//select #{tablename} from yggl_main_emp where emp_num = ?
......@@ -1472,20 +1457,23 @@ public class SalaryManagementController {
queryWrapper.select(fieldname).eq("coverage_name", lbcx.getOptionname().substring(0, 2)).eq("user_id", znr.getUserid()).eq("org_code", userBean.getOrgCode()).eq("attribution_time", xzyf);//select #{tablename} from yggl_main_emp where emp_num = ?
list = sbgjjassodetailedmapper.selectMaps(queryWrapper);
}else if(tablename.equals("kqgl_asso_relation_summary")) {//假期(32~41)、补卡次数15、工作日加班24、休息日加班25、节假日加班26
if(lbcx.getId() == 32) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 1, znr.getUserid()); }
if(lbcx.getId() == 33) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 2, znr.getUserid()); }
if(lbcx.getId() == 34) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 3, znr.getUserid()); }
if(lbcx.getId() == 35) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 4, znr.getUserid()); }
if(lbcx.getId() == 36) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 5, znr.getUserid()); }
if(lbcx.getId() == 37) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 6, znr.getUserid()); }
if(lbcx.getId() == 38) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 7, znr.getUserid()); }
if(lbcx.getId() == 39) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 8, znr.getUserid()); }
if(lbcx.getId() == 40) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 9, znr.getUserid()); }
if(lbcx.getId() == 41) { vacation = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 10, znr.getUserid()); }
if(lbcx.getId() == 15) { numover = xcglassoxzbmapper.NumberOvertime(orgcode, xzyf, znr.getUserid());}
if(lbcx.getId() == 24) { numover = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 1, znr.getUserid());}
if(lbcx.getId() == 25) { numover = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 2, znr.getUserid());}
if(lbcx.getId() == 26) { numover = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 3, znr.getUserid());}
if(lbcx.getId() == 32) {
HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 1, znr.getUserid());
vacation = balance.getBalance();
}
if(lbcx.getId() == 33) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 2, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 34) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 3, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 35) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 4, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 36) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 5, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 37) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 6, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 38) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 7, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 39) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 8, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 40) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 9, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 41) { HolidayInquiryDto balance = xcglassoxzbmapper.Holidayamount(orgcode, xzyf, 10, znr.getUserid()); vacation = balance.getBalance();}
if(lbcx.getId() == 15) { HolidayInquiryDto num = xcglassoxzbmapper.NumberOvertime(orgcode, xzyf, znr.getUserid()); numover = num.getNum();}
if(lbcx.getId() == 24) { HolidayInquiryDto worov = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 1, znr.getUserid()); workover = worov.getBalance();}
if(lbcx.getId() == 25) { HolidayInquiryDto worov = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 2, znr.getUserid()); workover = worov.getBalance();}
if(lbcx.getId() == 26) { HolidayInquiryDto worov = xcglassoxzbmapper.PeriodsOvertime(orgcode, xzyf, 3, znr.getUserid()); workover = worov.getBalance();}
}else if(tablename.equals("xcgl_asso_gsjsmx")) {
QueryWrapper<XcglAssoGsjsmx> queryWrapper = new QueryWrapper<>();
queryWrapper.select(fieldname).eq("user_num", znr.getUserid()).eq("qyid", userBean.getOrgCode()).eq("salary_month", xzyf);//select #{tablename} from yggl_main_emp where emp_num = ?
......@@ -1500,8 +1488,13 @@ public class SalaryManagementController {
}
}
}else {
autacq = String.valueOf(vacation);
if(lbcx.getId() == 15) {
autacq = String.valueOf(numover);
}else if(lbcx.getId() == 24 || lbcx.getId() == 25 || lbcx.getId() == 26) {
autacq = String.valueOf(workover);
}else {
autacq = String.valueOf(vacation);
}
}
//处理结果
if(fieldname.equals("job_type")) {
......@@ -1834,7 +1827,7 @@ public class SalaryManagementController {
//计薪规则组项中自定义项
List<XcglAssoJsgzzx> zdyx = XcglAssoJsgzzx.builder().build().selectList(new QueryWrapper<XcglAssoJsgzzx>().lambda().eq(XcglAssoJsgzzx::getXzzid, calcomtiondto.getPay_group_id()).eq(XcglAssoJsgzzx::getIsCustom, 1));
String formula = xzx.getGsgs();//#应发工资#-#个人社保#-#个人公积金#-#个税#
String qaz = formula.replace("#应发工资#", String.valueOf(wages_payable)).replace("#个人社保#", String.valueOf(grsb)).replace("#个人公积金#", String.valueOf(grgjj)).replace("#个税#", String.valueOf(personal_income_tax));
String qaz = formula.replace("#应发工资#", String.valueOf(wages_payable)).replace("#个人社保#", String.valueOf(grsb)).replace("#个人公积金#", String.valueOf(grgjj)).replace("#个税#", String.valueOf(personal_income_tax < 0 ? 0.0 : personal_income_tax));
for(XcglAssoJsgzzx zdy : zdyx) {
double custom_ = 0;//自定义
......@@ -3180,6 +3173,15 @@ public class SalaryManagementController {
@ApiOperation(value = "保存薪资明细修改", httpMethod = "POST", notes = "接口发布说明")
public ResponseResult saveSalaryDetails(@CurrentUser UserBean userBean,@RequestBody List<XcglAssoXzb> list) {
xcglassoxzbmapper.updateBatchXzxjg(list);
XcglAssoGztzt gzt = XcglAssoGztzt.builder().build().selectOne(new QueryWrapper<XcglAssoGztzt>().lambda().eq(XcglAssoGztzt::getUserid, list.get(0).getUserid()).eq(XcglAssoGztzt::getQyid, userBean.getOrgCode())
.eq(XcglAssoGztzt::getXzyf, list.get(0).getXzyf()));
if(gzt != null) {
XcglAssoXzb paycol = xcglassoxzbmapper.PayInColumn(list.get(0).getXzxid(), list.get(0).getUserid(), list.get(0).getXzyf());
XcglAssoGztzt.builder().sfgz(paycol.getXzxjg()).id(gzt.getId()).build().updateById();
}
return new ResponseResult().success("保存成功");
}
......
......@@ -9,6 +9,7 @@ import cn.timer.api.bean.xcgl.XcglAssoXzb;
import cn.timer.api.dto.xcgl.CalculationDto;
import cn.timer.api.dto.xcgl.CalculationValueDto;
import cn.timer.api.dto.xcgl.CheckSalaryStaffDto;
import cn.timer.api.dto.xcgl.HolidayInquiryDto;
import cn.timer.api.dto.xcgl.UserPersonnelDto;
/**
......@@ -36,11 +37,14 @@ public interface XcglAssoXzbMapper extends BaseMapper<XcglAssoXzb> {
void updateBatchXzxjg(List<XcglAssoXzb> list);
double Holidayamount(int orgcode,String apptime,int rules_type,int userid);
int NumberOvertime(int orgcode,String apptime,int userid);
HolidayInquiryDto Holidayamount(int orgcode,String apptime,int rules_type,int userid);
int PeriodsOvertime(int orgcode,String apptime,int overtimetypeid,int userid);
HolidayInquiryDto NumberOvertime(int orgcode,String apptime,int userid);
HolidayInquiryDto PeriodsOvertime(int orgcode,String apptime,int overtimetypeid,int userid);
List<UserPersonnelDto> UserPersonnel(int xzzid,int orgcode);
XcglAssoXzb PayInColumn(int xzxid,int userid,String xzyf);
}
package cn.timer.api.dto.xcgl;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HolidayInquiryDto {
int num;
double balance;
}
......@@ -43,6 +43,11 @@
<result column="post" property="post" />
</resultMap>
<resultMap id="HolidayInquiryDtoMap" type="cn.timer.api.dto.xcgl.HolidayInquiryDto" >
<result column="num" property="num" />
<result column="balance" property="balance" />
</resultMap>
<sql id="Base_Column_List">
id,
userid,
......@@ -61,6 +66,17 @@
qyid XcglAssoXzb_qyid
</sql>
<select id="PayInColumn" resultMap="BaseResultMap">
select * from xcgl_asso_xzb zx
where zx.xzxid = (select gg.id from xcgl_asso_jsgzzx gg
where gg.optionid = 70
and gg.xzzid = (select jsg.xzzid from xcgl_asso_jsgzzx jsg
where jsg.id = #{xzxid})
)
and zx.userid = #{userid}
and zx.xzyf = #{xzyf}
</select>
<select id="UserPersonnel" resultMap="UserPersonnelDtoMap">
select aa.orgcode,aa.empnum,aa.empname,aa.dept,aa.post
from (select emp.org_code as orgcode,
......@@ -78,8 +94,8 @@
where aa.orgcode = #{orgcode}
</select>
<select id="Holidayamount">
select IFNULL(SUM(su.duration),0)
<select id="Holidayamount" resultMap="HolidayInquiryDtoMap">
select IFNULL(SUM(su.duration),0) as balance
from kqgl_asso_relation_summary su
where su.approval_type = 2
and su.org_code = #{orgcode}
......@@ -89,8 +105,8 @@
and su.user_id = #{userid}
</select>
<select id="NumberOvertime">
select COUNT(*)
<select id="NumberOvertime" resultMap="HolidayInquiryDtoMap">
select COUNT(*) as num
from kqgl_asso_relation_summary su
where su.approval_type = 5
and su.org_code = #{orgcode}
......@@ -98,8 +114,8 @@
and su.user_id = #{userid}
</select>
<select id="PeriodsOvertime">
select IFNULL(SUM(su.duration),0)
<select id="PeriodsOvertime" resultMap="HolidayInquiryDtoMap">
select IFNULL(SUM(su.duration),0) as balance
from kqgl_asso_relation_summary su
where su.approval_type = 1
and su.org_code = #{orgcode}
......
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