|
|
|
@ -1,12 +1,17 @@
|
|
|
|
package com.ruoyi.kaohe.service.impl;
|
|
|
|
package com.ruoyi.kaohe.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.ruoyi.kaohe.domain.KhPcEmp;
|
|
|
|
|
|
|
|
import com.ruoyi.kaohe.mapper.KhPcEmpMapper;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import com.ruoyi.kaohe.mapper.KhPingceMapper;
|
|
|
|
import com.ruoyi.kaohe.mapper.KhPingceMapper;
|
|
|
|
import com.ruoyi.kaohe.domain.KhPingce;
|
|
|
|
import com.ruoyi.kaohe.domain.KhPingce;
|
|
|
|
import com.ruoyi.kaohe.service.IKhPingceService;
|
|
|
|
import com.ruoyi.kaohe.service.IKhPingceService;
|
|
|
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 考核评测Service业务层处理
|
|
|
|
* 考核评测Service业务层处理
|
|
|
|
@ -19,6 +24,8 @@ public class KhPingceServiceImpl implements IKhPingceService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private KhPingceMapper khPingceMapper;
|
|
|
|
private KhPingceMapper khPingceMapper;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private KhPcEmpMapper khPcEmpMapper;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询考核评测
|
|
|
|
* 查询考核评测
|
|
|
|
@ -77,9 +84,21 @@ public class KhPingceServiceImpl implements IKhPingceService
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@Transactional
|
|
|
|
public int deleteKhPingceByIds(Long[] ids)
|
|
|
|
public int deleteKhPingceByIds(Long[] ids)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return khPingceMapper.deleteKhPingceByIds(ids);
|
|
|
|
int r = khPingceMapper.deleteKhPingceByIds(ids);
|
|
|
|
|
|
|
|
for (Long id : ids) {
|
|
|
|
|
|
|
|
//删除原来关联
|
|
|
|
|
|
|
|
KhPcEmp query = new KhPcEmp();
|
|
|
|
|
|
|
|
query.setPcId(id);
|
|
|
|
|
|
|
|
List<KhPcEmp> temItems = khPcEmpMapper.selectKhPcEmpList(query);
|
|
|
|
|
|
|
|
List<Long> pcEmpIds = temItems.stream().map(KhPcEmp::getId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if (pcEmpIds != null && pcEmpIds.size() > 0) {
|
|
|
|
|
|
|
|
khPcEmpMapper.deleteKhPcEmpByIds(pcEmpIds.toArray(new Long[pcEmpIds.size()]));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
|