|
@@ -8,6 +8,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
import com.ruoyi.lnst.domain.LnstYg;
|
|
|
import com.ruoyi.lnst.mapper.LnstYgMapper;
|
|
|
+import com.ruoyi.lnst.mapper.ZwywLrJbxxMapper;
|
|
|
import com.ruoyi.lnst.service.ILnstYgService;
|
|
|
import com.ruoyi.system.api.RemoteUserService;
|
|
|
import com.ruoyi.system.api.domain.SysUser;
|
|
@@ -18,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -39,6 +39,9 @@ public class LnstYgServiceImpl implements ILnstYgService
|
|
|
@Autowired
|
|
|
private SysDeptJlMapper sysDeptJlMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZwywLrJbxxMapper zwywLrJbxxMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询养老食堂_员工
|
|
|
*
|
|
@@ -135,7 +138,15 @@ public class LnstYgServiceImpl implements ILnstYgService
|
|
|
@Override
|
|
|
public int deleteLnstYgByIds(String[] ids)
|
|
|
{
|
|
|
- return lnstYgMapper.deleteBatchIds(Arrays.asList(ids));
|
|
|
+ int res = 0;
|
|
|
+ for (String id: ids) {
|
|
|
+ LnstYg yg = lnstYgMapper.selectById(id);
|
|
|
+ if (ObjectUtils.isNotEmpty(yg)) {
|
|
|
+ zwywLrJbxxMapper.deleteUser(yg.getUserId());
|
|
|
+ lnstYgMapper.deleteById(id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
private String getXb(String sfzh) {
|