[修改] 调整变更人的bug
This commit is contained in:
@@ -46,4 +46,6 @@ public interface PowerApplyActDao extends BaseMapper<PowerApplyAct> {
|
||||
int batchInsert(@Param("list")List<PowerApplyAct> powerApplyActs);
|
||||
|
||||
List<PowerApplyActPageVO> selectListBydataId(@Param("dataId")String dataId);
|
||||
|
||||
int batchDel(@Param("ids") List<String> ids);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.report.service;
|
||||
|
||||
import com.adc.da.report.eo.PowerApply;
|
||||
import com.adc.da.report.eo.PowerApplyAct;
|
||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||
import com.adc.da.report.vo.PowerApplyPageVO;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -55,4 +56,6 @@ public interface IPowerApplyService {
|
||||
* @description 根据id或id数组进行删除
|
||||
*/
|
||||
public void deleteById(DeleteParamRequestVO deleteParamVO);
|
||||
|
||||
void saveBatch(List<PowerApplyAct> powerApplyActs);
|
||||
}
|
||||
|
||||
+15
@@ -1,8 +1,10 @@
|
||||
package com.adc.da.report.service.impl;
|
||||
|
||||
|
||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||
import com.adc.da.report.dao.mysql.PowerApplyDao;
|
||||
import com.adc.da.report.eo.PowerApply;
|
||||
import com.adc.da.report.eo.PowerApplyAct;
|
||||
import com.adc.da.report.service.IPowerApplyService;
|
||||
import com.adc.da.report.vo.DeleteParamRequestVO;
|
||||
import com.adc.da.report.vo.PowerApplyPageVO;
|
||||
@@ -11,11 +13,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author bu
|
||||
@@ -27,6 +31,10 @@ import java.util.List;
|
||||
@Service
|
||||
public class IpowerApplyServiceImpl extends ServiceImpl<PowerApplyDao, PowerApply> implements IPowerApplyService {
|
||||
|
||||
@Autowired
|
||||
private PowerApplyActDao powerApplyActDao;
|
||||
|
||||
|
||||
/**
|
||||
* @param powerApplyPageVO
|
||||
* @return <com.adc.da.report.entity.PowerApply>
|
||||
@@ -109,5 +117,12 @@ public class IpowerApplyServiceImpl extends ServiceImpl<PowerApplyDao, PowerAppl
|
||||
baseMapper.update(powerApply,wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBatch(List<PowerApplyAct> powerApplyActs) {
|
||||
baseMapper.saveBatch(powerApplyActs);
|
||||
List<String> ids = powerApplyActs.stream().map(a -> a.getId()).collect(Collectors.toList());
|
||||
powerApplyActDao.batchDel(ids);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,13 @@
|
||||
(#{item.id}, #{item.prcId}, #{item.taskId}, #{item.dataId}, #{item.reportId}, #{item.power}, #{item.applyReason}, #{item.userId}, #{item.createUserId}, #{item.createDate}, #{item.updateDate}, #{item.updateUserId}, #{item.delFlag})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="batchDel">
|
||||
UPDATE power_apply_act set del_flag = 1
|
||||
where id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 根据查询VO进行分页查询 -->
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
<if test="pageVO.usid !='' and pageVO.usid != null">
|
||||
AND eo.id NOT IN ( SELECT ru.reportId FROM tr_report_user ru WHERE ru.userId = #{pageVO.usid} )
|
||||
AND eo.id NOT IN ( SELECT tt.report_id FROM power_apply tt WHERE tt.user_id = #{pageVO.usid} )
|
||||
AND eo.id NOT IN (SELECT tt.report_id FROM power_apply_act tt WHERE tt.user_id = #{pageVO.usid} and del_flag != 1 )
|
||||
</if>
|
||||
<if test="pageVO.name !='' and pageVO.name != null">
|
||||
and name like CONCAT(CONCAT('%',#{pageVO.name}),'%')
|
||||
|
||||
Reference in New Issue
Block a user