Commit 8499e9fb authored by hongguangwu's avatar hongguangwu

增减日

parent c282dc98
......@@ -1247,6 +1247,12 @@ public class DateUtil {
return sdf.format(cal.getTime());
}
/**
* @Description: 增减(月)
* @Author: hgw
* @Date: 2022/8/3 9:17
* @return: java.util.Date
**/
public static Date addMonthByDate(Date date, int mnt) {
Calendar cal = Calendar.getInstance();
if (date != null) {
......@@ -1256,6 +1262,21 @@ public class DateUtil {
return cal.getTime();
}
/**
* @Description: 增减(日)
* @Author: hgw
* @Date: 2022/8/3 9:17
* @return: java.util.Date
**/
public static Date addDayByDate(Date date, int mnt) {
Calendar cal = Calendar.getInstance();
if (date != null) {
cal.setTime(date);
}
cal.add(Calendar.DATE, mnt);
return cal.getTime();
}
/**
* @param mnt 增减日的 值
* @Description: 增减日
......
......@@ -140,7 +140,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
// 将上一个无截止月的增加截止月(本次起始月的上一个月)
if (lastBase != null) {
lastBase.setApplyEndDate(DateUtil.addMonthByDate(sysBaseSetInfo.getApplyStartDate(), -1));
lastBase.setApplyEndDate(DateUtil.addDayByDate(sysBaseSetInfo.getApplyStartDate(), -1));
this.updateById(lastBase);
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo);
......
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