From 2dc99591704a4c2f479b4bf858fccd0611dedc2b Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 05 二月 2025 15:19:06 +0800
Subject: [PATCH] 开发更新
---
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java | 81 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 78 insertions(+), 3 deletions(-)
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
index 3fd42c7..1d6d9d6 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java
@@ -2,14 +2,19 @@
import com.doumee.api.BaseController;
import com.doumee.config.annotation.CloudRequiredPermission;
+import com.doumee.config.annotation.LoginNoRequired;
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.core.utils.Constants;
+import com.doumee.dao.business.dto.YwSmsEmailBillCallDTO;
import com.doumee.dao.business.model.YwContractBill;
+import com.doumee.dao.business.vo.YwContractBillCallDataVO;
+import com.doumee.dao.business.vo.YwContractBillDataVO;
import com.doumee.service.business.YwContractBillService;
+import com.doumee.service.business.impl.SmsEmailServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,11 +36,15 @@
@Autowired
private YwContractBillService ywContractBillService;
+ @Autowired
+ private SmsEmailServiceImpl smsEmailService;
+
@PreventRepeat
@ApiOperation("鏂板缓")
@PostMapping("/create")
@CloudRequiredPermission("business:ywcontractbill:create")
public ApiResponse create(@RequestBody YwContractBill ywContractBill,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywContractBill.setLoginUserInfo(this.getLoginUser(token));
return ApiResponse.success(ywContractBillService.create(ywContractBill));
}
@@ -43,7 +52,7 @@
@GetMapping("/delete/{id}")
@CloudRequiredPermission("business:ywcontractbill:delete")
public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
- ywContractBillService.deleteById(id);
+ ywContractBillService.deleteById(id,this.getLoginUser(token));
return ApiResponse.success(null);
}
@@ -56,7 +65,7 @@
for (String id : idArray) {
idList.add(Integer.valueOf(id));
}
- ywContractBillService.deleteByIdInBatch(idList);
+ ywContractBillService.deleteByIdInBatch(idList,this.getLoginUser(token));
return ApiResponse.success(null);
}
@@ -64,6 +73,7 @@
@PostMapping("/updateById")
@CloudRequiredPermission("business:ywcontractbill:update")
public ApiResponse updateById(@RequestBody YwContractBill ywContractBill,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywContractBill.setLoginUserInfo(this.getLoginUser(token));
ywContractBillService.updateById(ywContractBill);
return ApiResponse.success(null);
}
@@ -72,13 +82,34 @@
@PostMapping("/page")
@CloudRequiredPermission("business:ywcontractbill:query")
public ApiResponse<PageData<YwContractBill>> findPage (@RequestBody PageWrap<YwContractBill> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
return ApiResponse.success(ywContractBillService.findPage(pageWrap));
}
+
+
+ @ApiOperation("閫炬湡璐﹀崟")
+ @PostMapping("/findPageForOverdue")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse<PageData<YwContractBill>> findPageForOverdue (@RequestBody PageWrap<YwContractBill> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
+ return ApiResponse.success(ywContractBillService.findPageForOverdue(pageWrap));
+ }
+
+
+ @ApiOperation("鍙��娆捐处鍗�")
+ @PostMapping("/getCanBackBill")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse<List<YwContractBill>> getCanBackBill (@RequestBody YwContractBill ywContractBill,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ return ApiResponse.success(ywContractBillService.getCanBackBill(ywContractBill));
+ }
+
+
@ApiOperation("瀵煎嚭Excel")
@PostMapping("/exportExcel")
@CloudRequiredPermission("business:ywcontractbill:exportExcel")
public void exportExcel (@RequestBody PageWrap<YwContractBill> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
ExcelExporter.build(YwContractBill.class).export(ywContractBillService.findPage(pageWrap).getRecords(), "杩愮淮鍚堝悓璐﹀崟淇℃伅琛�", response);
}
@@ -86,6 +117,50 @@
@GetMapping("/{id}")
@CloudRequiredPermission("business:ywcontractbill:query")
public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
- return ApiResponse.success(ywContractBillService.findById(id));
+ return ApiResponse.success(ywContractBillService.getDetail(id));
}
+
+
+ @LoginNoRequired
+ @ApiOperation("鐢熸垚璐﹀崟缂栧彿")
+ @GetMapping("/dealDayBillCode")
+ public ApiResponse dealDayBillCode() {
+ ywContractBillService.dealDayBillCode();
+ return ApiResponse.success("鐢熸垚鎴愬姛");
+ }
+
+ @ApiOperation("鑾峰彇寰呭鐞嗚处鍗�")
+ @GetMapping("/getWaitDealList")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse<YwContractBillDataVO> getWaitDealList(@RequestParam Integer contractId,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ return ApiResponse.success(ywContractBillService.getWaitDealList(contractId));
+ }
+
+
+ @ApiOperation("鑾峰彇鎵归噺鍌即鏁版嵁")
+ @PostMapping("/getNoticeCustomerData")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse<List<YwContractBillCallDataVO>> getNoticeCustomerData(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ return ApiResponse.success(ywContractBillService.getNoticeCustomerData(billIds));
+ }
+
+
+ @ApiOperation("涓嬭浇鍌垂鏂囦欢")
+ @PostMapping("/downloadCallFeeDoc")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public void downloadCallFeeDoc(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token,HttpServletResponse response) {
+ ywContractBillService.downloadCallFeeDoc(billIds,getLoginUser(token),response);
+ }
+
+ @ApiOperation("鍙戦�佺煭淇′笌閭欢")
+ @PostMapping("/sendSmsEmail")
+ @CloudRequiredPermission("business:ywcontractbill:query")
+ public ApiResponse sendSmsEmail(@RequestBody List<YwSmsEmailBillCallDTO> ywSmsEmailBillCallDTOList, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+ ywContractBillService.sendSmsEmail(ywSmsEmailBillCallDTOList,smsEmailService,getLoginUser(token));
+ return ApiResponse.success(null);
+ }
+
+
+
+
}
--
Gitblit v1.9.3