From ddd0c49cdd20aba159b9888169d4ced3a5528687 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Thu, 27 Oct 2022 18:02:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=85=8D=E7=A8=8E=E6=89=A3?= =?UTF-8?q?=E9=99=A4-=E6=96=B0=E5=A2=9E=E3=80=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=89=80=E9=80=89=E3=80=81=E4=B8=80=E9=94=AE=E6=B8=85=E7=A9=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/biz/OtherDeductionBiz.java | 20 +++ .../datacollection/OtherDeductionMapper.java | 6 +- .../datacollection/OtherDeductionMapper.xml | 11 ++ .../salary/service/OtherDeductionService.java | 16 ++ .../impl/AddUpDeductionServiceImpl.java | 8 +- .../impl/OtherDeductionServiceImpl.java | 160 ++++++++++++++++++ .../salary/web/AddUpDeductionController.java | 4 +- .../salary/web/OtherDeductionController.java | 43 +++++ .../salary/wrapper/OtherDeductionWrapper.java | 21 +++ 9 files changed, 282 insertions(+), 7 deletions(-) diff --git a/src/com/engine/salary/biz/OtherDeductionBiz.java b/src/com/engine/salary/biz/OtherDeductionBiz.java index b0301e915..b71668f86 100644 --- a/src/com/engine/salary/biz/OtherDeductionBiz.java +++ b/src/com/engine/salary/biz/OtherDeductionBiz.java @@ -183,4 +183,24 @@ public class OtherDeductionBiz extends BaseBean { } + /** + * @description 批量删除 + * @return void + * @author Harryxzy + * @date 2022/10/27 16:07 + */ + public void batchDeleteByIDS(List deleteIds) { + if (CollectionUtils.isEmpty(deleteIds)) { + return; + } + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + OtherDeductionMapper mapper = sqlSession.getMapper(OtherDeductionMapper.class); + List> partition = Lists.partition(deleteIds, 100); + partition.forEach(mapper::deleteData); + sqlSession.commit(); + } finally { + sqlSession.close(); + } + } } diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java index 21bb198d1..7638a60cc 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.java @@ -4,7 +4,6 @@ import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO; import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO; import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam; import com.engine.salary.entity.datacollection.po.OtherDeductionPO; -import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -45,4 +44,9 @@ public interface OtherDeductionMapper { */ void updateData(@Param("collection") List pos); + /** + * 批量删除 + * @param longs + */ + void deleteData(List longs); } \ No newline at end of file diff --git a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml index f9c2def36..f729ab0cf 100644 --- a/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/OtherDeductionMapper.xml @@ -36,6 +36,17 @@ , t.tenant_key + + + UPDATE hrsa_other_deduction t + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + +