select count(*) as col_0_0_ from professionalExam_register profession0_ where profession0_.person_name='兰俊俊' and profession0_.util_name='' and profession0_.card_number='370282198606227943' and profession0_.register_date='2017-06-18' and profession0_.exam_type='从业人员体检' and (freezing_and_thawing is null) --1.查询这个人今天有没有登记,登记了提示已经登记 insert into professional_charge_project (charge_project_name, charge_project_price, physical_num) values ( @P0 , @P1 , @P2 ) SELECT SCOPE_IDENTITY() AS ID --2.插入体检套餐的收费项目 physical_num 体检条码号 insert into professionalExam_register --3 插入体检登记表 select * from exam_project_maintain examprojec0_ where examprojec0_.status='是' and (project_id in ('10000' , '10001' , '10002' , '10003' , '11015' , '11366' , '11342' , '11367' , '11368' , '22135' , '22136' , '22137' , '22138' , '22139')) --4查出需要插入的体检项目 insert into professionalExam_project_result --5把体检项目插入体检结果表 select * from exam_group_prepose_condition_maintain examgroupp0_ where examgroupp0_.exam_prepose_condition_maintain_id=1 select * from exam_group_maintain examgroupm0_ where examgroupm0_.id=5 select * from examination_process insert into examination_process --6把体检小组加入examination_process id=5的是怎么查出来的没找到地方 select max(physical_num) from professionalExam_register where physical_num like '9%' and physical_type like '从业%' and substring(physical_num,2,8)=20170618 select * from professionalExam_project_result profession0_ where profession0_.person_id=42128 select * from bar_code_project_maintain where project_code in (11015,10000,10003,10001,10002,11342,11366,11367,11368,22135,22136,22137,22138,22139) --7查询要打印的条码 select barcodemai0_.id as id2428_0_, barcodemai0_.code_name as code2_2428_0_, barcodemai0_.create_time as create3_2428_0_, barcodemai0_.creator as creator2428_0_, barcodemai0_.is_print as is5_2428_0_, barcodemai0_.status as status2428_0_ from bar_code_maintain barcodemai0_ where barcodemai0_.id= 3 --8打印条码和指引单