| | |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | | private String notifyWay; |
| | | |
| | | |
| | | public String getRepairName() { |
| | | return repairName; |
| | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getNotifyWay() { |
| | | return notifyWay; |
| | | } |
| | | |
| | | public void setNotifyWay(String notifyWay) { |
| | | this.notifyWay = notifyWay; |
| | | } |
| | | } |
| | |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class RepairSettingDto extends PageDto implements Serializable { |
| | | |
| | | public static final String NOTIFY_WAY_SMS = "SMS"; //短信 |
| | | public static final String NOTIFY_WAY_WECHAT = "WECHAT"; //微信 |
| | | private String repairTypeName; |
| | | private String repairType; |
| | | private String remark; |
| | |
| | | private Date createTime; |
| | | private String statusCd = "0"; |
| | | private String isShow; |
| | | |
| | | private String notifyWay; |
| | | |
| | | public String getRepairTypeName() { |
| | | return repairTypeName; |
| | |
| | | public void setIsShow(String isShow) { |
| | | this.isShow = isShow; |
| | | } |
| | | |
| | | public String getNotifyWay() { |
| | | return notifyWay; |
| | | } |
| | | |
| | | public void setNotifyWay(String notifyWay) { |
| | | this.notifyWay = notifyWay; |
| | | } |
| | | } |
| | |
| | | private String statusCd = "0"; |
| | | private String isShow; |
| | | |
| | | private String notifyWay; |
| | | |
| | | public String getRepairTypeName() { |
| | | return repairTypeName; |
| | | } |
| | |
| | | public void setIsShow(String isShow) { |
| | | this.isShow = isShow; |
| | | } |
| | | |
| | | public String getNotifyWay() { |
| | | return notifyWay; |
| | | } |
| | | |
| | | public void setNotifyWay(String notifyWay) { |
| | | this.notifyWay = notifyWay; |
| | | } |
| | | } |
| | |
| | | <select id="getRepairInfo" parameterType="Map" resultType="Map"> |
| | | select t.repair_name,t.repair_name repairName,t.appointment_time,t.appointment_time |
| | | appointmentTime,t.repair_type,t.repair_type repairType,t.context,t.repair_id,t.repair_id |
| | | repairId,t.tel,t.status_cd,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id |
| | | repairId,t.tel,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id |
| | | bId, d.name stateName,t.maintenance_type maintenanceType,t.repair_channel repairChannel, |
| | | t.repair_materials,t.repair_materials repairMaterials,t.repair_fee,t.repair_fee repairFee, |
| | | rs.repair_type_name repairTypeName,rs.repair_way repairWay,rs.return_visit_flag returnVisitFlag, |
| | | t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id repairObjId, |
| | | t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score |
| | | appraiseScore, a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore, |
| | | t.pay_type,t.pay_type payType,rs.repair_setting_type repairSettingType,d1.name repairSettingTypeName,t.create_time createTime |
| | | t.pay_type,t.pay_type payType,rs.repair_setting_type repairSettingType,rs.notify_way notifyWay,d1.name repairSettingTypeName,t.create_time createTime |
| | | <if test="staffId != null and staffId != ''"> |
| | | ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName |
| | | </if> |
| | |
| | | createTime,d.name repairWayName,d2.name repairSettingTypeName, |
| | | t.public_area,t.public_area publicArea,t.pay_fee_flag,t.pay_fee_flag payFeeFlag |
| | | ,t.price_scope,t.price_scope priceScope,t.return_visit_flag,t.return_visit_flag returnVisitFlag,d1.name |
| | | returnVisitFlagName,t.is_show,t.is_show isShow |
| | | returnVisitFlagName,t.is_show,t.is_show isShow,t.notify_way notifyWay |
| | | from r_repair_setting t |
| | | left join t_dict d on t.repair_way = d.status_cd and d.table_name = 'r_repair_setting' and d.table_columns |
| | | ='repair_way' |
| | |
| | | </if> |
| | | <if test="repairType !=null and repairType != ''"> |
| | | and t.repair_type= #{repairType} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | and t.notify_way= #{notifyWay} |
| | | </if> |
| | | <if test="repairSettingType !=null and repairSettingType != ''"> |
| | | and t.repair_setting_type= #{repairSettingType} |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="repairWay !=null and repairWay != ''"> |
| | | , t.repair_way= #{repairWay} |
| | | </if> |
| | |
| | | <if test="isShow !=null and isShow != ''"> |
| | | , t.is_show= #{isShow} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | , t.notify_way= #{notifyWay} |
| | | </if> |
| | | where 1=1 |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="settingId !=null and settingId != ''"> |
| | | and t.setting_id= #{settingId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </update> |
| | | |
| | |
| | | <if test="isShow !=null and isShow != ''"> |
| | | and t.is_show= #{isShow} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | and t.notify_way= #{notifyWay} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <insert id="saveRepairSettingInfo" parameterType="Map"> |
| | | insert into r_repair_setting(price_scope, pay_fee_flag, return_visit_flag, repair_type_name, repair_type, |
| | | remark, community_id, public_area, repair_way, repair_setting_type, setting_id, |
| | | is_show) |
| | | is_show,notify_way) |
| | | values (#{priceScope}, #{payFeeFlag}, #{returnVisitFlag}, #{repairTypeName}, #{repairType}, #{remark}, |
| | | #{communityId}, #{publicArea}, #{repairWay}, #{repairSettingType}, #{settingId}, #{isShow}) |
| | | #{communityId}, #{publicArea}, #{repairWay}, #{repairSettingType}, #{settingId}, #{isShow},#{notifyWay}) |
| | | </insert> |
| | | <!-- 查询报修设置信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRepairSettingInfo" parameterType="Map" resultType="Map"> |
| | | select t.price_scope,t.price_scope priceScope,t.pay_fee_flag,t.pay_fee_flag |
| | | payFeeFlag,t.return_visit_flag,t.return_visit_flag returnVisitFlag,t.repair_type_name,t.repair_type_name |
| | | repairTypeName,t.repair_type,t.repair_type repairType,t.remark,t.status_cd,t.status_cd |
| | | statusCd,t.community_id,t.community_id communityId,t.public_area,t.public_area |
| | | publicArea,t.repair_way,t.repair_way repairWay,t.repair_setting_type,t.repair_setting_type |
| | | repairSettingType,t.setting_id,t.setting_id settingId,t.is_show,t.is_show isShow |
| | | select t.price_scope priceScope,t.pay_fee_flag |
| | | payFeeFlag,t.return_visit_flag returnVisitFlag,t.repair_type_name |
| | | repairTypeName,t.repair_type repairType,t.remark,t.status_cd |
| | | statusCd,t.community_id communityId,t.public_area publicArea,t.repair_way repairWay,t.repair_setting_type |
| | | repairSettingType,t.setting_id settingId,t.is_show isShow,t.notify_way notifyWay |
| | | from r_repair_setting t |
| | | where 1 =1 |
| | | <if test="priceScope !=null and priceScope != ''"> |
| | | and t.price_scope= #{priceScope} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | and t.notify_way= #{notifyWay} |
| | | </if> |
| | | <if test="payFeeFlag !=null and payFeeFlag != ''"> |
| | | and t.pay_fee_flag= #{payFeeFlag} |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="publicArea !=null and publicArea != ''"> |
| | | , t.public_area= #{publicArea} |
| | | </if> |
| | |
| | | <if test="isShow !=null and isShow != ''"> |
| | | , t.is_show= #{isShow} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | , t.notify_way= #{notifyWay} |
| | | </if> |
| | | where 1=1 |
| | | <if test="settingId !=null and settingId != ''"> |
| | | and t.setting_id= #{settingId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </update> |
| | | |
| | |
| | | <if test="isShow !=null and isShow != ''"> |
| | | and t.is_show= #{isShow} |
| | | </if> |
| | | <if test="notifyWay !=null and notifyWay != ''"> |
| | | and t.notify_way= #{notifyWay} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | @Override |
| | | public List<Map> getRepairInfo(Map info) throws DAOException { |
| | | logger.debug("查询报修信息信息 入参 info : {}", info); |
| | | List<Map> businessRepairInfos = sqlSessionTemplate.selectList("repairServiceDaoImpl.getRepairInfo", info); |
| | | return businessRepairInfos; |
| | | List<Map> infos = sqlSessionTemplate.selectList("repairServiceDaoImpl.getRepairInfo", info); |
| | | return infos; |
| | | } |
| | | |
| | | /** |
| | |
| | | public List<Map> getRepairSettingInfo(Map info) throws DAOException { |
| | | logger.debug("查询报修设置信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessRepairSettingInfos = sqlSessionTemplate.selectList("repairSettingServiceDaoImpl.getRepairSettingInfo", info); |
| | | List<Map> infos = sqlSessionTemplate.selectList("repairSettingServiceDaoImpl.getRepairSettingInfo", info); |
| | | |
| | | return businessRepairSettingInfos; |
| | | return infos; |
| | | } |
| | | |
| | | |
| | |
| | | import com.java110.intf.community.IRepairSettingInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.ListUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | |
| | | List<RepairSettingDto> repairSettings = BeanConvertUtil.covertBeanList(repairSettingServiceDaoImpl.getRepairSettingInfo(BeanConvertUtil.beanCovertMap(repairSettingDto)), RepairSettingDto.class); |
| | | |
| | | if (repairSettings == null || repairSettings.size() == 0) { |
| | | if (ListUtil.isNull(repairSettings)) { |
| | | return repairSettings; |
| | | } |
| | | |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.factory.WechatFactory; |
| | | import com.java110.dto.community.CommunityMemberDto; |
| | | import com.java110.dto.complaintType.ComplaintTypeDto; |
| | | import com.java110.dto.privilege.BasePrivilegeDto; |
| | | import com.java110.dto.community.CommunityDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairSettingDto; |
| | | import com.java110.dto.wechat.SmallWeChatDto; |
| | | import com.java110.dto.wechat.SmallWechatAttrDto; |
| | | import com.java110.dto.user.StaffAppAuthDto; |
| | |
| | | import com.java110.intf.store.ISmallWechatAttrInnerServiceSMO; |
| | | import com.java110.intf.user.IStaffAppAuthInnerServiceSMO; |
| | | import com.java110.job.adapt.DatabusAdaptImpl; |
| | | import com.java110.job.msgNotify.IMsgNotify; |
| | | import com.java110.job.msgNotify.MsgNotifyFactory; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | |
| | | paramIn.put("context", context); |
| | | paramIn.put("repairName", repairName); |
| | | paramIn.put("repairId", repairDtos.get(0).getRepairId()); |
| | | sendMessage(paramIn, communityDtos.get(0)); |
| | | sendMessage(paramIn, communityDtos.get(0),repairDtos.get(0)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param paramIn |
| | | * @param communityDto |
| | | */ |
| | | private void sendMessage(JSONObject paramIn, CommunityDto communityDto) { |
| | | private void sendMessage(JSONObject paramIn, CommunityDto communityDto,RepairDto repairDto) { |
| | | |
| | | //查询小区物业公司 |
| | | CommunityMemberDto communityMemberDto = new CommunityMemberDto(); |
| | |
| | | basePrivilegeDto.setCommunityId(communityMemberDtos.get(0).getCommunityId()); |
| | | List<UserDto> userDtos = privilegeInnerServiceSMO.queryPrivilegeUsers(basePrivilegeDto); |
| | | List<String> userIds = new ArrayList<>(); |
| | | IMsgNotify msgNotify = null; |
| | | if(RepairSettingDto.NOTIFY_WAY_SMS.equals(repairDto.getNotifyWay())) { |
| | | msgNotify = MsgNotifyFactory.getMsgNotify(MsgNotifyFactory.NOTIFY_WAY_ALI); |
| | | }else if(RepairSettingDto.NOTIFY_WAY_WECHAT.equals(repairDto.getNotifyWay())){ |
| | | msgNotify = MsgNotifyFactory.getMsgNotify(MsgNotifyFactory.NOTIFY_WAY_WECHAT); |
| | | }else{ |
| | | return; |
| | | } |
| | | for (UserDto userDto : userDtos) { |
| | | if (userIds.contains(userDto.getUserId())) { |
| | | continue; |
| | |
| | | String wechatUrl = MappingCache.getValue(MappingConstant.URL_DOMAIN,"STAFF_WECHAT_URL"); |
| | | content.put("url",wechatUrl); |
| | | |
| | | MsgNotifyFactory.sendAddOwnerRepairMsg(communityDto.getCommunityId(),userDto.getUserId(),content); |
| | | msgNotify.sendAddOwnerRepairMsg(communityDto.getCommunityId(),userDto.getUserId(),content); |
| | | } |
| | | } |
| | | } |