Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
| | |
| | | @Value("${aliyun.TemplateCode}") |
| | | private String TemplateCode; |
| | | |
| | | @Value("${aliyun.TemplateCodeOvertime}") |
| | | private String TemplateCodeOvertime; |
| | | |
| | | |
| | | public String getKey() { |
| | | return key; |
| | |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getTemplateCodeOvertime() { |
| | | return TemplateCodeOvertime; |
| | | } |
| | | |
| | | public void setTemplateCodeOvertime(String templateCodeOvertime) { |
| | | TemplateCodeOvertime = templateCodeOvertime; |
| | | } |
| | | |
| | | public String getScrect() { |
| | | return screct; |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "获取常见问题列表(不分页查找)",response = AutomessageCommonProblem.class) |
| | | @GetMapping("/queryList") |
| | | public ResultData queryList(@RequestParam(value = "title") String title){ |
| | | public ResultData queryList(@RequestParam(value = "title",required = false) String title){ |
| | | return ResultData.success(iAutomessageCommonProblemService.selectConfigList(title,null)); |
| | | } |
| | | |
| | |
| | | package com.dg.core.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | |
| | | import com.dg.core.db.gen.entity.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.manual.mapper.util.ConstantPropertiesUtil; |
| | | import com.dg.core.service.IGuideEvolveService; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.util.WxUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Map; |
| | | |
| | | import static com.dg.core.util.WxUtil.httpGet; |
| | | |
| | | |
| | | /** |
| | | * 工单管理 |
| | |
| | | @Autowired |
| | | private IGuideEvolveService iGuideEvolveService; |
| | | |
| | | private static String guideRepairOrderCompleteTemplateId = "7ZCHHii87rWPwVkdhZnvNiYbYi_Buq0NXO10cmUhAFk"; |
| | | |
| | | /** |
| | | * 提交导办订单 |
| | | * @return |
| | |
| | | public ResultData addOrder(@RequestBody GuideRepairOrder guideRepairOrder,@CurrentUser SysUser sysUser) { |
| | | guideRepairOrder.setSubmitUserId(sysUser.getUserId().toString()); |
| | | guideRepairOrder.setSubmitUserPhone(sysUser.getPhonenumber()); |
| | | guideRepairOrder.setSubmitType(1); |
| | | int i = iGuideRepairOrderService.addOrder(guideRepairOrder); |
| | | if (i>0){ |
| | | iGuideEvolveService.updateGuid(); |
| | |
| | | entity.setState("8"); |
| | | } |
| | | else if(StringUtils.equals(entity.getState(),"4")){ |
| | | if (order.getSubmitType().equals(1))//小程序提交 |
| | | { |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= wxUtil.getBatteryCarAccessToken(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | SysUser submitUser = iGuideRepairOrderService.getSubmitUser(order); |
| | | wxUtil.sendGuideRepairOrderComplete(submitUser.getOpenid(),accessToken,guideRepairOrderCompleteTemplateId,order); |
| | | } |
| | | //待评价 |
| | | order.setState("4"); |
| | | entity.setState("9"); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import com.dg.core.util.WxUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Autowired |
| | | IOrganizationChartService iOrganizationChartService; |
| | | |
| | | private static String guideRepairOrderCompleteTemplateId = "7ZCHHii87rWPwVkdhZnvNiYbYi_Buq0NXO10cmUhAFk"; |
| | | |
| | | /** |
| | | * 提交导办订单 |
| | | * @return |
| | |
| | | guideRepairOrder.setSubmitUserId(sysUser.getUserId().toString()); |
| | | guideRepairOrder.setSubmitUserPhone(sysUser.getPhonenumber()); |
| | | guideRepairOrder.setSubmitUserPhone(sysUser.getPhonenumber()); |
| | | guideRepairOrder.setSubmitType(2); |
| | | int i = iGuideRepairOrderService.addOrder(guideRepairOrder); |
| | | if (i>0){ |
| | | iGuideEvolveService.updateGuid(); |
| | |
| | | } |
| | | else if(StringUtils.equals(entity.getState(),"4")){ |
| | | //待评价 |
| | | if (order.getSubmitType().equals(1))//小程序提交 |
| | | { |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= wxUtil.getBatteryCarAccessToken(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | SysUser submitUser = iGuideRepairOrderService.getSubmitUser(order); |
| | | wxUtil.sendGuideRepairOrderComplete(submitUser.getOpenid(),accessToken,guideRepairOrderCompleteTemplateId,order); |
| | | } |
| | | order.setState("4"); |
| | | entity.setState("9"); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "导办事务搜索",response = QueryResults.class) |
| | | @GetMapping("/queryKeyWordList") |
| | | @Authorization |
| | | public QueryResults queryMatterNameList(@RequestParam(value = "pageNum",required = false) Integer pageNum, |
| | | @RequestParam(value = "pageSize",required = false) Integer pageSize, |
| | | @RequestParam(value = "recommendSize",required = false) Integer recommendSize, |
| | |
| | | private String detailedAddress; |
| | | |
| | | /** |
| | | * 提交方式(1 小程序 2.门户网) |
| | | */ |
| | | @ApiModelProperty("提交方式(1 小程序 2.门户网)") |
| | | private Integer submitType; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty("创建时间") |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.dg.core.db.gen.entity.AutomessageCommonProblem; |
| | | import com.dg.core.db.gen.entity.CountListNum; |
| | | import com.dg.core.db.gen.entity.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.gen.entity.*; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | List<String> ids, |
| | | Integer time); |
| | | |
| | | /** |
| | | * 获取提工单提交交人员信息 |
| | | * @return |
| | | */ |
| | | SysUser getSubmitUser(GuideRepairOrder guideRepairOrder); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.db.gen.entity.GuideEvolveEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.db.gen.mapper.ElseAccessoryMapper; |
| | | import com.dg.core.db.gen.mapper.GuideEvolveMapper; |
| | | import com.dg.core.db.gen.mapper.TransactionEventMapper; |
| | |
| | | public int countStatisticsNum(String state, String isTimeout) { |
| | | return baseMapper.countStatisticsNum(state,isTimeout); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.dg.core.db.gen.entity.*; |
| | | import com.dg.core.db.gen.mapper.*; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.util.SmsUtil; |
| | | import com.dg.core.util.Snowflake; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private GuideEvolveMapper guideEvolveMapper; |
| | | |
| | | @Resource |
| | | SmsUtil smsUtil; |
| | | |
| | | @Override |
| | | public int addOrder(GuideRepairOrder guideRepairOrder){ |
| | |
| | | entity.setFromUserId(guideRepairOrder.getSubmitUserId()); |
| | | entity.setFromDepartmentalId(guideRepairOrder.getGuideDepartmentId()); |
| | | entity.setGuidOrderNum(guideRepairOrder.getOrderNum()); |
| | | // smsUtil.sendSmsOvertime(sysUser.getPhonenumber(),guideRepairOrder.getMatterName()); |
| | | guideEvolveMapper.insertConfig(entity); |
| | | } |
| | | } |
| | |
| | | guideRepairOrderImageMapper.insert(guideRepairOrderImage); |
| | | } |
| | | } |
| | | |
| | | int ans= baseMapper.insert(guideRepairOrder); |
| | | int i = transactionEventMapper.updateById(transactionEvent); |
| | | if (ans>0&&i>0) |
| | |
| | | |
| | | @Override |
| | | public int updateConfig(GuideRepairOrder order) { |
| | | SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getGuideUserId())); |
| | | order.setGuideUserPhone(sysUser.getPhonenumber()); |
| | | if ( order.getGuideUserId()!=null&&!order.getGuideUserId().equals("")) |
| | | { |
| | | SysUser sysUser = sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId, order.getGuideUserId())); |
| | | order.setGuideUserPhone(sysUser.getPhonenumber()); |
| | | } |
| | | return baseMapper.updateConfig(order); |
| | | } |
| | | |
| | |
| | | return baseMapper.countListNum(state, ids,time); |
| | | } |
| | | |
| | | @Override |
| | | public SysUser getSubmitUser(GuideRepairOrder guideRepairOrder){ |
| | | return sysUserMapper.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId,guideRepairOrder.getSubmitUserId())); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | List<TransactionEvent> transactionEventEntities = baseMapper.queryMatterNameList(keyWord); |
| | | recommendResult.setTransactionEventList(transactionEventEntities); |
| | | for (TransactionEvent transactionEvent: transactionEventEntities) { |
| | | String[] associateNames = transactionEvent.getAssociateNames().split(","); |
| | | for (String associateName: associateNames) { |
| | | KeywordEntity keywordEntity = new KeywordEntity(); |
| | | keywordEntity.setName(associateName); |
| | | keywordEntityList.add(keywordEntity); |
| | | if (transactionEvent.getAssociateNames()!=null) { |
| | | String[] associateNames = transactionEvent.getAssociateNames().split(","); |
| | | for (String associateName : associateNames) { |
| | | KeywordEntity keywordEntity = new KeywordEntity(); |
| | | keywordEntity.setName(associateName); |
| | | keywordEntityList.add(keywordEntity); |
| | | } |
| | | } |
| | | |
| | | } |
| | | recommendResult.setKeywordEntityList(keywordEntityList); |
| | | List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByKeyWord(keyWord); |
| | |
| | | // 接收人电话 |
| | | request.putQueryParameter("PhoneNumbers", tel); |
| | | // 短信签名 |
| | | request.putQueryParameter("SignName", aliyunConfig.getSignName()); |
| | | request.putQueryParameter("SignName", "集慧科技"); |
| | | // 短信模板 |
| | | request.putQueryParameter("TemplateCode", aliyunConfig.getTemplateCode()); |
| | | Random rd = new Random(); |
| | |
| | | } |
| | | return ResultData.error("短信发送失败"); |
| | | } |
| | | |
| | | public ResultData<Object> sendSmsOvertime(String tel,String name) { |
| | | //cn-hangzhou 是阿里定义的签名固定值。填写阿里云申请短信签名的key和secret值 |
| | | DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", aliyunConfig.getKey(), aliyunConfig.getScrect()); |
| | | /*阿里云提供的短信发送api的近期的相关代码,代码以最新的阿里api提供为准*/ |
| | | IAcsClient client = new DefaultAcsClient(profile); |
| | | CommonRequest request = new CommonRequest(); |
| | | request.setSysMethod(MethodType.POST); |
| | | request.setSysDomain("dysmsapi.aliyuncs.com"); |
| | | request.setSysVersion("2017-05-25"); |
| | | request.setSysAction("SendSms"); |
| | | request.putQueryParameter("RegionId", "cn-hangzhou"); |
| | | // 接收人电话 |
| | | request.putQueryParameter("PhoneNumbers", tel); |
| | | // 短信签名 |
| | | request.putQueryParameter("SignName", "集慧科技"); |
| | | // 短信模板 |
| | | request.putQueryParameter("TemplateCode", aliyunConfig.getTemplateCodeOvertime()); |
| | | Random rd = new Random(); |
| | | // 短信内容 |
| | | request.putQueryParameter("TemplateParam", "{name:'" + name + "'}"); |
| | | // 获取短信发送的响应结果 |
| | | try { |
| | | CommonResponse rs = client.getCommonResponse(request); |
| | | LOGGER.debug(rs.getData().toString()); |
| | | // 把json格式的字符串装换成java的map的数据类型 |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | | try { |
| | | HashMap<String, Object> m = mapper.readValue(rs.getData().toString(), HashMap.class); |
| | | if (m.get("Message").equals("OK")) { |
| | | return ResultData.success("短信发送成功!"); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | return ResultData.error("短信发送失败"); |
| | | } |
| | | } catch (ClientException e) { |
| | | e.printStackTrace(); |
| | | return ResultData.error("短信发送失败"); |
| | | } |
| | | return ResultData.error("短信发送失败"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dg.core.util; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TemplateParam { |
| | | |
| | | private String key; |
| | | private String value; |
| | | |
| | | public TemplateParam(String key, String value) { |
| | | this.key = key; |
| | | this.value = value; |
| | | } |
| | | public TemplateParam() { |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dg.core.util; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | @ApiModel("微信订阅消息请求参数") |
| | | @Data |
| | | public class WxSubscribeDTO { |
| | | |
| | | @ApiModelProperty("用户在小程序的openid") |
| | | private String touser; |
| | | |
| | | @ApiModelProperty("所需下发的订阅模板id") |
| | | private String template_id; |
| | | |
| | | @ApiModelProperty("点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。") |
| | | private String page; |
| | | |
| | | @ApiModelProperty("模板内容,格式形如 { \"key1\": { \"value\": any }, \"key2\": { \"value\": any } }") |
| | | private Object data; |
| | | |
| | | @ApiModelProperty("跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版") |
| | | private String miniprogram_state; |
| | | |
| | | @ApiModelProperty("进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN") |
| | | private String lang; |
| | | |
| | | private List<TemplateParam> templateParamList; |
| | | |
| | | public String toJSON() { |
| | | StringBuffer buffer = new StringBuffer(); |
| | | buffer.append("{"); |
| | | buffer.append(String.format("\"touser\":\"%s\"", this.touser)).append(","); |
| | | buffer.append(String.format("\"template_id\":\"%s\"", this.template_id)).append(","); |
| | | if (StringUtils.isNotEmpty(this.page)) { |
| | | buffer.append(String.format("\"page\":\"%s\"", this.page)).append(","); |
| | | } |
| | | if (StringUtils.isNotEmpty(this.miniprogram_state)) { |
| | | buffer.append(String.format("\"miniprogram_state\":\"%s\"", this.miniprogram_state)).append(","); |
| | | } |
| | | buffer.append("\"data\":{"); |
| | | TemplateParam param = null; |
| | | for (int i = 0; i < this.templateParamList.size(); i++) { |
| | | param = templateParamList.get(i); |
| | | // 判断是否追加逗号 |
| | | if (i < this.templateParamList.size() - 1) { |
| | | buffer.append(String.format("\"%s\": {\"value\":\"%s\"},", param.getKey(), param.getValue())); |
| | | } else { |
| | | buffer.append(String.format("\"%s\": {\"value\":\"%s\"}", param.getKey(), param.getValue())); |
| | | } |
| | | } |
| | | buffer.append("}"); |
| | | buffer.append("}"); |
| | | return buffer.toString(); |
| | | } |
| | | } |
| | |
| | | package com.dg.core.util; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.dg.core.db.gen.entity.GuideRepairOrder; |
| | | import com.dg.core.db.manual.mapper.util.ConstantPropertiesUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.methods.HttpGet; |
| | | import org.apache.http.client.methods.HttpPost; |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.DefaultHttpClient; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class WxUtil { |
| | | |
| | | private static String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential"; |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public String getBatteryCarAccessToken() throws Exception { |
| | | public String getBatteryCarAccessToken() throws Exception { |
| | | String accessToken = "0"; |
| | | try { |
| | | // 此处APP_ID APP_SECRET 在微信小程序后端可见 |
| | | // String accessTokenUrl = String.format(TEMP_URL, APP_ID, APP_SECRET); |
| | | String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=" + ConstantPropertiesUtil.WX_OPEN_APP_ID |
| | | + "&secret=" + ConstantPropertiesUtil.WX_OPEN_APP_SECRET; |
| | | String result = this.httpGet(accessTokenUrl, null, null); |
| | | + "&secret=" +ConstantPropertiesUtil.WX_OPEN_APP_SECRET; |
| | | String result = httpGet(accessTokenUrl, null, null); |
| | | Map<String, Object> resultMap = JSON.parseObject(result, Map.class); |
| | | if (resultMap.containsKey("access_token")) { |
| | | accessToken = resultMap.get("access_token").toString(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * http请求工具类,post请求 |
| | | * |
| | | * @param url url |
| | | * @param param 参数值 仅支持String |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static String httpPost(String url, String param) throws Exception { |
| | | DefaultHttpClient defaultHttpClient = null; |
| | | BufferedReader bufferedReader = null; |
| | | try { |
| | | defaultHttpClient = new DefaultHttpClient(); |
| | | HttpPost httpPost = new HttpPost(url); |
| | | httpPost.setHeader("Content-Type", "application/json;charset=ut-8"); |
| | | if (StringUtils.isNotBlank(param)) { |
| | | HttpEntity httpEntity = new StringEntity(param, "utf-8"); |
| | | httpPost.setEntity(httpEntity); |
| | | } |
| | | HttpResponse httpResponse = defaultHttpClient.execute(httpPost); |
| | | if (httpResponse.getStatusLine().getStatusCode() != 200) { |
| | | String errorLog = "请求失败,errorCode:" + httpResponse.getStatusLine().getStatusCode(); |
| | | throw new Exception(url + errorLog); |
| | | } |
| | | // 读取返回信息 |
| | | String output; |
| | | bufferedReader = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent(), "utf-8")); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | while ((output = bufferedReader.readLine()) != null) { |
| | | stringBuilder.append(output); |
| | | } |
| | | return stringBuilder.toString(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | throw e; |
| | | } finally { |
| | | if (defaultHttpClient != null) |
| | | defaultHttpClient.getConnectionManager().shutdown(); |
| | | if (bufferedReader != null) |
| | | bufferedReader.close(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static String wxMessageModeSendUrl(String token, WxSubscribeDTO subscribeDTO) throws Exception { |
| | | String tmpurl = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN"; |
| | | String url = tmpurl.replace("ACCESS_TOKEN", token); |
| | | return httpPost(url, subscribeDTO.toJSON()); |
| | | } |
| | | |
| | | /** |
| | | * 订阅消息推送 |
| | | * |
| | | * @param accessToken |
| | | * 获取会话token |
| | | * @return 消息推送结果 |
| | | */ |
| | | static void sendSubscribe(String accessToken, WxSubscribeDTO subscribeDTO) throws Exception { |
| | | String resultString = wxMessageModeSendUrl(accessToken, subscribeDTO); |
| | | JSONObject jsonResult = JSON.parseObject(resultString); |
| | | if (jsonResult != null) { |
| | | int errorCode = jsonResult.getIntValue("errcode"); |
| | | String errorMessage = jsonResult.getString("errmsg"); |
| | | if (errorCode == 0) { |
| | | System.out.println("订阅消息推送成功,openId:" + subscribeDTO.getTouser()); |
| | | } else { |
| | | System.out.println( |
| | | "订阅消息发送失败,错误码:" + errorCode + ",错误信息:" + errorMessage + "用户openid:" + subscribeDTO.getTouser()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 工单完成推送 |
| | | * |
| | | * @param openId |
| | | * 用户openid |
| | | * @param accessToken |
| | | * token会话标识 |
| | | */ |
| | | public void sendGuideRepairOrderComplete(String openId, String accessToken, String templateId, GuideRepairOrder guideRepairOrder){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id(templateId); |
| | | subscribeDTO.setMiniprogram_state("formal");//测试,部署正式版本时候需要更改为formal |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | paras.add(new TemplateParam("thing1",guideRepairOrder.getMatterName()));//业务办理类型 |
| | | paras.add(new TemplateParam("thing3","已完成")); |
| | | paras.add(new TemplateParam("phrase8","待评价")); |
| | | calendar.setTime(new Date()); |
| | | paras.add(new TemplateParam("time4",calendar.get(Calendar.YEAR)+"年"+(calendar.get(Calendar.MONTH)+1)+"月"+calendar.get(Calendar.DATE)+"日"));//结束日期 |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | System.out.println(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | #\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u01B6\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD |
| | | aliyun.key=LTAI4G3V2Ku9oaEMKyzaY93U |
| | | aliyun.screct=HJKHAl2I7ZGtoGK3t3xXahaQSEMmys |
| | | aliyun.SignName=\u84C9\u57CE\u9633\u5149 |
| | | aliyun.TemplateCode=SMS_205623177 |
| | | aliyun.key=LTAI4Frqq9fpJek6d3bC7Rn1 |
| | | aliyun.screct=wkyvU72m6JmCFepCzGVuSpsJOsbRV0 |
| | | aliyun.SignName=???? |
| | | aliyun.TemplateCode=SMS_254326275 |
| | | aliyun.TemplateCodeOvertime=SMS_254460011 |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | wx.open.app_id=wx118de8a734d269f0 |
| | | wx.open.app_id=wx118de8a734d269f0 |
| | | wx.open.app_secret=0264342daefde5cd70a6adada09ee5b1 |
| | | wx.open.redirect_url=http://yq.cdnhxx.com:8080/ucenter/wx/callback |
| | | yygh.baseUrl=http://localhost:8080 |
| | |
| | | <id property="images" column="images" /> |
| | | <id property="video" column="video" /> |
| | | <id property="isTimeout" column="is_timeout" /> |
| | | <id property="submitType" column="submit_type" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectGuideRepairOrderVo"> |
| | |
| | | id, |
| | | order_num, |
| | | matter_id, |
| | | submit_type, |
| | | matter_name, |
| | | (select organization_name from automessage_organization_chart where a.department_id=id)organizationName, |
| | | concat( |
| | |
| | | /**调解上传图片地址列表,逗号进行分割*/ |
| | | @ApiModelProperty(name = "images", value = "调解上传图片地址列表,逗号进行分割") |
| | | private List<ComEventRequestImageVO> images; |
| | | @ApiModelProperty("处理人") |
| | | private String solver; |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "excel导入楼栋信息--注:以前的接口,不需要对接") |
| | | @PostMapping(value = "/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "房屋信息管理", operType = 0, businessType = "导入楼栋信息") |
| | | @OperLog(operModul = "房屋信息管理-导入楼栋信息", operType = 0, businessType = "导入楼栋信息") |
| | | public R downloadPopulationTemplate(@RequestParam MultipartFile file) { |
| | | InputStream inputStream; |
| | | try { |
| | |
| | | |
| | | @ApiOperation(value = "添加单元") |
| | | @PostMapping("/add/unit") |
| | | @OperLog(operModul = "房屋信息管理", operType = 1, businessType = "添加单元") |
| | | @OperLog(operModul = "房屋信息管理-添加单元", operType = 1, businessType = "添加单元") |
| | | public R addUnit(@RequestBody AddBuildingUnitDto addBuildingUnitDto) { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | |
| | | @ApiOperation(value = "修改单元") |
| | | @PostMapping("/edit/unit") |
| | | @OperLog(operModul = "房屋信息管理", operType = 2, businessType = "修改单元") |
| | | @OperLog(operModul = "房屋信息管理-修改单元", operType = 2, businessType = "修改单元") |
| | | public R editUnit(@RequestBody EditBuildingUnitDto editBuildingUnitDto) { |
| | | // 获取登陆用户绑定社区id |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | |
| | | |
| | | @ApiOperation("删除楼栋") |
| | | @GetMapping("/delete") |
| | | @OperLog(operModul = "房屋信息管理", operType = 3, businessType = "删除") |
| | | @OperLog(operModul = "房屋信息管理-删除", operType = 3, businessType = "删除") |
| | | public R delete(@RequestParam("id")Long id){ |
| | | return communityService.buildingDelete(id); |
| | | } |
| | |
| | | return partyBuildingService.deletePartyOrganization(partyOrganizationVO); |
| | | } |
| | | |
| | | //@OperLog(operModul = "党员管理", operType = 1) |
| | | @OperLog(operModul = "党员管理-新增党员", operType = 1) |
| | | @ApiOperation(value = "新增党员") |
| | | @PostMapping("addpartybuildingmember") |
| | | public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) { |
| | |
| | | |
| | | @ApiOperation(value = "excel导入实有人口") |
| | | @PostMapping(value = "/serve/import", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | @OperLog(operModul = "居民信息管理-实有人口导入", operType = 0, businessType = "实有人口导入") |
| | | public R downloadPopulationTemplate(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入吸毒人员") |
| | | @PostMapping(value = "/serve/importDrug", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "吸毒人员导入") |
| | | @OperLog(operModul = "居民信息管理-吸毒人员导入", operType = 0, businessType = "吸毒人员导入") |
| | | public R importDrug(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入社区矫正人员") |
| | | @PostMapping(value = "/serve/importCorrect", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "社区矫正人员导入") |
| | | @OperLog(operModul = "居民信息管理-社区矫正人员导入", operType = 0, businessType = "社区矫正人员导入") |
| | | public R importCorrect(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重精人员") |
| | | @PostMapping(value = "/serve/importMajor", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重精人员导入") |
| | | @OperLog(operModul = "居民信息管理-重精人员导入", operType = 0, businessType = "重精人员导入") |
| | | public R importMajor(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入邪教人员") |
| | | @PostMapping(value = "/serve/importCult", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "邪教人员导入") |
| | | @OperLog(operModul = "居民信息管理-邪教人员导入", operType = 0, businessType = "邪教人员导入") |
| | | public R importCult(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入刑释人员") |
| | | @PostMapping(value = "/serve/importRehabilitation", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "刑释人员导入") |
| | | @OperLog(operModul = "居民信息管理-刑释人员导入", operType = 0, businessType = "刑释人员导入") |
| | | public R importRehabilitation(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "excel导入重点上访人员") |
| | | @PostMapping(value = "/serve/importKey", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "重点上访人员导入") |
| | | @OperLog(operModul = "居民信息管理-重点上访人员导入", operType = 0, businessType = "重点上访人员导入") |
| | | public R importKey(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入服刑人员") |
| | | @PostMapping(value = "/serve/importSentence", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "服刑人员导入") |
| | | @OperLog(operModul = "居民信息管理-服刑人员导入", operType = 0, businessType = "服刑人员导入") |
| | | public R importSentence(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入退役军人") |
| | | @PostMapping(value = "/serve/importVeterans", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "退役军人导入") |
| | | @OperLog(operModul = "居民信息管理-退役军人导入", operType = 0, businessType = "退役军人导入") |
| | | public R importVeterans(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入残疾人") |
| | | @PostMapping(value = "/serve/importDisability", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "残疾人导入") |
| | | @OperLog(operModul = "居民信息管理-残疾人导入", operType = 0, businessType = "残疾人导入") |
| | | public R importDisability(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入低保户") |
| | | @PostMapping(value = "/serve/importLowSecurity", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "低保户导入") |
| | | @OperLog(operModul = "居民信息管理-低保户导入", operType = 0, businessType = "低保户导入") |
| | | public R importLowSecurity(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入高龄老人") |
| | | @PostMapping(value = "/serve/importElder", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "高龄老人导入") |
| | | @OperLog(operModul = "居民信息管理-高龄老人导入", operType = 0, businessType = "高龄老人导入") |
| | | public R importElder(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | @ApiOperation(value = "excel导入养老金人员") |
| | | @PostMapping(value = "/serve/importPension", consumes = "multipart/*", |
| | | headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "养老金人员导入") |
| | | @OperLog(operModul = "居民信息管理-养老金人员导入", operType = 0, businessType = "养老金人员导入") |
| | | public R importPension(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | */ |
| | | @ApiOperation(value = "excel-确认导入实有人口") |
| | | @PostMapping(value = "/import/confirm", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导入") |
| | | @OperLog(operModul = "居民信息管理-实有人口导入", operType = 0, businessType = "实有人口导入") |
| | | public R listSavePopulationConfirm(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | // 获取文件名 |
| | | String fileName = file.getOriginalFilename(); |
| | |
| | | |
| | | @ApiOperation(value = "编辑实有人口") |
| | | @PostMapping(value = "/edit") |
| | | @OperLog(operModul = "居民信息管理", operType = 2, businessType = "编辑") |
| | | @OperLog(operModul = "居民信息管理-编辑", operType = 2, businessType = "编辑") |
| | | public R editPopulationInfo(@RequestBody ComMngPopulationEditDTO populationEditDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | return communityService.editPopulation(populationEditDTO, loginUserInfo.getCommunityId()); |
| | |
| | | |
| | | @ApiOperation(value = "批量删除实有人口") |
| | | @PostMapping("/delete") |
| | | @OperLog(operModul = "居民信息管理", operType = 3, businessType = "批量删除实有人口") |
| | | @OperLog(operModul = "居民信息管理-批量删除实有人口", operType = 3, businessType = "批量删除实有人口") |
| | | public R deletePopulations(@RequestBody List<Long> ids) { |
| | | return communityService.deletePopulations(ids, this.getCommunityId()); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "实有人口-数据导出") |
| | | @PostMapping("/data/export") |
| | | @OperLog(operModul = "居民信息管理", operType = 0, businessType = "实有人口导出") |
| | | @OperLog(operModul = "居民信息管理-实有人口导出", operType = 0, businessType = "实有人口导出") |
| | | public R dataExportPopulation(@RequestBody List<Long> Ids) { |
| | | // 获取登陆用户 |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | |
| | | }else if (comEvent.getUserType().equals(2) || loginUserInfoVO.getType().equals(11)){ |
| | | //专家账号权限 |
| | | ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, loginUserInfoVO.getPhone())); |
| | | comEvent.setUserType(2); |
| | | if (nonNull(expert)){ |
| | | comEvent.setSpecialistId(expert.getId()); |
| | | } |
| | |
| | | } |
| | | }else if (loginUserInfoVO.getType().equals(3)){ |
| | | //社区后台权限 |
| | | comEvent.setUserType(4); |
| | | comEvent.setCommunityId(loginUserInfoVO.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | user.setName(comSanshuoExpertDTO.getName()); |
| | | user.setType(11); |
| | | user.setImageUrl(comSanshuoExpertDTO.getAvatar()); |
| | | user.setPhone(comSanshuoExpertDTO.getPhone()); |
| | | return R.ok(userService.sanShuoAddUser(user)); |
| | | } |
| | | }else { |
| | |
| | | if (1 == type) { |
| | | sysUserDO = userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type).eq(SysUserDO::getOpenid, name)); |
| | | }else if(isIndustryOrExpertAccount){ |
| | | }else if(isIndustryOrExpertAccount) { |
| | | //三说会堂行业分中心或专家后台账号登陆 |
| | | sysUserDO=userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount, name).eq(SysUserDO::getAppId,appId )); |
| | | } else { |
| | | sysUserDO = userDao.selectOne( |
| | | new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount, name).eq(SysUserDO::getAppId, appId)); |
| | | } |
| | | else { |
| | | LambdaQueryWrapper<SysUserDO> wrapper = new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, type); |
| | | if (type == 11) { |
| | | //只允许通过account登录 |
| | |
| | | if (nonNull(administratorsUserVO.getType())){ |
| | | sysUserDO.setType(administratorsUserVO.getType()); |
| | | } |
| | | if (nonNull(administratorsUserVO.getPhone())){ |
| | | sysUserDO.setPhone(administratorsUserVO.getPhone()); |
| | | } |
| | | userDao.insert(sysUserDO); |
| | | //分配权限 |
| | | SysUserRoleDO sysUserRole=new SysUserRoleDO(); |