考勤,出勤津贴数据生成功能逻辑优化,目标人员或班次出现空时,不进行旧数据删除

zm_dev
sy 11 months ago
parent ad5de70136
commit 30e606f250

@ -154,10 +154,12 @@ public class AllowanceServiceImpl extends Service implements AllowanceService {
List<Map<String, String>> allowanceInfoList = createAllowanceInfo(cqData, empIdWithAllowanceInfo, bcWithAllowanceInfo, allowanceIdWithKqxmInfo);
bs.writeLog("allowanceInfoList_size : " + allowanceInfoList.size());
//新增津贴数据,先删后加
String delSql = "delete from uf_jcl_kq_cqjt where rq >= '" + startDate +"'" + " and rq <= '" + endDate +"'"
+ " and yg in (" + String.join(",",targetEmpIdList) + ") and bc in (" + String.join(",",targetBcIdList) + ")";
boolean delSign = DbTools.update(delSql);
bs.writeLog("delSign : " + delSign + ", delSql : " + delSql);
if (targetEmpIdList.size() > 0 && targetBcIdList.size() > 0) {
String delSql = "delete from uf_jcl_kq_cqjt where rq >= '" + startDate +"'" + " and rq <= '" + endDate +"'"
+ " and yg in (" + String.join(",",targetEmpIdList) + ") and bc in (" + String.join(",",targetBcIdList) + ")";
boolean delSign = DbTools.update(delSql);
bs.writeLog("delSign : " + delSign + ", delSql : " + delSql);
}
if (allowanceInfoList.size() > 0) {
//插入津贴数据
List<List> dataList = new ArrayList<>();

Loading…
Cancel
Save