Browse Source

feature 代码提交

xiahan 4 months ago
parent
commit
d3cd962ce3

+ 1 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/dao/CommonBusinessDao.java

@@ -15,7 +15,7 @@ public interface CommonBusinessDao {
 
     List<TenantDo> getById(@Param("id") String id);
 
-    List<TenantDo> getByDsKey(@Param("dsKey") String dsKey);
+    List<TenantDo> getByDsKey(@Param("dsKey") String dsKey,@Param("tenantState") String tenantState);
 
     List<OwnerVo> getOwnerInfoByDsId(@Param("dsId") String dsKey);
 

+ 4 - 4
zhsw-common/src/main/java/com/rongwei/zhsw/system/service/impl/WaterWorksServiceImpl.java

@@ -37,9 +37,9 @@ public class WaterWorksServiceImpl implements WaterWorksService {
     private CommonBusinessDao commonBusinessDao;
 
     @Override
-    public R getList(Map<String,String> dsKey) {
+    public R getList(Map<String, String> dsKey) {
         // 设置水务公司数据字典
-        List<TenantDo> tenantDos = commonBusinessDao.getByDsKey(dsKey.getOrDefault("dsKey",""));
+        List<TenantDo> tenantDos = commonBusinessDao.getByDsKey(dsKey.getOrDefault("dsKey", ""), "0");
         List<String> dsKeys = tenantDos.stream().filter(data -> !"incontrol".equals(data.getDskey()))
                 .map(TenantDo::getDskey)
                 .collect(Collectors.toList());
@@ -55,11 +55,11 @@ public class WaterWorksServiceImpl implements WaterWorksService {
                     weChatPickerVo.setId(data.getDskey());
                     weChatPickerVo.setName(data.getTenantname());
                     weChatPickerVo.setSwCompanyInfo(swEnterpriseConfigInfoDos.stream()
-                            .filter(info->data.getDskey().equals(info.getRoption()))
+                            .filter(info -> data.getDskey().equals(info.getRoption()))
                             .findFirst()
                             .orElse(null));
                     weChatPickerVo.setBusinessPoint(swBusinesshallDos.stream()
-                            .filter(sw->data.getDskey().equals(sw.getRoption()))
+                            .filter(sw -> data.getDskey().equals(sw.getRoption()))
                             .sorted(Comparator.comparing(SwBusinesshallDo::getOrdernumber))
                             .collect(Collectors.toList()));
                     return weChatPickerVo;

+ 3 - 0
zhsw-common/src/main/resources/mybatis/zhsw/CommonBusinessDao.xml

@@ -23,6 +23,9 @@
         <if test="dsKey != null and dsKey != ''">
             AND DSKEY = #{dsKey}
         </if>
+        <if test="tenantState != null and tenantState != ''">
+            and TENANTSTATE=#{tenantState}
+        </if>
     </select>
     <select id="getOwnerInfoByDsId" resultType="com.rongwe.zhsw.system.vo.OwnerVo">
         select swm.ID as id ,suw.WECHATSIGN as weChatSign,#{dsId}as dsKey,swm.STATUS as status,ifnull(suw.DEFAULTACCOUNT,0) as defaultAccount