Procházet zdrojové kódy

1、优化访客登记,增加车辆信息2、页面显示问题

xiaogang před 4 roky
rodič
revize
b61309edd4

+ 7 - 4
java110-bean/src/main/java/com/java110/dto/store/StoreDto.java

@@ -16,16 +16,19 @@ import java.util.Date;
 public class StoreDto extends PageDto implements Serializable {
 
 
-    //运营团队
-    //400000000000000002
+    //运营团队store_id
     public static final String STORE_ADMIN = "400000000000000001";
 
-    //开发
+    //开发store_id
     public static final String STORE_DEV = "400000000000000002";
-
+    //运营
     public static final String STORE_TYPE_ADMIN = "800900000001";
+    //开发
     public static final String STORE_TYPE_DEV = "800900000000";
+    //物业商户
     public static final String STORE_TYPE_PROPERTY = "800900000003";
+    //商家
+    public static final String STORE_TYPE_MALL = "800900000005";
 
     public static final String STATE_NORMAL = "48001";
     public static final String STATE_LOGIN_FAIL = "48001";

+ 54 - 0
java110-bean/src/main/java/com/java110/dto/visit/VisitDto.java

@@ -31,6 +31,12 @@ public class VisitDto extends PageDto implements Serializable {
     private String carNum;
     private String entourage;
     private String reasonType;
+    private String state;
+    private String stateName;
+    private String stateRemark;
+    private String createTime;
+    private String sameDay;
+    private String carNumNoEmpty;
 
     public String getvName() {
         return vName;
@@ -167,4 +173,52 @@ public class VisitDto extends PageDto implements Serializable {
     public void setReasonType(String reasonType) {
         this.reasonType = reasonType;
     }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStateName() {
+        return stateName;
+    }
+
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
+
+    public String getStateRemark() {
+        return stateRemark;
+    }
+
+    public void setStateRemark(String stateRemark) {
+        this.stateRemark = stateRemark;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getSameDay() {
+        return sameDay;
+    }
+
+    public void setSameDay(String sameDay) {
+        this.sameDay = sameDay;
+    }
+
+    public String getCarNumNoEmpty() {
+        return carNumNoEmpty;
+    }
+
+    public void setCarNumNoEmpty(String carNumNoEmpty) {
+        this.carNumNoEmpty = carNumNoEmpty;
+    }
 }

+ 27 - 0
java110-bean/src/main/java/com/java110/po/owner/VisitPo.java

@@ -25,6 +25,9 @@ public class VisitPo implements Serializable {
     private String carNum;
     private String entourage;
     private String reasonType;
+    private String state;
+    private String stateName;
+    private String stateRemark;
 
     public String getvId() {
         return vId;
@@ -137,4 +140,28 @@ public class VisitPo implements Serializable {
     public void setReasonType(String reasonType) {
         this.reasonType = reasonType;
     }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStateName() {
+        return stateName;
+    }
+
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
+
+    public String getStateRemark() {
+        return stateRemark;
+    }
+
+    public void setStateRemark(String stateRemark) {
+        this.stateRemark = stateRemark;
+    }
 }

+ 18 - 0
java110-bean/src/main/java/com/java110/vo/api/visit/ApiVisitDataVo.java

@@ -18,6 +18,8 @@ public class ApiVisitDataVo implements Serializable {
     private String carNum;
     private String entourage;
     private String reasonType;
+    private String state;
+    private String stateName;
 
     public String getvId() {
         return vId;
@@ -138,4 +140,20 @@ public class ApiVisitDataVo implements Serializable {
     public void setReasonType(String reasonType) {
         this.reasonType = reasonType;
     }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getStateName() {
+        return stateName;
+    }
+
+    public void setStateName(String stateName) {
+        this.stateName = stateName;
+    }
 }

+ 50 - 6
java110-db/src/main/resources/mapper/community/VisitServiceDaoImplMapper.xml

@@ -6,9 +6,11 @@
     <!-- 保存访客信息信息 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessVisitInfo" parameterType="Map">
         insert into business_visit_info(departure_time, v_name, visit_gender, owner_id, user_id, v_id, phone_number,
-                                        operate, visit_case, community_id, b_id, visit_time, car_num, entourage, reason_type)
+                                        operate, visit_case, community_id, b_id, visit_time, car_num, entourage,
+                                        reason_type, state, state_remark)
         values (#{departureTime}, #{vName}, #{visitGender}, #{ownerId}, #{userId}, #{vId}, #{phoneNumber}, #{operate},
-                #{visitCase}, #{communityId}, #{bId}, #{visitTime}, #{carNum}, #{entourage}, #{reasonType})
+                #{visitCase}, #{communityId}, #{bId}, #{visitTime}, #{carNum}, #{entourage}, #{reasonType}, #{state},
+                #{stateRemark})
     </insert>
 
     <!-- 查询访客信息信息(Business) add by wuxw 2018-07-03 -->
@@ -16,7 +18,9 @@
         select t.departure_time,t.departure_time departureTime,t.v_name,t.v_name vName,t.visit_gender,t.visit_gender
         visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time
         visitTime,t.phone_number,t.phone_number phoneNumber,t.operate,t.visit_case,t.visit_case
-        visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id ,t.car_num,t.car_num carNum,t.entourage,t.reason_type,t.reason_type reasonType
+        visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id ,t.car_num,t.car_num carNum,t.entourage,
+        t.reason_type,t.reason_type reasonType,t.state,t.state_remark,t.state_remark
+        stateRemark,t.create_time,t.create_time createTime
         from business_visit_info t
         where 1 =1
         <if test="departureTime !=null ">
@@ -58,6 +62,12 @@
         <if test="reasonType !=null and reasonType != ''">
             and t.reason_type= #{reasonType}
         </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stateRemark !=null and stateRemark != ''">
+            and t.state_remark= #{stateRemark}
+        </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
@@ -69,10 +79,11 @@
     <!-- 保存访客信息信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveVisitInfoInstance" parameterType="Map">
         insert into s_visit_info(
-        departure_time,v_name,status_cd,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,visit_case,community_id,b_id,car_num,entourage,reason_type
+        departure_time,v_name,status_cd,visit_gender,owner_id,user_id,v_id,visit_time,phone_number,visit_case,community_id,b_id,car_num,
+        entourage,reason_type,state,state_remark
         ) select
         t.departure_time,t.v_name,'0',t.visit_gender,t.owner_id,t.user_id,t.v_id,t.visit_time,t.phone_number,t.visit_case,t.community_id,t.b_id,
-        t.car_num,t.entourage,t.reason_type
+        t.car_num,t.entourage,t.reason_type,t.state,t.state_remark
         from business_visit_info t where 1=1
         <if test="departureTime !=null ">
             and t.departure_time= #{departureTime}
@@ -107,6 +118,12 @@
         <if test="reasonType !=null and reasonType != ''">
             and t.reason_type= #{reasonType}
         </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stateRemark !=null and stateRemark != ''">
+            and t.state_remark= #{stateRemark}
+        </if>
         and t.operate= 'ADD'
         <if test="visitCase !=null and visitCase != ''">
             and t.visit_case= #{visitCase}
@@ -125,8 +142,11 @@
         statusCd,t.visit_gender,t.visit_gender visitGender,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id
         userId,t.v_id,t.v_id vId,t.visit_time,t.visit_time visitTime,t.phone_number,t.phone_number
         phoneNumber,t.visit_case,t.visit_case visitCase,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,
-        t.car_num,t.car_num carNum,t.entourage,t.reason_type,t.reason_type reasonType
+        t.car_num,t.car_num carNum,t.entourage,t.reason_type,t.reason_type
+        reasonType,t.state,t.state_remark,t.state_remark stateRemark,td.name stateName,t.create_time,
+        t.create_time createTime
         from s_visit_info t
+        left join t_dict td on t.state = td.status_cd and td.table_name = 's_visit_info' and td.table_columns = 'state'
         where 1 =1
         <if test="departureTime !=null ">
             and t.departure_time= #{departureTime}
@@ -179,6 +199,18 @@
         <if test="reasonType !=null and reasonType != ''">
             and t.reason_type= #{reasonType}
         </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stateRemark !=null and stateRemark != ''">
+            and t.state_remark= #{stateRemark}
+        </if>
+        <if test="carNumNoEmpty !=null and carNumNoEmpty != ''">
+            and t.car_num!= ""
+        </if>
+        <if test="sameDay !=null and sameDay != ''">
+            and TO_DAYS(t.create_time) = TO_DAYS(NOW())
+        </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -227,6 +259,12 @@
         <if test="reasonType !=null and reasonType != ''">
             , t.reason_type= #{reasonType}
         </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="stateRemark !=null and stateRemark != ''">
+            , t.state_remark= #{stateRemark}
+        </if>
         where 1=1
         <if test="vId !=null and vId != ''">
             and t.v_id= #{vId}
@@ -292,6 +330,12 @@
         <if test="reasonType !=null and reasonType != ''">
             and t.reason_type= #{reasonType}
         </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="stateRemark !=null and stateRemark != ''">
+            and t.state_remark= #{stateRemark}
+        </if>
     </select>
 
 </mapper>

+ 8 - 1
java110-db/src/main/resources/mapper/store/StoreV1ServiceDaoImplMapper.xml

@@ -19,7 +19,14 @@
     <select id="getStoreInfo" parameterType="Map" resultType="Map">
         select t.address,t.store_type_cd,t.store_type_cd storeTypeCd,t.name,t.tel,t.status_cd,t.status_cd
         statusCd,t.state,t.store_id,t.store_id storeId,t.user_id,t.user_id userId,t.map_y,t.map_y mapY,t.map_x,t.map_x
-        mapX,t.create_time createTime,t.nearby_landmarks nearbyLandmarks,sa.value corporation,sa1.value foundingTime
+        mapX,t.create_time createTime,t.nearby_landmarks nearbyLandmarks,sa.value corporation,sa1.value foundingTime,
+        CASE t.store_type_cd
+        WHEN '800900000000' THEN '开发团队'
+        WHEN '800900000001' THEN '运营团队'
+        WHEN '800900000002' THEN '代理商'
+        WHEN '800900000003' THEN '物业商户'
+        WHEN '800900000005' THEN '商家'
+        ELSE '其他' END as storeTypeName
         from s_store t
         left join s_store_attr sa on t.store_id = sa.store_id and sa.spec_cd = '100201903001' and sa.status_cd='0'
         left join s_store_attr sa1 on t.store_id = sa1.store_id and sa1.spec_cd = '100201903003' and sa1.status_cd='0'

+ 1 - 1
service-api/src/main/java/com/java110/api/bmo/junkRequirement/impl/JunkRequirementBMOImpl.java

@@ -56,7 +56,7 @@ public class JunkRequirementBMOImpl extends ApiBaseBMO implements IJunkRequireme
 
         JunkRequirementDto junkRequirementDto = new JunkRequirementDto();
         junkRequirementDto.setJunkRequirementId(paramInJson.getString("junkRequirementId"));
-        junkRequirementDto.setCommunityId(paramInJson.getString("communityId"));
+//        junkRequirementDto.setCommunityId(paramInJson.getString("communityId"));
         List<JunkRequirementDto> junkRequirementDtos = junkRequirementInnerServiceSMOImpl.queryJunkRequirements(junkRequirementDto);
 
         Assert.listOnlyOne(junkRequirementDtos, "未找到需要修改的活动 或多条数据");

+ 2 - 2
service-api/src/main/java/com/java110/api/listener/junkRequirement/UpdateJunkRequirementListener.java

@@ -28,7 +28,7 @@ public class UpdateJunkRequirementListener extends AbstractServiceApiPlusListene
         Assert.hasKeyAndValue(reqJson, "junkRequirementId", "junkRequirementId不能为空");
 //        Assert.hasKeyAndValue(reqJson, "typeCd", "请求报文中未包含typeCd");
 //        Assert.hasKeyAndValue(reqJson, "classification", "请求报文中未包含classification");
-        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+//        Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
 //        Assert.hasKeyAndValue(reqJson, "context", "请求报文中未包含context");
 //        Assert.hasKeyAndValue(reqJson, "referencePrice", "请求报文中未包含referencePrice");
 //        Assert.hasKeyAndValue(reqJson, "publishUserId", "请求报文中未包含publishUserId");
@@ -43,7 +43,7 @@ public class UpdateJunkRequirementListener extends AbstractServiceApiPlusListene
 
         JSONObject paramObj = new JSONObject();
         paramObj.put("junkRequirementId",reqJson.getString("junkRequirementId"));
-        paramObj.put("communityId",reqJson.getString("communityId"));
+//        paramObj.put("communityId",reqJson.getString("communityId"));
         paramObj.put("state",reqJson.getString("state"));
 
         junkRequirementBMOImpl.updateJunkRequirement(paramObj, context);

+ 0 - 3
service-api/src/main/java/com/java110/api/listener/visit/ListVisitsListener.java

@@ -19,7 +19,6 @@ import com.java110.utils.constant.ServiceCodeVisitConstant;
 import java.util.ArrayList;
 import java.util.List;
 
-
 /**
  * 查询小区侦听类
  */
@@ -39,13 +38,11 @@ public class ListVisitsListener extends AbstractServiceApiListener {
         return HttpMethod.GET;
     }
 
-
     @Override
     public int getOrder() {
         return DEFAULT_ORDER;
     }
 
-
     public IVisitInnerServiceSMO getVisitInnerServiceSMOImpl() {
         return visitInnerServiceSMOImpl;
     }

+ 61 - 2
service-api/src/main/java/com/java110/api/listener/visit/SaveVisitListener.java

@@ -6,17 +6,30 @@ import com.java110.api.listener.AbstractServiceApiPlusListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.core.factory.CommunitySettingFactory;
 import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.visit.VisitDto;
 import com.java110.intf.common.IFileInnerServiceSMO;
 import com.java110.dto.file.FileDto;
+import com.java110.intf.community.IVisitInnerServiceSMO;
 import com.java110.po.file.FileRelPo;
+import com.java110.po.owner.VisitPo;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.constant.ServiceCodeVisitConstant;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.TimeZone;
 
 /**
  * 保存小区侦听
@@ -28,9 +41,18 @@ public class SaveVisitListener extends AbstractServiceApiPlusListener {
     @Autowired
     private IVisitBMO visitBMOImpl;
 
+    @Autowired
+    private IVisitInnerServiceSMO visitInnerServiceSMOImpl;
+
     @Autowired
     private IFileInnerServiceSMO fileInnerServiceSMOImpl;
 
+    //键
+    public static final String IS_NEED_REVIEW = "IS_NEED_REVIEW";
+
+    //键
+    public static final String VISIT_NUMBER = "VISIT_NUMBER";
+
     @Override
     protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
         //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
@@ -43,10 +65,40 @@ public class SaveVisitListener extends AbstractServiceApiPlusListener {
     }
 
     @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
+    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) throws ParseException {
         reqJson.put("vId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_vId));
+        //是否需要审核
+        String val = CommunitySettingFactory.getValue(reqJson.getString("communityId"), IS_NEED_REVIEW);
+        if (!StringUtils.isEmpty(val) && val.equals("true") && reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) {
+            reqJson.put("state", "0"); //0表示未审核;1表示审核通过;2表示审核拒绝
+        } else {
+            reqJson.put("state", "1");
+        }
+        //随行人数
+        if (reqJson.containsKey("entourage") && reqJson.getString("entourage").equals("")) {
+            reqJson.put("entourage", "0");
+        }
+        //是否超过规定次数
+        boolean specifiedTimes = false;
+        if (reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) {
+            //查询预约车辆登记次数
+            int number = Integer.parseInt(CommunitySettingFactory.getValue(reqJson.getString("communityId"), VISIT_NUMBER));
+            VisitDto visitDto = new VisitDto();
+            //查询当天车辆登记次数
+            visitDto.setOwnerId(reqJson.getString("ownerId"));
+            visitDto.setCarNumNoEmpty("1");
+            visitDto.setSameDay("1");
+            List<VisitDto> visitDtos = visitInnerServiceSMOImpl.queryVisits(visitDto);
+            int count = visitDtos.size();
+            //预约车辆登记次数0不做限制
+            if (count >= number && number>0) {
+                if (!StringUtils.isEmpty(val) && val.equals("false")) {
+                    reqJson.put("state", "0");
+                }
+                specifiedTimes = true;
+            }
+        }
         visitBMOImpl.addVisit(reqJson, context);
-
         if (reqJson.containsKey("photo") && !StringUtils.isEmpty(reqJson.getString("photo"))) {
             FileDto fileDto = new FileDto();
             fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id));
@@ -68,6 +120,13 @@ public class SaveVisitListener extends AbstractServiceApiPlusListener {
             FileRelPo fileRelPo = BeanConvertUtil.covertBean(businessUnit, FileRelPo.class);
             super.insert(context, fileRelPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_FILE_REL);
         }
+        commit(context);
+        if (specifiedTimes) {
+            ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "登记成功,您已经超过预约车辆登记次数限制,车辆将无法自动审核!");
+            context.setResponseEntity(responseEntity);
+            return;
+        }
+
     }
 
     @Override

+ 6 - 1
service-community/src/main/java/com/java110/community/listener/visit/AbstractVisitBusinessServiceDataFlowListener.java

@@ -50,6 +50,9 @@ public abstract class AbstractVisitBusinessServiceDataFlowListener extends Abstr
         businessVisitInfo.put("communityId", businessVisitInfo.get("community_id"));
         businessVisitInfo.put("carNum", businessVisitInfo.get("car_num"));
         businessVisitInfo.put("entourage", businessVisitInfo.get("entourage"));
+        businessVisitInfo.put("reasonType", businessVisitInfo.get("reason_type"));
+        businessVisitInfo.put("state", businessVisitInfo.get("state"));
+        businessVisitInfo.put("stateRemark", businessVisitInfo.get("state_remark"));
         businessVisitInfo.remove("bId");
         businessVisitInfo.put("statusCd", statusCd);
     }
@@ -87,7 +90,9 @@ public abstract class AbstractVisitBusinessServiceDataFlowListener extends Abstr
         currentVisitInfo.put("communityId", currentVisitInfo.get("community_id"));
         currentVisitInfo.put("carNum", currentVisitInfo.get("car_num"));
         currentVisitInfo.put("entourage", currentVisitInfo.get("entourage"));
-
+        currentVisitInfo.put("reasonType", currentVisitInfo.get("reason_type"));
+        currentVisitInfo.put("state", currentVisitInfo.get("state"));
+        currentVisitInfo.put("stateRemark", currentVisitInfo.get("state_remark"));
         currentVisitInfo.put("operate", StatusConstant.OPERATE_DEL);
         getVisitServiceDaoImpl().saveBusinessVisitInfo(currentVisitInfo);
 

+ 5 - 4
service-job/src/main/java/com/java110/job/adapt/hcGov/car/AddCarToHcGovAdapt.java

@@ -103,9 +103,11 @@ public class AddCarToHcGovAdapt extends DatabusAdaptImpl {
         CommunityDto tmpCommunityDto = communityDtos.get(0);
         String extCommunityId = "";
         String communityId = tmpCommunityDto.getCommunityId();
-        for (CommunityAttrDto communityAttrDto : tmpCommunityDto.getCommunityAttrDtos()) {
-            if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
-                extCommunityId = communityAttrDto.getValue();
+        if (tmpCommunityDto.getCommunityAttrDtos() != null && tmpCommunityDto.getCommunityAttrDtos().size() > 0) {
+            for (CommunityAttrDto communityAttrDto : tmpCommunityDto.getCommunityAttrDtos()) {
+                if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
+                    extCommunityId = communityAttrDto.getValue();
+                }
             }
         }
         //查询车辆
@@ -136,7 +138,6 @@ public class AddCarToHcGovAdapt extends DatabusAdaptImpl {
         }
 
 
-
         JSONObject body = new JSONObject();
         body.put("carNum", ownerCarDtos.get(0).getCarNum());
         body.put("carBrand", ownerCarDtos.get(0).getCarBrand());

+ 5 - 3
service-job/src/main/java/com/java110/job/adapt/hcGov/car/EditCarToHcGovAdapt.java

@@ -109,9 +109,11 @@ public class EditCarToHcGovAdapt extends DatabusAdaptImpl {
         CommunityDto tmpCommunityDto = communityDtos.get(0);
         String extCommunityId = "";
         String communityId = tmpCommunityDto.getCommunityId();
-        for (CommunityAttrDto communityAttrDto : tmpCommunityDto.getCommunityAttrDtos()) {
-            if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
-                extCommunityId = communityAttrDto.getValue();
+        if (tmpCommunityDto.getCommunityAttrDtos() != null && tmpCommunityDto.getCommunityAttrDtos().size() > 0) {
+            for (CommunityAttrDto communityAttrDto : tmpCommunityDto.getCommunityAttrDtos()) {
+                if (HcGovConstant.EXT_COMMUNITY_ID.equals(communityAttrDto.getSpecCd())) {
+                    extCommunityId = communityAttrDto.getValue();
+                }
             }
         }
         //查询车辆

+ 0 - 2
service-store/src/main/java/com/java110/store/cmd/store/ListStoresCmd.java

@@ -37,8 +37,6 @@ public class ListStoresCmd extends AbstractServiceCmdListener {
         storeDto.setStoreId(reqJson.getString("storeId"));
         List<StoreDto> storeDtos = storeV1InnerServiceSMOImpl.queryStores(storeDto);
 
-        Assert.listOnlyOne(storeDtos, "非法操作");
-
         //只有运营可以看所有 商户信息
         if (StoreDto.STORE_TYPE_ADMIN.equals(storeDtos.get(0).getStoreTypeCd())) {
             reqJson.remove("storeId");

+ 10 - 1
service-user/src/main/java/com/java110/user/cmd/user/ResetStaffPwdCmd.java

@@ -51,10 +51,19 @@ public class ResetStaffPwdCmd extends AbstractServiceCmdListener {
 
         Assert.jsonObjectHaveKey(reqJson, "staffId", "请求参数中未包含staffId 节点,请确认");
 
+        StoreUserDto storeUserDt = new StoreUserDto();
+        storeUserDt.setUserId(reqJson.getString("userId"));
+        List<StoreUserDto> storeUserDts = storeUserV1InnerServiceSMOImpl.queryStoreUsers(storeUserDt);
+        Assert.listOnlyOne(storeUserDts, "查询员工商户错误!");
+
         //首先判断是否为 运营或者开发
         //查询store 信息
         StoreDto storeDto = new StoreDto();
-        storeDto.setStoreId(reqJson.getString("storeId"));
+        if (!reqJson.containsKey("storeId")) {
+            storeDto.setStoreId(storeUserDts.get(0).getStoreId());
+        } else {
+            storeDto.setStoreId(reqJson.getString("storeId"));
+        }
         List<StoreDto> storeDtos = storeV1InnerServiceSMOImpl.queryStores(storeDto);
 
         Assert.listOnlyOne(storeDtos, "商户不存在");