Commit e77598fc authored by hongguangwu's avatar hongguangwu

1.5.5-薪资次数接口

parent 34592556
......@@ -452,6 +452,13 @@ public class TSalaryStandard extends BaseEntity {
@Schema(description = "收入月份")
private String incomeMonth;
@Schema(description = "配置ID")
private String setId;
@Schema(description = "删除人(汉字名)")
private String deleteUser;
@Schema(description = "删除时间")
private Date deleteDate;
/**
* 工资月份-起
*/
......
......@@ -68,12 +68,12 @@ public class TConfigSalaryController {
List<TConfigSalary> configSalaryList = tConfigSalaryService.list(queryWrapperCs);
if (configSalaryList != null && !configSalaryList.isEmpty()) {
String nowMonth = DateUtil.addMonth(0);
// 当前月 发薪次数
int monthCount = tSalaryStandardService.getNum(settleDepart, nowMonth, null);
String nowYear = DateUtil.getYear(new Date());
// 当前年 未推送或未发放的 发薪次数
int yearCount = tSalaryStandardService.getNum(settleDepart, null, nowYear);
int yearCount = tSalaryStandardService.getNum(settleDepart, null,null, nowYear);
int monthCount; // 当前月 发薪次数
for (TConfigSalary cs : configSalaryList) {
monthCount = tSalaryStandardService.getNum(settleDepart, cs.getId(), nowMonth, null);
if (cs.getSalaryNum() <= monthCount) {
cs.setNowMonthSalaryNum(monthCount);
}
......
......@@ -72,5 +72,5 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
* @Date: 2023/6/25 18:04
* @return: int
**/
int getNum(@Param("deptId") String deptId, @Param("settleMonth") String settleMonth, @Param("nowYear") String nowYear);
int getNum(@Param("deptId") String deptId, @Param("setId") String setId, @Param("settleMonth") String settleMonth, @Param("nowYear") String nowYear);
}
......@@ -142,6 +142,6 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
* @Date: 2023/6/25 18:04
* @return: int
**/
int getNum(String deptId, String settleMonth, String nowYear);
int getNum(String deptId, String setId, String settleMonth, String nowYear);
}
......@@ -293,10 +293,12 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//s.setSettlementAmount()
s.setStatus(SalaryConstants.AUDIT_STATUS[0]);
s.setBpoFlag(dept.getBpoFlag());
if (configSalary != null && Common.isNotNull(configSalary.getIncomeMonth())) {
s.setIncomeMonth(DateUtil.addMonth(configSalary.getIncomeMonth()));
} else {
s.setIncomeMonth(sav.getSalaryMonth());
s.setIncomeMonth(sav.getSalaryMonth());
if (configSalary != null) {
s.setSetId(configSalary.getId());
if (Common.isNotNull(configSalary.getIncomeMonth())) {
s.setIncomeMonth(DateUtil.addMonth(configSalary.getIncomeMonth()));
}
}
}
return new R<>(s);
......
......@@ -366,6 +366,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
//6:删除工资表
sf.setDeleteUser(user.getNickname());
sf.setDeleteDate(new Date());
sf.setDeleteFlag(SalaryConstants.DELETED);
this.updateById(sf);
return R.ok("级联删除工资表成功");
......@@ -1075,8 +1077,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @return: int
**/
@Override
public int getNum(String deptId, String settleMonth, String nowYear) {
return baseMapper.getNum(deptId,settleMonth,nowYear);
public int getNum(String deptId, String setId, String settleMonth, String nowYear) {
return baseMapper.getNum(deptId, setId, settleMonth, nowYear);
}
}
......@@ -81,6 +81,9 @@
<result property="issueStatus" column="ISSUE_STATUS"/>
<result property="isDiff" column="IS_DIFF"/>
<result property="incomeMonth" column="INCOME_MONTH"/>
<result property="setId" column="SET_ID"/>
<result property="deleteUser" column="DELETE_USER"/>
<result property="deleteDate" column="DELETE_DATE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -139,7 +142,10 @@
a.INCOME_END_TIME,
a.ISSUE_STATUS,
a.IS_DIFF,
a.INCOME_MONTH
a.INCOME_MONTH,
a.SET_ID,
a.DELETE_USER,
a.DELETE_DATE
</sql>
<sql id="tSalaryStandard_where">
<if test="tSalaryStandard != null">
......@@ -496,7 +502,7 @@
and a.DEPT_ID = #{deptId}
</if>
<if test="settleMonth != null and settleMonth.trim() != ''">
and a.SETTLEMENT_MONTH = #{settleMonth}
and a.SETTLEMENT_MONTH = #{settleMonth} and a.SET_ID = #{setId}
</if>
<if test="nowYear != null and nowYear.trim() != ''">
and a.SETTLEMENT_MONTH like concat(#{nowYear},'%')
......
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