fhx
2023-12-08 37022a5aa114261dcb9e4f312b07c6e029f59e24
phi_platform_user/src/main/java/com/hx/phip/service/treat/impl/TreatV3ServiceImpl.java
@@ -256,13 +256,14 @@
        values.put("allergyInfo", treatSingle.getAllergyInfo());
        values.put("isFirstFm", treatSingle.getIsFirstFm());
        values.put("isRd", treatSingle.getIsRd());
        values.put("isUserSign", treatSingle.getIsUserSign());
        sql.delete(0,sql.length());
        //operatorName = #{m.operatorName},operatorId = #{m.operatorId},
        sql.append(" developerName = #{m.developerName},developerId = #{m.developerId},remarkInfo = #{m.remarkInfo} ");
        sql.append(" ,developerShopName = #{m.developerShopName},developerShopId = #{m.developerShopId} ");
        sql.append(" ,shopName = #{m.shopName},shopId = #{m.shopId},status = #{m.status} ");
        sql.append(" , orderClassify  = #{m.orderClassify}, isWillPhoto  = #{m.isWillPhoto}, allergyInfo  = #{m.allergyInfo} ");
        sql.append(" , isFirstFm = #{m.isFirstFm}, isRd = #{m.isRd} ");
        sql.append(" , isFirstFm = #{m.isFirstFm}, isRd = #{m.isRd}, isisUserSign = #{m.isUserSign} ");
        sql.append(" where id = #{m.id} ");
        sqlSentence.setSqlSentence(sql.toString());
        if (treatSingleMapper.updateWhere(sqlSentence) != 1) {
@@ -403,7 +404,7 @@
        TreatSingleSign oldSign;
        StringBuffer logInfo = new StringBuffer();
        logInfo.append("更新签名类型:");
        Integer isUseSign = treatSingle.getIsUserSign();
        for(TreatSingleSign sign : signList){
            //类型
@@ -418,12 +419,26 @@
                throw new TipsException("新增治疗单签名失败!");
            }
            //判断用户是否签名
            if(TreatSingleSign.SIGN_PER_TYPE_USER.equals(sign.getSignPerType())){
                isUseSign = BaseEntity.YES;
            }
            //拼接日志
            logInfo.append(TreatSingleSign.signPerTypeCh(sign.getSignPerType())).append("、");
        }
        logInfo.delete(logInfo.length() - 1, logInfo.length());
        //更新治疗单是否用户已签名
        if(treatSingle.getIsUserSign() == BaseEntity.NO && isUseSign == BaseEntity.YES){
            values.put("id", treatSingle.getId());
            sqlSentence.setSqlSentence(" isUseSign = 1 where id = #{m.id} ");
            if(treatSingleMapper.updateWhere(sqlSentence) != 1){
                throw new TipsException("更新治疗单签名失败!");
            }
        }
        //新增治疗单日志
        TreatSingleLogTool.addLog(commonService, TreatSingleConstants.LOG_TYPE_EDIT_SIGN, treatSingle, employeeRole, logInfo.toString());