Parcourir la source

公出列表修改

anderx il y a 4 ans
Parent
commit
218a47c644

+ 30 - 17
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -601,8 +601,14 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
     from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
     left join admin d on b.aid=d.id where 1=1
     <if test="aid != null">
-	and a.aid= #{aid}
-	</if>
+      and a.aid= #{aid}
+    </if>
+    <if test="sid != null">
+      and d.aid= #{sid}
+    </if>
+    <if test="depId != null">
+      and d.department_id = #{depId}
+    </if>
     <if test="type==1 and deps !=null">
        and d.department_id in
       <foreach close=")" collection="deps" item="deps" open="(" separator=",">
@@ -621,6 +627,7 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
 	<if test="clockIn !=null">
 	and a.clock_in= #{clockIn}
 	</if>
+    order by a.status,a.create_time desc
 	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -631,27 +638,33 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
 	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
     left join admin d on b.aid=d.id
 	where 1=1
-	<if test="aid != null">
-	and a.aid= #{aid}
-	</if>
+    <if test="aid != null">
+      and a.aid= #{aid}
+    </if>
+    <if test="sid != null">
+      and d.aid= #{sid}
+    </if>
+    <if test="depId != null">
+      and d.department_id = #{depId}
+    </if>
     <if test="type==1 and deps !=null">
       and d.department_id in
       <foreach close=")" collection="deps" item="deps" open="(" separator=",">
         #{deps.id}
       </foreach>
     </if>
-	<if test="uid != null">
-	and a.uid = #{uid}
-	</if>
-	<if test="releaseStart != null and releaseEnd != null">
-	and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})
-	</if>
-	<if test="status != null">
-	and a.status = #{status}
-	</if>
-	<if test="clockIn !=null">
-	and a.clock_in= #{clockIn}
-	</if>
+    <if test="uid != null">
+      and a.uid = #{uid}
+    </if>
+    <if test="releaseStart != null and releaseEnd != null">
+      and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})
+    </if>
+    <if test="status != null">
+      and a.status = #{status}
+    </if>
+    <if test="clockIn !=null">
+      and a.clock_in= #{clockIn}
+    </if>
   </select>
 
   <select id="checkTime" resultType="java.lang.Integer">

+ 5 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -732,7 +732,11 @@
 		from organization_contact_book a left join admin ad on a.aid=ad.id
 		 left join organization_identity b on a.uid=b.uid left join district_glossory d1 on b.location_province=d1.id
 		 left join district_glossory d2 on b.location_city=d2.id left join district_glossory d3 on b.location_area=d3.id
-		where a.uid = #{uid,jdbcType=VARCHAR} and a.aid= #{aid,jdbcType=VARCHAR} order by a.create_time desc
+		where a.uid = #{uid,jdbcType=VARCHAR}
+		  <if test="aid !=null">
+		and a.aid= #{aid,jdbcType=VARCHAR}
+		</if>
+		order by a.create_time desc
 	</select>
 
 	<select id="findAllContacts" parameterType="java.lang.String" resultType="com.goafanti.common.model.OrganizationContactBook">

+ 1 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -630,7 +630,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public List<OrganizationContactBook> findCustomerContacts(String uid) {
-		List<OrganizationContactBook> list = userMapper.findCustomerContacts(uid, TokenManager.getAdminId());
+		List<OrganizationContactBook> list = userMapper.findCustomerContacts(uid, null);
 		return list;
 	}
 

+ 17 - 0
src/main/java/com/goafanti/weChat/bo/InputPublicDtails.java

@@ -12,9 +12,26 @@ public class InputPublicDtails {
 	 * type 0个人 1部门 2全部
 	 */
 	private Integer type;
+	private String sid;
+	private String depId;
 	private Integer pageSize;
 	private Integer pageNo;
 
+	public String getSid() {
+		return sid;
+	}
+
+	public void setSid(String sid) {
+		this.sid = sid;
+	}
+
+	public String getDepId() {
+		return depId;
+	}
+
+	public void setDepId(String depId) {
+		this.depId = depId;
+	}
 
 	public Integer getType() {
 		return type;

+ 2 - 0
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -328,6 +328,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	public Object publicReleaseListDtails(InputPublicDtails in) {
 		Map<String,Object> map =new HashMap<String, Object>();
 		if(in.getAid()!=null)map.put("aid", in.getAid());
+		if(in.getSid()!=null)map.put("sid", in.getSid());
+		if(in.getDepId()!=null)map.put("depId", in.getDepId());
 		if(in.getReleaseStart()!=null)map.put("releaseStart", in.getReleaseStart());
 		if(in.getReleaseEnd()!=null)map.put("releaseEnd", in.getReleaseEnd()+" 23:59:59");
 		if(in.getUid()!=null)map.put("uid", in.getUid());