|
@@ -17,16 +17,24 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
private readonly VisaDeleClientCompanyRepository _clientCompanyRepository;
|
|
|
private readonly VisaDeleClientRepository _clientRepository;
|
|
|
-
|
|
|
+ private readonly CustomerCertRepository _customerCertRep;
|
|
|
+ private readonly CustomerFamilyRepository _customerFamilyRep;
|
|
|
+ private readonly CustomerSchoolRepository _customerSchoolRep;
|
|
|
+ private readonly CustomerCompanyRepository _customerCompanyRep;
|
|
|
/// <summary>
|
|
|
/// 初始化
|
|
|
/// </summary>
|
|
|
/// <param name="clientCompanyRepository"></param>
|
|
|
/// <param name="clientRepository"></param>
|
|
|
- public CRMController(VisaDeleClientCompanyRepository clientCompanyRepository, VisaDeleClientRepository clientRepository)
|
|
|
+ public CRMController(VisaDeleClientCompanyRepository clientCompanyRepository, VisaDeleClientRepository clientRepository,
|
|
|
+ CustomerCertRepository customerCertRep, CustomerFamilyRepository customerFamilyRep,CustomerSchoolRepository customerSchoolRep, CustomerCompanyRepository customerCompanyRep)
|
|
|
{
|
|
|
this._clientCompanyRepository = clientCompanyRepository;
|
|
|
this._clientRepository = clientRepository;
|
|
|
+ this._customerCertRep = customerCertRep;
|
|
|
+ this._customerFamilyRep = customerFamilyRep;
|
|
|
+ this._customerSchoolRep = customerSchoolRep;
|
|
|
+ _customerCompanyRep = customerCompanyRep;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -92,7 +100,7 @@ namespace OASystem.API.Controllers
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> DelClientCompany(ClientCompanyDto dto)
|
|
|
+ public async Task<IActionResult> DelClientCompany(DelBaseDto dto)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
@@ -217,5 +225,103 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
return Ok(JsonView(false, "程序错误!"));
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 证件表数据删除
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelCustomerCerts(DelBaseDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var result = await _customerCertRep.SoftDeleteByIdAsync<Crm_CustomerCert>(dto.Id.ToString(),dto.DeleteUserId);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 家庭成员表数据删除
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelCustomerFamily(DelBaseDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var result = await _customerFamilyRep.SoftDeleteByIdAsync<Crm_VisaCustomerFamily>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 客户学历表数据删除
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelCustomerSchool(DelBaseDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var result = await _customerSchoolRep.SoftDeleteByIdAsync<Crm_VisaCustomerSchool>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 客户工作经历表数据删除
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelVisaCustomerCompany(DelBaseDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var result = await _customerCompanyRep.SoftDeleteByIdAsync<Crm_VisaCustomerCompany>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
+ if (!result)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|