Sfoglia il codice sorgente

feature 代码提交

xiahan 4 mesi fa
parent
commit
553d9a0173
17 ha cambiato i file con 334 aggiunte e 24 eliminazioni
  1. 21 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/SwNotificationAnnouncementDao.java
  2. 2 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/SwUserManagementDao.java
  3. 13 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/service/SwNotificationAnnouncementService.java
  4. 22 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwBusinesshallServiceImpl.java
  5. 22 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwEnterpriseConfigInfoServiceImpl.java
  6. 22 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwNotificationAnnouncementServiceImpl.java
  7. 3 0
      zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/AccountService.java
  8. 33 9
      zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/AccountServiceImpl.java
  9. 6 5
      zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/BillServiceImpl.java
  10. 10 1
      zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/WeChatLoginServiceImpl.java
  11. 35 0
      zhsw-common/src/main/resources/mybatis/zhsw/SwNotificationAnnouncementDao.xml
  12. 7 1
      zhsw-common/src/main/resources/mybatis/zhsw/SwUserManagementDao.xml
  13. 92 0
      zhsw-entity/src/main/java/com/rongwe/zhsw/system/domain/SwNotificationAnnouncementDo.java
  14. 21 0
      zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/AccountUnbindVo.java
  15. 7 5
      zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/BillListVo.java
  16. 4 0
      zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/WeChatPickerVo.java
  17. 14 3
      zhsw-server/src/main/java/com/rongwei/zhsw/system/controller/weChat/AccountController.java

+ 21 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/SwNotificationAnnouncementDao.java

@@ -0,0 +1,21 @@
+package com.rongwei.zhsw.system.dao;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+* @author libai
+* @description 针对表【sw_notification_announcement(通知公告)】的数据库操作Mapper
+* @createDate 2025-03-15 14:48:28
+* @Entity generator.domain.SwNotificationAnnouncement
+*/
+public interface SwNotificationAnnouncementDao extends BaseMapper<SwNotificationAnnouncementDo> {
+    List<SwNotificationAnnouncementDo> selectListByDsKey(@Param("dsKeys") List<String> dsKey);
+
+}
+
+
+
+

+ 2 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/SwUserManagementDao.java

@@ -27,6 +27,8 @@ public interface SwUserManagementDao extends BaseMapper<SwUserManagementDo> {
     SwUserManagementVo getDataByAccountAndDsKey(@Param("account") String account,@Param("deKey")String deKey);
 
     void updateDefaultAccount(@Param("dsKeys") List<String> dsKey,@Param("openId") String openId);
+
+    void unbindAccount(@Param("dsKey") String dsKey,@Param("openId") String openId,@Param("userAccount") String userAccount);
 }
 
 

+ 13 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/SwNotificationAnnouncementService.java

@@ -0,0 +1,13 @@
+package com.rongwei.zhsw.system.service;
+
+import com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author libai
+* @description 针对表【sw_notification_announcement(通知公告)】的数据库操作Service
+* @createDate 2025-03-15 14:48:28
+*/
+public interface SwNotificationAnnouncementService extends IService<SwNotificationAnnouncementDo> {
+
+}

+ 22 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwBusinesshallServiceImpl.java

@@ -0,0 +1,22 @@
+package com.rongwei.zhsw.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwe.zhsw.system.domain.SwBusinesshallDo;
+import com.rongwei.zhsw.system.dao.SwBusinesshallDao;
+import com.rongwei.zhsw.system.service.SwBusinesshallService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author libai
+* @description 针对表【sw_business_hall_info_copy(营业厅信息)】的数据库操作Service实现
+* @createDate 2025-03-14 10:52:22
+*/
+@Service
+public class SwBusinesshallServiceImpl extends ServiceImpl<SwBusinesshallDao, SwBusinesshallDo>
+    implements SwBusinesshallService {
+
+}
+
+
+
+

+ 22 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwEnterpriseConfigInfoServiceImpl.java

@@ -0,0 +1,22 @@
+package com.rongwei.zhsw.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwe.zhsw.system.domain.SwEnterpriseConfigInfoDo;
+import com.rongwei.zhsw.system.dao.SwEnterpriseConfigInfoDao;
+import com.rongwei.zhsw.system.service.SwEnterpriseConfigInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author libai
+* @description 针对表【sw_enterprise_config_info(企业配置信息)】的数据库操作Service实现
+* @createDate 2025-03-14 10:52:22
+*/
+@Service
+public class SwEnterpriseConfigInfoServiceImpl extends ServiceImpl<SwEnterpriseConfigInfoDao, SwEnterpriseConfigInfoDo>
+    implements SwEnterpriseConfigInfoService {
+
+}
+
+
+
+

+ 22 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/SwNotificationAnnouncementServiceImpl.java

@@ -0,0 +1,22 @@
+package com.rongwei.zhsw.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo;
+import com.rongwei.zhsw.system.dao.SwNotificationAnnouncementDao;
+import com.rongwei.zhsw.system.service.SwNotificationAnnouncementService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author libai
+* @description 针对表【sw_notification_announcement(通知公告)】的数据库操作Service实现
+* @createDate 2025-03-15 14:48:28
+*/
+@Service
+public class SwNotificationAnnouncementServiceImpl extends ServiceImpl<SwNotificationAnnouncementDao, SwNotificationAnnouncementDo>
+    implements SwNotificationAnnouncementService {
+
+}
+
+
+
+

+ 3 - 0
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/AccountService.java

@@ -1,6 +1,7 @@
 package com.rongwei.zhsw.system.wechat;
 
 import com.rongwe.zhsw.system.vo.AccountBindVo;
+import com.rongwe.zhsw.system.vo.AccountUnbindVo;
 import com.rongwei.rwcommon.base.R;
 
 /**
@@ -17,4 +18,6 @@ public interface AccountService {
     R info(String accountNumber);
 
     R list();
+
+    R unbind(AccountUnbindVo accountUnbindVo);
 }

+ 33 - 9
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/AccountServiceImpl.java

@@ -6,6 +6,7 @@ import com.rongwe.zhsw.system.domain.SwBillManagementUnpaidDo;
 import com.rongwe.zhsw.system.domain.SwUserManagementDo;
 import com.rongwe.zhsw.system.domain.SwUserWechatDo;
 import com.rongwe.zhsw.system.vo.AccountBindVo;
+import com.rongwe.zhsw.system.vo.AccountUnbindVo;
 import com.rongwe.zhsw.system.vo.SwUserManagementVo;
 import com.rongwe.zhsw.system.vo.WeChatHomePageVo;
 import com.rongwei.rwcommon.base.BaseDo;
@@ -25,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -56,16 +56,16 @@ public class AccountServiceImpl implements AccountService {
         String bindWaterCompany = accountBindVo.getBindWaterCompany();
         WeChatUtils.checkWater(bindWaterCompany);
         SwUserManagementVo swUserManagementVo = swUserManagementService.getBaseMapper().getDataByAccountAndDsKey(accountBindVo.getAccountNum(), bindWaterCompany);
-        if(swUserManagementVo==null){
-            log.error("户号不存在:{}",accountBindVo.getAccountNum());
+        if (swUserManagementVo == null) {
+            log.error("户号不存在:{}", accountBindVo.getAccountNum());
             throw new CustomException("户号不存在!");
         }
         if (!swUserManagementVo.getUsername().equals(accountBindVo.getAccountName())) {
             log.error("户名错误");
             throw new CustomException("户名错误!");
         }
-        String openId=WeChatUtils.getCurrentWeChatOpenId();
-        if(swUserManagementVo.getWechatSign().contains(openId)){
+        String openId = WeChatUtils.getCurrentWeChatOpenId();
+        if (swUserManagementVo.getWechatSign().contains(openId)) {
             log.error("当前户号已绑定");
             throw new CustomException("户号已绑定!");
         }
@@ -91,8 +91,8 @@ public class AccountServiceImpl implements AccountService {
         // 如果是默认账户的 将其余租户的默认关系变为否
         List<String> otherDsKey = accountBindVo.getOtherDsKey();
         otherDsKey.remove(accountBindVo.getBindWaterCompany());
-        if(swUserWechat.getDefaultaccount()  && !otherDsKey.isEmpty()){
-            swUserManagementService.getBaseMapper().updateDefaultAccount(otherDsKey,openId);
+        if (swUserWechat.getDefaultaccount() && !otherDsKey.isEmpty()) {
+            swUserManagementService.getBaseMapper().updateDefaultAccount(otherDsKey, openId);
         }
         // 更新缓存中的 业主信息
         otherDsKey.add(accountBindVo.getBindWaterCompany());
@@ -102,12 +102,13 @@ public class AccountServiceImpl implements AccountService {
         // 修改用户的绑定关系
         swUserManagementService.update(new LambdaUpdateWrapper<SwUserManagementDo>()
                 .eq(SwUserManagementDo::getId, swUserManagementVo.getId())
-                .set(SwUserManagementDo::getWechatbindstatus,1));
+                .set(SwUserManagementDo::getWechatbindstatus, 1));
         return R.ok(allOwnerByOpenId);
     }
 
     /**
      * 切换默认账户
+     *
      * @param accountBindVo
      * @return
      */
@@ -118,6 +119,7 @@ public class AccountServiceImpl implements AccountService {
 
     /**
      * 获取当前账户的信息
+     *
      * @param accountNumber
      * @return
      */
@@ -126,7 +128,7 @@ public class AccountServiceImpl implements AccountService {
         List<SwUserManagementDo> list = swUserManagementService.list(new LambdaQueryWrapper<SwUserManagementDo>()
                 .eq(BaseDo::getDeleted, "0")
                 .eq(SwUserManagementDo::getUsernumber, accountNumber));
-        if(list.isEmpty()){
+        if (list.isEmpty()) {
             throw new CustomException("当前户号不存在,请联系水务公司");
         }
         // 获取所有待缴费账单
@@ -146,4 +148,26 @@ public class AccountServiceImpl implements AccountService {
         List<SwUserManagementVo> userByDsKey = weChatLoginService.getAllOwnerByOpenId(currentWeChatOpenId, null);
         return R.ok(userByDsKey);
     }
+
+    @Override
+    public R unbind(AccountUnbindVo accountUnbindVo) {
+        String account = accountUnbindVo.getAccount();
+        String dsKey = accountUnbindVo.getDeKey();
+        if (StringUtils.isBlank(account)) {
+            throw new CustomException("解绑的户号为空");
+        }
+        String currentWeChatOpenId = WeChatUtils.getCurrentWeChatOpenId();
+        // 删除绑定关系
+        swUserManagementService.getBaseMapper().unbindAccount(dsKey, currentWeChatOpenId,account );
+        // 默认不刷新直接返回
+        if(!accountUnbindVo.getRefresh()){
+            return R.ok();
+        }
+        List<String> otherDsKeys = accountUnbindVo.getOtherDsKeys();
+        if (otherDsKeys == null || otherDsKeys.isEmpty()) {
+            return R.ok();
+        }
+        List<SwUserManagementVo> allOwnerByOpenId = weChatLoginService.getAllOwnerByOpenId(currentWeChatOpenId, otherDsKeys);
+        return R.ok(allOwnerByOpenId);
+    }
 }

+ 6 - 5
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/BillServiceImpl.java

@@ -6,6 +6,7 @@ import com.rongwe.zhsw.system.domain.SwBillManagementUnpaidDo;
 import com.rongwe.zhsw.system.vo.BillListSearchVo;
 import com.rongwe.zhsw.system.vo.BillListVo;
 import com.rongwei.rwcommon.base.R;
+import com.rongwei.rwcommon.base.exception.CustomException;
 import com.rongwei.zhsw.system.service.impl.SwBillManagementPaidServiceImpl;
 import com.rongwei.zhsw.system.service.impl.SwBillManagementUnpaidServiceImpl;
 import com.rongwei.zhsw.system.service.impl.SwUserManagementServiceImpl;
@@ -47,7 +48,7 @@ public class BillServiceImpl implements BillService {
         // 户号
         String accountNum = billListSearchVo.getAccountNum();
         if (StringUtils.isBlank(accountNum)) {
-
+            throw new CustomException("户号为空");
         }
         // 年份
         int year = billListSearchVo.getYear();
@@ -74,8 +75,8 @@ public class BillServiceImpl implements BillService {
             billListVo.setBillDate(unpaidRecord.getThismeterreadingdate());
             billListVo.setAmount(unpaidRecord.getActualdue());
             billListVo.setUsage(unpaidRecord.getCurrentwateruse());
-            BigDecimal start = unpaidRecord.getLastmeterreading().stripTrailingZeros();
-            BigDecimal end = unpaidRecord.getThismeterreading().stripTrailingZeros();
+            String start = unpaidRecord.getLastmeterreading().stripTrailingZeros().toPlainString();
+            String end = unpaidRecord.getThismeterreading().stripTrailingZeros().toPlainString();
             billListVo.setMeterReading(start+ "-" +end);
             billListVo.setPaymentTime(null);
             billListVo.setIsPaid(false);
@@ -94,8 +95,8 @@ public class BillServiceImpl implements BillService {
             billListVo.setBillDate(paidRecord.getThismeterreadingdate());
             billListVo.setAmount(paidRecord.getActualdue());
             billListVo.setUsage(paidRecord.getCurrentwateruse());
-            BigDecimal start = paidRecord.getLastmeterreading().stripTrailingZeros();
-            BigDecimal end = paidRecord.getThismeterreading().stripTrailingZeros();
+            String start = paidRecord.getLastmeterreading().stripTrailingZeros().toPlainString();
+            String end = paidRecord.getThismeterreading().stripTrailingZeros().toPlainString();
             billListVo.setMeterReading(start+ "-" +end);
             billListVo.setPaymentTime(paidRecord.getPaymentdate());
             billListVo.setIsPaid(true);

+ 10 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/WeChatLoginServiceImpl.java

@@ -3,6 +3,7 @@ package com.rongwei.zhsw.system.wechat.impl;
 import com.google.common.base.Strings;
 import com.rongwe.zhsw.system.domain.SwBusinesshallDo;
 import com.rongwe.zhsw.system.domain.SwEnterpriseConfigInfoDo;
+import com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo;
 import com.rongwe.zhsw.system.vo.*;
 import com.rongwei.commonservice.service.RedisService;
 import com.rongwei.rwadmincommon.system.vo.JwtAuthenticationRequest;
@@ -12,6 +13,7 @@ import com.rongwei.rwcommon.base.exception.CustomException;
 import com.rongwei.rwcommonentity.commonservers.domain.TenantDo;
 import com.rongwei.zhsw.system.config.WeChatLoginApiPara;
 import com.rongwei.zhsw.system.dao.CommonBusinessDao;
+import com.rongwei.zhsw.system.dao.SwNotificationAnnouncementDao;
 import com.rongwei.zhsw.system.fegin.LoginAuth;
 import com.rongwei.zhsw.system.service.impl.SwBusinesshallServiceImpl;
 import com.rongwei.zhsw.system.service.impl.SwEnterpriseConfigInfoServiceImpl;
@@ -54,7 +56,8 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
     private SwBusinesshallServiceImpl swBusinesshallService;
     @Autowired
     private SwEnterpriseConfigInfoServiceImpl swEnterpriseConfigInfoService;
-
+    @Autowired
+    private SwNotificationAnnouncementDao swNotificationAnnouncementDao;
 
 
 
@@ -100,6 +103,9 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
         List<SwBusinesshallDo> swBusinesshallDos = swBusinesshallService.getBaseMapper().selectListByDsKey(dsKeys);
         // 获取水站基本配置
         List<SwEnterpriseConfigInfoDo> swEnterpriseConfigInfoDos = swEnterpriseConfigInfoService.getBaseMapper().selectListByDsKey(dsKeys);
+        // 当前水站的通知公告
+        List<SwNotificationAnnouncementDo> swNotificationAnnouncementDos = swNotificationAnnouncementDao.selectListByDsKey(dsKeys);
+
         // 缓存当前用户可以读取到的水站信息
         List<WeChatPickerVo> waterCompanys = tenantDos.stream()
                 .filter(data -> !"incontrol".equals(data.getDskey()))
@@ -115,6 +121,9 @@ public class WeChatLoginServiceImpl implements WeChatLoginService {
                             .filter(sw->data.getDskey().equals(sw.getRoption()))
                             .sorted(Comparator.comparing(SwBusinesshallDo::getOrdernumber))
                             .collect(Collectors.toList()));
+                    weChatPickerVo.setNotifications(swNotificationAnnouncementDos.stream()
+                            .filter(sw->data.getDskey().equals(sw.getRoption()))
+                            .collect(Collectors.toList()));
                     return weChatPickerVo;
                 }).collect(Collectors.toList());
         login.setWaterCompany(waterCompanys);

+ 35 - 0
zhsw-common/src/main/resources/mybatis/zhsw/SwNotificationAnnouncementDao.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.rongwei.zhsw.system.dao.SwNotificationAnnouncementDao">
+
+    <sql id="Base_Column_List">
+        ID,TENANTID,ROPTION,DELETED,REMARK,CREATEDATE,
+        CREATEUSERID,MODIFYDATE,MODIFYUSERID,CREATEUSERNAME,MODIFYUSERNAME,
+        NOTICETYPE,NOTICETITLE,NOTICECONTENT,NOTICEIMAGE,NOTICELINK,
+        NOTICEDEADLINE,NOTICESTATUS,NOTIFYPERSON,NOTIFYTARGET,NOTIFYPERSONID,
+        HOMEPAGESLIDER,PUBLISHTIME
+    </sql>
+    <select id="selectListByDsKey" resultType="com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo">
+        select * from
+        <foreach collection="dsKeys" item="dsKey" open="(" close=") a" separator="union all">
+            select
+            ID,TENANTID, #{dsKey} as  ROPTION,DELETED,REMARK,CREATEDATE,
+            CREATEUSERID,MODIFYDATE,MODIFYUSERID,CREATEUSERNAME,MODIFYUSERNAME,
+            NOTICETYPE,NOTICETITLE,NOTICECONTENT,NOTICEIMAGE,NOTICELINK,
+            NOTICEDEADLINE,NOTICESTATUS,NOTIFYPERSON,NOTIFYTARGET,NOTIFYPERSONID,
+            HOMEPAGESLIDER,PUBLISHTIME
+            from ${dsKey}.sw_notification_announcement
+            <where>
+                DELETED='0'
+                AND NOTICESTATUS='2'
+                and (NOTICEDEADLINE IS NULL
+                OR CURDATE()  <![CDATA[ < ]]> DATE(NOTICEDEADLINE)
+                )
+            </where>
+            ORDER BY
+            NOTICETYPE DESC ,PUBLISHTIME DESC
+        </foreach>
+    </select>
+</mapper>

+ 7 - 1
zhsw-common/src/main/resources/mybatis/zhsw/SwUserManagementDao.xml

@@ -26,7 +26,7 @@
                 and suw.WECHATSIGN=#{openId}
             </where>
         </foreach>
-        order by defaultAccount
+        order by defaultAccount desc
     </select>
     <select id="getDataByAccountAndDsKey" resultType="com.rongwe.zhsw.system.vo.SwUserManagementVo">
         select *,   cast((
@@ -51,5 +51,11 @@
             WHERE WECHATSIGN = #{openId}
         </foreach>
     </update>
+    <update id="unbindAccount">
+            UPDATE ${dsKey}.sw_user_wechat
+            SET DELETED = 1
+            WHERE WECHATSIGN = #{openId}
+            and USERNO=#{userAccount}
+    </update>
 </mapper>
 

+ 92 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/domain/SwNotificationAnnouncementDo.java

@@ -0,0 +1,92 @@
+package com.rongwe.zhsw.system.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.util.Date;
+
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+
+/**
+ * 通知公告
+ * @TableName sw_notification_announcement
+ */
+@TableName(value ="sw_notification_announcement")
+@Data
+public class SwNotificationAnnouncementDo extends BaseDo {
+    /**
+     * 主键
+     */
+    @TableId
+    private String id;
+
+    /**
+     * 租户ID
+     */
+    private String tenantid;
+
+    /**
+     * 扩展json格式配置
+     */
+    private String roption;
+
+    /**
+     * 通知类型(1:企业内部通知2:用户通知)
+     */
+    private String noticetype;
+
+    /**
+     * 标题
+     */
+    private String noticetitle;
+
+    /**
+     * 内容
+     */
+    private String noticecontent;
+
+    /**
+     * 宣传图
+     */
+    private String noticeimage;
+
+    /**
+     * 链接
+     */
+    private String noticelink;
+
+    /**
+     * 公告截止日期(失效时间)
+     */
+    private Date noticedeadline;
+
+    /**
+     * 发布状态(1:带发布2:已发布3:取消发布)
+     */
+    private String noticestatus;
+
+    /**
+     * 通知人员(发布人)
+     */
+    private String notifyperson;
+
+    /**
+     * 通知对象
+     */
+    private String notifytarget;
+
+    /**
+     * 发布人ID
+     */
+    private String notifypersonid;
+
+    /**
+     * 首页轮播(1:是2:否)
+     */
+    private String homepageslider;
+
+    /**
+     * 发布时间
+     */
+    private Date publishtime;
+}

+ 21 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/AccountUnbindVo.java

@@ -0,0 +1,21 @@
+package com.rongwe.zhsw.system.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * AccountUnbindVo class
+ *
+ * @author XH
+ * @date 2025/03/15
+ */
+@Data
+public class AccountUnbindVo {
+    private String account;
+    private String deKey;
+
+    private List<String> otherDsKeys;
+
+    private Boolean refresh=false;
+}

+ 7 - 5
zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/BillListVo.java

@@ -31,23 +31,25 @@ public class BillListVo {
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private Date paymentTime;
     // 是否已缴费
-    private Boolean isPaid;
+    private Boolean isPaid =false;
     //  抄表日期
     @JsonFormat(pattern = "yyyy-MM-dd")
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private Date currentDate;
     // 本次抄表数
-    private BigDecimal currentReading;
+    private BigDecimal currentReading=BigDecimal.ZERO;;
     // 上次抄表日期
     @JsonFormat(pattern = "yyyy-MM-dd")
     @JsonInclude(JsonInclude.Include.NON_NULL)
     private Date lastDate;
     // 上次抄表数
-    private BigDecimal lastReading;
+    private BigDecimal lastReading=BigDecimal.ZERO;;
     //  总费用 -》原应缴
-    private BigDecimal totalAmount;
+    private BigDecimal totalAmount=BigDecimal.ZERO;;
     // 减免费用
+    @JsonInclude(JsonInclude.Include.NON_NULL)
     private BigDecimal discount;
     //  滞纳金,
-    private BigDecimal lateFee;
+    @JsonInclude(JsonInclude.Include.NON_NULL)
+    private BigDecimal lateFee=BigDecimal.ZERO;
 }

+ 4 - 0
zhsw-entity/src/main/java/com/rongwe/zhsw/system/vo/WeChatPickerVo.java

@@ -2,6 +2,7 @@ package com.rongwe.zhsw.system.vo;
 
 import com.rongwe.zhsw.system.domain.SwBusinesshallDo;
 import com.rongwe.zhsw.system.domain.SwEnterpriseConfigInfoDo;
+import com.rongwe.zhsw.system.domain.SwNotificationAnnouncementDo;
 import lombok.Data;
 
 import java.util.List;
@@ -20,4 +21,7 @@ public class WeChatPickerVo {
     private SwEnterpriseConfigInfoDo swCompanyInfo;
     // 水务公司营业站点信息
     private List<SwBusinesshallDo> businessPoint;
+    // 水务公司通知公告
+    private List<SwNotificationAnnouncementDo> notifications;
+
 }

+ 14 - 3
zhsw-server/src/main/java/com/rongwei/zhsw/system/controller/weChat/AccountController.java

@@ -1,8 +1,10 @@
 package com.rongwei.zhsw.system.controller.weChat;
 
 import com.rongwe.zhsw.system.vo.AccountBindVo;
+import com.rongwe.zhsw.system.vo.AccountUnbindVo;
 import com.rongwei.rwcommon.base.R;
 import com.rongwei.zhsw.system.service.impl.SwBillManagementUnpaidServiceImpl;
+import com.rongwei.zhsw.system.wechat.AccountService;
 import com.rongwei.zhsw.system.wechat.impl.AccountServiceImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -21,9 +23,9 @@ public class AccountController {
     private final Logger log = LoggerFactory.getLogger(this.getClass().getName());
 
     @Autowired
-    private AccountServiceImpl accountService;
+    private AccountService accountService;
     /**
-     * Core+ 通过账号密码登录和校验方法
+     * 户号绑定方法
      *
      * @param data
      * @return
@@ -49,5 +51,14 @@ public class AccountController {
         return accountService.list();
     }
 
-
+    /**
+     * 户号绑定方法
+     *
+     * @param data
+     * @return
+     */
+    @PostMapping("/unbind")
+    private R unbind(@RequestBody AccountUnbindVo accountUnbindVo) {
+        return accountService.unbind(accountUnbindVo);
+    }
 }