Bläddra i källkod

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 2 år sedan
förälder
incheckning
974dcfb14a

+ 2 - 0
platform-dao/src/main/java/com/platform/dao/mapper/fill/FillGatherTaskDetailMapper.java

@@ -16,6 +16,8 @@ import java.util.List;
  */
 @Component
 public interface FillGatherTaskDetailMapper extends MyMapper<FillGatherTaskDetail> {
+
+    List<String> selectBySbIds(List<String> sbIds);
     /**
      * 分页查询
      * @param dto

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/mapper/fill/FillGatherTaskMapper.java

@@ -3,6 +3,7 @@ package com.platform.dao.mapper.fill;
 import com.platform.dao.dto.fill.FillGatherTaskDTO;
 import com.platform.dao.config.MyMapper;
 import com.platform.dao.entity.fill.FillGatherTask;
+import com.platform.dao.vo.query.fill.FillGatherTaskDetailVO;
 import com.platform.dao.vo.query.fill.FillGatherTaskVO;
 import org.springframework.stereotype.Component;
 import java.util.List;

+ 10 - 0
platform-dao/src/main/resources/mapper/fill/FillGatherTaskDetailMapper.xml

@@ -93,4 +93,14 @@
         join t_sb_info sb on fill.sb_id = sb.id left join t_sb_position sp on sb.position_id = sp.id
         where fill.task_id = #{taskId}
     </select>
+    <select id="selectBySbIds" parameterType="java.util.List"
+            resultType="java.lang.String">
+        select id from t_fill_gather_task_detail
+        where
+        sb_id in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+
+    </select>
 </mapper>

+ 16 - 0
platform-service/src/main/java/com/platform/service/sb/impl/SbInfoServiceImpl.java

@@ -28,6 +28,9 @@ import com.platform.dao.dto.upms.SysUserDeptDTO;
 import com.platform.dao.dto.workplace.WorkplaceBacklogDTO;
 import com.platform.dao.dto.workplace.WorkplaceBacklogUserDTO;
 import com.platform.dao.entity.check.CheckStandard;
+import com.platform.dao.entity.fill.FillGather;
+import com.platform.dao.entity.fill.FillGatherTask;
+import com.platform.dao.entity.fill.FillGatherTaskDetail;
 import com.platform.dao.entity.firm.FirmProducer;
 import com.platform.dao.entity.operate.Article;
 import com.platform.dao.entity.part.PartInfo;
@@ -39,6 +42,8 @@ import com.platform.dao.entity.sb.*;
 import com.platform.dao.entity.upms.*;
 import com.platform.dao.enums.*;
 import com.platform.dao.mapper.check.CheckStandardMapper;
+import com.platform.dao.mapper.fill.FillGatherTaskDetailMapper;
+import com.platform.dao.mapper.fill.FillGatherTaskMapper;
 import com.platform.dao.mapper.firm.FirmProducerMapper;
 import com.platform.dao.mapper.part.PartInfoMapper;
 import com.platform.dao.mapper.part.PartTypeMapper;
@@ -59,6 +64,8 @@ import com.platform.dao.util.compare.annotation.FieldCompared;
 import com.platform.dao.vo.SysUserDeptVO;
 import com.platform.dao.vo.SysUserVO;
 import com.platform.dao.vo.export.sb.ExportSbInfoVO;
+import com.platform.dao.vo.query.fill.FillGatherTaskDetailVO;
+import com.platform.dao.vo.query.fill.FillGatherTaskVO;
 import com.platform.dao.vo.query.sb.SbMeasureLogVO;
 import com.platform.dao.vo.query.upms.SysDeptVO;
 import com.platform.dao.vo.report.MeasureLogReportVO;
@@ -154,6 +161,7 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
     private final String useGroup = "606540c8eb19002808e276d8";
 
     private final SbChangeRecordMapper sbChangeRecordMapper;
+    private final FillGatherTaskDetailMapper fillGatherTaskDetailMapper;
 
     @Override
     public int batchDelete(List<String> ids) {
@@ -163,6 +171,14 @@ public class SbInfoServiceImpl extends BaseServiceImpl<SbInfoMapper, SbInfo, SbI
         SbInfo sbInfo = new SbInfo();
         //SbInfo.setS(0);
         mapper.deleteByExample(weekend);
+
+        List<String> detailIds = fillGatherTaskDetailMapper.selectBySbIds(ids);
+        Weekend<FillGatherTaskDetail> weekend2 = new Weekend<>(FillGatherTaskDetail.class);
+        WeekendCriteria<FillGatherTaskDetail, Object> weekendCriteria2 = weekend2.weekendCriteria();
+        weekendCriteria2.andIn(FillGatherTaskDetail::getId, detailIds);
+        fillGatherTaskDetailMapper.deleteByExample(weekend);
+
+
         return 1;
     }