xuhy
2026-01-19 e7952253147b024333b5e0d5903b7b7aa4f7bbac
检测信息修改
14个文件已修改
91 ■■■■■ 已修改文件
ruoyi-admin/pom.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmClinicController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysAppUserController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysInspectionController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/WordUtil.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysAppUserController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/WxPayController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TSysInspection.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TSysAppUserQuery.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TSysAppUserMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TSysInspectionMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/pom.xml
@@ -211,7 +211,7 @@
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>${project.artifactId}</warName>
                </configuration>   
           </plugin>
           </plugin>
        </plugins>
        <resources>
            <resource>
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmClinicController.java
@@ -208,6 +208,7 @@
        }else {
            dto.setStatus(1);
        }
        crmClinicService.addClinic(dto);
        WxAppletTools wxAppletTools = new WxAppletTools(restTemplate, wxConfig, redisCache);
        // 获取access_token
        String accessToken = wxAppletTools.getAccessToken();
@@ -215,9 +216,11 @@
        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);
@@ -230,7 +233,7 @@
        } catch (Exception e) {
            log.error("生成小程序码失败:{}", e.getMessage());
        }
        crmClinicService.addClinic(dto);
        crmClinicService.updateById(dto);
        return R.ok();
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysAppUserController.java
@@ -88,7 +88,14 @@
    @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));
    }
@@ -164,7 +171,7 @@
    @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("用户管理信息已存在");
        }
@@ -179,7 +186,8 @@
        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());
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TSysInspectionController.java
@@ -102,8 +102,10 @@
            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));
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/WordUtil.java
@@ -174,7 +174,22 @@
        // 创建新的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);
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysAppUserController.java
@@ -220,7 +220,7 @@
                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);
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/WxPayController.java
@@ -4,6 +4,7 @@
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;
@@ -84,7 +85,12 @@
            }
            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();
ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -205,7 +205,7 @@
    {
        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;
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
@@ -28,12 +28,21 @@
     */
    @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;
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -176,7 +176,7 @@
     * @param code 验证码
     * @return 结果
     */
    public LoginUserApplet loginCodeApplet(String username, String code)
    public LoginUserApplet loginCodeApplet(String username, String code,String clinicId)
    {
        // 登录前置校验
        if (StringUtils.isEmpty(username)){
@@ -195,7 +195,11 @@
            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();
ruoyi-system/src/main/java/com/ruoyi/system/model/TSysInspection.java
@@ -195,6 +195,10 @@
    @TableField("past_medical_history")
    private String pastMedicalHistory;
    @ApiModelProperty(value = "个人史")
    @TableField("personal_history")
    private String personalHistory;
    @ApiModelProperty(value = "月经史")
    @TableField("menstrual_history")
    private String menstrualHistory;
ruoyi-system/src/main/java/com/ruoyi/system/query/TSysAppUserQuery.java
@@ -27,5 +27,6 @@
    private String inspectionId;
    @ApiModelProperty(value = "前端忽略")
    private Integer roleType;
    @ApiModelProperty(value = "前端忽略")
    private String clinicId;
}
ruoyi-system/src/main/resources/mapper/system/TSysAppUserMapper.xml
@@ -62,6 +62,9 @@
            <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
ruoyi-system/src/main/resources/mapper/system/TSysInspectionMapper.xml
@@ -58,14 +58,17 @@
        <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
@@ -79,7 +82,8 @@
        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>