Browse Source

修改支付机构

hym 3 years ago
parent
commit
a0c45726b5
15 changed files with 57 additions and 11 deletions
  1. 1 0
      zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dto/MeterSyncDto.java
  2. 5 0
      zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dto/pay/PayCustomerDto.java
  3. 1 1
      zoniot-pay/zoniot-pay-core/src/main/resources/mapper/DeviceMapper.xml
  4. 1 0
      zoniot-pay/zoniot-pay-core/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml
  5. 2 2
      zoniot-pay/zoniot-pay-core/src/main/resources/mapper/pay/PayInvoiceMapper.xml
  6. 1 0
      zoniot-pay/zoniot-pay-web/pom.xml
  7. 7 0
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/controller/pay/BaseWaterPropertyController.java
  8. 8 6
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/excel/download/template/InstallPlanDownloadExcelTemplate.java
  9. 9 0
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/pay/PayBaseWaterpriceServiceImpl.java
  10. 2 0
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/pay/PayBaseWaterpriceService.java
  11. 1 2
      zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/pay/archives/impl/PayBaseCustomerandmeterrelaServiceImpl.java
  12. 1 0
      zoniot-pay/zoniot-pay-xxljob-client/src/main/java/com/zcxk/rmcp/pay/job/DeviceSyncServiceHander.java
  13. 3 0
      zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/dto/OrgDto.java
  14. 8 0
      zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/feign/SyncDataClient.java
  15. 7 0
      zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/controller/CommonController.java

+ 1 - 0
zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dto/MeterSyncDto.java

@@ -52,5 +52,6 @@ public class MeterSyncDto {
 
     @ApiModelProperty(value = "水表当前状态,0未安装1已安装2已开户")
     private Integer currStatus;
+    private String tenantId;
 
 }

+ 5 - 0
zoniot-pay/zoniot-pay-core/src/main/java/com/zcxk/rmcp/pay/dto/pay/PayCustomerDto.java

@@ -69,6 +69,11 @@ public class PayCustomerDto {
     public String email;
     @ApiModelProperty(value = "水表电子号",position = 24)
     public String metereleno;
+    /**
+     * 公司id
+     */
+    @ApiModelProperty(value = "公司id")
+    private Integer companyOrgId;
 
     @ApiModelProperty(value = "阀控规则数组名称",position = 25)
     public String valveRuleName;

+ 1 - 1
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/DeviceMapper.xml

@@ -99,7 +99,7 @@
             <if test="devices.fileNo != null and devices.fileNo != ''"> metercode = #{devices.fileNo},</if>
             <if test="devices.deviceStatus != null "> device_status = #{devices.deviceStatus}</if>
         </set>
-        where metercode = #{devices.meterCode}
+        where metercode = #{devices.meterCode} and tenant_id=#{devices.tenantId}
     </update>
 
     <update id="updateSyncDeviceStatus">

+ 1 - 0
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/PayBaseCustomerandmeterrelaMapper.xml

@@ -282,6 +282,7 @@
         customer.valve_rule_id as "valveRuleId",
         customer.valve_rule_name as "valveRuleName",
         customer.businessstate as "businessstate",
+        customer.company_org_id,
         (select label from pay_sys_dict where type = '开户状态' and value = customer.businessstate and tenant_id = #{payBaseCustomerandmeterrela.tenantId}) as "businessName",
         customer.calculateway as "calculateway",
         (select label from pay_sys_dict where type = '结算方式' and value = customer.calculateway and tenant_id = #{payBaseCustomerandmeterrela.tenantId}) as "calculatewayName",

+ 2 - 2
zoniot-pay/zoniot-pay-core/src/main/resources/mapper/pay/PayInvoiceMapper.xml

@@ -182,12 +182,12 @@
     <update id="updatePrintInvoiceRecord">
         <if test="type != null and type == 1">
             update pay_pay_transactiondetails set invoice_id=#{invoiceId}
-            where payseriesno=#{payseriesno} and site_id=#{siteId} and customer_id=#{customerId}
+            where payseriesno=#{payseriesno}
         </if>
 
         <if test="type != null and type == 2">
             update pay_pay_received set invoice_id=#{invoiceId}
-            where payseriesno=#{payseriesno} and site_id=#{siteId} and customer_id=#{customerId}
+            where payseriesno=#{payseriesno}
         </if>
 
     </update>

+ 1 - 0
zoniot-pay/zoniot-pay-web/pom.xml

@@ -113,6 +113,7 @@
                     <include>**/*.yml</include>
                     <include>**/*.xml</include>
                     <include>**/*.tld</include>
+                    <include>**/*.xlsx</include>
                 </includes>
                 <filtering>false</filtering>
             </resource>

+ 7 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/controller/pay/BaseWaterPropertyController.java

@@ -68,6 +68,13 @@ public class BaseWaterPropertyController {
         List<BaseWaterPropertyDataDto> pageInfo =  baseWaterPropertyService.getAll();
         return new AjaxMessage(ResultStatus.OK, pageInfo);
     }
+    @ResponseBody
+    @GetMapping("/getAllPrice")
+    @ApiOperation(value = "请求用水性质组件")
+    public AjaxMessage getAllPrice(Integer companyId,Integer level){
+        List<PayBaseWaterpriceSelectDto> pageInfo =  payBaseWaterpriceService.getAllPrice(companyId,level);
+        return new AjaxMessage(ResultStatus.OK, pageInfo);
+    }
 
 
     @ResponseBody

+ 8 - 6
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/excel/download/template/InstallPlanDownloadExcelTemplate.java

@@ -1,8 +1,10 @@
 package com.zcxk.rmcp.pay.excel.download.template;
 
+
+import com.bz.zoneiot.core.common.pojo.AjaxMessage;
 import com.zcxk.rmcp.api.dto.OrgDto;
+import com.zcxk.rmcp.api.dto.product.ProductVo;
 import com.zcxk.rmcp.api.feign.SyncDataClient;
-import com.zcxk.rmcp.pay.commom.model.AjaxMessage;
 import com.zcxk.rmcp.pay.commom.util.UserUtil;
 import com.zcxk.rmcp.pay.commom.util.Util;
 import com.zcxk.rmcp.pay.dto.DeviceTypeDto;
@@ -17,6 +19,7 @@ import org.jxls.common.Context;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -88,11 +91,10 @@ public class InstallPlanDownloadExcelTemplate extends AbstractDownloadExcelTempl
         //this.context.putVar("deviceTypeList", deviceTypeList);
 
         //4、获取水表类型数据
-        AjaxMessage<List<DeviceTypeDto>> ajax =  paySyncDataService.queryWaterMeterType(null);
-        if(ajax != null){
-            if(ajax.getStatus() == 0){
-                this.context.putVar("deviceTypeList", ajax.getData());
-            }
+        List<ProductVo> productList = syncDataClient.getProductLists();
+        if(!CollectionUtils.isEmpty(productList)){
+            this.context.putVar("deviceTypeList", productList);
+
         }
     }
 }

+ 9 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/impl/pay/PayBaseWaterpriceServiceImpl.java

@@ -83,6 +83,15 @@ public class PayBaseWaterpriceServiceImpl implements PayBaseWaterpriceService {
         return payBaseWaterpriceSelectDtoList;
     }
 
+    @Override
+    public List<PayBaseWaterpriceSelectDto> getAllPrice(Integer companyId, Integer level) {
+        LoginUser loginUser = UserUtil.getCurrentUser();
+        List<PayBaseWaterpriceSelectDto> all = payBaseWaterpriceMapper.getAll(null, loginUser.getTenantId(),
+                level, loginUser.getUserCondition(), companyId);
+        return all;
+
+    }
+
     @Override
     public int add(PayBaseWaterpriceRequestDto payBaseWaterpriceRequestDto)
     {

+ 2 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/service/pay/PayBaseWaterpriceService.java

@@ -29,4 +29,6 @@ public interface PayBaseWaterpriceService {
 
     List<PayBaseWaterpriceSelectDto> getPrice(String feename, Integer pageNum,
                                               Integer pageSize, Long ladderLevel);
+
+    List<PayBaseWaterpriceSelectDto> getAllPrice(Integer companyId, Integer level);
 }

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

@@ -834,8 +834,7 @@ public class PayBaseCustomerandmeterrelaServiceImpl implements PayBaseCustomeran
     @Override
     public void downTemplate(HttpServletResponse response){
         LoginUser loginUser = UserUtil.getCurrentUser();
-        BigInteger siteId = BigInteger.valueOf(loginUser.getSiteId());
-        BigInteger customerId = BigInteger.valueOf(loginUser.getCustomerId());
+
         String filePath = this.getFilePath();
         log.info("filePath:" + filePath);
         // 实现文件下载

+ 1 - 0
zoniot-pay/zoniot-pay-xxljob-client/src/main/java/com/zcxk/rmcp/pay/job/DeviceSyncServiceHander.java

@@ -120,6 +120,7 @@ public class DeviceSyncServiceHander  {
                                     if(installDate !=null){
                                         meterSyncDtoEntity.setDateCreate(DateUtil.format(installDate));
                                     }
+                                    meterSyncDtoEntity.setTenantId(tenantId);
                                     deviceMapper.updateSync(meterSyncDtoEntity);
                                }
                             }

+ 3 - 0
zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/dto/OrgDto.java

@@ -1,5 +1,6 @@
 package com.zcxk.rmcp.api.dto;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -98,6 +99,7 @@ public class OrgDto {
     * 创建时间
     */
     @ApiModelProperty(value="创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     private LocalDateTime dateCreate;
 
     /**
@@ -107,6 +109,7 @@ public class OrgDto {
     private String createBy;
 
     @ApiModelProperty(value="")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
     private LocalDateTime dateUpdate;
 
     @ApiModelProperty(value="")

+ 8 - 0
zoniot-rmcp/zoniot-rmcp-api/src/main/java/com/zcxk/rmcp/api/feign/SyncDataClient.java

@@ -1,15 +1,20 @@
 package com.zcxk.rmcp.api.feign;
 
+import com.bz.zoneiot.core.common.pojo.AjaxMessage;
 import com.zcxk.rmcp.api.dto.OrgDto;
 import com.zcxk.rmcp.api.dto.install.InstallPlanInputDto;
 import com.zcxk.rmcp.api.dto.install.MeterSyncDto;
 import com.zcxk.rmcp.api.dto.install.MeterSyncInputDto;
 import com.zcxk.rmcp.api.dto.meterreadrecord.MeterReadRecordSyncDto;
+import com.zcxk.rmcp.api.dto.product.ProductVo;
 import com.zcxk.rmcp.api.vo.MeterReadRecordVo;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
 
 import java.util.List;
 
@@ -40,4 +45,7 @@ public interface SyncDataClient {
     List<OrgDto> getOrgs(@RequestBody OrgDto dto);
     @PostMapping("/syncData/getOrgId")
     Integer getOrgId(@RequestBody OrgDto dto);
+    @GetMapping("/common/getProductLists")
+    @ApiOperation(value = "获取产品列表")
+    List<ProductVo> getProductLists();
 }

+ 7 - 0
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/controller/CommonController.java

@@ -67,6 +67,13 @@ public class CommonController {
         List<ProductVo> list = productService.getProductList(categoryId);
         return AjaxMessage.success(list);
     }
+    @GetMapping("getProductLists")
+    @ApiOperation(value = "获取产品列表")
+    public List<ProductVo> getProductLists(
+   ) {
+        return productService.getProductList(null);
+
+    }
     @GetMapping("getCategoryList")
     @ApiOperation(value = "获取产品分类列表")
     public AjaxMessage<List<ProductCategoryVo>> getCategoryList() {