¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.common; |
| | | |
| | | import com.ruoyi.common.config.RuoYiConfig; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.smartor.domain.HtmlContentVO; |
| | | import com.smartor.domain.smsVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | @RestController |
| | | @Api(description = "ç¥ä¿¡æ¥å£") |
| | | @RequestMapping("/sms") |
| | | public class SmsController { |
| | | @Value("${xhsmsPath}") |
| | | private String xhsmsPath; |
| | | |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation("çä¿¡åé") |
| | | @PostMapping("/send") |
| | | public AjaxResult send(@RequestBody smsVO vo) { |
| | | String sendMsg=smsUtils.sendSms(xhsmsPath,xhsmsAccount,xhsmsPwd,vo.getPhone(),vo.getContent()); |
| | | return AjaxResult.success(sendMsg); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.web.controller.smartor.tools; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.sms.smsUtils; |
| | | import com.smartor.domain.BaseSmsRequest; |
| | | import com.smartor.domain.BaseSmsaccount; |
| | | import com.smartor.domain.BatchBaseSmsRequest; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | public class BaseSmsaccountController extends BaseController { |
| | | @Autowired |
| | | private IBaseSmsaccountService baseSmsaccountService; |
| | | |
| | | @Value("${visitHosp}") |
| | | private Integer visitHosp; |
| | | |
| | | @Value("${xhsmsPath}") |
| | | private String xhsmsPath; |
| | | |
| | | @Value("${xhsmsAccount}") |
| | | private String xhsmsAccount; |
| | | |
| | | @Value("${xhsmsPwd}") |
| | | private String xhsmsPwd; |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡è´¦å·å表 |
| | |
| | | @PostMapping("/sendMsg") |
| | | @RepeatSubmit |
| | | public AjaxResult sendMsg(@RequestBody BaseSmsRequest baseSmsRequest) { |
| | | if (baseSmsaccountService.sendMsg(baseSmsRequest) == null) { |
| | | return error(); |
| | | String sendMsg=""; |
| | | if(visitHosp.equals("3")) { |
| | | try{ |
| | | JSONObject jsTemp = JSON.parseObject(baseSmsRequest.getTemplateParam()); |
| | | String content=jsTemp.getString("name"); |
| | | sendMsg= smsUtils.sendSms(xhsmsPath,xhsmsAccount,xhsmsPwd,baseSmsRequest.getPhoneNumber(),content); |
| | | } catch (Exception ex) { |
| | | return AjaxResult.error(ex.getMessage()) ; |
| | | } |
| | | return AjaxResult.success(sendMsg); |
| | | }else { |
| | | if (baseSmsaccountService.sendMsg(baseSmsRequest) == null) { |
| | | return error(); |
| | | } |
| | | return success(baseSmsaccountService.sendMsg(baseSmsRequest)); |
| | | } |
| | | return success(baseSmsaccountService.sendMsg(baseSmsRequest)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginBody; |
| | | import com.ruoyi.common.dx.MessageSend; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | # password: 123456 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # # æ°å |
| | | # url: jdbc:mysql://192.168.100.10:3306/smartor_xinhua?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # å
¬å¸äº |
| | | url: jdbc:mysql://116.62.18.175:6002/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: hxsoft |
| | | password: Smartor.2023 |
| | | # obæ°æ®åºå |
| | | # url: jdbc:mysql://127.0.0.1:2881/smartor-lisui?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | # username: root@sys |
| | | # password: |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # å
¬å¸æ¬å° |
| | | # url: jdbc:mysql://192.168.100.10:3306/smartor_lishui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # å
¬å¸äº |
| | | # url: jdbc:mysql://116.62.18.175:6002/smartor_xinhua?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: hxsoft |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # å
¬å¸æ¬å° |
| | | url: jdbc:mysql://192.168.100.10:3306/smartor_lishui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: smartor |
| | | password: Smartor.2023 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # # 髿¯æ°æ®åºé
ç½® |
| | |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | | # enabled: true |
| | | # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor |
| | | # username: sa |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # enabled: true |
| | | # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor |
| | | # username: sa |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(ä¹ä¹äºé¢) |
| | | # enabled: true |
| | |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | host: 127.0.0.1 |
| | | host: 192.168.100.10 |
| | | port: 6020 |
| | | |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | |
| | | #é访å»é¢ï¼1æ°å 2丽水 |
| | | visitHosp: 2 |
| | | |
| | | #å¤çæè¯å»ºè®®çé¨é¨ç¼ç |
| | | dealDeptCode: 40003024 |
| | | |
| | | #æ¯å¦å å¯ 0ä¸å 1å å¯ |
| | | isEncryp: 0 |
| | | isEncryp: |
| | |
| | | #app_key_yq: ZurNHpaQLq6P55YS |
| | | |
| | | #æ¬ å° ç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | | #xhsmsPath: http://192.168.2.13:8092/sendSms |
| | | #æ°åç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | | xhsmsPath: http://192.16.4.220:8092/sendSms |
| | | xhsmsPath: http://192.169.140.240:8001/sms/api/sendMessageMass |
| | | #å¸å· |
| | | xhsmsAccount: 911124 |
| | | xhsmsAccount: 300044 |
| | | #æ¥å£å¯ç |
| | | xhsmsPwd: zW5eXe |
| | | xhsmsPwd: qj0NHDegxWhj |
| | | #èææ¥å
¥ç |
| | | xhsmsjrm: 1069055 |
| | | |
| | |
| | | #admin管çåuserId |
| | | isAdmin: 1,2,3,4,5,6,7,8,9,10,11,12,13 |
| | | |
| | | #é访å»é¢ï¼1æ°å 2丽水 |
| | | visitHosp: 2 |
| | | #é访å»é¢ï¼1æ°å 2丽水 3 æå·å¸ä¸å»é¢å´å±±é¢åº |
| | | visitHosp: 3 |
| | |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: ls |
| | | active: hzszlyy |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.utils.sms; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.sign.Md5Utils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class smsUtils { |
| | | |
| | | |
| | | /** |
| | | * æå·å¸ä¸å»é¢å´å±±é¢åºæçä¿¡æ¥å£ |
| | | * |
| | | * @param url çä¿¡URL |
| | | * @param userName çä¿¡å¸å· |
| | | * @param content çä¿¡å¯ç |
| | | * @param phone ææºå·ç»åå¦ 13500000001,13500000002 |
| | | * @param content çä¿¡å
容 |
| | | * @return ä¸¤ä¸ªåæ°çå |
| | | */ |
| | | public static String sendSms(String url, String userName, String passWord, String phone, String content) { |
| | | long timestamp = new Date().getTime(); |
| | | String sign = Md5Utils.hash(userName + timestamp + Md5Utils.hash(passWord)); |
| | | content = "ãæå·å¸ä¸å»é¢å´å±±é¢åºã" + content; |
| | | String jsonMsg = "{" + |
| | | "\"userName\": \"" + userName + "\"," + |
| | | "\"content\": \"" + content + "\"," + |
| | | "\"phoneList\": [" + phone + "]," + |
| | | "\"timestamp\": " + timestamp + "," + |
| | | "\"sign\": \"" + sign + "\"" + |
| | | "}"; |
| | | return HttpUtil.postJsonRequest(url, jsonMsg); |
| | | |
| | | } |
| | | } |
| | |
| | | .antMatchers("/login", "/register", "/captchaImage", "/qrcode/generateStaticHtml", "/qrcode/getQRcode", "/qrcode/getFormDate", "/chat", "/system/file/admin/uploadFile", "/smartor/dingtalk/sendNotification", "/patient/read/patientInfo", "/socket", "/API_ESB_Service", "/API_ESB_Service/Run", "/magic/web/**", "/smartor/serviceSubtask/phoneCallBack", "/smartor/serviceSubtask/taskPull", "/smartor/serviceSubtask/phoneCallBackYQ", "/smartor/robot/callstatus", "/smartor/robot/aidialog", "/smartor/robot/cdrinfo", "/getToken", "/smartor/subtaskAnswer/getQuestionCache", "/smartor/subtaskAnswer/saveQuestionCache", "/smartor/servicetask/getScriptInfoByCondition", "/smartor/subtaskAnswer/saveQuestionAnswer", "/smartor/import/download", "/smartor/serviceSubtask/recordAccept", "/smartor/outPath/getInfoByParam", "/smartor/serviceExternal/addDeptInfo", "/smartor/serviceExternal/**", "/sso/**","/smartor/sltdHealthcareRecord/**").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll().antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() |
| | | .antMatchers("/smartor/organization/list").permitAll() |
| | | // é¤ä¸é¢å¤çææè¯·æ±å
¨é¨éè¦é´æè®¤è¯ |
| | | .anyRequest().authenticated().and().headers().frameOptions().disable(); |
| | | // æ·»å Logout filter |
| | |
| | | import com.smartor.mapper.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Override |
| | | public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) { |
| | | List<PatMedInhosp> patMedInhospList = chMapper.selectPatMedInhospList(patMedInhosp); |
| | | log.info("å¯åæ¥ç
人æ°é"+patMedInhospList.size()); |
| | | for (PatMedInhosp pm : patMedInhospList) { |
| | | PatArchive patArchive = new PatArchive(); |
| | | patArchive.setPatientno(pm.getPatno()); |
| | |
| | | |
| | | @Override |
| | | public Boolean hnDataGather(HnDataGatherVO hnDataGatherVO) { |
| | | |
| | | if(ObjectUtils.isEmpty(hnDataGatherVO.getStartTime()) ) |
| | | hnDataGatherVO.setStartTime(new Date()); |
| | | if(ObjectUtils.isEmpty(hnDataGatherVO.getEndTime()) ) |
| | | hnDataGatherVO.setEndTime(new Date()); |
| | | LocalDate startDate = hnDataGatherVO.getStartTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); |
| | | LocalDate endDate = hnDataGatherVO.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); |
| | | |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | <if test="pattype != null ">and pattype = #{pattype}</if> |
| | | <if test="patientno != null ">and patientno = CAST(#{patientno} AS INTEGER)</if> |
| | | <if test="patientno != null ">and patientno = #{patientno}</if> |
| | | <if test="patidHis != null ">and patid_his = #{patidHis}</if> |
| | | <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if> |
| | | <if test="ageUnit != null ">and age_unit = #{ageUnit}</if> |
| | |
| | | healthy_inhosp b |
| | | <where> |
| | | |
| | | <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >= |
| | | to_char(#{startOutHospTime}::date,'YYMMDD') |
| | | <if test="startOutHospTime != null "> |
| | | and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') >=to_char(#{startOutHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <= |
| | | to_char(#{endOutHospTime}::date,'YYMMDD') |
| | | <if test="endOutHospTime != null "> |
| | | and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endOutHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >= |
| | | to_char(#{startInHospTime}::date,'%y%m%d') |
| | | <if test="startInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{startInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <= |
| | | to_char(#{endInHospTime}::date,'YYMMDD') |
| | | <if test="endInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') <=to_char(#{endInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | |
| | | from healthy_outhosp |
| | | <where> |
| | | |
| | | <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >= |
| | | to_char(#{beginTime}::date,'YYMMDD') |
| | | <if test="beginTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="endTime != null ">and to_char( admitdate,'YYMMDD') <= |
| | | to_char(#{endTime}::date,'YYMMDD') |
| | | <if test="endTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | |
| | | </where> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "smsVO", description = "çä¿¡") |
| | | public class smsVO { |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "çä¿¡å
容") |
| | | private String content; |
| | | |
| | | |
| | | } |