| | |
| | | <failOnMissingWebXml>false</failOnMissingWebXml> |
| | | <warName>${project.artifactId}</warName> |
| | | </configuration> |
| | | </plugin> |
| | | </plugin> |
| | | </plugins> |
| | | <resources> |
| | | <resource> |
| | |
| | | }else { |
| | | dto.setStatus(1); |
| | | } |
| | | crmClinicService.addClinic(dto); |
| | | WxAppletTools wxAppletTools = new WxAppletTools(restTemplate, wxConfig, redisCache); |
| | | // 获取access_token |
| | | String accessToken = wxAppletTools.getAccessToken(); |
| | |
| | | String url = WxConstant.CREATE_CODE_URL.replace("ACCESS_TOKEN", accessToken); |
| | | // 发送请求 |
| | | try { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("path", ""); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("page", "pages/home/home"); |
| | | map.put("scene", "clinicId=" + dto.getId()); |
| | | map.put("check_path", false); |
| | | map.put("env_version", "release"); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity requestEntity = new HttpEntity(map, headers); |
| | |
| | | } catch (Exception e) { |
| | | log.error("生成小程序码失败:{}", e.getMessage()); |
| | | } |
| | | crmClinicService.addClinic(dto); |
| | | crmClinicService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysAppUserVO>> pageList(@RequestBody TSysAppUserQuery query) { |
| | | Integer roleType = tokenService.getLoginUser().getUser().getRoleType(); |
| | | Long userId = tokenService.getLoginUser().getUserId(); |
| | | query.setRoleType(roleType); |
| | | if(roleType == 5){ |
| | | TCrmClinic crmClinic = crmClinicService.getOne(Wrappers.lambdaQuery(TCrmClinic.class) |
| | | .eq(TCrmClinic::getUserId, userId) |
| | | .last("LIMIT 1")); |
| | | query.setClinicId(crmClinic.getId()); |
| | | } |
| | | return R.ok(sysAppUserService.pageList(query)); |
| | | } |
| | | |
| | |
| | | @Log(title = "用户管理信息-新增用户管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加用户管理") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@Validated @RequestBody TSysAppUser dto) { |
| | | public R<String> add(@Validated @RequestBody TSysAppUser dto) { |
| | | if (sysAppUserService.isExit(dto)) { |
| | | return R.fail("用户管理信息已存在"); |
| | | } |
| | |
| | | String identifierNumber = UUID.randomUUID().toString().replace("-", ""); |
| | | dto.setIdentifierNumber(identifierNumber); |
| | | dto.setClinicId(crmClinic.getId()); |
| | | return R.ok(sysAppUserService.save(dto)); |
| | | sysAppUserService.save(dto); |
| | | return R.ok(dto.getId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | prescriptionNumber = prescriptionNumber.substring(prescriptionNumber.length() - 6); |
| | | prescriptionNumber = String.format("%06d", Integer.parseInt(prescriptionNumber) + 1); |
| | | dto.setPrescriptionNumber(prescriptionNumber); |
| | | dto.setHospitalizationNumber(prescriptionNumber); |
| | | }else{ |
| | | dto.setPrescriptionNumber("000001"); |
| | | dto.setHospitalizationNumber("000001"); |
| | | } |
| | | dto.setInspectionType(1); |
| | | return R.ok(sysInspectionService.save(dto)); |
| | |
| | | |
| | | // 创建新的run并设置文本 |
| | | XWPFRun newRun = paragraph.insertNewRun(info.startRun); |
| | | newRun.setText(info.replacementText); |
| | | // 如果有回车符,则插入一个空行 |
| | | if (info.replacementText.contains("\n") || info.replacementText.contains("\r") || info.replacementText.contains("\r\n")) { |
| | | log.info("info.originalText=================: {}", info.replacementText); |
| | | // 每一个\n,\r,\r\n都插入一个空行,并且最后的文本进行换行,为一整个文本 |
| | | String[] s = info.replacementText.split("\r\n"); |
| | | for (int i = 0; i < s.length; i++) { |
| | | if (i == 0) { |
| | | newRun.setText(s[i]); |
| | | }else { |
| | | // newRun.addCarriageReturn(); |
| | | newRun.setText(s[i]); |
| | | } |
| | | } |
| | | }else { |
| | | newRun.setText(info.replacementText); |
| | | } |
| | | |
| | | // 应用样式 |
| | | style.applyStyle(newRun); |
| | |
| | | map.put("page", "pages/home/home"); |
| | | map.put("scene", "clinicId=" + crmClinic.getId()); |
| | | map.put("check_path", false); |
| | | map.put("env_version", "trial"); |
| | | map.put("env_version", "release"); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity requestEntity = new HttpEntity(map, headers); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.utils.CodeGenerateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TSysAppUser; |
| | | import com.ruoyi.system.model.TSysInspection; |
| | |
| | | } |
| | | totalPrice= sysOtherConfig.getAiMonthPrice().multiply(new BigDecimal(100)).longValue(); |
| | | } |
| | | |
| | | if(totalPrice == 0L && StringUtils.isNotBlank(inspectionId)){ |
| | | TSysInspection sysInspection = sysInspectionService.getById(inspectionId); |
| | | sysInspection.setIsPay(1); |
| | | sysInspectionService.updateById(sysInspection); |
| | | return R.ok(); |
| | | } |
| | | // 价格 |
| | | // 生成订单号 |
| | | String orderNo = CodeGenerateUtils.generateOrderSn(); |
| | |
| | | { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | // 生成令牌 |
| | | LoginUserApplet loginUser = loginService.loginCodeApplet(loginBody.getUsername(), loginBody.getCode()); |
| | | LoginUserApplet loginUser = loginService.loginCodeApplet(loginBody.getUsername(), loginBody.getCode(),loginBody.getClinicId()); |
| | | ajax.put(Constants.TOKEN, tokenService.createTokenApplet(loginUser)); |
| | | ajax.put("userInfo",loginUser); |
| | | return ajax; |
| | |
| | | */ |
| | | @ApiModelProperty(value = "验证码") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "诊所id") |
| | | private String clinicId; |
| | | /** |
| | | * 唯一标识 |
| | | */ |
| | | private String uuid; |
| | | |
| | | public String getClinicId() { |
| | | return clinicId; |
| | | } |
| | | |
| | | public void setClinicId(String clinicId) { |
| | | this.clinicId = clinicId; |
| | | } |
| | | |
| | | public String getUsername() |
| | | { |
| | | return username; |
| | |
| | | * @param code 验证码 |
| | | * @return 结果 |
| | | */ |
| | | public LoginUserApplet loginCodeApplet(String username, String code) |
| | | public LoginUserApplet loginCodeApplet(String username, String code,String clinicId) |
| | | { |
| | | // 登录前置校验 |
| | | if (StringUtils.isEmpty(username)){ |
| | |
| | | sysAppUser = new TSysAppUser(); |
| | | sysAppUser.setPhone(username); |
| | | sysAppUser.setNickName(username.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")); |
| | | sysAppUser.setClinicId(clinicId); |
| | | sysAppUserService.save(sysAppUser); |
| | | }else { |
| | | sysAppUser.setClinicId(clinicId); |
| | | sysAppUserService.updateById(sysAppUser); |
| | | } |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); |
| | | TSysUserResp user = new TSysUserResp(); |
| | |
| | | @TableField("past_medical_history") |
| | | private String pastMedicalHistory; |
| | | |
| | | @ApiModelProperty(value = "个人史") |
| | | @TableField("personal_history") |
| | | private String personalHistory; |
| | | |
| | | @ApiModelProperty(value = "月经史") |
| | | @TableField("menstrual_history") |
| | | private String menstrualHistory; |
| | |
| | | private String inspectionId; |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private Integer roleType; |
| | | |
| | | @ApiModelProperty(value = "前端忽略") |
| | | private String clinicId; |
| | | } |
| | |
| | | <if test="query.roleType != null and query.roleType != 1"> |
| | | and tsau.status = 1 |
| | | </if> |
| | | <if test="query.clinicId != null and query.clinicId != ''"> |
| | | and tsau.clinic_id = #{query.clinicId} |
| | | </if> |
| | | AND tsau.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY tsau.create_time DESC |
| | |
| | | <result column="clinical_diagnosis" property="clinicalDiagnosis" /> |
| | | <result column="prescription_content" property="prescriptionContent" /> |
| | | <result column="remarks" property="remarks" /> |
| | | <result column="personal_history" property="personalHistory" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id,clinic_id, nick_name, sex, age, administrative_office, check_time, |
| | | inspection_info,inspection_type, is_pay, create_time, update_time, |
| | | create_by, update_by, disabled, create_id,report_print_url, present_history, tcm_syndrome, disease_history_memo, |
| | | western_medicine_diagnosis, three_user_id, phone, device_account_id, face_result_id, tongue_result_id |
| | | create_by, update_by, disabled, create_id,report_print_url, present_history, |
| | | tcm_syndrome, disease_history_memo, |
| | | western_medicine_diagnosis, three_user_id, phone, device_account_id, |
| | | face_result_id, tongue_result_id,personal_history |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TSysInspectionVO"> |
| | | SELECT |
| | |
| | | tsi.menstrual_history, tsi.obstetric_history, tsi.family_history,tsi.body_temperature, |
| | | tsi.pulse, tsi.breathe,tsi.blood_pressure, tsi.general_situation, tsi.fee_category, |
| | | tsi.prescription_number, tsi.department_name, tsi.prescription_time, tsi.home_address, |
| | | tsi.clinical_diagnosis,tsi.prescription_content, tsi.remarks,tau.nick_name as nickName |
| | | tsi.clinical_diagnosis,tsi.prescription_content, tsi.remarks,tsi.personal_history, |
| | | tau.nick_name as nickName |
| | | FROM t_sys_inspection tsi |
| | | left join t_sys_app_user tau on tsi.app_user_id = tau.id |
| | | <where> |