|
|
@@ -28,7 +28,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.jeecg.modules.hlgcompany.service.IHlgCompanySubcontractorService;
|
|
|
+import org.jeecg.modules.hlgcpmanager.entity.HlgCpAccountDetail;
|
|
|
import org.jeecg.modules.hlgcpmanager.entity.HlgCpSetting;
|
|
|
+import org.jeecg.modules.hlgcpmanager.mapper.HlgCpAccountDetailMapper;
|
|
|
+import org.jeecg.modules.hlgcpmanager.service.IHlgCpAccountDetailService;
|
|
|
import org.jeecg.modules.hlgpayment.entity.HlgPaymentDetail;
|
|
|
import org.jeecg.modules.hlgplatform.entity.HlgPlatform;
|
|
|
import org.jeecg.modules.hlgplatform.mapper.HlgPlatformMapper;
|
|
|
@@ -59,8 +62,8 @@ public class HlgCompanyController {
|
|
|
private IHlgCompanyService hlgCompanyService;
|
|
|
@Autowired
|
|
|
private IHlgCompanySubcontractorService hlgCompanySubcontractorService;
|
|
|
- @Autowired
|
|
|
- private IHlgAccountDetailService hlgAccountDetailService;
|
|
|
+ @Resource
|
|
|
+ private HlgCpAccountDetailMapper hlgCpAccountDetailMapper;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -205,7 +208,9 @@ public class HlgCompanyController {
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
Result<HlgCompany> result = new Result<HlgCompany>();
|
|
|
List<HlgCompanySubcontractor> hlgCompanySubcontractorList=hlgCompanySubcontractorService.findSubcontractorListByCompanyid(id);
|
|
|
- if(hlgCompanySubcontractorList.size()>0){
|
|
|
+ HlgCompany hlgCompany=hlgCompanyService.getById(id);
|
|
|
+ List<HlgCpAccountDetail> hlgCpAccountDetailList=hlgCpAccountDetailMapper.findHlgCpAccountDetailListByCompanyId(id);
|
|
|
+ if(hlgCompanySubcontractorList.size()>0 || hlgCompany.getIsCpOn()==1 || hlgCpAccountDetailList.size()>0){
|
|
|
result.error500("该企业已存在业务数据,不能删除");
|
|
|
}else {
|
|
|
hlgCompanyService.removeCompanyById(id);
|