anderx %!s(int64=2) %!d(string=hai) anos
pai
achega
985564cb02

+ 1 - 0
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -52,6 +52,7 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		if(StringUtils.isNotBlank(alb.getAncestors())) params.put("ancestors", alb.getAncestors());
 		if(alb.getAmbManage()!=null) params.put("ambManage", alb.getAmbManage());
 		if(alb.getSeniorStaff()!=null) params.put("seniorStaff", alb.getSeniorStaff());
+		if(alb.getPublicPurview()!=null) params.put("publicPurview", alb.getPublicPurview());
 		Pagination<AdminListBo> p=(Pagination<AdminListBo>)findPage("selectAdminListByPage","selectAdminCount",params,pageNo,pageSize);
 		List<AdminListBo> list= (List<AdminListBo>) p.getList();
 		for(AdminListBo i:list){

+ 8 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -599,7 +599,7 @@
   <select id="selectAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo">
     select a.id, a.mobile, a.name, a.position, a.email, a.province, a.city, a.create_time as createTime, aa.name as superior,dep.name departmentName,
     a.superior_id as superiorId, a.department_id as departmentId, a.last_login_time as lastLoginTime, a.contact_mobile as contactMobile,
-    a.duty,a.status, a.type, ambs.id ambId,ambs.name ambName,ambs.ancestors_names ancestorsNames ,a.amb_role ambRole,a.senior_staff seniorStaff
+    a.duty,a.status, a.type, ambs.id ambId,ambs.name ambName,ambs.ancestors_names ancestorsNames ,a.amb_role ambRole,a.senior_staff seniorStaff,a.public_purview publicPurview
     from admin a
     left join admin_location al on a.id = al.admin_id
     left join admin aa on aa.id = a.superior_id
@@ -641,6 +641,10 @@
     <if test="seniorStaff != null">
       and a.senior_staff = #{seniorStaff}
     </if>
+      <if test="publicPurview != null">
+      and a.public_purview = #{publicPurview}
+    </if>
+
     <if test="ancestors != null">
       and (ambs.id=#{ancestors} or find_in_set( #{ancestors} ,ambs.ancestors))
     </if>
@@ -694,6 +698,9 @@
     <if test="seniorStaff != null">
       and a.senior_staff = #{seniorStaff}
     </if>
+    <if test="publicPurview != null">
+      and a.public_purview = #{publicPurview}
+    </if>
     <if test="ancestors != null">
       and (ambs.id=#{ancestors} or find_in_set( #{ancestors} ,ambs.ancestors))
     </if>

+ 6 - 2
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -113,8 +113,12 @@ public class AdminReleaseApiController extends CertifyApiController{
 	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
 	public Result publicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks,String uid ){
 		Result res =new Result();
-
-		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl,clockIn,clockInRemarks,uid));
+		Integer x=publicReleaseService.pushPublicReleaseClockIn(id,photoUrl,clockIn,clockInRemarks,uid);
+		if (x==-1){
+			res.getError().add(buildError("含有他人客户请先通过审核"));
+			return res;
+		}
+		res.setData(x);
 		return res;
 	}
 	/**

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

@@ -746,6 +746,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	public int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ,String uid) {
 		if (clockIn == null) clockIn = 1;
 		PublicRelease use = publicReleaseMapper.selectByPrimaryKey(id);
+		if (use.getPublicType()==1||use.getPublicType()==3){
+			return -1;
+		}
 		List<OutPublicReleaseDetails> prdList = publicReleaseDetailsMapper.selectByPCid(id);
 		String str = "";
 		boolean flag=false;