| | |
| | | private String description; |
| | | private String statusCd; |
| | | private String gId; |
| | | private String gName; |
| | | private String pId; |
| | | private String pName; |
| | | private String isShowName; |
| | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | |
| | | public void setStoreTypeName(String storeTypeName) { |
| | | this.storeTypeName = storeTypeName; |
| | | } |
| | | |
| | | public String getgName() { |
| | | return gName; |
| | | } |
| | | |
| | | public void setgName(String gName) { |
| | | this.gName = gName; |
| | | } |
| | | } |
| | |
| | | private String userName; |
| | | private String roleName; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getPrivilegeFlag() { |
| | | return privilegeFlag; |
| | |
| | | this.puId = puId; |
| | | } |
| | | |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | private String isShow; |
| | | private String description; |
| | | private String gId; |
| | | private String gName; |
| | | private String pId; |
| | | private String pName; |
| | | |
| | |
| | | public void setStoreTypeName(String storeTypeName) { |
| | | this.storeTypeName = storeTypeName; |
| | | } |
| | | |
| | | public String getgName() { |
| | | return gName; |
| | | } |
| | | |
| | | public void setgName(String gName) { |
| | | this.gName = gName; |
| | | } |
| | | } |
| | |
| | | |
| | | private String relCdName; |
| | | |
| | | |
| | | private String parentTwoOrgId; |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | |
| | | public void setOrgLevel(String orgLevel) { |
| | | this.orgLevel = orgLevel; |
| | | } |
| | | |
| | | public String getParentTwoOrgId() { |
| | | return parentTwoOrgId; |
| | | } |
| | | |
| | | public void setParentTwoOrgId(String parentTwoOrgId) { |
| | | this.parentTwoOrgId = parentTwoOrgId; |
| | | } |
| | | } |
| | |
| | | <if test="lift !=null and lift != ''"> |
| | | and bu.lift= #{lift} |
| | | </if> |
| | | order by t.seq,bu.unit_num asc |
| | | order by t.seq,t.floor_num,bu.unit_num asc |
| | | <!-- <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if>limit 10;--> |
| | |
| | | <select id="getMenuInfo" parameterType="Map" resultType="Map"> |
| | | select DISTINCT t.m_id mId,t.name,t.g_id gId,t.url,t.seq,t.p_id pId,t.description,t.is_show isShow, |
| | | if(t.is_show='Y','显示','不显示') isShowName, |
| | | t.m_id pId,t.name pName,mg.name menuGroupName,mg.store_type,st.name storeTypeName |
| | | t.m_id pId,t.name pName,mg.name gName,mg.store_type,st.name storeTypeName |
| | | from m_menu t,p_privilege p,m_menu_group mg,store_type st |
| | | where t.status_cd= '0' |
| | | and p.status_cd= '0' |
| | |
| | | and mg.store_type = st.store_type_cd |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="gName !=null and gName != ''"> |
| | | and mg.name= #{gName} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | | <if test="gName !=null and gName != ''"> |
| | | and mg.name= #{gName} |
| | | </if> |
| | | <if test="name !=null and name != ''"> |
| | | and t.name like concat('%',#{name},'%') |
| | | </if> |
| | |
| | | <if test="serviceUrl != null and serviceUrl != ''"> |
| | | and s.url = #{serviceUrl} |
| | | </if> |
| | | <if test="appName != null and appName != ''"> |
| | | and a.name = #{appName} |
| | | </if> |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | <if test="serviceUrl != null and serviceUrl != ''"> |
| | | and s.url = #{serviceUrl} |
| | | </if> |
| | | <if test="appName != null and appName != ''"> |
| | | and a.name = #{appName} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | order by ff.seq,t.unit_id asc |
| | | order by ff.seq,ff.floor_num,t.unit_num asc |
| | | <!-- <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if>limit 10;--> |
| | |
| | | <!-- 保存访客信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveVisitInfo" parameterType="Map"> |
| | | insert into s_visit_info( |
| | | departure_time,v_name,ps_id,visit_gender,owner_id,reason_type,user_id,state_remark,v_id,visit_time,phone_number,free_time,visit_case,state,community_id,entourage,record_state |
| | | departure_time,v_name,ps_id,visit_gender,owner_id,reason_type,user_id,state_remark,v_id,visit_time,phone_number,free_time,visit_case,state,community_id,entourage,record_state,car_num,status_cd |
| | | ) values ( |
| | | #{departureTime},#{vName},#{psId},#{visitGender},#{ownerId},#{reasonType},#{userId},#{stateRemark},#{vId},#{visitTime},#{phoneNumber},#{freeTime},#{visitCase},#{state},#{communityId},#{entourage},#{recordState} |
| | | #{departureTime},#{vName},#{psId},#{visitGender},#{ownerId},#{reasonType},#{userId},#{stateRemark},#{vId},#{visitTime},#{phoneNumber},#{freeTime},#{visitCase},#{state},#{communityId},#{entourage},#{recordState},#{carNum},#{statusCd} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="payTime !=null and payTime != ''"> |
| | | and t.pay_time= #{payTime} |
| | | </if> |
| | | <if test="startTime !=null "> |
| | | <if test="startTime !=null and startTime != ''"> |
| | | and t.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null "> |
| | | <if test="endTime !=null and endTime != ''"> |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | <if test="detailId !=null and detailId != ''"> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null "> |
| | | <if test="startTime !=null and startTime !='' "> |
| | | and t.create_time >= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null "> |
| | | <if test="endTime !=null and endTime !=''"> |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | </select> |
| | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | super.validatePageInfo(reqJson); |
| | |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException { |
| | | RepairDto ownerRepairDto = BeanConvertUtil.covertBean(reqJson, RepairDto.class); |
| | | String userId = reqJson.getString("userId"); |
| | | String viewListStaffRepairs = MappingCache.getValue("viewListStaffRepairs"); |
| | | String viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,"VIEW_LIST_STAFF_REPAIRS"); |
| | | List<Map> privileges = null; |
| | | //这里加开关 其实让管理员看到所有单子这么做,不太优雅,建议 单独开发页面功能 |
| | | // 不要影响已办功能,add by 吴学文 2021-09-09 |
| | |
| | | ownerRepairDto.setStates(Arrays.asList(states)); |
| | | } else { |
| | | //Pc WEB维修已办 |
| | | // String[] states={RepairDto.STATE_BACK, RepairDto.STATE_TRANSFER,RepairDto.STATE_PAY, RepairDto.STATE_PAY_ERROR, RepairDto.STATE_APPRAISE, RepairDto.STATE_RETURN_VISIT, RepairDto.STATE_COMPLATE}; |
| | | // ownerRepairDto.setStates(Arrays.asList(states)); |
| | | String[] states={RepairDto.STATE_BACK, RepairDto.STATE_TRANSFER,RepairDto.STATE_PAY, RepairDto.STATE_PAY_ERROR, RepairDto.STATE_APPRAISE, RepairDto.STATE_RETURN_VISIT, RepairDto.STATE_COMPLATE}; |
| | | ownerRepairDto.setStates(Arrays.asList(states)); |
| | | } |
| | | int count = repairInnerServiceSMOImpl.queryStaffFinishRepairsCount(ownerRepairDto); |
| | | List<RepairDto> ownerRepairs = null; |
| | |
| | | @Autowired |
| | | private IMenuInnerServiceSMO menuInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | super.validatePageInfo(reqJson); |
| | |
| | | if (count > 0) { |
| | | resourceStores = BeanConvertUtil.covertBeanList(resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto), ApiResourceStoreDataVo.class); |
| | | //查询总价 |
| | | resourceStoreDto.setPage(Integer.valueOf(reqJson.getString("page"))); |
| | | subTotalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto)); |
| | | resourceStoreDto.setPage(PageDto.DEFAULT_PAGE); |
| | | totalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto)); |
| | |
| | | @Override |
| | | public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | |
| | | |
| | | String storeId = context.getReqHeaders().get("store-id"); |
| | | |
| | | PrivilegeUserDto privilegeUserDto = new PrivilegeUserDto(); |
| | | privilegeUserDto.setpId(reqJson.getString("roleId")); |
| | | privilegeUserDto.setStoreId(storeId); |
| | | privilegeUserDto.setPrivilegeFlag(PrivilegeUserDto.PRIVILEGE_FLAG_GROUP); |
| | | privilegeUserDto.setPage(Integer.parseInt(reqJson.getString("page"))); |
| | | privilegeUserDto.setRow(Integer.parseInt(reqJson.getString("row"))); |
| | | |
| | | int count = privilegeUserV1InnerServiceSMOImpl.queryPrivilegeUserInfoCount(privilegeUserDto); |
| | | |
| | |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException { |
| | | Assert.hasKeyAndValue(reqJson,"page","请求报文中未包含page节点"); |
| | | Assert.hasKeyAndValue(reqJson,"row","请求报文中未包含rows节点"); |
| | | Assert.hasKeyAndValue(reqJson, "page", "请求报文中未包含page节点"); |
| | | Assert.hasKeyAndValue(reqJson, "row", "请求报文中未包含rows节点"); |
| | | if (!reqJson.containsKey("storeId")) { |
| | | String storeId = context.getReqHeaders().get("store-id"); |
| | | reqJson.put("storeId", storeId); |
| | | } |
| | | Assert.hasKeyAndValue(reqJson,"storeId","请求报文中未包含storeId节点"); |
| | | Assert.hasKeyAndValue(reqJson, "storeId", "请求报文中未包含storeId节点"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (count > 0) { |
| | | staffs = BeanConvertUtil.covertBeanList(userInnerServiceSMOImpl.getStaffs(userDto), ApiStaffDataVo.class); |
| | | refreshInitials(staffs); |
| | | refreshOrgs(staffs,reqJson.getString("storeId")); |
| | | refreshOrgs(staffs, reqJson.getString("storeId")); |
| | | } else { |
| | | staffs = new ArrayList<>(); |
| | | } |
| | |
| | | context.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | private void refreshOrgs(List<ApiStaffDataVo> staffs,String storeId) { |
| | | if(staffs == null || staffs.size()<1){ |
| | | return ; |
| | | private void refreshOrgs(List<ApiStaffDataVo> staffs, String storeId) { |
| | | if (staffs == null || staffs.size() < 1) { |
| | | return; |
| | | } |
| | | |
| | | List<String> staffIds = new ArrayList<>(); |
| | | for(ApiStaffDataVo apiStaffDataVo : staffs){ |
| | | List<String> staffIds = new ArrayList<>(); |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | staffIds.add(apiStaffDataVo.getUserId()); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | |
| | | for(ApiStaffDataVo apiStaffDataVo : staffs){ |
| | | for(OrgStaffRelDto tmpOrgStaffRelDto : orgStaffRels){ |
| | | if(!apiStaffDataVo.getUserId().equals(tmpOrgStaffRelDto.getStaffId())){ |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | for (OrgStaffRelDto tmpOrgStaffRelDto : orgStaffRels) { |
| | | if (!apiStaffDataVo.getUserId().equals(tmpOrgStaffRelDto.getStaffId())) { |
| | | continue; |
| | | } |
| | | apiStaffDataVo.setOrgId(tmpOrgStaffRelDto.getOrgId()); |
| | | OrgDto org = new OrgDto(); |
| | | org.setOrgId(tmpOrgStaffRelDto.getOrgId()); |
| | | List<OrgDto> orgs = orgV1InnerServiceSMOImpl.queryOrgs(org); |
| | | Assert.listOnlyOne(orgs, "查询组织表错误!"); |
| | | apiStaffDataVo.setOrgId(tmpOrgStaffRelDto.getOrgId()); |
| | | apiStaffDataVo.setParentTwoOrgId(orgs.get(0).getParentOrgId()); |
| | | } |
| | | } |
| | | |
| | | for(ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | if(StringUtil.isEmpty(apiStaffDataVo.getOrgId())){ |
| | | for (ApiStaffDataVo apiStaffDataVo : staffs) { |
| | | if (StringUtil.isEmpty(apiStaffDataVo.getOrgId())) { |
| | | continue; |
| | | } |
| | | apiStaffDataVo.setParentOrgId(apiStaffDataVo.getOrgId()); |
| | | |
| | | findParents(apiStaffDataVo, orgDtos, null,0); |
| | | findParents(apiStaffDataVo, orgDtos, null, 0); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | private void findParents(ApiStaffDataVo apiStaffDataVo, List<OrgDto> orgDtos, OrgDto curOrgDto,int orgDeep) { |
| | | private void findParents(ApiStaffDataVo apiStaffDataVo, List<OrgDto> orgDtos, OrgDto curOrgDto, int orgDeep) { |
| | | for (OrgDto orgDto : orgDtos) { |
| | | curOrgDto = orgDto; |
| | | if (!apiStaffDataVo.getParentOrgId().equals(orgDto.getOrgId())) { // 他自己跳过 |
| | |
| | | } |
| | | |
| | | //如果到一级 就结束 |
| | | if(OrgDto.ORG_LEVEL_STORE.equals(apiStaffDataVo.getOrgLevel())){ |
| | | if (OrgDto.ORG_LEVEL_STORE.equals(apiStaffDataVo.getOrgLevel())) { |
| | | continue; |
| | | } |
| | | |
| | | apiStaffDataVo.setParentOrgId(orgDto.getParentOrgId()); |
| | | |
| | | if (StringUtil.isEmpty(apiStaffDataVo.getOrgName())) { |
| | | apiStaffDataVo.setOrgName(orgDto.getOrgName() ); |
| | | apiStaffDataVo.setOrgName(orgDto.getOrgName()); |
| | | continue; |
| | | } |
| | | apiStaffDataVo.setOrgName(orgDto.getOrgName() + " / " + apiStaffDataVo.getOrgName()); |
| | |
| | | return; |
| | | } |
| | | |
| | | orgDeep +=1; |
| | | orgDeep += 1; |
| | | |
| | | if(orgDeep > 20){ |
| | | return ; |
| | | if (orgDeep > 20) { |
| | | return; |
| | | } |
| | | |
| | | findParents(apiStaffDataVo, orgDtos, curOrgDto,orgDeep); |
| | | findParents(apiStaffDataVo, orgDtos, curOrgDto, orgDeep); |
| | | } |
| | | |
| | | /** |
| | | * 刷入首字母 |
| | | * |
| | | * @param staffs |
| | | */ |
| | | private void refreshInitials(List<ApiStaffDataVo> staffs) { |
| | | |
| | | for(ApiStaffDataVo staffDataVo : staffs){ |
| | | if(StringUtil.isEmpty(staffDataVo.getName())){ |
| | | for (ApiStaffDataVo staffDataVo : staffs) { |
| | | if (StringUtil.isEmpty(staffDataVo.getName())) { |
| | | continue; |
| | | } |
| | | staffDataVo.setInitials(PinYinUtil.getFirstSpell(staffDataVo.getName()).toUpperCase().charAt(0)+""); |
| | | staffDataVo.setInitials(PinYinUtil.getFirstSpell(staffDataVo.getName()).toUpperCase().charAt(0) + ""); |
| | | } |
| | | } |
| | | } |