| | |
| | | <!-- 整个实体类修改,表字段=实体类字段--> |
| | | <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> |
| | | |
| | |
| | | <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" > |
| | |
| | | |
| | | <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> |
| | |
| | | treatSingle.setUserId(visitOrder.getUserId()); |
| | | |
| | | |
| | | |
| | | |
| | | treatV3Service.add(treatSingle, projectList, visitOrder, employeeRole, isMicNotice, signList); |
| | | |
| | | //返回id |
| | |
| | | throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL, "查询不到治疗通知单信息!"); |
| | | } |
| | | |
| | | checkSignParam(reqVo.getSignList()); |
| | | checkSignParam(reqVo.getSignList(), treatSingle); |
| | | |
| | | treatV3Service.updateSign(treatSingle, reqVo.getSignList(), employeeRole); |
| | | |
| | |
| | | |
| | | //校验签名参数---------------------------------------------------------------------------------- |
| | | 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,"签名图片不能为空!"); |
| | |
| | | //判断类型,更改对应值 |
| | | 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())){ |
| | |
| | | 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) { |
| | |
| | | TreatSingleSign oldSign; |
| | | StringBuffer logInfo = new StringBuffer(); |
| | | logInfo.append("更新签名类型:"); |
| | | |
| | | Integer isUseSign = treatSingle.getIsUserSign(); |
| | | for(TreatSingleSign sign : signList){ |
| | | |
| | | //类型 |
| | |
| | | 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()); |
| | | |