Browse Source

添加用水性质过滤条件

hym 3 years ago
parent
commit
86157d6176

+ 1 - 1
zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dao/pay/BaseWaterPropertyMapper.java

@@ -26,7 +26,7 @@ public interface BaseWaterPropertyMapper {
 
     public int update(@Param("baseWaterPropertyDto") BaseWaterPropertyDto baseWaterPropertyDto);
 
-    public List<BaseWaterPropertyDataDto> getAll(@Param("tenantId") String tenantId);
+    public List<BaseWaterPropertyDataDto> getAll(@Param("tenantId") String tenantId, @Param("companyId") Integer companyId);
     public List<PayBaseWaterprice>queryBaseWaterPrice(@Param("tenantId") String tenantId,
                                                       @Param("waterpropertyId") BigInteger waterpropertyId, @Param("ladderlevel") Integer ladderlevel);
     public Integer checkName(@Param("name") String name, @Param("customerId") Integer customerId,

+ 4 - 0
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/pay/BaseWaterPropertyMapper.xml

@@ -181,6 +181,10 @@
 		FROM pay_base_waterproperty a
 		WHERE
 			tenant_id=#{tenantId}
+			<if test="companyId!=null">
+				and company_org_id=#{companyId}
+			</if>
+
 		order by a.create_date desc
 	</select>
 

+ 3 - 3
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/pay/PayReportMapper.xml

@@ -23,7 +23,7 @@
         and ppt.payway !=5
         <if test="tenantId != null">and ppt.tenant_id = #{tenantId}</if>
 
-        <if test ="officeId != null"> and ppt.office_id = #{officeId}</if>
+        <if test ="officeId != null"> and ppt.company_org_id = #{officeId}</if>
         <if test="createBy != null"> and ppt.create_by = #{createBy}</if>
         <if test="beginTime != null"> and ppt.transtime >= #{beginTime,jdbcType=TIMESTAMP}</if>
         <if test="endTime != null"> and ppt.transtime &lt;= #{endTime,jdbcType=TIMESTAMP}</if>
@@ -136,7 +136,7 @@
         ppr.payseriesno
         FROM pay_pay_received ppt
         LEFT JOIN pay_base_account pba on ppt.account_id = pba.id
-        LEFT JOIN sc_community scc on scc.`code` = substring(pba.accountnumber,1,3) and scc.`status`=1
+        LEFT JOIN sc_community scc on scc.id =pba.community_id and scc.`status`=1
                                           and scc.tenant_id = #{tenantId}
         LEFT JOIN sc_user scu on scu.id = ppt.create_by
         LEFT JOIN pay_pay_transactiondetails ppr on ppt.payseriesno = ppr.payseriesno and ppr.transtype = 4
@@ -213,7 +213,7 @@
             LEFT JOIN pay_base_account pba ON pba.id = ppt.account_id
         <where>
             <if test="tenantId != null"> and ppt.tenant_id = #{tenantId}</if>
-            <if test="officeId != null"> and ppt.office_id = #{officeId}</if>
+            <if test="officeId != null"> and ppt.company_org_id = #{officeId}</if>
             <if test="community != null and community != ''"> and substring(pba.accountnumber,1,3) = #{community,jdbcType=VARCHAR}</if>
             <if test="accountNumber != null and accountNumber != ''"> and pba.accountnumber like concat('%',#{accountNumber},'%')</if>
             <include refid="permissionCondition"/>

+ 4 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/commom/constant/MqConstant.java

@@ -12,4 +12,8 @@ public class MqConstant {
      * 同步小区队列
      */
     public static final String SYNC_COMMUNITY_QUEUE = "canal-t-community-queue";
+    /**
+     * 同步小区队列
+     */
+    public static final String SYNC_USER_QUEUE = "canal-t-user-queue";
 }

+ 2 - 4
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/controller/pay/BaseWaterPropertyController.java

@@ -62,10 +62,8 @@ public class BaseWaterPropertyController {
     @ResponseBody
     @GetMapping("/getAll")
     @ApiOperation(value = "请求用水性质组件")
-    public AjaxMessage getAll(
-
-    ){
-        List<BaseWaterPropertyDataDto> pageInfo =  baseWaterPropertyService.getAll();
+    public AjaxMessage getAll( @RequestParam(required = false) Integer companyId){
+        List<BaseWaterPropertyDataDto> pageInfo =  baseWaterPropertyService.getAll(companyId);
         return new AjaxMessage(ResultStatus.OK, pageInfo);
     }
     @ResponseBody

+ 2 - 2
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/pay/BaseWaterPropertyServiceImpl.java

@@ -210,9 +210,9 @@ public class BaseWaterPropertyServiceImpl implements BaseWaterPropertyService {
     }
 
     @Override
-    public List<BaseWaterPropertyDataDto> getAll() {
+    public List<BaseWaterPropertyDataDto> getAll(Integer companyId) {
         LoginUser loginUser = UserUtil.getCurrentUser();
-        List<BaseWaterPropertyDataDto> baseWaterPropertyDataDtos = baseWaterPropertyMapper.getAll(loginUser.getTenantId());
+        List<BaseWaterPropertyDataDto> baseWaterPropertyDataDtos = baseWaterPropertyMapper.getAll(loginUser.getTenantId(),companyId);
         return baseWaterPropertyDataDtos;
     }
 

+ 1 - 1
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/pay/BaseWaterPropertyService.java

@@ -25,7 +25,7 @@ public interface BaseWaterPropertyService {
 
     public int edit(BaseWaterPropertyFormDto baseWaterPropertyFormDto);
 
-    public List<BaseWaterPropertyDataDto> getAll();
+    public List<BaseWaterPropertyDataDto> getAll(Integer companyId);
 
     public BaseWaterPropertyFormDto getEditPage(BigInteger id);