Explorar o código

修改过滤条件

hym %!s(int64=3) %!d(string=hai) anos
pai
achega
b87edc6af7

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

@@ -78,5 +78,6 @@ public class PayOperatordetailsReportDto {
     @JsonIgnore
     private List<ProgramItem> programItems;
     private String tenantId;
+    private Integer companyId;
     private UserCondition userCondition;
 }

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

@@ -67,7 +67,7 @@
         WHERE
             ppt.canceledrecord_id IS NULL AND ( ppt.iscanceled = 0 OR ppt.iscanceled IS NULL )
             <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.create_date >= #{beginTime,jdbcType=TIMESTAMP}</if>
             <if test="endTime != null"> and ppt.create_date &lt;= #{endTime,jdbcType=TIMESTAMP}</if>
@@ -143,7 +143,7 @@
         <where>
             ppt.canceledrecord_id is null and ppt.iscanceled =0
             <if test="tenantId != null"> and ppt.tenant_id = #{tenantId}</if>
-
+            <if test="companyId">and ppt.company_org_id=#{companyId}</if>
             <if test="community != null and community != ''"> and scc.code = #{community,jdbcType=VARCHAR} </if>
             <if test="createBy != null"> and ppt.create_by = #{createBy} </if>
             <if test="beginTime != null"> and ppt.create_date >= #{beginTime,jdbcType=TIMESTAMP}</if>
@@ -171,6 +171,7 @@
         LEFT JOIN sc_user scu on scu.id = ppt.create_by
         WHERE ppt.canceledrecord_id is null and ppt.iscanceled =0 and ppt.transtype != 4 AND ppt.transtype != 2 and ppt.transamount>0
         <if test="tenantId != null"> and ppt.tenant_id = #{tenantId}</if>
+        <if test="companyId">and ppt.company_org_id=#{companyId}</if>
         <if test="community != null and community != ''"> and scc.code = #{community,jdbcType=VARCHAR} </if>
         <if test="createBy != null"> and ppt.create_by = #{createBy} </if>
         <if test="beginTime != null"> and ppt.create_date >= #{beginTime,jdbcType=TIMESTAMP}</if>
@@ -268,7 +269,9 @@
             <if test="inParams.tenantId != null and inParams.tenantId != ''">
                 AND ppt.tenant_id =#{inParams.tenantId}
             </if>
-
+            <if test="inParams.officeId !=null">
+              and  ppt.company_org_id=#{inParams.officeId}
+            </if>
             <if test="inParams.startDate != null and inParams.startDate != null">
                 AND DATE_FORMAT(ppt.transtime,'%Y-%m-%d') &gt;=#{inParams.startDate}
             </if>
@@ -319,6 +322,9 @@
             <if test="inParams.tenantId != null and inParams.tenantId != ''">
                 AND ppt.tenant_id =#{inParams.tenantId}
             </if>
+            <if test="inParams.officeId !=null">
+              and  ppt.company_org_id=#{inParams.officeId}
+            </if>
             <if test="inParams.startDate != null and inParams.startDate != null">
                 AND DATE_FORMAT(ppt.create_date,'%Y-%m-%d') &gt;=#{inParams.startDate}
             </if>

+ 4 - 0
zoniot-pay/zoniot-pay-web/src/main/java/com/zcxk/rmcp/pay/controller/pay/PayReportController.java

@@ -72,6 +72,7 @@ public class PayReportController {
     @ApiOperation(value="收费员明细报表")
     @GetMapping("/getPayOperatordetailsReport")
     public AjaxMessage<Pagination<PayOperatordetailsReportDto>> getPayOperatordetailsReport(
+            @ApiParam(value = "机构ID", required = false) @RequestParam(required = false) Integer officeId,
             @ApiParam(value = "小区code", required = false) @RequestParam(required = false) String communityId,
             @ApiParam(value = "收费员ID",required = false)@RequestParam(required = false) Integer operateId,
             @ApiParam(value = "小计值(与小计状态一起使用,如查询小计值大于100的)",required = false) @RequestParam(required = false) BigDecimal subtotal,
@@ -84,6 +85,7 @@ public class PayReportController {
     ){
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
         PayOperatordetailsReportDto inParams = new PayOperatordetailsReportDto();
+
         inParams.setCommunity(communityId);
         if(operateId != null)
             inParams.setCreateBy(new BigInteger(String.valueOf(operateId)));
@@ -100,6 +102,7 @@ public class PayReportController {
         if(subtotalSt != null)
             inParams.setDataType(subtotalSt);
 
+        inParams.setCompanyId(officeId);
         Pagination<PayOperatordetailsReportDto> pagination = payReportService.getPayOperatordetailsReport(inParams,pageNum,pageSize);
 
         return new AjaxMessage<>(ResultStatus.OK,pagination);
@@ -185,6 +188,7 @@ public class PayReportController {
     @ApiOperation(value = "收费员明细报表导出")
     @GetMapping("/exportOperatorde")
     public void exportOperatorde(
+            @ApiParam(value = "机构ID", required = false) @RequestParam(required = false) Integer officeId,
             @ApiParam(value = "小区code", required = false) @RequestParam(required = false) String communityId,
             @ApiParam(value = "收费员ID",required = false)@RequestParam(required = false) Integer operateId,
             @ApiParam(value = "小计值(与小计状态一起使用,如查询小计值大于100的)",required = false) @RequestParam(required = false) BigDecimal subtotal,