|
|
@@ -439,15 +439,15 @@ public class HlgCompanyController {
|
|
|
@DeleteMapping(value = "/delete")
|
|
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
|
|
Result<HlgCompany> result = new Result<HlgCompany>();
|
|
|
-// HlgCompany hlgCompany=hlgCompanyService.getById(id);
|
|
|
-// //从慧盈获取是否存在业务数据(即是否存在企业服务商)
|
|
|
-// Boolean isExistenceDate=hlgCompanyService.getIsExistenceDateByCompanyCode(hlgCompany.getCompanyCode(),1,10);
|
|
|
-// if(isExistenceDate || StringUtils.isNotBlank(hlgCompany.getCpBankInfo())){
|
|
|
-// result.error500("该企业已存在业务数据,不能删除");
|
|
|
-// }else {
|
|
|
-// hlgCompanyService.removeCompanyById(id);
|
|
|
-// result.success("删除成功!");
|
|
|
-// }
|
|
|
+ HlgCompany hlgCompany=hlgCompanyService.getById(id);
|
|
|
+ //从慧盈获取是否存在业务数据(即是否存在企业服务商)
|
|
|
+ Boolean isExistenceDate=hlgCompanyService.getIsExistenceDateByCompanyCode(hlgCompany.getCompanyCode(),1,10);
|
|
|
+ if(isExistenceDate){
|
|
|
+ result.error500("该企业已存在业务数据,不能删除");
|
|
|
+ }else {
|
|
|
+ hlgCompanyService.removeCompanyById(id);
|
|
|
+ result.success("删除成功!");
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|