|
|
@@ -3,6 +3,7 @@ package com.ydtech.modules.esm.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ydtech.constants.RedisConstant;
|
|
|
@@ -18,6 +19,8 @@ import com.ydtech.utils.JsonUtils;
|
|
|
import com.ydtech.utils.RedisUtils;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -137,30 +140,81 @@ public class EsmInsCompanyController extends BaseController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+// /**
|
|
|
+// * 删除公司信息
|
|
|
+// *
|
|
|
+// * @param idList
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @PostMapping(value = "/deleteInsCompany")
|
|
|
+// public HttpResult delete(@RequestParam List<String> idList) {
|
|
|
+// Integer result = 0;
|
|
|
+// String msg = "删除成功";
|
|
|
+//
|
|
|
+// if (idList != null && idList.size() > 0) {
|
|
|
+//// result = esmInsCompanyService.delete(idList);
|
|
|
+// esmInsCompanyService.removeByIds(idList);
|
|
|
+//
|
|
|
+//// esmInsCompanyService.allowQuote(null,idList);
|
|
|
+// return HttpResult.ok(msg);
|
|
|
+//
|
|
|
+// } else {
|
|
|
+// msg = "编码不能为空";
|
|
|
+// return HttpResult.ok(msg, result);
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
- * 删除公司信息
|
|
|
+ * 批量逻辑删除
|
|
|
*
|
|
|
- * @param idList
|
|
|
- * @return
|
|
|
+ * @author: lig
|
|
|
+ * @date: 2023年04月14日 0014
|
|
|
*/
|
|
|
- @PostMapping(value = "/deleteInsCompany")
|
|
|
- public HttpResult delete(@RequestParam List<String> idList) {
|
|
|
- Integer result = 0;
|
|
|
- String msg = "删除成功";
|
|
|
+ @ApiOperation(value = "批量删除操作")
|
|
|
+ @DeleteMapping(value ="/idBatch")
|
|
|
+ public HttpResult deleteBatch(@RequestParam List<String> idList) {
|
|
|
+ LambdaUpdateWrapper<EsmInsCompany> lqw = new LambdaUpdateWrapper<>();
|
|
|
+ lqw.in(EsmInsCompany::getId,idList);
|
|
|
+ lqw.set(EsmInsCompany::getDelFlag,-1);
|
|
|
+ esmInsCompanyService.update(lqw);
|
|
|
+
|
|
|
+ return HttpResult.ok("操作成功");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除操作")
|
|
|
+ @DeleteMapping(value ="/{id}")
|
|
|
+ public HttpResult delete(@PathVariable("id") String id) {
|
|
|
|
|
|
- if (idList != null && idList.size() > 0) {
|
|
|
-// result = esmInsCompanyService.delete(idList);
|
|
|
- esmInsCompanyService.removeByIds(idList);
|
|
|
+ EsmInsCompany eic = esmInsCompanyService.getById(id);
|
|
|
+ if(null == eic) return HttpResult.error("对象不存在");
|
|
|
|
|
|
-// esmInsCompanyService.allowQuote(null,idList);
|
|
|
- return HttpResult.ok(msg);
|
|
|
+ eic.setDelFlag(-1);
|
|
|
+ esmInsCompanyService.updateById(eic);
|
|
|
+
|
|
|
+ return HttpResult.ok("操作成功");
|
|
|
|
|
|
- } else {
|
|
|
- msg = "编码不能为空";
|
|
|
- return HttpResult.ok(msg, result);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "恢复删除操作")
|
|
|
+ @GetMapping(value ="/{id}")
|
|
|
+ public HttpResult rollBackDelete(@PathVariable("id") String id) {
|
|
|
+
|
|
|
+ EsmInsCompany eic = esmInsCompanyService.getById(id);
|
|
|
+ if(null == eic) return HttpResult.error("对象不存在");
|
|
|
+
|
|
|
+ eic.setDelFlag(0);
|
|
|
+ esmInsCompanyService.updateById(eic);
|
|
|
+
|
|
|
+ return HttpResult.ok("操作成功");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@ApiOperation(value = "获取允许报价的保险公司列表")
|
|
|
@GetMapping(value = "/gainAllowQuoteList")
|
|
|
public HttpResult gainAllowQuoteList() {
|