From 4a34f3cfd93da1c06d40663dea68e54e83ec7460 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期二, 30 一月 2024 16:00:22 +0800
Subject: [PATCH] 111
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 50 ++++++++---
server/service/src/main/java/com/doumee/dao/business/dto/WorkTypeQueryDTO.java | 2
server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java | 11 ++
server/company/src/main/java/com/doumee/api/business/ApplyDetailController.java | 2
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java | 5
server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java | 2
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 17 ----
server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java | 2
server/service/src/main/java/com/doumee/core/utils/DateUtil.java | 19 ++++
server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java | 1
server/platform/src/main/java/com/doumee/task/ScheduleTool.java | 2
server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java | 8 +
server/service/src/main/java/com/doumee/core/utils/Constants.java | 32 ++++++-
server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 20 +++-
server/service/src/main/java/com/doumee/dao/business/model/Taxes.java | 4
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java | 19 ----
server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java | 2
server/company/src/main/java/com/doumee/api/business/TaxesController.java | 4
server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java | 16 +++-
server/service/src/main/java/com/doumee/dao/business/dto/ApplyChangeOptDTO.java | 2
20 files changed, 138 insertions(+), 82 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 25331ba..666cf0e 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
@@ -87,7 +87,7 @@
@RequiresPermissions("business:applydetail:exportExcel")
public void exportExcel (@RequestBody PageWrap<ApplyDetailPageDTO> pageWrap, HttpServletResponse response) {
//List<T> data, String fileName,String first,String end, HttpServletResponse response
- ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getCompanyName()+"_"+pageWrap.getModel().getSolutionName()+".xlsx","鍦ㄤ繚浜哄憳鍚嶅崟",null, response);
+ ExcelExporter.build(ApplyDetail.class).exportWithFirstAndEnd(applyDetailService.findPageForCompany(pageWrap).getRecords(), pageWrap.getModel().getSolutionName()+".xlsx","鍦ㄤ繚浜哄憳鍚嶅崟",null, response);
}
@ApiOperation("鏍规嵁ID鏌ヨ")
diff --git a/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java b/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
index 88dc869..be8ece9 100644
--- a/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
+++ b/server/company/src/main/java/com/doumee/api/business/InsuranceApplyController.java
@@ -100,6 +100,7 @@
public void exportExcel (@RequestBody PageWrap<InsuranceApplyQueryDTO> pageWrap, HttpServletResponse response) {
ExcelExporter.build(InsuranceApply.class).export(insuranceApplyService.findPage(pageWrap).getRecords(), "鎶曚繚鐢宠淇℃伅琛�", response);
}
+
@ApiOperation("瀵煎嚭鎶曚繚璇︽儏鍗�")
@PostMapping("/exportDetailExcel")
@RequiresPermissions("business:insuranceapply:exportExcel")
@@ -134,4 +135,14 @@
return ApiResponse.success("鎿嶄綔鎴愬姛",insuranceApplyService.getCountCyclePriceVO(countCyclePriceDTO));
}
+
+ @ApiOperation("娴嬭瘯瀹為檯閲戦")
+ @GetMapping("/testFee")
+ public ApiResponse testFee(@RequestParam Integer id) {
+ insuranceApplyService.updateApplyCurrentFee(id);
+ return ApiResponse.success(null);
+ }
+
+
+
}
diff --git a/server/company/src/main/java/com/doumee/api/business/TaxesController.java b/server/company/src/main/java/com/doumee/api/business/TaxesController.java
index e491053..bc5bcdf 100644
--- a/server/company/src/main/java/com/doumee/api/business/TaxesController.java
+++ b/server/company/src/main/java/com/doumee/api/business/TaxesController.java
@@ -92,7 +92,7 @@
@ApiOperation("鑾峰彇浼佷笟淇℃伅")
@GetMapping("/getCompanyDetail")
@RequiresPermissions("business:taxes:query")
- public ApiResponse getCompanyDetail() {
+ public ApiResponse<Taxes> getCompanyDetail() {
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(!loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱被鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
@@ -126,7 +126,7 @@
@ApiOperation(value = "鑾峰彇鐩翠繚鏁版嵁淇℃伅",notes = "")
@GetMapping("/getDirectTaxes")
@RequiresPermissions("business:taxes:query")
- public ApiResponse getDirectTaxes(@RequestParam Integer id) {
+ public ApiResponse<List<TaxesInvoicingVO>> getDirectTaxes(@RequestParam Integer id) {
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(!loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱被鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
diff --git a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
index 06d04c0..2967f11 100644
--- a/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -72,7 +72,7 @@
@Scheduled(cron = "0 5 00 * * ?")
public void updateApplyCurrentFee(){
log.info("==============瀹氭椂鏇存柊淇濆崟瀹為檯閲戦=======start======");
- insuranceApplyService.updateApplyCurrentFee();
+ insuranceApplyService.updateApplyCurrentFee(null);
log.info("==============瀹氭椂鏇存柊淇濆崟瀹為檯閲戦======end=======");
}
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 b2a5e09..f55caa7 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
@@ -1082,27 +1082,37 @@
public enum ApplyChangeLogStatus {
- UPLOAD(0, "鍙戣捣鐢宠"),
- RETURN_APPLY(3, "鍙戣捣閫�鍥炵敵璇�"),
- PLATFORM_AGREE(4, "骞冲彴瀹℃壒閫氳繃"),
- PLATFORM_UN_AGREE(0, "瀹℃壒椹冲洖"),
- CLOSE(5, "鍏抽棴"),
+ UPLOAD(0, "鍙戣捣鐢宠",""),
+ RETURN_APPLY(3, "鍙戣捣閫�鍥炵敵璇�","鎻愪氦鎰忚锛�${param}"),
+ PLATFORM_AGREE(4, "骞冲彴瀹℃壒閫氳繃" ,"鎻愪氦鎰忚锛�${param}"),
+ PLATFORM_UN_AGREE(0, "瀹℃壒椹冲洖","鎻愪氦鎰忚锛�${param}"),
+ CLOSE(5, "鍏抽棴",""),
;
// 鎴愬憳鍙橀噺
private String name;
+ private String info;
private int key;
// 鏋勯�犳柟娉�
- ApplyChangeLogStatus(int key, String name) {
+ ApplyChangeLogStatus(int key, String name,String info) {
this.name = name;
+ this.info = info;
this.key = key;
}
// 鏅�氭柟娉�
public static String getName(int index) {
- for (ApplyLogType c : ApplyLogType.values()) {
+ for (ApplyChangeLogStatus c : ApplyChangeLogStatus.values()) {
if (c.getKey() == index) {
return c.name;
+ }
+ }
+ return null;
+ }
+ public static String getInfo(int index) {
+ for (ApplyChangeLogStatus c : ApplyChangeLogStatus.values()) {
+ if (c.getKey() == index) {
+ return c.info;
}
}
return null;
@@ -1125,6 +1135,14 @@
this.key = key;
}
+ public String getInfo() {
+ return info;
+ }
+
+ public void setInfo(String info) {
+ this.info = info;
+ }
+
}
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 45bdcc0..e6e6b7e 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
@@ -3111,9 +3111,22 @@
public static void main(String[] args) {
- System.out.println(DateUtil.DateToStr(DateUtil.afterDateByType(
- DateUtil.stringToDate("2024-02-01","yyyy-MM-dd")
- ,1,1),"yyyy-MM-dd HH:mm:ss"));
+// System.out.println(DateUtil.DateToStr(DateUtil.afterDateByType(
+// DateUtil.stringToDate("2024-02-01","yyyy-MM-dd")
+// ,1,1),"yyyy-MM-dd HH:mm:ss"));
+
+ System.out.println( DateUtil.daysBetweenDates(DateUtil.stringToDate("2024-02-29","yyyy-MM-dd"),
+ DateUtil.stringToDate("2024-02-01","yyyy-MM-dd"))
+ );
+
+ System.out.println(DateUtil.calculateBetween(DateUtil.StringToDate("2024-02-29 23:59:59"),DateUtil.StringToDate("2024-02-01 00:00:00"),0));
+
+
+// Calendar calo = Calendar.getInstance();
+// Calendar caln = Calendar.getInstance(); // ,"yyyy-MM-dd HH:mm:ss"
+// caln.setTime(DateUtil.StringToDate("2024-02-29 23:59:59"));
+// calo.setTime(DateUtil.StringToDate("2024-02-01 00:00:00"));
+// System.out.println( DateUtil.calculateDaysBetweenDates(calo,caln));
}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/ApplyChangeOptDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/ApplyChangeOptDTO.java
index 64715e3..1565f28 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/ApplyChangeOptDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/ApplyChangeOptDTO.java
@@ -15,7 +15,7 @@
@ApiModelProperty(value = "鎿嶄綔璇存槑")
private String optIllustration;
- @ApiModelProperty(value = "鎿嶄綔绫诲瀷锛�3=閫�鍥炵敵璇凤紱4=骞冲彴瀹℃壒閫氳繃锛�0=瀹℃壒椹冲洖;5=鍏抽棴")
+ @ApiModelProperty(value = "鎿嶄綔绫诲瀷锛�3=閫�鍥炵敵璇凤紱4=骞冲彴瀹℃壒閫氳繃锛�5=瀹℃壒椹冲洖;6=鍏抽棴")
private Integer optType;
}
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
index e55323e..eb5b04d 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/InsuranceApplyQueryDTO.java
@@ -28,27 +28,35 @@
private Integer baseSolutionId;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥姝㈡湡寮�濮�")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
private Date endTimeS;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥姝㈡湡缁撴潫")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
private Date endTimeE;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥璧锋湡寮�濮�")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
private Date startTimeS;
@ApiModelProperty(value = "瀹為檯淇濋櫓鐢熸晥璧锋湡缁撴潫")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
private Date startTimeE;
@ApiModelProperty(value = "鍗曞彿")
private String code;
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "鎻愪氦鏃ユ湡寮�濮�")
private Date createTimeS;
- @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "鎻愪氦鏃ユ湡缁撴潫")
private Date createTimeE;
diff --git a/server/service/src/main/java/com/doumee/dao/business/dto/WorkTypeQueryDTO.java b/server/service/src/main/java/com/doumee/dao/business/dto/WorkTypeQueryDTO.java
index d73af03..6076c97 100644
--- a/server/service/src/main/java/com/doumee/dao/business/dto/WorkTypeQueryDTO.java
+++ b/server/service/src/main/java/com/doumee/dao/business/dto/WorkTypeQueryDTO.java
@@ -14,7 +14,7 @@
@ApiModelProperty(value = "鏌ヨ涓氬姟涓婚敭")
private Integer id;
- @ApiModelProperty(value = "鏌ヨ绫诲瀷锛�0=淇濋櫓鏂规涓婚敭锛�1=娲鹃仯鍗曚綅涓婚敭")
+ @ApiModelProperty(value = "鏌ヨ绫诲瀷锛�0=淇濋櫓鏂规涓婚敭锛�1=娲鹃仯鍗曚綅涓婚敭锛�2锛氫繚鍗曚富閿�")
private Integer queryType;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java b/server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
index 78580e2..558bf6a 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/ApplyChange.java
@@ -85,9 +85,10 @@
@ExcelColumn(name="鎵瑰崟鐢熸晥鏃堕棿")
private Date applyStartTime;
- @ApiModelProperty(value = "鐘舵�� 0寰呯缃� 1宸茬绔� 2宸蹭笂浼犳壒鍗� 3閫�鍥炵敵璇� 4骞冲彴鍚屾剰 5骞冲彴椹冲洖")
- @ExcelColumn(name="鐘舵�� 0寰呯缃� 1宸茬绔� 2宸蹭笂浼犳壒鍗� 3閫�鍥炵敵璇� 4骞冲彴鍚屾剰 5骞冲彴椹冲洖")
+ @ApiModelProperty(value = "鐘舵�� 0寰呯缃� 1宸茬绔� 2宸蹭笂浼犳壒鍗� 3閫�鍥炵敵璇� (寰呯缃�) 4閫�鍥炵敵璇� (宸茬绔�) 5骞冲彴鍚屾剰锛堝凡閫�鍥烇級 6宸插叧闂� ")
+ @ExcelColumn(name="鐘舵�� 0寰呯缃� 1宸茬绔� 2宸蹭笂浼犳壒鍗� 3閫�鍥炵敵璇� (寰呯缃�) 4閫�鍥炵敵璇� (宸茬绔�) 5骞冲彴鍚屾剰锛堝凡閫�鍥烇級 6宸插叧闂� ")
private Integer status;
+
@ApiModelProperty(value = "鍦ㄧ嚎绛剧珷鍚堝悓鍙�")
private String signApplyNo;
@ApiModelProperty(value = "鏈熸湜淇濋櫓鐢熸晥璧锋湡")
@@ -180,7 +181,8 @@
- public TaxesInvoicingVO getTaxesInvoicingVO(){
+
+ public TaxesInvoicingVO toTaxesInvoicingVO(){
TaxesInvoicingVO taxesInvoicingVO = new TaxesInvoicingVO();
taxesInvoicingVO.setId(this.getId());
taxesInvoicingVO.setSolutionsName(this.getSolutionsName());
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java b/server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java
index bc00a59..1b0929c 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/DuWorktype.java
@@ -71,6 +71,7 @@
@ApiModelProperty(value = "瑙嗛璧勬枡鍦板潃")
@ExcelColumn(name="瑙嗛璧勬枡鍦板潃")
private String videoUrl;
+
@ApiModelProperty(value = "娲鹃仯鍗曚綅缂栫爜锛堝叧鑱攄ispatch_unit", example = "1")
@ExcelColumn(name="娲鹃仯鍗曚綅缂栫爜锛堝叧鑱攄ispatch_unit")
private Integer dispatchUnitId;
diff --git a/server/service/src/main/java/com/doumee/dao/business/model/Taxes.java b/server/service/src/main/java/com/doumee/dao/business/model/Taxes.java
index a676f7c..aeabdaa 100644
--- a/server/service/src/main/java/com/doumee/dao/business/model/Taxes.java
+++ b/server/service/src/main/java/com/doumee/dao/business/model/Taxes.java
@@ -139,11 +139,11 @@
@ApiModelProperty(value = "鍐茬孩澶囨敞")
@ExcelColumn(name="鍐茬孩澶囨敞")
- private String delIInfo;
+ private String delInfo;
@ApiModelProperty(value = "鍐茬孩鎿嶄綔浜哄憳缂栫爜", example = "1")
@ExcelColumn(name="鍐茬孩鎿嶄綔浜哄憳缂栫爜")
- private Integer delUserId;
+ private Integer delUerId;
@ApiModelProperty(value = "鍗曟嵁鐢宠缂栫爜锛堝叧鑱攊nsurance_apply锛�", example = "1")
@ExcelColumn(name="鍗曟嵁鐢宠缂栫爜锛堝叧鑱攊nsurance_apply锛�")
diff --git a/server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java b/server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java
index 20a5497..9dc8982 100644
--- a/server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java
+++ b/server/service/src/main/java/com/doumee/service/business/InsuranceApplyService.java
@@ -122,7 +122,7 @@
Integer editBaoxiandan(InsuranceApply param);
- void updateApplyCurrentFee();
+ void updateApplyCurrentFee(Integer id);
String getSignLink(Integer id);
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java
index 1176be3..47cc01f 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChagneDetailServiceImpl.java
@@ -172,7 +172,7 @@
queryWrapper.selectAs(Member::getName,ApplyChagneDetail::getMemberName);
ApplyDetailPageDTO applyDetailPageDTO = pageWrap.getModel();
queryWrapper.exists(!Objects.isNull(applyDetailPageDTO.getApplyId()),
- " select 1 from apply_change ac where ac.isdeleted = 0 and ac.status in (1,2) and ac.applyId = "+applyDetailPageDTO.getApplyId()+" and ac.id = t.apply_change_id ");
+ " select 1 from apply_change ac where ac.isdeleted = 0 and ac.status in (1,2) and ac.apply_id = "+applyDetailPageDTO.getApplyId()+" and ac.id = t.apply_change_id ");
//鍦ㄤ繚
queryWrapper.le(!Objects.isNull(applyDetailPageDTO.getApplyStatus())
&&applyDetailPageDTO.getApplyStatus().equals(Constants.ONE),
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 ad61a06..d74064d 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
@@ -525,8 +525,6 @@
}
this.saveApplyLog(applyChange,Constants.ApplyChangeLogStatus.UPLOAD,null);
-
-
return applyChange.getId();
}
@@ -539,7 +537,7 @@
applyLog.setIsdeleted(Constants.ZERO);
applyLog.setApplyId(applyChange.getApplyId());
applyLog.setTitle(applyChangeLogStatus.getName());
- applyLog.setContent(content);
+ applyLog.setContent(applyChangeLogStatus.getInfo().replace("${param}",content));
applyLog.setObjType(applyChangeLogStatus.getKey());
applyLog.setObjId( applyChange.getId());
applyLog.setStatus(applyChange.getStatus());
@@ -787,7 +785,10 @@
.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.eq(!Objects.isNull(model.getType()),ApplyChange::getType,model.getType())
- .eq(!Objects.isNull(model.getStatus()),ApplyChange::getStatus,model.getStatus())
+ .eq(!Objects.isNull(model.getStatus())&&!model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,model.getStatus())
+ .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,
+ Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey(),
+ Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
.eq(!Objects.isNull(model.getCompanyId()),InsuranceApply::getCompanyId,model.getCompanyId())
.eq(!Objects.isNull(model.getSolutionsId()),ApplyChange::getSolutionsId,model.getSolutionsId())
.ge(StringUtils.isNotBlank(model.getCreateDateS()),ApplyChange::getCreateDate, model.getCreateDateS()+" 00:00:00" )
@@ -828,7 +829,10 @@
.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId)
.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.eq(!Objects.isNull(model.getType()),ApplyChange::getType,model.getType())
- .eq(!Objects.isNull(model.getStatus()),ApplyChange::getStatus,model.getStatus())
+ .eq(!Objects.isNull(model.getStatus())&&!model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,model.getStatus())
+ .in(!Objects.isNull(model.getStatus())&&model.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey()),ApplyChange::getStatus,
+ Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey(),
+ Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
.eq(!Objects.isNull(model.getCompanyId()),InsuranceApply::getCompanyId,model.getCompanyId())
.eq(!Objects.isNull(model.getSolutionsId()),ApplyChange::getSolutionsId,model.getSolutionsId())
.ge(StringUtils.isNotBlank(model.getCreateDateS()),ApplyChange::getCreateDate, model.getCreateDateS()+" 00:00:00" )
@@ -868,16 +872,24 @@
throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"鏁版嵁宸插垹闄�,鏃犳硶杩涜璇ユ搷浣�");
}
Constants.ApplyChangeLogStatus applyChangeLogStatus = Constants.ApplyChangeLogStatus.RETURN_APPLY;
- if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())
- ||applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
+
+ if(applyChangeOptDTO.getOptType().equals(3)){
//鍙戣捣閫�鍥炵敵璇�
if(loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
}
- if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.UPLOAD.getKey()) ){
- throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
+ if(!(applyChange.getStatus().equals(Constants.ApplyChangeStatus.UPLOAD.getKey())
+ || applyChange.getStatus().equals(Constants.ApplyChangeStatus.SIGNATURE.getKey()))){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘閫�鍥炵敵璇�!");
}
- }else if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){
+
+ if(applyChange.getStatus().equals(Constants.ApplyChangeStatus.UPLOAD.getKey())){
+ applyChange.setStatus(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey());
+ }else{
+ applyChange.setStatus(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey());
+ }
+
+ }else if(applyChangeOptDTO.getOptType().equals(4)){
applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_AGREE;
//骞冲彴鍚屾剰閫�鍥�
if(loginUserInfo.getType().equals(Constants.ZERO)){
@@ -888,7 +900,7 @@
)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
}
- }else if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.UPLOAD.getKey())){
+ }else if(applyChangeOptDTO.getOptType().equals(5)){
applyChangeLogStatus = Constants.ApplyChangeLogStatus.PLATFORM_UN_AGREE;
//骞冲彴椹冲洖閫�鍥�
if(loginUserInfo.getType().equals(Constants.ZERO)){
@@ -899,21 +911,29 @@
)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
}
- }else if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.CLOSE.getKey())){
- applyChangeLogStatus = Constants.ApplyChangeLogStatus.CLOSE;
+ if(applyChange.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())){
+ applyChange.setStatus(Constants.ApplyChangeStatus.UPLOAD.getKey());
+ }else{
+ applyChange.setStatus(Constants.ApplyChangeStatus.SIGNATURE.getKey());
+ }
+ }else if(applyChangeOptDTO.getOptType().equals(6)){
//浼佷笟鍏抽棴
+ applyChangeLogStatus = Constants.ApplyChangeLogStatus.CLOSE;
if(loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
}
if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
}
+ applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey());
}else{
throw new BusinessException(ResponseStatus.BAD_REQUEST );
}
- applyChange.setStatus(applyChangeOptDTO.getOptType());
+ applyChange.setEditor(loginUserInfo.getId());
+ applyChange.setEditDate(new Date());
applyChangeMapper.updateById(applyChange);
-// //瀛樺偍鏃ュ織鏁版嵁
+
+ //瀛樺偍鏃ュ織鏁版嵁
this.saveApplyLog(applyChange,applyChangeLogStatus,applyChangeOptDTO.getOptIllustration());
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
index 09930a0..e88c688 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
@@ -349,6 +349,7 @@
duWorktype.setDuSolutionId(duSolution.getId());
duWorktype.setStatus(Constants.ZERO);
duWorktype.setSortnum(j);
+ duWorktype.setDispatchUnitId(dispatchUnit.getId());
duWorktype.setWorkTypeId(saveDuWorkTypeDTO.getWorkTypeId());
duWorktype.setVideoUrl(saveDuWorkTypeDTO.getVideoUrl());
duWorktype.setStatus2(Constants.ZERO);
@@ -481,6 +482,7 @@
duWorktype.setDuSolutionId(duSolution.getId());
duWorktype.setStatus(Constants.ZERO);
duWorktype.setSortnum(duWorkTypeNum + j);
+ duWorktype.setDispatchUnitId(saveDispatchUnitDTO.getId());
duWorktype.setWorkTypeId(saveDuWorkTypeDTO.getWorkTypeId());
duWorktype.setVideoUrl(saveDuWorkTypeDTO.getVideoUrl());
duWorktype.setStatus2(Constants.ZERO);
@@ -847,19 +849,6 @@
@Override
public List<DispatchUnit> findByDTO(DispatchUnitQueryDTO dispatchUnitQueryDTO) {
LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
-// List<DispatchUnit> dispatchUnitList = dispatchUnitMapper.selectList(new QueryWrapper<DispatchUnit>().lambda()
-// .eq(DispatchUnit::getIsdeleted,Constants.ZERO)
-// .eq(loginUserInfo.getType().equals(Constants.ONE),DispatchUnit::getCompanyId,loginUserInfo.getCompanyId())
-// .eq(DispatchUnit::getStatus,Constants.ZERO)
-// .eq(DispatchUnit::getDataType,dispatchUnitQueryDTO.getDataType())
-// .apply(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()), " id in ( select d.dispatch_unit_id from du_solution d where d.solution_id = "+dispatchUnitQueryDTO.getSolutionId()+" ) " )
-// .exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),
-// " select 1 from apply_detail ad where ad.isdeleted = 0 and ad.apply_id = "+dispatchUnitQueryDTO.getApplyId()+" " +
-// " ad.du_id = t.id ")
-// .orderByAsc(DispatchUnit::getSortnum)
-// );
-
-
List<DispatchUnit> dispatchUnitList = dispatchUnitJoinMapper.selectJoinList(DispatchUnit.class,
new MPJLambdaWrapper<DispatchUnit>().selectAll(DispatchUnit.class)
.selectAs(DuSolution::getId,DispatchUnit::getDuSolutionId)
@@ -871,10 +860,8 @@
.eq(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()),DuSolution::getSolutionId,dispatchUnitQueryDTO.getSolutionId())
.exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),
" select 1 from apply_detail ad where ad.isdeleted = 0 and ad.apply_id = "+dispatchUnitQueryDTO.getApplyId()+" " +
- " ad.du_id = t.id ")
+ " and ad.du_id = t.id ")
);
-
-
return dispatchUnitList;
}
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 072eaa4..b3c53e3 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
@@ -1231,12 +1231,13 @@
*/
@Override
@Transactional(rollbackFor = {Exception.class})
- public void updateApplyCurrentFee(){
+ public void updateApplyCurrentFee(Integer id){
List<InsuranceApply> insuranceApplyList = insuranceApplyMapper.selectList(new QueryWrapper<InsuranceApply>().lambda()
.eq(InsuranceApply::getIsdeleted,Constants.ZERO)
.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
- .ge(InsuranceApply::getStartTime,DateUtil.getDate(new Date(),"yyyy-MM-dd") + " 00:00:00")
- .le(InsuranceApply::getEndTime,DateUtil.getDate(new Date(),"yyyy-MM-dd") + " 23:59:59")
+ .eq(!Objects.isNull(id),InsuranceApply::getId,id)
+ .le(InsuranceApply::getStartTime,DateUtil.getDate(new Date(),"yyyy-MM-dd") + " 00:00:00")
+ .ge(InsuranceApply::getEndTime,DateUtil.getDate(new Date(),"yyyy-MM-dd") + " 23:59:59")
);
if(CollectionUtils.isNotEmpty(insuranceApplyList)){
@@ -1249,8 +1250,17 @@
List<ApplyDetail> applyDetailList = applyDetailMapper.selectList(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId()));
if(CollectionUtils.isNotEmpty(applyDetailList)){
for (ApplyDetail applyDetail: applyDetailList) {
- applyDetail.setCurrentFee(Constants.countDetailFee(solutions,new Date(),applyDetail.getStartTime()));
- applyDetailMapper.updateById(applyDetail);
+ //2024-1-30 10:04:24 淇敼 鏍规嵁瀹為檯澶╂暟杩涜璁$畻 褰撳墠璐圭敤 鎬婚噾棰�/鎬诲ぉ鏁�*瀹為檯澶╂暟
+ Integer maxDays = DateUtil.calculateBetween(applyDetail.getStartTime(),applyDetail.getEndTime(),0) + 1 ;
+ BigDecimal fee = applyDetail.getFee();
+ if(applyDetail.getStartTime().compareTo(new Date()) <= 0 && applyDetail.getEndTime().compareTo(new Date()) >= 0 ){
+ Integer days = DateUtil.calculateBetween(applyDetail.getStartTime(),new Date(),0) + 1 ;
+ applyDetail.setCurrentFee(fee.divide(BigDecimal.valueOf(maxDays),2, BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(days)));
+ applyDetailMapper.updateById(applyDetail);
+ }
+// DateUtil.daysBetweenDates(applyDetail.getEndTime(),applyDetail.getStartTime());
+// applyDetail.setCurrentFee(Constants.countDetailFee(solutions,new Date(),applyDetail.getStartTime()));
+// applyDetailMapper.updateById(applyDetail);
sumAmount = sumAmount.add(applyDetail.getCurrentFee());
}
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
index ce9af65..faa93b4 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -422,23 +422,6 @@
.eq(CompanySolution::getCompanyId,user.getCompanyId())
.orderByAsc(Solutions::getSortnum)
);
-
-// solutionsList.forEach(i->{
-// //淇濋櫓鏃堕棿鍗曚綅 涓� 鏈�灏忔姇淇濆懆鏈熸椂闂村崟浣� 瑙勫垯鐩稿悓 鎴栬�� 鏈�灏忔姇淇濆懆鏈熸椂闂村崟浣� 瑙勫垯涓� 澶╂椂 榛樿閲戦
-// if(i.getTimeUnit().equals(i.getInsureCycleUnit())||i.getInsureCycleUnit().equals(Constants.ZERO)){
-// i.setCyclePrice(i.getPrice());
-// }else{
-// if(i.getInsureCycleUnit().equals(Constants.ONE)){
-// //鏈�灏忔姇淇濆懆鏈熸椂闂村崟浣嶄负鍗婃湀
-// i.setCyclePrice(i.getPrice().multiply(new BigDecimal(15)));
-// }else if(i.getInsureCycleUnit().equals(Constants.TWO)){
-// //鏈�灏忔姇淇濆懆鏈熸椂闂村崟浣嶄负鏈� 鍒欒绠楀綋鏈堝灏戝ぉ
-// if( ){
-//
-// }
-// }
-// }
-// });
return solutionsList;
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
index 34b0053..c47c44b 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -472,6 +472,7 @@
.selectAll(InsuranceApply.class)
.selectAs(Solutions::getName,InsuranceApply::getSolutionsName)
.select(" ( select count(1) from apply_detail ad where ad.apply_id = t.id ) as insureNum")
+ .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId)
.notExists(" select 1 from taxes t1 inner join tax_detial t2 on t1.id = t2.tax_id where t2.type = 0 and t1.status != 2 and t.id = t2.INSURANCE_APPLY_ID ")
.eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
.eq(InsuranceApply::getId,id)
@@ -495,7 +496,7 @@
if(CollectionUtils.isNotEmpty(applyChangeList)){
for (ApplyChange applyChange:applyChangeList) {
insuranceApply.setFee(insuranceApply.getFee().subtract(applyChange.getFee()));
- TaxesInvoicingVO taxesInvoicingVO = applyChange.getTaxesInvoicingVO();
+ TaxesInvoicingVO taxesInvoicingVO = applyChange.toTaxesInvoicingVO();
if(!Objects.isNull(insuranceApply)){
taxesInvoicingVO.setAmount(BigDecimal.ZERO);
}
@@ -521,7 +522,7 @@
|| Objects.isNull(directInvoicingDTO.getInvoicingMoney())
|| Objects.isNull(directInvoicingDTO.getType())
|| Objects.isNull(directInvoicingDTO.getInvoicingDetailDTOList())
- || StringUtils.isNotBlank(directInvoicingDTO.getAddress())
+ || StringUtils.isBlank(directInvoicingDTO.getAddress())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java
index 1865c45..ec13e9d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/WorktypeServiceImpl.java
@@ -106,6 +106,8 @@
"id in ( select sw.worktype_id from solution_worktype sw where sw.SOLUTION_ID = "+workTypeQueryDTO.getId()+" )")
.apply(workTypeQueryDTO.getQueryType().equals(Constants.ONE),
"id in ( select dw.work_type_id from du_worktype dw where dw.du_solution_id = "+workTypeQueryDTO.getId()+" )")
+ .apply(workTypeQueryDTO.getQueryType().equals(Constants.TWO),
+ "id in ( select dw.WORKTYPE_ID from apply_detail dw where dw.APPLY_ID = "+workTypeQueryDTO.getId()+" )")
);
return list;
}
--
Gitblit v1.9.3