From 07c1ebfe7589fd68363a9cb72301359f953658d3 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 10 一月 2025 17:57:32 +0800
Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
---
server/db/business.yw_temp_config.permissions.sql | 6
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/YwTempConfigMapper.java | 13 +
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwTempConfig.java | 67 +++++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwCallTempDataVO.java | 39 +++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java | 15 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwTempConfigService.java | 101 +++++++
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwContractBillCloudController.java | 19 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwTempConfigServiceImpl.java | 191 ++++++++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java | 128 +++++++++
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java | 9
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwContractBillCallDataVO.java | 33 ++
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwTempConfigCloudController.java | 103 +++++++
12 files changed, 723 insertions(+), 1 deletions(-)
diff --git a/server/db/business.yw_temp_config.permissions.sql b/server/db/business.yw_temp_config.permissions.sql
new file mode 100644
index 0000000..2e1d879
--- /dev/null
+++ b/server/db/business.yw_temp_config.permissions.sql
@@ -0,0 +1,6 @@
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:create', '鏂板缓鍌即淇℃伅閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:delete', '鍒犻櫎鍌即淇℃伅閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:update', '淇敼鍌即淇℃伅閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:query', '鏌ヨ鍌即淇℃伅閰嶇疆', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:ywtempconfig:exportExcel', '瀵煎嚭鍌即淇℃伅閰嶇疆(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0);
+
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 ca58ec1..8d6816a 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
@@ -10,6 +10,7 @@
import com.doumee.core.model.PageWrap;
import com.doumee.core.utils.Constants;
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 io.swagger.annotations.Api;
@@ -80,6 +81,16 @@
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")
@@ -120,4 +131,12 @@
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));
+ }
+
}
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwTempConfigCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwTempConfigCloudController.java
new file mode 100644
index 0000000..8d9a5d0
--- /dev/null
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwTempConfigCloudController.java
@@ -0,0 +1,103 @@
+package com.doumee.cloud.admin;
+
+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.PageWrap;
+import com.doumee.core.model.PageData;
+import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.model.YwTempConfig;
+import com.doumee.dao.business.vo.YwCallTempDataVO;
+import com.doumee.service.business.YwTempConfigService;
+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 2025/01/10 09:43
+ */
+@Api(tags = "鍌即淇℃伅閰嶇疆")
+@RestController
+@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywTempConfig")
+public class YwTempConfigCloudController extends BaseController {
+
+ @Autowired
+ private YwTempConfigService ywTempConfigService;
+
+ @PreventRepeat
+ @ApiOperation("鏂板缓")
+ @PostMapping("/create")
+ @RequiresPermissions("business:ywtempconfig:create")
+ public ApiResponse create(@RequestBody YwTempConfig ywTempConfig) {
+ return ApiResponse.success(ywTempConfigService.create(ywTempConfig));
+ }
+
+ @ApiOperation("鏍规嵁ID鍒犻櫎")
+ @GetMapping("/delete/{id}")
+ @RequiresPermissions("business:ywtempconfig:delete")
+ public ApiResponse deleteById(@PathVariable Integer id) {
+ ywTempConfigService.deleteById(id);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鎵归噺鍒犻櫎")
+ @GetMapping("/delete/batch")
+ @RequiresPermissions("business:ywtempconfig:delete")
+ public ApiResponse deleteByIdInBatch(@RequestParam String ids) {
+ String [] idArray = ids.split(",");
+ List<Integer> idList = new ArrayList<>();
+ for (String id : idArray) {
+ idList.add(Integer.valueOf(id));
+ }
+ ywTempConfigService.deleteByIdInBatch(idList);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鏍规嵁ID淇敼")
+ @PostMapping("/updateById")
+ @RequiresPermissions("business:ywtempconfig:update")
+ public ApiResponse updateById(@RequestBody YwTempConfig ywTempConfig) {
+ ywTempConfigService.updateById(ywTempConfig);
+ return ApiResponse.success(null);
+ }
+
+ @ApiOperation("鍒嗛〉鏌ヨ")
+ @PostMapping("/page")
+ @RequiresPermissions("business:ywtempconfig:query")
+ public ApiResponse<PageData<YwTempConfig>> findPage (@RequestBody PageWrap<YwTempConfig> pageWrap) {
+ return ApiResponse.success(ywTempConfigService.findPage(pageWrap));
+ }
+
+ @ApiOperation("瀵煎嚭Excel")
+ @PostMapping("/exportExcel")
+ @RequiresPermissions("business:ywtempconfig:exportExcel")
+ public void exportExcel (@RequestBody PageWrap<YwTempConfig> pageWrap, HttpServletResponse response) {
+ ExcelExporter.build(YwTempConfig.class).export(ywTempConfigService.findPage(pageWrap).getRecords(), "鍌即淇℃伅閰嶇疆", response);
+ }
+
+ @ApiOperation("鏍规嵁ID鏌ヨ")
+ @GetMapping("/{id}")
+ @RequiresPermissions("business:ywtempconfig:query")
+ public ApiResponse findById(@PathVariable Integer id) {
+ return ApiResponse.success(ywTempConfigService.findById(id));
+ }
+
+
+ @ApiOperation("鏍规嵁ID鏌ヨ")
+ @GetMapping("/getCallTemp")
+ @RequiresPermissions("business:ywtempconfig:query")
+ public ApiResponse<YwCallTempDataVO> getCallTemp() {
+ return ApiResponse.success(ywTempConfigService.getCallTemp());
+ }
+
+
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/YwTempConfigMapper.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/YwTempConfigMapper.java
new file mode 100644
index 0000000..0d6d9bf
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/YwTempConfigMapper.java
@@ -0,0 +1,13 @@
+package com.doumee.dao.business;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.doumee.dao.business.model.YwTempConfig;
+import com.github.yulichang.base.MPJBaseMapper;
+
+/**
+ * @author 姹熻箘韫�
+ * @date 2025/01/10 09:43
+ */
+public interface YwTempConfigMapper extends MPJBaseMapper<YwTempConfig> {
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
index 1d28bbf..9579cc6 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
@@ -148,6 +148,15 @@
@TableField(exist = false)
private String customerName;
+ @ApiModelProperty(value = "瀹㈡埛榛樿鑱旂郴浜�", example = "1")
+ @TableField(exist = false)
+ private Integer customerUserId;
+
+ @ApiModelProperty(value = "瀹㈡埛涓婚敭", example = "1")
+ @TableField(exist = false)
+ private Integer customerId;
+
+
@ApiModelProperty(value = "鍏徃鍚嶇О", example = "1")
@TableField(exist = false)
private String companyName;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwTempConfig.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwTempConfig.java
new file mode 100644
index 0000000..2e9eea1
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwTempConfig.java
@@ -0,0 +1,67 @@
+package com.doumee.dao.business.model;
+
+import com.doumee.core.annotation.excel.ExcelColumn;
+import com.doumee.core.model.LoginUserModel;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.Date;
+
+/**
+ * 鍌即淇℃伅閰嶇疆
+ * @author 姹熻箘韫�
+ * @date 2025/01/10 09:43
+ */
+@Data
+@ApiModel("鍌即淇℃伅閰嶇疆")
+@TableName("`yw_temp_config`")
+public class YwTempConfig extends LoginUserModel {
+
+ @TableId(type = IdType.AUTO)
+ @ApiModelProperty(value = "涓婚敭", example = "1")
+ @ExcelColumn(name="涓婚敭")
+ private Integer id;
+
+ @ApiModelProperty(value = "鍒涘缓浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鍒涘缓浜虹紪鐮�")
+ private Integer creator;
+
+ @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+ @ExcelColumn(name="鍒涘缓鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date createDate;
+
+ @ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
+ @ExcelColumn(name="鏇存柊浜虹紪鐮�")
+ private Integer editor;
+
+ @ApiModelProperty(value = "鏇存柊鏃堕棿")
+ @ExcelColumn(name="鏇存柊鏃堕棿")
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ private Date editDate;
+
+ @ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
+ @ExcelColumn(name="鏄惁鍒犻櫎0鍚� 1鏄�")
+ private Integer isdeleted;
+
+ @ApiModelProperty(value = "澶囨敞")
+ @ExcelColumn(name="澶囨敞")
+ private String remark;
+
+ @ApiModelProperty(value = "绫诲瀷锛�0=鐭伅妯℃澘锛�1=閭欢妯℃澘锛�2=绉熻祦閫氱煡闄勪欢锛�3=鍏朵粬閫氱煡闄勪欢锛�4=璐﹀崟鍏抽敭瀛楋紱5=鍚堝悓鍏抽敭瀛楋紱6=鍏朵粬淇℃伅锛�", example = "1")
+ @ExcelColumn(name="绫诲瀷锛�0=鐭伅妯℃澘锛�1=閭欢妯℃澘锛�2=绉熻祦閫氱煡闄勪欢锛�3=鍏朵粬閫氱煡闄勪欢锛�4=璐﹀崟鍏抽敭瀛楋紱5=鍚堝悓鍏抽敭瀛楋紱6=鍏朵粬淇℃伅锛�")
+ private Integer type;
+
+ @ApiModelProperty(value = "鏍囬")
+ @ExcelColumn(name="鏍囬")
+ private String title;
+
+ @ApiModelProperty(value = "鏂囦欢鍦板潃 type = 2/3浣跨敤")
+ @ExcelColumn(name="鏂囦欢鍦板潃 type = 2/3浣跨敤")
+ private String url;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwCallTempDataVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwCallTempDataVO.java
new file mode 100644
index 0000000..328badf
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwCallTempDataVO.java
@@ -0,0 +1,39 @@
+package com.doumee.dao.business.vo;
+
+import com.doumee.dao.business.model.YwTempConfig;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2025/1/8 15:32
+ */
+@Data
+public class YwCallTempDataVO {
+
+ @ApiModelProperty(value = "鐭伅妯℃澘", example = "1")
+ private YwTempConfig smsTemp;
+
+ @ApiModelProperty(value = "閭欢淇℃伅妯℃澘", example = "1")
+ private YwTempConfig emailTemp;
+
+ @ApiModelProperty(value = "绉熻祦閫氱煡鍗曟ā鏉�", example = "1")
+ private YwTempConfig leaseTemp;
+
+ @ApiModelProperty(value = "鍏朵粬閫氱煡鍗曟ā鏉�", example = "1")
+ private YwTempConfig otherTemp;
+
+ @ApiModelProperty(value = "妯℃澘鍏抽敭瀛� - 璐﹀崟", example = "1")
+ private List<YwTempConfig> billTempList;
+
+ @ApiModelProperty(value = "妯℃澘鍏抽敭瀛� - 鍚堝悓", example = "1")
+ private List<YwTempConfig> contractTempList;
+
+ @ApiModelProperty(value = "妯℃澘鍏抽敭瀛� - 鍏朵粬", example = "1")
+ private List<YwTempConfig> otherTempList;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwContractBillCallDataVO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwContractBillCallDataVO.java
new file mode 100644
index 0000000..99be349
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/vo/YwContractBillCallDataVO.java
@@ -0,0 +1,33 @@
+package com.doumee.dao.business.vo;
+
+import com.doumee.dao.business.model.Member;
+import com.doumee.dao.business.model.YwContractBill;
+import com.doumee.dao.business.model.YwCustomer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2025/1/8 15:32
+ */
+@Data
+public class YwContractBillCallDataVO {
+
+ @ApiModelProperty(value = "璐﹀崟涓婚敭", example = "1")
+ private Integer billId;
+
+ @ApiModelProperty(value = "瀹㈡埛鍚嶇О", example = "1")
+ private String customerName;
+
+ @ApiModelProperty(value = "榛樿鑱旂郴浜轰富閿�", example = "1")
+ private Integer userId;
+
+ @ApiModelProperty(value = "鑱旂郴浜哄垪琛�", example = "1")
+ private List<Member> memberList;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
index b3ad156..7880767 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwContractBillService.java
@@ -4,6 +4,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.YwContractBill;
+import com.doumee.dao.business.vo.YwContractBillCallDataVO;
import com.doumee.dao.business.vo.YwContractBillDataVO;
import java.util.List;
@@ -91,6 +92,13 @@
PageData<YwContractBill> findPage(PageWrap<YwContractBill> pageWrap);
/**
+ * 閫炬湡璐﹀崟鍒嗛〉
+ * @param pageWrap
+ * @return
+ */
+ PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap);
+
+ /**
* 鏉′欢缁熻
*
* @param ywContractBill 瀹炰綋瀵硅薄
@@ -107,6 +115,11 @@
List<YwContractBill> getCanBackBill(YwContractBill model);
-
YwContractBillDataVO getWaitDealList(Integer contractId);
+
+ List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds);
+
+
+
+
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwTempConfigService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwTempConfigService.java
new file mode 100644
index 0000000..5a967f9
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwTempConfigService.java
@@ -0,0 +1,101 @@
+package com.doumee.service.business;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.model.YwTempConfig;
+import com.doumee.dao.business.vo.YwCallTempDataVO;
+
+import java.util.List;
+
+/**
+ * 鍌即淇℃伅閰嶇疆Service瀹氫箟
+ * @author 姹熻箘韫�
+ * @date 2025/01/10 09:43
+ */
+public interface YwTempConfigService {
+
+ /**
+ * 鍒涘缓
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ * @return Integer
+ */
+ Integer create(YwTempConfig ywTempConfig);
+
+ /**
+ * 涓婚敭鍒犻櫎
+ *
+ * @param id 涓婚敭
+ */
+ void deleteById(Integer id);
+
+ /**
+ * 鍒犻櫎
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ */
+ void delete(YwTempConfig ywTempConfig);
+
+ /**
+ * 鎵归噺涓婚敭鍒犻櫎
+ *
+ * @param ids 涓婚敭闆�
+ */
+ void deleteByIdInBatch(List<Integer> ids);
+
+ /**
+ * 涓婚敭鏇存柊
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ */
+ void updateById(YwTempConfig ywTempConfig);
+
+ /**
+ * 鎵归噺涓婚敭鏇存柊
+ *
+ * @param ywTempConfigs 瀹炰綋闆�
+ */
+ void updateByIdInBatch(List<YwTempConfig> ywTempConfigs);
+
+ /**
+ * 涓婚敭鏌ヨ
+ *
+ * @param id 涓婚敭
+ * @return YwTempConfig
+ */
+ YwTempConfig findById(Integer id);
+
+ /**
+ * 鏉′欢鏌ヨ鍗曟潯璁板綍
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ * @return YwTempConfig
+ */
+ YwTempConfig findOne(YwTempConfig ywTempConfig);
+
+ /**
+ * 鏉′欢鏌ヨ
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ * @return List<YwTempConfig>
+ */
+ List<YwTempConfig> findList(YwTempConfig ywTempConfig);
+
+ /**
+ * 鍒嗛〉鏌ヨ
+ *
+ * @param pageWrap 鍒嗛〉瀵硅薄
+ * @return PageData<YwTempConfig>
+ */
+ PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap);
+
+ /**
+ * 鏉′欢缁熻
+ *
+ * @param ywTempConfig 瀹炰綋瀵硅薄
+ * @return long
+ */
+ long count(YwTempConfig ywTempConfig);
+
+ YwCallTempDataVO getCallTemp();
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
index a320b59..5d59968 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
@@ -7,9 +7,11 @@
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.*;
import com.doumee.dao.business.model.*;
+import com.doumee.dao.business.vo.YwContractBillCallDataVO;
import com.doumee.dao.business.vo.YwContractBillDataVO;
import com.doumee.dao.system.MultifileMapper;
import com.doumee.dao.system.model.Multifile;
@@ -55,6 +57,9 @@
@Autowired
private YwContractMapper ywContractMapper;
+
+ @Autowired
+ private MemberMapper memberMapper;
@@ -300,6 +305,10 @@
YwContractBill::getPayStatus,model.getPayStatus())
.eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()),
YwContractBill::getType,model.getType())
+ .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE),
+ YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime())
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE),
+ YwContractBill::getStatus, Constants.ZERO)
.eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()),
YwContractBill::getContractId,model.getContractId())
.like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getContractCode()),
@@ -325,6 +334,78 @@
}else{
ywContractBill.setIsOverdue(Constants.ZERO);
}
+ //妤煎畤鍚嶇О
+ List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList();
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){
+ StringBuilder roomPathName = new StringBuilder();
+ for (YwContractRoom ywContractRoom:ywContractRoomList) {
+ if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){
+ roomPathName.append(ywContractRoom.getProjectName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){
+ roomPathName.append(ywContractRoom.getBuildingName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){
+ roomPathName.append(ywContractRoom.getFloorName()+"/");
+ }
+ if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){
+ roomPathName.append(ywContractRoom.getRoomName());
+ }
+ if(StringUtils.isNotBlank(roomPathName)){
+ roomPathName.append(";");
+ }
+ }
+ ywContractBill.setRoomPathName(roomPathName.toString());
+ }
+ }
+
+ return PageData.from(iPage);
+ }
+
+ /**
+ * 閫炬湡璐﹀崟
+ * @param pageWrap
+ * @return
+ */
+ @Override
+ public PageData<YwContractBill> findPageForOverdue(PageWrap<YwContractBill> pageWrap) {
+ IPage<YwContractBill> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+ MPJLambdaWrapper<YwContractBill> queryWrapper = new MPJLambdaWrapper<>();
+ Utils.MP.blankToNull(pageWrap.getModel());
+ YwContractBill model = pageWrap.getModel();
+ IPage<YwContractBill> iPage = ywContractBillMapper.selectJoinPage(page,YwContractBill.class,
+ queryWrapper.selectAll(YwContractBill.class)
+ .select(" ( select ifnull( sum( CASE WHEN t.bill_type = 0 and yw.REVENUE_TYPE = 0 THEN yw.ACT_RECEIVABLE_FEE when t.bill_type = 0 and yw.REVENUE_TYPE = 1 then -yw.ACT_RECEIVABLE_FEE when t.bill_type = 1 and yw.REVENUE_TYPE = 0 then -yw.ACT_RECEIVABLE_FEE else yw.ACT_RECEIVABLE_FEE END),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ")
+ .selectAs(YwContract::getCode,YwContractBill::getContractCode)
+ .selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
+ .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+ .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
+ .eq(YwContractBill::getIsdeleted,Constants.ZERO)
+ .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerName()),
+ YwCustomer::getName,model.getCustomerName())
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getStatus()),
+ YwContractBill::getStatus,model.getStatus())
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getBillType()),
+ YwContractBill::getBillType,model.getBillType())
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()),
+ YwContractBill::getPayStatus,model.getPayStatus())
+ .in(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()),
+ YwContractBill::getPayStatus,Constants.ZERO,Constants.THREE,Constants.TWO,Constants.FOUR)
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()),
+ YwContractBill::getType,model.getType())
+ .le(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE),
+ YwContractBill::getPlanPayDate, DateUtil.getCurrDateTime())
+ .eq(Objects.nonNull(model)&&Objects.nonNull(model.getIsOverdue())&&Constants.equalsInteger(model.getIsOverdue(),Constants.ONE),
+ YwContractBill::getStatus, Constants.ZERO)
+ .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateStart()),YwContractBill::getPlanPayDate, Utils.Date.getStart(model.getPlanPayDateStart()))
+ .le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getPlanPayDate, Utils.Date.getEnd(model.getPlanPayDateEnd()))
+ .orderByDesc(YwContractBill::getId));
+ this.dealRoomDetail(iPage.getRecords());
+ for (YwContractBill ywContractBill:iPage.getRecords()) {
+ //闇�鏀堕噾棰�
+ ywContractBill.setNeedReceivableFee(
+ ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee())
+ );
//妤煎畤鍚嶇О
List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList();
if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){
@@ -542,4 +623,51 @@
}
+
+
+ @Override
+ public List<YwContractBillCallDataVO> getNoticeCustomerData(List<Integer> billIds){
+ List<YwContractBillCallDataVO> ywContractBillCallDataVOList = new ArrayList<>();
+ List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>()
+ .selectAll(YwContractBill.class)
+ .selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
+ .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId)
+ .selectAs(YwCustomer::getId,YwContractBill::getCustomerId)
+ .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+ .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
+ .in(YwContractBill::getId,billIds)
+ );
+ if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractBillList) ||
+ !Constants.equalsInteger(billIds.size(),ywContractBillList.size())
+ ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璐﹀崟鏁版嵁閿欒锛岃鍒锋柊閲嶈瘯");
+ }
+ for (YwContractBill ywContractBill:ywContractBillList) {
+ YwContractBillCallDataVO ywContractBillCallDataVO = new YwContractBillCallDataVO();
+ ywContractBillCallDataVO.setBillId(ywContractBill.getId());
+ ywContractBillCallDataVO.setCustomerName(ywContractBill.getCustomerName());
+ ywContractBillCallDataVO.setUserId(ywContractBill.getCustomerUserId());
+ //鏌ヨ瀹㈡埛涓嬬殑鎵�鏈変汉鍛�
+ ywContractBillCallDataVO.setMemberList(
+ memberMapper.selectList(new QueryWrapper<Member>().lambda().eq(Member::getCustomerId,ywContractBill.getCustomerId())
+ .eq(Member::getIsdeleted,Constants.ZERO))
+ );
+ ywContractBillCallDataVOList.add(ywContractBillCallDataVO);
+ }
+ return ywContractBillCallDataVOList;
+ }
+
+
+ public void downloadCallFeeDoc(List<Integer> billIds){
+ List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>()
+ .selectAll(YwContractBill.class)
+ .selectAs(YwCustomer::getName,YwContractBill::getCustomerName)
+ .selectAs(YwCustomer::getUserId,YwContractBill::getCustomerUserId)
+ .selectAs(YwCustomer::getId,YwContractBill::getCustomerId)
+ .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+ .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId)
+ .in(YwContractBill::getId,billIds)
+ );
+ }
+
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwTempConfigServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwTempConfigServiceImpl.java
new file mode 100644
index 0000000..e3887f4
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwTempConfigServiceImpl.java
@@ -0,0 +1,191 @@
+package com.doumee.service.business.impl;
+
+import com.doumee.core.model.PageData;
+import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.Utils;
+import com.doumee.dao.business.YwTempConfigMapper;
+import com.doumee.dao.business.model.YwTempConfig;
+import com.doumee.dao.business.vo.YwCallTempDataVO;
+import com.doumee.service.business.YwTempConfigService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+/**
+ * 鍌即淇℃伅閰嶇疆Service瀹炵幇
+ * @author 姹熻箘韫�
+ * @date 2025/01/10 09:43
+ */
+@Service
+public class YwTempConfigServiceImpl implements YwTempConfigService {
+
+ @Autowired
+ private YwTempConfigMapper ywTempConfigMapper;
+
+ @Override
+ public Integer create(YwTempConfig ywTempConfig) {
+ ywTempConfigMapper.insert(ywTempConfig);
+ return ywTempConfig.getId();
+ }
+
+ @Override
+ public void deleteById(Integer id) {
+ ywTempConfigMapper.deleteById(id);
+ }
+
+ @Override
+ public void delete(YwTempConfig ywTempConfig) {
+ UpdateWrapper<YwTempConfig> deleteWrapper = new UpdateWrapper<>(ywTempConfig);
+ ywTempConfigMapper.delete(deleteWrapper);
+ }
+
+ @Override
+ public void deleteByIdInBatch(List<Integer> ids) {
+ if (CollectionUtils.isEmpty(ids)) {
+ return;
+ }
+ ywTempConfigMapper.deleteBatchIds(ids);
+ }
+
+ @Override
+ public void updateById(YwTempConfig ywTempConfig) {
+ ywTempConfigMapper.updateById(ywTempConfig);
+ }
+
+ @Override
+ public void updateByIdInBatch(List<YwTempConfig> ywTempConfigs) {
+ if (CollectionUtils.isEmpty(ywTempConfigs)) {
+ return;
+ }
+ for (YwTempConfig ywTempConfig: ywTempConfigs) {
+ this.updateById(ywTempConfig);
+ }
+ }
+
+ @Override
+ public YwTempConfig findById(Integer id) {
+ return ywTempConfigMapper.selectById(id);
+ }
+
+ @Override
+ public YwTempConfig findOne(YwTempConfig ywTempConfig) {
+ QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig);
+ return ywTempConfigMapper.selectOne(wrapper);
+ }
+
+ @Override
+ public List<YwTempConfig> findList(YwTempConfig ywTempConfig) {
+ QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig);
+ return ywTempConfigMapper.selectList(wrapper);
+ }
+
+ @Override
+ public PageData<YwTempConfig> findPage(PageWrap<YwTempConfig> pageWrap) {
+ IPage<YwTempConfig> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
+ QueryWrapper<YwTempConfig> queryWrapper = new QueryWrapper<>();
+ Utils.MP.blankToNull(pageWrap.getModel());
+ if (pageWrap.getModel().getId() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getId, pageWrap.getModel().getId());
+ }
+ if (pageWrap.getModel().getCreator() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getCreator, pageWrap.getModel().getCreator());
+ }
+ if (pageWrap.getModel().getCreateDate() != null) {
+ queryWrapper.lambda().ge(YwTempConfig::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate()));
+ queryWrapper.lambda().le(YwTempConfig::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate()));
+ }
+ if (pageWrap.getModel().getEditor() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getEditor, pageWrap.getModel().getEditor());
+ }
+ if (pageWrap.getModel().getEditDate() != null) {
+ queryWrapper.lambda().ge(YwTempConfig::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate()));
+ queryWrapper.lambda().le(YwTempConfig::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate()));
+ }
+ if (pageWrap.getModel().getIsdeleted() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getIsdeleted, pageWrap.getModel().getIsdeleted());
+ }
+ if (pageWrap.getModel().getRemark() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getRemark, pageWrap.getModel().getRemark());
+ }
+ if (pageWrap.getModel().getType() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getType, pageWrap.getModel().getType());
+ }
+ if (pageWrap.getModel().getTitle() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getTitle, pageWrap.getModel().getTitle());
+ }
+ if (pageWrap.getModel().getUrl() != null) {
+ queryWrapper.lambda().eq(YwTempConfig::getUrl, pageWrap.getModel().getUrl());
+ }
+ for(PageWrap.SortData sortData: pageWrap.getSorts()) {
+ if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
+ queryWrapper.orderByDesc(sortData.getProperty());
+ } else {
+ queryWrapper.orderByAsc(sortData.getProperty());
+ }
+ }
+ return PageData.from(ywTempConfigMapper.selectPage(page, queryWrapper));
+ }
+
+ @Override
+ public long count(YwTempConfig ywTempConfig) {
+ QueryWrapper<YwTempConfig> wrapper = new QueryWrapper<>(ywTempConfig);
+ return ywTempConfigMapper.selectCount(wrapper);
+ }
+
+
+
+ @Override
+ public YwCallTempDataVO getCallTemp(){
+ YwCallTempDataVO ywCallTempDataVO = new YwCallTempDataVO();
+ List<YwTempConfig> ywTempConfigList = ywTempConfigMapper.selectList(new QueryWrapper<YwTempConfig>().lambda()
+ .eq(YwTempConfig::getIsdeleted, Constants.ZERO));
+ Optional<YwTempConfig> smsOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),
+ Constants.ZERO)).findAny();
+ if (smsOptional.isPresent()) {
+ ywCallTempDataVO.setSmsTemp(smsOptional.get());
+ }
+ Optional<YwTempConfig> emailOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),
+ Constants.ONE)).findAny();
+ if (emailOptional.isPresent()) {
+ ywCallTempDataVO.setEmailTemp(emailOptional.get());
+ }
+ Optional<YwTempConfig> leaseOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),
+ Constants.TWO)).findAny();
+ if (leaseOptional.isPresent()) {
+ ywCallTempDataVO.setLeaseTemp(leaseOptional.get());
+ }
+ Optional<YwTempConfig> otherOptional = ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),
+ Constants.THREE)).findAny();
+ if (otherOptional.isPresent()) {
+ ywCallTempDataVO.setOtherTemp(otherOptional.get());
+ }
+ ywCallTempDataVO.setContractTempList(
+ ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FIVE)).collect(Collectors.toList())
+ );
+ ywCallTempDataVO.setBillTempList(
+ ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.FOUR)).collect(Collectors.toList())
+ );
+ ywCallTempDataVO.setOtherTempList(
+ ywTempConfigList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.SIX)).collect(Collectors.toList())
+ );
+ return ywCallTempDataVO;
+ }
+
+
+
+
+
+
+
+
+
+}
--
Gitblit v1.9.3