会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 134262个问题

image.pngimage.png

JAVA 全系列/第一阶段:AI驱动的JAVA编程/变量、数据类型、运算符 37667楼
Python全系列/第十六阶段:Python 爬虫开发/scrapy框架使用 37668楼
WEB前端全系列/第十一阶段:Nodejs编程模块--/Less 37670楼
JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 37671楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/容器 37673楼
JAVA 全系列/第八阶段:生产环境部署与协同开发/Docker 37674楼
Python全系列/第十六阶段:Python 爬虫开发/爬虫反反爬 37675楼

在确认检查按钮按下后出现开始检查失败,后台控制台输出语句如下,应该怎么解决呢

Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@2392771f] was not registered for synchronization because synchronization is not active
JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@ff2f031] will not be managed by Spring
==>  Preparing: SELECT item_id,co_id,item_ref_id,item_name,item_type,num,price,amount,remark,status,create_time FROM his_care_order_item WHERE item_id=? 
==> Parameters: ITEM1363797224076738560(String)
<==    Columns: item_id, co_id, item_ref_id, item_name, item_type, num, price, amount, remark, status, create_time
<==        Row: ITEM1363797224076738560, CO1363797223476953088, 2, 血常规, 1, 1.00, 5.00, 5.00, 按要求检查, 1, 2021-02-22 10:26:11
<==      Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@2392771f]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@72440f67] was not registered for synchronization because synchronization is not active
JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@ff2f031] will not be managed by Spring
==>  Preparing: SELECT co_id,co_type,user_id,patient_id,patient_name,ch_id,all_amount,create_by,create_time,update_by,update_time FROM his_care_order WHERE co_id=? 
==> Parameters: CO1363797223476953088(String)
<==    Columns: co_id, co_type, user_id, patient_id, patient_name, ch_id, all_amount, create_by, create_time, update_by, update_time
<==        Row: CO1363797223476953088, 1, 2, HZ1363797038256488448, CC, CH1363797149741088768, 75.00, 扁鹊, 2021-02-22 10:26:11, , null
<==      Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@72440f67]
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5955cb9f] was not registered for synchronization because synchronization is not active
JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@ff2f031] will not be managed by Spring
==>  Preparing: SELECT ch_id,user_id,user_name,patient_id,patient_name,dept_id,dept_name,receive_type,is_contagious,care_date,case_date,reg_id,case_title,case_result,doctor_tips,remark FROM his_care_history WHERE ch_id=? 
==> Parameters: CH1363797149741088768(String)
<==    Columns: ch_id, user_id, user_name, patient_id, patient_name, dept_id, dept_name, receive_type, is_contagious, care_date, case_date, reg_id, case_title, case_result, doctor_tips, remark
<==        Row: CH1363797149741088768, 2, 扁鹊, HZ1363797038256488448, CC, 101, 内科, 0, 0, 2021-02-22 10:25:53, 2021-02-22, GH1363797039326035968, cc, cc, cc, cc
<==      Total: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5955cb9f]
Creating a new SqlSession
Registering transaction synchronization for SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fecaacc]
JDBC Connection [com.mysql.cj.jdbc.ConnectionImpl@ff2f031] will be managed by Spring
==>  Preparing: INSERT INTO his_check_result ( item_id, check_item_id, check_item_name, price, patient_id, patient_name, result_status, reg_id, create_time, create_by ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) 
==> Parameters: ITEM1363797224076738560(String), 2(Integer), 血常规(String), 5.00(BigDecimal), HZ1363797038256488448(String), CC(String), 0(String), GH1363797039326035968(String), 2021-02-25 19:00:19.98(Timestamp), 扁鹊(String)
Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fecaacc]
Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fecaacc]
Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1fecaacc]


JAVA 全系列/第二十三阶段:分布式医疗云平台/检查管理前后端开发(旧) 37676楼
JAVA 全系列/第八阶段:Linux入门到实战/Maven 37677楼

2c5ad9aa38070cc7f732e16d327904a.png

老师这个报错是怎么回事

Python全系列/第二阶段:Python 深入与提高/文件处理 37678楼
JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 37679楼

class Employee:
    __init_flag=True

    def __init__(self,id,name,salary):
        self.id = id
        self.name=name
        self.__salary=salary

    def __add__(self, other):    #+运算符重载
        if isinstance(other,Employee):
            return self.__salary+other.__salary   #两个对象相加时,返回薪水和
        else:
            print('两个雇员不属于一个公司,不能相加')

    @property
    def salary(self):
        return self.__salary

    @salary.setter
    def salary(self,salary):
        if (1000<salary<50000):   #限制薪水范围
            self.__salary=salary
        else:
            print('薪水录入错误,请重新录入')

    def input(self):
        d=1000
        if self.id=='':  #当不输入id时
            if Employee.__init_flag:
                self.id=1000   #给第一个员工id为1000
                Employee.__init_flag=False
                return self.id
            else:
                d+=1    #给第二个员工及之后的员工id加1
                self.id=d
                return self.id
        else:            #当输入id时
            return self.id

e3=Employee('','小李',5500)
e4=Employee('','小刘',38000)
print(e3.input())
print(e4.input())    #当不输入id时,雇员id依次递增

e1=Employee(1007,'小王',4500)
e2=Employee(1008,'小张',6000)
print(e1+e2)     #两个雇员相加时,返回薪水和

e5=Employee(1009,'小蒙',-900)
print(e5.salary)

运算结果e5.salary是负值:-900,为什么不是判断“薪水录入错误,请重新录入”,我看到提问区有个小伙伴的问题跟我一样,但是老师的回答没看懂,麻烦老师解答,谢谢


Python全系列/第一阶段:AI驱动的Python编程/面向对象 37680楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637