fhx
2023-12-08 37022a5aa114261dcb9e4f312b07c6e029f59e24
1.治疗单新增字段
3个文件已修改
41 ■■■■ 已修改文件
phi_platform_common/src/main/resources/mapper/platform/TreatSingleMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/treat/TreatController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/treat/impl/TreatV3ServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/resources/mapper/platform/TreatSingleMapper.xml
@@ -8,7 +8,7 @@
    <!-- 整个实体类修改,表字段=实体类字段-->
    <sql id="Update_Column_All">
        <trim prefixOverrides=",">
            ,type = #{type},commonId = #{commonId},signData = #{signData},treatData = #{treatData},shopId = #{shopId},shopName = #{shopName},operatorId = #{operatorId},operatorName = #{operatorName},developerShopId = #{developerShopId},developerShopName = #{developerShopName},developerId = #{developerId},developerName = #{developerName},remarkInfo = #{remarkInfo},status = #{status},isLedProduct = #{isLedProduct},treatSingleNo = #{treatSingleNo},visitOrderId = #{visitOrderId},userConsultantId = #{userConsultantId},userConsultantName = #{userConsultantName},orderClassify = #{orderClassify},isKnow = #{isKnow},drugStatus = #{drugStatus},userId = #{userId},allergyInfo = #{allergyInfo},isWillPhoto = #{isWillPhoto},isFirstFm = #{isFirstFm},isRd = #{isRd},anStatus = #{anStatus},aDoctorId = #{aDoctorId},aDoctorName = #{aDoctorName},aNurseId = #{aNurseId},aNurseName = #{aNurseName},aMicId = #{aMicId},aRemark = #{aRemark},roomName = #{roomName},aTime = #{aTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
            ,type = #{type},commonId = #{commonId},signData = #{signData},treatData = #{treatData},shopId = #{shopId},shopName = #{shopName},operatorId = #{operatorId},operatorName = #{operatorName},developerShopId = #{developerShopId},developerShopName = #{developerShopName},developerId = #{developerId},developerName = #{developerName},remarkInfo = #{remarkInfo},status = #{status},isLedProduct = #{isLedProduct},treatSingleNo = #{treatSingleNo},visitOrderId = #{visitOrderId},userConsultantId = #{userConsultantId},userConsultantName = #{userConsultantName},orderClassify = #{orderClassify},isKnow = #{isKnow},drugStatus = #{drugStatus},userId = #{userId},allergyInfo = #{allergyInfo},isWillPhoto = #{isWillPhoto},isFirstFm = #{isFirstFm},isRd = #{isRd},isUserSign = #{isUserSign},anStatus = #{anStatus},aDoctorId = #{aDoctorId},aDoctorName = #{aDoctorName},aNurseId = #{aNurseId},aNurseName = #{aNurseName},aMicId = #{aMicId},aRemark = #{aRemark},roomName = #{roomName},aTime = #{aTime},isDel = #{isDel},createTime = #{createTime},editTime = #{editTime}
        </trim>
    </sql>
     
@@ -19,11 +19,11 @@
        <selectKey keyProperty="id" resultType="String" order="BEFORE">
               select replace(uuid(),'-','') from dual
        </selectKey>
        insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime)  values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{userId},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{anStatus},#{aDoctorId},#{aDoctorName},#{aNurseId},#{aNurseName},#{aMicId},#{aRemark},#{roomName},#{aTime},#{isDel},#{createTime},#{editTime})
        insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,isUserSign,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime)  values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{userId},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{isUserSign},#{anStatus},#{aDoctorId},#{aDoctorName},#{aNurseId},#{aNurseName},#{aMicId},#{aRemark},#{roomName},#{aTime},#{isDel},#{createTime},#{editTime})
    </insert>
    <insert id="insertById" parameterType="com.hx.phiappt.model.treat.TreatSingle">
        insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime)  values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{userId},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{anStatus},#{aDoctorId},#{aDoctorName},#{aNurseId},#{aNurseName},#{aMicId},#{aRemark},#{roomName},#{aTime},#{isDel},#{createTime},#{editTime})
        insert into treat_single (id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,isUserSign,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime)  values (#{id},#{type},#{commonId},#{signData},#{treatData},#{shopId},#{shopName},#{operatorId},#{operatorName},#{developerShopId},#{developerShopName},#{developerId},#{developerName},#{remarkInfo},#{status},#{isLedProduct},#{treatSingleNo},#{visitOrderId},#{userConsultantId},#{userConsultantName},#{orderClassify},#{isKnow},#{drugStatus},#{userId},#{allergyInfo},#{isWillPhoto},#{isFirstFm},#{isRd},#{isUserSign},#{anStatus},#{aDoctorId},#{aDoctorName},#{aNurseId},#{aNurseName},#{aMicId},#{aRemark},#{roomName},#{aTime},#{isDel},#{createTime},#{editTime})
    </insert>
    <select id="selectList" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="com.hx.mybatisTool.SqlSentence" >
@@ -55,14 +55,14 @@
    <select id="selectOneByKey" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="java.lang.Object" >
        select 
            id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime
            id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,isUserSign,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime
        from treat_single
        WHERE id = #{value}
    </select>
    <select id="selectOneByKeyBlob" resultType="com.hx.phiappt.model.treat.TreatSingle" parameterType="java.lang.Object" >
        select 
            id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime
            id,type,commonId,signData,treatData,shopId,shopName,operatorId,operatorName,developerShopId,developerShopName,developerId,developerName,remarkInfo,status,isLedProduct,treatSingleNo,visitOrderId,userConsultantId,userConsultantName,orderClassify,isKnow,drugStatus,userId,allergyInfo,isWillPhoto,isFirstFm,isRd,isUserSign,anStatus,aDoctorId,aDoctorName,aNurseId,aNurseName,aMicId,aRemark,roomName,aTime,isDel,createTime,editTime
        from treat_single
        WHERE id = #{value}
    </select>
phi_platform_user/src/main/java/com/hx/phip/controller/treat/TreatController.java
@@ -121,6 +121,8 @@
        treatSingle.setUserId(visitOrder.getUserId());
        treatV3Service.add(treatSingle, projectList, visitOrder, employeeRole, isMicNotice, signList);
        //返回id
@@ -285,7 +287,7 @@
            throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL, "查询不到治疗通知单信息!");
        }
        checkSignParam(reqVo.getSignList());
        checkSignParam(reqVo.getSignList(), treatSingle);
        treatV3Service.updateSign(treatSingle, reqVo.getSignList(), employeeRole);
@@ -577,14 +579,15 @@
        //校验签名参数----------------------------------------------------------------------------------
        if(signList != null && signList.size() > 0){
            checkSignParam(signList);
            checkSignParam(signList, treatSingle);
        }
        //----------------------------------------------------------------------------------
    }
    /** 检测校验治疗单签名参数 */
    private void checkSignParam(List<TreatSingleSign> signList){
    private void checkSignParam(List<TreatSingleSign> signList, TreatSingle treatSingle){
        treatSingle.setIsUserSign(BaseEntity.NO);
        for(TreatSingleSign sign : signList){
            if(StringUtils.isEmpty(sign.getSignImg())){
                throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"签名图片不能为空!");
@@ -599,6 +602,7 @@
            //判断类型,更改对应值
            if(TreatSingleSign.SIGN_PER_TYPE_USER.equals(sign.getSignPerType())){
                sign.setSortNo(1);
                treatSingle.setIsUserSign(BaseEntity.YES);
            }else if(TreatSingleSign.SIGN_PER_TYPE_NURSE1.equals(sign.getSignPerType())){
                sign.setSortNo(2);
            }else if(TreatSingleSign.SIGN_PER_TYPE_NURSE2.equals(sign.getSignPerType())){
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());