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