From 30e606f250c995f40ae9c7a50d1186448ac894fe Mon Sep 17 00:00:00 2001 From: sy Date: Fri, 7 Jun 2024 15:00:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8B=A4=EF=BC=8C=E5=87=BA=E5=8B=A4?= =?UTF-8?q?=E6=B4=A5=E8=B4=B4=E6=95=B0=E6=8D=AE=E7=94=9F=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96=EF=BC=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E4=BA=BA=E5=91=98=E6=88=96=E7=8F=AD=E6=AC=A1=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=A9=BA=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=97=A7=E6=95=B0=E6=8D=AE=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/service/impl/AllowanceServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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<>();