Merge branch 'master' of https://github.com/java110/MicroCommunity
| | |
| | | |
| | | ### 分支说明(branch) |
| | | |
| | | 分支管理说明,master 为主分支,0.2-stable 为最新稳定分支(推荐使用) 0.1-stable 为前后端不分离版本(不推荐) |
| | | 分支管理说明,master 为主分支,0.3-stable 为最新稳定分支(推荐使用) 0.1-stable 为前后端不分离版本(不推荐) |
| | | |
| | | |
| | | ### 如何开始(how to start) |
| | |
| | | * [2.2 组织和权限](org.md) |
| | | * [2.3 收费功能](fee.md) |
| | | * [2.4 报修功能](repair.md) |
| | | * [2.5 资产管理](assets.md) |
| | | |
| | | * 3.操作视频 |
| New file |
| | |
| | | ## 2.5.1 说明 |
| | | |
| | | 资产管理主要管理 小区楼栋 单元 房屋 车位 信息的管理维护,系统初始化时建议采用资产导入的方式导入,人工录入工作量比较大 |
| | | |
| | | ## 2.5.2 添加楼栋 |
| | | |
| | | 通过2.1.4 物业账号注册 步注册出来的账号登录hc小区管理系统,演示环境物业测试账号为wuxw/admin |
| | |  |
| | | |
| | | 打开菜单 资产管理 我们可以看到下面有 楼栋信息,单元信息,房屋管理 |
| | |  |
| | |
| | | private String domain; |
| | | private String description; |
| | | private String statusCd = "0"; |
| | | private String mId; |
| | | |
| | | private String createTime; |
| | | |
| | |
| | | public void setUserId(String userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getmId() { |
| | | return mId; |
| | | } |
| | | |
| | | public void setmId(String mId) { |
| | | this.mId = mId; |
| | | } |
| | | } |
| | |
| | | private String stateName; |
| | | private String storeId; |
| | | private String roomId; |
| | | private String[] roomIds; |
| | | private String roomNum; |
| | | private String unitNum; |
| | | private String floorNum; |
| | |
| | | public void setStartUserId(String startUserId) { |
| | | this.startUserId = startUserId; |
| | | } |
| | | |
| | | public String[] getRoomIds() { |
| | | return roomIds; |
| | | } |
| | | |
| | | public void setRoomIds(String[] roomIds) { |
| | | this.roomIds = roomIds; |
| | | } |
| | | } |
| | |
| | | private String stateName; |
| | | private Date scopeTime; |
| | | private String ipStaffId; |
| | | private String[] states; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public void setIpStaffId(String ipStaffId) { |
| | | this.ipStaffId = ipStaffId; |
| | | } |
| | | |
| | | public String[] getStates() { |
| | | return states; |
| | | } |
| | | |
| | | public void setStates(String[] states) { |
| | | this.states = states; |
| | | } |
| | | } |
| | |
| | | private String flowTypeName; |
| | | private String processDefinitionKey; |
| | | |
| | | private String[] flowTypes; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | |
| | | public void setProcessDefinitionKey(String processDefinitionKey) { |
| | | this.processDefinitionKey = processDefinitionKey; |
| | | } |
| | | |
| | | public String[] getFlowTypes() { |
| | | return flowTypes; |
| | | } |
| | | |
| | | public void setFlowTypes(String[] flowTypes) { |
| | | this.flowTypes = flowTypes; |
| | | } |
| | | } |
| | |
| | | machineVersion,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id |
| | | bId,t.machine_name,t.machine_name machineName,t.machine_type_cd,t.machine_type_cd |
| | | machineTypeCd,t.machine_ip,t.machine_ip machineIp,td.name machineTypeCdName, |
| | | t.state,t.location_type_cd locationTypeCd,t.location_obj_id locationObjId, |
| | | t.state,c.location_type locationTypeCd, c.location_name locationTypeName, t.location_obj_id locationObjId, |
| | | t.location_type_cd,t.location_obj_id, |
| | | td1.name stateName,t.create_time createTime,t.direction,td3.name directionName |
| | | from machine t,t_dict td,t_dict td1,t_dict td3 |
| | | from machine t,t_dict td,t_dict td1,t_dict td3, community_location c |
| | | where 1 =1 |
| | | and t.machine_type_cd=td.status_cd |
| | | and td.table_name='machine' |
| | |
| | | and t.direction = td3.status_cd |
| | | and td3.table_name='machine' |
| | | and td3.table_columns='direction' |
| | | and t.location_type_cd = c.location_id |
| | | <if test="machineMac !=null and machineMac != ''"> |
| | | and t.machine_mac= #{machineMac} |
| | | </if> |
| | |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | and t.community_id in (#{communityId},'9999') |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | and t.community_id in (#{communityId},'9999') |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | |
| | | </if> |
| | | <if test="flowType !=null and flowType != ''"> |
| | | and t.flow_type= #{flowType} |
| | | </if> |
| | | <if test="flowTypes !=null"> |
| | | and t.flow_type in |
| | | <foreach collection="flowTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | and t.flow_type= #{flowType} |
| | | </if> |
| | | |
| | | <if test="flowTypes !=null"> |
| | | and t.flow_type in |
| | | <foreach collection="flowTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="states !=null "> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="scopeTime !=null "> |
| | | and t.create_time < #{scopeTime} |
| | | and t.create_time > #{createTime} |
| | |
| | | <if test="taskId !=null and taskId != ''"> |
| | | and t.task_id= #{taskId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="states !=null "> |
| | | and t.state in |
| | | <foreach collection="states" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | |
| | | <!-- 保存路由信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBasePrivilegeInfo" parameterType="Map"> |
| | | insert into p_privilege( |
| | | p_id,name,resource,domain,description |
| | | p_id,name,resource,domain,description,m_id |
| | | ) values ( |
| | | #{pId},#{name},#{resource},#{domain},#{description} |
| | | #{pId},#{name},#{resource},#{domain},#{description},#{mId} |
| | | ) |
| | | |
| | | </insert> |
| | |
| | | </if> |
| | | <if test="domain !=null and domain != ''"> |
| | | and t.domain= #{domain} |
| | | </if> |
| | | <if test="mId !=null and mId != ''"> |
| | | and t.m_id= #{mId} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="domain !=null and domain != ''"> |
| | | and t.domain= #{domain} |
| | | </if> |
| | | <if test="mId !=null and mId != ''"> |
| | | and t.m_id= #{mId} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | |
| | | insert into m_menu( |
| | | m_id,name,g_id,url,seq,p_id,description,is_show |
| | | ) values ( |
| | | #{mId},#{name},#{gId},#{url},#{seq},#{pId},#{description},#{isShow} |
| | | #{mId},#{name},#{gId},#{url},#{seq},'-1',#{description},#{isShow} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | from m_menu t,p_privilege p |
| | | where t.status_cd= '0' |
| | | and p.status_cd= '0' |
| | | and t.p_id = p.p_id |
| | | and t.m_id = p.m_id |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | |
| | | <if test="mName !=null and mName != ''"> |
| | | and t.name like concat('%',#{mName},'%') |
| | | </if> |
| | | <if test="pId !=null and pId != ''"> |
| | | and t.p_id= #{pId} |
| | | </if> |
| | | |
| | | <if test="domain !=null and domain != ''"> |
| | | and p.domain= #{domain} |
| | | </if> |
| | |
| | | and t.m_id= #{mId} |
| | | </if> |
| | | <if test="pId !=null and pId != ''"> |
| | | and t.p_id= #{pId} |
| | | and p.p_id= #{pId} |
| | | </if> |
| | | <if test="isShow !=null and isShow != ''"> |
| | | and t.is_show= #{isShow} |
| | |
| | | from m_menu t,p_privilege p |
| | | where t.status_cd= '0' |
| | | and p.status_cd= '0' |
| | | and t.p_id = p.p_id |
| | | and t.m_id = p.m_id |
| | | <if test="gId !=null and gId != ''"> |
| | | and t.g_id= #{gId} |
| | | </if> |
| | |
| | | and p.name like concat('%',#{pName},'%') |
| | | </if> |
| | | <if test="mId !=null and mId != ''"> |
| | | and t.m_id= #{mId} |
| | | and p.m_id= #{mId} |
| | | </if> |
| | | <if test="pId !=null and pId != ''"> |
| | | and t.p_id= #{pId} |
| | |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="roomIds != null "> |
| | | and t.room_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="roomIds != null "> |
| | | and t.room_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | |
| | | public static final String TOKEN = "TOKEN"; |
| | | public static final String WELCOME = "WELCOME"; |
| | | public static final String NO_BIND_OWNER = "NO_BIND_OWNER"; // 未绑定业主 |
| | | |
| | | public static final String DEFAULT_WELCOME = "HC小区物业管理系统是由java110团队于2017年4月份发起的前后端分离、分布式架构开源项目,目前我们的代码开源在github 和gitee上,开源项目由HC小区管理系统后端,HC小区管理系统前端,HC小区管理系统业主手机版和HC小区管理系统物业手机版,业务技术交流群:827669685"; |
| | | |
| | | public static final String NO_BIND_OWNER_RESPONSE_MESSAGE = "亲,您还没有绑定业主请先<a href=\"https://owner.demo.winqi.cn/#/pages/login/login\">绑定</a>"; |
| | |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | businessInspectionTask.putAll(BeanConvertUtil.beanCovertMap(inspectionTaskDtos.get(0))); |
| | | |
| | | InspectionTaskPo inspectionTaskPo = BeanConvertUtil.covertBean(businessInspectionTask, InspectionTaskPo.class); |
| | | inspectionTaskPo.setActInsTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | inspectionTaskPo.setActUserId(paramInJson.getString("userId")); |
| | | inspectionTaskPo.setActUserName(paramInJson.getString("userName")); |
| | | inspectionTaskPo.setState(paramInJson.getString("state")); |
| | | |
| | | super.update(dataFlowContext, inspectionTaskPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_INSPECTION_TASK); |
| | | } |
| | |
| | | Assert.hasKeyAndValue(reqJson, "name", "必填,请填写权限名称"); |
| | | Assert.hasKeyAndValue(reqJson, "domain", "必填,请选择商户类型"); |
| | | Assert.hasKeyAndValue(reqJson, "resource", "必填,请选择资源路径"); |
| | | Assert.hasKeyAndValue(reqJson, "mId", "必填,菜单为空"); |
| | | |
| | | } |
| | | |
| | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.intf.common.IComplaintUserInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.store.IComplaintInnerServiceSMO; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | if (reqJson.containsKey("roomIds")) { |
| | | String[] roomIds = reqJson.getString("roomIds").split(","); |
| | | reqJson.put("roomIds",roomIds); |
| | | } |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | |
| | | int count = complaintInnerServiceSMOImpl.queryComplaintsCount(complaintDto); |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.common.IComplaintUserInnerServiceSMO; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.dto.complaint.ComplaintDto; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.intf.common.IComplaintUserInnerServiceSMO; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeComplaintConstant; |
| | |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | |
| | | } |
| | | } |
| | | |
| | | commit(context); |
| | | //commit(context); |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | complaintDto.setCurrentUserId(reqJson.getString("userId")); |
| | | complaintUserInnerServiceSMOImpl.startProcess(complaintDto); |
| | | |
| | | if (HttpStatus.OK == context.getResponseEntity().getStatusCode()) { |
| | | ComplaintDto complaintDto = BeanConvertUtil.covertBean(reqJson, ComplaintDto.class); |
| | | complaintDto.setCurrentUserId(reqJson.getString("userId")); |
| | | complaintUserInnerServiceSMOImpl.startProcess(complaintDto); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.menu.MenuDto; |
| | | import com.java110.dto.menuGroup.MenuGroupDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.ServiceCodeConfigMenuConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.utils.constant.ServiceCodeConfigMenuConstant; |
| | | |
| | | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | JSONObject viewMenuGroupInfo = getObj(infos, "viewMenuGroupInfo"); |
| | | JSONObject addMenuView = getObj(infos, "addMenuView"); |
| | | JSONObject addPrivilegeView = getObj(infos, "addPrivilegeView"); |
| | | if (!hasKey(addMenuView, "mId")) { |
| | | addPrivilegeView.put("mId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.MENU)); |
| | | } else { |
| | | addPrivilegeView.put("mId", addMenuView.getString("mId")); |
| | | } |
| | | |
| | | if (!hasKey(viewMenuGroupInfo, "gId")) { |
| | | saveMenuGroup(viewMenuGroupInfo, context); |
| | | } |
| | |
| | | if (!hasKey(addPrivilegeView, "pId")) { |
| | | saveMenuPrivilege(addPrivilegeView, context); |
| | | } |
| | | |
| | | if (!hasKey(addMenuView, "mId")) { |
| | | addMenuView.put("mId", addPrivilegeView.getString("mId")); |
| | | addMenuView.put("gId", viewMenuGroupInfo.getString("gId")); |
| | | addMenuView.put("pId", addPrivilegeView.getString("pId")); |
| | | saveMenu(addMenuView, context); |
| | |
| | | } |
| | | |
| | | private void saveMenu(Map info, DataFlowContext context) { |
| | | info.put("mId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.MENU)); |
| | | //info.put("mId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.MENU)); |
| | | info.put("userId", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | | MenuDto menuDto = BeanConvertUtil.covertBean(info, MenuDto.class); |
| | | if (menuInnerServiceSMOImpl.saveMenu(menuDto) < 1) { |
| | |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.intf.community.IInspectionTaskInnerServiceSMO; |
| | | import com.java110.dto.inspectionTask.InspectionTaskDto; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.inspectionTask.InspectionTaskDto; |
| | | import com.java110.intf.community.IInspectionTaskInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeInspectionTaskConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | |
| | | |
| | | InspectionTaskDto inspectionTaskDto = BeanConvertUtil.covertBean(reqJson, InspectionTaskDto.class); |
| | | |
| | | if (reqJson.containsKey("moreState") && reqJson.getString("moreState").contains(",")) { |
| | | inspectionTaskDto.setStates(reqJson.getString("moreState").split(",")); |
| | | } |
| | | |
| | | int count = inspectionTaskInnerServiceSMOImpl.queryInspectionTasksCount(inspectionTaskDto); |
| | | |
| | | List<ApiInspectionTaskDataVo> inspectionTasks = null; |
| | |
| | | reqJson.put("state", "20200406"); |
| | | inspectionTaskBMOImpl.updateInspectionTask(reqJson, context); |
| | | } |
| | | ResponseEntity<String> responseEntity = inspectionTaskDetailBMOImpl.callService(context, service.getServiceCode(), businesses); |
| | | context.setResponseEntity(responseEntity); |
| | | super.commit(context); |
| | | ResponseEntity<String> responseEntity = context.getResponseEntity(); |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | | return; |
| | | } |
| | | |
| | | |
| | | //判断 巡检点是否都有巡检完 |
| | | if (inspectionTaskDtos == null || inspectionTaskDtos.size() == 0) { |
| | | return; |
| | | } |
| | | // if (inspectionTaskDtos == null || inspectionTaskDtos.size() == 0) { |
| | | // return; |
| | | // } |
| | | |
| | | InspectionTaskDetailDto inspectionTaskDetailDto = new InspectionTaskDetailDto(); |
| | | inspectionTaskDetailDto.setCommunityId(reqJson.getString("communityId")); |
| | | inspectionTaskDetailDto.setTaskId(reqJson.getString("taskId")); |
| | | inspectionTaskDetailDto.setState("20200407"); |
| | | inspectionTaskDetailDto.setState("20200405"); |
| | | int count = inspectionTaskDetailInnerServiceSMOImpl.queryInspectionTaskDetailsCount(inspectionTaskDetailDto); |
| | | |
| | | if (count > 0) {//说明还没有巡检完 |
| | |
| | | businesses = new JSONArray(); |
| | | reqJson.put("state", "20200407");//巡检完成 |
| | | inspectionTaskBMOImpl.updateInspectionTask(reqJson, context); |
| | | responseEntity = inspectionTaskDetailBMOImpl.callService(context, service.getServiceCode(), businesses); |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | List<WorkflowDto> workflowDtos = null; |
| | | |
| | | if (count > 0) { |
| | | if (count > 2) { |
| | | workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, workflowDtos); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | //插入默认的工作信息 投诉流程 |
| | | WorkflowPo workflowPo = new WorkflowPo(); |
| | | workflowPo.setCommunityId(reqJson.getString("communityId")); |
| | | workflowPo.setFlowId("-1"); |
| | | workflowPo.setFlowName("投诉建议流程"); |
| | | workflowPo.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT); |
| | | workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL); |
| | | workflowPo.setStoreId(reqJson.getString("storeId")); |
| | | super.insert(context, workflowPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW); |
| | | WorkflowPo workflowPo = null; |
| | | workflowDto = new WorkflowDto(); |
| | | workflowDto.setStoreId(reqJson.getString("storeId")); |
| | | workflowDto.setCommunityId(reqJson.getString("communityId")); |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT); |
| | | count = workflowInnerServiceSMOImpl.queryWorkflowsCount(workflowDto); |
| | | if (count < 1) { |
| | | //插入默认的工作信息 投诉流程 |
| | | workflowPo = new WorkflowPo(); |
| | | workflowPo.setCommunityId(reqJson.getString("communityId")); |
| | | workflowPo.setFlowId("-1"); |
| | | workflowPo.setFlowName("投诉建议流程"); |
| | | workflowPo.setFlowType(WorkflowDto.FLOW_TYPE_COMPLAINT); |
| | | workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL); |
| | | workflowPo.setStoreId(reqJson.getString("storeId")); |
| | | super.insert(context, workflowPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW); |
| | | } |
| | | |
| | | workflowDto = new WorkflowDto(); |
| | | workflowDto.setStoreId(reqJson.getString("storeId")); |
| | |
| | | |
| | | commit(context); |
| | | |
| | | workflowDto = BeanConvertUtil.covertBean(reqJson, WorkflowDto.class); |
| | | count = workflowInnerServiceSMOImpl.queryWorkflowsCount(workflowDto); |
| | | |
| | | workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | if (reqJson.containsKey("flowType")) { |
| | | String flowType = reqJson.getString("flowType"); |
| | | if (WorkflowDto.FLOW_TYPE_PURCHASE.equals(flowType) || WorkflowDto.FLOW_TYPE_COLLECTION.equals(flowType)) { |
| | | reqJson.put("communityId", "9999"); |
| | | } |
| | | } |
| | | |
| | | WorkflowStepDto workflowStepDto = new WorkflowStepDto(); |
| | | workflowStepDto.setFlowId(reqJson.getString("flowId")); |
| | | workflowStepDto.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | package com.java110.common.api; |
| | | |
| | | import com.java110.common.bmo.workflow.IQueryWorkFlowFirstStaffBMO; |
| | | import com.java110.dto.user.StaffDto; |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/workflow") |
| | |
| | | |
| | | @RequestMapping(value = "/getFirstStaff", method = RequestMethod.GET) |
| | | public ResponseEntity<String> getFirstStaff(@RequestParam(name = "flowType") String flowType, |
| | | @RequestParam(name = "communityId") String communityId) { |
| | | @RequestParam(name = "communityId") String communityId, |
| | | @RequestHeader(value = "store-id") String storeId) { |
| | | WorkflowDto workflowDto = new WorkflowDto(); |
| | | workflowDto.setCommunityId(communityId); |
| | | workflowDto.setFlowType(flowType); |
| | | workflowDto.setStoreId(storeId); |
| | | return queryWorkFlowFirstStaffBMOImpl.query(workflowDto); |
| | | } |
| | | } |
| | |
| | | param.put("flowId", tmpWorkflowDto.getFlowId()); |
| | | param.put("seq", "1"); |
| | | param.put("communityId", tmpWorkflowDto.getCommunityId()); |
| | | param.put("storeId", tmpWorkflowDto.getStoreId()); |
| | | //查询步骤 |
| | | List<Map> workflowSteps = workflowStepServiceDaoImpl.getWorkflowStepInfo(param); |
| | | |
| | |
| | | param.put("statusCd", "0"); |
| | | param.put("communityId", tmpWorkflowDto.getCommunityId()); |
| | | param.put("stepId", workflowSteps.get(0).get("stepId")); |
| | | |
| | | param.put("storeId", tmpWorkflowDto.getStoreId()); |
| | | |
| | | List<Map> workflowStepStaffs = workflowStepStaffServiceDaoImpl.getWorkflowStepStaffInfo(param); |
| | | |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |
| | |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | pd.setApiUrl("/api/" + api); |
| | | //权限校验 |
| | | hasPrivilege(restTemplate, pd, "/" + api); |
| | | hasPrivilege(restTemplate, pd, "/callComponent/" + api); |
| | | |
| | | Object componentInstance = ApplicationContextFactory.getBean(componentCode); |
| | | |
| | |
| | | |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | //权限校验 |
| | | hasPrivilege(restTemplate, pd, "/" + componentCode + "/" + componentMethod); |
| | | hasPrivilege(restTemplate, pd, "/callComponent/" + componentCode + "/" + componentMethod); |
| | | |
| | | Object componentInstance = ApplicationContextFactory.getBean(componentCode); |
| | | |
| | |
| | | |
| | | pd = freshPageDate(request); |
| | | //权限校验 |
| | | hasPrivilege(restTemplate, pd, "/" + componentCode + "/" + componentMethod); |
| | | hasPrivilege(restTemplate, pd, "/callComponent/" + componentCode + "/" + componentMethod); |
| | | |
| | | Object componentInstance = ApplicationContextFactory.getBean(componentCode); |
| | | |
| | |
| | | Assert.hasLength(componentMethod, "参数错误,未传入调用组件方法"); |
| | | pd = freshPageDate(request); |
| | | |
| | | hasPrivilege(restTemplate, pd, "/" + componentCode + "/" + componentMethod); |
| | | hasPrivilege(restTemplate, pd, "/callComponent/download/" + componentCode + "/" + componentMethod); |
| | | |
| | | |
| | | Object componentInstance = ApplicationContextFactory.getBean(componentCode); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.base.controller.BaseController; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.front.smo.api.IApiSMO; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | |
| | | |
| | | @Autowired |
| | | private IApiSMO apiSMOImpl; |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | /** |
| | | * 资源请求 post方式 |
| | |
| | | headers.put(CommonConstant.HTTP_SERVICE, service); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_POST); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", service, postInfo, headers); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + service); |
| | | responseEntity = apiSMOImpl.doApi(postInfo, headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求post 方法[" + service + "]失败:" + postInfo, e); |
| | |
| | | headers.put(CommonConstant.HTTP_SERVICE, service); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_GET); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", "", headers); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + service); |
| | | responseEntity = apiSMOImpl.doApi(JSONObject.toJSONString(getParameterStringMap(request)), headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求get 方法[" + service + "]失败:", e); |
| | |
| | | headers.put(CommonConstant.HTTP_ACTION, action); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_GET); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", "", headers); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + resource + "/" + action); |
| | | responseEntity = apiSMOImpl.doApi(JSONObject.toJSONString(getParameterStringMap(request)), headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求get 方法[" + action + "]失败:", e); |
| | |
| | | headers.put(CommonConstant.HTTP_ACTION, action); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_POST); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", action, postInfo, headers); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + resource + "/" + action); |
| | | responseEntity = apiSMOImpl.doApi(postInfo, headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求post 方法[" + action + "]失败:" + postInfo, e); |
| | |
| | | headers.put(CommonConstant.HTTP_SERVICE, service); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_PUT); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", service, postInfo, headers); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + service ); |
| | | responseEntity = apiSMOImpl.doApi(postInfo, headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求put 方法[" + service + "]失败:", e); |
| | |
| | | headers.put(CommonConstant.HTTP_SERVICE, service); |
| | | headers.put(CommonConstant.HTTP_METHOD, CommonConstant.HTTP_METHOD_DELETE); |
| | | logger.debug("api:{} 请求报文为:{},header信息为:{}", service, "", headers); |
| | | |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | hasPrivilege(restTemplate, pd, "/app/" + service ); |
| | | responseEntity = apiSMOImpl.doApi(JSONObject.toJSONString(getParameterStringMap(request)), headers, request); |
| | | } catch (Throwable e) { |
| | | logger.error("请求delete 方法[" + service + "]失败:", e); |
| | |
| | | //判断用户是否绑定业主 |
| | | boolean bindFlag = judgeBindOwner(pd, fromUserName); |
| | | if (!bindFlag) { |
| | | responseStr = WechatFactory.formatText(toUserName, fromUserName, WechatConstant.NO_BIND_OWNER_RESPONSE_MESSAGE); |
| | | |
| | | String noBindOwnerResponseMessage = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, WechatConstant.NO_BIND_OWNER); |
| | | |
| | | if (StringUtil.isEmpty(noBindOwnerResponseMessage)) { |
| | | |
| | | noBindOwnerResponseMessage = WechatConstant.NO_BIND_OWNER_RESPONSE_MESSAGE; |
| | | } |
| | | |
| | | responseStr = WechatFactory.formatText(toUserName, fromUserName, noBindOwnerResponseMessage); |
| | | return new ResponseEntity<String>(responseStr, HttpStatus.OK); |
| | | } |
| | | |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8 |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |
| | |
| | | dataSources: |
| | | ds0: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC |
| | | username: hc_community |
| | | password: hc_community@12345678 |
| | | minIdle: 5 |
| | |
| | | # maintenanceIntervalMilliseconds: 30000 |
| | | ds1: !!com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 |
| | | url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC |
| | | username: TT |
| | | password: TT@12345678 |
| | | minIdle: 5 |