From f50963f4625215e0179c5d603693f2e1959969de Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 09 十二月 2024 15:01:43 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei

---
 server/system_timer/src/main/resources/bootstrap-pro.yml                                                       |    4 ++--
 server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml                                               |    4 ++--
 server/visits/admin_timer/src/main/resources/bootstrap-pro.yml                                                 |    4 ++--
 server/visits/dmvisit_service/src/main/resources/application-pro.yml                                           |    2 +-
 server/visits/dmvisit_admin/src/main/resources/bootstrap.yml                                                   |    2 +-
 server/system_gateway/src/main/resources/bootstrap.yml                                                         |    2 +-
 server/system_timer/src/main/resources/application-pro.yml                                                     |    2 +-
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java |   13 ++++++++++---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java        |   12 ++++++++----
 server/system_gateway/src/main/resources/application-pro.yml                                                   |    2 +-
 server/system_gateway/src/main/resources/bootstrap-pro.yml                                                     |    4 ++--
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java    |    1 +
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java                  |    3 +++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java       |    2 +-
 14 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/server/system_gateway/src/main/resources/application-pro.yml b/server/system_gateway/src/main/resources/application-pro.yml
index 3f53da3..b0ea2fd 100644
--- a/server/system_gateway/src/main/resources/application-pro.yml
+++ b/server/system_gateway/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
   datasource:
     url: jdbc:mysql://localhost:3306/funingyunwei?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
     username: root
-    password: Atwl@2024
+    password: funing@2024
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
 
diff --git a/server/system_gateway/src/main/resources/bootstrap-pro.yml b/server/system_gateway/src/main/resources/bootstrap-pro.yml
index 34383f4..5191242 100644
--- a/server/system_gateway/src/main/resources/bootstrap-pro.yml
+++ b/server/system_gateway/src/main/resources/bootstrap-pro.yml
@@ -3,13 +3,13 @@
     nacos:
       server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
       username: nacos
-      password: Atwl@2024
+      password: funing@2024
       discovery:
         server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
         namespace: dmvisit
 #        namespace: dev_renkang
         username: nacos
-        password: Atwl@2024
+        password: funing@2024
     gateway:
       discovery:
         locator:
diff --git a/server/system_gateway/src/main/resources/bootstrap.yml b/server/system_gateway/src/main/resources/bootstrap.yml
index 8ecd0a5..bb432df 100644
--- a/server/system_gateway/src/main/resources/bootstrap.yml
+++ b/server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev
+    active: test
   application:
     name: system_gateway
   # 瀹夊叏閰嶇疆
diff --git a/server/system_timer/src/main/resources/application-pro.yml b/server/system_timer/src/main/resources/application-pro.yml
index 3f53da3..b0ea2fd 100644
--- a/server/system_timer/src/main/resources/application-pro.yml
+++ b/server/system_timer/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
   datasource:
     url: jdbc:mysql://localhost:3306/funingyunwei?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
     username: root
-    password: Atwl@2024
+    password: funing@2024
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
 
diff --git a/server/system_timer/src/main/resources/bootstrap-pro.yml b/server/system_timer/src/main/resources/bootstrap-pro.yml
index b0f16fd..b41e777 100644
--- a/server/system_timer/src/main/resources/bootstrap-pro.yml
+++ b/server/system_timer/src/main/resources/bootstrap-pro.yml
@@ -12,7 +12,7 @@
     nacos:
       server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
       username: nacos
-      password: Atwl@2024
+      password: funing@2024
       #      config:
       #        server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
       #        namespace: dmvisit
@@ -25,4 +25,4 @@
         server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
         namespace: dmvisit
         username: nacos
-        password: Atwl@2024
\ No newline at end of file
+        password: funing@2024
\ No newline at end of file
diff --git a/server/visits/admin_timer/src/main/resources/bootstrap-pro.yml b/server/visits/admin_timer/src/main/resources/bootstrap-pro.yml
index b0f16fd..b41e777 100644
--- a/server/visits/admin_timer/src/main/resources/bootstrap-pro.yml
+++ b/server/visits/admin_timer/src/main/resources/bootstrap-pro.yml
@@ -12,7 +12,7 @@
     nacos:
       server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
       username: nacos
-      password: Atwl@2024
+      password: funing@2024
       #      config:
       #        server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
       #        namespace: dmvisit
@@ -25,4 +25,4 @@
         server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
         namespace: dmvisit
         username: nacos
-        password: Atwl@2024
\ No newline at end of file
+        password: funing@2024
\ No newline at end of file
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
index 64d4ec8..428e9c4 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap-pro.yml
@@ -12,7 +12,7 @@
     nacos:
       server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
       username: nacos
-      password: Atwl@2024
+      password: funing@2024
 #      config:
 #        server-addr: http://175.27.187.84:8848 #閰嶇疆Nacos鍦板潃
 #        namespace: dmvisit
@@ -25,4 +25,4 @@
         server-addr: http://localhost:8848 #閰嶇疆Nacos鍦板潃
         namespace: dmvisit
         username: nacos
-        password: Atwl@2024
\ No newline at end of file
+        password: funing@2024
\ No newline at end of file
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 9dc10e9..86e11a3 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev
+    active: test
   application:
     name: visitsAdmin
     # 瀹夊叏閰嶇疆
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 0b05aba..2e1e381 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
@@ -162,6 +162,9 @@
     @ExcelColumn(name="鍚堝悓缂栧彿",index = 2,width = 10)
     @TableField(exist = false)
     private String contractCode;
+    @ApiModelProperty(value = "鍚堝悓鐘舵��", example = "1")
+    @TableField(exist = false)
+    private Integer contractStatus;
 
     @ApiModelProperty(value = "妤煎畤鎴块棿", example = "1")
     @ExcelColumn(name="妤煎畤鎴块棿",index = 1,width = 10)
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 8a080c4..00daa7a 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
@@ -193,6 +193,7 @@
                         .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)
+                        .selectAs(Company::getId,YwContractBill::getCompanyId)
                         .selectAs(Company::getName,YwContractBill::getCompanyName)
                         .selectAs(SystemUser::getRealname,YwContractBill::getRealname)
                         .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
index 20da8dc..a462929 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
@@ -85,7 +85,12 @@
         ){
              throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
-        YwContractBill ywContractBill = ywContractBillMapper.selectById(ywContractRevenue.getBillId());
+        YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class,
+                new MPJLambdaWrapper<YwContractBill>()
+                        .selectAll(YwContractBill.class)
+                        .selectAs(YwContract::getStatus, YwContractBill::getContractStatus)
+                        .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
+                        .eq(YwContractBill::getId,ywContractRevenue.getBillId()));
         if(Objects.isNull(ywContractBill)){
             throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌璐﹀崟淇℃伅");
         }
@@ -189,7 +194,8 @@
         ywContractRevenueMapper.insert(ywContractRevenue);
         ywContractBillMapper.updateById(ywContractBill);
         //濡傛灉璐﹀崟瀹岀粨锛屽垯鏌ヨ鍚堝悓涓嬪紑鍚腑鐨勮处鍗曟槸鍚﹀瓨鍦ㄩ��娆句腑 濡傛灉涓嶅瓨鍦ㄥ垯鏍囪鍚堝悓宸查��娆�
-        if(Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
+        if(Constants.equalsInteger(ywContractBill.getContractStatus(),Constants.THREE)
+                && Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
             if( ywContractBillMapper
                     .selectCount(new QueryWrapper<YwContractBill>().lambda().eq(YwContractBill::getContractId,ywContractBill.getContractId())
                             .ne(YwContractBill::getId,ywContractBill.getId())
@@ -443,7 +449,8 @@
                         .eq(Objects.nonNull(model)&&Objects.nonNull(model.getRevenueType()),
                                 YwContractRevenue::getRevenueType,model.getRevenueType())
                         .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPayDateStart()),YwContractRevenue::getActPayDate, Utils.Date.getStart(model.getPayDateStart()))
-                        .le(Objects.nonNull(model)&&Objects.nonNull(model.getPayDateEnd()),YwContractRevenue::getActPayDate, Utils.Date.getEnd(model.getPayDateEnd())) )
+                        .le(Objects.nonNull(model)&&Objects.nonNull(model.getPayDateEnd()),YwContractRevenue::getActPayDate, Utils.Date.getEnd(model.getPayDateEnd()))
+                        .orderByDesc(YwContractRevenue::getId))
                 ;
 
         this.dealRoomDetail(iPage.getRecords());
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
index b685a75..729156a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -316,16 +316,19 @@
                 .replace("{param3}",DateUtil.getDateLongSlash(model.getBtDate()))
                 .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"鏀�":"浠�")
                 .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
-                        Constants.formatBigdecimal2Float(model.getBtFee()).intValue()
-                        :(Constants.formatBigdecimal2Float(model.getBtFee()).intValue() * -1))+"" );
+                        Constants.formatBigdecimal2Float(model.getBtFee())
+                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
         return  str;
     }
     private String getbackRentLogByParam(YwContract model) {
         BigDecimal fee = Constants.formatBigdecimal(model.getBtFee());
-        String str = "銆愰��绉熸棩{param1}锛岄��绉熷師鍥狅細{param2},閫�绉熷崗璁腑缁熻鐨勮垂鐢ㄦ�昏{param3}鍏冦�傘��";
+        String str = "銆愰��绉熸棩{param1}锛岄��绉熷師鍥狅細{param2},閫�绉熷崗璁腑缁熻鐨勮垂鐢ㄦ�昏闇�{param4}{param5}鍏冦�傘��";
         str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getBtDate()))
                 .replace("{param2}",StringUtils.defaultString(model.getBtInfo(),""))
-                .replace("{param3}",Constants.formatBigdecimal2Float(model.getBtFee()).doubleValue()+"");
+                .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"鏀�":"浠�")
+                .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
+                        Constants.formatBigdecimal2Float(model.getBtFee())
+                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
         return  str;
     }
 
@@ -488,6 +491,7 @@
                 addBill.setType(Constants.TWO);
                 addBill.setStatus(Constants.ZERO);
                 addBill.setTotleFee(addBill.getReceivableFee());
+                addBill.setCompanyId(param.getCompanyId());
                 if(Constants.equalsInteger(addBill.getFeeType(),Constants.ONE)){
                     addBill.setStartDate(addBill.getPlanPayDate());
                     addBill.setEndDate(addBill.getPlanPayDate());
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
index 0505cb3..c8a86f3 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -340,7 +340,7 @@
                 .leftJoin(YwRoom.class,YwRoom::getId,YwWorkorder::getRoomId)
                 .leftJoin(YwFloor.class,YwFloor::getId,YwWorkorder::getFloorId)
                 .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId)
-                .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId)
+                .leftJoin(YwProject.class,YwProject::getId,YwWorkorder::getProjectId)
                 .leftJoin(" company t9 on t9.id = t1.company_id  ")
                 .eq(YwWorkorder::getId,id);
         YwWorkorder model = ywWorkorderMapper.selectJoinOne(YwWorkorder.class,queryWrapper);
diff --git a/server/visits/dmvisit_service/src/main/resources/application-pro.yml b/server/visits/dmvisit_service/src/main/resources/application-pro.yml
index bbfbe0f..ac528f3 100644
--- a/server/visits/dmvisit_service/src/main/resources/application-pro.yml
+++ b/server/visits/dmvisit_service/src/main/resources/application-pro.yml
@@ -3,7 +3,7 @@
   datasource:
     url: jdbc:mysql://localhost:3306/funingyunwei?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
     username: root
-    password: Atwl@2024
+    password: funing@2024
     driver-class-name: com.mysql.cj.jdbc.Driver
     type: com.alibaba.druid.pool.DruidDataSource
   redis:

--
Gitblit v1.9.3