diff --git a/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java b/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java index 2448b5d..8801b23 100644 --- a/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java +++ b/src/com/engine/attendance/workflow/service/impl/AllowanceServiceImpl.java @@ -154,10 +154,12 @@ public class AllowanceServiceImpl extends Service implements AllowanceService { List> 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 dataList = new ArrayList<>();