添加工作组列表
This commit is contained in:
+3
-2
@@ -32,6 +32,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@@ -188,7 +189,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
||||
if(StringUtils.isBlank(id)){
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
payCompanyManagementService.removeById(id);
|
||||
payCompanyManagementService.removePayCompanyManagementById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@@ -210,7 +211,7 @@ public class PayCompanyManagementController extends JeroController<PayCompanyMan
|
||||
return Result.error("id不能为空!");
|
||||
}
|
||||
}
|
||||
this.payCompanyManagementService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
this.payCompanyManagementService.removePayCompanyManagementByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
+19
@@ -34,4 +34,23 @@ public interface IPayCompanyManagementService extends IService<PayCompanyManagem
|
||||
*/
|
||||
List<PayCompanyManagement> listPayCompanyManagement(List<String> companyList);
|
||||
|
||||
/**
|
||||
* @Description 删除企业
|
||||
* @Author lqt
|
||||
* @Date 2021/9/3
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void removePayCompanyManagementById(String id);
|
||||
/**
|
||||
* @Description 批量删除企业
|
||||
* @Author lqt
|
||||
* @Date 2021/9/3
|
||||
* @Param
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void removePayCompanyManagementByIds(List<String> ids);
|
||||
|
||||
}
|
||||
|
||||
+27
-3
@@ -1,9 +1,12 @@
|
||||
package com.jero.company.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.company.entity.PayCompanyManagement;
|
||||
import com.jero.company.entity.PayContactsManagement;
|
||||
import com.jero.company.mapper.PayCompanyManagementMapper;
|
||||
import com.jero.company.service.IPayCompanyManagementService;
|
||||
import com.jero.company.service.IPayContactsManagementService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -22,7 +25,10 @@ import java.util.List;
|
||||
public class PayCompanyManagementServiceImpl extends ServiceImpl<PayCompanyManagementMapper, PayCompanyManagement> implements IPayCompanyManagementService {
|
||||
|
||||
@Autowired
|
||||
IPayCompanyManagementService iPayCompanyManagementService;
|
||||
IPayCompanyManagementService payCompanyManagementService;
|
||||
|
||||
@Autowired
|
||||
private IPayContactsManagementService payContactsManagementService;
|
||||
|
||||
@Resource
|
||||
PayCompanyManagementMapper payCompanyManagementMapper;
|
||||
@@ -32,11 +38,11 @@ public class PayCompanyManagementServiceImpl extends ServiceImpl<PayCompanyManag
|
||||
public void updateCompanyData(List<PayCompanyManagement> listSigning, List<PayCompanyManagement> list) {
|
||||
// 已存在企业名称,变更数据来源
|
||||
if(!CollectionUtils.isEmpty(listSigning)){
|
||||
iPayCompanyManagementService.updateBatchById(listSigning);
|
||||
payCompanyManagementService.updateBatchById(listSigning);
|
||||
}
|
||||
// 更新excel数据
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
iPayCompanyManagementService.saveBatch(list);
|
||||
payCompanyManagementService.saveBatch(list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +50,22 @@ public class PayCompanyManagementServiceImpl extends ServiceImpl<PayCompanyManag
|
||||
public List<PayCompanyManagement> listPayCompanyManagement(List<String> companyList) {
|
||||
return payCompanyManagementMapper.listPayCompanyManagement(companyList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removePayCompanyManagementById(String id) {
|
||||
payCompanyManagementService.removeById(id);
|
||||
LambdaQueryWrapper<PayContactsManagement> query = new LambdaQueryWrapper<>();
|
||||
query.eq(PayContactsManagement::getCompanyId,id);
|
||||
payContactsManagementService.remove(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void removePayCompanyManagementByIds(List<String> ids) {
|
||||
payCompanyManagementService.removeByIds(ids);
|
||||
LambdaQueryWrapper<PayContactsManagement> query = new LambdaQueryWrapper<>();
|
||||
query.in(PayContactsManagement::getCompanyId,ids);
|
||||
payContactsManagementService.remove(query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user