fixBUG
This commit is contained in:
parent
9c6d71d095
commit
e7f5c7c066
|
|
@ -7,6 +7,7 @@ import com.engine.bjcj220907.service.MonthBonusCountService;
|
|||
import com.engine.bjcj220907.utils.BjcjCommonUtils;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
|
|
@ -87,6 +88,13 @@ public class MonthBonusCountServiceImpl extends Service implements MonthBonusCou
|
|||
departureTemp.add(j);
|
||||
countCal.add(Calendar.MONTH,1);
|
||||
}
|
||||
// 如果是28号或者28号之后离职,那还要加一个月
|
||||
if (info.getLzrq() != null && SalaryDateUtil.dateToLocalDate(info.getLzrq()).getDayOfMonth() > 28){
|
||||
int year = countCal.get(Calendar.YEAR);
|
||||
int season =countCal.get(Calendar.MONTH)/3+1;
|
||||
CountMonthBonus j = getMonthBonusDAO().getJXInfoByUser(info.getXm(), bonusSendMonth, countCal.getTime(), year, season);
|
||||
result.add(j);
|
||||
}
|
||||
}
|
||||
|
||||
//获取所有人的薪酬等级和绩效工资
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.engine.bjcj220907.utils;
|
||||
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -115,16 +118,22 @@ public class BjcjCommonUtils {
|
|||
return false;
|
||||
}
|
||||
|
||||
public static boolean isEqualsMonth(Date a,Date b){
|
||||
public static boolean isEqualsMonth(Date a,Date kqMonth){
|
||||
|
||||
try {
|
||||
if(a == null || b == null){
|
||||
if(a == null || kqMonth == null){
|
||||
return false;
|
||||
}
|
||||
// 如果入离职的日期>28 则属于下一个月
|
||||
LocalDate aLocalDate = SalaryDateUtil.dateToLocalDate(a);
|
||||
if(aLocalDate.getDayOfMonth() > 28){
|
||||
LocalDate localDate = aLocalDate.plusMonths(1);
|
||||
a = SalaryDateUtil.localDateToDate(localDate);
|
||||
}
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date formatA = sdf.parse(sdf2.format(a));
|
||||
Date formatB = sdf.parse(sdf2.format(b));
|
||||
Date formatB = sdf.parse(sdf2.format(kqMonth));
|
||||
if( formatA.equals(formatB) ){
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,23 @@ public class MonthBonusCountController extends AbstractModeExpandJavaCodeNew {
|
|||
return new MonthBonusDAO();
|
||||
}
|
||||
|
||||
// @POST
|
||||
// @Path("/month")
|
||||
// @Produces(MediaType.APPLICATION_JSON)
|
||||
// public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestParam Map<String, Object> param) throws ParseException {
|
||||
// User tempUser = new User();
|
||||
// tempUser.setLoginid("1");
|
||||
// tempUser.setLoginid("sysadmin");
|
||||
// Map<String, String> result = new HashMap<String, String>();
|
||||
// String bonusM="2023-03";
|
||||
// String sendM="2023-07";
|
||||
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
// CountMonthBonusParam countParam = CountMonthBonusParam.builder().bonusMonth(sdf.parse(bonusM)).bonusSendMonth(sdf.parse(sendM)).build();
|
||||
// baseBean.writeLog("开始核算绩效,绩效所属月:"+bonusM+",绩效发放月:"+sendM);
|
||||
// getMonthBonusCountService(tempUser).countMonthBonus(countParam);
|
||||
// return "";
|
||||
// }
|
||||
|
||||
/***
|
||||
* @description 月度计算奖金计算
|
||||
* @return String
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
<map>
|
||||
<entry key="com.zeroturnaround.jrebel.FormatVersion" value="7.0.0" />
|
||||
<entry key="jrebelEnabled" value="true" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1679481054163" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1689904532674" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="version" value="17" />
|
||||
<option name="version" value="22" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
|
|
|
|||
Loading…
Reference in New Issue