1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861 |
- create table ent_data
- (
- 商业公司名称 varchar(255) null,
- 商业公司地址 varchar(255) null,
- 商业公司规模 varchar(255) null,
- 三合一社会信用代码 varchar(255) null,
- GSP证书编号 varchar(255) null,
- 公司注册地 varchar(255) null,
- 注册资本 varchar(255) null,
- 法人代表 varchar(255) null,
- 服务药企 varchar(255) null,
- 公司简介 varchar(255) null,
- 经营优势 varchar(255) null,
- 备注 varchar(255) null,
- f13 varchar(255) null,
- f14 varchar(255) null
- )
- row_format = DYNAMIC;
- create table ent_his
- (
- 医院名称 varchar(255) null,
- 医院地址 varchar(255) null,
- 医院规模 varchar(255) null,
- 医院性质 varchar(255) null,
- 联系总机 varchar(255) null,
- 公共邮箱 varchar(255) null,
- 医院简介 varchar(255) null,
- 备注 varchar(255) null
- )
- row_format = DYNAMIC;
- create table hnqz_sequence
- (
- id bigint auto_increment
- primary key,
- value bigint not null,
- name varchar(32) not null,
- gmt_create datetime not null,
- gmt_modified datetime not null,
- constraint uk_name
- unique (name)
- );
- create table huiqiyun_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- req_msg_id varchar(64) null comment '报文流水号',
- req_body text null comment '请求body',
- decrypt_body text null comment '解密后的body',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '汇企云回调异步通知记录';
- create table lingcaiai_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- verify varchar(128) not null comment '签名',
- channel varchar(32) not null comment '通知类型',
- req_body text not null comment '请求body内容',
- batch_no varchar(32) null comment '项目单号',
- account_no varchar(32) null comment '账号单号',
- order_status int null comment '订单状态',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '浪潮(灵才接好活)结算回调请求记录';
- create table medical_equipment
- (
- id int auto_increment comment '医疗器械'
- primary key,
- name varchar(64) null comment '器械名称',
- manufacturer varchar(64) null comment '生产厂家',
- drug_ent_id int null comment '所属企业id',
- drug_ent_name varchar(64) null comment '所属企业名称',
- specification varchar(64) null comment '规格',
- measure_unit varchar(64) null comment '计量单位组名称',
- level varchar(20) null comment '等级',
- remark varchar(64) null comment '备注',
- del_flag char default '0' null comment '删除标记,1:已删除,0:正常',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '医疗器械';
- create table monitoring_indicator
- (
- id int(20) auto_increment
- primary key,
- alarm_amount decimal(18) default 0 not null comment '报警金额',
- limit_amount decimal(18) default 0 not null comment '限制金额',
- yaoyi_limit_amount decimal(18) not null comment '平台限额',
- subject_location varchar(64) null comment '税源地'
- )
- comment '风险监控' row_format = DYNAMIC;
- create table olading_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- request_id varchar(32) null comment '请求流水号',
- interface_name varchar(32) not null comment '请求接口名称',
- req_body text not null comment '请求body内容',
- public_key varchar(2048) null comment '请求公钥',
- private_key varchar(2048) null comment '请求时私钥',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '自由职家请求记录';
- create table party_a_encrypted_input_record
- (
- id int(20) auto_increment
- primary key,
- dept_id int(20) not null comment '主体id',
- ser_public_key varchar(2048) not null comment '请求时服务器公钥',
- ser_private_key varchar(2048) not null comment '请求时服务器私钥',
- cli_public_key varchar(2048) not null comment '请求时客户端公钥',
- cli_private_key varchar(2048) not null comment '请求时客户端私钥',
- signature varchar(32) not null comment '请求时签名字符串',
- original_text longtext not null comment '加密后的信息',
- password varchar(2048) not null comment '密码',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '甲方请求加密信息记录' row_format = DYNAMIC;
- create table party_b_encrypted_output_record
- (
- id int(20) auto_increment
- primary key,
- dept_id int(20) not null comment '主体id',
- ser_public_key varchar(2048) not null comment '请求时服务器公钥',
- ser_private_key varchar(2048) not null comment '请求时服务器私钥',
- cli_public_key varchar(2048) not null comment '请求时客户端公钥',
- cli_private_key varchar(2048) not null comment '请求时客户端私钥',
- signature varchar(32) not null comment '请求时签名字符串',
- original_text longtext not null comment '加密后的信息',
- password varchar(2048) not null comment '密码',
- input_id int(20) not null comment '请求id',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '乙方响应加密信息记录' row_format = DYNAMIC;
- create table qifu_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- req_type varchar(20) not null comment '请求业务类型',
- req_id varchar(64) null comment '请求序号',
- req_body text null comment '请求body',
- decrypt_body text null comment '解密后的body',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '福建企赋回调异步通知记录';
- create table qrtz_calendars
- (
- sched_name varchar(120) charset utf8 not null,
- calendar_name varchar(200) charset utf8 not null,
- calendar blob not null,
- primary key (sched_name, calendar_name)
- )
- row_format = DYNAMIC;
- create table qrtz_fired_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- entry_id varchar(95) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- instance_name varchar(200) charset utf8 not null,
- fired_time bigint(13) not null,
- sched_time bigint(13) not null,
- priority int not null,
- state varchar(16) charset utf8 not null,
- job_name varchar(200) charset utf8 null,
- job_group varchar(200) charset utf8 null,
- is_nonconcurrent varchar(1) charset utf8 null,
- requests_recovery varchar(1) charset utf8 null,
- primary key (sched_name, entry_id)
- )
- row_format = DYNAMIC;
- create table qrtz_job_details
- (
- sched_name varchar(120) charset utf8 not null,
- job_name varchar(200) charset utf8 not null,
- job_group varchar(200) charset utf8 not null,
- description varchar(250) charset utf8 null,
- job_class_name varchar(250) charset utf8 not null,
- is_durable varchar(1) charset utf8 not null,
- is_nonconcurrent varchar(1) charset utf8 not null,
- is_update_data varchar(1) charset utf8 not null,
- requests_recovery varchar(1) charset utf8 not null,
- job_data blob null,
- primary key (sched_name, job_name, job_group)
- )
- row_format = DYNAMIC;
- create table qrtz_locks
- (
- sched_name varchar(120) charset utf8 not null,
- lock_name varchar(40) charset utf8 not null,
- primary key (sched_name, lock_name)
- )
- row_format = DYNAMIC;
- create table qrtz_paused_trigger_grps
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- primary key (sched_name, trigger_group)
- )
- row_format = DYNAMIC;
- create table qrtz_scheduler_state
- (
- sched_name varchar(120) charset utf8 not null,
- instance_name varchar(200) charset utf8 not null,
- last_checkin_time bigint(13) not null,
- checkin_interval bigint(13) not null,
- primary key (sched_name, instance_name)
- )
- row_format = DYNAMIC;
- create table qrtz_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- job_name varchar(200) charset utf8 not null,
- job_group varchar(200) charset utf8 not null,
- description varchar(250) charset utf8 null,
- next_fire_time bigint(13) null,
- prev_fire_time bigint(13) null,
- priority int null,
- trigger_state varchar(16) charset utf8 not null,
- trigger_type varchar(8) charset utf8 not null,
- start_time bigint(13) not null,
- end_time bigint(13) null,
- calendar_name varchar(200) charset utf8 null,
- misfire_instr smallint(2) null,
- job_data blob null,
- primary key (sched_name, trigger_name, trigger_group),
- constraint qrtz_triggers_ibfk_1
- foreign key (sched_name, job_name, job_group) references qrtz_job_details (sched_name, job_name, job_group)
- )
- row_format = DYNAMIC;
- create table qrtz_blob_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- blob_data blob null,
- primary key (sched_name, trigger_name, trigger_group),
- constraint qrtz_blob_triggers_ibfk_1
- foreign key (sched_name, trigger_name, trigger_group) references qrtz_triggers (sched_name, trigger_name, trigger_group)
- )
- row_format = DYNAMIC;
- create table qrtz_cron_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- cron_expression varchar(200) charset utf8 not null,
- time_zone_id varchar(80) charset utf8 null,
- primary key (sched_name, trigger_name, trigger_group),
- constraint qrtz_cron_triggers_ibfk_1
- foreign key (sched_name, trigger_name, trigger_group) references qrtz_triggers (sched_name, trigger_name, trigger_group)
- )
- row_format = DYNAMIC;
- create table qrtz_simple_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- repeat_count bigint(7) not null,
- repeat_interval bigint(12) not null,
- times_triggered bigint(10) not null,
- primary key (sched_name, trigger_name, trigger_group),
- constraint qrtz_simple_triggers_ibfk_1
- foreign key (sched_name, trigger_name, trigger_group) references qrtz_triggers (sched_name, trigger_name, trigger_group)
- )
- row_format = DYNAMIC;
- create table qrtz_simprop_triggers
- (
- sched_name varchar(120) charset utf8 not null,
- trigger_name varchar(200) charset utf8 not null,
- trigger_group varchar(200) charset utf8 not null,
- str_prop_1 varchar(512) charset utf8 null,
- str_prop_2 varchar(512) charset utf8 null,
- str_prop_3 varchar(512) charset utf8 null,
- int_prop_1 int null,
- int_prop_2 int null,
- long_prop_1 bigint null,
- long_prop_2 bigint null,
- dec_prop_1 decimal(13, 4) null,
- dec_prop_2 decimal(13, 4) null,
- bool_prop_1 varchar(1) charset utf8 null,
- bool_prop_2 varchar(1) charset utf8 null,
- primary key (sched_name, trigger_name, trigger_group),
- constraint qrtz_simprop_triggers_ibfk_1
- foreign key (sched_name, trigger_name, trigger_group) references qrtz_triggers (sched_name, trigger_name, trigger_group)
- )
- row_format = DYNAMIC;
- create index sched_name
- on qrtz_triggers (sched_name, job_name, job_group);
- create table re_album_drug
- (
- album_id int not null comment '产品相册ID',
- drug_id int not null comment '药品ID',
- constraint re_album_drug_index
- unique (album_id, drug_id)
- )
- row_format = DYNAMIC;
- create table re_dept_drug
- (
- drug_id int null,
- dept_id int null
- )
- charset = utf8
- row_format = DYNAMIC;
- create table report_handler_dept_relation
- (
- id int auto_increment comment '主键id'
- primary key,
- report_type varchar(20) null comment '报告类型',
- detp_id int null comment '企业id',
- handler_class varchar(64) null comment '处理类',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- template varchar(1024) null comment '模板文件名称'
- )
- comment '导出报告处理类和企业关系表';
- create table single_ent_settle_same_amount_for_members_in_current_month
- (
- record_id int unsigned auto_increment comment 'id'
- primary key,
- note_id int unsigned null comment '积分包计算记录id',
- realname varchar(32) null comment '用户名称',
- username varchar(11) null comment '用户名',
- id_number varchar(18) null comment '身份证',
- dept_id int null comment '结算企业id',
- dept_name varchar(64) null comment '结算企业名称',
- settle_amount decimal(20, 2) null comment '结算金额',
- sub_to_gig_time datetime null comment '结算时间',
- settle_state varchar(16) null comment '结算企业名称',
- sub_type_name varchar(16) null comment '结算渠道名称',
- package_name varchar(64) null comment '积分包名称',
- settle_note_create_time datetime null comment '结算记录创建时间',
- period int unsigned null comment '统计周期',
- member_count int unsigned null comment '风控人数',
- uuid varchar(64) not null comment 'uuid',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '单人连续多月结算相同金额';
- create index idx_uuid
- on single_ent_settle_same_amount_for_members_in_current_month (uuid);
- create table single_member_settle_amount_overrun_in_several_months
- (
- record_id int unsigned auto_increment comment 'id'
- primary key,
- note_id int unsigned null comment '积分包计算记录id',
- realname varchar(32) null comment '用户名称',
- username varchar(11) null comment '用户名',
- dept_id int null comment '结算企业id',
- dept_name varchar(64) null comment '结算企业名称',
- settle_amount decimal(20, 2) null comment '结算金额',
- sub_to_gig_time datetime null comment '结算时间',
- settle_state varchar(16) null comment '结算企业名称',
- sub_type_name varchar(16) null comment '结算渠道名称',
- package_name varchar(64) null comment '积分包名称',
- settle_note_create_time datetime null comment '结算记录创建时间',
- period int unsigned null comment '统计周期',
- platform_limit decimal null comment '结算限制',
- uuid varchar(64) not null comment 'uuid',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '单人连续多月结算额超标';
- create index idx_uuid
- on single_member_settle_amount_overrun_in_several_months (uuid);
- create table single_member_settle_same_amount_in_several_months
- (
- record_id int unsigned auto_increment comment 'id'
- primary key,
- note_id int unsigned null comment '积分包计算记录id',
- realname varchar(32) null comment '用户名称',
- username varchar(11) null comment '用户名',
- id_number varchar(18) null comment '身份证',
- dept_id int null comment '结算企业id',
- dept_name varchar(64) null comment '结算企业名称',
- settle_amount decimal(20, 2) null comment '结算金额',
- sub_to_gig_time datetime null comment '结算时间',
- settle_state varchar(16) null comment '结算企业名称',
- sub_type_name varchar(16) null comment '结算渠道名称',
- package_name varchar(64) null comment '积分包名称',
- settle_note_create_time datetime null comment '结算记录创建时间',
- period int unsigned null comment '统计周期',
- uuid varchar(64) not null comment 'uuid',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '单人连续多月结算相同金额';
- create index idx_uuid
- on single_member_settle_same_amount_in_several_months (uuid);
- create table single_member_without_such_task_types_in_several_months
- (
- record_id int unsigned auto_increment comment 'id'
- primary key,
- user_id int unsigned null comment '用户id',
- package_id int unsigned null comment '积分包id',
- package_name varchar(32) null comment '积分包名称',
- status varchar(11) null comment '积分包状态',
- realname varchar(32) null comment '用户名称',
- username varchar(11) null comment '用户名',
- dept_id int null comment '结算企业id',
- dept_name varchar(64) null comment '结算企业名称',
- period int unsigned null comment '统计周期',
- type_list varchar(255) null comment '风控任务类型',
- package_create_time datetime null comment '积分包创建时间',
- package_pick_up_time datetime null comment '积分包领取时间',
- first_task_time datetime null comment '首个任务时间',
- uuid varchar(64) not null comment 'uuid',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '单人连续多月结算相同金额';
- create index idx_uuid
- on single_member_without_such_task_types_in_several_months (uuid);
- create table sys_cert_result_record
- (
- id int(20) auto_increment
- primary key,
- user_id int(20) not null comment '用户id',
- dept_id int(20) not null comment '归属体id',
- subject_type int(1) not null comment '归属类型:0-> 人力家,1-> 税邦云',
- method varchar(25) not null comment '请求方法',
- code varchar(5) null comment '状态码',
- status varchar(5) null comment '结果码',
- message varchar(256) not null comment '结果信息',
- create_time timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '创建时间'
- )
- comment '认证结果记录表' row_format = DYNAMIC;
- create table sys_csm_user_relation
- (
- user_id int not null comment 'csm用户id',
- parent_id int not null comment '父级用户id',
- primary key (user_id, parent_id)
- )
- comment 'csm用户关系表';
- create table sys_dept
- (
- dept_id int(20) auto_increment
- primary key,
- name varchar(50) not null,
- sort int default 0 not null comment '排序',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- del_flag char default '0' null,
- parent_id int null,
- tenant_id int null,
- dept_code varchar(50) null,
- level int(2) null comment '级别',
- level1_name varchar(50) null comment '药企名称',
- level1_id int null comment '药企ID',
- level2_name varchar(50) null comment '一级代理商名称',
- level2_id int null comment '一级代理商ID',
- level3_name varchar(50) null comment '二级代理商名称',
- level3_id int null comment '二级代理商ID',
- app_id varchar(32) null,
- app_secret varchar(255) null,
- rsa_public_key varchar(256) null,
- query_url varchar(255) null,
- subject_name varchar(128) null comment '结算主体',
- subject_type varchar(1024) null,
- tax_code varchar(50) null comment '税号',
- dept_permissions varchar(255) null comment '部门专用权限限制(字符串逗号分隔:0.导出)',
- gmv1_rate int null comment 'gmv1收益率(万分之)',
- gmv2_rate int null comment 'gmv2收益率(万分之)',
- renlijia_service_charge_rate int null comment '人力家服务费(万分之)',
- issue_date date null comment '服务起始时间',
- expiry_date date null comment '服务截止时间',
- financial_review_type char(10) null comment '财务复核方式',
- emails varchar(1024) null comment '邮箱(多个逗号分隔)',
- constraint sys_dept_dept_code_uindex
- unique (dept_code)
- )
- comment '部门管理' row_format = DYNAMIC;
- create table sys_dept_0517
- (
- dept_id int(20) auto_increment
- primary key,
- name varchar(50) not null,
- sort int default 0 not null comment '排序',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- del_flag char default '0' null,
- parent_id int null,
- tenant_id int null,
- dept_code varchar(50) null,
- level int(2) null comment '级别',
- level1_name varchar(50) null comment '药企名称',
- level1_id int null comment '药企ID',
- level2_name varchar(50) null comment '一级代理商名称',
- level2_id int null comment '一级代理商ID',
- level3_name varchar(50) null comment '二级代理商名称',
- level3_id int null comment '二级代理商ID',
- app_id varchar(32) null,
- app_secret varchar(255) null,
- rsa_public_key varchar(256) null,
- query_url varchar(255) null,
- subject_name varchar(128) null comment '结算主体',
- subject_type varchar(2) null comment '认证方式0-人力家 1-税邦云'
- )
- comment '部门管理' row_format = DYNAMIC;
- create table sys_dept_csm
- (
- rec_id int(20) auto_increment comment 'id'
- primary key,
- dept_id int(20) not null comment '企业id',
- wl_qrcode_id varchar(32) not null comment '绑定的智能码 id',
- corp_id varchar(32) not null comment '企业id',
- csm_name varchar(32) not null comment '客户成功姓名',
- user_id int null comment '用户id',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '企业csm表';
- create index idx_dept_id
- on sys_dept_csm (dept_id);
- create table sys_dept_encryptor
- (
- id int(20) auto_increment
- primary key,
- dept_id int(20) not null comment '主体id',
- ser_public_key varchar(2048) not null comment '服务器公钥',
- ser_private_key varchar(2048) not null comment '服务器私钥',
- cli_public_key varchar(2048) null comment '客户端公钥',
- cli_private_key varchar(2048) null comment '客户端私钥',
- signature varchar(32) not null comment '签名字符串',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time timestamp default CURRENT_TIMESTAMP not null comment '更新时间'
- )
- comment '主体加密器' row_format = DYNAMIC;
- create table sys_dept_invoice
- (
- id int auto_increment comment '主键id'
- primary key,
- dept_id int null comment '组织机构ID',
- invoice_amount decimal(10, 2) default 0.00 not null comment '开票金额(元)',
- relation_package_score int default 0 not null comment '关联积分值',
- relation_package_number int default 0 not null comment '关联积分包个数',
- approval_status varchar(10) default 'PENDING' not null comment '审核状态',
- approval_time datetime null comment '审核时间',
- invoice_type char(10) not null comment '发票类型',
- address varchar(64) null comment '邮寄地址',
- addressee_name varchar(32) null comment '收件人姓名',
- addressee_phone varchar(20) null comment '收件人手机号',
- del_flag varchar(10) default '0' not null comment '是否删除',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '企业开票表';
- create index sys_dept_invoice_dept_id_index
- on sys_dept_invoice (dept_id);
- create table sys_dept_invoice_relation
- (
- id int auto_increment comment '主键id'
- primary key,
- invoice_id int null comment '企业开票表ID',
- dept_id int not null comment '发包企业id',
- package_id int not null comment '积分包id',
- invoice_status varchar(10) default 'PENDING' not null comment '开票状态',
- invoice_time datetime null comment '开票时间',
- del_flag varchar(10) default '0' not null comment '是否删除',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建/申请时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- constraint sys_dept_invoice_relation_invoice_id_package_id_uindex
- unique (invoice_id, package_id)
- )
- comment '企业开票关联表';
- create table sys_dept_recharge
- (
- id int auto_increment comment '主键id'
- primary key,
- dept_id int null comment '组织机构ID',
- score int default 0 not null comment '积分余额',
- balance decimal(10, 2) default 0.00 not null comment '余额(元)(已废弃)',
- permissions varchar(64) null comment '权限,多个逗号分隔',
- service_charge decimal(5, 2) default 0.00 not null comment '服务费率',
- overdraw_amount decimal(10, 2) default 0.00 not null comment '可透支金额(已废弃)',
- overdraw_score int default 0 not null comment '可透支积分',
- del_flag varchar(10) default '0' not null comment '是否删除',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- version int default 0 null,
- constraint sys_dept_recharge_dept_id_uindex
- unique (dept_id)
- )
- comment '积分充值表';
- create table sys_dept_recharge_record
- (
- id int auto_increment comment '主键id'
- primary key,
- recharge_id int null comment '积分充值表ID',
- dept_id int null comment '组织机构ID',
- relation_dept_id int null comment '关联组织机构ID(关联操作对象)',
- change_score int not null comment '充值积分',
- change_amount decimal(10, 2) default 0.00 not null comment '充值金额(元)(已废弃)',
- type char(25) not null comment '操作类型',
- current_score int not null comment '充值后积分余额',
- current_balance decimal(10, 2) default 0.00 not null comment '充值后积分余额(元)(已废弃)',
- package_id int null comment '积分包id',
- package_type varchar(32) null comment '积分包类型',
- del_flag varchar(10) default '0' not null comment '是否删除',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- create_user int null comment '创建人'
- )
- comment '积分充值/使用记录表';
- create index sys_dept_recharge_record_dept_id_index
- on sys_dept_recharge_record (dept_id);
- create table sys_dept_relation
- (
- ancestor int not null comment '祖先节点',
- descendant int not null comment '后代节点'
- )
- comment '部门关系表' row_format = DYNAMIC;
- create index idx1
- on sys_dept_relation (ancestor);
- create index idx2
- on sys_dept_relation (descendant);
- create table sys_dept_sub
- (
- sub_id int auto_increment
- primary key,
- dept_id int(20) not null,
- subject_type varchar(2) default '0' not null comment '认证方式0-人力家 1-税邦云',
- subject_channel int default 0 not null comment '结算通道',
- subject_location varchar(64) null comment '税源地',
- app_id varchar(255) default '0' null,
- app_secret varchar(2048) null,
- rsa_public_key varchar(2048) null,
- query_url varchar(255) null,
- subject_name varchar(128) null comment '结算主体',
- limit_amount decimal(18, 2) null,
- enable_flag varchar(2) default '0' null,
- subject_user_type varchar(2) null comment '税邦云用户类型id',
- subject_invoice_category varchar(25) null comment '税邦云用户类型对应的发票类目',
- path_no varchar(128) null comment '汇企云批次付款渠道编号',
- update_time datetime null comment '更新时间',
- service_charge decimal(4, 2) default 0.00 not null,
- cert_enable tinyint default 1 null comment '认证是否启用:1:启用,0:停用',
- settle_enable tinyint default 1 null comment '结算是否启用:1:启用,0:停用',
- eid_enable tinyint default 1 null comment 'E证通认证是否启用:1-启用,0-停用'
- )
- comment '部门结算主体管理' row_format = DYNAMIC;
- create table sys_dict
- (
- id int(64) auto_increment comment '编号'
- primary key,
- type varchar(100) null,
- description varchar(100) null,
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null comment '更新时间',
- remarks varchar(255) null,
- `system` char default '0' null,
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '字典表' row_format = DYNAMIC;
- create index sys_dict_del_flag
- on sys_dict (del_flag);
- create table sys_dict_item
- (
- id int(64) auto_increment comment '编号'
- primary key,
- dict_id int not null,
- value varchar(100) null,
- label varchar(100) null,
- type varchar(100) null,
- description varchar(512) null,
- sort int(10) default 0 not null comment '排序(升序)',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
- remarks varchar(255) null,
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '字典项' row_format = DYNAMIC;
- create index sys_dict_del_flag
- on sys_dict_item (del_flag);
- create index sys_dict_label
- on sys_dict_item (label);
- create index sys_dict_value
- on sys_dict_item (value);
- create table sys_dict_item_copy
- (
- id int(64) auto_increment comment '编号'
- primary key,
- dict_id int not null,
- value varchar(100) null,
- label varchar(100) null,
- type varchar(100) null,
- description varchar(100) null,
- sort int(10) default 0 not null comment '排序(升序)',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
- remarks varchar(255) null,
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '字典项' row_format = DYNAMIC;
- create index sys_dict_del_flag
- on sys_dict_item_copy (del_flag);
- create index sys_dict_label
- on sys_dict_item_copy (label);
- create index sys_dict_value
- on sys_dict_item_copy (value);
- create table sys_ent_rel
- (
- rel_id int(20) auto_increment comment 'id'
- primary key,
- ent_id int(20) not null comment '企业id',
- e_type varchar(8) not null comment '租户类型',
- pro_line varchar(8) not null comment '产品线',
- e_level varchar(8) not null comment '租户层级',
- parent_id int(20) not null comment '父级id',
- root_id int(20) not null comment '顶层id',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '企业层级关系表';
- create index idx_level
- on sys_ent_rel (e_level);
- create index idx_pid
- on sys_ent_rel (parent_id);
- create index idx_pro_line
- on sys_ent_rel (pro_line);
- create index idx_rid
- on sys_ent_rel (root_id);
- create index idx_type
- on sys_ent_rel (e_type);
- create table sys_file
- (
- id bigint(32) auto_increment comment '编号'
- primary key,
- file_name varchar(1500) null,
- bucket_name varchar(200) null,
- original varchar(1500) null,
- type varchar(50) null,
- file_size bigint(50) null comment '文件大小',
- create_user varchar(32) null,
- create_time datetime default CURRENT_TIMESTAMP null comment '上传时间',
- update_user varchar(32) null,
- update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
- del_flag char default '0' null,
- tenant_id int null comment '所属租户'
- )
- comment '文件管理表' row_format = DYNAMIC;
- create table sys_job
- (
- job_id int auto_increment comment '任务id',
- job_name varchar(64) not null comment '任务名称',
- job_group varchar(64) not null comment '任务组名',
- job_order char default '1' null comment '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
- job_type char default '1' not null comment '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
- execute_path varchar(500) null comment 'job_type=3时,rest调用地址,仅支持rest get协议,需要增加String返回值,0成功,1失败;job_type=4时,jar路径;其它值为空',
- class_name varchar(500) null comment 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
- method_name varchar(500) null comment '任务方法',
- method_params_value varchar(2000) null comment '参数值',
- cron_expression varchar(255) null comment 'cron执行表达式',
- misfire_policy varchar(20) default '3' null comment '错失执行策略(1错失周期立即执行 2错失周期执行一次 3下周期执行)',
- job_tenant_type char default '1' null comment '1、多租户任务;2、非多租户任务',
- job_status char default '0' null comment '状态(1、未发布;2、运行中;3、暂停;4、删除;)',
- job_execute_status char default '0' null comment '状态(0正常 1异常)',
- create_by varchar(64) null comment '创建者',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_by varchar(64) default '' null comment '更新者',
- update_time datetime default CURRENT_TIMESTAMP not null comment '更新时间',
- start_time timestamp null comment '初次执行时间',
- previous_time timestamp null comment '上次执行时间',
- next_time timestamp null comment '下次执行时间',
- tenant_id int default 1 null comment '租户',
- remark varchar(500) default '' null comment '备注信息',
- primary key (job_id, job_name, job_group)
- )
- comment '定时任务调度表' row_format = DYNAMIC;
- create table sys_job_log
- (
- job_log_id int auto_increment comment '任务日志ID'
- primary key,
- job_id int not null comment '任务id',
- job_name varchar(64) charset utf8 null comment '任务名称',
- job_group varchar(64) charset utf8 null comment '任务组名',
- job_order char charset utf8 null comment '组内执行顺利,值越大执行优先级越高,最大值9,最小值1',
- job_type char charset utf8 default '1' not null comment '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他',
- execute_path varchar(500) charset utf8 null comment 'job_type=3时,rest调用地址,仅支持post协议;job_type=4时,jar路径;其它值为空',
- class_name varchar(500) charset utf8 null comment 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空',
- method_name varchar(500) charset utf8 null comment '任务方法',
- method_params_value varchar(2000) charset utf8 null comment '参数值',
- cron_expression varchar(255) charset utf8 null comment 'cron执行表达式',
- job_message varchar(500) charset utf8 null comment '日志信息',
- job_log_status char charset utf8 default '0' null comment '执行状态(0正常 1失败)',
- execute_time varchar(30) charset utf8 null comment '执行时间',
- exception_info varchar(2000) charset utf8 default '' null comment '异常信息',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- tenant_id int default 1 not null comment '租户id',
- uuid varchar(64) null comment 'uuid'
- )
- comment '定时任务执行日志表' row_format = DYNAMIC;
- create table sys_log
- (
- id bigint(64) auto_increment comment '编号'
- primary key,
- type char default '0' null,
- title varchar(255) null,
- service_id varchar(32) null,
- create_by varchar(255) null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间',
- remote_addr varchar(255) null,
- user_agent varchar(1000) null,
- request_uri varchar(255) null,
- method varchar(10) null,
- params text null,
- resp text null comment '响应信息',
- time mediumtext charset utf8 null comment '执行时间',
- del_flag char default '0' null,
- exception text null,
- tenant_id int default 0 null comment '所属租户'
- )
- comment '日志表' row_format = DYNAMIC;
- create index sys_log_create_by
- on sys_log (create_by(191));
- create index sys_log_create_date
- on sys_log (create_time);
- create index sys_log_request_uri
- on sys_log (request_uri(191));
- create index sys_log_type
- on sys_log (type);
- create table sys_menu
- (
- menu_id int auto_increment comment '菜单ID'
- primary key,
- name varchar(32) null,
- permission varchar(32) null,
- path varchar(128) null,
- parent_id int null comment '父菜单ID',
- icon varchar(32) null,
- sort int default 1 null comment '排序值',
- keep_alive char default '0' null,
- type char default '0' null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null comment '更新时间',
- del_flag char default '0' null,
- tenant_id int(11) unsigned null comment '租户ID'
- )
- comment '菜单权限表' row_format = DYNAMIC;
- create table sys_oauth_client_details
- (
- id int auto_increment comment 'ID'
- primary key,
- client_id varchar(32) not null,
- resource_ids varchar(256) null,
- client_secret varchar(256) null,
- scope varchar(256) null,
- authorized_grant_types varchar(256) null,
- web_server_redirect_uri varchar(256) null,
- authorities varchar(256) null,
- access_token_validity int null,
- refresh_token_validity int null,
- additional_information varchar(4096) null,
- autoapprove varchar(256) null,
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '终端信息表' row_format = DYNAMIC;
- create table sys_plat
- (
- id int not null
- primary key,
- phone varchar(255) null comment '手机号',
- idcard varchar(255) null comment '身份证号',
- temp1 varchar(255) null comment '备用字段1',
- temp2 varchar(255) null comment '备用字段2',
- temp3 varchar(255) null comment '备用字段3',
- temp4 varchar(255) null comment '备用字段4',
- 备用字段5 varchar(255) null comment '备用字段5'
- )
- comment '平台用户信息' row_format = DYNAMIC;
- create table sys_portal_conf
- (
- conf_id bigint auto_increment comment '主键'
- primary key,
- spec_path varchar(32) not null comment '专属路径',
- portal_logo varchar(255) not null comment 'logo',
- portal_icon varchar(255) not null comment 'icon',
- portal_title varchar(32) not null comment 'title',
- portal_name varchar(16) not null comment '名称',
- bg_img varchar(255) null comment '背景图',
- theme_color json null comment '主题色',
- icp_no varchar(128) not null comment 'icp备案',
- pc_no varchar(128) not null comment 'pc备案号',
- created_by varchar(64) not null comment '创建人',
- modified_by varchar(64) not null comment '修改人',
- created_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- modified_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '门户配置信息' collate = utf8_bin;
- create index sys_portal_conf_spec_path_index
- on sys_portal_conf (spec_path);
- create table sys_public_param
- (
- public_id bigint auto_increment comment '编号'
- primary key,
- public_name varchar(128) null comment '名称',
- public_key varchar(128) null comment '键',
- public_value varchar(128) null comment '值',
- status char default '0' null comment '状态(0:正常,9:冻结)',
- validate_code varchar(64) null,
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- public_type char default '0' null,
- `system` char default '0' null,
- del_flag char default '0' null,
- tenant_id int null comment '租户ID'
- )
- comment '公共参数配置表' row_format = DYNAMIC;
- create table sys_role
- (
- role_id int auto_increment
- primary key,
- role_name varchar(64) null,
- role_code varchar(64) null,
- role_desc varchar(255) null,
- ds_type char default '2' null,
- ds_scope varchar(255) null,
- create_time datetime default CURRENT_TIMESTAMP not null,
- update_time datetime null,
- del_flag char default '0' null,
- tenant_id int null
- )
- comment '系统角色表' row_format = DYNAMIC;
- create index role_idx1_role_code
- on sys_role (role_code);
- create table sys_role_menu
- (
- role_id int not null comment '角色ID',
- menu_id int not null comment '菜单ID',
- primary key (role_id, menu_id)
- )
- comment '角色菜单表' row_format = DYNAMIC;
- create table sys_route_conf
- (
- id int auto_increment comment '主键'
- primary key,
- route_name varchar(30) null,
- route_id varchar(30) null,
- predicates json null comment '断言',
- filters json null comment '过滤器',
- uri varchar(50) null,
- `order` int(2) default 0 null comment '排序',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- del_flag char default '0' null
- )
- comment '路由配置表' row_format = DYNAMIC;
- create table sys_social_details
- (
- id int auto_increment comment '主鍵'
- primary key,
- type varchar(16) null,
- remark varchar(64) null,
- app_id varchar(64) null,
- app_secret varchar(64) null,
- random_key varchar(16) null comment '随机key(16位)',
- redirect_url varchar(128) null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '系统社交登录账号表' row_format = DYNAMIC;
- create table sys_social_details_copy
- (
- id int auto_increment comment '主鍵'
- primary key,
- type varchar(16) null,
- remark varchar(64) null,
- app_id varchar(64) null,
- app_secret varchar(64) null,
- redirect_url varchar(128) null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '系统社交登录账号表' row_format = DYNAMIC;
- create table sys_social_details_copy1
- (
- id int auto_increment comment '主鍵'
- primary key,
- type varchar(16) null,
- remark varchar(64) null,
- app_id varchar(64) null,
- app_secret varchar(64) null,
- random_key varchar(16) null comment '随机key(16位)',
- redirect_url varchar(128) null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
- del_flag char default '0' null,
- tenant_id int default 0 not null comment '所属租户'
- )
- comment '系统社交登录账号表' row_format = DYNAMIC;
- create table sys_tenant
- (
- id int auto_increment comment '租户id'
- primary key,
- name varchar(255) null,
- code varchar(64) null,
- start_time datetime null comment '开始时间',
- end_time datetime null comment '结束时间',
- status char default '0' null,
- del_flag char default '0' null,
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间'
- )
- comment '租户表' row_format = DYNAMIC;
- create table sys_user
- (
- user_id int auto_increment comment '主键ID'
- primary key,
- username varchar(64) null,
- password varchar(255) null,
- salt varchar(255) null,
- phone varchar(20) null,
- avatar varchar(1024) null,
- dept_id int null comment '部门ID',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- lock_flag char default '0' null,
- del_flag char default '0' null,
- wx_openid varchar(32) null comment '微信登录openId',
- mini_openid varchar(32) null comment '小程序openId',
- qq_openid varchar(32) null comment 'QQ openId',
- gitee_login varchar(100) null comment '码云 标识',
- osc_id varchar(100) null comment '开源中国 标识',
- tenant_id int default 0 not null comment '所属租户',
- realname varchar(30) null comment '用户姓名',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- temp1 varchar(255) null comment '备用字段1',
- temp2 varchar(2000) null comment '备用字段2',
- temp3 varchar(255) null comment '备用字段3',
- temp4 varchar(255) null comment '备用字段4',
- temp5 varchar(255) null comment '备用字段5',
- plat_id varchar(50) null comment '平台ID',
- drug_ent_id varchar(11) null comment '药企ID',
- w1 varchar(255) null,
- id_card_number varchar(32) null comment '身份证',
- user_sign varchar(255) null comment '签名',
- cert_status int(2) null comment '认证状态',
- cert_remark varchar(255) null comment '认证结果描述',
- province_code varchar(11) null comment '省份编码',
- city_code varchar(11) null comment '城市编码',
- user_type varchar(2) default '0' null comment '认证方式0-人力家 1-税邦云',
- bank_card_number varchar(19) null comment '银行卡号',
- rlj_cert_status int(2) null comment '人力家认证状态',
- tax_helper_agreement_signature int(1) default 0 null comment '税邦云协议签署记录 0 未签署 1 已签署',
- bank_phone varchar(11) null comment '银行预留手机号',
- bank_name varchar(32) null comment '开户行',
- sign_agreement varchar(1024) null comment '小程序签署协议信息',
- age_reminder tinyint default 1 null comment '年龄超60周岁提醒',
- re_signed_agreement int default 1 null comment '是否已补签协议',
- gender char(5) null comment '性别,1男,2女',
- degree char(2) null comment '学历',
- qualification_record_number varchar(64) null comment '医药代表资质备案号',
- qualifications_url varchar(256) null comment '资质证书url'
- )
- comment '用户表' row_format = DYNAMIC;
- create index user_idx1_username
- on sys_user (username);
- create index user_qq_openid
- on sys_user (qq_openid);
- create index user_wx_openid
- on sys_user (wx_openid);
- create table sys_user_0226
- (
- user_id int auto_increment comment '主键ID'
- primary key,
- username varchar(64) null,
- password varchar(255) null,
- salt varchar(255) null,
- phone varchar(20) null,
- avatar varchar(255) null,
- dept_id int null comment '部门ID',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- lock_flag char default '0' null,
- del_flag char default '0' null,
- wx_openid varchar(32) null comment '微信登录openId',
- mini_openid varchar(32) null comment '小程序openId',
- qq_openid varchar(32) null comment 'QQ openId',
- gitee_login varchar(100) null comment '码云 标识',
- osc_id varchar(100) null comment '开源中国 标识',
- tenant_id int default 0 not null comment '所属租户',
- realname varchar(30) null comment '用户姓名',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- temp1 varchar(255) null comment '备用字段1',
- temp2 varchar(2000) null comment '备用字段2',
- temp3 varchar(255) null comment '备用字段3',
- temp4 varchar(255) null comment '备用字段4',
- temp5 varchar(255) null comment '备用字段5',
- plat_id varchar(50) null comment '平台ID',
- drug_ent_id varchar(11) null comment '药企ID',
- w1 varchar(255) null,
- id_card_number varchar(32) null comment '身份证',
- user_sign varchar(255) null comment '签名',
- cert_status int(2) null comment '认证状态',
- cert_remark varchar(255) null comment '认证结果描述',
- province_code varchar(11) null comment '省份编码',
- city_code varchar(11) null comment '城市编码'
- )
- comment '用户表' row_format = DYNAMIC;
- create index user_idx1_username
- on sys_user_0226 (username);
- create index user_qq_openid
- on sys_user_0226 (qq_openid);
- create index user_wx_openid
- on sys_user_0226 (wx_openid);
- create table sys_user_0517
- (
- user_id int auto_increment comment '主键ID'
- primary key,
- username varchar(64) null,
- password varchar(255) null,
- salt varchar(255) null,
- phone varchar(20) null,
- avatar varchar(255) null,
- dept_id int null comment '部门ID',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- lock_flag char default '0' null,
- del_flag char default '0' null,
- wx_openid varchar(32) null comment '微信登录openId',
- mini_openid varchar(32) null comment '小程序openId',
- qq_openid varchar(32) null comment 'QQ openId',
- gitee_login varchar(100) null comment '码云 标识',
- osc_id varchar(100) null comment '开源中国 标识',
- tenant_id int default 0 not null comment '所属租户',
- realname varchar(30) null comment '用户姓名',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- temp1 varchar(255) null comment '备用字段1',
- temp2 varchar(2000) null comment '备用字段2',
- temp3 varchar(255) null comment '备用字段3',
- temp4 varchar(255) null comment '备用字段4',
- temp5 varchar(255) null comment '备用字段5',
- plat_id varchar(50) null comment '平台ID',
- drug_ent_id varchar(11) null comment '药企ID',
- w1 varchar(255) null,
- id_card_number varchar(32) null comment '身份证',
- user_sign varchar(255) null comment '签名',
- cert_status int(2) null comment '认证状态',
- cert_remark varchar(255) null comment '认证结果描述',
- province_code varchar(11) null comment '省份编码',
- city_code varchar(11) null comment '城市编码',
- user_type varchar(2) default '0' null comment '认证方式0-人力家 1-税邦云',
- bank_card_number varchar(19) null comment '银行卡号'
- )
- comment '用户表' row_format = DYNAMIC;
- create index user_idx1_username
- on sys_user_0517 (username);
- create index user_qq_openid
- on sys_user_0517 (qq_openid);
- create index user_wx_openid
- on sys_user_0517 (wx_openid);
- create table sys_user_ext_record
- (
- id int auto_increment comment '主键id'
- primary key,
- user_id int not null comment '用户id',
- dept_id int not null comment '部门id',
- real_name varchar(30) null comment '用户姓名',
- phone varchar(20) null comment '手机号',
- id_card_number varchar(32) null comment '身份证号',
- bank_card_number varchar(19) null comment '银行卡号',
- bank_phone varchar(11) null comment '银行预留手机号',
- id_card_front_url varchar(255) null comment '身份证照片-正面',
- id_card_back_url varchar(255) null comment '身份证照片-反面',
- id_card_front_base64 longtext null comment '身份证照片-正面base64',
- id_card_back_base64 longtext null comment '身份证照片-反面base64',
- best_frame_url varchar(255) null comment '最佳帧照片url',
- best_frame_base64 longtext null comment '最佳帧照片base64',
- etoken varchar(40) null comment 'etoken',
- remark varchar(255) null comment '备注',
- del_flag char default '0' null comment '删除标记',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '用户认证相关的扩展信息';
- create index sys_user_ext_record_user_id_index
- on sys_user_ext_record (user_id);
- create table sys_user_record
- (
- id int auto_increment comment '主键id'
- primary key,
- user_id varchar(64) null comment '用户id',
- type varchar(64) null comment '记录类型',
- msg varchar(1024) null comment '记录信息',
- del_flag char(64) default '0' not null comment '删除标记位',
- create_user varchar(64) null comment '创建人',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_user varchar(64) null comment '更新人',
- update_time datetime null on update CURRENT_TIMESTAMP comment '更新时间时间'
- )
- comment '用户回访记录表';
- create table sys_user_role
- (
- user_id int not null comment '用户ID',
- role_id int not null comment '角色ID',
- primary key (user_id, role_id)
- )
- comment '用户角色表' row_format = DYNAMIC;
- create table sys_user_sub
- (
- id int auto_increment comment '主键ID'
- primary key,
- user_id int not null comment '用户ID',
- dept_id int null comment '部门id',
- gig_type int(2) not null comment '零工平台类型(订单支付方式类型:0-人力家 1-税邦云 2-自由职家 3-易联数科)',
- gig_channel int default 0 null comment '渠道',
- subject_location varchar(64) null comment '税源地',
- callback_status int(1) default 0 null comment '回调状态',
- cert_status int default 0 not null comment '认证状态',
- cert_remark longtext null comment '认证结果描述',
- fail_reason varchar(255) null comment '认证失败原因',
- user_type varchar(2) null comment '人员类型',
- bank_card_number varchar(19) null comment '银行卡号',
- bank_phone varchar(11) null comment '银行预留手机号',
- bank_name varchar(64) null comment '开户行',
- id_card_front_url varchar(255) null comment '身份证照片-正面',
- id_card_back_url varchar(255) null comment '身份证照片-反面',
- cert_video1_url varchar(255) null comment '认证视频1',
- cert_video2_url varchar(255) null comment '认证视频1',
- agreement_url varchar(255) null comment '协议',
- request_id varchar(255) null comment '请求流水号',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- callback_time datetime null comment '回调时间'
- )
- comment '用户签约认证主体信息表';
- create table sys_wx_reply_message
- (
- id int auto_increment comment '主鍵'
- primary key,
- keyword varchar(255) not null comment '关键字',
- type tinyint(1) not null comment '消息类型(0:文字,1:图片,2:视频,3:图文消息)',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime not null comment '更新时间',
- enable_flag tinyint(1) default 0 not null comment '是否生效(0:未生效,1:生效)'
- )
- comment '微信自动回复消息表' row_format = DYNAMIC;
- create table sys_wx_reply_message_media
- (
- id int auto_increment comment '主键'
- primary key,
- media_type tinyint(1) not null comment '素材类型(1:文字,2:图片,3:视频)',
- title varchar(255) null comment '视频的标题',
- introduction varchar(255) null comment '视频的描述',
- content varchar(1024) null comment '内容',
- name varchar(255) null comment '文件名称',
- url varchar(512) null comment 'url地址',
- wx_media_id varchar(128) null comment '微信素材id',
- sort int(2) not null comment '排序',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime not null comment '更新时间'
- )
- comment '微信自动回复消息素材表' row_format = DYNAMIC;
- create table sys_wx_reply_message_relation
- (
- id int auto_increment
- primary key,
- message_id int not null comment '微信消息id',
- message_media_id int not null comment '微信消息素材id'
- )
- comment '微信消息和素材关联表' row_format = DYNAMIC;
- create table upms_sequence
- (
- id bigint auto_increment
- primary key,
- value bigint not null,
- name varchar(32) not null,
- gmt_create datetime not null,
- gmt_modified datetime not null,
- constraint uk_name
- unique (name)
- );
- create table user_agreement_signature_record
- (
- id int auto_increment comment 'id'
- primary key,
- user_id int not null comment '用户id',
- target int(1) not null comment '协议方',
- agreement mediumtext null comment '协议文本',
- sign_time datetime not null comment '签署时间',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- sign_img longtext null comment '手签图片'
- )
- comment '用户协议签名';
- create table wm_ad_record
- (
- record_id bigint unsigned auto_increment comment 'id'
- primary key,
- user_id int not null comment '用户id',
- ad_url varchar(255) not null comment '跳转地址',
- created_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '部门管理';
- create table wm_af_customer
- (
- id int auto_increment comment '主键id'
- primary key,
- dept_id int null comment '部门id',
- customer_number varchar(20) charset utf8mb4 not null comment '客户id',
- customer_name varchar(50) charset utf8mb4 not null comment '客户名称',
- customer_type varchar(20) not null comment '客户类别(0-药企、1-CSO、2-CRO、3-其他)',
- customer_manager varchar(50) charset utf8mb4 not null comment '客户经理',
- channel_name varchar(50) charset utf8mb4 null comment '渠道名称',
- sign_date datetime null comment '签订日期',
- expiration_date datetime null comment '有效期截止',
- customer_status varchar(20) null comment '客户状态:(0-客户备案、1-合同立项、2-签约 、3-上线)',
- remark varchar(128) charset utf8mb4 null comment '说明',
- contract_file varchar(512) charset utf8mb4 null comment '合同附件',
- contract_name varchar(50) charset utf8mb4 null comment '合同名称',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '档案-客户管理' charset = utf8
- row_format = DYNAMIC;
- create table wm_contract
- (
- id bigint(11) auto_increment comment '编号'
- primary key,
- customer_id int null comment '客户主键id',
- tenant_id int null comment '租户id',
- serial_no varchar(255) null comment '合同编号',
- title varchar(255) charset utf8 null comment '合同名称',
- party_a varchar(255) charset utf8 null comment '签约甲方',
- party_b varchar(255) charset utf8 null comment '签约乙方',
- sign_time datetime null comment '签约时间',
- expiration_time datetime null comment '有效截止时间',
- filing_time datetime null comment '归档时间',
- state varchar(255) charset utf8 null comment '说明',
- pic_url varchar(255) charset utf8mb4 null comment '合同图片地址',
- mgr varchar(50) charset utf8mb4 null comment '客户经理名称',
- remark varchar(255) charset utf8 null comment '备注',
- create_user int null comment '创建人',
- create_time datetime null comment '创建时间',
- update_user int null comment '修改人',
- update_time datetime null comment '修改时间'
- )
- comment '档案-合同管理' charset = latin1
- row_format = DYNAMIC;
- create table wm_contract0609
- (
- id bigint(11) auto_increment comment '编号'
- primary key,
- contract_number varchar(255) null comment '合同编号',
- contract_name varchar(255) charset utf8 null comment '合同名称',
- sign_jia varchar(255) charset utf8 null comment '签约甲方',
- sign_yi varchar(255) charset utf8 null comment '签约乙方',
- sign_time datetime null comment '签约时间',
- filing_time datetime null comment '归档时间',
- state varchar(255) charset utf8 null comment '说明',
- annex_contract varchar(500) charset utf8mb4 null comment '合同附件',
- remark varchar(255) charset utf8 null comment '备注',
- create_time datetime null comment '创建时间',
- update_user varchar(128) charset utf8 null comment '修改人',
- update_time datetime null comment '修改时间',
- dept_id varchar(11) charset utf8mb4 null comment '组织机构ID'
- )
- comment '档案-合同管理' charset = latin1
- row_format = DYNAMIC;
- create table wm_da_agent
- (
- id int auto_increment
- primary key,
- gsmc varchar(50) not null comment '公司名称',
- yyzz varchar(5000) null comment '营业执照',
- sbjnzm varchar(5000) null comment '社保缴纳证明',
- frsfzzm_zm varchar(500) null comment '法人身份证证明-正面',
- frsfzzm_bm varchar(500) null comment '法人身份证证明-背面',
- frsfzzm_sc varchar(500) null comment '法人身份证证明-手持',
- is_examine char null comment '是否审核',
- zj_type varchar(20) null comment '证件类型',
- zj_number varchar(50) null comment '证件号码',
- ext_drug_ent varchar(255) null comment '扩展可选药企',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user varchar(200) null comment '更新人',
- drug_ent_id varchar(20) null comment '所属药企',
- temp1 varchar(255) null,
- temp2 varchar(255) null,
- js_account varchar(32) null comment '结算账号 ',
- management varchar(2) null comment '管理模式',
- pgqx varchar(11) null comment '派工权限',
- qylx varchar(11) null comment '企业类型',
- subject_type varchar(1024) null,
- agent_type char(2) not null,
- mah_settle_dept_id int null comment 'MAH结算-药企deptId'
- )
- comment '档案-代理商' row_format = DYNAMIC;
- create table wm_da_agent_0517
- (
- id int auto_increment
- primary key,
- gsmc varchar(50) not null comment '公司名称',
- yyzz varchar(500) null comment '营业执照',
- sbjnzm varchar(500) null comment '社保缴纳证明',
- frsfzzm_zm varchar(500) null comment '法人身份证证明-正面',
- frsfzzm_bm varchar(500) null comment '法人身份证证明-背面',
- frsfzzm_sc varchar(500) null comment '法人身份证证明-手持',
- is_examine char null comment '是否审核',
- zj_type varchar(20) null comment '证件类型',
- zj_number varchar(50) null comment '证件号码',
- ext_drug_ent varchar(255) null comment '扩展可选药企',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user varchar(200) null comment '更新人',
- drug_ent_id varchar(20) null comment '所属药企',
- temp1 varchar(255) null,
- temp2 varchar(255) null,
- js_account varchar(32) null comment '结算账号 ',
- management varchar(2) null comment '管理模式',
- pgqx varchar(11) null comment '派工权限',
- qylx varchar(11) null comment '企业类型',
- subject_type varchar(50) null
- )
- comment '档案-代理商' row_format = DYNAMIC;
- create table wm_da_dis_excel
- (
- 商业公司名称 varchar(255) null,
- 商业公司地址 varchar(255) null,
- f3 varchar(255) null,
- 三合一社会信用代码 varchar(255) null,
- GSP证书编号 varchar(255) null,
- 公司注册地 varchar(255) null,
- 注册资本 varchar(255) null,
- 法人代表 varchar(255) null
- )
- row_format = DYNAMIC;
- create table wm_da_distribution
- (
- id int auto_increment
- primary key,
- gsmc varchar(50) not null comment '商业公司名称',
- province longtext null comment '省',
- city longtext null comment '市',
- area longtext null comment '区',
- address varchar(255) not null comment '地址',
- longitude varchar(255) null comment '经度',
- latitude varchar(255) null comment '纬度',
- gsgm varchar(50) null comment '公司规模',
- shyshxydm varchar(20) not null comment '三合一社会信用代码',
- gszcd varchar(255) not null comment '公司注册地',
- zczb varchar(20) null comment '注册资本',
- gspzsbh varchar(20) null comment 'GSP证书编号',
- frdb varchar(20) not null comment '法人代表',
- zjl varchar(20) null comment '总经理',
- cjbmfzrxm varchar(20) null comment '采购部门负责人姓名',
- cjbmfzrlxfs varchar(20) null comment '采购部门负责人联系方式',
- cgbmdjrxm varchar(20) null comment '采购部门对接人姓名',
- cgbmdjrlxfs varchar(20) null comment '采购部门对接人联系方式',
- xsbmfzrxm varchar(20) null comment '销售部门负责人姓名',
- xsbmfzrlxfs varchar(20) null comment '销售部门负责人联系方式',
- xsbmdjrxm varchar(20) null comment '销售部门对接人姓名',
- xsbmdjrlxfs varchar(20) null comment '销售部门对接人联系方式',
- gsjj varchar(2048) null comment '公司简介',
- jyys varchar(500) null comment '经营优势',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag varchar(1) default '0' not null comment '是否删除',
- enable_flag varchar(1) default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- sygsdz varchar(255) null comment '商业公司地址',
- medicine_traceability varchar(1) not null comment '药品信息化追溯体系(0-扫码入库,1-其他)',
- medicine_traceability_other varchar(255) null comment '药品信息化追溯体系-其他(追溯体系介绍)'
- )
- comment '档案-配送公司' row_format = DYNAMIC;
- create table wm_da_drug_ent
- (
- id int auto_increment
- primary key,
- entname varchar(50) null comment '企业名称',
- entcode varchar(50) null comment '组织机构代码',
- temp1 varchar(50) null,
- temp2 varchar(50) null,
- temp3 varchar(50) null,
- temp4 varchar(50) null,
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- pgqx varchar(2) null comment '派工权限',
- management varchar(2) null comment '管理模式',
- subject_type varchar(1024) null,
- constraint code
- unique (entcode)
- )
- comment '档案-药企' row_format = DYNAMIC;
- create table wm_da_drug_ent_drugtable
- (
- id int auto_increment
- primary key,
- drugname varchar(50) null comment '药品名称',
- drugname_ty varchar(255) null comment '通用药品你名称',
- drug_ent_id char(11) null comment '企业ID',
- is_yb char null comment '是否医保',
- dose_id char(11) null comment '剂型ID',
- guige_id char(11) null comment '规格ID',
- remark varchar(255) null comment '备注',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- drug_ent_name varchar(255) null comment '所属药企名称',
- drug_ent_num int null comment '分配统计',
- ssxkcyy varchar(64) null comment '上市许可持有人',
- yyfz varchar(128) null comment '原验/仿制',
- dose_name varchar(128) null comment '剂型名称',
- guige_name varchar(128) null comment '规格名称',
- detail text null comment '详情信息(暂手动维护,用于报告)'
- )
- comment '档案-药企药品' row_format = DYNAMIC;
- create index 剂型
- on wm_da_drug_ent_drugtable (dose_id);
- create index 药企外键
- on wm_da_drug_ent_drugtable (drug_ent_id);
- create index 规格
- on wm_da_drug_ent_drugtable (guige_id);
- create table wm_da_hospital
- (
- id int auto_increment
- primary key,
- yymc varchar(100) not null comment '医院名称',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- longitude varchar(255) null comment '经度',
- latitude varchar(255) null comment '纬度',
- yygm varchar(20) null comment '医院规模',
- yyxz varchar(255) null comment '医院性质',
- lxzj varchar(50) null comment '联系总机',
- ggyx varchar(50) null comment '公共邮箱',
- yzxm varchar(50) null comment '院长姓名',
- yzlxfs varchar(20) null comment '院长联系方式',
- fyzxm varchar(20) null comment '副院长姓名',
- fyzlxfs varchar(20) null comment '副院长联系方式',
- ywcczxm varchar(20) null comment '医务处处长姓名',
- ywcczlxfs varchar(20) null comment '医务处处长联系方式',
- jwcczxm varchar(20) null comment '教务处处长姓名',
- jwcczlxfs varchar(20) null comment '教务处处长联系方式',
- yjkzrxm varchar(20) null comment '药剂科主任姓名',
- yjkzrlsfs varchar(20) null comment '药剂科主任联系方式',
- ybczs varchar(10) null comment '院病床总数(张)',
- zlghsy varchar(255) null comment '主流供货商业',
- pspzsfry char null comment '普什品种是否入院',
- pspzpssy varchar(50) null comment '普什品种配送商业',
- dept_id varchar(11) null comment '组织机构ID',
- website varchar(1024) null comment '医院官网',
- del_flag varchar(1) default '0' not null comment '是否删除',
- enable_flag varchar(1) default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- ybczs_bak int(10) null comment '备份床位数字段历史数据'
- )
- comment '档案-医院' row_format = DYNAMIC;
- create table wm_da_pharmacy
- (
- id int auto_increment
- primary key,
- pharmacy_name varchar(255) null comment '药店名称',
- province longtext null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- longitude varchar(255) null comment '经度',
- latitude varchar(255) null comment '纬度',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag varchar(1) default '0' not null comment '是否删除',
- enable_flag varchar(1) default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- pharmacy_type char(10) default 'ORDINARY' null comment '药店类型'
- )
- comment '药店档案' row_format = DYNAMIC;
- create table wm_da_project
- (
- id int(50) auto_increment comment '主键id'
- primary key,
- project_id bigint null comment '项目id',
- project_name varchar(50) charset utf8mb4 null comment '项目名称',
- partya varchar(30) charset utf8mb4 null comment '项目甲方',
- partyb varchar(30) charset utf8mb4 null comment '项目乙方',
- sign_data datetime null comment '签订日期',
- expiration_date datetime null comment '有效期截止',
- project_status int(1) null comment '项目状态 2进行中 1已完成',
- customer_care varchar(30) charset utf8mb4 null comment '客户维护',
- remark varchar(50) charset utf8mb4 default '' null comment '说明',
- contract_file varchar(500) charset utf8mb4 default '' null comment '合同附件',
- contract_name varchar(30) charset utf8mb4 null comment '合同名称',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- export1 varchar(30) charset utf8mb4 null comment '备用1',
- export2 varchar(30) charset utf8mb4 null comment '备用2',
- export3 varchar(30) charset utf8mb4 null comment '备用3'
- )
- comment '档案-项目管理' charset = utf8
- row_format = DYNAMIC;
- create table wm_da_track
- (
- id int auto_increment comment '主键id'
- primary key,
- trace_principal_name varchar(50) charset utf8mb4 null comment '跟踪主体名称',
- trace_object_name varchar(50) charset utf8mb4 null comment '跟踪客体名称',
- status int(1) null comment '状态 0进行中 1已完成',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- project_id bigint null comment '项目id',
- export1 varchar(30) charset utf8mb4 default '' null comment '备用1',
- export2 varchar(30) charset utf8mb4 default '' null comment '备用2',
- export3 varchar(30) charset utf8mb4 default '' null comment '备用3'
- )
- comment '档案-跟踪信息' charset = utf8
- row_format = DYNAMIC;
- create table wm_da_zb
- (
- 地区 varchar(255) null,
- 医院编码 varchar(255) null,
- 医院名称 varchar(255) null,
- 医院地址 varchar(255) null,
- 邮编 varchar(255) null,
- 电话 varchar(255) null,
- 院长 varchar(255) null,
- 床位数 varchar(255) null,
- 日门诊量 varchar(255) null,
- 等级 varchar(255) null,
- 专科 varchar(255) null,
- 设备 varchar(255) null,
- 网址 varchar(255) null,
- 邮箱 varchar(255) null,
- f15 varchar(255) null,
- f16 varchar(255) null,
- id int auto_increment
- primary key
- )
- row_format = DYNAMIC;
- create table wm_dept_budget
- (
- id int auto_increment
- primary key,
- dept_id int null comment '所属机构',
- belong_date varchar(20) null comment '预算月份',
- declare_dept varchar(255) null comment '申报机构',
- budget_type varchar(2) null comment '预算类型',
- budget int(20) null comment '预算值',
- create_time datetime null comment '创建时间'
- )
- comment '预算管理' row_format = DYNAMIC;
- create table wm_dept_gmv
- (
- id int auto_increment comment '主键id'
- primary key,
- dept_id int not null comment '部门ID',
- year char(4) not null comment '年份',
- month char(4) not null comment '月份',
- gmv1 bigint not null comment '按积分值统计的GMV(单位:积分)',
- gmv1_rate int not null comment 'gmv1收益率(万分之)',
- gmv2 bigint not null comment '按结算额统计的GMV(单位:分)',
- gmv2_rate int not null comment 'gmv2收益率(万分之)',
- renlijia_service_charge_rate int null comment '人力家服务费(万分之)',
- income bigint not null comment '要易收益(单位:分)',
- update_time datetime default CURRENT_TIMESTAMP not null comment '修改时间'
- )
- comment 'GMV数据统计主表' row_format = DYNAMIC;
- create table wm_dept_gmv_record
- (
- id int auto_increment comment 'id'
- primary key,
- gmv_id int not null comment 'GMV数据统计主表id',
- statistics_day char(2) not null comment '统计日(1-31)',
- gmv1 bigint not null comment '按积分值统计的GMV(单位:积分)',
- gmv1_rate int not null comment 'gmv1收益率(万分之)',
- gmv2 bigint not null comment '按结算额统计的GMV(单位:分)',
- gmv2_rate int not null comment 'gmv2收益率(万分之)',
- renlijia_service_charge_rate int null comment '人力家服务费(万分之)',
- income bigint not null comment '要易收益(单位:分)',
- update_time datetime default CURRENT_TIMESTAMP not null comment '修改时间'
- )
- comment 'GMV数据统计每日记录表' row_format = DYNAMIC;
- create table wm_dept_regulations
- (
- id int auto_increment comment 'id'
- primary key,
- dept_id int null comment '部门id',
- file_name varchar(50) not null comment '文件名称',
- file_url varchar(1024) not null comment '文件地址',
- sort int default 0 not null comment '排序',
- del_flag char default '0' not null comment '删除标记:0(未删除),1(已删除)',
- enable_flag char default '0' not null comment '是否禁用:0(启用),1(禁用)',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- update_time datetime null on update CURRENT_TIMESTAMP comment '修改时间',
- constraint wm_dept_regulations_dept_id_uindex
- unique (dept_id, file_name)
- )
- comment '企业规章制度';
- create table wm_dept_task_type_config
- (
- id int auto_increment
- primary key,
- dept_id int not null comment '组织机构ID',
- task_type_json text null comment '任务类型配置',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '部门任务类型配置';
- create table wm_dept_task_type_template
- (
- id int auto_increment
- primary key,
- dept_id int not null comment '组织机构ID',
- task_type_id int null comment '任务类型id',
- template varchar(64) null comment '模板',
- detail json null comment '规则详情',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '部门任务类型模板';
- create table wm_ent_rate
- (
- id int auto_increment,
- dept_id int not null,
- end_type varchar(32) not null,
- subject_location varchar(32) not null comment '结算渠道',
- type int not null comment '结算手续费包含;0不包含、1包含',
- rate double null comment '结算渠道的服务费率',
- constraint wm_ent_rate_id_uindex
- unique (id)
- )
- comment '企业服务费率';
- create table wm_ent_relation
- (
- id int auto_increment
- primary key,
- dept_id_parent int not null comment '当前企业的父级企业',
- dept_id int null comment '当前企业',
- dept_name varchar(32) null comment '冗余字段,用于matebase检索企业名称',
- constraint wm_end_relation_id_uindex
- unique (id)
- )
- comment '企业关联关系(仅限单层,暂不支持递归父级)';
- create table wm_ent_type
- (
- id int auto_increment,
- dept_id int not null comment '关联企业id,详见sys_dept.dept_id'
- primary key,
- end_type varchar(32) not null comment '企业所属类型;CSO、HCP',
- constraint wm_end_type_id_uindex
- unique (id)
- )
- comment '企业类型';
- create table wm_feedback
- (
- id int auto_increment
- primary key,
- yj_userid char(11) null comment '反馈意见用户ID',
- yg_content longtext null comment '反馈意见内容',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '意见反馈' row_format = DYNAMIC;
- create index 反馈人ID
- on wm_feedback (yj_userid);
- create table wm_import_user
- (
- id int auto_increment
- primary key,
- score_id varchar(50) not null comment '积分包ID',
- import_name varchar(20) null comment '姓名',
- import_phone varchar(20) null comment '手机号',
- import_id_card_number varchar(18) null comment '身份证号',
- user_sign varchar(255) null comment '签名',
- cert_status int(2) null comment '认证状态',
- cert_remark varchar(255) null comment '认证结果描述',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- del_flag char default '0' not null comment '是否删除',
- real_flag char default '0' not null comment '是否禁用'
- )
- comment '导入任务成员表' row_format = DYNAMIC;
- create table wm_payoff
- (
- id int auto_increment comment '主键id'
- primary key,
- score_name varchar(50) charset utf8mb4 null comment '积分包名称',
- id_number varchar(20) charset utf8mb4 null comment '身份证号',
- settle_status int(2) null comment '结算状态',
- cause_failure varchar(50) charset utf8mb4 null comment '失败原因',
- cert_status int(2) null comment '实名认证状态',
- submitted_value varchar(50) charset utf8mb4 null comment '已提交积分值',
- settle_amount decimal(30, 2) null comment '实际结算金额',
- discount decimal(11, 4) null comment '折扣',
- score_id varchar(50) charset utf8mb4 null comment '关联积分包id',
- settle_people varchar(20) charset utf8mb4 null comment '结算人',
- settle_time datetime null comment '结算时间',
- statement_no varchar(64) charset utf8mb4 null comment '结算单号',
- export1 varchar(20) charset utf8mb4 null comment '备用1',
- export2 varchar(20) charset utf8mb4 null comment '备用2',
- export3 varchar(20) charset utf8mb4 null comment '备用3'
- )
- comment '结算表' charset = utf8
- row_format = DYNAMIC;
- create table wm_pkg_quiz_rel
- (
- rel_id int auto_increment comment 'Id'
- primary key,
- pkg_id int not null comment '积分包ID',
- quiz_id int null comment '试卷id',
- quiz_title varchar(64) not null comment '标题',
- item_qty int unsigned not null comment '试卷项数量',
- total_mark int unsigned default 0 not null comment '总分',
- passing_mark int unsigned default 0 not null comment '及格分',
- quiz_items json null comment '试卷项',
- avail tinyint(1) default 1 not null comment '可视化',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '积分包试卷表';
- create table wm_project
- (
- id int auto_increment comment '主键id'
- primary key,
- dept_id int not null comment '部门id',
- project_number varchar(50) not null comment '项目编号',
- project_name varchar(50) not null comment '项目名称',
- delegate varchar(50) not null comment '委托方',
- sign_time datetime not null comment '项目签约时间',
- remark varchar(128) null comment '备注',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- constraint dept_id_project_number_unique
- unique (dept_id, project_number)
- )
- comment '项目管理' row_format = DYNAMIC;
- create table wm_project_evidence
- (
- id int auto_increment comment '主键id'
- primary key,
- project_id int not null comment '项目id',
- filename varchar(64) not null comment '文件名称',
- url varchar(512) not null comment '静态证据url',
- type varchar(10) not null comment '文件类型',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人'
- )
- comment '项目管理-静态证据子表' row_format = DYNAMIC;
- create table wm_question
- (
- qst_id int auto_increment comment 'Id'
- primary key,
- serial_num varchar(64) not null comment '序列号',
- label varchar(64) not null comment '标题',
- options json null comment '选项',
- answer varchar(255) null comment '答案',
- ent_id int unsigned not null comment '企业信息',
- create_by varchar(64) not null comment '创建人',
- update_by varchar(64) not null comment '修改人',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
- constraint uk_sn
- unique (serial_num)
- )
- comment '试题表';
- create index idx_eid
- on wm_question (ent_id);
- create table wm_quiz
- (
- quiz_id int auto_increment comment 'Id'
- primary key,
- serial_num varchar(64) not null comment '序列号',
- quiz_title varchar(64) not null comment '标题',
- introduction varchar(255) null comment '简介',
- source_type varchar(8) not null comment '问卷来源类型',
- quiz_state varchar(8) not null comment '问卷状态',
- ent_id int unsigned not null comment '企业信息',
- quiz_expand json null comment '试卷统计',
- create_by varchar(64) not null comment '创建人',
- update_by varchar(64) not null comment '修改人',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间',
- constraint uk_sn
- unique (serial_num)
- )
- comment '试卷表';
- create index idx_eid
- on wm_quiz (ent_id);
- create index idx_st
- on wm_quiz (source_type);
- create index idx_state
- on wm_quiz (quiz_state);
- create table wm_quiz_item
- (
- item_id int auto_increment comment 'Id'
- primary key,
- quiz_sn varchar(64) not null comment '试卷序号',
- label varchar(1024) not null comment '标题',
- quiz_options json null comment '选项',
- answer varchar(255) null comment '答案',
- widget bigint not null comment '排序权重',
- mark int default 0 not null comment '分数',
- create_by varchar(64) not null comment '创建人',
- update_by varchar(64) not null comment '修改人',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间'
- )
- comment '试卷项表';
- create index idx_quiz_sn
- on wm_quiz_item (quiz_sn);
- create table wm_relation
- (
- up_id int not null,
- down_id int not null,
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- constraint wm_relation_pk
- unique (up_id, down_id)
- )
- comment '企业关系表' row_format = DYNAMIC;
- create table wm_report
- (
- id int auto_increment comment '主键id'
- primary key,
- report_no varchar(64) not null comment '报告单号',
- drug_ent_id int null comment '结算企业ID',
- score_id int not null comment '积分包ID',
- apply_drug_ent_id int null comment '申请结算企业ID',
- package_score varchar(11) null comment '积分包值',
- task_number varchar(11) null comment '任务数量',
- total_score varchar(11) null comment '合计分值',
- report_status varchar(2) null comment '报告状态',
- create_people varchar(50) null comment '创建人',
- create_time datetime null comment '创建时间',
- approval_people varchar(20) null comment '审核人',
- approval_time datetime null comment '审核时间',
- update_people varchar(20) null comment '更新人',
- update_time datetime null comment '更新时间',
- del_flag varchar(2) default '0' not null comment '是否删除',
- export1 varchar(20) charset utf8mb4 null comment '备用1',
- export2 varchar(20) charset utf8mb4 null comment '备用2',
- export3 varchar(20) charset utf8mb4 null comment '备用3'
- )
- comment '报告审核表' charset = utf8
- row_format = DYNAMIC;
- create index wm_report_score_id_index
- on wm_report (score_id);
- create table wm_report_export_record
- (
- record_id int auto_increment comment '主键id'
- primary key,
- report_no varchar(64) not null comment '报告单号',
- report_title varchar(128) not null comment '报告名称',
- dept_id int null comment '结算企业ID',
- export_status varchar(2) null comment '报告状态',
- oss_url varchar(255) null comment '报告地址',
- created_by varchar(50) null comment '创建人',
- created_time datetime null comment '创建时间',
- finish_time datetime null comment '完成时间'
- )
- comment '报告审核表' charset = utf8;
- create table wm_score_package
- (
- id int auto_increment
- primary key,
- task_rule_id varchar(11) null comment '规则ID',
- drug_ent_id varchar(11) null,
- score_id varchar(50) null,
- score_name varchar(255) null comment '积分包名称',
- score varchar(11) null,
- agent_type_id varchar(1) null,
- level1_id varchar(11) null comment '一级代理商',
- level2_id varchar(11) null comment '二级代理商',
- zb_id varchar(11) null comment '众包ID',
- xxdb_id varchar(11) null comment '销售代表ID',
- typeid varchar(11) null comment '分配对象类型',
- package_status varchar(11) null comment '积分包状态',
- package_finish_status varchar(2) null comment '积分包完成状态',
- package_audit_status varchar(2) null comment '积分包审核状态',
- send_package_dept_id varchar(11) null comment '发包方ID',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- ytj int null,
- ysh int null,
- dsh int null,
- ytjtt int null,
- ywctt int null,
- yshtt int null,
- receive_date datetime null comment '领取时间',
- is_conduct varchar(1) null comment '是否进行中',
- drugs_ids varchar(255) null,
- statement_no varchar(64) null comment '结算单号',
- settle_status int(2) null comment '结算状态',
- remark varchar(255) null comment '结算结果描述',
- invoice_category varchar(50) null comment '发票类目',
- settle_amount decimal(30, 2) null comment '实际结算金额',
- discount decimal(11, 4) null comment '折扣',
- package_finish_time datetime null comment '完成时间',
- relation_score_id varchar(11) null comment '关联积分包id',
- package_type1 varchar(11) null comment '积分包任务类型1',
- package_type2 varchar(11) null comment '积分包任务类型2',
- user_num int null comment '需求人数',
- task_num int null comment '任务个数',
- package_user_scope varchar(11) null comment '接单对象范围',
- kfpjf int(30) null comment '可分配积分',
- belong_date varchar(20) null comment '所属月份',
- allocation_date datetime null comment '分配日期',
- pay_rate decimal(20, 2) null comment '已支付百分比',
- finish_rate decimal(20, 2) null comment '已完成百分比',
- pay_score varchar(11) null comment '已支付积分值',
- end_label_date varchar(64) null comment '查询结束日期',
- score_package_name varchar(255) null comment '积分包名称',
- related_service varchar(11) null comment '关联服务企业',
- package_is_conduct varchar(1) null comment '积分包是否进行中',
- description varchar(255) null comment '描述',
- user_score varchar(11) null comment '个人预计包值',
- enable_type char default '0' null comment '终止方式',
- is_receive varchar(1) null comment '是否允许接单',
- rule_id varchar(50) null comment '规则id',
- accept_sug varchar(20) default '' null comment '接包对象',
- task_add_flag varchar(1) default '1' null comment '是否可以新增任务1-可以 0-不可以',
- settle_flag char default '0' null comment '结算状态',
- score_package_status varchar(11) null comment '积分包状态',
- old_package char(2) default '0' null comment '是否为旧数据',
- settlement_date datetime null comment '结算时间',
- source_type char default '0' null comment '数据来源类型(0:手动上传,1:系统对接)',
- project_num varchar(50) null comment '项目编号',
- drug_producer varchar(512) null comment '关联药品生产厂商名称',
- p2p_amount decimal(11, 2) null,
- p2p_time datetime null comment '公对公提交时间',
- oms_order_sn varchar(64) null comment '订单号',
- sub_type varchar(2) null comment '结算渠道',
- sub_location varchar(64) null comment '税源地',
- p2p_service_amount decimal(11, 2) default 0.00 null comment '公对公服务费',
- pkg_sn varchar(32) null comment '积分包编号',
- mah_settle_dept_id int null comment 'MAH结算-药企deptId',
- mah_settle_step char(8) null comment 'MAH结算-步进状态(BUSINESS-业务, FINANCE-财务)',
- mah_settle_time datetime null comment 'mah结算时间',
- ent_task_limit decimal(5, 2) default 0.00 null comment '企业任务上限(单位%)',
- drugtable varchar(255) null comment '推广药品id',
- invoice_number varchar(64) null comment '发票号码',
- invoice_file json null comment '发票文件',
- audit_management_fee_rates decimal(5, 2) default 0.00 not null comment '审核管理费比例',
- end_time date null comment '截止日期'
- )
- comment '积分包' row_format = DYNAMIC;
- create index wm_score_package_accept_sug_index
- on wm_score_package (accept_sug);
- create index wm_score_package_mah_settle_dept_id_index
- on wm_score_package (mah_settle_dept_id);
- create index wm_score_package_relation_score_id_index
- on wm_score_package (relation_score_id);
- create index wm_score_package_send_dept_id_index
- on wm_score_package (send_package_dept_id);
- create index 一级代理商1
- on wm_score_package (level1_id);
- create index 二级代理商2
- on wm_score_package (level2_id);
- create index 代理商
- on wm_score_package (agent_type_id);
- create index 代理商类型
- on wm_score_package (drug_ent_id);
- create index 众包
- on wm_score_package (zb_id);
- create table wm_score_package_0226
- (
- id int auto_increment
- primary key,
- task_rule_id varchar(11) null comment '规则ID',
- drug_ent_id varchar(11) null,
- score_id varchar(50) null,
- score_name varchar(255) null comment '积分包名称',
- score varchar(11) null,
- agent_type_id varchar(1) null,
- level1_id varchar(11) null comment '一级代理商',
- level2_id varchar(11) null comment '二级代理商',
- zb_id varchar(11) null comment '众包ID',
- xxdb_id varchar(11) null comment '销售代表ID',
- typeid varchar(11) null comment '分配对象类型',
- package_status varchar(11) null comment '积分包状态',
- package_finish_status varchar(2) null comment '积分包完成状态',
- package_audit_status varchar(2) null comment '积分包审核状态',
- send_package_dept_id varchar(11) null comment '发包方ID',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- ytj int null,
- ysh int null,
- dsh int null,
- ytjtt int null,
- ywctt int null,
- yshtt int null,
- receive_date datetime null comment '领取时间',
- is_conduct varchar(1) null comment '是否进行中',
- drugs_ids varchar(255) null,
- statement_no varchar(64) null comment '结算单号',
- settle_status int(2) null comment '结算状态',
- remark varchar(255) null comment '结算结果描述',
- invoice_category varchar(50) null comment '发票类目',
- settle_amount decimal(30, 2) null comment '实际结算金额',
- discount decimal(11, 4) null comment '折扣',
- package_finish_time datetime null comment '完成时间',
- relation_score_id varchar(11) null comment '关联积分包id',
- package_type1 varchar(11) null comment '积分包任务类型1',
- package_type2 varchar(11) null comment '积分包任务类型2',
- user_num int null comment '需求人数',
- task_num int null comment '任务个数',
- package_user_scope varchar(11) null comment '接单对象范围',
- kfpjf int(30) null comment '可分配积分',
- belong_date varchar(20) null comment '所属月份',
- allocation_date datetime null comment '分配日期',
- pay_rate decimal(20, 2) null comment '已支付百分比',
- finish_rate decimal(20, 2) null comment '已完成百分比',
- pay_score varchar(11) null comment '已支付积分值',
- end_label_date varchar(64) null comment '查询结束日期',
- score_package_name varchar(255) null comment '积分包名称',
- related_service varchar(11) null comment '关联服务企业',
- package_is_conduct varchar(1) null comment '积分包是否进行中',
- description varchar(255) null comment '描述',
- user_score varchar(11) null comment '个人预计包值',
- enable_type char default '0' null comment '终止方式',
- is_receive varchar(1) null comment '是否允许接单',
- rule_id varchar(50) null comment '规则id',
- accept_sug varchar(20) default '' null comment '接包对象',
- task_add_flag varchar(1) default '1' null comment '是否可以新增任务1-可以 0-不可以',
- settle_flag char default '0' null comment '结算状态',
- score_package_status varchar(11) null comment '积分包状态',
- old_package char(2) default '0' null comment '是否为旧数据'
- )
- comment '积分包' row_format = DYNAMIC;
- create index 一级代理商1
- on wm_score_package_0226 (level1_id);
- create index 二级代理商2
- on wm_score_package_0226 (level2_id);
- create index 代理商
- on wm_score_package_0226 (agent_type_id);
- create index 代理商类型
- on wm_score_package_0226 (drug_ent_id);
- create index 众包
- on wm_score_package_0226 (zb_id);
- create table wm_score_package_0517
- (
- id int auto_increment
- primary key,
- task_rule_id varchar(11) null comment '规则ID',
- drug_ent_id varchar(11) null,
- score_id varchar(50) null,
- score_name varchar(255) null comment '积分包名称',
- score varchar(11) null,
- agent_type_id varchar(1) null,
- level1_id varchar(11) null comment '一级代理商',
- level2_id varchar(11) null comment '二级代理商',
- zb_id varchar(11) null comment '众包ID',
- xxdb_id varchar(11) null comment '销售代表ID',
- typeid varchar(11) null comment '分配对象类型',
- package_status varchar(11) null comment '积分包状态',
- package_finish_status varchar(2) null comment '积分包完成状态',
- package_audit_status varchar(2) null comment '积分包审核状态',
- send_package_dept_id varchar(11) null comment '发包方ID',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- ytj int null,
- ysh int null,
- dsh int null,
- ytjtt int null,
- ywctt int null,
- yshtt int null,
- receive_date datetime null comment '领取时间',
- is_conduct varchar(1) null comment '是否进行中',
- drugs_ids varchar(255) null,
- statement_no varchar(64) null comment '结算单号',
- settle_status int(2) null comment '结算状态',
- remark varchar(255) null comment '结算结果描述',
- invoice_category varchar(50) null comment '发票类目',
- settle_amount decimal(30, 2) null comment '实际结算金额',
- discount decimal(11, 4) null comment '折扣',
- package_finish_time datetime null comment '完成时间',
- relation_score_id varchar(11) null comment '关联积分包id',
- package_type1 varchar(11) null comment '积分包任务类型1',
- package_type2 varchar(11) null comment '积分包任务类型2',
- user_num int null comment '需求人数',
- task_num int null comment '任务个数',
- package_user_scope varchar(11) null comment '接单对象范围',
- kfpjf int(30) null comment '可分配积分',
- belong_date varchar(20) null comment '所属月份',
- allocation_date datetime null comment '分配日期',
- pay_rate decimal(20, 2) null comment '已支付百分比',
- finish_rate decimal(20, 2) null comment '已完成百分比',
- pay_score varchar(11) null comment '已支付积分值',
- end_label_date varchar(64) null comment '查询结束日期',
- score_package_name varchar(255) null comment '积分包名称',
- related_service varchar(11) null comment '关联服务企业',
- package_is_conduct varchar(1) null comment '积分包是否进行中',
- description varchar(255) null comment '描述',
- user_score varchar(11) null comment '个人预计包值',
- enable_type char default '0' null comment '终止方式',
- is_receive varchar(1) null comment '是否允许接单',
- rule_id varchar(50) null comment '规则id',
- accept_sug varchar(20) default '' null comment '接包对象',
- task_add_flag varchar(1) default '1' null comment '是否可以新增任务1-可以 0-不可以',
- settle_flag char default '0' null comment '结算状态',
- score_package_status varchar(11) null comment '积分包状态',
- old_package char(2) default '0' null comment '是否为旧数据',
- settlement_date datetime null comment '结算时间'
- )
- comment '积分包' row_format = DYNAMIC;
- create index 一级代理商1
- on wm_score_package_0517 (level1_id);
- create index 二级代理商2
- on wm_score_package_0517 (level2_id);
- create index 代理商
- on wm_score_package_0517 (agent_type_id);
- create index 代理商类型
- on wm_score_package_0517 (drug_ent_id);
- create index 众包
- on wm_score_package_0517 (zb_id);
- create table wm_score_package_settle_note
- (
- id int auto_increment
- primary key,
- package_status_id varchar(20) null,
- package_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int(20) null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int(2) default 0 null,
- remark text null,
- notify_time datetime null,
- task_id varchar(20) null comment '任务ID',
- category_name varchar(128) null comment '开票类型名称',
- create_time datetime null comment '创建时间',
- sub_time datetime null comment '提交时间',
- update_time datetime null comment '更新时间',
- stream_id varchar(50) null comment '税邦云流水号',
- id_card_number varchar(20) null comment '身份证号',
- sub_to_gig_time datetime null comment '提交到零工平台时间',
- sub_type varchar(2) null comment '结算类型',
- subject_location varchar(64) null comment '税源地',
- third_task_id varchar(20) null comment '第三方任务id',
- finish_task_flag int default 0 null comment '是否完成完单操作',
- actual_amount decimal(18, 2) null,
- settle_dept_id int null comment '实际结算企业id',
- settle_dept_sub_id int null comment '实际结算企业subId',
- review_status char(20) null comment '财务复核状态',
- review_time datetime null comment '复核时间',
- review_user int null comment '复核人'
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_score_package_settle_note_0510
- (
- id int auto_increment
- primary key,
- package_status_id varchar(20) null,
- package_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int(20) null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int(2) default 0 null,
- remark varchar(256) null,
- notify_time timestamp default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_score_package_settle_note_0517
- (
- id int auto_increment
- primary key,
- package_status_id varchar(20) null,
- package_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int(20) null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int(2) default 0 null,
- remark varchar(256) null,
- notify_time timestamp default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_score_package_settle_note_111
- (
- id int auto_increment
- primary key,
- package_status_id varchar(20) null,
- package_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int(20) null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int(2) default 0 null,
- remark varchar(256) null,
- notify_time timestamp null,
- task_id varchar(20) null comment '任务ID',
- category_name varchar(128) null comment '开票类型名称',
- create_time datetime null comment '创建时间',
- sub_time datetime null comment '提交时间',
- update_time datetime null comment '更新时间',
- stream_id varchar(50) null comment '税邦云流水号',
- id_card_number varchar(20) null comment '身份证号',
- sub_type varchar(2) null comment '结算类型'
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_score_package_settle_note_20220113
- (
- id int null,
- package_status_id varchar(20) null,
- package_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int null,
- remark varchar(256) null,
- notify_time datetime null,
- task_id varchar(20) null,
- category_name varchar(128) null,
- create_time datetime null,
- sub_time datetime null,
- update_time datetime null,
- stream_id varchar(50) null,
- id_card_number varchar(20) null,
- sub_type varchar(2) null,
- sub_to_gig_time datetime null
- )
- comment '税邦云回调数据异常,数据回滚前备份';
- create table wm_score_package_status
- (
- id int auto_increment
- primary key,
- user_id varchar(11) null comment '用户id',
- package_id varchar(11) null comment '积分包id',
- status varchar(11) null comment '审核状态:1.审核中,2.审核通过,3.审核不通过',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- user_score varchar(11) null comment '个人预计包值',
- enable_type char default '0' null comment '终止方式',
- task_num int null comment '个人包任务个数',
- task_add_flag varchar(1) default '1' null comment '是否可以新增任务1-可以 0-不可以',
- quiz_res json null comment '测评结果'
- )
- comment '积分包状态' row_format = DYNAMIC;
- create table wm_score_package_status_0226
- (
- id int auto_increment
- primary key,
- user_id varchar(11) null,
- package_id varchar(11) null,
- status varchar(11) null,
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- user_score varchar(11) null comment '个人预计包值',
- enable_type char default '0' null comment '终止方式',
- task_num int null comment '个人包任务个数',
- task_add_flag varchar(1) default '1' null comment '是否可以新增任务1-可以 0-不可以'
- )
- comment '积分包状态' row_format = DYNAMIC;
- create table wm_score_package_task_ref
- (
- id int not null
- primary key,
- task_id varchar(11) null comment '任务ID',
- task_package_id varchar(11) null comment '任务所属积分包ID',
- user_id varchar(11) null comment '医药代表ID',
- status varchar(11) null comment '任务状态',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '任务-积分包关联' row_format = DYNAMIC;
- create index package1
- on wm_score_package_task_ref (task_package_id);
- create index rw1
- on wm_score_package_task_ref (task_id);
- create index user11
- on wm_score_package_task_ref (user_id);
- create table wm_score_task_type
- (
- id bigint auto_increment comment '主键id'
- primary key,
- score_id varchar(20) charset utf8mb4 null comment '关联积分包id',
- task_type_id varchar(11) charset utf8mb4 null comment '有效任务类型id',
- type varchar(255) charset utf8mb4 null comment '积分包类型,1:定额,2定量'
- )
- comment '积分包任务类型表' charset = utf8
- row_format = DYNAMIC;
- create table wm_settle_account_receive
- (
- id int auto_increment
- primary key,
- account_name varchar(255) null,
- account_no varchar(255) null,
- op_type varchar(255) null,
- amount varchar(255) null,
- bank_serial_no varchar(255) null,
- explore1 varchar(255) null,
- explore2 varchar(255) null,
- explore3 varchar(255) null,
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间'
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_task
- (
- id int auto_increment
- primary key,
- task_number varchar(32) null comment '任务编号',
- task_rule_id varchar(11) null comment '积分规则',
- score int(5) null comment '积分值',
- score_package_drug_id varchar(11) null comment '任务提交到的积分包ID',
- score_package_level1_id varchar(11) null comment '任务提交到一级经销商的集分宝id',
- score_package_id varchar(11) null comment '积分包',
- task_type_id varchar(11) null comment '任务类型ID',
- lookinto_date datetime null comment '调研时间',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- lookinto_type_id varchar(11) null comment '调研类型ID',
- task_content_id varchar(11) null comment '任务内容ID',
- task_status char(2) null comment '任务状态',
- task_user_id varchar(11) null comment '任务用户ID',
- task_user_type varchar(11) null comment '用户类型ID',
- drug_ent_id varchar(11) null comment '服务药企',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- submit_status varchar(2) null comment '提交状态',
- share_img_url varchar(255) null comment '分享图片地址',
- plat_audit_status char(2) default '0' null comment '平台审核状态',
- ext_ids varchar(255) null comment '备用字段',
- task_info_img varchar(255) null comment '任务详情图片',
- compare_result varchar(2) null comment '对比结果',
- approval_opinion varchar(2) null comment '审批意见',
- approval_info varchar(500) null comment '审批说明',
- real_flag char(2) default '0' null comment '是否真实',
- report_one_id int null comment '任务提交到一级cso的报告ID',
- report_one_approval_status varchar(32) default '0' null comment '任务提交到一级cso的报告审核状态',
- report_one_approval_opinion varchar(2) null comment '任务提交到一级cso的报告审批意见',
- report_one_approval_info varchar(1024) null comment '任务提交到一级cso的报告审批说明',
- report_second_id int null comment '任务提交到二级cso的报告ID',
- report_second_approval_status varchar(32) default '0' null comment '任务提交到二级cso的报告审核状态',
- report_second_approval_opinion varchar(2) null comment '任务提交到二级cso的报告审批意见',
- report_second_approval_info varchar(1024) null comment '任务提交到二级cso的报告审批说明',
- report_drug_id int null comment '任务提交到药企的报告ID',
- report_drug_approval_status varchar(32) default '0' null comment '任务提交到药企的报告审核状态',
- report_drug_approval_opinion varchar(2) null comment '任务提交到药企的报告审批意见',
- report_drug_approval_info varchar(1024) null comment '任务提交到药企的报告审批说明',
- task_status_info varchar(500) null comment 'cso审核审核意见',
- task_from varchar(2) default '1' null comment '来源',
- task_settle_status int null comment '任务结算状态',
- review_task_count int default 0 not null comment '复审次数记录',
- dept_review_task_count int default 0 not null comment '企业复审次数记录',
- approval_user_id int null comment '审核人userId',
- approval_time datetime null comment '审核时间',
- dept_approval_user_id int null comment '企业审核人userId',
- dept_approval_time datetime null comment '企业审核时间',
- remote_ip varchar(255) null comment '远端ip',
- ip2region varchar(255) null comment '地址'
- )
- comment '任务表' row_format = DYNAMIC;
- create index sp_ts_rf_index
- on wm_task (score_package_id, real_flag, task_status);
- create index wm_task_report_drug_id_index
- on wm_task (report_drug_id);
- create index wm_task_report_one_id_index
- on wm_task (report_one_id);
- create index wm_task_report_second_id_index
- on wm_task (report_second_id);
- create index wm_task_score_package_id_index
- on wm_task (score_package_id);
- create index wm_task_user_id_index
- on wm_task (task_user_id);
- create index 任务内容
- on wm_task (task_content_id);
- create index 任务类型task
- on wm_task (task_type_id);
- create index 调研类型
- on wm_task (lookinto_type_id);
- create table wm_task_0514
- (
- id int auto_increment
- primary key,
- task_rule_id varchar(11) null comment '积分规则',
- score int(5) null comment '积分值',
- score_package_drug_id varchar(11) null comment '任务提交到的积分包ID',
- score_package_level1_id varchar(11) null comment '任务提交到一级经销商的集分宝id',
- score_package_id varchar(11) null comment '积分包',
- task_type_id varchar(11) null comment '任务类型ID',
- lookinto_date datetime null comment '调研时间',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- lookinto_type_id varchar(11) null comment '调研类型ID',
- task_content_id varchar(11) null comment '任务内容ID',
- task_status char(2) null comment '任务状态',
- task_user_id varchar(11) null comment '任务用户ID',
- task_user_type varchar(11) null comment '用户类型ID',
- drug_ent_id varchar(11) null comment '服务药企',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- submit_status varchar(2) null comment '提交状态',
- share_img_url varchar(255) null comment '分享图片地址',
- plat_audit_status char(2) default '0' null comment '平台审核状态',
- ext_ids varchar(255) null comment '备用字段',
- task_info_img varchar(255) null comment '任务详情图片',
- compare_result varchar(2) null comment '对比结果',
- approval_opinion varchar(2) null comment '审批意见',
- approval_info varchar(500) null comment '审批说明',
- real_flag char(2) default '0' null comment '是否真实',
- report_one_id int null comment '任务提交到一级cso的报告ID',
- report_one_approval_status varchar(32) default '0' null comment '任务提交到一级cso的报告审核状态',
- report_one_approval_opinion varchar(2) null comment '任务提交到一级cso的报告审批意见',
- report_one_approval_info varchar(50) null comment '任务提交到一级cso的报告审批说明',
- report_second_id int null comment '任务提交到二级cso的报告ID',
- report_second_approval_status varchar(32) default '0' null comment '任务提交到二级cso的报告审核状态',
- report_second_approval_opinion varchar(2) null comment '任务提交到二级cso的报告审批意见',
- report_second_approval_info varchar(50) null comment '任务提交到二级cso的报告审批说明',
- report_drug_id int null comment '任务提交到药企的报告ID',
- report_drug_approval_status varchar(32) default '0' null comment '任务提交到药企的报告审核状态',
- report_drug_approval_opinion varchar(2) null comment '任务提交到药企的报告审批意见',
- report_drug_approval_info varchar(50) null comment '任务提交到药企的报告审批说明',
- task_status_info varchar(500) null comment 'cso审核审核意见',
- task_from varchar(2) default '1' null comment '来源'
- )
- comment '任务表' row_format = DYNAMIC;
- create index 任务内容
- on wm_task_0514 (task_content_id);
- create index 任务类型task
- on wm_task_0514 (task_type_id);
- create index 调研类型
- on wm_task_0514 (lookinto_type_id);
- create table wm_task_0518
- (
- id int auto_increment
- primary key,
- task_rule_id varchar(11) null comment '积分规则',
- score int(5) null comment '积分值',
- score_package_drug_id varchar(11) null comment '任务提交到的积分包ID',
- score_package_level1_id varchar(11) null comment '任务提交到一级经销商的集分宝id',
- score_package_id varchar(11) null comment '积分包',
- task_type_id varchar(11) null comment '任务类型ID',
- lookinto_date datetime null comment '调研时间',
- province varchar(20) null comment '省',
- city varchar(20) null comment '市',
- area varchar(20) null comment '区',
- address varchar(255) null comment '地址',
- lookinto_type_id varchar(11) null comment '调研类型ID',
- task_content_id varchar(11) null comment '任务内容ID',
- task_status char(2) null comment '任务状态',
- task_user_id varchar(11) null comment '任务用户ID',
- task_user_type varchar(11) null comment '用户类型ID',
- drug_ent_id varchar(11) null comment '服务药企',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- submit_status varchar(2) null comment '提交状态',
- share_img_url varchar(255) null comment '分享图片地址',
- plat_audit_status char(2) default '0' null comment '平台审核状态',
- ext_ids varchar(255) null comment '备用字段',
- task_info_img varchar(255) null comment '任务详情图片',
- compare_result varchar(2) null comment '对比结果',
- approval_opinion varchar(2) null comment '审批意见',
- approval_info varchar(500) null comment '审批说明',
- real_flag char(2) default '0' null comment '是否真实',
- report_one_id int null comment '任务提交到一级cso的报告ID',
- report_one_approval_status varchar(32) default '0' null comment '任务提交到一级cso的报告审核状态',
- report_one_approval_opinion varchar(2) null comment '任务提交到一级cso的报告审批意见',
- report_one_approval_info varchar(50) null comment '任务提交到一级cso的报告审批说明',
- report_second_id int null comment '任务提交到二级cso的报告ID',
- report_second_approval_status varchar(32) default '0' null comment '任务提交到二级cso的报告审核状态',
- report_second_approval_opinion varchar(2) null comment '任务提交到二级cso的报告审批意见',
- report_second_approval_info varchar(50) null comment '任务提交到二级cso的报告审批说明',
- report_drug_id int null comment '任务提交到药企的报告ID',
- report_drug_approval_status varchar(32) default '0' null comment '任务提交到药企的报告审核状态',
- report_drug_approval_opinion varchar(2) null comment '任务提交到药企的报告审批意见',
- report_drug_approval_info varchar(50) null comment '任务提交到药企的报告审批说明',
- task_status_info varchar(500) null comment 'cso审核审核意见',
- task_from varchar(2) default '1' null comment '来源'
- )
- comment '任务表' row_format = DYNAMIC;
- create index 任务内容
- on wm_task_0518 (task_content_id);
- create index 任务类型task
- on wm_task_0518 (task_type_id);
- create index 调研类型
- on wm_task_0518 (lookinto_type_id);
- create table wm_task_content
- (
- id int auto_increment
- primary key,
- temp1 varchar(1000) null comment '字段1',
- temp2 varchar(1000) null comment '字段2',
- temp3 varchar(1000) null comment '字段3',
- temp4 varchar(1000) null comment '字段4',
- temp5 varchar(1000) null,
- temp6 varchar(1000) null,
- temp7 varchar(1000) null,
- temp8 varchar(1000) null,
- temp9 varchar(1000) null,
- temp10 longtext null,
- temp11 varchar(255) null,
- temp12 longtext null,
- temp13 varchar(255) null,
- temp14 varchar(255) null,
- temp15 varchar(255) null,
- temp16 varchar(255) null,
- temp17 varchar(255) null,
- temp18 varchar(255) null,
- temp19 varchar(255) null,
- temp20 longtext null,
- temp21 varchar(2000) null,
- temp22 varchar(255) null,
- temp23 varchar(255) null,
- temp24 varchar(255) null,
- temp25 varchar(255) null,
- temp26 varchar(255) null,
- temp28 text null,
- temp29 text null,
- temp30 varchar(255) null,
- temp31 varchar(255) null comment 'temp31',
- temp32 varchar(255) null comment 'temp32'
- )
- comment '任务内容表' row_format = DYNAMIC;
- create table wm_task_content_config
- (
- id int auto_increment
- primary key,
- base_type_id char(10) null comment '任务大类',
- task_type_id char(10) null comment '任务ID',
- task_filed_key varchar(255) null comment '字段1',
- task_filed_value varchar(255) null comment '字段2',
- seq int null comment '顺序',
- task_filed_type char(20) null comment '字段类型',
- task_filed_minsize int null comment '最大长度',
- task_filed_maxsize int null comment '最小长度',
- task_filed_alert varchar(255) null comment '弹框提示',
- dict_url varchar(255) null comment '字典值请求URL',
- dict_group_name varchar(255) null comment '字典值分组名称',
- is_mustfill char null comment '是否必填',
- dept_id int null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime default CURRENT_TIMESTAMP null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '任务内容字段配置' row_format = DYNAMIC;
- create index 任务5
- on wm_task_content_config (task_type_id);
- create table wm_task_download_job
- (
- id int auto_increment
- primary key,
- agent_id varchar(10) not null,
- task_type_id varchar(10) not null,
- download_user_id varchar(10) null
- )
- row_format = DYNAMIC;
- create table wm_task_info_config_ref
- (
- id int not null
- primary key,
- task_table_name varchar(50) null comment '任务表名称',
- task_table_filed_name varchar(50) not null comment '任务表字段名称',
- config_filed_name varchar(50) null comment '配置字段名称',
- task_type_id int null comment '任务类型ID'
- )
- row_format = DYNAMIC;
- create table wm_task_rule
- (
- id int auto_increment
- primary key,
- drugent_id char(10) null comment '药企ID',
- rule_type_id char(2) null comment '规则类型,1药企 2一级代理商',
- rule_month varchar(255) null comment '规则月份',
- level1_id varchar(11) null comment '一级代理商ID',
- level2_id varchar(11) null comment '二级代理商ID',
- dept_id varchar(11) null comment '组织机构ID',
- del_flag varchar(1) default '0' not null comment '是否删除',
- enable_flag varchar(1) default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '任务积分规则' row_format = DYNAMIC;
- create table wm_task_settle_note
- (
- id int auto_increment
- primary key,
- package_id varchar(20) null,
- package_status_id varchar(20) null,
- task_id varchar(20) null,
- settle_amount decimal(10, 2) null,
- user_id varchar(20) null,
- invoice_type int(20) null,
- settle_no varchar(128) null,
- discount decimal(10, 2) null,
- settle_note_status int(2) default 0 null,
- remark varchar(256) null,
- category_name varchar(255) null,
- create_time datetime null,
- sub_time datetime null,
- notify_time datetime null,
- update_time datetime null,
- stream_id varchar(255) default '' null
- )
- charset = utf8
- row_format = DYNAMIC;
- create table wm_task_sub_percent_rule
- (
- rule_id int(20) auto_increment comment '规则ID'
- primary key,
- dept_id int(20) not null comment '企业id',
- sub_cate varchar(50) not null comment '次级分类',
- batch_id varchar(32) null comment '批量保存编号',
- sub_rule json null comment '规则',
- opt_flag varchar(32) not null comment '操作标记',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '任务提交百分比限制规则表';
- create index idx_dept_id
- on wm_task_sub_percent_rule (dept_id);
- create index idx_sub_cate
- on wm_task_sub_percent_rule (sub_cate);
- create table wm_task_sub_rule
- (
- rule_id int(20) auto_increment comment '规则ID'
- primary key,
- dept_id int(20) not null comment '企业id',
- sub_cate varchar(32) not null comment '次级分类',
- sub_rule json null comment '规则',
- opt_flag varchar(32) not null comment '操作标记',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '任务提交规则表';
- create index idx_dept_id
- on wm_task_sub_rule (dept_id);
- create index idx_sub_cate
- on wm_task_sub_rule (sub_cate);
- create table wm_task_type
- (
- id int(11) unsigned auto_increment
- primary key,
- task_type_name varchar(50) null comment '任务类型名称',
- task_type_level char null comment '任务类型级别',
- task_score_start int(5) null comment '积分范围开始',
- task_score_end int(5) null comment '积分范围结束',
- score int(10) null comment '完成后可获得分',
- task_ent_id varchar(11) null comment '积分分配代理商',
- durgent_id char(11) null comment '药企ID',
- level1_id char(11) null comment '一级代理商ID',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- status int(1) default 0 null comment '积分规则状态',
- base_id varchar(11) null comment '父类ID',
- real_flag char null,
- rule_id varchar(64) default '' null,
- parent_id varchar(11) null comment '父级ID',
- task_receiver_type char default '1' null comment '承接对象(1-个人,2-企业)',
- task_remark text null comment '任务备注'
- )
- comment '任务类型打分表' row_format = DYNAMIC;
- create table wm_task_type_0422
- (
- id int(11) unsigned auto_increment
- primary key,
- task_type_name varchar(50) null comment '任务类型名称',
- task_type_level char null comment '任务类型级别',
- task_score_start int(5) null comment '积分范围开始',
- task_score_end int(5) null comment '积分范围结束',
- score int(10) null comment '完成后可获得分',
- task_ent_id varchar(11) null comment '积分分配代理商',
- durgent_id char(11) null comment '药企ID',
- level1_id char(11) null comment '一级代理商ID',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- status int(1) default 0 null comment '积分规则状态',
- base_id varchar(11) null comment '父类ID',
- real_flag char null,
- rule_id varchar(64) default '' null,
- parent_id varchar(11) null comment '父级ID'
- )
- comment '任务类型打分表' row_format = DYNAMIC;
- create table wm_task_type_ent_ref
- (
- id int auto_increment
- primary key,
- agent_id varchar(11) null comment '代理商ID',
- drugent_id varchar(11) null comment '药企ID',
- dept_id int null comment '组织机构ID',
- del_flag char default '0' not null comment '是否删除',
- enable_flag char default '0' not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '药企给代理商设定积分规则' row_format = DYNAMIC;
- create table wm_task_type_score_ref
- (
- id int not null
- primary key,
- task_rule_id int null comment '积分规则ID',
- task_type_score varchar(255) null comment '任务类型打分',
- task_type_id int null comment '任务类型ID',
- typeid int(1) null comment '1.平台给一级代理商打分
- 2.一级代理商给二级代理商打分',
- level1_id int(10) null comment '一级代理商ID',
- level2_id int(10) null comment '二级代理商ID',
- drugent_id int(10) null comment '药企ID',
- month_str varchar(255) null comment '积分规则所属月份',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '任务类型打分' row_format = DYNAMIC;
- create index taskrule11
- on wm_task_type_score_ref (task_rule_id);
- create index tasktype112
- on wm_task_type_score_ref (task_type_id);
- create table wm_task_type_sub_cate
- (
- ttsc_id int(20) auto_increment comment '规则ID'
- primary key,
- type_id int(20) not null comment '企业id',
- type_name varchar(32) not null comment '任务名称',
- sub_cate varchar(32) not null comment '次级分类',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '任务提交规则表';
- create index idx_dept_id
- on wm_task_type_sub_cate (type_id);
- create index idx_sub_cate
- on wm_task_type_sub_cate (sub_cate);
- create table wm_task_type_sub_cate2
- (
- dtt_id int(20) auto_increment comment '主键ID'
- primary key,
- type_id int(20) not null comment '企业id',
- type_name varchar(32) not null comment '任务名称',
- sub_cate varchar(50) not null comment '次级分类',
- parent_id varchar(10) null comment '对应wm_task_type的parent_id',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
- )
- comment '任务类型二级分类表';
- create index idx_dept_id
- on wm_task_type_sub_cate2 (type_id);
- create index idx_sub_cate
- on wm_task_type_sub_cate2 (sub_cate);
- create table wm_task_ware
- (
- ware_id bigint unsigned auto_increment comment 'id'
- primary key,
- ware_sn varchar(64) not null comment '库存序号',
- task_id varchar(18) not null comment '任务id',
- ava_count bigint unsigned default 1 not null comment '可用库存数',
- locked_count bigint unsigned default 0 not null comment '已锁定数量',
- order_sn bigint null comment '锁定订单',
- created_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- modified_time datetime not null on update CURRENT_TIMESTAMP comment '修改时间',
- constraint uk_record_id
- unique (task_id)
- )
- comment '任务库存表';
- create table wm_team
- (
- id int auto_increment
- primary key,
- dept_id int not null comment '组织机构ID',
- name varchar(50) not null comment '团队名称',
- leader varchar(128) null comment '团队负责人',
- member varchar(2048) null comment '团队成员',
- enable_flag char default '0' not null comment '是否禁用(0-企业,1-禁用)',
- del_flag char default '0' not null comment '是否删除(0-正常,1-已删除)',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人'
- )
- comment '团队管理';
- create table wm_user_plat_quiz_res
- (
- res_id int auto_increment comment 'Id'
- primary key,
- user_id int not null comment '用户ID',
- quiz_id int null comment '试卷id',
- quiz_res json null comment '测试结果',
- res_expiry date not null comment '测评有效期',
- create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间'
- )
- comment '用户测评的评判结果';
- create index idx_qid
- on wm_user_plat_quiz_res (quiz_id);
- create index idx_uid
- on wm_user_plat_quiz_res (user_id);
- create table wm_user_sign
- (
- id int auto_increment
- primary key,
- sign_userid varchar(11) null comment '签到人',
- sign_ent_id varchar(11) null comment '签到企业ID',
- sign_date datetime null comment '签到日期',
- score int null comment '得分',
- longitude varchar(255) not null comment '经度',
- latitude varchar(255) not null comment '纬度',
- sign_ent_name varchar(255) null comment '签单企业名称',
- sign_ent_type varchar(11) null comment '签到企业类型',
- task_type_id varchar(11) null comment '任务类型id'
- )
- comment '用户签到表' row_format = DYNAMIC;
- create table wm_user_sign_detail
- (
- id int auto_increment
- primary key,
- sign_id int not null comment '签到表id',
- drug text not null comment '推广药品',
- purpose varchar(20) not null comment '拜访目的',
- result char not null comment '拜访结果',
- remark varchar(255) null comment '备注',
- department varchar(64) null comment '拜访科室',
- visitor varchar(64) null comment '拜访人员',
- detail json null comment '详情数据',
- template_type char(10) default 'TEMPLATE1' null comment '所属模板类型'
- )
- comment '用户签到详情';
- create table wm_wk_album
- (
- id int auto_increment
- primary key,
- xcmc varchar(255) not null comment '相册名称',
- scfm varchar(255) not null comment '封面',
- glyp varchar(255) null comment '关联药品',
- wb longtext not null comment '文本',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null on update CURRENT_TIMESTAMP comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int default 0 null comment '转发数',
- temp1 varchar(255) null comment '关联药品汉字',
- score varchar(255) null comment '前端显示分数使用'
- )
- comment '文库-相册' row_format = DYNAMIC;
- create table wm_wk_article
- (
- id int auto_increment
- primary key,
- title varchar(500) not null comment '文章标题',
- author varchar(255) not null comment '作者',
- fm varchar(255) null comment '封面',
- content longtext not null comment '文章内容',
- source varchar(255) null comment '文章来源',
- description varchar(1000) null comment '描述',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int null comment '转发数',
- channel_id varchar(50) null comment '抓取文章栏目ID',
- article_id varchar(50) null comment '抓取文章ID',
- score varchar(255) null,
- read_num int default 0 null comment '阅读数',
- new_flag int(1) default 0 null comment '新标签',
- hot_flag int(1) default 0 null comment '热门标签',
- area varchar(128) null comment '区域',
- source_ent varchar(255) null comment '文章来源(来源企业)'
- )
- comment '文库-文章' row_format = DYNAMIC;
- create table wm_wk_article0507
- (
- id int default 0 not null,
- title varchar(500) not null comment '文章标题',
- author varchar(255) not null comment '作者',
- fm varchar(255) null comment '封面',
- content longtext not null comment '文章内容',
- source varchar(255) null comment '文章来源',
- description varchar(1000) null comment '描述',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int null comment '转发数',
- channel_id varchar(50) null comment '抓取文章栏目ID',
- article_id varchar(50) null comment '抓取文章ID',
- score varchar(255) null,
- read_num int default 0 null comment '阅读数',
- new_flag int(1) default 0 null comment '新标签',
- hot_flag int(1) default 0 null comment '热门标签',
- area varchar(128) null comment '区域'
- )
- row_format = DYNAMIC;
- create table wm_wk_article_20210225
- (
- id int auto_increment
- primary key,
- title varchar(500) not null comment '文章标题',
- author varchar(255) not null comment '作者',
- fm varchar(255) null comment '封面',
- content longtext not null comment '文章内容',
- source varchar(255) null comment '文章来源',
- description varchar(1000) null comment '描述',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int null comment '转发数',
- channel_id varchar(50) null comment '抓取文章栏目ID',
- article_id varchar(50) null comment '抓取文章ID',
- score varchar(255) null,
- read_num int default 0 null comment '阅读数',
- new_flag int(1) default 0 null comment '新标签',
- hot_flag int(1) default 0 null comment '热门标签',
- area varchar(128) null comment '区域'
- )
- comment '文库-文章' row_format = DYNAMIC;
- create table wm_wk_article_20210225001
- (
- id int auto_increment
- primary key,
- title varchar(500) not null comment '文章标题',
- author varchar(255) not null comment '作者',
- fm varchar(255) null comment '封面',
- content longtext not null comment '文章内容',
- source varchar(255) null comment '文章来源',
- description varchar(1000) null comment '描述',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int null comment '转发数',
- channel_id varchar(50) null comment '抓取文章栏目ID',
- article_id varchar(50) null comment '抓取文章ID',
- score varchar(255) null,
- read_num int default 0 null comment '阅读数',
- new_flag int(1) default 0 null comment '新标签',
- hot_flag int(1) default 0 null comment '热门标签',
- area varchar(128) null comment '区域'
- )
- comment '文库-文章' row_format = DYNAMIC;
- create table wm_wk_article_55798
- (
- id int default 0 not null,
- title varchar(500) not null comment '文章标题',
- author varchar(255) not null comment '作者',
- fm varchar(255) null comment '封面',
- content longtext not null comment '文章内容',
- source varchar(255) null comment '文章来源',
- description varchar(1000) null comment '描述',
- dept_id int null comment '组织机构ID',
- del_flag int(1) default 0 not null comment '是否删除',
- enable_flag int(1) default 0 not null comment '是否禁用',
- tenant_id int default 1 not null comment '所属租户',
- create_time datetime null comment '创建时间',
- create_user int null comment '创建人',
- update_time datetime null comment '更新时间',
- update_user int null comment '更新人',
- forward_num int null comment '转发数',
- channel_id varchar(50) null comment '抓取文章栏目ID',
- article_id varchar(50) null comment '抓取文章ID',
- score varchar(255) null,
- read_num int default 0 null comment '阅读数',
- new_flag int(1) default 0 null comment '新标签',
- hot_flag int(1) default 0 null comment '热门标签',
- area varchar(128) null comment '区域'
- )
- row_format = DYNAMIC;
- create table wm_wk_article_config
- (
- id int auto_increment
- primary key,
- type char(2) null,
- source varchar(11) null,
- total int null,
- create_time datetime default CURRENT_TIMESTAMP null
- )
- comment '文章抓取配置' row_format = DYNAMIC;
- create table wm_wk_article_share
- (
- id int auto_increment
- primary key,
- share_type varchar(11) null comment '分享类型',
- arctile_id varchar(200) null comment '文章ID',
- share_userid varchar(11) null comment '分享用户ID',
- open_user varchar(255) null comment '打开文章用户',
- create_time datetime null comment '打开时间',
- temp1 varchar(255) null comment '备用字段1',
- temp2 varchar(255) null comment '备用字段2',
- temp3 varchar(255) null comment '备用字段3'
- )
- comment '文章分享' row_format = DYNAMIC;
- create table xinbada_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- signature varchar(128) not null comment '签名',
- action_name varchar(32) not null comment '通知类型',
- req_body text not null comment '请求body内容',
- order_uuid varchar(64) null comment '订单编号唯一',
- order_status int null comment '订单状态',
- order_no varchar(32) null,
- customer_user_uuid varchar(64) null,
- server_user_uuid varchar(64) null,
- public_key varchar(2048) null comment '请求公钥',
- private_key varchar(2048) null comment '请求时私钥',
- create_time timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
- gig_type varchar(32) default 'ZHENG_QI_ZHI_XING' null comment '零工平台类型'
- )
- comment '正启之星请求记录';
- create table xinshiyi_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- req_id varchar(64) null comment '请求序号',
- batch_id varchar(64) null comment '批次号',
- msg_method char(20) null comment '消息接口名称',
- order_status int null comment '订单状态',
- req_body text null comment '请求body',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '薪事易回调异步通知记录';
- create table xxl_job_group
- (
- id int auto_increment
- primary key,
- app_name varchar(64) not null comment '执行器AppName',
- title varchar(12) not null comment '执行器名称',
- `order` int default 0 not null comment '排序',
- address_type tinyint default 0 not null comment '执行器地址类型:0=自动注册、1=手动录入',
- address_list varchar(512) null comment '执行器地址列表,多地址逗号分隔'
- )
- row_format = DYNAMIC;
- create table xxl_job_info
- (
- id int auto_increment
- primary key,
- job_group int not null comment '执行器主键ID',
- job_cron varchar(128) not null comment '任务执行CRON',
- job_desc varchar(255) not null,
- add_time datetime null,
- update_time datetime null,
- author varchar(64) null comment '作者',
- alarm_email varchar(255) null comment '报警邮件',
- executor_route_strategy varchar(50) null comment '执行器路由策略',
- executor_handler varchar(255) null comment '执行器任务handler',
- executor_param varchar(512) null comment '执行器任务参数',
- executor_block_strategy varchar(50) null comment '阻塞处理策略',
- executor_timeout int default 0 not null comment '任务执行超时时间,单位秒',
- executor_fail_retry_count int default 0 not null comment '失败重试次数',
- glue_type varchar(50) not null comment 'GLUE类型',
- glue_source mediumtext null comment 'GLUE源代码',
- glue_remark varchar(128) null comment 'GLUE备注',
- glue_updatetime datetime null comment 'GLUE更新时间',
- child_jobid varchar(255) null comment '子任务ID,多个逗号分隔',
- trigger_status tinyint default 0 not null comment '调度状态:0-停止,1-运行',
- trigger_last_time bigint(13) default 0 not null comment '上次调度时间',
- trigger_next_time bigint(13) default 0 not null comment '下次调度时间'
- )
- row_format = DYNAMIC;
- create table xxl_job_lock
- (
- lock_name varchar(50) not null comment '锁名称'
- primary key
- )
- row_format = DYNAMIC;
- create table xxl_job_log
- (
- id bigint auto_increment
- primary key,
- job_group int not null comment '执行器主键ID',
- job_id int not null comment '任务,主键ID',
- executor_address varchar(255) null comment '执行器地址,本次执行的地址',
- executor_handler varchar(255) null comment '执行器任务handler',
- executor_param varchar(512) null comment '执行器任务参数',
- executor_sharding_param varchar(20) null comment '执行器任务分片参数,格式如 1/2',
- executor_fail_retry_count int default 0 not null comment '失败重试次数',
- trigger_time datetime null comment '调度-时间',
- trigger_code int not null comment '调度-结果',
- trigger_msg text null comment '调度-日志',
- handle_time datetime null comment '执行-时间',
- handle_code int not null comment '执行-状态',
- handle_msg text null comment '执行-日志',
- alarm_status tinyint default 0 not null comment '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败'
- )
- row_format = DYNAMIC;
- create index I_handle_code
- on xxl_job_log (handle_code);
- create index I_trigger_time
- on xxl_job_log (trigger_time);
- create table xxl_job_log_report
- (
- id int auto_increment
- primary key,
- trigger_day datetime null comment '调度-时间',
- running_count int default 0 not null comment '运行中-日志数量',
- suc_count int default 0 not null comment '执行成功-日志数量',
- fail_count int default 0 not null comment '执行失败-日志数量',
- constraint i_trigger_day
- unique (trigger_day)
- )
- row_format = DYNAMIC;
- create table xxl_job_logglue
- (
- id int auto_increment
- primary key,
- job_id int not null comment '任务,主键ID',
- glue_type varchar(50) null comment 'GLUE类型',
- glue_source mediumtext null comment 'GLUE源代码',
- glue_remark varchar(128) not null comment 'GLUE备注',
- add_time datetime null,
- update_time datetime null
- )
- row_format = DYNAMIC;
- create table xxl_job_registry
- (
- id int auto_increment
- primary key,
- registry_group varchar(50) not null,
- registry_key varchar(255) not null,
- registry_value varchar(255) not null,
- update_time datetime null
- )
- row_format = DYNAMIC;
- create index i_g_k_v
- on xxl_job_registry (registry_group, registry_key(191), registry_value(191));
- create table xxl_job_user
- (
- id int auto_increment
- primary key,
- username varchar(50) not null comment '账号',
- password varchar(50) not null comment '密码',
- role tinyint not null comment '角色:0-普通用户、1-管理员',
- permission varchar(255) null comment '权限:执行器ID列表,多个逗号分割',
- constraint i_username
- unique (username)
- )
- row_format = DYNAMIC;
- create table zhongyiyun_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- req_type varchar(20) not null comment '请求业务类型',
- req_id varchar(64) null comment '请求序号',
- req_body text null comment '请求body',
- decrypt_body text null comment '解密后的body',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '众蚁云回调异步通知记录';
- create table zhongzhi_input_record
- (
- id int auto_increment comment '主键id'
- primary key,
- req_type varchar(20) not null comment '请求业务类型',
- order_no varchar(64) null comment '三方订单号',
- req_body text null comment '请求body',
- create_time datetime default CURRENT_TIMESTAMP null comment '创建时间'
- )
- comment '中智回调异步通知记录';
- create definer = root@`%` view view_wm_socre_package_total as
- select `ccc`.`id` AS `id`,
- `ccc`.`invoice_category` AS `invoice_category`,
- `ccc`.`settle_status` AS `settle_status`,
- `ccc`.`settle_amount` AS `settle_amount`,
- `ccc`.`discount` AS `discount`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score` AS `score`,
- `ccc`.`agent_type_id` AS `agent_type_id`,
- `ccc`.`level1_id` AS `level1_id`,
- `ccc`.`level2_id` AS `level2_id`,
- `ccc`.`zb_id` AS `zb_id`,
- `ccc`.`xxdb_id` AS `xxdb_id`,
- `ccc`.`typeid` AS `typeid`,
- `ccc`.`package_status` AS `package_status`,
- `ccc`.`package_finish_status` AS `package_finish_status`,
- `ccc`.`package_audit_status` AS `package_audit_status`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`create_time` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`receive_date` AS `receive_date`,
- `ccc`.`ytj` AS `ytj`,
- `ccc`.`ysh` AS `ysh`,
- `ccc`.`dsh` AS `dsh`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 1 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where ((`hnqzx`.`wm_task`.`score_package_id` is not null) and
- (`hnqzx`.`wm_task`.`real_flag` = '0'))
- group by `hnqzx`.`wm_task`.`score_package_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 2) and (`hnqzx`.`wm_score_package`.`typeid` in (3, 4)))
- union
- select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 2 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where ((`hnqzx`.`wm_task`.`score_package_id` is not null) and
- (`hnqzx`.`wm_task`.`real_flag` = '0'))
- group by `hnqzx`.`wm_task`.`score_package_level1_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 2) and (`hnqzx`.`wm_score_package`.`typeid` = 2))
- union
- select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 3 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where ((`hnqzx`.`wm_task`.`score_package_id` is not null) and
- (`hnqzx`.`wm_task`.`real_flag` = '0'))
- group by `hnqzx`.`wm_task`.`score_package_drug_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 1))) `ccc`
- order by `ccc`.`agent_type_id`, `ccc`.`create_time` desc;
- create definer = root@`%` view view_wm_socre_package_total_20210115 as
- select `ccc`.`id` AS `id`,
- `ccc`.`invoice_category` AS `invoice_category`,
- `ccc`.`settle_status` AS `settle_status`,
- `ccc`.`settle_amount` AS `settle_amount`,
- `ccc`.`discount` AS `discount`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score` AS `score`,
- `ccc`.`agent_type_id` AS `agent_type_id`,
- `ccc`.`level1_id` AS `level1_id`,
- `ccc`.`level2_id` AS `level2_id`,
- `ccc`.`zb_id` AS `zb_id`,
- `ccc`.`xxdb_id` AS `xxdb_id`,
- `ccc`.`typeid` AS `typeid`,
- `ccc`.`package_status` AS `package_status`,
- `ccc`.`package_finish_status` AS `package_finish_status`,
- `ccc`.`package_audit_status` AS `package_audit_status`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`create_time` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`receive_date` AS `receive_date`,
- `ccc`.`ytj` AS `ytj`,
- `ccc`.`ysh` AS `ysh`,
- `ccc`.`dsh` AS `dsh`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 1 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where (`hnqzx`.`wm_task`.`score_package_id` is not null)
- group by `hnqzx`.`wm_task`.`score_package_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 2) and (`hnqzx`.`wm_score_package`.`typeid` in (3, 4)))
- union
- select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 2 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where (`hnqzx`.`wm_task`.`score_package_id` is not null)
- group by `hnqzx`.`wm_task`.`score_package_level1_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 2) and (`hnqzx`.`wm_score_package`.`typeid` = 2))
- union
- select `hnqzx`.`wm_score_package`.`id` AS `id`,
- `hnqzx`.`wm_score_package`.`invoice_category` AS `invoice_category`,
- `hnqzx`.`wm_score_package`.`settle_status` AS `settle_status`,
- `hnqzx`.`wm_score_package`.`settle_amount` AS `settle_amount`,
- `hnqzx`.`wm_score_package`.`discount` AS `discount`,
- `hnqzx`.`wm_score_package`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_score_package`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `score`,
- `hnqzx`.`wm_score_package`.`agent_type_id` AS `agent_type_id`,
- `hnqzx`.`wm_score_package`.`level1_id` AS `level1_id`,
- `hnqzx`.`wm_score_package`.`level2_id` AS `level2_id`,
- `hnqzx`.`wm_score_package`.`zb_id` AS `zb_id`,
- `hnqzx`.`wm_score_package`.`xxdb_id` AS `xxdb_id`,
- `hnqzx`.`wm_score_package`.`typeid` AS `typeid`,
- `hnqzx`.`wm_score_package`.`package_status` AS `package_status`,
- `hnqzx`.`wm_score_package`.`package_finish_status` AS `package_finish_status`,
- `hnqzx`.`wm_score_package`.`package_audit_status` AS `package_audit_status`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_score_package`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_score_package`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_score_package`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `create_time`,
- `hnqzx`.`wm_score_package`.`create_user` AS `create_user`,
- `hnqzx`.`wm_score_package`.`update_time` AS `update_time`,
- `hnqzx`.`wm_score_package`.`update_user` AS `update_user`,
- `hnqzx`.`wm_score_package`.`receive_date` AS `receive_date`,
- `hnqzx`.`wm_score_package`.`is_conduct` AS `is_conduct`,
- `bb`.`ytj` AS `ytj`,
- `bb`.`ysh` AS `ysh`,
- `bb`.`dsh` AS `dsh`,
- 3 AS `t_type`
- from (`hnqzx`.`wm_score_package` left join (select `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_id`,
- sum(if((`hnqzx`.`wm_task`.`task_status` > 0),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ytj`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 3),
- `hnqzx`.`wm_task`.`score`, 0)) AS `ysh`,
- sum(if((`hnqzx`.`wm_task`.`task_status` = 2),
- `hnqzx`.`wm_task`.`score`, 0)) AS `dsh`
- from `hnqzx`.`wm_task`
- where (`hnqzx`.`wm_task`.`score_package_id` is not null)
- group by `hnqzx`.`wm_task`.`score_package_drug_id`) `bb`
- on ((`hnqzx`.`wm_score_package`.`id` = `bb`.`score_package_id`)))
- where ((`hnqzx`.`wm_score_package`.`del_flag` = '0') and (`hnqzx`.`wm_score_package`.`enable_flag` = '0') and
- (`hnqzx`.`wm_score_package`.`agent_type_id` = 1))) `ccc`
- order by `ccc`.`agent_type_id`, `ccc`.`create_time` desc;
- create definer = root@`%` view wm_zb_count as
- select distinct `ccc`.`package_id` AS `package_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`package_score` AS `package_score`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`pcreate_time` AS `pcreate_time`,
- `ccc`.`realname` AS `realname`,
- `ccc`.`idcard` AS `idcard`,
- `ccc`.`phone` AS `phone`,
- `ccc`.`dept_name` AS `dept_name`,
- `ccc`.`user_id` AS `user_id`,
- `ccc`.`task_type_name` AS `task_type_name`,
- `ccc`.`base_id` AS `base_id`,
- `ccc`.`id` AS `id`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`score` AS `score`,
- `ccc`.`score_package_drug_id` AS `score_package_drug_id`,
- `ccc`.`score_package_level1_id` AS `score_package_level1_id`,
- `ccc`.`score_package_id` AS `score_package_id`,
- `ccc`.`task_type_id` AS `task_type_id`,
- `ccc`.`lookinto_date` AS `lookinto_date`,
- `ccc`.`province` AS `province`,
- `ccc`.`city` AS `city`,
- `ccc`.`area` AS `area`,
- `ccc`.`address` AS `address`,
- `ccc`.`lookinto_type_id` AS `lookinto_type_id`,
- `ccc`.`task_content_id` AS `task_content_id`,
- `ccc`.`task_status` AS `task_status`,
- `ccc`.`task_user_id` AS `task_user_id`,
- `ccc`.`task_user_type` AS `task_user_type`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`lookinto_date` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`submit_status` AS `submit_status`,
- `ccc`.`share_img_url` AS `share_img_url`,
- `ccc`.`plat_audit_status` AS `plat_audit_status`,
- `ccc`.`ext_ids` AS `ext_ids`,
- `ccc`.`task_info_img` AS `task_info_img`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`id_card_number` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`real_flag` AS `real_flag`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 1 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_drug_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`id_card_number` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`real_flag` AS `real_flag`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 2 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_drug_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_level1_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`id_card_number` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`real_flag` AS `real_flag`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 3 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_level1_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))) `ccc`
- where ((`ccc`.`package_id` is not null) and (`ccc`.`task_status` = 3) and (`ccc`.`enable_flag` = 0) and
- (`ccc`.`del_flag` = 0) and (`ccc`.`real_flag` = '0'))
- order by `ccc`.`task_rule_id`, `ccc`.`task_user_id`, `ccc`.`lookinto_date`;
- create definer = root@`%` view wm_zb_count_20210115 as
- select distinct `ccc`.`package_id` AS `package_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`package_score` AS `package_score`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`pcreate_time` AS `pcreate_time`,
- `ccc`.`realname` AS `realname`,
- `ccc`.`idcard` AS `idcard`,
- `ccc`.`phone` AS `phone`,
- `ccc`.`dept_name` AS `dept_name`,
- `ccc`.`user_id` AS `user_id`,
- `ccc`.`task_type_name` AS `task_type_name`,
- `ccc`.`base_id` AS `base_id`,
- `ccc`.`id` AS `id`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`score` AS `score`,
- `ccc`.`score_package_drug_id` AS `score_package_drug_id`,
- `ccc`.`score_package_level1_id` AS `score_package_level1_id`,
- `ccc`.`score_package_id` AS `score_package_id`,
- `ccc`.`task_type_id` AS `task_type_id`,
- `ccc`.`lookinto_date` AS `lookinto_date`,
- `ccc`.`province` AS `province`,
- `ccc`.`city` AS `city`,
- `ccc`.`area` AS `area`,
- `ccc`.`address` AS `address`,
- `ccc`.`lookinto_type_id` AS `lookinto_type_id`,
- `ccc`.`task_content_id` AS `task_content_id`,
- `ccc`.`task_status` AS `task_status`,
- `ccc`.`task_user_id` AS `task_user_id`,
- `ccc`.`task_user_type` AS `task_user_type`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`lookinto_date` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`submit_status` AS `submit_status`,
- `ccc`.`share_img_url` AS `share_img_url`,
- `ccc`.`plat_audit_status` AS `plat_audit_status`,
- `ccc`.`ext_ids` AS `ext_ids`,
- `ccc`.`task_info_img` AS `task_info_img`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 1 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_drug_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 2 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_drug_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_level1_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 3 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_level1_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))) `ccc`
- where ((`ccc`.`package_id` is not null) and (`ccc`.`task_status` = 3) and (`ccc`.`enable_flag` = 0) and
- (`ccc`.`del_flag` = 0))
- order by `ccc`.`task_rule_id`, `ccc`.`task_user_id`, `ccc`.`lookinto_date`;
- create definer = root@`%` view wm_zb_count_copy as
- select distinct `ccc`.`package_id` AS `package_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`package_score` AS `package_score`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`pcreate_time` AS `pcreate_time`,
- `ccc`.`realname` AS `realname`,
- `ccc`.`idcard` AS `idcard`,
- `ccc`.`phone` AS `phone`,
- `ccc`.`dept_name` AS `dept_name`,
- `ccc`.`user_id` AS `user_id`,
- `ccc`.`task_type_name` AS `task_type_name`,
- `ccc`.`base_id` AS `base_id`,
- `ccc`.`id` AS `id`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`score` AS `score`,
- `ccc`.`score_package_drug_id` AS `score_package_drug_id`,
- `ccc`.`score_package_level1_id` AS `score_package_level1_id`,
- `ccc`.`score_package_id` AS `score_package_id`,
- `ccc`.`task_type_id` AS `task_type_id`,
- `ccc`.`lookinto_date` AS `lookinto_date`,
- `ccc`.`province` AS `province`,
- `ccc`.`city` AS `city`,
- `ccc`.`area` AS `area`,
- `ccc`.`address` AS `address`,
- `ccc`.`lookinto_type_id` AS `lookinto_type_id`,
- `ccc`.`task_content_id` AS `task_content_id`,
- `ccc`.`task_status` AS `task_status`,
- `ccc`.`task_user_id` AS `task_user_id`,
- `ccc`.`task_user_type` AS `task_user_type`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`lookinto_date` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`submit_status` AS `submit_status`,
- `ccc`.`share_img_url` AS `share_img_url`,
- `ccc`.`plat_audit_status` AS `plat_audit_status`,
- `ccc`.`ext_ids` AS `ext_ids`,
- `ccc`.`task_info_img` AS `task_info_img`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 1 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_drug_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 2 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_drug_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_level1_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`wm_score_package`.`create_time` AS `pcreate_time`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 3 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_level1_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))) `ccc`
- where ((`ccc`.`package_id` is not null) and (`ccc`.`task_status` = 3) and (`ccc`.`enable_flag` = 0) and
- (`ccc`.`del_flag` = 0))
- order by `ccc`.`task_rule_id`, `ccc`.`task_user_id`, `ccc`.`lookinto_date`;
- create definer = root@`%` view wm_zb_count_copy1 as
- select distinct `ccc`.`package_id` AS `package_id`,
- `ccc`.`score_name` AS `score_name`,
- `ccc`.`score_id` AS `score_id`,
- `ccc`.`package_score` AS `package_score`,
- `ccc`.`send_package_dept_id` AS `send_package_dept_id`,
- `ccc`.`realname` AS `realname`,
- `ccc`.`idcard` AS `idcard`,
- `ccc`.`phone` AS `phone`,
- `ccc`.`dept_name` AS `dept_name`,
- `ccc`.`user_id` AS `user_id`,
- `ccc`.`task_type_name` AS `task_type_name`,
- `ccc`.`base_id` AS `base_id`,
- `ccc`.`id` AS `id`,
- `ccc`.`task_rule_id` AS `task_rule_id`,
- `ccc`.`score` AS `score`,
- `ccc`.`score_package_drug_id` AS `score_package_drug_id`,
- `ccc`.`score_package_level1_id` AS `score_package_level1_id`,
- `ccc`.`score_package_id` AS `score_package_id`,
- `ccc`.`task_type_id` AS `task_type_id`,
- `ccc`.`lookinto_date` AS `lookinto_date`,
- `ccc`.`province` AS `province`,
- `ccc`.`city` AS `city`,
- `ccc`.`area` AS `area`,
- `ccc`.`address` AS `address`,
- `ccc`.`lookinto_type_id` AS `lookinto_type_id`,
- `ccc`.`task_content_id` AS `task_content_id`,
- `ccc`.`task_status` AS `task_status`,
- `ccc`.`task_user_id` AS `task_user_id`,
- `ccc`.`task_user_type` AS `task_user_type`,
- `ccc`.`drug_ent_id` AS `drug_ent_id`,
- `ccc`.`dept_id` AS `dept_id`,
- `ccc`.`del_flag` AS `del_flag`,
- `ccc`.`enable_flag` AS `enable_flag`,
- `ccc`.`tenant_id` AS `tenant_id`,
- `ccc`.`create_time` AS `create_time`,
- `ccc`.`create_user` AS `create_user`,
- `ccc`.`update_time` AS `update_time`,
- `ccc`.`update_user` AS `update_user`,
- `ccc`.`submit_status` AS `submit_status`,
- `ccc`.`share_img_url` AS `share_img_url`,
- `ccc`.`plat_audit_status` AS `plat_audit_status`,
- `ccc`.`ext_ids` AS `ext_ids`,
- `ccc`.`task_info_img` AS `task_info_img`,
- `ccc`.`t_type` AS `t_type`
- from (select `hnqzx`.`wm_score_package`.`id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`create_time` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 1 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_drug_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`create_time` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 2 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_drug_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))
- union
- select `hnqzx`.`wm_task`.`score_package_level1_id` AS `package_id`,
- `hnqzx`.`wm_score_package`.`score_name` AS `score_name`,
- `hnqzx`.`wm_score_package`.`score` AS `package_score`,
- `hnqzx`.`wm_score_package`.`send_package_dept_id` AS `send_package_dept_id`,
- `hnqzx`.`wm_score_package`.`score_id` AS `score_id`,
- `hnqzx`.`sys_user`.`realname` AS `realname`,
- `hnqzx`.`sys_user`.`temp1` AS `idcard`,
- `hnqzx`.`sys_user`.`phone` AS `phone`,
- `hnqzx`.`sys_dept`.`name` AS `dept_name`,
- `hnqzx`.`sys_user`.`user_id` AS `user_id`,
- `hnqzx`.`wm_task_type`.`task_type_name` AS `task_type_name`,
- `hnqzx`.`wm_task_type`.`base_id` AS `base_id`,
- `hnqzx`.`wm_task`.`id` AS `id`,
- `hnqzx`.`wm_task`.`task_rule_id` AS `task_rule_id`,
- `hnqzx`.`wm_task`.`score` AS `score`,
- `hnqzx`.`wm_task`.`score_package_drug_id` AS `score_package_drug_id`,
- `hnqzx`.`wm_task`.`score_package_level1_id` AS `score_package_level1_id`,
- `hnqzx`.`wm_task`.`score_package_id` AS `score_package_id`,
- `hnqzx`.`wm_task`.`task_type_id` AS `task_type_id`,
- `hnqzx`.`wm_task`.`lookinto_date` AS `lookinto_date`,
- `hnqzx`.`wm_task`.`province` AS `province`,
- `hnqzx`.`wm_task`.`city` AS `city`,
- `hnqzx`.`wm_task`.`area` AS `area`,
- `hnqzx`.`wm_task`.`address` AS `address`,
- `hnqzx`.`wm_task`.`lookinto_type_id` AS `lookinto_type_id`,
- `hnqzx`.`wm_task`.`task_content_id` AS `task_content_id`,
- `hnqzx`.`wm_task`.`task_status` AS `task_status`,
- `hnqzx`.`wm_task`.`task_user_id` AS `task_user_id`,
- `hnqzx`.`wm_task`.`task_user_type` AS `task_user_type`,
- `hnqzx`.`wm_task`.`drug_ent_id` AS `drug_ent_id`,
- `hnqzx`.`wm_task`.`dept_id` AS `dept_id`,
- `hnqzx`.`wm_task`.`del_flag` AS `del_flag`,
- `hnqzx`.`wm_task`.`enable_flag` AS `enable_flag`,
- `hnqzx`.`wm_task`.`tenant_id` AS `tenant_id`,
- `hnqzx`.`wm_task`.`create_time` AS `create_time`,
- `hnqzx`.`wm_task`.`create_user` AS `create_user`,
- `hnqzx`.`wm_task`.`update_time` AS `update_time`,
- `hnqzx`.`wm_task`.`update_user` AS `update_user`,
- `hnqzx`.`wm_task`.`submit_status` AS `submit_status`,
- `hnqzx`.`wm_task`.`share_img_url` AS `share_img_url`,
- `hnqzx`.`wm_task`.`plat_audit_status` AS `plat_audit_status`,
- `hnqzx`.`wm_task`.`ext_ids` AS `ext_ids`,
- `hnqzx`.`wm_task`.`task_info_img` AS `task_info_img`,
- 3 AS `t_type`
- from ((((`hnqzx`.`wm_task` left join `hnqzx`.`wm_score_package` on ((`hnqzx`.`wm_task`.`score_package_level1_id` =
- `hnqzx`.`wm_score_package`.`id`))) join `hnqzx`.`wm_task_type`) join `hnqzx`.`sys_user`) join `hnqzx`.`sys_dept`)
- where ((`hnqzx`.`wm_task_type`.`id` = `hnqzx`.`wm_task`.`task_type_id`) and
- (`hnqzx`.`sys_user`.`user_id` = `hnqzx`.`wm_task`.`task_user_id`) and
- (`hnqzx`.`sys_user`.`dept_id` = `hnqzx`.`sys_dept`.`dept_id`))) `ccc`
- where ((`ccc`.`package_id` is not null) and (`ccc`.`task_status` = 3) and (`ccc`.`enable_flag` = 0) and
- (`ccc`.`del_flag` = 0))
- order by `ccc`.`create_time` desc;
|