From 418eb69319481f176a49ab085b971d81d55661f7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 20 五月 2025 10:32:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
---
server/service/src/main/java/com/doumee/dao/business/dto/SaveSupplementDescribeDTO.java | 26
server/platform/src/main/java/com/doumee/api/business/UnionChangeController.java | 1
server/service/src/main/java/com/doumee/dao/business/dto/CompensationDTO.java | 15
server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java | 897 ++++++++++++++++++++++
server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java | 2
server/service/src/main/java/com/doumee/dao/business/dto/AcceptanceSettleClaimsDTO.java | 24
server/service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java | 4
server/service/src/main/java/com/doumee/dao/business/dto/SettleClaimsDTO.java | 6
server/service/src/main/java/com/doumee/core/utils/Constants.java | 99 ++
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 5
server/service/src/main/java/com/doumee/dao/business/dto/OptSettleClaimsDTO.java | 29
server/service/src/main/java/com/doumee/dao/business/vo/RiskConfigVO.java | 6
server/service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java | 5
server/service/src/main/java/com/doumee/dao/business/dto/RiskConfigDTO.java | 2
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 11
server/service/src/main/java/com/doumee/dao/business/model/SettleClaims.java | 35
server/service/src/main/java/com/doumee/dao/business/model/SolutionsBase.java | 4
server/service/src/main/java/com/doumee/service/business/SettleClaimsService.java | 107 ++
server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java | 34
server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java | 7
server/service/src/main/java/com/doumee/service/business/impl/KnowledgeServiceImpl.java | 33
server/service/src/main/java/com/doumee/dao/business/dto/PayCashDTO.java | 24
server/service/src/main/java/com/doumee/core/utils/DateUtil.java | 226 +++--
/dev/null | 53 -
server/service/src/main/java/com/doumee/dao/business/dto/CaseTypeDTO.java | 16
server/service/src/main/java/com/doumee/dao/business/vo/CompensationVO.java | 27
server/platform/src/main/java/com/doumee/api/business/SettleRiskController.java | 159 ++++
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java | 366 ++++-----
server/service/src/main/java/com/doumee/dao/business/dto/DiscussAuditDTO.java | 18
server/company/src/main/java/com/doumee/api/business/SettleRiskController.java | 71 +
30 files changed, 1,932 insertions(+), 380 deletions(-)
diff --git a/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java b/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
index 18f0c15..43f74a6 100644
--- a/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
+++ b/server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java
@@ -126,6 +126,13 @@
}
+ @ApiOperation("鏌ヨ浜哄憳鍙姤妗堟暟鎹�")
+ @GetMapping("/getMemberSettleClaimsList")
+ public ApiResponse<List<ApplyDetail>> getMemberSettleClaimsList(@RequestParam Integer memberId) {
+ return ApiResponse.success(applyDetailService.getMemberSettleClaimsList(memberId));
+ }
+
+
}
diff --git a/server/company/src/main/java/com/doumee/api/business/SettleRiskController.java b/server/company/src/main/java/com/doumee/api/business/SettleRiskController.java
new file mode 100644
index 0000000..29fefa0
--- /dev/null
+++ b/server/company/src/main/java/com/doumee/api/business/SettleRiskController.java
@@ -0,0 +1,71 @@
+package com.doumee.api.business;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.dao.business.dto.CompensationDTO;
+import com.doumee.dao.business.dto.OptSettleClaimsDTO;
+import com.doumee.dao.business.dto.SaveSupplementDescribeDTO;
+import com.doumee.dao.business.dto.SettleClaimsDTO;
+import com.doumee.service.business.SettleClaimsService;
+import com.doumee.service.system.impl.SystemDictDataServiceImpl;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/01/16 10:03
+ */
+@Api(tags = "鎶ユ鐞嗚禂锛堟柊锛�")
+@RestController
+@RequestMapping("/business/settleRisk")
+public class SettleRiskController extends BaseController {
+
+ @Autowired
+ private SystemDictDataServiceImpl systemDictDataService;
+
+ @Autowired
+ private SettleClaimsService settleClaimsService;
+
+
+ @PreventRepeat
+ @ApiOperation("鐞嗚禂鎶ユ")
+ @PostMapping("/saveSettleClaims")
+ public ApiResponse saveSettleClaims(@RequestBody SettleClaimsDTO settleClaimsDTO) {
+ settleClaimsService.saveSettleClaims(settleClaimsDTO,systemDictDataService);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("娣诲姞鏉愭枡")
+ @PostMapping("/saveSupplementFile")
+ public ApiResponse saveSupplementFile(@RequestBody SaveSupplementDescribeDTO dto) {
+ settleClaimsService.saveSupplementFile(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+ @PreventRepeat
+ @ApiOperation("鎾ら攢鎶ユ")
+ @PostMapping("/returnSettle")
+ public ApiResponse returnSettle(@RequestBody OptSettleClaimsDTO dto) {
+ settleClaimsService.returnSettle(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("纭閲戦")
+ @GetMapping("/confirmFee")
+ public ApiResponse confirmFee(@RequestParam Integer id) {
+ settleClaimsService.confirmFee(id);
+ return ApiResponse.success(null);
+ }
+
+
+
+}
diff --git a/server/platform/src/main/java/com/doumee/api/business/RiskConfigController.java b/server/platform/src/main/java/com/doumee/api/business/RiskConfigController.java
deleted file mode 100644
index 7d529c6..0000000
--- a/server/platform/src/main/java/com/doumee/api/business/RiskConfigController.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.doumee.api.business;
-
-import com.doumee.api.BaseController;
-import com.doumee.core.annotation.excel.ExcelExporter;
-import com.doumee.core.annotation.pr.PreventRepeat;
-import com.doumee.core.model.ApiResponse;
-import com.doumee.core.model.PageData;
-import com.doumee.core.model.PageWrap;
-import com.doumee.dao.business.dto.RiskConfigDTO;
-import com.doumee.dao.business.model.Insurance;
-import com.doumee.dao.business.vo.RiskConfigVO;
-import com.doumee.service.business.InsuranceService;
-import com.doumee.service.system.SystemDictDataService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author 姹熻箘韫�
- * @date 2024/01/16 10:03
- */
-@Api(tags = "椋庨櫓閰嶇疆")
-@RestController
-@RequestMapping("/business/riskConfig")
-public class RiskConfigController extends BaseController {
-
- @Autowired
- private SystemDictDataService systemDictDataService;
-
-
- @ApiOperation("鑾峰彇椋庨櫓閰嶇疆")
- @GetMapping("/getRiskConfig")
- public ApiResponse<RiskConfigVO> getRiskConfig() {
- return ApiResponse.success(systemDictDataService.getRiskConfig());
- }
-
-
- @ApiOperation("鏇存柊椋庨櫓閰嶇疆")
- @PostMapping("/updRiskConfig")
- public ApiResponse updRiskConfig(@RequestBody RiskConfigDTO riskConfigDTO) {
- systemDictDataService.updRiskConfig(riskConfigDTO);
- return ApiResponse.success(null);
- }
-
-
-
-}
diff --git a/server/platform/src/main/java/com/doumee/api/business/SettleRiskController.java b/server/platform/src/main/java/com/doumee/api/business/SettleRiskController.java
new file mode 100644
index 0000000..8617169
--- /dev/null
+++ b/server/platform/src/main/java/com/doumee/api/business/SettleRiskController.java
@@ -0,0 +1,159 @@
+package com.doumee.api.business;
+
+import com.doumee.api.BaseController;
+import com.doumee.core.annotation.pr.PreventRepeat;
+import com.doumee.core.model.ApiResponse;
+import com.doumee.dao.business.dto.*;
+import com.doumee.dao.business.vo.CompensationVO;
+import com.doumee.dao.business.vo.RiskConfigVO;
+import com.doumee.service.business.SettleClaimsService;
+import com.doumee.service.system.SystemDictDataService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2024/01/16 10:03
+ */
+@Api(tags = "鎶ユ鐞嗚禂锛堟柊锛�")
+@RestController
+@RequestMapping("/business/settleRisk")
+public class SettleRiskController extends BaseController {
+
+ @Autowired
+ private SystemDictDataService systemDictDataService;
+
+ @Autowired
+ private SettleClaimsService settleClaimsService;
+
+ @ApiOperation("鑾峰彇椋庨櫓閰嶇疆")
+ @GetMapping("/getRiskConfig")
+ public ApiResponse<RiskConfigVO> getRiskConfig() {
+ return ApiResponse.success(systemDictDataService.getRiskConfig());
+ }
+
+
+ @ApiOperation("鏇存柊椋庨櫓閰嶇疆")
+ @PostMapping("/updRiskConfig")
+ public ApiResponse updRiskConfig(@RequestBody RiskConfigDTO riskConfigDTO) {
+ systemDictDataService.updRiskConfig(riskConfigDTO);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("琛ュ厖璇存槑")
+ @PostMapping("/saveSupplementDescribe")
+ public ApiResponse saveSupplementDescribe(@RequestBody SaveSupplementDescribeDTO dto) {
+ settleClaimsService.saveSupplementDescribe(dto);
+ return ApiResponse.success(null);
+ }
+
+ @PreventRepeat
+ @ApiOperation("娣诲姞鏉愭枡")
+ @PostMapping("/saveSupplementFile")
+ public ApiResponse saveSupplementFile(@RequestBody SaveSupplementDescribeDTO dto) {
+ settleClaimsService.saveSupplementFile(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("骞冲彴绔嬫鎴栭��鍥�")
+ @PostMapping("/register")
+ public ApiResponse register(@RequestBody OptSettleClaimsDTO dto) {
+ settleClaimsService.register(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+ @PreventRepeat
+ @ApiOperation("娣诲姞鎶ユ鍙�")
+ @PostMapping("/addReportNum")
+ public ApiResponse addReportNum(@RequestBody OptSettleClaimsDTO dto) {
+ settleClaimsService.addReportNum(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+ @PreventRepeat
+ @ApiOperation("娣诲姞澶囨敞")
+ @PostMapping("/addRemark")
+ public ApiResponse addRemark(@RequestBody OptSettleClaimsDTO dto) {
+ settleClaimsService.addRemark(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("鍙楃悊涓氬姟")
+ @PostMapping("/acceptance")
+ public ApiResponse acceptance(@RequestBody AcceptanceSettleClaimsDTO dto) {
+ settleClaimsService.acceptance(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("鐞嗚禂璐圭敤椤逛俊鎭�")
+ @GetMapping("/getCompensation")
+ public ApiResponse<List<CompensationVO>> getCompensation(@RequestParam Integer id) {
+ return ApiResponse.success(settleClaimsService.getCompensation(id));
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("鐞嗚禂")
+ @PostMapping("/compensation")
+ public ApiResponse compensation(@RequestBody CompensationDTO dto) {
+ settleClaimsService.compensation(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("鍟嗚瀹℃壒")
+ @PostMapping("/discussAudit")
+ public ApiResponse discussAudit(@RequestBody DiscussAuditDTO dto) {
+ settleClaimsService.discussAudit(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+ @PreventRepeat
+ @ApiOperation("鏍歌禂")
+ @PostMapping("/nuclearCompensation")
+ public ApiResponse nuclearCompensation(@RequestBody CompensationDTO dto) {
+ settleClaimsService.nuclearCompensation(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+ @PreventRepeat
+ @ApiOperation("淇敼閲戦")
+ @PostMapping("/updFee")
+ public ApiResponse updFee(@RequestBody CompensationDTO dto) {
+ settleClaimsService.updFee(dto);
+ return ApiResponse.success(null);
+ }
+
+
+ @PreventRepeat
+ @ApiOperation("淇敼妗堜欢绫诲瀷")
+ @PostMapping("/updCaseType")
+ public ApiResponse updCaseType(@RequestBody CaseTypeDTO dto) {
+ settleClaimsService.updCaseType(dto);
+ return ApiResponse.success(null);
+ }
+
+
+
+}
diff --git a/server/platform/src/main/java/com/doumee/api/business/UnionChangeController.java b/server/platform/src/main/java/com/doumee/api/business/UnionChangeController.java
index 73317e5..9c50bd1 100644
--- a/server/platform/src/main/java/com/doumee/api/business/UnionChangeController.java
+++ b/server/platform/src/main/java/com/doumee/api/business/UnionChangeController.java
@@ -120,6 +120,7 @@
return ApiResponse.success(unionChangeService.getSignLink(smsCheckDTO));
}
+
@ApiOperation("涓婁紶淇濋櫓鍗�")
@PostMapping("/uploadBXD")
@RequiresPermissions("business:unionchange:uploadBXD")
diff --git a/server/service/src/main/java/com/doumee/core/utils/Constants.java b/server/service/src/main/java/com/doumee/core/utils/Constants.java
index 51c282c..cf0fd7d 100644
--- a/server/service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -1934,26 +1934,28 @@
public enum SettleClaimsStatus {
//鐘舵�� 0鏆傚瓨涓� 1宸叉姤妗� 2寰呯珛妗� 3宸茬珛妗� 4绔嬫閫�鍥� 5寰呭彈鐞� 6鎷掔粷鍙楃悊 7鍟嗚寰呭鎵�
- // 8鍟嗚瀹℃壒鎷掔粷 9宸插彈鐞� 10寰呮牳璧� 11宸叉牳璧� 12寰呯粨妗� 13宸茬粨妗� 14宸叉挙妗�
+ // 8鍟嗚瀹℃壒鎷掔粷 9宸插彈鐞� 10寰呮牳璧� 11宸叉牳璧� 12宸茬‘璁ら噾棰� 13宸茬粨妗� 14宸叉挙妗�
WAIT_ACCEPTANCE(0, "鏆傚瓨涓�"),
RETURN_ACCEPTANCE(1, "宸叉姤妗�"),
- DEAL_ING(2, "寰呯珛妗�"),
+ DEAL_ING(2, "寰呯珛妗� 锛堝純鐢級"),
CONFIRM_INFORMATION(3, "宸茬珛妗�"),
FINISH_ACCEPTANCE(4, "绔嬫閫�鍥�"),
WAIT_DEAL(5, "寰呭彈鐞�"),
REJECT_DEAL(6, "鎷掔粷鍙楃悊"),
WAIT_DISCUSS_AUDIT(7, "寰呭晢璁鎵�"),
WAIT_DISCUSS_REJECT(8, "鍟嗚瀹℃壒鎷掔粷"),
- ACCEPTANCE(9, "宸插彈鐞�"),
+ ACCEPTANCE(9, "宸插彈鐞�"),//寰呯悊绠�
WAIT_AUDIT_COMPENSATION(10, "寰呮牳璧�"),
COMPENSATION(11, "宸叉牳璧�"),
- WAIT_CLOSE_CASE(12, "寰呯粨妗�"),
- CLOSE_CASE(13, "寰呯粨妗�"),
+ CONFIRM_FEE(12, "宸茬‘璁ら噾棰�"),
+ CLOSE_CASE(13, "宸茬粨妗�"),
RETURN(14, "宸叉挙妗�"),
;
// 鎴愬憳鍙橀噺
- private String name;
- private int key;
+ private String name;//涓氬姟鎻忚堪
+ private int key;//涓氬姟鐘舵��
+ private int companyParentKey;//浼佷笟涓绘祦绋�
+ private int platformParentKey;//骞冲彴涓绘祦绋�
// 鏋勯�犳柟娉�
SettleClaimsStatus(int key, String name) {
@@ -1996,12 +1998,25 @@
PLATFORM_FINISH(3, "缁撴鎻愪氦","鎻愪氦鎰忚锛�${param}"),
UPDATE_DATA(4, "淇敼淇℃伅","鎻愪氦鎰忚锛�${param}"),
SUPPLEMENT(5, "琛ュ厖璇存槑","鎻愪氦鎰忚锛�${param}"),
- PLATFORM_LP_DEAL(6, "骞冲彴鐞嗚禂澶勭悊","鎻愪氦鎰忚锛�${param}"),
+ PLATFORM_LP_DEAL(6, "骞冲彴鐞嗚禂澶勭悊","宸插湪骞冲彴瀹屾垚鐞嗚禂"),
PLATFORM_REMARK(7, "骞冲彴澶囨敞鏍囩","${param}"),
PLATFORM_ADDCODE(8, "骞冲彴娣诲姞鎶ユ鍙�","澶囨鍙凤細${param}"),
PLATFORM_UN_AGREE_BACK(9, "浼佷笟涓嬭浇璧勬枡",""),
PLATFORM_DOWNLOAD(10, "骞冲彴涓嬭浇璧勬枡",""),
PLATFORM_CHECK_PASS(11, "骞冲彴涓婁紶璧勬枡",""),
+ SUPPLEMENT_DESCRIBE(12, "骞冲彴濉啓闇�琛ュ厖鍐呭",""),
+ RETURN_SETTLE(13, "鎾ら攢鎶ユ",""),
+ PLATFORM_REGISTER(14, "骞冲彴绔嬫",""),
+ PLATFORM_ACCEPTANCE(15, "鍙楃悊-宸插彈鐞�",""),
+ PLATFORM_REFUSE_ACCEPTANCE(16, "鍙楃悊-鎷掔粷鍙楃悊","鎷掔粷鍘熷洜锛�${param}"),
+ PLATFORM_DISCUSS(17, "鍙楃悊-鍟嗚",""),
+ PLATFORM_DISCUSS_PASS(18, "鍙楃悊-鍟嗚閫氳繃",""),
+ PLATFORM_DISCUSS_REFUSE(19, "鍙楃悊-鍟嗚鎷掔粷","鎷掔粷鍘熷洜锛�${param}"),
+ PLATFORM_WAIT_DISCUSS(20, "鍙楃悊-鍟嗚寰呭鎵�",""),
+ PLATFORM_HP_DEAL(21, "鏍歌禂-鎻愪氦鏍歌禂閲戦","宸叉彁浜よ禂浠橀噾棰濓紝寰呯敤鎴风‘璁�"),
+ PLATFORM_UPD_FEE(22, "鏍歌禂-淇敼閲戦",""),
+ CONFIRM_FEE(22, "鏍歌禂-瀹㈡埛纭閲戦","宸茬‘璁ら噾棰�"),
+ UPD_CASE_TYPE(23, "鍙楃悊-纭妗堜欢绫诲瀷","宸茬‘璁ゆ浠剁被鍨�"),
;
// 鎴愬憳鍙橀噺
private String name;
@@ -2621,5 +2636,73 @@
}
+ /**
+ * 璧斾粯椤�
+ */
+ public enum compensation{
+ YL_COMPENSATION(0, "鍖荤枟鐞嗚禂",1),
+ WG_COMPENSATION(1, "璇伐鐞嗚禂",1),
+ SC_COMPENSATION(2, "浼ゆ畫鐞嗚禂",1),
+ SW_COMPENSATION(3, "姝讳骸鐞嗚禂",1),
+ HSF_FEE(4, "浼欓璐�",2),
+ XY_FEE(5, "缁尰璐�",2),
+ YY_FEE(6, "钀ュ吇璐�",2),
+ HL_FEE(7, "鎶ょ悊璐�",2),
+ ZDJB_FEE(8, "閲嶅ぇ鐤剧梾璧斿伩閲�",2),
+ TB_FEE(9, "鐗瑰埆璐圭敤",2),
+ ZS_FEE(10, "浣忓璐�",2),
+ JT_FEE(11, "娲ヨ创",2),
+ CJ_FEE(12, "娈嬬柧璧斿伩閲�",2),
+ BFYR_FEE(13, "琚姎鍏讳汉鐢熸椿璐�",2),
+ SCF_FEE(14, "涓ц懍璐�",2),
+ JSFXJ_FEE(15, "绮剧鎶氭仱閲�",2),
+ JD_FEE(16, "閴村畾璐�",2),
+ SS_FEE(17, "璇夎璐�",2),
+ LS_FEE(18, "寰嬪笀璐�",2),
+ TRAFFIC_FEE(19, "浜ら�氳垂",2),
+ CJQJ_FEE(20, "娈嬬柧鍣ㄥ叿璐�",2),
+ QT_FEE(21, "鍏朵粬璐圭敤",2),
+ ;
+ // 鎴愬憳鍙橀噺
+ private String name;
+ private int key;
+ private int type;
+
+ // 鏋勯�犳柟娉�
+ compensation(int key, String name, int type) {
+ this.name = name;
+ this.key = key;
+ this.type = type;
+ }
+
+
+ // get set 鏂规硶
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getKey() {
+ return key;
+ }
+
+ public void setKey(int key) {
+ this.key = key;
+ }
+
+
+ public int getType() {
+ return type;
+ }
+
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ }
+
}
diff --git a/server/service/src/main/java/com/doumee/core/utils/DateUtil.java b/server/service/src/main/java/com/doumee/core/utils/DateUtil.java
index fa297b0..6860dfb 100644
--- a/server/service/src/main/java/com/doumee/core/utils/DateUtil.java
+++ b/server/service/src/main/java/com/doumee/core/utils/DateUtil.java
@@ -113,6 +113,33 @@
}
}
+ public static long getBetweenMin(Date fromDate, Date toDate) {
+ long m_intervalday = 0;// 鍒濆鍖栨椂闂撮棿闅旂殑鍊间负0
+ // 浣跨敤鐨勬椂闂存牸寮忎负yyyy-MM-dd
+ try {
+ m_intervalday = toDate.getTime() - fromDate.getTime();// 璁$畻鎵�寰椾负寰鏁�
+ m_intervalday = m_intervalday / 1000 / 60 ;// 璁$畻鎵�寰楃殑澶╂暟
+
+ return m_intervalday + 1;
+ } catch (Exception e) {
+ return Integer.MIN_VALUE;
+ }
+ }
+
+
+ public static long getBetweenDay(Date fromDate, Date toDate) {
+ long m_intervalday = 0;// 鍒濆鍖栨椂闂撮棿闅旂殑鍊间负0
+ // 浣跨敤鐨勬椂闂存牸寮忎负yyyy-MM-dd
+ try {
+ m_intervalday = toDate.getTime() - fromDate.getTime();// 璁$畻鎵�寰椾负寰鏁�
+ m_intervalday = m_intervalday / 1000 / 60 / 60 / 24 ;// 璁$畻鎵�寰楃殑澶╂暟
+
+ return m_intervalday + 1;
+ } catch (Exception e) {
+ return Integer.MIN_VALUE;
+ }
+ }
+
/**
* @author Pablo Descrption:取锟矫碉拷前锟斤拷锟斤拷getgetg get Date format
* Example锛�2008.03.15
@@ -889,95 +916,95 @@
* @return 杞崲寰楀埌鐨勬棩鏈�
*/
@SuppressWarnings("unchecked")
- public static Date stringToDate(String strDate, String oracleFormat) {
- if (strDate == null)
- return null;
- Hashtable<Integer, String> h = new Hashtable<Integer, String>();
- String javaFormat = new String();
- String s = oracleFormat.toLowerCase();
- if (s.indexOf("yyyy") != -1)
- h.put(new Integer(s.indexOf("yyyy")), "yyyy");
- else if (s.indexOf("yy") != -1)
- h.put(new Integer(s.indexOf("yy")), "yy");
- if (s.indexOf("mm") != -1)
- h.put(new Integer(s.indexOf("mm")), "MM");
-
- if (s.indexOf("dd") != -1)
- h.put(new Integer(s.indexOf("dd")), "dd");
- if (s.indexOf("hh24") != -1)
- h.put(new Integer(s.indexOf("hh24")), "HH");
- if (s.indexOf("mi") != -1)
- h.put(new Integer(s.indexOf("mi")), "mm");
- if (s.indexOf("ss") != -1)
- h.put(new Integer(s.indexOf("ss")), "ss");
-
- int intStart = 0;
- while (s.indexOf("-", intStart) != -1) {
- intStart = s.indexOf("-", intStart);
- h.put(new Integer(intStart), "-");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf("/", intStart) != -1) {
- intStart = s.indexOf("/", intStart);
- h.put(new Integer(intStart), "/");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf(" ", intStart) != -1) {
- intStart = s.indexOf(" ", intStart);
- h.put(new Integer(intStart), " ");
- intStart++;
- }
-
- intStart = 0;
- while (s.indexOf(":", intStart) != -1) {
- intStart = s.indexOf(":", intStart);
- h.put(new Integer(intStart), ":");
- intStart++;
- }
-
- if (s.indexOf("骞�") != -1)
- h.put(new Integer(s.indexOf("骞�")), "骞�");
- if (s.indexOf("鏈�") != -1)
- h.put(new Integer(s.indexOf("鏈�")), "鏈�");
- if (s.indexOf("鏃�") != -1)
- h.put(new Integer(s.indexOf("鏃�")), "鏃�");
- if (s.indexOf("鏃�") != -1)
- h.put(new Integer(s.indexOf("鏃�")), "鏃�");
- if (s.indexOf("鍒�") != -1)
- h.put(new Integer(s.indexOf("鍒�")), "鍒�");
- if (s.indexOf("绉�") != -1)
- h.put(new Integer(s.indexOf("绉�")), "绉�");
-
- int i = 0;
- while (h.size() != 0) {
- Enumeration e = h.keys();
- int n = 0;
- while (e.hasMoreElements()) {
- i = ((Integer) e.nextElement()).intValue();
- if (i >= n)
- n = i;
- }
- String temp = (String) h.get(new Integer(n));
- h.remove(new Integer(n));
-
- javaFormat = temp + javaFormat;
- }
- SimpleDateFormat df = new SimpleDateFormat(javaFormat);
-
- Date myDate = new Date();
- try {
- myDate = df.parse(strDate);
- } catch (Exception e) {
- // e.printStackTrace();
- return null;
- }
-
- return myDate;
- }
+// public static Date stringToDate(String strDate, String oracleFormat) {
+// if (strDate == null)
+// return null;
+// Hashtable<Integer, String> h = new Hashtable<Integer, String>();
+// String javaFormat = new String();
+// String s = oracleFormat.toLowerCase();
+// if (s.indexOf("yyyy") != -1)
+// h.put(new Integer(s.indexOf("yyyy")), "yyyy");
+// else if (s.indexOf("yy") != -1)
+// h.put(new Integer(s.indexOf("yy")), "yy");
+// if (s.indexOf("mm") != -1)
+// h.put(new Integer(s.indexOf("mm")), "MM");
+//
+// if (s.indexOf("dd") != -1)
+// h.put(new Integer(s.indexOf("dd")), "dd");
+// if (s.indexOf("hh24") != -1)
+// h.put(new Integer(s.indexOf("hh24")), "HH");
+// if (s.indexOf("mi") != -1)
+// h.put(new Integer(s.indexOf("mi")), "mm");
+// if (s.indexOf("ss") != -1)
+// h.put(new Integer(s.indexOf("ss")), "ss");
+//
+// int intStart = 0;
+// while (s.indexOf("-", intStart) != -1) {
+// intStart = s.indexOf("-", intStart);
+// h.put(new Integer(intStart), "-");
+// intStart++;
+// }
+//
+// intStart = 0;
+// while (s.indexOf("/", intStart) != -1) {
+// intStart = s.indexOf("/", intStart);
+// h.put(new Integer(intStart), "/");
+// intStart++;
+// }
+//
+// intStart = 0;
+// while (s.indexOf(" ", intStart) != -1) {
+// intStart = s.indexOf(" ", intStart);
+// h.put(new Integer(intStart), " ");
+// intStart++;
+// }
+//
+// intStart = 0;
+// while (s.indexOf(":", intStart) != -1) {
+// intStart = s.indexOf(":", intStart);
+// h.put(new Integer(intStart), ":");
+// intStart++;
+// }
+//
+// if (s.indexOf("骞�") != -1)
+// h.put(new Integer(s.indexOf("骞�")), "骞�");
+// if (s.indexOf("鏈�") != -1)
+// h.put(new Integer(s.indexOf("鏈�")), "鏈�");
+// if (s.indexOf("鏃�") != -1)
+// h.put(new Integer(s.indexOf("鏃�")), "鏃�");
+// if (s.indexOf("鏃�") != -1)
+// h.put(new Integer(s.indexOf("鏃�")), "鏃�");
+// if (s.indexOf("鍒�") != -1)
+// h.put(new Integer(s.indexOf("鍒�")), "鍒�");
+// if (s.indexOf("绉�") != -1)
+// h.put(new Integer(s.indexOf("绉�")), "绉�");
+//
+// int i = 0;
+// while (h.size() != 0) {
+// Enumeration e = h.keys();
+// int n = 0;
+// while (e.hasMoreElements()) {
+// i = ((Integer) e.nextElement()).intValue();
+// if (i >= n)
+// n = i;
+// }
+// String temp = (String) h.get(new Integer(n));
+// h.remove(new Integer(n));
+//
+// javaFormat = temp + javaFormat;
+// }
+// SimpleDateFormat df = new SimpleDateFormat(javaFormat);
+//
+// Date myDate = new Date();
+// try {
+// myDate = df.parse(strDate);
+// } catch (Exception e) {
+// // e.printStackTrace();
+// return null;
+// }
+//
+// return myDate;
+// }
public static Date StringToDate(String DATE1) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
@@ -3084,7 +3111,25 @@
return cal.getTime();
}
+ /**
+ * 鑾峰彇鏌愪釜鏃堕棿X鍒嗛挓鍚庣殑鏃堕棿
+ * @param minutes
+ * @param date
+ * @return
+ */
+ public static Date afterMinutesByDate(Integer minutes,Date date){
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.add(Calendar.MINUTE,minutes);
+ return cal.getTime();
+ }
+ public static Date afterDayByDate(Integer days,Date date){
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.add(Calendar.DATE,days);
+ return cal.getTime();
+ }
/**
* 璁$畻澶氬皯鑷劧骞�/鏈�/鏃ュ悗鐨勬棩鏈�
* @param startDate 寮�濮嬫棩鏈�
@@ -3157,7 +3202,8 @@
public static void main(String[] args) throws Exception{
- System.out.println(DateUtil.getLongDateTime(new Date()));;
+ System.out.println(DateUtil.StringToDate("2025-05-16 13:49:40").getTime());
+// System.out.println(DateUtil.getLongDateTime(new Date()));;
}
/**
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/AcceptanceSettleClaimsDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/AcceptanceSettleClaimsDTO.java
new file mode 100644
index 0000000..2aee9cc
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/AcceptanceSettleClaimsDTO.java
@@ -0,0 +1,24 @@
+package com.doumee.dao.business.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 瀛樺偍 琛ュ厖璇存槑
+ */
+@Data
+public class AcceptanceSettleClaimsDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "0=鍙楃悊锛�1=鎷掔粷鍙楃悊锛�2=鍟嗚瀹℃壒锛�3=鍟嗚涓嶅鎵�")
+ private Integer status;
+
+ @ApiModelProperty(value = "璇存槑銆佸娉�")
+ private String describe;
+
+ @ApiModelProperty(value = "闂绫诲瀷锛氬涓敤鑻辨枃閫楀彿闅斿紑")
+ private String syProblemOpts;
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/CaseTypeDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/CaseTypeDTO.java
new file mode 100644
index 0000000..a3a7392
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/CaseTypeDTO.java
@@ -0,0 +1,16 @@
+package com.doumee.dao.business.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class CaseTypeDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "妗堜欢绫诲瀷锛�1=鍖荤枟锛�2=浼ゆ畫锛�3=姝讳骸")
+ private Integer caseType;
+
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/CompensationDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/CompensationDTO.java
new file mode 100644
index 0000000..dd47673
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/CompensationDTO.java
@@ -0,0 +1,15 @@
+package com.doumee.dao.business.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class CompensationDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+
+ @ApiModelProperty(value = "鐞嗚禂閲戦json涓�")
+ private String compensationJson;
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/DiscussAuditDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/DiscussAuditDTO.java
new file mode 100644
index 0000000..b7c83bc
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/DiscussAuditDTO.java
@@ -0,0 +1,18 @@
+package com.doumee.dao.business.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class DiscussAuditDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "0=瀹℃壒閫氳繃锛�1=瀹℃壒鎷掔粷")
+ private Integer status;
+
+ @ApiModelProperty(value = "璇存槑")
+ private String describe;
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/OptSettleClaimsDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/OptSettleClaimsDTO.java
new file mode 100644
index 0000000..eb37531
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/OptSettleClaimsDTO.java
@@ -0,0 +1,29 @@
+package com.doumee.dao.business.dto;
+
+import com.doumee.dao.business.model.Multifile;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 瀛樺偍 琛ュ厖璇存槑
+ */
+@Data
+public class OptSettleClaimsDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "绔嬫涓氬姟鐘舵�侊細3=绔嬫锛�4=绔嬫閫�鍥�")
+ private Integer registerStatus;
+
+ @ApiModelProperty(value = "璇存槑銆佸娉�")
+ private String describe;
+
+ @ApiModelProperty(value = "鎶ユ鍙�")
+ private String reportNum;
+
+ @ApiModelProperty(value = "鍙楃悊涓氬姟鐘舵�侊細9=鍙楃悊锛�6=鎷掔粷鍙楃悊锛�")
+ private Integer acceptanceStatus;
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/PayCashDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/PayCashDTO.java
new file mode 100644
index 0000000..46d14a9
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/PayCashDTO.java
@@ -0,0 +1,24 @@
+package com.doumee.dao.business.dto;
+
+import com.doumee.dao.business.model.Multifile;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 瀛樺偍 琛ュ厖璇存槑
+ */
+@Data
+public class PayCashDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "璇存槑銆佸娉�")
+ private String describe;
+
+ @ApiModelProperty(value = "鎵撴鍥剧墖")
+ private List<Multifile> multifileList;
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/RiskConfigDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/RiskConfigDTO.java
index cf4a1ac..42645f9 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/RiskConfigDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/RiskConfigDTO.java
@@ -26,7 +26,7 @@
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-绱㈣禂娆℃暟", example = "1")
private String riskClaimTimes;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓槸鍚﹀紑鍚細0=鍚︼紱1=鏄�;", example = "1")
- private String riskNewMemberOepn;
+ private String riskNewMemberOpen;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓椂闂村崟浣嶏細0鍒嗛挓 1灏忔椂 2澶�", example = "1")
private String riskNewMemberTimeUnit;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓椂闂�", example = "1")
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/SaveSupplementDescribeDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/SaveSupplementDescribeDTO.java
new file mode 100644
index 0000000..bcfc870
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/SaveSupplementDescribeDTO.java
@@ -0,0 +1,26 @@
+package com.doumee.dao.business.dto;
+
+import com.doumee.dao.business.model.Multifile;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 瀛樺偍 琛ュ厖璇存槑
+ */
+@Data
+public class SaveSupplementDescribeDTO {
+
+ @ApiModelProperty(value = "涓氬姟涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "琛ュ厖璇存槑")
+ private String describe;
+
+ @ApiModelProperty(value = "琛ュ厖璇存槑鏂囦欢")
+ private List<Multifile> supplementFileList;
+
+
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/SettleClaimsDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/SettleClaimsDTO.java
index ac7fa87..9a61e6d 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/SettleClaimsDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/SettleClaimsDTO.java
@@ -23,6 +23,12 @@
@ApiModelProperty(value = "鍑洪櫓浜�")
private Integer memberId;
+ @ApiModelProperty(value = "鎶曚繚鐢宠缂栫爜", example = "1")
+ private Integer insuranceApplyId;
+
+ @ApiModelProperty(value = "鎶曚繚鐢宠鏄庣粏缂栫爜", example = "1")
+ private Integer applyDetailId;
+
@ApiModelProperty(value = "鍑洪櫓浜�")
private String idcardNo;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/SettleClaims.java b/server/service/src/main/java/com/doumee/dao/business/model/SettleClaims.java
index 7720870..c0c8607 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/SettleClaims.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/SettleClaims.java
@@ -106,8 +106,8 @@
@ExcelColumn(name="鍗曞彿")
private String code;
- @ApiModelProperty(value = "鐘舵�� 寮冪敤(0寰呭彈鐞嗭紙澶勭悊涓級 1閫�鍥炲彈鐞嗭紙宸叉挙妗堬級2鍙楃悊涓� 3纭璧勬枡锛堝鐞嗕腑锛� 4瀹屾垚鍙楃悊锛堝凡缁撴锛�) 5寰呭彈鐞� 6鍙楃悊閫�鍥� 7寰呭晢璁� 8鍟嗚寰呭鎵� 9鍟嗚瀹℃壒鎷掔粷 10宸插彈鐞�", example = "1")
- @ExcelColumn(name="鐘舵�� 0寰呭彈鐞嗭紙澶勭悊涓級 1閫�鍥炲彈鐞嗭紙宸叉挙妗堬級 2纭璧勬枡锛堝鐞嗕腑锛� 3瀹屾垚鍙楃悊锛堝凡缁撴锛�")
+ @ApiModelProperty(value = "鐘舵�� 0鏆傚瓨涓� 1宸叉姤妗� 2寰呯珛妗� 3宸茬珛妗� 4绔嬫閫�鍥� 5寰呭彈鐞� 6鎷掔粷鍙楃悊 7鍟嗚寰呭鎵� 8鍟嗚瀹℃壒鎷掔粷 9宸插彈鐞� 10寰呮牳璧� 11宸叉牳璧� 12寰呯粨妗� 13宸茬粨妗� 14宸叉挙妗�", example = "1")
+ @ExcelColumn(name="鐘舵�� 0鏆傚瓨涓� 1宸叉姤妗� 2寰呯珛妗� 3宸茬珛妗� 4绔嬫閫�鍥� 5寰呭彈鐞� 6鎷掔粷鍙楃悊 7鍟嗚寰呭鎵� 8鍟嗚瀹℃壒鎷掔粷 9宸插彈鐞� 10寰呮牳璧� 11宸叉牳璧� 12寰呯粨妗� 13宸茬粨妗� 14宸叉挙妗�")
private Integer status;
@ApiModelProperty(value = "浜嬫晠绫诲瀷 0宸ヤ綔鏈熼棿鍙椾激 1涓婁笅鐝�斾腑鍙椾激 2闈炲伐浣滄椂闂村彈浼� 3鎰忓鍙椾激", example = "1")
@@ -177,37 +177,37 @@
private String shouliType;
@ApiModelProperty(value = "鐞嗚禂鏉ユ簮 0浼佷笟 1骞冲彴褰曞叆 2鍏朵粬 ")
@ExcelColumn(name="鐞嗚禂鏉ユ簮 0浼佷笟 1骞冲彴褰曞叆 2鍏朵粬")
- private Integer origin;
+ private String origin;
@ApiModelProperty(value = "鍙楃悊鍟嗚闂 0璧勬枡缂哄け锛�1寤惰繜鎶ユ 2瓒呰亴涓氱被鍒� 3鍏朵粬锛堝涓敤鑻辨枃閫楀彿闅斿紑锛�")
@ExcelColumn(name="鍙楃悊鍟嗚闂 0璧勬枡缂哄け锛�1寤惰繜鎶ユ 2瓒呰亴涓氱被鍒� 3鍏朵粬锛堝涓敤鑻辨枃閫楀彿闅斿紑锛�")
private String syProblemOpts;
@ApiModelProperty(value = "鏄惁椋庨櫓妗堜欢 0鍚� 1鏄�")
@ExcelColumn(name="鏄惁椋庨櫓妗堜欢 0鍚� 1鏄�")
- private String isRisk;
+ private Integer isRisk;
@ApiModelProperty(value = "鏄惁澶氭鍑洪櫓椋庨櫓 0鍚�1鏄� ")
@ExcelColumn(name="鏄惁澶氭鍑洪櫓椋庨櫓 0鍚�1鏄� ")
- private String riskTimesCx;
+ private Integer riskTimesCx;
@ApiModelProperty(value = "鏄惁鐤戜技閲嶅鎶ユ椋庨櫓 0鍚�1鏄� ")
@ExcelColumn(name="鏄惁鐤戜技閲嶅鎶ユ椋庨櫓 0鍚�1鏄� ")
- private String riskRepeat;
+ private Integer riskRepeat;
@ApiModelProperty(value = "鏄惁绱㈣禂澶氭杩囧椋庨櫓 0鍚�1鏄�")
@ExcelColumn(name="鏄惁绱㈣禂澶氭杩囧椋庨櫓 0鍚�1鏄�")
- private String riskTimesSp;
+ private Integer riskTimesSp;
@ApiModelProperty(value = "鏄惁鏂板憳宸ュ嚭闄╅闄� 0鍚�1鏄�")
@ExcelColumn(name="鏄惁鏂板憳宸ュ嚭闄╅闄� 0鍚�1鏄�")
- private String riskNewUser ;
+ private Integer riskNewUser ;
@ApiModelProperty(value = "璁捐鏁忔劅璇嶏紝澶氫釜鑻辨枃閫楀彿闅斿紑")
@ExcelColumn(name="璁捐鏁忔劅璇嶏紝澶氫釜鑻辨枃閫楀彿闅斿紑")
private String riskSensitive;
@ApiModelProperty(value = "鎶ユ鍙疯缃姸鎬� 0鏈缃� 1宸茶缃� 2宸蹭慨鏀�")
@ExcelColumn(name="鎶ユ鍙疯缃姸鎬� 0鏈缃� 1宸茶缃� 2宸蹭慨鏀�")
- private String reportNumStatus;
+ private Integer reportNumStatus;
@ApiModelProperty(value = "鎵�鏈夎禂浠橀」淇℃伅锛坖son鏁扮粍[{name:鈥滀紮椋熻垂鈥�,val:100,info:鈥滀紮椋熻垂璇存槑鈥�,type:0}]锛�,type:0涓昏璧斾粯椤� 1鍏朵粬璧斾粯椤� 2瀹氭崯鏂规璐圭敤\t")
@ExcelColumn(name="鎵�鏈夎禂浠橀」淇℃伅")
private String accountContent;
@ApiModelProperty(value = "鍏朵粬璧斾粯椤规�婚")
@ExcelColumn(name="鍏朵粬璧斾粯椤规�婚")
- private String otherAccount;
+ private BigDecimal otherAccount;
@ApiModelProperty(value = "鏄惁鍙禂浠樺尰淇濆鐢ㄨ嵂")
@ExcelColumn(name="鏄惁鍙禂浠樺尰淇濆鐢ㄨ嵂")
private String payForYbwyy;
@@ -227,10 +227,19 @@
@ExcelColumn(name="鏀舵璐︽埛")
private String receiveAccount;
+ @ApiModelProperty(value = "椋庨櫓淇℃伅闆嗗悎")
+ private String riskContent;
+ @ApiModelProperty(value = "鏄惁寰呰ˉ鍏呮潗鏂�:0=鍚︼紱1=鏄�")
+ private Integer waitSupplement;
+ @ApiModelProperty(value = "璐圭敤鏄惁鍙戠敓鍙樻洿:0=鍚︼紱1=鏄紱")
+ private Integer feeUpdate;
+
+ @ApiModelProperty(value = "妗堜欢绫诲瀷锛�0=鏈缃紱1=鍖荤枟锛�2=浼ゆ畫锛�3=姝讳骸")
+ private Integer caseType;
@ApiModelProperty(value = "淇濋櫓鍗曢檮浠�")
@TableField(exist = false)
@@ -259,6 +268,12 @@
@TableField(exist = false)
private List<Multifile> compensationFileList;
+
+ @ApiModelProperty(value = "鍏朵粬璧勬枡")
+ @TableField(exist = false)
+ private List<Multifile> otherFileList;
+
+
@ApiModelProperty(value = "鏃ュ織鍒楄〃")
@TableField(exist = false)
List<SettleClaimsLog> settleClaimsLogList;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/SolutionsBase.java b/server/service/src/main/java/com/doumee/dao/business/model/SolutionsBase.java
index 7abb3c8..d8e1c54 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/SolutionsBase.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/SolutionsBase.java
@@ -158,8 +158,8 @@
@ApiModelProperty(value = "椋庨櫓璁剧疆-鍏佽瀵规柊鍛樺伐宸叉姇淇濇湭鐢熸晥淇濋櫓杩涜淇濋殰 0涓嶅厑璁� 1鍏佽")
@ExcelColumn(name="椋庨櫓璁剧疆-鍏佽瀵规柊鍛樺伐宸叉姇淇濇湭鐢熸晥淇濋櫓杩涜淇濋殰 0涓嶅厑璁� 1鍏佽")
private Integer riskNewUserStatus;
- @ApiModelProperty(value = "椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂村崟浣� 0鍒嗛挓 1灏忔椂 2澶�")
- @ExcelColumn(name="椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂村崟浣� 0鍒嗛挓 1灏忔椂 2澶�")
+ @ApiModelProperty(value = "椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂村崟浣� 1灏忔椂 2澶�")
+ @ExcelColumn(name="椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂村崟浣� 1灏忔椂 2澶�")
private Integer riskNewUserUnit;
@ApiModelProperty(value = "椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂�")
@ExcelColumn(name="椋庨櫓璁剧疆-鍏佽鏂板憳宸ュ嚭闄╂椂闂存彁鍓嶆椂闂�")
diff --git a/server/service/src/main/java/com/doumee/dao/business/vo/CompensationVO.java b/server/service/src/main/java/com/doumee/dao/business/vo/CompensationVO.java
new file mode 100644
index 0000000..e9f8696
--- /dev/null
+++ b/server/service/src/main/java/com/doumee/dao/business/vo/CompensationVO.java
@@ -0,0 +1,27 @@
+package com.doumee.dao.business.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * 瀛樺偍 琛ュ厖璇存槑
+ */
+@Data
+public class CompensationVO {
+
+ @ApiModelProperty(value = "璧斾粯绫诲瀷锛�1=涓昏璧斾粯椤癸紱2=鍏朵粬璧斾粯椤�")
+ private Integer type;
+
+ @ApiModelProperty(value = "璧斾粯椤�")
+ private String name;
+
+ @ApiModelProperty(value = "璐圭敤璇存槑")
+ private String describe;
+
+ @ApiModelProperty(value = "璧斾粯璐圭敤")
+ private BigDecimal fee;
+
+
+}
diff --git a/server/service/src/main/java/com/doumee/dao/business/vo/RiskConfigVO.java b/server/service/src/main/java/com/doumee/dao/business/vo/RiskConfigVO.java
index a912c72..bdb0b24 100644
--- a/server/service/src/main/java/com/doumee/dao/business/vo/RiskConfigVO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/vo/RiskConfigVO.java
@@ -19,7 +19,7 @@
private String riskTimesReportTimes;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-閲嶅鎶ユ鏄惁寮�鍚細0=鍚︼紱1=鏄�", example = "1")
private String riskRepeatReportOpen;
- @ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-閲嶅鎶ユ鏃堕棿鍗曚綅锛�0鍒嗛挓 1灏忔椂 2澶�", example = "1")
+ @ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-閲嶅鎶ユ鏃堕棿鍗曚綅锛�1灏忔椂 2澶�", example = "1")
private String riskRepeatReportTimeUnit;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-閲嶅鎶ユ鏃堕棿", example = "1")
private String riskRepeatReportTime;
@@ -28,8 +28,8 @@
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-绱㈣禂娆℃暟", example = "1")
private String riskClaimTimes;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓槸鍚﹀紑鍚細0=鍚︼紱1=鏄�;", example = "1")
- private String riskNewMemberOepn;
- @ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓椂闂村崟浣嶏細0鍒嗛挓 1灏忔椂 2澶�", example = "1")
+ private String riskNewMemberOpen;
+ @ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓椂闂村崟浣嶏細1灏忔椂 2澶�", example = "1")
private String riskNewMemberTimeUnit;
@ApiModelProperty(value = "椋庨櫓鎻愰啋璁剧疆-鏂板憳宸ュ嚭闄╂彁閱掓椂闂�", example = "1")
private String riskNewMemberTime;
diff --git a/server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java b/server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java
index 2395b87..2d83d49 100644
--- a/server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java
+++ b/server/service/src/main/java/com/doumee/service/business/ApplyDetailService.java
@@ -107,4 +107,6 @@
* @return
*/
List<ApplyDetail> getMemberApplyList(Integer memberId);
+
+ List<ApplyDetail> getMemberSettleClaimsList(Integer memberId);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/SettleClaimsService.java b/server/service/src/main/java/com/doumee/service/business/SettleClaimsService.java
index 9df4a9e..ffc962f 100644
--- a/server/service/src/main/java/com/doumee/service/business/SettleClaimsService.java
+++ b/server/service/src/main/java/com/doumee/service/business/SettleClaimsService.java
@@ -2,8 +2,10 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
-import com.doumee.dao.business.dto.SCSupplementDTO;
+import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.model.SettleClaims;
+import com.doumee.dao.business.vo.CompensationVO;
+import com.doumee.service.system.impl.SystemDictDataServiceImpl;
import io.swagger.models.auth.In;
import javax.servlet.http.HttpServletResponse;
@@ -132,4 +134,107 @@
Integer delFile(Integer id, Integer fileId);
Integer createSys(SettleClaims settleClaims);
+
+
+ /************************************************************************鏂颁笟鍔�******************************************************************************************/
+
+ /**
+ * 浼佷笟鎶ユ鎻愪氦
+ * @param settleClaimsDTO
+ * @param systemDictDataService
+ */
+ void saveSettleClaims(SettleClaimsDTO settleClaimsDTO, SystemDictDataServiceImpl systemDictDataService);
+
+
+ /**
+ * 琛ュ厖璇存槑
+ * 骞冲彴绔娇鐢�
+ * @param dto
+ */
+ void saveSupplementDescribe(SaveSupplementDescribeDTO dto);
+
+
+ /**
+ * 娣诲姞琛ュ厖鏉愭枡
+ * @param dto
+ */
+ void saveSupplementFile(SaveSupplementDescribeDTO dto);
+
+
+ /**
+ * 鎾ら攢鎶ユ
+ * @param dto
+ */
+ void returnSettle(OptSettleClaimsDTO dto);
+
+ /**
+ * 骞冲彴绔嬫鎴栭��鍥�
+ * @param dto
+ */
+ void register(OptSettleClaimsDTO dto);
+
+ /**
+ * 娣诲姞鎶ユ鍙�
+ * @param param
+ * @return
+ */
+ Integer addReportNum(OptSettleClaimsDTO param);
+
+ /**
+ * 娣诲姞澶囨敞
+ * @param param
+ * @return
+ */
+ Integer addRemark(OptSettleClaimsDTO param);
+
+ /**
+ * 鍙楃悊涓氬姟
+ * @param dto
+ */
+ void acceptance(AcceptanceSettleClaimsDTO dto);
+
+
+ /**
+ * 鐞嗚禂閲戦椤�
+ * @param id
+ * @return
+ */
+ List<CompensationVO> getCompensation(Integer id);
+
+ /**
+ * 鐞嗚禂涓氬姟
+ * @param dto
+ */
+ void compensation(CompensationDTO dto);
+
+ /**
+ * 鍟嗚瀹℃壒
+ * @param dto
+ */
+ void discussAudit(DiscussAuditDTO dto);
+
+
+ /**
+ * 骞冲彴鏍歌禂
+ * @param dto
+ */
+ void nuclearCompensation(CompensationDTO dto);
+
+ /**
+ * 淇敼閲戦
+ * @param dto
+ */
+ void updFee(CompensationDTO dto);
+
+ /**
+ * 瀹㈡埛纭閲戦
+ * @param id
+ */
+ void confirmFee(Integer id);
+
+ /**
+ * 淇敼妗堜欢绫诲瀷
+ * @param dto
+ */
+ void updCaseType(CaseTypeDTO dto);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
index 8923fa6..185150c 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1200,6 +1200,14 @@
List<ApplyChagneDetail> delDetailList = applyChange.getDelDetailList();
//鍔犱繚鏁版嵁
List<ApplyChagneDetail> addDetailList = applyChange.getAddDetailList();
+ //鎹㈠巶涓氬姟
+ List<ApplyChagneDetail> changeDetailList = applyChange.getChangeDetailList();
+
+ if(CollectionUtils.isEmpty(delDetailList)
+ && CollectionUtils.isEmpty(addDetailList)
+ && CollectionUtils.isEmpty(changeDetailList)){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝鏈坊鍔犱汉鍛樻暟鎹棤娉曡繘琛屾彁浜�");
+ }
if (CollectionUtils.isNotEmpty(addDetailList)) {
if(Objects.isNull(solutions.getCanAdd()) || solutions.getCanAdd().equals(Constants.ZERO)){
@@ -1238,7 +1246,6 @@
}
//鎹㈠巶涓氬姟
- List<ApplyChagneDetail> changeDetailList = applyChange.getChangeDetailList();
if (CollectionUtils.isNotEmpty(changeDetailList)) {
if(Objects.isNull(solutions.getCanChangeUnit()) || solutions.getCanChangeUnit().equals(Constants.ZERO)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "璇ヤ繚闄╂柟妗堟棤娉曡繘琛屾崲鍘傛搷浣�");
@@ -1358,6 +1365,7 @@
}
//鏌ヨ鍛樺伐鏄湪涓诲崟涓� 鏄惁瀛樺湪鐢熸晥涓殑鏁版嵁
List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectList(new QueryWrapper<ApplyDetail>().lambda()
+ .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
.eq(ApplyDetail::getApplyId, applyChange.getApplyId())
.eq(ApplyDetail::getMemberId, applyChagneDetail.getMemberId())
// .le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getDelValidTime(),1))
@@ -1616,6 +1624,7 @@
}
//鏌ヨ鍛樺伐鏄湪涓诲崟涓� 鏄惁瀛樺湪鐢熸晥涓殑鏁版嵁
List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectList(new QueryWrapper<ApplyDetail>().lambda()
+ .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
.eq(ApplyDetail::getApplyId, applyChange.getApplyId())
.eq(ApplyDetail::getMemberId, applyChagneDetail.getMemberId())
.le(ApplyDetail::getStartTime,DateUtil.getMontageDate(applyChange.getApplyStartTime(),1))
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
index 2303812..e2b12c6 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyDetailServiceImpl.java
@@ -2,6 +2,7 @@
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
+import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
@@ -18,6 +19,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -215,6 +217,7 @@
queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId);
queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId);
queryWrapper.leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId);
+ queryWrapper.eq(ApplyDetail::getIsdeleted,Constants.ZERO);
ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel();
@@ -366,6 +369,37 @@
}
+ /**
+ * 鏌ヨ浜哄憳鍙姤妗堟暟鎹�
+ * @param memberId
+ * @return
+ */
+ @Override
+ public List<ApplyDetail> getMemberSettleClaimsList(Integer memberId){
+ LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ List<ApplyDetail> applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class,
+ new MPJLambdaWrapper<ApplyDetail>()
+ .selectAll(ApplyDetail.class)
+ .selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode)
+ .selectAs(InsuranceApply::getStartTime,ApplyDetail::getParentStartTime)
+ .selectAs(InsuranceApply::getEndTime,ApplyDetail::getParentEndTime)
+ .selectAs(Company::getName,ApplyDetail::getCompanyName)
+ .selectAs(Solutions::getName,ApplyDetail::getSolutionName)
+ .selectAs(Worktype::getName,ApplyDetail::getWorkTypeName)
+ .selectAs(DispatchUnit::getName,ApplyDetail::getDuName)
+ .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId)
+ .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId)
+ .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
+ .leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId)
+ .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId)
+ .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(),
+ Constants.InsuranceApplyStatus.WTB_DONE.getKey())
+ .eq(ApplyDetail::getIsdeleted,Constants.ZERO)
+ .eq(InsuranceApply::getCompanyId,user.getCompanyId())
+ .eq(ApplyDetail::getMemberId,memberId)
+ );
+ return applyDetailList;
+ }
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index 71b3d50..ac0a8a6 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -3776,6 +3776,11 @@
return applyPowerVO;
}
+
+
+
+
+
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/KnowledgeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/KnowledgeServiceImpl.java
index c04c5d2..5922a7e 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/KnowledgeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/KnowledgeServiceImpl.java
@@ -7,7 +7,9 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.AreasMapper;
import com.doumee.dao.business.KnowledgeMapper;
+import com.doumee.dao.business.model.Areas;
import com.doumee.dao.business.model.Knowledge;
import com.doumee.service.business.KnowledgeService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -35,15 +37,16 @@
@Autowired
private KnowledgeMapper knowledgeMapper;
+ @Autowired
+ private AreasMapper areasMapper;
+
@Override
public Integer create(Knowledge knowledge) {
LoginUserInfo user= (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(knowledge)
|| StringUtils.isBlank(knowledge.getTitle())
|| StringUtils.isBlank(knowledge.getLink())
-// || StringUtils.isBlank(knowledge.getCityName())
// || Objects.isNull(knowledge.getCityId())
- || StringUtils.isBlank(knowledge.getProvinceName())
|| Objects.isNull(knowledge.getProvinceId())
|| StringUtils.isBlank(knowledge.getYearInfo())
|| StringUtils.isBlank(knowledge.getTitle())
@@ -53,6 +56,18 @@
}
if(knowledge.getLabels().split(",").length>10){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏍囩鏁版渶澶氭坊鍔犲崄涓�");
+ }
+ Areas province = areasMapper.selectById(knowledge.getProvinceId());
+ if(Objects.isNull(province)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鐪佷唤淇℃伅閿欒");
+ }
+ knowledge.setProvinceName(province.getName());
+ if(Objects.nonNull(knowledge.getCityId())){
+ Areas city = areasMapper.selectById(knowledge.getCityId());
+ if(Objects.isNull(city)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"甯傚尯淇℃伅閿欒");
+ }
+ knowledge.setCityName(city.getName());
}
knowledge.setIsdeleted(Constants.ZERO);
knowledge.setCreateDate(new Date());
@@ -88,8 +103,6 @@
|| Objects.isNull(knowledge.getId())
|| StringUtils.isBlank(knowledge.getTitle())
|| StringUtils.isBlank(knowledge.getLink())
- || StringUtils.isBlank(knowledge.getProvinceName())
-// || StringUtils.isBlank(knowledge.getCityName())
// || Objects.isNull(knowledge.getCityId())
|| Objects.isNull(knowledge.getProvinceId())
|| StringUtils.isBlank(knowledge.getYearInfo())
@@ -101,6 +114,18 @@
if(knowledge.getLabels().split(",").length>10){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏍囩鏁版渶澶氭坊鍔犲崄涓�");
}
+ Areas province = areasMapper.selectById(knowledge.getProvinceId());
+ if(Objects.isNull(province)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鐪佷唤淇℃伅閿欒");
+ }
+ knowledge.setProvinceName(province.getName());
+ if(Objects.nonNull(knowledge.getCityId())){
+ Areas city = areasMapper.selectById(knowledge.getCityId());
+ if(Objects.isNull(city)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"甯傚尯淇℃伅閿欒");
+ }
+ knowledge.setCityName(city.getName());
+ }
knowledge.setEditDate(new Date());
knowledge.setEditor(user.getId());
knowledgeMapper.updateById(knowledge);
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java
index da3c023..61bd2c4 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/LabelsServiceImpl.java
@@ -42,9 +42,14 @@
|| StringUtils.isEmpty(labels.getName())){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ if(labelsMapper.selectCount(new QueryWrapper<Labels>().lambda().eq(Labels::getIsdeleted,Constants.ZERO).eq(Labels::getStatus,Constants.ZERO))>=5){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝鏈�澶氶厤缃�50涓爣绛緙");
+ }
labelsMapper.delete(new QueryWrapper<Labels>().lambda().eq(Labels::getName,labels.getName()));
labels.setCreateDate(new Date());
labels.setCreator(user.getId());
+ labels.setStatus(Constants.ZERO);
+ labels.setIsdeleted(Constants.ZERO);
labelsMapper.insert(labels);
return labels.getId();
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
index 3065b99..f55fd08 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/SettleClaimsServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
+import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
@@ -8,16 +9,16 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
-import com.doumee.dao.business.NoticesMapper;
-import com.doumee.dao.business.SettleClaimsLogMapper;
-import com.doumee.dao.business.SettleClaimsMapper;
-import com.doumee.dao.business.dto.SCSupplementDTO;
-import com.doumee.dao.business.dto.SettleClaimsDTO;
+import com.doumee.dao.business.*;
+import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.MultifileJoinMapper;
import com.doumee.dao.business.join.SettleClaimsJoinMapper;
import com.doumee.dao.business.join.SettleClaimsLogJoinMapper;
import com.doumee.dao.business.model.*;
+import com.doumee.dao.business.vo.CompensationVO;
+import com.doumee.dao.business.vo.RiskConfigVO;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.service.business.SettleClaimsLogService;
import com.doumee.service.business.SettleClaimsService;
@@ -25,6 +26,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.doumee.service.system.impl.SystemDictDataServiceImpl;
import com.github.xiaoymin.knife4j.core.util.CollectionUtils;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import io.swagger.annotations.ApiModelProperty;
@@ -32,15 +34,18 @@
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
+import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.math.BigDecimal;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.*;
@@ -73,6 +78,19 @@
@Autowired
private NoticesMapper noticesMapper;
+
+ @Autowired
+ private InsuranceApplyMapper insuranceApplyMapper;
+
+ @Autowired
+ private SolutionsMapper solutionsMapper;
+
+ @Autowired
+ private SolutionsBaseMapper solutionsBaseMapper;
+
+ @Autowired
+ private ApplyDetailMapper applyDetailMapper;
+
/**
* 鍒犻櫎闄勪欢
* @return
@@ -355,8 +373,9 @@
SettleClaimsLog log = new SettleClaimsLog(update,applyLogType.getName(), info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
settleClaimsLogMapper.insert(log);
return 1;
-
}
+
+
@Override
public Integer createSys(SettleClaims settleClaims) {
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
@@ -612,6 +631,8 @@
settleClaims.setDisabilityFileList(multifileList.stream().filter(m->m.getObjType().equals(Constants.MultiFile.LP_SCZL_FILE.getKey())).collect(Collectors.toList()));
settleClaims.setCompensationFileList(multifileList.stream().filter(m->m.getObjType().equals(Constants.MultiFile.LP_JACL_FILE.getKey())).collect(Collectors.toList()));
+
+ settleClaims.setOtherFileList(multifileList.stream().filter(m->m.getObjType().equals(Constants.MultiFile.LP_OTHER_FILE.getKey())).collect(Collectors.toList()));
}
//鏌ヨ鎿嶄綔璁板綍
@@ -755,7 +776,6 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
-
SettleClaims settleClaims = settleClaimsMapper.selectById(scSupplementDTO.getId());
if(!(settleClaims.getStatus().equals(Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey())
|| settleClaims.getStatus().equals(Constants.SettleClaimsStatus.DEAL_ING.getKey())
@@ -1005,7 +1025,9 @@
}
- public void saveSettleClaims(SettleClaimsDTO settleClaimsDTO){
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void saveSettleClaims(SettleClaimsDTO settleClaimsDTO,SystemDictDataServiceImpl systemDictDataService){
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(!loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氬憳宸ユ棤娉曡繘琛岃鎿嶄綔");
@@ -1014,6 +1036,7 @@
|| Objects.isNull(settleClaimsDTO.getSaveType())
|| Objects.isNull(settleClaimsDTO.getMemberId())
||StringUtils.isBlank(settleClaimsDTO.getIdcardNo())
+ || Objects.isNull(settleClaimsDTO.getInsuranceApplyId())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
@@ -1038,9 +1061,17 @@
}
SettleClaims settleClaims = new SettleClaims();
BeanUtils.copyProperties(settleClaimsDTO,settleClaims);
+ settleClaims.setReportNumStatus(Constants.ZERO);
if(Objects.nonNull(settleClaims.getId())){
settleClaims.setEditDate(new Date());
settleClaims.setEditor(loginUserInfo.getId());
+ settleClaims.setStatus(Constants.equalsInteger(settleClaimsDTO.getSaveType(),Constants.ONE)?
+ Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey():Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey());
+ if(Constants.equalsInteger(settleClaimsDTO.getSaveType(),Constants.ONE)){
+ //澶勭悊椋庨櫓淇℃伅
+ this.saveRisk(settleClaims,settleClaimsDTO,systemDictDataService);
+ }
+
settleClaimsMapper.updateById(settleClaims);
}else{
settleClaims.setCreateDate(new Date());
@@ -1048,15 +1079,207 @@
settleClaims.setCompanyId(loginUserInfo.getCompanyId());
settleClaims.setStatus(Constants.equalsInteger(settleClaimsDTO.getSaveType(),Constants.ONE)?
Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey():Constants.SettleClaimsStatus.WAIT_ACCEPTANCE.getKey());
+ if(Constants.equalsInteger(settleClaimsDTO.getSaveType(),Constants.ONE)){
+ //澶勭悊椋庨櫓淇℃伅
+ this.saveRisk(settleClaims,settleClaimsDTO,systemDictDataService);
+ }
settleClaims.setCreator(loginUserInfo.getId());
settleClaims.setCheckUserId(loginUserInfo.getId());
settleClaimsMapper.insert(settleClaims);
}
this.saveFile(settleClaims,settleClaimsDTO,loginUserInfo);
-
+ //璁板綍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.UPLOAD,null);
}
+ public void saveRisk(SettleClaims settleClaims, SettleClaimsDTO settleClaimsDTO, SystemDictDataServiceImpl systemDictDataService){
+ //鏍规嵁淇濆崟淇℃伅 鏌ヨ鍑轰富鏂规
+ InsuranceApply insuranceApply = insuranceApplyMapper.selectById(settleClaims.getInsuranceApplyId());
+ if(Objects.isNull(insuranceApply)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌淇濆崟鏁版嵁");
+ }
+ Date happenTime = DateUtil.StringToDate(settleClaims.getHappenTime());
+ if(happenTime.getTime() < insuranceApply.getStartTime().getTime() || happenTime.getTime() > insuranceApply.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"浜嬫晠鍙戠敓浜嬩欢鏈湪淇濆崟鐢熸晥鑼冨洿鍐�");
+ }
+ Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId());
+ if(Objects.isNull(solutions)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌瀛愭柟妗堜俊鎭�");
+ }
+ SolutionsBase solutionsBase = solutionsBaseMapper.selectById(solutions.getParentId());
+ if(Objects.isNull(solutionsBase)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌涓绘柟妗堜俊鎭�");
+ }
+ List<Map<String,String>> riskList = new ArrayList<>();
+ //鏌ヨ淇濆崟鏄庣粏鏁版嵁
+ ApplyDetail applyDetail = applyDetailMapper.selectOne(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,settleClaims.getInsuranceApplyId()).eq(ApplyDetail::getId,settleClaimsDTO.getApplyDetailId()).last("limit 1 "));
+ //鏄惁寮�鍚� 鏂板憳宸ユ姤妗� 0涓嶅厑璁� 1鍏佽
+ if(Constants.equalsInteger(solutionsBase.getRiskNewUserStatus(),Constants.ONE)
+ && Objects.nonNull(solutionsBase.getRiskNewUserUnit())
+ && Objects.nonNull(solutionsBase.getRiskNewUserTime())
+ ){
+ if(happenTime.getTime() > applyDetail.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"浜嬫晠鍙戠敓鏃堕棿鏈湪浜哄憳淇濋殰鏃ユ湡鑼冨洿鍐�");
+ }
+ Map<String,String> map = new HashMap<>();
+ map.put("title","淇濆崟宸叉姇淇濇湭鐢熸晥");
+ Date startDate = applyDetail.getStartTime();
+ if(Constants.equalsInteger(solutionsBase.getRiskNewUserUnit(),Constants.ONE)){
+ startDate = DateUtil.afterMinutesByDate(-solutionsBase.getRiskNewUserTime()*60,startDate);
+ }else if(Constants.equalsInteger(solutionsBase.getRiskNewUserUnit(),Constants.TWO)){
+ startDate = DateUtil.afterDayByDate(-solutionsBase.getRiskNewUserTime(),happenTime);
+ }else{
+ if(happenTime.getTime() < applyDetail.getStartTime().getTime() || happenTime.getTime() > applyDetail.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"浜嬫晠鍙戠敓鏃堕棿鏈湪浜哄憳淇濋殰鏃ユ湡鑼冨洿鍐�");
+ }
+ }
+ if(happenTime.getTime() < startDate.getTime() ){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"浜嬫晠鍙戠敓鏃堕棿鏈湪浜哄憳淇濋殰鏃ユ湡鑼冨洿鍐�");
+ }else{
+ map.put("info","浜嬫晠鍙戠敓鏃堕棿鏃╀簬淇濆崟鐢熸晥鏃堕棿"+solutionsBase.getRiskNewUserUnit()+(Constants.equalsInteger(solutionsBase.getRiskNewUserUnit(),Constants.ONE)?"灏忔椂鍐�":"澶╁唴"));
+ riskList.add(map);
+ }
+ }else{
+ if(happenTime.getTime() < applyDetail.getStartTime().getTime() || happenTime.getTime() > applyDetail.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"浜嬫晠鍙戠敓鏃堕棿鏈湪浜哄憳淇濋殰鏃ユ湡鑼冨洿鍐�");
+ }
+ }
+
+ //鏄惁寮�鍚� 寤惰繜鎶ユ鎻愰啋鏄惁寮�鍚� 0涓嶅厑璁� 1鍏佽
+ if(Constants.equalsInteger(solutionsBase.getRiskDelayStatus(),Constants.ONE)){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","寤惰繜鎶ユ鎻愰啋");
+ //鏍规嵁閰嶇疆 鏌ヨ 寤惰繜鎶ユ鎻愰啋鏃堕棿鍗曚綅 0鍒嗛挓 1灏忔椂 2澶�
+ if(Constants.equalsInteger(solutionsBase.getRiskDelayUnit(),Constants.ZERO)){
+ if(DateUtil.getBetweenMin(happenTime,new Date())>solutionsBase.getRiskDelayTime()){
+ map.put("info","鎶ユ鏃堕棿瓒呰繃妗堝彂鏃堕棿"+solutionsBase.getRiskDelayUnit()+"鍒嗛挓");
+ riskList.add(map);
+ }
+ }else if(Constants.equalsInteger(solutionsBase.getRiskDelayUnit(),Constants.ONE)){
+ if(DateUtil.getBetweenHours(happenTime,new Date())>solutionsBase.getRiskDelayTime()){
+ map.put("info","鎶ユ鏃堕棿瓒呰繃妗堝彂鏃堕棿"+solutionsBase.getRiskDelayUnit()+"灏忔椂");
+ riskList.add(map);
+ }
+ }else if(Constants.equalsInteger(solutionsBase.getRiskDelayUnit(),Constants.TWO)){
+ if(DateUtil.getBetweenDay(happenTime,new Date())>solutionsBase.getRiskDelayTime()){
+ map.put("info","鎶ユ鏃堕棿瓒呰繃妗堝彂鏃堕棿"+solutionsBase.getRiskDelayUnit()+"澶�");
+ riskList.add(map);
+ }
+ }
+ }
+
+ //鏌ヨ瀛楀吀鍊奸厤缃俊鎭�
+ RiskConfigVO riskConfigVO = systemDictDataService.getRiskConfig();
+ //澶氭鍑洪櫓鎻愰啋
+ if(StringUtils.isNotBlank(riskConfigVO.getRiskTimesOpen()) && StringUtils.equals(riskConfigVO.getRiskTimesOpen(),Constants.ONE+"")
+ && StringUtils.isNotBlank(riskConfigVO.getRiskTimesReportTimes())){
+ Integer cxcs = settleClaimsMapper.selectCount(new QueryWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getMemberId,settleClaimsDTO.getMemberId())
+ .ne(Objects.nonNull(settleClaims.getId()),SettleClaims::getId,settleClaims.getId())
+ .apply(" HAPPEN_TIME > DATE_SUB(now(), INTERVAL 365 DAY) ")
+ );
+ if(cxcs>Integer.valueOf(riskConfigVO.getRiskTimesReportTimes())){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","鐤戜技澶氭鍑洪櫓");
+ map.put("info","鍑洪櫓浜轰竴骞村唴宸插嚭闄�"+cxcs+"娆�");
+ riskList.add(map);
+ settleClaims.setRiskTimesCx(Constants.ONE);
+ };
+ }
+ //鐤戜技閲嶅鎶ユ
+ if(StringUtils.isNotBlank(riskConfigVO.getRiskRepeatReportOpen())
+ && StringUtils.equals(riskConfigVO.getRiskRepeatReportOpen(),Constants.ONE+"")
+ && StringUtils.isNotBlank(riskConfigVO.getRiskRepeatReportTimeUnit())
+ && StringUtils.isNotBlank(riskConfigVO.getRiskRepeatReportTime())){
+ Integer cxcs = settleClaimsMapper.selectCount(new QueryWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getMemberId,settleClaimsDTO.getMemberId())
+ .ne(Objects.nonNull(settleClaims.getId()),SettleClaims::getId,settleClaims.getId())
+ .apply(riskConfigVO.getRiskRepeatReportTimeUnit().equals("1")," HAPPEN_TIME > DATE_SUB(now(), INTERVAL "+riskConfigVO.getRiskRepeatReportTime()+" HOUR) ")
+ .apply(riskConfigVO.getRiskRepeatReportTimeUnit().equals("2")," HAPPEN_TIME > DATE_SUB(now(), INTERVAL "+riskConfigVO.getRiskRepeatReportTime()+" DAY) ")
+ );
+ if(cxcs > Constants.TWO){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","鐤戜技閲嶅鎶ユ");
+ map.put("info","璇ュ嚭闄╀汉鍦�"+riskConfigVO.getRiskRepeatReportTime()+(riskConfigVO.getRiskRepeatReportTimeUnit().equals("1")?"灏忔椂":"澶�")+"鍐呭凡鎶ユ"+cxcs+"娆�");
+ riskList.add(map);
+ settleClaims.setRiskRepeat(Constants.ONE);
+ }
+ }
+
+
+ //绱㈣禂娆℃暟杩囧鎻愰啋
+ if(StringUtils.isNotBlank(riskConfigVO.getRiskClaimTimesOpen())
+ && StringUtils.equals(riskConfigVO.getRiskClaimTimesOpen(),Constants.ONE+"")
+ && StringUtils.isNotBlank(riskConfigVO.getRiskClaimTimes())){
+ Integer cxcs = settleClaimsMapper.selectCount(new QueryWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getInsuranceApplyId,settleClaimsDTO.getInsuranceApplyId())
+ .ne(Objects.nonNull(settleClaims.getId()),SettleClaims::getId,settleClaims.getId())
+ .apply(" HAPPEN_TIME > DATE_SUB(now(), INTERVAL 365 DAY) ")
+ );
+ if(cxcs > Integer.valueOf(riskConfigVO.getRiskClaimTimes())){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","璇ヤ繚鍗曠储璧旀鏁拌繃澶�");
+ map.put("info","绱绱㈣禂娆℃暟宸插埌杈�"+cxcs+"娆�");
+ riskList.add(map);
+ settleClaims.setRiskTimesSp(Constants.ONE);
+ }
+ }
+
+ //璁捐鏁忔劅璇嶆眹
+ if(StringUtils.isNotBlank(riskConfigVO.getRiskSensitiveWordsOpen())
+ && StringUtils.equals(riskConfigVO.getRiskSensitiveWordsOpen(),Constants.ONE+"")
+ && StringUtils.isNotBlank(riskConfigVO.getRiskSensitiveWords())){
+ String [] words = riskConfigVO.getRiskSensitiveWords().split(",");
+ String sensitiveWord = "";
+ for (String word:words) {
+ if(settleClaims.getContent().indexOf(word)>=Constants.ZERO){
+ if(Constants.equalsInteger(sensitiveWord.length(),Constants.ZERO)){
+ sensitiveWord = word;
+ }else{
+ sensitiveWord = sensitiveWord + "銆�" + word ;
+ }
+ }
+ }
+ if(!Constants.equalsInteger(sensitiveWord.length(),Constants.ZERO)){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","娑夊強鏁忔劅璇�");
+ map.put("info","妫�娴嬪埌鏁忔劅璇嶏細"+sensitiveWord);
+ riskList.add(map);
+ settleClaims.setRiskSensitive(sensitiveWord);
+ }
+ }
+ //鐤戜技鏂板憳宸ュ嚭闄�
+ if(StringUtils.isNotBlank(riskConfigVO.getRiskNewMemberOpen())
+ && StringUtils.equals(riskConfigVO.getRiskNewMemberOpen(),Constants.ONE+"")
+ && StringUtils.isNotBlank(riskConfigVO.getRiskNewMemberTimeUnit())
+ && StringUtils.isNotBlank(riskConfigVO.getRiskNewMemberTime())
+ ){
+ Map<String,String> map = new HashMap<>();
+ map.put("title","鐤戜技鏂板憳宸ュ嚭闄�");
+ if(riskConfigVO.getRiskNewMemberTimeUnit().equals(Constants.ONE+"")){
+ if(DateUtil.afterMinutesByDate(Integer.valueOf(riskConfigVO.getRiskNewMemberTime())*60,insuranceApply.getStartTime()).getTime() < happenTime.getTime()){
+ map.put("info","淇濋櫓鐢熸晥鏃堕棿涓�"+DateUtil.getFomartDate(insuranceApply.getStartTime(),"yyyy-MM-dd")+"");
+ riskList.add(map);
+ settleClaims.setRiskNewUser(Constants.ONE);
+ };
+
+ }else if(Constants.equalsInteger(solutionsBase.getRiskDelayUnit(),Constants.TWO)){
+ if(DateUtil.afterDayByDate(Integer.valueOf(riskConfigVO.getRiskNewMemberTime()),insuranceApply.getStartTime()).getTime() < happenTime.getTime()){
+ map.put("info","淇濋櫓鐢熸晥鏃堕棿涓�"+DateUtil.getFomartDate(insuranceApply.getStartTime(),"yyyy-MM-dd")+"");
+ riskList.add(map);
+ settleClaims.setRiskNewUser(Constants.ONE);
+ }
+ }
+ }
+ settleClaims.setRiskContent(JSONObject.toJSONString(riskList));
+ if(riskList.size()>Constants.ZERO){
+ settleClaims.setIsRisk(Constants.ONE);
+ }else{
+ settleClaims.setIsRisk(Constants.ZERO);
+ settleClaims.setStatus(Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey());
+ }
+ }
public void saveFile(SettleClaims settleClaims,SettleClaimsDTO settleClaimsDTO,LoginUserInfo loginUserInfo){
multifileJoinMapper.delete(new QueryWrapper<Multifile>().lambda()
@@ -1188,14 +1411,670 @@
multifile.setSortnum(i+1);
multifileJoinMapper.insert(multifile);
}
+ }
+ }
+
+// public void getRiskSettleDetail(Integer id){
+// settleClaimsJoinMapper.selectJoinOne(SettleClaims.class,new MPJLambdaWrapper<SettleClaims>()
+// .selectAll(SettleClaims.class)
+// .selectAs(DispatchUnit::getName,SettleClaims::getDuName)
+// .selectAs(Worktype::getName,SettleClaims::getWorktypeName)
+// .selectAs(Solutions::getName,SettleClaims::getSolutionName)
+// .selectAs(InsuranceApply::getStartTime,SettleClaims::getBaoxianStartTime)
+// .selectAs(InsuranceApply::getEndTime,SettleClaims::getBaoxianEndTime)
+// .leftJoin(Solutions.class,Solutions::getId,SettleClaims::getSolutionId)
+// .leftJoin(DispatchUnit.class,DispatchUnit::getId,SettleClaims::getDuId)
+// .leftJoin(Worktype.class,Worktype::getId,SettleClaims::getWorktypeId)
+// .leftJoin(InsuranceApply.class,InsuranceApply::getId,SettleClaims::getInsuranceApplyId)
+//
+//
+// .eq(SettleClaims::getId,id)
+// .last(" limit 1 ")
+// );
+// }
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void saveSupplementDescribe(SaveSupplementDescribeDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || Objects.isNull(dto.getDescribe())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.ACCEPTANCE.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ if(Constants.equalsInteger(settleClaims.getWaitSupplement(),Constants.ONE)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"寰呬紒涓氳ˉ鍏呮枃浠讹紝璇风瓑寰呬紒涓氳ˉ鍏呮枃浠�");
+ }
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.SUPPLEMENT_DESCRIBE,dto.getDescribe());
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getWaitSupplement,Constants.ONE));
+ }
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void saveSupplementFile(SaveSupplementDescribeDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || CollectionUtils.isEmpty(dto.getSupplementFileList())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!(loginUserInfo.getType().equals(Constants.ZERO)||loginUserInfo.getType().equals(Constants.ONE))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲钩鍙颁笌浼佷笟鍛樺伐鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(loginUserInfo.getType().equals(Constants.ZERO)){
+ if(!(Constants.equalsInteger(Constants.SettleClaimsStatus.ACCEPTANCE.getKey(),settleClaims.getStatus())
+ || Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey(),settleClaims.getStatus())
+ )){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ }else{
+ //濡傛灉鏄紒涓� 鏌ヨ鏄惁鏄嚜宸变紒涓氱殑鏁版嵁
+ if(!Constants.equalsInteger(settleClaims.getCompanyId(),loginUserInfo.getCompanyId())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炴偍浼佷笟鐨勬暟鎹紝鎮ㄦ棤娉曡繘琛岃鎿嶄綔");
+ }
+ if(!Constants.equalsInteger(settleClaims.getWaitSupplement(),Constants.ONE)) {
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "褰撳墠涓氬姟鏃犻渶杩涜娣诲姞鏉愭枡");
+ }
+ if(!(Constants.equalsInteger(Constants.SettleClaimsStatus.ACCEPTANCE.getKey(),settleClaims.getStatus())
+ || Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey(),settleClaims.getStatus())
+ || Constants.equalsInteger(Constants.SettleClaimsStatus.REJECT_DEAL.getKey(),settleClaims.getStatus())
+ || Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_DISCUSS_REJECT.getKey(),settleClaims.getStatus())
+ )){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getWaitSupplement,Constants.ZERO));
+ }
+ multifileJoinMapper.delete(new QueryWrapper<Multifile>().lambda().eq(Multifile::getObjId,dto.getId()).eq(Multifile::getObjType,Constants.MultiFile.LP_OTHER_FILE.getKey()));
+ List<Multifile> fileList = dto.getSupplementFileList();
+ if(CollectionUtils.isNotEmpty(fileList)){
+ for (int i = 0; i < fileList.size(); i++) {
+ Multifile multifile = fileList.get(i);
+ if(Objects.isNull(multifile.getFileurl())
+ || Objects.isNull(multifile.getType())
+ || StringUtils.isBlank(multifile.getName())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"闄勪欢鍐呭寮傚父");
+ }
+ multifile.setCreator(loginUserInfo.getId());
+ multifile.setCreateDate(new Date());
+ multifile.setIsdeleted(Constants.ZERO);
+ multifile.setObjId(settleClaims.getId());
+ //娣诲姞鏉愭枡鏀惧叆 鍏朵粬鏉愭枡涓氬姟鍐�
+ multifile.setObjType(Constants.MultiFile.LP_OTHER_FILE.getKey());
+ multifile.setSortnum(i+1);
+ multifileJoinMapper.insert(multifile);
+ }
+ }
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.SUPPLEMENT,null);
+ }
+
+
+ /**
+ * 鎾ら攢鎶ユ
+ * @param dto
+ */
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void returnSettle(OptSettleClaimsDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ONE)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氫汉鍛樻棤娉曡繘琛岃鎿嶄綔");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ //濡傛灉鏄紒涓� 鏌ヨ鏄惁鏄嚜宸变紒涓氱殑鏁版嵁
+ if(!Constants.equalsInteger(settleClaims.getCompanyId(),loginUserInfo.getCompanyId())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炴偍浼佷笟鐨勬暟鎹紝鎮ㄦ棤娉曡繘琛岃鎿嶄綔");
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,Constants.SettleClaimsLogType.RETURN_SETTLE,null);
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getStatus,Constants.SettleClaimsStatus.RETURN.getKey()));
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void updCaseType(CaseTypeDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || Objects.isNull(dto.getCaseType())
+ || !(dto.getCaseType()>=Constants.ONE&&dto.getCaseType()<=Constants.THREE)
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.ACCEPTANCE.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims, Constants.SettleClaimsLogType.UPD_CASE_TYPE,Constants.SettleClaimsLogType.UPD_CASE_TYPE.getInfo());
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime())
+ .set(SettleClaims::getEditor,loginUserInfo.getId())
+ .set(SettleClaims::getCaseType,dto.getCaseType()));
+ }
+
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void register(OptSettleClaimsDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || Objects.isNull(dto.getRegisterStatus())
+ || !(Constants.equalsInteger(dto.getRegisterStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())||Constants.equalsInteger(dto.getRegisterStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey()))
+ || (Constants.equalsInteger(dto.getRegisterStatus(),Constants.SettleClaimsStatus.FINISH_ACCEPTANCE.getKey())&&StringUtils.isBlank(dto.getDescribe()))
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.RETURN_ACCEPTANCE.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ Constants.SettleClaimsStatus settleClaimsStatus =
+ Constants.equalsInteger(dto.getRegisterStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())?Constants.SettleClaimsStatus.CONFIRM_INFORMATION:Constants.SettleClaimsStatus.FINISH_ACCEPTANCE;
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims, Constants.equalsInteger(dto.getRegisterStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())?Constants.SettleClaimsLogType.PLATFORM_REGISTER:Constants.SettleClaimsLogType.PLATFORM_RETURN,dto.getDescribe());
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,
+ DateUtil.getCurrDateTime()).set(SettleClaims::getStatus,settleClaimsStatus.getKey()));
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public Integer addReportNum(OptSettleClaimsDTO param){
+ if(param.getId() == null
+ ||StringUtils.isBlank( param.getReportNum()) ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ SettleClaims model = settleClaimsMapper.selectById(param.getId());
+ if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())
+ || Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.ACCEPTANCE.getKey())
+ )
+ ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!user.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ if(Constants.equalsInteger(model.getReportNumStatus(),Constants.TWO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"浠呭彲淇敼涓�娆℃姤妗堝彿");
+ }
+ if(!((Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.ACCEPTANCE.getKey())&&Constants.equalsInteger(model.getReportNumStatus(),Constants.ONE))
+ ||(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.WAIT_DEAL.getKey())&&Constants.equalsInteger(model.getReportNumStatus(),Constants.ZERO)))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"浠呭彲淇敼涓�娆℃姤妗堝彿");
}
+// //鏌ヨ鏄惁鏈夋姤妗堝彿鏇存敼璁板綍
+// if(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.ACCEPTANCE.getKey())
+// && settleClaimsLogMapper.selectCount(new QueryWrapper<SettleClaimsLog>().lambda()
+// .eq(SettleClaimsLog::getObjType,Constants.SettleClaimsLogType.PLATFORM_ADDCODE.getKey())
+// .eq(SettleClaimsLog::getSettleClainmsId,param.getId()))>=Constants.ONE){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"浠呭彲淇敼涓�娆℃姤妗堝彿");
+// }
+// if(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())&&StringUtils.isNotBlank(model.getReportNum())){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"宸蹭慨鏀规姤妗堝彿锛屾棤娉曞啀娆′慨鏀�");
+// }
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,param.getId()).set(SettleClaims::getEditDate,
+ DateUtil.getCurrDateTime()).set(SettleClaims::getReportNum,param.getReportNum()));
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(user.getId());
+ update.setReportNumStatus(model.getReportNumStatus()+Constants.ONE);
+ update.setId(model.getId());
+ update.setCheckDate(update.getEditDate());
+ update.setCheckInfo("娣诲姞澶囨鍙�");
+ update.setCheckUserId(user.getId());
+ update.setReportNum(param.getReportNum());
+ settleClaimsMapper.updateById(update);
+
+ Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_ADDCODE;
+ String info =applyLogType.getInfo();
+ info = info.replace("${param}", update.getReportNum());
+ SettleClaimsLog log = new SettleClaimsLog(update,applyLogType.getName(), info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
+ settleClaimsLogMapper.insert(log);
+
+ return 1;
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public Integer addRemark(OptSettleClaimsDTO param){
+ if(param.getId() == null
+ ||StringUtils.isBlank( param.getDescribe()) ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ SettleClaims model = settleClaimsMapper.selectById(param.getId());
+ if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!(Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_INFORMATION.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.ACCEPTANCE.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.REJECT_DEAL.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.WAIT_DISCUSS_AUDIT.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.WAIT_DISCUSS_REJECT.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.COMPENSATION.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CONFIRM_FEE.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.SettleClaimsStatus.CLOSE_CASE.getKey())
+ )){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇峰綋鍓嶄笉鏀寔璇ユ搷浣渵");
+ }
+ LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(user.getId());
+ update.setCheckDate(update.getEditDate());
+ update.setCheckInfo("娣诲姞澶囨敞鏍囩");
+ update.setCheckUserId(user.getId());
+ update.setId(model.getId());
+ settleClaimsMapper.updateById(update);
+
+ Constants.SettleClaimsLogType applyLogType = Constants.SettleClaimsLogType.PLATFORM_REMARK;
+ String info =applyLogType.getInfo();
+ info = info.replace("${param}", param.getDescribe());
+ SettleClaimsLog log = new SettleClaimsLog(update,applyLogType.getName(), info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
+ settleClaimsLogMapper.insert(log);
+ return 1;
}
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void acceptance(AcceptanceSettleClaimsDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || Objects.isNull(dto.getStatus())
+ || StringUtils.isBlank(dto.getDescribe())
+ || !(dto.getStatus()>=Constants.ZERO||dto.getStatus()<=Constants.THREE)
+ || ((Constants.equalsInteger(dto.getStatus(),Constants.THREE) ||Constants.equalsInteger(dto.getStatus(),Constants.TWO)) && StringUtils.isBlank(dto.getSyProblemOpts()) )
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_DEAL.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ if(Constants.equalsInteger(dto.getStatus(),Constants.ZERO) || Constants.equalsInteger(dto.getStatus(),Constants.THREE)){
+ //鍙楃悊
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getEditor,loginUserInfo.getId())
+ .set(SettleClaims::getStatus,Constants.SettleClaimsStatus.ACCEPTANCE.getKey()));
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.equalsInteger(dto.getStatus(),Constants.ZERO)?Constants.SettleClaimsLogType.PLATFORM_ACCEPTANCE:Constants.SettleClaimsLogType.PLATFORM_DISCUSS,
+ dto.getDescribe());
+ }else if(Constants.equalsInteger(dto.getStatus(),Constants.ONE)){
+ //鎷掔粷鍙楃悊
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getEditor,loginUserInfo.getId())
+ .set(SettleClaims::getStatus,Constants.SettleClaimsStatus.REJECT_DEAL.getKey()));
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.PLATFORM_REFUSE_ACCEPTANCE,
+ Constants.SettleClaimsLogType.PLATFORM_REFUSE_ACCEPTANCE.getInfo().replace("{param}",dto.getDescribe()));
+ }else if(Constants.equalsInteger(dto.getStatus(),Constants.TWO)){
+ //鍙楃悊鍟嗚瀹℃壒
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate,DateUtil.getCurrDateTime()).set(SettleClaims::getEditor,loginUserInfo.getId())
+ .set(SettleClaims::getStatus,Constants.SettleClaimsStatus.REJECT_DEAL.getKey()));
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.PLATFORM_WAIT_DISCUSS,
+ dto.getDescribe());
+ }
+ }
+
+
+ @Override
+ public List<CompensationVO> getCompensation(Integer id){
+ SettleClaims settleClaims = settleClaimsMapper.selectById(id);
+ List<CompensationVO> modelList = new ArrayList<>();
+ if (Objects.nonNull(settleClaims)&&StringUtils.isNotBlank(settleClaims.getAccountContent())) {
+ modelList = JSONArray.parseArray(settleClaims.getAccountContent(),CompensationVO.class);
+ }
+ Constants.compensation [] compensations = Constants.compensation.values();
+ List<CompensationVO> list = new ArrayList<>();
+ for (Constants.compensation c:compensations) {
+ CompensationVO compensationVO = new CompensationVO();
+ compensationVO.setType(c.getType());
+ compensationVO.setName(c.getName());
+ if(CollectionUtils.isNotEmpty(modelList)){
+ Optional<CompensationVO> optionalModel = modelList.stream().filter(i->i.getName().equals(c.getName())).findFirst();
+ if(optionalModel.isPresent()){
+ CompensationVO oldModel = optionalModel.get();
+ compensationVO.setFee(oldModel.getFee());
+ compensationVO.setDescribe(oldModel.getDescribe());
+ }
+ }
+ list.add(compensationVO);
+ }
+ return list;
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void compensation(CompensationDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || StringUtils.isBlank(dto.getCompensationJson())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!(Constants.equalsInteger(Constants.SettleClaimsStatus.ACCEPTANCE.getKey(),settleClaims.getStatus()))||Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+
+ List<CompensationVO> modelList = JSONArray.parseArray(settleClaims.getAccountContent(),CompensationVO.class);
+
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(loginUserInfo.getId());
+ update.setYlClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.YL_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setWgClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.WG_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setScClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SC_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setSwClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SW_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setOtherAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setAccountContent(dto.getCompensationJson());
+ update.setId(settleClaims.getId());
+ update.setStatus(Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey());
+ settleClaimsMapper.updateById(update);
+
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.PLATFORM_LP_DEAL,
+ Constants.SettleClaimsLogType.PLATFORM_LP_DEAL.getInfo());
+ }
+
+
+ /**
+ * 鍟嗚瀹℃壒
+ * @param dto
+ */
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void discussAudit(DiscussAuditDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || Objects.isNull(dto.getStatus())
+ || !(Constants.equalsInteger(dto.getStatus(),Constants.ZERO)||Constants.equalsInteger(dto.getStatus(),Constants.ONE))
+ || (Constants.equalsInteger(dto.getStatus(),Constants.ONE)&&StringUtils.isBlank(dto.getDescribe()))
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_DISCUSS_AUDIT.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ Constants.SettleClaimsStatus settleClaimsStatus =
+ Constants.equalsInteger(dto.getStatus(),Constants.ZERO)?Constants.SettleClaimsStatus.ACCEPTANCE:Constants.SettleClaimsStatus.WAIT_DISCUSS_REJECT;
+ //瀛樺偍鏃ュ織
+ Constants.SettleClaimsLogType settleClaimsLogType = Constants.equalsInteger(dto.getStatus(),Constants.ZERO)
+ ?Constants.SettleClaimsLogType.PLATFORM_DISCUSS_PASS:Constants.SettleClaimsLogType.PLATFORM_DISCUSS_REFUSE;
+ this.saveSettleClaimsLog(settleClaims, settleClaimsLogType
+ ,settleClaimsLogType.getInfo().replace("${param}",dto.getDescribe()));
+ settleClaimsMapper.update(null,new UpdateWrapper<SettleClaims>().lambda()
+ .eq(SettleClaims::getId,dto.getId()).set(SettleClaims::getEditDate, DateUtil.getCurrDateTime())
+ .set(SettleClaims::getEditor,loginUserInfo.getId())
+ .set(SettleClaims::getStatus,settleClaimsStatus.getKey()));
+ }
+
+
+
+
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void nuclearCompensation(CompensationDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || StringUtils.isBlank(dto.getCompensationJson())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.WAIT_AUDIT_COMPENSATION.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+
+ List<CompensationVO> modelList = JSONArray.parseArray(settleClaims.getAccountContent(),CompensationVO.class);
+
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(loginUserInfo.getId());
+ update.setYlClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.YL_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setWgClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.WG_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setScClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SC_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setSwClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SW_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setOtherAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.TWO)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setAccountContent(dto.getCompensationJson());
+ update.setId(settleClaims.getId());
+ update.setStatus(Constants.SettleClaimsStatus.COMPENSATION.getKey());
+ settleClaimsMapper.updateById(update);
+
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.PLATFORM_HP_DEAL,
+ Constants.SettleClaimsLogType.PLATFORM_HP_DEAL.getInfo());
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void updFee(CompensationDTO dto){
+ if(Objects.isNull(dto)
+ || Objects.isNull(dto.getId())
+ || StringUtils.isBlank(dto.getCompensationJson())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!(Constants.equalsInteger(Constants.SettleClaimsStatus.COMPENSATION.getKey(),settleClaims.getStatus())
+ || Constants.equalsInteger(Constants.SettleClaimsStatus.CONFIRM_FEE.getKey(),settleClaims.getStatus()))
+ ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+
+ List<CompensationVO> modelList = JSONArray.parseArray(dto.getCompensationJson(),CompensationVO.class);
+
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(loginUserInfo.getId());
+ if(Constants.equalsInteger(Constants.SettleClaimsStatus.CONFIRM_FEE.getKey(),settleClaims.getStatus())){
+ update.setFeeUpdate(Constants.ONE);
+ }
+ update.setYlClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.YL_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setWgClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.WG_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setScClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SC_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setSwClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)&&i.getName().equals(Constants.compensation.SW_COMPENSATION.getName())).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ update.setClaimAccount(modelList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ONE)).map(i->i.getFee()).reduce(BigDecimal.ZERO,BigDecimal::add));
+ //澶勭悊鍘嗗彶鏁版嵁
+ List<CompensationVO> oldList = JSONArray.parseArray(settleClaims.getAccountContent(),CompensationVO.class);
+ for (CompensationVO compensationVO:oldList) {
+ if(compensationVO.getName().equals(Constants.compensation.YL_COMPENSATION.getName())){
+ compensationVO.setFee(update.getYlClaimAccount());
+ }else if(compensationVO.getName().equals(Constants.compensation.WG_COMPENSATION.getName())){
+ compensationVO.setFee(update.getWgClaimAccount());
+ }else if(compensationVO.getName().equals(Constants.compensation.SC_COMPENSATION.getName())){
+ compensationVO.setFee(update.getScClaimAccount());
+ }else if(compensationVO.getName().equals(Constants.compensation.SW_COMPENSATION.getName())){
+ compensationVO.setFee(update.getSwClaimAccount());
+ }else{
+ continue;
+ }
+ }
+ update.setAccountContent(dto.getCompensationJson());
+ update.setAccountContent(JSONArray.toJSONString(oldList));
+ update.setId(settleClaims.getId());
+ settleClaimsMapper.updateById(update);
+
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.PLATFORM_UPD_FEE,
+ Constants.SettleClaimsLogType.PLATFORM_UPD_FEE.getInfo());
+ }
+
+
+ @Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+ public void confirmFee(Integer id){
+ LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ if(!loginUserInfo.getType().equals(Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+ }
+ SettleClaims settleClaims = settleClaimsJoinMapper.selectById(id);
+ if(Objects.isNull(settleClaims)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(!Constants.equalsInteger(Constants.SettleClaimsStatus.COMPENSATION.getKey(),settleClaims.getStatus())){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+ }
+ SettleClaims update = new SettleClaims();
+ update.setEditDate(new Date());
+ update.setEditor(loginUserInfo.getId());
+ update.setStatus(Constants.SettleClaimsStatus.WAIT_DEAL.getKey());
+ update.setId(settleClaims.getId());
+ settleClaimsMapper.updateById(update);
+
+ //瀛樺偍鏃ュ織
+ this.saveSettleClaimsLog(settleClaims,
+ Constants.SettleClaimsLogType.CONFIRM_FEE,
+ Constants.SettleClaimsLogType.CONFIRM_FEE.getInfo());
+ }
+
+
+// @Override
+// @Transactional(rollbackFor = {BusinessException.class,Exception.class})
+// public void payCash(PayCashDTO dto){
+// if(Objects.isNull(dto)
+// || Objects.isNull(dto.getId())
+// || StringUtils.isBlank(dto.getDescribe())
+// ){
+// throw new BusinessException(ResponseStatus.BAD_REQUEST);
+// }
+// LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+// if(!loginUserInfo.getType().equals(Constants.ZERO)){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炵鐞嗗憳鏃犳硶杩涜璇ユ搷浣�");
+// }
+// SettleClaims settleClaims = settleClaimsJoinMapper.selectById(dto.getId());
+// if(Objects.isNull(settleClaims)){
+// throw new BusinessException(ResponseStatus.DATA_EMPTY);
+// }
+// if(!Constants.equalsInteger(Constants.SettleClaimsStatus.COMPENSATION.getKey(),settleClaims.getStatus())){
+// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝涓氬姟鐘舵�佸凡娴佽浆~");
+// }
+// SettleClaims update = new SettleClaims();
+// update.setEditDate(new Date());
+// update.setEditor(loginUserInfo.getId());
+// update.setStatus(Constants.SettleClaimsStatus.WAIT_DEAL.getKey());
+// update.setId(settleClaims.getId());
+// settleClaimsMapper.updateById(update);
+//
+// //瀛樺偍鏃ュ織
+// this.saveSettleClaimsLog(settleClaims,
+// Constants.SettleClaimsLogType.CONFIRM_FEE,
+// Constants.SettleClaimsLogType.CONFIRM_FEE.getInfo());
+// }
+
+
+
+
+
+
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
index b57877d..9dec078 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -32,12 +32,14 @@
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
@@ -694,215 +696,187 @@
}
+ @Autowired
+ private RedisTemplate redisTemplate;// Redis鎿嶄綔绫伙紝瀵硅繖涓娇鐢ㄤ笉鐔熸倝鐨勶紝鍙互鍙傝�冨墠闈㈢殑鍗氬
+ private static final String KEY_PREFIX = "unionchange:upload:";
+
@Override
@Transactional(rollbackFor = {BusinessException.class,Exception.class})
public void uploadBXD(UnionChangeBXDDTO unionChangeBXDDTO){
- if(Objects.isNull(unionChangeBXDDTO)
- || Objects.isNull(unionChangeBXDDTO.getId())
- || Objects.isNull(unionChangeBXDDTO.getApplyDate())
-// || StringUtils.isBlank(unionChangeBXDDTO.getName())
-// || StringUtils.isBlank(unionChangeBXDDTO.getFileurl())
- || StringUtils.isBlank(unionChangeBXDDTO.getCode())
- || CollectionUtils.isEmpty(unionChangeBXDDTO.getPidanFileList())
- ){
- throw new BusinessException(ResponseStatus.BAD_REQUEST);
- }
- LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
- UnionChange unionChange = unionChangeMapper.selectById(unionChangeBXDDTO.getId());
- if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
- throw new BusinessException(ResponseStatus.DATA_EMPTY);
- }
- if(!Constants.equalsInteger(unionChange.getType(),Constants.ONE)&&
- unionChangeBXDDTO.getDelValidTime() == null ){
- throw new BusinessException(ResponseStatus.BAD_REQUEST);
- }
- unionChangeBXDDTO.setApplyId(unionChange.getUnionApplyId());
- unionChange.setStatus(Constants.formatIntegerNum(unionChange.getStatus()));
- unionChange.setShopId(Constants.formatIntegerNum(unionChange.getShopId()));
- if(Constants.equalsInteger(user.getType(),Constants.TWO) && !unionChange.getShopId().equals(user.getCompanyId())){
- throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧烽潪鎮ㄧ殑鍚堝苟鍗曪紝鎮ㄦ棤娉曡繘琛屾搷浣滐紒");
- }
- if(unionChange.getStatus().equals(Constants.UnionChangeStatus.FINISH.getKey())){
- throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡瀹岀粨锛屾偍鏃犳硶杩涜璇ユ搷浣滐紒");
- }
- if(unionChange.getStatus().equals(Constants.UnionChangeStatus.CLOSE.getKey())){
- throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡鍏抽棴");
- }
- if(!unionChange.getStatus().equals(Constants.UnionChangeStatus.UPLOAD_INSURANCE_POLICY.getKey())){
- throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曠姸鎬佸凡娴佽浆");
- }
- UnionApply unionApply = unionApplyMapper.selectById(unionChange.getUnionApplyId());
- if(Objects.isNull(unionApply)){
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鍚堝苟淇濆崟淇℃伅");
- }
- Solutions solutions = solutionsMapper.selectById(unionApply.getSolutionId());
- if(Objects.isNull(solutions)){
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌淇濋櫓鏂规");
- }
- if(unionChange.getType().equals(Constants.ZERO)){
- //鍒ゆ柇鎵瑰崟鏃ユ湡 鍚堝苟鍗曠殑鎵瑰崟鐢熸晥鏈熷湪涓� 淇濆崟璧锋湡鐨勬鏃� 鍒颁繚鍗曟鏈�
- //鑾峰彇寮�濮嬫棩鏈熸鏃�
- if(unionChangeBXDDTO.getApplyDate().getTime()<unionApply.getStartTime().getTime()
- || unionChangeBXDDTO.getApplyDate().getTime()> unionApply.getEndTime().getTime()){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍚堝苟鍗曠殑鎵瑰崟鍔犱繚鐢熸晥鏈熼敊璇�");
+ try{
+ if(Objects.nonNull(redisTemplate.opsForValue().get(KEY_PREFIX+unionChangeBXDDTO.getId()))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇峰嬁閲嶅鎻愪氦");
+ };
+ redisTemplate.opsForValue().set(KEY_PREFIX+unionChangeBXDDTO.getId(), unionChangeBXDDTO.getId(), 30000, TimeUnit.SECONDS);
+ if(Objects.isNull(unionChangeBXDDTO)
+ || Objects.isNull(unionChangeBXDDTO.getId())
+ || Objects.isNull(unionChangeBXDDTO.getApplyDate())
+ // || StringUtils.isBlank(unionChangeBXDDTO.getName())
+ // || StringUtils.isBlank(unionChangeBXDDTO.getFileurl())
+ || StringUtils.isBlank(unionChangeBXDDTO.getCode())
+ || CollectionUtils.isEmpty(unionChangeBXDDTO.getPidanFileList())
+ ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- if(unionChangeBXDDTO.getDelValidTime().getTime()<unionApply.getStartTime().getTime()
- || unionChangeBXDDTO.getDelValidTime().getTime()> unionApply.getEndTime().getTime()){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍚堝苟鍗曠殑鎵瑰崟鍑忎繚鐢熸晥鏈熼敊璇�");
+ LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ UnionChange unionChange = unionChangeMapper.selectById(unionChangeBXDDTO.getId());
+ if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
- }else{
- if(unionChangeBXDDTO.getApplyDate().getTime()<unionChange.getApplyStartTime().getTime()){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎵瑰崟鏃ユ湡蹇呴』澶т簬鐢宠鏃ユ湡");
+ if(!Constants.equalsInteger(unionChange.getType(),Constants.ONE)&&
+ unionChangeBXDDTO.getDelValidTime() == null ){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- }
-
- List<ApplyChange> applyChangeList = applyChangeJoinMapper.selectJoinList(ApplyChange.class,
- new MPJLambdaWrapper<ApplyChange>()
- .selectAll(ApplyChange.class)
- .selectAs(InsuranceApply::getSolutionId,ApplyChange::getSolutionsId)
- .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode)
- .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
- .eq(ApplyChange::getUnionChangeId,unionChange.getId()));
-
- List<Multifile> pidanFileList = unionChangeBXDDTO.getPidanFileList();
- for (Multifile pidanFile:pidanFileList) {
- if(StringUtils.isBlank( pidanFile.getFileurl())
- ||StringUtils.isBlank( pidanFile .getName())) {
- throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鎵瑰崟鏂囦欢鍙傛暟閿欒");
+ unionChangeBXDDTO.setApplyId(unionChange.getUnionApplyId());
+ unionChange.setStatus(Constants.formatIntegerNum(unionChange.getStatus()));
+ unionChange.setShopId(Constants.formatIntegerNum(unionChange.getShopId()));
+ if(Constants.equalsInteger(user.getType(),Constants.TWO) && !unionChange.getShopId().equals(user.getCompanyId())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧烽潪鎮ㄧ殑鍚堝苟鍗曪紝鎮ㄦ棤娉曡繘琛屾搷浣滐紒");
}
- pidanFile.setIsdeleted(Constants.ZERO);
- pidanFile.setCreator(user.getId());
- pidanFile.setObjId(unionChange.getId());
- pidanFile.setCreateDate(new Date());
- pidanFile.setObjType(Constants.MultiFile.WTB_CA_DONE_PDF.getKey());
- pidanFile.setType(Constants.TWO);
- }
- multifileMapper.insertBatchSomeColumn(pidanFileList);
-
- for (ApplyChange applyChange:applyChangeList) {
- for (Multifile pidanFile:pidanFileList) {
- Multifile m = new Multifile();
- m.setId(null);
- m.setIsdeleted(Constants.ZERO);
- m.setCreator(user.getId());
- m.setCreateDate(new Date());
- m.setObjId(applyChange.getId());
- m.setFileurl(pidanFile.getFileurl());
- m.setName(pidanFile.getName());
- m.setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
- m.setType(Constants.TWO);
- multifileMapper.insert(m);
+ if(unionChange.getStatus().equals(Constants.UnionChangeStatus.FINISH.getKey())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡瀹岀粨锛屾偍鏃犳硶杩涜璇ユ搷浣滐紒");
}
-
- }
-
- //瀛樺偍鍚堝苟鍗曚繚闄╁崟
- /* Multifile multifile = new Multifile();
- multifile.setIsdeleted(Constants.ZERO);
- multifile.setCreator(user.getId());
- multifile.setCreateDate(new Date());
- multifile.setObjId(unionChangeBXDDTO.getId());
- multifile.setCreateDate(new Date());
- multifile.setObjType(Constants.MultiFile.WTB_CA_DONE_PDF.getKey());
- multifile.setType(Constants.TWO);
- multifile.setFileurl(unionChangeBXDDTO.getFileurl());
- multifile.setName(unionChangeBXDDTO.getName());
- multifileMapper.insert(multifile);*/
-
-// if(CollectionUtils.isNotEmpty(unionChangeBXDDTO.getApplyChangeBXDList())){
-// //鏌ヨ鏄惁涓嶅瓨鍦ㄥ綋鍓嶅悎骞跺崟鐨勬暟鎹�
-// if(applyChangeJoinMapper.selectCount(new QueryWrapper<ApplyChange>()
-// .lambda().ne(ApplyChange::getUnionChangeId,unionChangeBXDDTO.getId())
-// .in(ApplyChange::getId,
-// unionChangeBXDDTO.getApplyChangeBXDList().stream().map(m->m.getObjId()).collect(Collectors.toList())
-// )
-// )>Constants.ZERO){
-// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎵瑰崟鏄庣粏璁板綍瀛樺湪闈炴湰鍚堝苟鍗曟暟鎹�");
-// };
-// for (Multifile m:unionChangeBXDDTO.getApplyChangeBXDList()) {
-// if(StringUtils.isBlank(m.getName())
-// || StringUtils.isBlank(m.getFileurl()) ){
-// continue;
-// }
-// if(Objects.isNull(m.getObjId())
-// ||StringUtils.isBlank(m.getFileurl())
-// ||StringUtils.isBlank(m.getName())
-// ){
-// throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎵瑰崟鏂囦欢淇℃伅缂哄け");
-// }
-// m.setId(null);
-// m.setIsdeleted(Constants.ZERO);
-// m.setCreator(user.getId());
-// m.setCreateDate(new Date());
-// m.setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
-// m.setType(Constants.TWO);
-// multifileMapper.insert(m);
-// }
-// }
- if(CollectionUtils.isNotEmpty(applyChangeList)){
- for (ApplyChange applyChange:applyChangeList) {
- ApplyChange oldModel = applyChange;
- applyChange.setApplyStartTime(unionChangeBXDDTO.getApplyDate());
- applyChange.setDelValidTime(unionChangeBXDDTO.getDelValidTime());
-// applyChange.setValidTime(unionChangeBXDDTO.getApplyDate());
- applyChange.setEditDate(new Date());
- applyChange.setEditor(user.getId());
- applyChange.setStatus(Constants.ApplyChangeStatus.APPROVE.getKey());
- applyChange.setCode(unionChangeBXDDTO.getCode());
- applyChange.setValidCode(unionChangeBXDDTO.getCode());
- applyChange.setCheckUserId(user.getId());
- List<ApplyChagneDetail> allList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,
- new MPJLambdaWrapper<ApplyChagneDetail>()
- .selectAll(ApplyChagneDetail.class)
- .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo)
- .selectAs(Solutions::getTimeUnit, ApplyChagneDetail::getSolutionTimeUnit)
- .selectAs(Solutions::getPrice, ApplyChagneDetail::getSolutionPrice)
- .selectAs(Worktype::getName, ApplyChagneDetail::getWorkTypeName)
- .selectAs(DispatchUnit::getName, ApplyChagneDetail::getDuName)
- .selectAs(Member::getName, ApplyChagneDetail::getMemberName)
- .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName)
- .selectAs(InsuranceApply::getCode,ApplyChagneDetail::getApplyCode)
- .selectAs(InsuranceApply::getServerCost,ApplyChagneDetail::getServerCost)
- .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId)
- .leftJoin(Member.class, Member::getId, ApplyChagneDetail::getMemberId)
- .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyChange::getApplyId)
- .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId)
- .leftJoin(Worktype.class, Worktype::getId, ApplyChagneDetail::getWorktypeId)
- .leftJoin(DispatchUnit.class, DispatchUnit::getId, ApplyChagneDetail::getDuId)
- .eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId()));
- this.dealApplyChangeDetail(applyChange,allList,solutions);
- applyChangeJoinMapper.updateById(applyChange);
- //瀛樺偍鎵瑰崟瀹屾垚淇℃伅
- Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_APPROVE;
- String info = "";
- if(applyChange.getValidTime()!=null && applyChange.getValidTime().getTime()/1000!= applyChange.getApplyStartTime().getTime()/1000){
- info =applyLogType.getInfo();
- info = info.replace("${param1}",DateUtil.getPlusTime2(applyChange.getValidTime()));
- info = info.replace("${param2}",DateUtil.getPlusTime2(applyChange.getApplyStartTime()));
+ if(unionChange.getStatus().equals(Constants.UnionChangeStatus.CLOSE.getKey())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曚笟鍔″凡鍏抽棴");
+ }
+ if(!unionChange.getStatus().equals(Constants.UnionChangeStatus.UPLOAD_INSURANCE_POLICY.getKey())){
+ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"瀵逛笉璧凤紝鍚堝苟鍗曠姸鎬佸凡娴佽浆");
+ }
+ UnionApply unionApply = unionApplyMapper.selectById(unionChange.getUnionApplyId());
+ if(Objects.isNull(unionApply)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鍚堝苟淇濆崟淇℃伅");
+ }
+ Solutions solutions = solutionsMapper.selectById(unionApply.getSolutionId());
+ if(Objects.isNull(solutions)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌淇濋櫓鏂规");
+ }
+ if(unionChange.getType().equals(Constants.ZERO)){
+ //鍒ゆ柇鎵瑰崟鏃ユ湡 鍚堝苟鍗曠殑鎵瑰崟鐢熸晥鏈熷湪涓� 淇濆崟璧锋湡鐨勬鏃� 鍒颁繚鍗曟鏈�
+ //鑾峰彇寮�濮嬫棩鏈熸鏃�
+ if(unionChangeBXDDTO.getApplyDate().getTime()<unionApply.getStartTime().getTime()
+ || unionChangeBXDDTO.getApplyDate().getTime()> unionApply.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍚堝苟鍗曠殑鎵瑰崟鍔犱繚鐢熸晥鏈熼敊璇�");
}
- ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(), info,applyChange.getId(),applyLogType.getKey(),JSONObject.toJSONString(oldModel), JSONObject.toJSONString(applyChange));
- applyLogMapper.insert(log);
+ if(unionChangeBXDDTO.getDelValidTime().getTime()<unionApply.getStartTime().getTime()
+ || unionChangeBXDDTO.getDelValidTime().getTime()> unionApply.getEndTime().getTime()){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍚堝苟鍗曠殑鎵瑰崟鍑忎繚鐢熸晥鏈熼敊璇�");
+ }
+ }else{
+ if(unionChangeBXDDTO.getApplyDate().getTime()<unionChange.getApplyStartTime().getTime()){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎵瑰崟鏃ユ湡蹇呴』澶т簬鐢宠鏃ユ湡");
+ }
+ }
+
+ List<ApplyChange> applyChangeList = applyChangeJoinMapper.selectJoinList(ApplyChange.class,
+ new MPJLambdaWrapper<ApplyChange>()
+ .selectAll(ApplyChange.class)
+ .selectAs(InsuranceApply::getSolutionId,ApplyChange::getSolutionsId)
+ .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode)
+ .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
+ .eq(ApplyChange::getUnionChangeId,unionChange.getId()));
+
+ List<Multifile> pidanFileList = unionChangeBXDDTO.getPidanFileList();
+ for (Multifile pidanFile:pidanFileList) {
+ if(StringUtils.isBlank( pidanFile.getFileurl())
+ ||StringUtils.isBlank( pidanFile .getName())) {
+ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鎵瑰崟鏂囦欢鍙傛暟閿欒");
+ }
+ pidanFile.setIsdeleted(Constants.ZERO);
+ pidanFile.setCreator(user.getId());
+ pidanFile.setObjId(unionChange.getId());
+ pidanFile.setCreateDate(new Date());
+ pidanFile.setObjType(Constants.MultiFile.WTB_CA_DONE_PDF.getKey());
+ pidanFile.setType(Constants.TWO);
+ }
+ multifileMapper.insertBatchSomeColumn(pidanFileList);
+
+ for (ApplyChange applyChange:applyChangeList) {
+ for (Multifile pidanFile:pidanFileList) {
+ Multifile m = new Multifile();
+ m.setId(null);
+ m.setIsdeleted(Constants.ZERO);
+ m.setCreator(user.getId());
+ m.setCreateDate(new Date());
+ m.setObjId(applyChange.getId());
+ m.setFileurl(pidanFile.getFileurl());
+ m.setName(pidanFile.getName());
+ m.setObjType(Constants.MultiFile.CA_PD_PDF.getKey());
+ m.setType(Constants.TWO);
+ multifileMapper.insert(m);
+ }
}
+
+
+ if(CollectionUtils.isNotEmpty(applyChangeList)){
+ for (ApplyChange applyChange:applyChangeList) {
+ ApplyChange oldModel = applyChange;
+ applyChange.setApplyStartTime(unionChangeBXDDTO.getApplyDate());
+ applyChange.setDelValidTime(unionChangeBXDDTO.getDelValidTime());
+ // applyChange.setValidTime(unionChangeBXDDTO.getApplyDate());
+ applyChange.setEditDate(new Date());
+ applyChange.setEditor(user.getId());
+ applyChange.setStatus(Constants.ApplyChangeStatus.APPROVE.getKey());
+ applyChange.setCode(unionChangeBXDDTO.getCode());
+ applyChange.setValidCode(unionChangeBXDDTO.getCode());
+ applyChange.setCheckUserId(user.getId());
+ List<ApplyChagneDetail> allList = applyChagneDetailJoinMapper.selectJoinList(ApplyChagneDetail.class,
+ new MPJLambdaWrapper<ApplyChagneDetail>()
+ .selectAll(ApplyChagneDetail.class)
+ .selectAs(Member::getIdcardNo,ApplyChagneDetail::getIdcardNo)
+ .selectAs(Solutions::getTimeUnit, ApplyChagneDetail::getSolutionTimeUnit)
+ .selectAs(Solutions::getPrice, ApplyChagneDetail::getSolutionPrice)
+ .selectAs(Worktype::getName, ApplyChagneDetail::getWorkTypeName)
+ .selectAs(DispatchUnit::getName, ApplyChagneDetail::getDuName)
+ .selectAs(Member::getName, ApplyChagneDetail::getMemberName)
+ .selectAs(Solutions::getName,ApplyChagneDetail::getSolutionsName)
+ .selectAs(InsuranceApply::getCode,ApplyChagneDetail::getApplyCode)
+ .selectAs(InsuranceApply::getServerCost,ApplyChagneDetail::getServerCost)
+ .leftJoin(ApplyChange.class, ApplyChange::getId, ApplyChagneDetail::getApplyChangeId)
+ .leftJoin(Member.class, Member::getId, ApplyChagneDetail::getMemberId)
+ .leftJoin(InsuranceApply.class, InsuranceApply::getId, ApplyChange::getApplyId)
+ .leftJoin(Solutions.class, Solutions::getId, InsuranceApply::getSolutionId)
+ .leftJoin(Worktype.class, Worktype::getId, ApplyChagneDetail::getWorktypeId)
+ .leftJoin(DispatchUnit.class, DispatchUnit::getId, ApplyChagneDetail::getDuId)
+ .eq(ApplyChagneDetail::getApplyChangeId,applyChange.getId()));
+ this.dealApplyChangeDetail(applyChange,allList,solutions);
+ applyChangeJoinMapper.updateById(applyChange);
+ //瀛樺偍鎵瑰崟瀹屾垚淇℃伅
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_APPROVE;
+ String info = "";
+ if(applyChange.getValidTime()!=null && applyChange.getValidTime().getTime()/1000!= applyChange.getApplyStartTime().getTime()/1000){
+ info =applyLogType.getInfo();
+ info = info.replace("${param1}",DateUtil.getPlusTime2(applyChange.getValidTime()));
+ info = info.replace("${param2}",DateUtil.getPlusTime2(applyChange.getApplyStartTime()));
+ }
+ ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(), info,applyChange.getId(),applyLogType.getKey(),JSONObject.toJSONString(oldModel), JSONObject.toJSONString(applyChange));
+ applyLogMapper.insert(log);
+
+ }
+ }
+ unionChangeMapper.update(null,new UpdateWrapper<UnionChange>().lambda()
+ .set(UnionChange::getStatus,Constants.UnionChangeStatus.FINISH.getKey())
+ .set(UnionChange::getEditDate,new Date())
+ .set(UnionChange::getEditor,user.getId())
+ .set(UnionChange::getValidTime,unionChangeBXDDTO.getApplyDate())
+ .set(UnionChange::getDelValidTime,unionChangeBXDDTO.getDelValidTime())
+ .set(UnionChange::getApplyStartTime,unionChangeBXDDTO.getApplyDate())
+ .set(UnionChange::getCode,unionChangeBXDDTO.getCode())
+ .eq(UnionChange::getId,unionChangeBXDDTO.getId())
+ );
+
+
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD_INSURANCE;
+ ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null
+ ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
+ applyLogMapper.insert(log);
+
+ }catch (Exception e){
+ e.printStackTrace();
+ }finally {
+ redisTemplate.delete(KEY_PREFIX + unionChangeBXDDTO.getId());
}
- unionChangeMapper.update(null,new UpdateWrapper<UnionChange>().lambda()
- .set(UnionChange::getStatus,Constants.UnionChangeStatus.FINISH.getKey())
- .set(UnionChange::getEditDate,new Date())
- .set(UnionChange::getEditor,user.getId())
- .set(UnionChange::getValidTime,unionChangeBXDDTO.getApplyDate())
- .set(UnionChange::getDelValidTime,unionChangeBXDDTO.getDelValidTime())
- .set(UnionChange::getApplyStartTime,unionChangeBXDDTO.getApplyDate())
- .set(UnionChange::getCode,unionChangeBXDDTO.getCode())
- .eq(UnionChange::getId,unionChangeBXDDTO.getId())
- );
-
-
- Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD_INSURANCE;
- ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null
- ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
- applyLogMapper.insert(log);
-
}
diff --git a/server/service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java b/server/service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
index 8c3fcb7..1a1e495 100644
--- a/server/service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -151,7 +151,7 @@
}else if(systemDictData.getLabel().equals(Constants.RISK_CLAIM_TIMES)){
riskConfigVO.setRiskClaimTimes(systemDictData.getCode());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_OPEN)){
- riskConfigVO.setRiskNewMemberOepn(systemDictData.getCode());
+ riskConfigVO.setRiskNewMemberOpen(systemDictData.getCode());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_TIME_UNIT)){
riskConfigVO.setRiskNewMemberTimeUnit(systemDictData.getCode());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_TIME)){
@@ -202,7 +202,7 @@
}else if(systemDictData.getLabel().equals(Constants.RISK_CLAIM_TIMES)){
systemDictData.setCode(riskConfigDTO.getRiskClaimTimes());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_OPEN)){
- systemDictData.setCode(riskConfigDTO.getRiskNewMemberOepn());
+ systemDictData.setCode(riskConfigDTO.getRiskNewMemberOpen());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_TIME_UNIT)){
systemDictData.setCode(riskConfigDTO.getRiskNewMemberTimeUnit());
}else if(systemDictData.getLabel().equals(Constants.RISK_NEW_MEMBER_TIME)){
--
Gitblit v1.9.3