From f284ec0a229d32a72eb5ff7397f3b0507fdb2eb3 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 02 Dec 2021 17:07:23 +0800
Subject: [PATCH] 1.许可

---
 src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml |   20 +++++++++
 src/main/java/org/springblade/modules/revoke/entity/Revoke.java        |   12 ++++++
 src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml   |   27 +++++++++++++
 src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml   |   23 ++++++++++-
 src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml   |   25 +++++++++++-
 5 files changed, 101 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
index e261061..1d214ad 100644
--- a/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
+++ b/src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
@@ -42,13 +42,32 @@
 
     <select id="selectPermitPage" resultMap="permitResultMap">
         select *
-        from sys_permit
+        from sys_permit si left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction where 1=1
+        <if test="permit.ptype!=null and permit.ptype!=''">
+            and ptype=#{record.ptype}
+        </if>
+        <if test="permit.jurisdiction!=null and permit.jurisdiction != '' and permit.jurisdiction!='1372091709474910209'">
+            and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction})
+        </if>
+        <if test="permit.papprove!=null and permit.papprove!=''">
+            and papprove=#{record.papprove}
+        </if>
+        <if test="permit.xapprove!=null and permit.xapprove!=''">
+            and xapprove=#{record.xapprove}
+        </if>
+        <if test="permit.sapprove!=null and permit.sapprove!=''">
+            and sapprove=#{record.sapprove}
+        </if>
     </select>
 
     <select id="selectIn" resultType="java.util.HashMap">
         select *
         from sys_permit
-        where cardid = #{cardid} and ptype=#{type }
+        where cardid = #{cardid}
+          and ptype = #{type }
     </select>
 
     <insert id="insertPer" useGeneratedKeys="true" keyProperty="id">
diff --git a/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
index 29c4812..fc24233 100644
--- a/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
+++ b/src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
@@ -43,11 +43,32 @@
 
 
     <select id="selectRecordPage" resultMap="recordResultMap">
-        select * from sys_record
+        select * from sys_record si left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction where 1=1
+        <if test="record.ptype!=null and record.ptype!=''">
+            and ptype=#{record.ptype}
+        </if>
+        <if test="record.jurisdiction!=null and record.jurisdiction != '' and record.jurisdiction!='1372091709474910209'">
+            and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction})
+        </if>
+        <if test="record.papprove!=null and record.papprove!=''">
+            and papprove=#{record.papprove}
+        </if>
+        <if test="record.xapprove!=null and record.xapprove!=''">
+            and xapprove=#{record.xapprove}
+        </if>
+        <if test="record.sapprove!=null and record.sapprove!=''">
+            and sapprove=#{record.sapprove}
+        </if>
     </select>
 
     <select id="selectIn" resultType="java.util.HashMap">
-        select * from sys_record where cardid=#{cardid} and ptype=#{type}
+        select *
+        from sys_record
+        where cardid = #{cardid}
+          and ptype = #{type}
     </select>
 
 </mapper>
diff --git a/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
index 7438b7b..d4ed938 100644
--- a/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
+++ b/src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
@@ -43,7 +43,25 @@
 
 
     <select id="selectRecordkPage" resultMap="recordkResultMap">
-        select * from sys_recordk
+        select * from sys_recordk si left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction where 1=1
+        <if test="recordk.ptype!=null and recordk.ptype!=''">
+            and ptype=#{record.ptype}
+        </if>
+        <if test="recordk.jurisdiction!=null and recordk.jurisdiction != '' and recordk.jurisdiction!='1372091709474910209'">
+            and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction})
+        </if>
+        <if test="recordk.papprove!=null and recordk.papprove!=''">
+            and papprove=#{record.papprove}
+        </if>
+        <if test="recordk.xapprove!=null and recordk.xapprove!=''">
+            and xapprove=#{record.xapprove}
+        </if>
+        <if test="recordk.sapprove!=null and recordk.sapprove!=''">
+            and sapprove=#{record.sapprove}
+        </if>
     </select>
 
     <select id="selectIn" resultType="java.util.HashMap">
diff --git a/src/main/java/org/springblade/modules/revoke/entity/Revoke.java b/src/main/java/org/springblade/modules/revoke/entity/Revoke.java
index 863fe5f..5bbd80b 100644
--- a/src/main/java/org/springblade/modules/revoke/entity/Revoke.java
+++ b/src/main/java/org/springblade/modules/revoke/entity/Revoke.java
@@ -150,5 +150,17 @@
 	@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
 	@DateTimeFormat(pattern = "yyyy-MM-dd")
 	private Date overtime;
+	//派出所审批
+	private String papprove;
+	//县审批
+	private String xapprove;
+	//市审批
+	private String sapprove;
+	//派出意见
+	private String popinion;
+	//县意见
+	private String xopinion;
+	//市意见
+	private String sopinion;
 
 }
diff --git a/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
index d09a27a..e07c129 100644
--- a/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
+++ b/src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
@@ -33,11 +33,36 @@
         <result column="approve" property="approve"/>
         <result column="jurisdiction" property="jurisdiction"/>
         <result column="overtime" property="overtime"/>
+        <result column="approve" property="approve"/>
+        <result column="papprove" property="papprove"/>
+        <result column="xapprove" property="xapprove"/>
+        <result column="sapprove" property="sapprove"/>
+        <result column="popinion" property="popinion"/>
+        <result column="xopinion" property="xopinion"/>
+        <result column="sopinion" property="sopinion"/>
     </resultMap>
 
 
     <select id="selectRevokePage" resultMap="revokeResultMap">
-        select * from sys_revoke
+        select * from sys_revoke si left join
+        sys_jurisdiction sj
+        on
+        sj.id = si.jurisdiction where 1=1
+        <if test="revoke.ptype!=null and revoke.ptype!=''">
+            and ptype=#{record.ptype}
+        </if>
+        <if test="revoke.jurisdiction!=null and revoke.jurisdiction != '' and revoke.jurisdiction!='1372091709474910209'">
+            and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction})
+        </if>
+        <if test="revoke.papprove!=null and revoke.papprove!=''">
+            and papprove=#{record.papprove}
+        </if>
+        <if test="revoke.xapprove!=null and revoke.xapprove!=''">
+            and xapprove=#{record.xapprove}
+        </if>
+        <if test="revoke.sapprove!=null and revoke.sapprove!=''">
+            and sapprove=#{record.sapprove}
+        </if>
     </select>
     <select id="selectIn" resultType="java.util.HashMap">
         select * from sys_revoke where cardid=#{cardid} and ptype=#{type}

--
Gitblit v1.9.3