From bbe1efc28a28083f1e6d60f0fdff1f6b6914eeed Mon Sep 17 00:00:00 2001 From: zhangheng <3226558941@qq.com> Date: Tue, 28 Apr 2026 12:19:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E4=BB=BB=E5=8A=A1=E4=B8=8E?= =?UTF-8?q?=E8=B4=A6=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/template/批量发送任务信息.xlsx | Bin 0 -> 9828 bytes .../xinelu/common/enums/BillSourceEnum.java | 30 ++ .../common/enums/NodeExecuteStatusEnum.java | 5 + .../common/enums/PhoneDialMethodEnum.java | 2 +- .../xinelu/common/utils/BracketExtractor.java | 45 ++ .../BatchSendTaskInfoController.java | 120 +++++ .../BatchSendTaskRecordInfoController.java | 99 ++++ .../BatchSendTaskVariableInfoController.java | 94 ++++ .../billinfo/BillInfoController.java | 110 ++++ .../PhoneDialRecordController.java | 92 ++++ .../scriptInfo/ScriptInfoController.java | 8 + .../ShortMessageSendRecordController.java | 92 ++++ .../SignPatientManageRouteController.java | 2 +- .../textmessage/TextMessageController.java | 8 + .../batchsendtaskinfo/BatchSendTaskInfo.java | 210 ++++++++ .../BatchSendTaskRecordInfo.java | 130 +++++ .../BatchSendTaskVariableInfo.java | 62 +++ .../manage/domain/billinfo/BillInfo.java | 99 ++++ .../phonedialrecord/PhoneDialRecord.java | 45 +- .../ShortMessageSendRecord.java | 49 +- .../SignPatientManageRoute.java | 8 +- .../domain/textmessage/TextMessage.java | 5 + .../xinelu/manage/dto/aiob/CreateTaskDto.java | 14 + .../xinelu/manage/dto/aiob/RetryRuleList.java | 20 + .../BatchSendTaskRecordDto.java | 40 ++ .../manage/dto/billinfo/BillInfoDto.java | 64 +++ .../xinelu/manage/dto/smssend/SmsInfoDTO.java | 5 + .../dto/textmessage/TextMessageTaskDTO.java | 5 + .../BatchSendTaskInfoMapper.java | 69 +++ .../BatchSendTaskRecordInfoMapper.java | 61 +++ .../BatchSendTaskVariableInfoMapper.java | 69 +++ .../mapper/billinfo/BillInfoMapper.java | 69 +++ .../PhoneDialRecordMapper.java | 19 + .../mapper/scriptInfo/ScriptInfoMapper.java | 7 + .../ShortMessageSendRecordMapper.java | 18 + .../SignPatientManageRouteNodeMapper.java | 9 + .../mapper/textmessage/TextMessageMapper.java | 7 + .../IBatchSendTaskInfoService.java | 83 +++ .../impl/BatchSendTaskInfoServiceImpl.java | 502 ++++++++++++++++++ .../IBatchSendTaskRecordInfoService.java | 70 +++ .../BatchSendTaskRecordInfoServiceImpl.java | 137 +++++ .../IBatchSendTaskVariableInfoService.java | 61 +++ .../BatchSendTaskVariableInfoServiceImpl.java | 89 ++++ .../service/billinfo/IBillInfoService.java | 70 +++ .../billinfo/impl/BillInfoServiceImpl.java | 130 +++++ .../IPhoneDialRecordService.java | 3 +- .../impl/PhoneDialRecordServiceImpl.java | 5 +- .../scriptInfo/IScriptInfoService.java | 5 + .../impl/ScriptInfoServiceImpl.java | 24 +- .../IShortMessageSendRecordService.java | 3 +- .../ShortMessageSendRecordServiceImpl.java | 5 +- .../SignPatientManageRouteServiceImpl.java | 15 +- .../textmessage/ITextMessageService.java | 8 +- .../impl/TextMessageServiceImpl.java | 23 +- .../vo/phonedialrecord/BillPhoneDialVo.java | 125 +++++ .../ShortMessageSendRecordVo.java | 114 ++++ .../vo/textmessage/TextMessageTaskVO.java | 5 + .../manage/vo/textmessage/TextMessageVO.java | 5 + .../BatchSendTaskInfoMapper.xml | 368 +++++++++++++ .../BatchSendTaskRecordInfoMapper.xml | 196 +++++++ .../BatchSendTaskVariableInfoMapper.xml | 121 +++++ .../mapper/manage/billinfo/BillInfoMapper.xml | 141 +++++ .../phonedialrecord/PhoneDialRecordMapper.xml | 131 ++++- .../manage/scriptInfo/ScriptInfoMapper.xml | 4 + .../ShortMessageSendRecordMapper.xml | 112 +++- .../SignPatientManageRouteMapper.xml | 8 +- .../SignPatientManageRouteNodeMapper.xml | 59 +- .../manage/textmessage/TextMessageMapper.xml | 14 + 68 files changed, 4332 insertions(+), 95 deletions(-) create mode 100644 postdischarge-admin/src/main/resources/template/批量发送任务信息.xlsx create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/enums/BillSourceEnum.java create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/utils/BracketExtractor.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskinfo/BatchSendTaskInfoController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskrecordinfo/BatchSendTaskRecordInfoController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskvariableinfo/BatchSendTaskVariableInfoController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/billinfo/BillInfoController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskinfo/BatchSendTaskInfo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskrecordinfo/BatchSendTaskRecordInfo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskvariableinfo/BatchSendTaskVariableInfo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/billinfo/BillInfo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/RetryRuleList.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/batchsendtaskrecordinfo/BatchSendTaskRecordDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/billinfo/BillInfoDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskinfo/BatchSendTaskInfoMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/billinfo/BillInfoMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/IBatchSendTaskInfoService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/impl/BatchSendTaskInfoServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/IBatchSendTaskRecordInfoService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/impl/BatchSendTaskRecordInfoServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/IBatchSendTaskVariableInfoService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/impl/BatchSendTaskVariableInfoServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/IBillInfoService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/impl/BillInfoServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/phonedialrecord/BillPhoneDialVo.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskinfo/BatchSendTaskInfoMapper.xml create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.xml create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.xml create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/billinfo/BillInfoMapper.xml diff --git a/postdischarge-admin/src/main/resources/template/批量发送任务信息.xlsx b/postdischarge-admin/src/main/resources/template/批量发送任务信息.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..c16bb1ca221e40794d96708d953b487d40d6c939 GIT binary patch literal 9828 zcma)i1ymi&()GbTNDhHOaM$1t!QCymySuwv&_Hm4ySrB=6naoASt7q4AO;1(HNH_OayPVm{5WoP0nfU#mezSqjm ztGNwJ(%b zJziYiCx`Cl*K56aA3UErVA_uIJGw%1M>JanpIaP4Ino~ zpsmfe<$_B6-lP5=`k<P^KZNgSa&Saf|wQZuPD044=vMj2#m1p#uh9`<=*ES;skf zVe+e=1%q{Vf>DJvM=vH()R~H9rMbe)v;`e&+;D|O>CO*Nz6cv!v_IcUmFUWLOlOb! z?4Z^UdyC8WLR2e6k(S6IO>zm&u0~hBq9ht66UoE@h=&`{lG7qf_g)C@YtCmJiP+?G z27W4i@vzEms{W*_5&<<^xq{T!?urr`3|=D%J`nu9Y%txBjEFP5^@kxQ;lLJw1Y}Bc zfS-OpK8z{T6*u0K3sQl`lWV4&+b|b%%DB^f?@=|B^_St+X;b5pqOZl!Qiv%lef8Dh z#d$?3U)|onk$nR%-3V?3kB+xcM`g49X@}tW!vVUHWJ=P~6(N*uRp`46?RV+R?aNyH z_v$tMd3=LVYqOFymK6$C(D}v#z%O8ML1ib+o#X^yBt+uLYP5&s8#^G~O^3pJ zB6=^d>8{tOs!38<#e}vF@EfP9dXxX*>@&F5EwHH@6p%7%tdgb2X7Q~$Mg+q6A zSWDEmK6oWgqndGkpD4+TDS3TAyw9o8+MS8oBuCh^y2_Z4s8R4a5 zg=k)m@oJNUwOZ(~>h0f)i>7PjCHg z3!}X7#)A~346hqqpw7aVNYx^Le>TL&FTL*;KGqo9%ha;xG&k;$#Sf2+x~sqRcmlX+ zjP7|b|X@I|*dHZfF1i^FOdZ zMd+W+_#s}?dY%p#bV7FYPO#0I$48zwpvb@Sm8nAQ@y0yci^__PZ!C~k2hNAl)N*!m z1iqfkam4IivEf+EHwa#9O(B01fkZG~p@xV%Zo{ZjX>e;$}%$ z8KS6)(|4-F{;p&)d~W;@U(i%=WWM0QVni>d+ZvV8F3qDbKRJG_x)|jDLEPSGf==!R zTcDaz6Qk#kBwU=!>H8kNBmvH!az6VSD5ZY^q;ax`v=zD6tC=jVG(LU&U?+|!^;s$U z`n~v>FkNt6;!=Iy%3;!XN|ObHw_9UjtsPaP$0ve^Wr>(hdFEezy>R*RA8dJaU`hRY zh1@kb=bL)nl(hI2Jl2h9Zmkm%sfFzo``QN2ld1%aI*xn9(FSz6J>31~oJ7()Fm3|N z-WGq!cK7D6^0c_twhZb(d*8D_J0^9KHz_LBS1pzet(?5Yl5OVw=@WPOl>ETBKTqJ) z^d|X5W@J;x6^{@?1(eazcQODzBs#dbz(ouEr_MRb6dw9xvSv;`j96_U1#P}5H?$1jmJ*K=jQHT9Iqe8VR6sbZ}SHh`vVt6sxwEZbYPX%J{Y zLSF0MX{=r&@Zc!1>K3@^rUUg2o}aE$%#A@ON6TP~L7Xm*a>YTkr@mfa_B-s3Y?Jw$ zgLr1;rf3}Wi4ZUXu?};6XXLpDS66)b>w|fK@8ZWNUp8<|RhJ^nr%c{Ilstm{-)rOf z?F?EQ4km_{hJU=BC2jm{A! zeZjB!ofx{1b5G=miMe)flpc28JC!SrO6v-4L92ILeSU&(?!r&C+GBTRq9rSx!M@zq z+S7(8(CE8Ve=urSy_*04AuGmH!}qEySC&th;Y+~2zT@z?R%<;<4rINzF1KAaFYrbv z=WBer!}6lr1CW z;j&?*U7F?aYU<#3B!G$ns+wkDa1vX2Y7(Omy)Xb--Y{Y@ZuXH=NGREMO~HZ0mnYGJ zm5LLeaUvpiZe{VOgC--=Vc7-@`r6Y8W>F=|%eC)s?!GXdT!!c8N2O=*+-+T)ZA^%~ z+i9cjhWIF)w^n@8e)D5NrnNoY^Ll^ay;Td{S^Lw)oOQd`9&{Iv8iU*I<;1)6cb>OH zJKm3{Jzy&vCKg>H#GPHup)xI;)V{TQ9kbug65Er$kPG)z@zUQoH5?Dlf-k2M?ROpN zbGlr!iH0D!SYCCkb41)qqV;`aUGD+Mr5C<_?F_vdlsp)6YLXy)JaGH1XNhljmf0C2 zSJ~`GHDXO%gNBp7#aN4!9Hm@<0yXz#gcQ9~$uSRsvPP6>N0QFVy(O|`9>U@1i2hm1 zoZK-mG5ojo7<{6&=qcIm%RJd-O4p~A9|Dkk3;ge46{sR+MkTX)w(J7X%%Ja424;oq z*mitF4-nvzBIyjZ-u3V|SXkMrl*e3PRqxNen%#G-VYQ+wOWH zhLtiK^#v#nbgfTv=!{Bi6_|AHhY)AY`+?i3+%)paulaK-X|ADf0U6_Q{}%JNk~^H? zJxJYB2K>VWEiz(mg_iHHmj|8tRyKMXU0*2oxV=1nM?S{QBw?*Ti+(_}-^$OxaMzpx# z16wY&a*^F1__lYA%w6Lsm(1&8+RkWU$ro4&bR~`AW}Tu5YPfx(nAu00Z#zMVlk%$eWpo_j@Q}WqjFcr)7bJ4IMHfxCz6mFn=nXt1 zK-~eG$%-rH<0sz6B@yd;KlpZnSD}<3S=|x=axINy23pm1rk`*8h}O{k zM_A-z7zOR;7-^K`G$%^+rV+zgD$oYQnO*&-2zy3phhAhzTo-NDVW`#HNs~82LbgO? zWFMqw6JSmz#HmgKHymFpCu>H`x9V4RFczfci(wY6Xf$Yss?QOnPIRsYa=e=@Ri;6d zdbJ~tWBSk?c#8mm{SI)p+u6MMI-U>%7HR$g=AT~^-GcTw_@F&(E$H|B{RVm$*qi9u z85$@!*qK@x+duDq45Np{yLo}apbrWZBWtoIlo+ul6c2DuAA;8@ybPg9p}S>%*g}P| zdMIN;=<^?@^^`13GDzbx>TSe%4K$X&d)ki}%Kn(Wt|3CBXZ;MVV!g*pGzo9<$qBKd zy}r2)im8{rwh}{D&*xhMQ8rWp(m!TYzn44GGY0&B@=SYZ9cax?^lonPb5l12PL5?X@XhTFI98bz3}TF zv#sNLD=yIYjMJp2#O)=(iSwYB-rt)#-3RSF%@Go!}4;$9k&xCRWWXcV$kUO`DU!Ad3$;*$=#g#jng zM2&ZbZ?x4s)0x4_hJBRhNUPRjS}~d@L}B78ffFfDa&Y1O6j*3BKA%SNSd<_~|s8Ni-TfMcs@=IKdGO40sWrJ(^Z8L~QbuIcsajR&H*Q zYSHw4|Fm#)K4|se+TeFTA*<(R6=c54_1eq+0^y%atTMjXtq~Cbc%usdApL8JIk;LF z{#;v2ng>zX@6n$kd!Fd*An{Nlxsl%)H7{2jEX7a?DG7q}g9C5rmvQK?8a8a3)Dm+cI@T_t)=kCOL)8iX2n2RW zVM4jgMSD5!EwYN_Ar&?ARqhjE9NK;fn(yS`R?=N1#+z%Z_v2KBL+4Qx5~Ub+QJ&b7 zjAuW9hT^`?tkdqpKJ2P;or9Z0y?47(d&+}BMuabs9p5b2l9-P&UrU|3r@56*u|6=w zb+5FzT=^s{m^Tuckn$83#W>f*K$84;#hcJVeJgKdphS*LIk;rW3J-n%aV@w7m(F$s zIV#=L?tZ7aPrF3~4w7HtCIg1Z0Eo;F;LT{`D;Y6~rKeBrfbvxhkwet)rPhm?bouT{ zC!&J`Ic@x4L+VRW`;y~9vTJ@e71+v?1+i0@L``A*r8+Q|pa62X`1K}hTz|yyMo}=< zm|jtzSazOz4n4bRe`0u{Iy|M40JGUtU?Y+eO$Qum0qqMiTi;$IOU_poBjrnQkg)*o zGG@uMm2)%atdG%^q4|o4cM0dWO*BG@%K?%$Wu^E^Dz#NN$xz2?E>4`DF%$GxHgII*~&4Nci_A@;@#+s>4+A+l#aK#ptVR zj(=FRJjY@0Hem@}bUGE9Oeq<+(u1Q&RcaJe9m*?vE0&vfEV9eY^nsPd|*WEO=2Z{{(jwPeoxiIysT_?Nc2&BF=Dg4 zXQ&oxrv=|+Qu**Vhy$+XW*Sifo@(efOky9rV}DS5>8Fh7wfK#*RgWB8?F^~wUx`YYR$u+4ZHOza$uj(#8uY)r&@$N z7yPFhYz&DKZ5QPG---c9Ecp4H|be#mWQ zTh&-I==BALh9rjy3sb5|QO(qZ$zNKg*ShI)3(^|I9jI!CkXJRLpc*(3WU)nYRE4gU zI0^#i_CsJ9rcvcmYa%s`5sPP0arGxwvebriLuc%1LqF%)n^sLbO2+{Q=@C_&vnRGu zzDiHf2GRtYpL{>~hAyK(1Y3{N!kK5OO{RM#(n{`UP8@J@JxclRupR%P-GB(pHDIoP zbqsmtG5Et}g5}YRyKR7SywprJhk;TP1fG;PfonT!w{rHu6_55g`8HK;kid@)z^!7_ z6I@u8j5-rUk%-Od{k?XjRnQmmt@m63BC`J51$Z7G;+2c|a7+nQeOFMQ1 zib5aaeOOB6T3L?krDi^-WU8psCoDBY_tH5!bTSEBBGPq%6Y8V{6+vR#uUUYBAeN~S0R8MyK%#c2X#*|-=a_z2a~a$~FT zHyp?vduLa0vP)E4;mFkfIcuVlIR13{r)qI$`krg}%~R#B(3e z7Z!aK`K9pRQlcI)G)8K-A(p=E+S#lVcOnDwNees6ic+&uAaF~#dNDmpSpUvMWwF@4P8Zmo4A>Jd|Zl$}qIkm+e` zBZ{wa@2IbZsX+lEycqUuEj;dX0iMoo&ucXD3pHLy6ZjC9h<^ThC_z~!{Pi^ggojrs zd}BT#eZk&WX49%7BY2X>!n@I~E*+xpH)-%2uU&})MIaG5g@}W_Jza0;2-oPr^m)Ms zE;be>+PRV!pB^@k)AoY3g=@HISKWYMrO3CKG&l{6-V|Ld+z&IYdq;2iZ5@CgL<16& zx!hjG?_>uN2J~!JcNcI)K?{WhZ7j6AoLz_scIoq>>gk?u?T9?JKwxHYxw_ns!HBd! ze(Zb|`9i;hs!O=!V>=0Yt|AMU@@Hep(*TwXq$oV4kc@o~7OuR{)?}l?vS|gHey=N( zR%h#c__CA;S!(=;0UIka3=6wxrCqb9XQJrqv}2SJNL-oZMPX~0ed0iu4#YPQ1UxUF z|4vj2Oq8mD*Y75Jk50(?jEmBc3ef;l&gw5ZPYmR&m-a*N4eFz|;09KR{lsCgEWpna ztC8qI7HII7!m_gy{(b|*aYR~P_zRb7V%NF$R zu7Wiq+#K1lcF8;nx@+;TNMx_N$YHyU*s_2cJHqN5trJ8A+?U2S6If-_S%vp&tj?2W z+xLQ-xUkYBZaoAX2nm{UVRxs5?3mMei?OjGB++=d3|kIpnoejFC2pC>P4(F@?f~L*&Q)u z9EY^bE!bH`RQD48wIDX1@LLe-X%K@o{<*|`*Q!tjW1w&_4-?Oeg!UC z`URw#O*kMzWYz7kwh~H2+FNU^zP`vYSGB~XNqN$#&N(b)%C1#~mi00%Ope7t$P=L# ztt6I{MdK1-N0!?yY8l%-(o%j;7S8)dNF+*Z>w1;PX5yjkyRc$vq-tE4`->8lwQ+}# zRK+IaMxye)*$o~IdR!BM;B7HTCo1Li$l}FYU;P?&P@`d62k&6ffbZ|99jWluH3<+ZkH?nQU=qb82}4{kH;2xFGz6p?yY{#*TnemMFc?`QYs~DQ9%l zIfu7|hf)TfK8cb~qoglmRgc*V4-ie8w zuFjY-^_oFZjsTLZgC}B!zMjnlR~}|SQ=pqc`G>yQ~sG!9A#IkqV)vm!Bp-ngC9~`?*@yDE-6}3Y;9d< z&1N$EssA!Y(CI9vgTBw0Vu0-pGde-mNE%CyoP9!JoLq|k@iV(}dATr?#_4+2=sB&P zfH6sWvZoWA`8w7cv~N2h>2C!^*G>B&LWJ{QsCH)1G7$9-o?RFBa;A;8*?(Qol&2n? z(P1&~vhgC~D%DG{<0&>roJvMqA;9S;I1k-WA!K)sq&q+Cn`-~(r+2}bn!Pb77J~%J zc06Zj)dj4r91N`-v=v=#4DB_a<1wWl2c^O3fkD@#ZQVKQj0!fo5xP2ShK0oI5R+FO zOcx31ey3OI6guF1z7Z*697nh9Pxq~e!c^vAB!ZL6QzhD$DqzxXxl1KRcyXW3)6o+H z6uMksnAIVw#!m0d=u}}k{EBd~3hY>+bZ{!Q<*bF(P9nsBTN%e6_I_g!rw*bU4 zPo-ZS7rY5?y^NWLeq7>x#my(}Q0TK`-EI$1-G)3J?7Pjs{ytpMT|;sC75->=b%%z3 z-m_?L`LZphuARE&d*^q3mggDsJ#r#RppM@U3rTsyV^j}K + * + * @param input 原始字符串 + * @return 包含所有【】内文字的列表(不会为null,若无匹配则返回空列表) + */ + public static List extractToList(String input) { + List result = new ArrayList<>(); + if (input == null || input.isEmpty()) { + return result; + } + // 正则:匹配【 后任意字符(非贪婪)直到 】 + Pattern pattern = Pattern.compile("【(.*?)】"); + Matcher matcher = pattern.matcher(input); + while (matcher.find()) { + result.add(matcher.group(1)); // group(1) 是括号内捕获的内容 + } + return result; + } + + /** + * 提取字符串中所有【】内的文字,返回String[] + * + * @param input 原始字符串 + * @return 包含所有【】内文字的数组 + */ + public static String[] extractToArray(String input) { + List list = extractToList(input); + return list.toArray(new String[0]); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskinfo/BatchSendTaskInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskinfo/BatchSendTaskInfoController.java new file mode 100644 index 00000000..d16526a9 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskinfo/BatchSendTaskInfoController.java @@ -0,0 +1,120 @@ +package com.xinelu.manage.controller.batchsendtaskinfo; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.constant.Constants; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo; +import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto; +import com.xinelu.manage.service.batchsendtaskinfo.IBatchSendTaskInfoService; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Objects; + +/** + * 批量推送任务信息Controller + * + * @author zh + * @date 2026-04-26 + */ +@RestController +@RequestMapping("/system/batchSendTaskInfo") +public class BatchSendTaskInfoController extends BaseController { + @Resource + private IBatchSendTaskInfoService batchSendTaskInfoService; + + /** + * 查询批量推送任务信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:list')") + @GetMapping("/list") + public TableDataInfo list(BatchSendTaskInfo batchSendTaskInfo) { + startPage(); + List list = batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo); + return getDataTable(list); + } + + /** + * 导出批量推送任务信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:export')") + @Log(title = "批量推送任务信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BatchSendTaskInfo batchSendTaskInfo) { + List list = batchSendTaskInfoService.selectBatchSendTaskInfoList(batchSendTaskInfo); + ExcelUtil util = new ExcelUtil<>(BatchSendTaskInfo.class); + util.exportExcel(response, list, "批量推送任务信息数据"); + } + + /** + * 获取批量推送任务信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(batchSendTaskInfoService.selectBatchSendTaskInfoById(id)); + } + + /** + * 新增批量推送任务信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:add')") + @Log(title = "批量推送任务信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BatchSendTaskInfo batchSendTaskInfo) { + return toAjax(batchSendTaskInfoService.insertBatchSendTaskInfo(batchSendTaskInfo)); + } + + /** + * 修改批量推送任务信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:edit')") + @Log(title = "批量推送任务信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BatchSendTaskInfo batchSendTaskInfo) { + return toAjax(batchSendTaskInfoService.updateBatchSendTaskInfo(batchSendTaskInfo)); + } + + /** + * 删除批量推送任务信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskInfo:remove')") + @Log(title = "批量推送任务信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(batchSendTaskInfoService.deleteBatchSendTaskInfoByIds(ids)); + } + + @ApiOperation("批量推送任务信息导入") + @PostMapping("/batchSendTaskUpload") + public AjaxResult batchSendTaskUpload(MultipartFile file, Integer isDistinct, String importName) throws Exception { + //判断excel里面是否有数据/文件格式 + if (Objects.isNull(file) || StringUtils.isBlank(file.getOriginalFilename())) { + return AjaxResult.error("请选择需要导入的文件!"); + } + // 获取文件名 + String filename = file.getOriginalFilename(); + if (!filename.endsWith(Constants.XLSX) && !filename.endsWith(Constants.XLS)) { + return AjaxResult.error("导入文件格式不正确,请导入xlsx或xls格式的文件!"); + } + ExcelUtil util = new ExcelUtil<>(BatchSendTaskInfo.class); + List list = util.importExcel(file.getInputStream()); + return batchSendTaskInfoService.batchSendTaskUpload(list, isDistinct, filename, importName); + } + + @ApiOperation("创建批量推送任务") + @PostMapping("/batchSend") + public AjaxResult batchSend(@RequestBody BatchSendTaskRecordDto batchSendTaskRecordDto) throws Exception { + return batchSendTaskInfoService.batchSend(batchSendTaskRecordDto); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskrecordinfo/BatchSendTaskRecordInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskrecordinfo/BatchSendTaskRecordInfoController.java new file mode 100644 index 00000000..208b26d0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskrecordinfo/BatchSendTaskRecordInfoController.java @@ -0,0 +1,99 @@ +package com.xinelu.manage.controller.batchsendtaskrecordinfo; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo; +import com.xinelu.manage.service.batchsendtaskrecordinfo.IBatchSendTaskRecordInfoService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 批量推送任务记录Controller + * + * @author zh + * @date 2026-04-26 + */ +@RestController +@RequestMapping("/system/batchSendTaskRecordInfo") +public class BatchSendTaskRecordInfoController extends BaseController { + @Resource + private IBatchSendTaskRecordInfoService batchSendTaskRecordInfoService; + + /** + * 查询批量推送任务记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:list')") + @GetMapping("/list") + public TableDataInfo list(BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + startPage(); + List list = batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo); + return getDataTable(list); + } + + /** + * 导出批量推送任务记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:export')") + @Log(title = "批量推送任务记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + List list = batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo); + ExcelUtil util = new ExcelUtil<>(BatchSendTaskRecordInfo.class); + util.exportExcel(response, list, "批量推送任务记录数据"); + } + + /** + * 获取批量推送任务记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(batchSendTaskRecordInfoService.selectBatchSendTaskRecordInfoById(id)); + } + + /** + * 新增批量推送任务记录 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:add')") + @Log(title = "批量推送任务记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + return toAjax(batchSendTaskRecordInfoService.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo)); + } + + /** + * 修改批量推送任务记录 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:edit')") + @Log(title = "批量推送任务记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + return toAjax(batchSendTaskRecordInfoService.updateBatchSendTaskRecordInfo(batchSendTaskRecordInfo)); + } + + /** + * 删除批量推送任务记录 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskRecordInfo:remove')") + @Log(title = "批量推送任务记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(batchSendTaskRecordInfoService.deleteBatchSendTaskRecordInfoByIds(ids)); + } + + /** + * 获取短信或电话模板 + */ + @GetMapping("/getTemplate") + public List getTemplate(String batchTaskSource) { + return batchSendTaskRecordInfoService.getTemplate(batchTaskSource); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskvariableinfo/BatchSendTaskVariableInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskvariableinfo/BatchSendTaskVariableInfoController.java new file mode 100644 index 00000000..1ace7f3f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/batchsendtaskvariableinfo/BatchSendTaskVariableInfoController.java @@ -0,0 +1,94 @@ +package com.xinelu.manage.controller.batchsendtaskvariableinfo; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo; +import com.xinelu.manage.service.batchsendtaskvariableinfo.IBatchSendTaskVariableInfoService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 批量推送任务记录变量属性Controller + * + * @author zh + * @date 2026-04-26 + */ +@RestController +@RequestMapping("/system/batchSendTaskVariableInfo") +public class BatchSendTaskVariableInfoController extends BaseController { + @Resource + private IBatchSendTaskVariableInfoService batchSendTaskVariableInfoService; + + /** + * 查询批量推送任务记录变量属性列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:list')") + //@GetMapping("/list") + public TableDataInfo list(BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + startPage(); + List list = batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo); + return getDataTable(list); + } + + /** + * 导出批量推送任务记录变量属性列表 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:export')") + @Log(title = "批量推送任务记录变量属性", businessType = BusinessType.EXPORT) + //@PostMapping("/export") + public void export(HttpServletResponse response, BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + List list = batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo); + ExcelUtil util = new ExcelUtil<>(BatchSendTaskVariableInfo.class); + util.exportExcel(response, list, "批量推送任务记录变量属性数据"); + } + + /** + * 获取批量推送任务记录变量属性详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:query')") + //@GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(batchSendTaskVariableInfoService.selectBatchSendTaskVariableInfoById(id)); + } + + /** + * 新增批量推送任务记录变量属性 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:add')") + @Log(title = "批量推送任务记录变量属性", businessType = BusinessType.INSERT) + //@PostMapping + public AjaxResult add(@RequestBody BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + return toAjax(batchSendTaskVariableInfoService.insertBatchSendTaskVariableInfo(batchSendTaskVariableInfo)); + } + + /** + * 修改批量推送任务记录变量属性 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:edit')") + @Log(title = "批量推送任务记录变量属性", businessType = BusinessType.UPDATE) + //@PutMapping + public AjaxResult edit(@RequestBody BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + return toAjax(batchSendTaskVariableInfoService.updateBatchSendTaskVariableInfo(batchSendTaskVariableInfo)); + } + + /** + * 删除批量推送任务记录变量属性 + */ + @PreAuthorize("@ss.hasPermi('system:batchSendTaskVariableInfo:remove')") + @Log(title = "批量推送任务记录变量属性", businessType = BusinessType.DELETE) + //@DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(batchSendTaskVariableInfoService.deleteBatchSendTaskVariableInfoByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/billinfo/BillInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/billinfo/BillInfoController.java new file mode 100644 index 00000000..f25189f1 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/billinfo/BillInfoController.java @@ -0,0 +1,110 @@ +package com.xinelu.manage.controller.billinfo; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.billinfo.BillInfo; +import com.xinelu.manage.dto.billinfo.BillInfoDto; +import com.xinelu.manage.service.billinfo.IBillInfoService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 账单信息Controller + * + * @author zh + * @date 2026-04-16 + */ +@RestController +@RequestMapping("/system/billInfo") +public class BillInfoController extends BaseController { + @Resource + private IBillInfoService billInfoService; + + /** + * 查询账单信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:list')") + @GetMapping("/list") + public TableDataInfo list(BillInfo billInfo) { + startPage(); + List list = billInfoService.selectBillInfoList(billInfo); + return getDataTable(list); + } + + /** + * 导出账单信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:export')") + @Log(title = "账单信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BillInfo billInfo) { + List list = billInfoService.selectBillInfoList(billInfo); + ExcelUtil util = new ExcelUtil<>(BillInfo.class); + util.exportExcel(response, list, "账单信息数据"); + } + + /** + * 获取账单信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(billInfoService.selectBillInfoById(id)); + } + + /** + * 获取账单信息详细信息 + */ + @GetMapping(value = "/view") + public AjaxResult view(String billCode) { + return AjaxResult.success(billInfoService.selectBillDetails(billCode)); + } + + /** + * 新增账单信息 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:add')") + @Log(title = "账单信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BillInfo billInfo) { + return toAjax(billInfoService.insertBillInfo(billInfo)); + } + + /** + * 修改账单信息 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:edit')") + @Log(title = "账单信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BillInfo billInfo) { + return toAjax(billInfoService.updateBillInfo(billInfo)); + } + + /** + * 删除账单信息 + */ + @PreAuthorize("@ss.hasPermi('system:billInfo:remove')") + @Log(title = "账单信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(billInfoService.deleteBillInfoByIds(ids)); + } + + /** + * 导出账单明细信息列表 + */ + @PostMapping("/exportDetails") + public void exportDetails(HttpServletResponse response, BillInfo billInfo) { + List list = billInfoService.selectBillDetails(billInfo.getBillCode()); + ExcelUtil util = new ExcelUtil<>(BillInfoDto.class); + util.exportExcel(response, list, "账单信息数据"); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java new file mode 100644 index 00000000..c122fe5c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/phonedialrecord/PhoneDialRecordController.java @@ -0,0 +1,92 @@ +package com.xinelu.manage.controller.phonedialrecord; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; +import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService; +import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 电话拨打记录Controller + * + * @author zh + * @date 2026-04-17 + */ +@RestController +@RequestMapping("/system/phoneDialRecord") +public class PhoneDialRecordController extends BaseController { + @Resource + private IPhoneDialRecordService phoneDialRecordService; + + /** + * 查询电话拨打记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:list')") + @GetMapping("/list") + public TableDataInfo list(BillPhoneDialVo phoneDialRecord) { + startPage(); + List list = phoneDialRecordService.selectPhoneDialRecordList(phoneDialRecord); + return getDataTable(list); + } + + /** + * 导出电话拨打记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:export')") + @Log(title = "电话拨打记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BillPhoneDialVo phoneDialRecord) { + List list = phoneDialRecordService.selectPhoneDialRecordList(phoneDialRecord); + ExcelUtil util = new ExcelUtil<>(BillPhoneDialVo.class); + util.exportExcel(response, list, "电话拨打记录数据"); + } + + /** + * 获取电话拨打记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(phoneDialRecordService.selectPhoneDialRecordById(id)); + } + + /** + * 新增电话拨打记录 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:add')") + @Log(title = "电话拨打记录", businessType = BusinessType.INSERT) + //@PostMapping + public AjaxResult add(@RequestBody PhoneDialRecord phoneDialRecord) { + return toAjax(phoneDialRecordService.insertPhoneDialRecord(phoneDialRecord)); + } + + /** + * 修改电话拨打记录 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:edit')") + @Log(title = "电话拨打记录", businessType = BusinessType.UPDATE) + //@PutMapping + public AjaxResult edit(@RequestBody PhoneDialRecord phoneDialRecord) { + return toAjax(phoneDialRecordService.updatePhoneDialRecord(phoneDialRecord)); + } + + /** + * 删除电话拨打记录 + */ + @PreAuthorize("@ss.hasPermi('system:phoneDialRecord:remove')") + @Log(title = "电话拨打记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(phoneDialRecordService.deletePhoneDialRecordByIds(ids)); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java index b167ad15..cdec6c5c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java @@ -140,4 +140,12 @@ public class ScriptInfoController extends BaseController { public AjaxResult updateScriptEdgeNode(@RequestBody ScriptVO scriptVO) { return scriptInfoService.updateScriptEdgeNode(scriptVO); } + + /** + * 查询话术变量 + */ + @GetMapping("/selectScriptVariable") + public AjaxResult selectScriptVariable(Long id) { + return scriptInfoService.selectScriptVariable(id); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java new file mode 100644 index 00000000..50d89513 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/shortmessagesendrecord/ShortMessageSendRecordController.java @@ -0,0 +1,92 @@ +package com.xinelu.manage.controller.shortmessagesendrecord; + +import com.xinelu.common.annotation.Log; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.utils.poi.ExcelUtil; +import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; +import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService; +import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 短信发送结果记录Controller + * + * @author zh + * @date 2026-04-17 + */ +@RestController +@RequestMapping("/system/shortMessageSendRecord") +public class ShortMessageSendRecordController extends BaseController { + @Resource + private IShortMessageSendRecordService shortMessageSendRecordService; + + /** + * 查询短信发送结果记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:list')") + @GetMapping("/list") + public TableDataInfo list(ShortMessageSendRecordVo shortMessageSendRecord) { + startPage(); + List list = shortMessageSendRecordService.selectShortMessageSendRecordList(shortMessageSendRecord); + return getDataTable(list); + } + + /** + * 导出短信发送结果记录列表 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:export')") + @Log(title = "短信发送结果记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ShortMessageSendRecordVo shortMessageSendRecord) { + List list = shortMessageSendRecordService.selectShortMessageSendRecordList(shortMessageSendRecord); + ExcelUtil util = new ExcelUtil<>(ShortMessageSendRecordVo.class); + util.exportExcel(response, list, "短信发送结果记录数据"); + } + + /** + * 获取短信发送结果记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(shortMessageSendRecordService.selectShortMessageSendRecordById(id)); + } + + /** + * 新增短信发送结果记录 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:add')") + @Log(title = "短信发送结果记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ShortMessageSendRecord shortMessageSendRecord) { + return toAjax(shortMessageSendRecordService.insertShortMessageSendRecord(shortMessageSendRecord)); + } + + /** + * 修改短信发送结果记录 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:edit')") + @Log(title = "短信发送结果记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ShortMessageSendRecord shortMessageSendRecord) { + return toAjax(shortMessageSendRecordService.updateShortMessageSendRecord(shortMessageSendRecord)); + } + + /** + * 删除短信发送结果记录 + */ + @PreAuthorize("@ss.hasPermi('system:shortMessageSendRecord:remove')") + @Log(title = "短信发送结果记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(shortMessageSendRecordService.deleteShortMessageSendRecordByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java index 652a8e19..7471e7f8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -74,7 +74,7 @@ public class SignPatientManageRouteController extends BaseController { } /** - * 新增签约患者管理任务路径(手动创建任务) + * 新增签约患者管理任务路径(手动创建任务)患者导入 */ @Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT) @PostMapping("/add") diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java index c08e7696..cea68b77 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/textmessage/TextMessageController.java @@ -117,4 +117,12 @@ public class TextMessageController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(textMessageService.deleteTextMessageByIds(ids)); } + + /** + * 查询话术变量 + */ + @GetMapping("/selectTextMessageVariable") + public AjaxResult selectTextMessageVariable(Long id) { + return textMessageService.selectTextMessageVariable(id); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskinfo/BatchSendTaskInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskinfo/BatchSendTaskInfo.java new file mode 100644 index 00000000..0bf908ff --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskinfo/BatchSendTaskInfo.java @@ -0,0 +1,210 @@ +package com.xinelu.manage.domain.batchsendtaskinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.Objects; + +/** + * 批量推送任务信息对象 batch_send_task_info + * + * @author zh + * @date 2026-04-26 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "批量推送任务信息对象", description = "batch_send_task_info") +public class BatchSendTaskInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 导入数据id + */ + private Long id; + + /** + * 序号 + */ + @ApiModelProperty(value = "序号") + private Long orderNum; + + /** + * 流水号/导入编号 + */ + @ApiModelProperty(value = "流水号/导入编号") + private String sn; + + /** + * 导入批次名称 + */ + @ApiModelProperty(value = "导入批次名称") + private String importName; + + /** + * 团体名称 + */ + @ApiModelProperty(value = "团体名称") + @Excel(name = "团体名称") + private String teamName; + + /** + * 所属机构ID + */ + @ApiModelProperty(value = "所属机构ID") + private Long hospitalAgencyId; + + /** + * 所属医院名称 + */ + @ApiModelProperty(value = "所属医院名称") + @Excel(name = "所属医院") + private String hospitalAgencyName; + + /** + * 匹配的科室ID + */ + @ApiModelProperty(value = "匹配的科室ID") + private Long departmentId; + + /** + * 匹配的科室名称 + */ + @ApiModelProperty(value = "匹配的科室名称") + @Excel(name = "所属科室") + private String departmentName; + + /** + * 就诊/体检时间,时间格式:yyyy-MM-dd + */ + @ApiModelProperty(value = "就诊/体检时间,时间格式:yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "就诊/体检时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date visitDate; + + /** + * 门诊/住院/体检号 + */ + @ApiModelProperty(value = "门诊/住院/体检号") + @Excel(name = "门诊/住院/体检号") + private String inHospitalNumber; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "电话") + private String patientPhone; + + /** + * 性别 + */ + @ApiModelProperty(value = "性别") + @Excel(name = "性别") + private String sex; + + /** + * 年龄 + */ + @ApiModelProperty(value = "年龄") + @Excel(name = "年龄") + private Long age; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号") + @Excel(name = "身份证号") + private String cardNo; + + /** + * 人群id + */ + @ApiModelProperty(value = "人群id") + private Long crowdId; + + /** + * 人群名称 + */ + @ApiModelProperty(value = "人群名称") + @Excel(name = "所属人群") + private String crowdName; + + /** + * 体检总结/主要诊断 + */ + @ApiModelProperty(value = "体检总结/主要诊断") + @Excel(name = "体检总结/主要诊断") + private String physicalExaminationSummary; + + /** + * 总结标签,逗号隔断 + */ + @ApiModelProperty(value = "总结标签,逗号隔断") + private String physicalExaminationLabel; + + /** + * 删除标识,0:未删除,1:已删除 + */ + private Integer delFlag; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BatchSendTaskInfo that = (BatchSendTaskInfo) o; + return Objects.equals(inHospitalNumber, that.inHospitalNumber) && Objects.equals(patientPhone, that.patientPhone); + } + + @Override + public int hashCode() { + return Objects.hash(inHospitalNumber, patientPhone); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("orderNum", getOrderNum()) + .append("sn", getSn()) + .append("importName", getImportName()) + .append("teamName", getTeamName()) + .append("hospitalAgencyId", getHospitalAgencyId()) + .append("hospitalAgencyName", getHospitalAgencyName()) + .append("departmentId", getDepartmentId()) + .append("departmentName", getDepartmentName()) + .append("visitDate", getVisitDate()) + .append("inHospitalNumber", getInHospitalNumber()) + .append("patientName", getPatientName()) + .append("patientPhone", getPatientPhone()) + .append("age", getAge()) + .append("cardNo", getCardNo()) + .append("crowdId", getCrowdId()) + .append("crowdName", getCrowdName()) + .append("physicalExaminationSummary", getPhysicalExaminationSummary()) + .append("physicalExaminationLabel", getPhysicalExaminationLabel()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskrecordinfo/BatchSendTaskRecordInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskrecordinfo/BatchSendTaskRecordInfo.java new file mode 100644 index 00000000..ac4d5870 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskrecordinfo/BatchSendTaskRecordInfo.java @@ -0,0 +1,130 @@ +package com.xinelu.manage.domain.batchsendtaskrecordinfo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.time.LocalDateTime; + +/** + * 批量推送任务记录对象 batch_send_task_record_info + * + * @author zh + * @date 2026-04-26 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "批量推送任务记录对象", description = "batch_send_task_record_info") +public class BatchSendTaskRecordInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 批量发送任务id + */ + private Long id; + + /** + * 批量发送任务编号 + */ + @ApiModelProperty(value = "批量发送任务编号") + @Excel(name = "批量发送任务编号") + private String batchTaskNumber; + + /** + * 批量发送任务名称 + */ + @ApiModelProperty(value = "批量发送任务名称") + @Excel(name = "批量发送任务名称") + private String batchTaskName; + + /** + * 批量任务:BATCH_TASK,单个实时拔打任务:ACTUAL_TIME_TASK + */ + @ApiModelProperty(value = "批量任务:BATCH_TASK,单个实时拔打任务:ACTUAL_TIME_TASK") + private String taskExecuteType; + + /** + * 任务计划执行时间 + */ + @ApiModelProperty(value = "任务计划执行时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "任务计划执行时间", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime nodePlanTime; + + /** + * 模版类型,短信:message;电话:telephone + */ + @ApiModelProperty(value = "模版类型,短信:message;电话:telephone") + @Excel(name = "模版类型,短信:message;电话:telephone") + private String batchTaskSource; + + /** + * 第三方平台模板ID + */ + @ApiModelProperty(value = "第三方平台模板ID") + private String robotPublishId; + + /** + * 模板表id + */ + @ApiModelProperty(value = "模板表id") + private String templateId; + + /** + * 电话模板名称 + */ + @ApiModelProperty(value = "电话模板名称") + @Excel(name = "模板名称") + private String templateName; + + /** + * 内容(变量使用特殊符号进行标记) + */ + @ApiModelProperty(value = "内容") + @Excel(name = "内容", readConverterExp = "变量使用特殊符号进行标记") + private String nodeContent; + + /** + * 节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING + */ + @ApiModelProperty(value = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING") + @Excel(name = "节点任务执行状态,已执行:EXECUTED,未执行:UNEXECUTED,执行中:EXECUTING") + private String nodeExecuteStatus; + + /** + * 总结标签,逗号隔断 + */ + @ApiModelProperty(value = "总结标签,逗号隔断") + @Excel(name = "总结标签") + private String physicalExaminationLabel; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("batchTaskNumber", getBatchTaskNumber()) + .append("batchTaskName", getBatchTaskName()) + .append("taskExecuteType", getTaskExecuteType()) + .append("nodePlanTime", getNodePlanTime()) + .append("batchTaskSource", getBatchTaskSource()) + .append("robotPublishId", getRobotPublishId()) + .append("templateId", getTemplateId()) + .append("templateName", getTemplateName()) + .append("nodeContent", getNodeContent()) + .append("nodeExecuteStatus", getNodeExecuteStatus()) + .append("physicalExaminationLabel", getPhysicalExaminationLabel()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskvariableinfo/BatchSendTaskVariableInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskvariableinfo/BatchSendTaskVariableInfo.java new file mode 100644 index 00000000..8c059605 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/batchsendtaskvariableinfo/BatchSendTaskVariableInfo.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.domain.batchsendtaskvariableinfo; + +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 批量推送任务记录变量属性对象 batch_send_task_variable_info + * + * @author zh + * @date 2026-04-26 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "批量推送任务记录变量属性对象", description = "batch_send_task_variable_info") +public class BatchSendTaskVariableInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 导入数据id + */ + private Long id; + + /** + * 变量 + */ + @ApiModelProperty(value = "变量") + private String variable; + + /** + * 变量属性 + */ + @ApiModelProperty(value = "变量属性") + private String variableAttribute; + + /** + * 批量推送任务记录表id + */ + @ApiModelProperty(value = "批量推送任务记录表id") + private Long batchSendTaskRecordId; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("variable", getVariable()) + .append("variableAttribute", getVariableAttribute()) + .append("batchSendTaskRecordId", getBatchSendTaskRecordId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/billinfo/BillInfo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/billinfo/BillInfo.java new file mode 100644 index 00000000..d4c93d6b --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/billinfo/BillInfo.java @@ -0,0 +1,99 @@ +package com.xinelu.manage.domain.billinfo; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; + +/** + * 账单信息对象 bill_info + * + * @author xinelu + * @date 2026-04-16 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "账单信息对象", description = "bill_info") +public class BillInfo extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 账单主键 + */ + private Long id; + + /** + * 账单编号 + */ + @ApiModelProperty(value = "账单编号") + @Excel(name = "账单编号") + private String billCode; + + /** + * 账单名称 + */ + @ApiModelProperty(value = "账单名称") + @Excel(name = "账单名称") + private String billName; + + /** + * 账单月份 + */ + @ApiModelProperty(value = "账单月份") + @Excel(name = "账单月份") + private String billMonth; + + /** + * 条数/时长 + */ + @ApiModelProperty(value = "条数/时长") + @Excel(name = "条数/时长") + private BigDecimal pushLength; + + /** + * 账单金额 + */ + @ApiModelProperty(value = "账单金额") + @Excel(name = "账单金额") + private BigDecimal billExpense; + + /** + * 缴费状态,已缴费:PAID,未交费:UNPAID_FEES + */ + @ApiModelProperty(value = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + @Excel(name = "缴费状态,已缴费:PAID,未交费:UNPAID_FEES") + private String paymentStatus; + + /** + * 账单来源,短信:message;电话:telephone + */ + @ApiModelProperty(value = "账单来源,短信:message;电话:telephone") + @Excel(name = "账单来源,短信:message;电话:telephone") + private String billSource; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("billCode", getBillCode()) + .append("billName", getBillName()) + .append("billMonth", getBillMonth()) + .append("pushLength", getPushLength()) + .append("billExpense", getBillExpense()) + .append("paymentStatus", getPaymentStatus()) + .append("billSource", getBillSource()) + .append("createTime", getCreateTime()) + .toString(); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/phonedialrecord/PhoneDialRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/phonedialrecord/PhoneDialRecord.java index 2b0605e2..a036e762 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/phonedialrecord/PhoneDialRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/phonedialrecord/PhoneDialRecord.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.math.BigDecimal; import java.time.LocalDateTime; /** @@ -37,21 +38,19 @@ public class PhoneDialRecord extends BaseEntity { * 患者id */ @ApiModelProperty(value = "患者id") - @Excel(name = "患者id") private Long patientId; /** * 签约患者管理任务节点表id */ @ApiModelProperty(value = "签约患者管理任务节点表id") - @Excel(name = "签约患者管理任务节点表id") private Long manageRouteNodeId; /** * 患者手机号 */ @ApiModelProperty(value = "患者手机号") - @Excel(name = "患者手机号") + @Excel(name = "手机号") private String patientPhone; /** @@ -66,42 +65,37 @@ public class PhoneDialRecord extends BaseEntity { * 电话模板id */ @ApiModelProperty(value = "电话模板id") - @Excel(name = "电话模板id") private String phoneTemplateId; /** * 电话模板名称 */ @ApiModelProperty(value = "电话模板名称") - @Excel(name = "电话模板名称") + @Excel(name = "模板名称") private String phoneTemplateName; /** * 替换标签之后的电话内容 */ @ApiModelProperty(value = "替换标签之后的电话内容") - @Excel(name = "替换标签之后的电话内容") private String messageNodeContent; /** * AI :自动外呼 或 COMMON:人工随访电话,否则为空 */ @ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空") - @Excel(name = "AI :自动外呼 或 COMMON:人工随访电话,否则为空") private String phoneDialMethod; /** * 推送结果状态码(0表示成功) */ @ApiModelProperty(value = "推送结果状态码") - @Excel(name = "推送结果状态码", readConverterExp = "0表示成功") private Long errorCode; /** * 推送结果状态码,success:成功,fail:失败 */ @ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败") - @Excel(name = "推送结果状态码,success:成功,fail:失败") private String errorStatus; /** @@ -116,6 +110,33 @@ public class PhoneDialRecord extends BaseEntity { @ApiModelProperty(value = "通话录音存储路径") private String phoneDialRecordVideo; + /** + * 通话时长 + */ + @ApiModelProperty(value = "通话时长") + @Excel(name = "通话时长") + private BigDecimal phoneDuration; + + /** + * 通话费用 + */ + @ApiModelProperty(value = "单价") + @Excel(name = "单价") + private BigDecimal phoneUnitPrice; + + /** + * 通话费用 + */ + @ApiModelProperty(value = "通话费用") + @Excel(name = "通话费用") + private BigDecimal phoneExpense; + + /** + * 关联账单id + */ + @ApiModelProperty(value = "关联账单id") + private Long billId; + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) @@ -134,6 +155,12 @@ public class PhoneDialRecord extends BaseEntity { .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("ctUuid", getCtUuid()) + .append("phoneDialRecordVideo", getPhoneDialRecordVideo()) + .append("phoneDuration", getPhoneDuration()) + .append("phoneCost", getPhoneExpense()) + .append("phoneUnitPrice", getPhoneUnitPrice()) + .append("billId", getBillId()) .toString(); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/shortmessagesendrecord/ShortMessageSendRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/shortmessagesendrecord/ShortMessageSendRecord.java index 707054dc..0b805576 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/shortmessagesendrecord/ShortMessageSendRecord.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/shortmessagesendrecord/ShortMessageSendRecord.java @@ -12,8 +12,8 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.Date; /** * 短信发送结果记录对象 short_message_send_record @@ -38,21 +38,19 @@ public class ShortMessageSendRecord extends BaseEntity { * 患者id */ @ApiModelProperty(value = "患者id") - @Excel(name = "患者id") private Long patientId; /** * 签约患者管理任务节点表id */ @ApiModelProperty(value = "签约患者管理任务节点表id") - @Excel(name = "签约患者管理任务节点表id") private Long manageRouteNodeId; /** * 患者手机号 */ @ApiModelProperty(value = "患者手机号") - @Excel(name = "患者手机号") + @Excel(name = "手机号") private String patientPhone; /** @@ -67,37 +65,65 @@ public class ShortMessageSendRecord extends BaseEntity { * 消息模板id */ @ApiModelProperty(value = "消息模板id") - @Excel(name = "消息模板id") private String messageTemplateId; /** * 消息内容 */ @ApiModelProperty(value = "消息内容") - @Excel(name = "消息内容") private String messageNodeContent; /** * 推送结果状态码(0表示成功) */ @ApiModelProperty(value = "推送结果状态码") - @Excel(name = "推送结果状态码", readConverterExp = "0表示成功") private Long errorCode; /** * 推送结果状态码,success:成功,fail:失败 */ @ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败") - @Excel(name = "推送结果状态码,success:成功,fail:失败") private String errorStatus; /** * PHONE_MSG:电话同时发短信时;COMMON:通用 */ @ApiModelProperty(value = "PHONE_MSG:电话同时发短信时;COMMON:通用") - @Excel(name = "PHONE_MSG:电话同时发短信时;COMMON:通用") private String messageType; + /** + * 短信长度 + */ + @ApiModelProperty(value = "短信长度") + @Excel(name = "短信长度") + private Long messageLength; + + /** + * 短信数量 + */ + @ApiModelProperty(value = "短信数量") + @Excel(name = "短信数量") + private Long messageQuantity; + + /** + * 短信单价 + */ + @ApiModelProperty(value = "短信单价") + @Excel(name = "短信单价") + private BigDecimal messageUnitPrice; + + /** + * 短信价格 + */ + @ApiModelProperty(value = "短信价格") + @Excel(name = "短信价格") + private BigDecimal messageExpense; + + /** + * 关联账单id + */ + @ApiModelProperty(value = "关联账单id") + private Long billId; @Override public String toString() { @@ -116,6 +142,11 @@ public class ShortMessageSendRecord extends BaseEntity { .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("messageType", getMessageType()) + .append("messageLength", getMessageLength()) + .append("messageQuantity", getMessageQuantity()) + .append("messageUnitPrice", getMessageUnitPrice()) + .append("messageExpense", getMessageExpense()) + .append("billId", getBillId()) .toString(); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java index 92e58cf4..46d87ea9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java @@ -13,7 +13,6 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotBlank; import java.time.LocalDateTime; -import java.time.LocalTime; /** * 签约患者管理任务路径对象 sign_patient_manage_route @@ -140,4 +139,11 @@ public class SignPatientManageRoute extends BaseEntity { @Excel(name = "导入患者主表ID") private String importMainId; + /** 批量推送任务表id */ + @ApiModelProperty(value = "批量推送任务表id") + private Long batchSendTaskRecordId; + + /** 批量推送信息表id */ + @ApiModelProperty(value = "批量推送信息表id") + private Long batchSendTaskId; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/textmessage/TextMessage.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/textmessage/TextMessage.java index 18daf796..1b0ef2d8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/textmessage/TextMessage.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/textmessage/TextMessage.java @@ -112,6 +112,10 @@ public class TextMessage extends BaseEntity { */ private Long sourceTemplateId; + /** + * 短信变量,竖线隔开。来源于创建短息任务页面 + */ + private String variables; @Override public String toString() { @@ -128,6 +132,7 @@ public class TextMessage extends BaseEntity { .append("textMessageStatus", getTextMessageStatus()) .append("textMessageSort", getTextMessageSort()) .append("textMessageRemark", getTextMessageRemark()) + .append("variables", getVariables()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/CreateTaskDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/CreateTaskDto.java index a913155d..2b8273f6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/CreateTaskDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/CreateTaskDto.java @@ -44,6 +44,11 @@ public class CreateTaskDto { */ private List forbidDialDate; + /** + * 禁呼时间,默认为空,表示不限制禁呼时间 :[{"forbidDialStartTime":"12:00","forbidDialEndTime":"13:00"},{"forbidDialStartTime":"14:00","forbidDialEndTime":"15:00"}] + */ + private List forbidDialTime; + /** * 重试次数,整数,且 N ≤ 3,默认为空,表示不重试 */ @@ -64,12 +69,21 @@ public class CreateTaskDto { */ private Boolean isOpenPhoneDown = false; + /** + * 是否开启重复号码过滤,true为开启,false为关闭 + */ + private Boolean isOpenRepeatFilter = true; + /** * 号码类型过滤 1-400号码;2-800号码;3-手机号码;4-固话;5-95号码;6-96号码;7-其他 */ private List numTypeFilterList; + /** + * 是否开启任务回调 默认false + */ private Boolean taskDataCallback; + /** * 任务级回调地址设置 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/RetryRuleList.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/RetryRuleList.java new file mode 100644 index 00000000..aa88adc0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/aiob/RetryRuleList.java @@ -0,0 +1,20 @@ +package com.xinelu.manage.dto.aiob; + +import lombok.Data; + +/** + * 禁呼时间 + */ +@Data +public class RetryRuleList { + + /** + * 禁呼开始时间 + */ + private String forbidDialStartTime; + + /** + * 禁呼截止时间 + */ + private String forbidDialEndTime; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/batchsendtaskrecordinfo/BatchSendTaskRecordDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/batchsendtaskrecordinfo/BatchSendTaskRecordDto.java new file mode 100644 index 00000000..7c7e581e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/batchsendtaskrecordinfo/BatchSendTaskRecordDto.java @@ -0,0 +1,40 @@ +package com.xinelu.manage.dto.batchsendtaskrecordinfo; + +import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; +import java.util.Map; + + +/** + * 批量任务创建dto + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class BatchSendTaskRecordDto extends SignPatientManageRouteNode { + + /** + * 总结标签,逗号隔断 + */ + @ApiModelProperty(value = "总结标签,逗号隔断") + private String physicalExaminationLabel; + + /** + * 模版类型,短信:message;电话:telephone + */ + @ApiModelProperty(value = "模版类型,短信:message;电话:telephone") + private String batchTaskSource; + + List list; + + /** + * 名单的变量variable map,模板需要用到的变量,{"key1": "value1","key2": "value2"} + */ + private String variable; + + private Map vars; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/billinfo/BillInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/billinfo/BillInfoDto.java new file mode 100644 index 00000000..edd5c4c2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/billinfo/BillInfoDto.java @@ -0,0 +1,64 @@ +package com.xinelu.manage.dto.billinfo; + +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + * 账单dto + */ +@Data +public class BillInfoDto { + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** + * 患者电话 + */ + @ApiModelProperty(value = "患者电话") + @Excel(name = "电话") + private String patientPhone; + + /** + * 模版名称 + */ + @ApiModelProperty(value = "模版名称") + @Excel(name = "模版名称") + private String template; + + /** + * 推送时间 + */ + @ApiModelProperty(value = "推送时间") + @Excel(name = "推送时间") + private LocalDate pushTime; + + /** + * 条数/时长 + */ + @ApiModelProperty(value = "条数/时长") + @Excel(name = "条数/时长") + private BigDecimal pushLength; + + /** + * 单价 + */ + @ApiModelProperty(value = "单价") + @Excel(name = "单价") + private BigDecimal unitPrice; + + /** + * 费用 + */ + @ApiModelProperty(value = "费用") + @Excel(name = "费用") + private BigDecimal expense; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/smssend/SmsInfoDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/smssend/SmsInfoDTO.java index 43e2a06e..9ce448cb 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/smssend/SmsInfoDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/smssend/SmsInfoDTO.java @@ -31,4 +31,9 @@ public class SmsInfoDTO { * 模板中的变量替换JSON串 */ private JSONObject templateParam; + + /** + * 外部流水扩展字段 + */ + private String OutId; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageTaskDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageTaskDTO.java index 1f0b4ea1..4b8fbefe 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageTaskDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageTaskDTO.java @@ -120,4 +120,9 @@ public class TextMessageTaskDTO extends BaseEntity { @ApiModelProperty(value = "适用任务类型字典表ids") private Long[] suitTaskTypeIds; + + /** + * 短信变量,竖线隔开。来源于创建短息任务页面 + */ + private String variables; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskinfo/BatchSendTaskInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskinfo/BatchSendTaskInfoMapper.java new file mode 100644 index 00000000..77089ee5 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskinfo/BatchSendTaskInfoMapper.java @@ -0,0 +1,69 @@ +package com.xinelu.manage.mapper.batchsendtaskinfo; + +import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo; + +import java.util.List; + +/** + * 批量推送任务信息Mapper接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface BatchSendTaskInfoMapper { + /** + * 查询批量推送任务信息 + * + * @param id 批量推送任务信息主键 + * @return 批量推送任务信息 + */ + BatchSendTaskInfo selectBatchSendTaskInfoById(Long id); + + /** + * 查询批量推送任务信息列表 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 批量推送任务信息集合 + */ + List selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 新增批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 修改批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 删除批量推送任务信息 + * + * @param id 批量推送任务信息主键 + * @return 结果 + */ + int deleteBatchSendTaskInfoById(Long id); + + /** + * 批量删除批量推送任务信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBatchSendTaskInfoByIds(Long[] ids); + + /** + * 新增患者信息 + * + * @param batchSendTaskInfoList 批量任务信息 + * @return 结果 + */ + int insertBatchSendTaskInfoList(List batchSendTaskInfoList); +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.java new file mode 100644 index 00000000..d6eb03ff --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.mapper.batchsendtaskrecordinfo; + +import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo; + +import java.util.List; + +/** + * 批量推送任务记录Mapper接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface BatchSendTaskRecordInfoMapper { + /** + * 查询批量推送任务记录 + * + * @param id 批量推送任务记录主键 + * @return 批量推送任务记录 + */ + BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id); + + /** + * 查询批量推送任务记录列表 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 批量推送任务记录集合 + */ + List selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 新增批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 修改批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 删除批量推送任务记录 + * + * @param id 批量推送任务记录主键 + * @return 结果 + */ + int deleteBatchSendTaskRecordInfoById(Long id); + + /** + * 批量删除批量推送任务记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBatchSendTaskRecordInfoByIds(Long[] ids); +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.java new file mode 100644 index 00000000..0f19c2e7 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.java @@ -0,0 +1,69 @@ +package com.xinelu.manage.mapper.batchsendtaskvariableinfo; + +import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo; + +import java.util.List; + +/** + * 批量推送任务记录变量属性Mapper接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface BatchSendTaskVariableInfoMapper { + /** + * 查询批量推送任务记录变量属性 + * + * @param id 批量推送任务记录变量属性主键 + * @return 批量推送任务记录变量属性 + */ + BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id); + + /** + * 查询批量推送任务记录变量属性列表 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 批量推送任务记录变量属性集合 + */ + List selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 新增批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 修改批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 删除批量推送任务记录变量属性 + * + * @param id 批量推送任务记录变量属性主键 + * @return 结果 + */ + int deleteBatchSendTaskVariableInfoById(Long id); + + /** + * 批量删除批量推送任务记录变量属性 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBatchSendTaskVariableInfoByIds(Long[] ids); + + /** + * 批量添加变量表 + * + * @param batchSendTaskVariableInfos 变量信息 + * @return int + */ + int insertBatchSendTaskVariableInfos(List batchSendTaskVariableInfos); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/billinfo/BillInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/billinfo/BillInfoMapper.java new file mode 100644 index 00000000..3add5562 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/billinfo/BillInfoMapper.java @@ -0,0 +1,69 @@ +package com.xinelu.manage.mapper.billinfo; + +import com.xinelu.manage.domain.billinfo.BillInfo; + +import java.util.List; + +/** + * 账单信息Mapper接口 + * + * @author zh + * @date 2026-04-16 + */ +public interface BillInfoMapper { + /** + * 查询账单信息 + * + * @param id 账单信息主键 + * @return 账单信息 + */ + BillInfo selectBillInfoById(Long id); + + /** + * 查询账单信息 + * + * @param code 账单信息 + * @return 账单信息 + */ + BillInfo selectBillInfoByCode(String code); + + /** + * 查询账单信息列表 + * + * @param billInfo 账单信息 + * @return 账单信息集合 + */ + List selectBillInfoList(BillInfo billInfo); + + /** + * 新增账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + int insertBillInfo(BillInfo billInfo); + + /** + * 修改账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + int updateBillInfo(BillInfo billInfo); + + /** + * 删除账单信息 + * + * @param id 账单信息主键 + * @return 结果 + */ + int deleteBillInfoById(Long id); + + /** + * 批量删除账单信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteBillInfoByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java index 35fedb0e..3b5ed208 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/phonedialrecord/PhoneDialRecordMapper.java @@ -1,9 +1,12 @@ package com.xinelu.manage.mapper.phonedialrecord; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; +import com.xinelu.manage.dto.billinfo.BillInfoDto; import com.xinelu.manage.dto.phonedialrecord.PhoneDialRecordDto; import com.xinelu.manage.dto.statistics.FollowUpRateDto; +import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; import com.xinelu.manage.vo.phonedialrecord.PhoneDialRecordVo; + import java.util.List; /** @@ -29,6 +32,14 @@ public interface PhoneDialRecordMapper { */ List selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord); + /** + * 查询电话拨打记录列表 + * + * @param phoneDialRecord 电话拨打记录 + * @return 电话拨打记录集合 + */ + List selectPhoneDialRecords(BillPhoneDialVo phoneDialRecord); + /** * 新增电话拨打记录 * @@ -86,4 +97,12 @@ public interface PhoneDialRecordMapper { * @return 电话拨打记录集合 */ List getNoVideoList(PhoneDialRecordDto phoneDialRecordDto); + + /** + * 根据账单id查询电话推送记录 + * + * @param billId 账单id + * @return BillInfoDto + */ + List selectPhoneDialStatisticByBillId(Long billId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java index 4cc290f9..412a1b0d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java @@ -81,4 +81,11 @@ public interface ScriptInfoMapper { int deleteScriptInfoNode(Long id); int deleteScriptInfoEdge(Long id); + + + /** + * 查询话术信息列表 + * @return 话术信息集合 + */ + List selectScriptInfos(); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java index 74e67ebc..9f45c0f7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/shortmessagesendrecord/ShortMessageSendRecordMapper.java @@ -1,7 +1,9 @@ package com.xinelu.manage.mapper.shortmessagesendrecord; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; +import com.xinelu.manage.dto.billinfo.BillInfoDto; import com.xinelu.manage.dto.statistics.FollowUpRateDto; +import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import com.xinelu.manage.vo.statistics.MessageSendVo; import com.xinelu.manage.vo.subscribemessagesendrecord.RecordNum; import org.apache.ibatis.annotations.Param; @@ -31,6 +33,14 @@ public interface ShortMessageSendRecordMapper { */ List selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord); + /** + * 查询短信发送结果记录列表 + * + * @param shortMessageSendRecord 短信发送结果记录 + * @return 短信发送结果记录集合 + */ + List selectShortMessageSendRecords(ShortMessageSendRecordVo shortMessageSendRecord); + /** * 新增短信发送结果记录 * @@ -72,4 +82,12 @@ public interface ShortMessageSendRecordMapper { List selectShortMessageRecordCountByManageRouteNodeIds(@Param("manageRouteNodeIds") List manageRouteNodeIds); List getStatisticNum(FollowUpRateDto queryDto); + + /** + * 根据账单id查询短信推送记录 + * + * @param billId 账单id + * @return BillInfoDto + */ + List selectShortMessageRecordByBillId(Long billId); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java index 13f5f838..f235abc2 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -173,6 +173,15 @@ public interface SignPatientManageRouteNodeMapper { */ int updateNodeExecuteStatusByIds(@Param("manageRouteNodeIds") List manageRouteNodeIds, @Param("nodeExecuteStatus") String nodeExecuteStatus, @Param("appletStatus") String appletStatus, @Param("messageStatus") String messageStatus, @Param("officialStatus") String officialStatus, @Param("nodeFinishDate") LocalDateTime nodeFinishDate); + /** + * 修改执行状态 + * + * @param manageRouteNodeIds 节点id + * @param taskIdExt 第三方返回的任务ID + * @return int + */ + int updateTaskIdExtBuIds(@Param("manageRouteNodeIds") List manageRouteNodeIds, @Param("taskIdExt") String taskIdExt); + /** * 根据创建时间查询任务数量 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java index 55cc0c28..158b9de9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/textmessage/TextMessageMapper.java @@ -100,4 +100,11 @@ public interface TextMessageMapper { * 检查除当前记录之外是否存在同名的短信模板名称 */ int countByTextMessageNameExcludingId(@Param("id") Long id, @Param("departmentId") Long departmentId, @Param("textMessageName") String textMessageName); + + /** + * 查询短信模板信息列表 + * + * @return 短信模板信息集合 + */ + List selectTextMessages(); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/IBatchSendTaskInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/IBatchSendTaskInfoService.java new file mode 100644 index 00000000..c7eeea34 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/IBatchSendTaskInfoService.java @@ -0,0 +1,83 @@ +package com.xinelu.manage.service.batchsendtaskinfo; + +import com.aliyuncs.exceptions.ClientException; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo; +import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto; + +import java.util.List; + +/** + * 批量推送任务信息Service接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface IBatchSendTaskInfoService { + /** + * 查询批量推送任务信息 + * + * @param id 批量推送任务信息主键 + * @return 批量推送任务信息 + */ + BatchSendTaskInfo selectBatchSendTaskInfoById(Long id); + + /** + * 查询批量推送任务信息列表 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 批量推送任务信息集合 + */ + List selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 新增批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 修改批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo); + + /** + * 批量删除批量推送任务信息 + * + * @param ids 需要删除的批量推送任务信息主键集合 + * @return 结果 + */ + int deleteBatchSendTaskInfoByIds(Long[] ids); + + /** + * 删除批量推送任务信息信息 + * + * @param id 批量推送任务信息主键 + * @return 结果 + */ + int deleteBatchSendTaskInfoById(Long id); + + /** + * 患者导入 + * + * @param list 患者信息结合 + * @param isDistinct 1,表示自动去重;0表示不去重; + * @param filename 附件名称 + * @return AjaxResult + */ + AjaxResult batchSendTaskUpload(List list, Integer isDistinct, String filename, String importName); + + /** + * 创建批量推送任务 + * + * @param batchSendTaskRecordDto 任务信息 + * @return AjaxResult + * @throws ClientException + */ + AjaxResult batchSend(BatchSendTaskRecordDto batchSendTaskRecordDto) throws ClientException; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/impl/BatchSendTaskInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/impl/BatchSendTaskInfoServiceImpl.java new file mode 100644 index 00000000..5504be65 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskinfo/impl/BatchSendTaskInfoServiceImpl.java @@ -0,0 +1,502 @@ +package com.xinelu.manage.service.batchsendtaskinfo.impl; + +import com.alibaba.fastjson2.JSONObject; +import com.aliyuncs.DefaultAcsClient; +import com.aliyuncs.IAcsClient; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest; +import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; +import com.aliyuncs.exceptions.ClientException; +import com.aliyuncs.profile.DefaultProfile; +import com.aliyuncs.profile.IClientProfile; +import com.xinelu.common.config.AliYunSmsConfig; +import com.xinelu.common.config.AliYunSmsTwoConfig; +import com.xinelu.common.constant.Constants; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.entity.SysDictData; +import com.xinelu.common.core.domain.entity.SysUser; +import com.xinelu.common.enums.*; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.BracketExtractor; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.regex.RegexUtil; +import com.xinelu.manage.domain.agency.Agency; +import com.xinelu.manage.domain.batchsendtaskinfo.BatchSendTaskInfo; +import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo; +import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo; +import com.xinelu.manage.domain.dialtime.DialTime; +import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; +import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute; +import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode; +import com.xinelu.manage.dto.aiob.CreateTaskDto; +import com.xinelu.manage.dto.aiob.CustomerInfoDto; +import com.xinelu.manage.dto.aiob.ImportTaskDto; +import com.xinelu.manage.dto.aiob.RetryRuleList; +import com.xinelu.manage.dto.batchsendtaskrecordinfo.BatchSendTaskRecordDto; +import com.xinelu.manage.dto.smssend.SmsInfoDTO; +import com.xinelu.manage.mapper.agency.AgencyMapper; +import com.xinelu.manage.mapper.batchsendtaskinfo.BatchSendTaskInfoMapper; +import com.xinelu.manage.mapper.batchsendtaskrecordinfo.BatchSendTaskRecordInfoMapper; +import com.xinelu.manage.mapper.batchsendtaskvariableinfo.BatchSendTaskVariableInfoMapper; +import com.xinelu.manage.mapper.patientinfoimportmain.PatientInfoImportMainMapper; +import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper; +import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper; +import com.xinelu.manage.service.aiob.IAIOBService; +import com.xinelu.manage.service.batchsendtaskinfo.IBatchSendTaskInfoService; +import com.xinelu.system.mapper.SysUserMapper; +import com.xinelu.system.service.ISysDictTypeService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 批量推送任务信息Service业务层处理 + * + * @author zh + * @date 2026-04-26 + */ +@Slf4j +@Service +public class BatchSendTaskInfoServiceImpl implements IBatchSendTaskInfoService { + @Resource + private BatchSendTaskInfoMapper batchSendTaskInfoMapper; + @Resource + private SysUserMapper sysUserMapper; + @Resource + private AgencyMapper agencyMapper; + @Resource + private SignPatientManageRouteMapper signPatientManageRouteMapper; + @Resource + private BatchSendTaskRecordInfoMapper batchSendTaskRecordInfoMapper; + @Resource + private BatchSendTaskVariableInfoMapper batchSendTaskVariableInfoMapper; + @Resource + private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper; + @Resource + private IAIOBService aiobService; + @Resource + private PatientInfoImportMainMapper patientInfoImportMainMapper; + @Resource + private ISysDictTypeService iSysDictTypeService; + @Resource + private RegexUtil regexUtil; + @Resource + private AliYunSmsTwoConfig aliYunSmsTwoConfig; + @Value("${aiob.callBackUrl}") + private String callBackUrl; + @Resource + private AliYunSmsConfig aliyunSmsConfig; + private static final String SUCCESS = "OK"; + + /** + * 查询批量推送任务信息 + * + * @param id 批量推送任务信息主键 + * @return 批量推送任务信息 + */ + @Override + public BatchSendTaskInfo selectBatchSendTaskInfoById(Long id) { + return batchSendTaskInfoMapper.selectBatchSendTaskInfoById(id); + } + + /** + * 查询批量推送任务信息列表 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 批量推送任务信息 + */ + @Override + public List selectBatchSendTaskInfoList(BatchSendTaskInfo batchSendTaskInfo) { + return batchSendTaskInfoMapper.selectBatchSendTaskInfoList(batchSendTaskInfo); + } + + /** + * 新增批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + @Override + public int insertBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo) { + batchSendTaskInfo.setCreateTime(LocalDateTime.now()); + return batchSendTaskInfoMapper.insertBatchSendTaskInfo(batchSendTaskInfo); + } + + /** + * 修改批量推送任务信息 + * + * @param batchSendTaskInfo 批量推送任务信息 + * @return 结果 + */ + @Override + public int updateBatchSendTaskInfo(BatchSendTaskInfo batchSendTaskInfo) { + return batchSendTaskInfoMapper.updateBatchSendTaskInfo(batchSendTaskInfo); + } + + /** + * 批量删除批量推送任务信息 + * + * @param ids 需要删除的批量推送任务信息主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskInfoByIds(Long[] ids) { + return batchSendTaskInfoMapper.deleteBatchSendTaskInfoByIds(ids); + } + + /** + * 删除批量推送任务信息信息 + * + * @param id 批量推送任务信息主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskInfoById(Long id) { + return batchSendTaskInfoMapper.deleteBatchSendTaskInfoById(id); + } + + @Override + public AjaxResult batchSendTaskUpload(List list, Integer isDistinct, String filename, String importName) { + if (CollectionUtils.isEmpty(list) || list.size() == 0) { + return AjaxResult.success("导入数据列表是空!"); + } + if (Objects.isNull(isDistinct) || isDistinct == 1) { + list = list.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList()); + } + List collect = list.stream().filter(Objects::nonNull).filter(item -> StringUtils.isEmpty(item.getPatientName()) || StringUtils.isEmpty(item.getPatientPhone()) || StringUtils.isEmpty(item.getInHospitalNumber())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(collect)) { + return AjaxResult.error("用户信息不完整,姓名均不允许为空,请完善后重试;"); + } + SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId()); + Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId()); + if (Objects.isNull(agency) || StringUtils.isEmpty(agency.getNodeType())) { + return AjaxResult.error("该账号无所属医院信息,请先配置该账号所属的医院信息!"); + } + String sn = "batch_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); + for (BatchSendTaskInfo batchSendTaskInfo : list) { + batchSendTaskInfo.setSn(sn); + batchSendTaskInfo.setHospitalAgencyId(agency.getId()); + batchSendTaskInfo.setHospitalAgencyName(agency.getAgencyName()); + batchSendTaskInfo.setImportName(importName); + batchSendTaskInfo.setCreateTime(LocalDateTime.now()); + batchSendTaskInfo.setCreateBy(SecurityUtils.getUsername()); + batchSendTaskInfo.setDelFlag(0); + if (StringUtils.isBlank(batchSendTaskInfo.getDepartmentName())) { + batchSendTaskInfo.setDepartmentName("无"); + } + if (StringUtils.isBlank(batchSendTaskInfo.getTeamName())) { + batchSendTaskInfo.setTeamName("无"); + } + if (StringUtils.isNotBlank(batchSendTaskInfo.getPhysicalExaminationSummary())) { + String[] strings = BracketExtractor.extractToArray(batchSendTaskInfo.getPhysicalExaminationSummary()); + batchSendTaskInfo.setPhysicalExaminationLabel(Arrays.toString(strings)); + if (batchSendTaskInfo.getPhysicalExaminationSummary().length() > 999) { + batchSendTaskInfo.setPhysicalExaminationSummary(batchSendTaskInfo.getPhysicalExaminationSummary().substring(0, 999)); + } + } + } + batchSendTaskInfoMapper.insertBatchSendTaskInfoList(list); + return AjaxResult.success(); + } + + /** + * 创建批量推送任务 + * + * @param batchSendTaskRecordDto 任务信息 + * @return AjaxResult + * @throws ClientException + */ + @Override + public AjaxResult batchSend(BatchSendTaskRecordDto batchSendTaskRecordDto) throws ClientException { + BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo(); + batchSendTaskRecordInfo.setBatchTaskName(batchSendTaskRecordDto.getManageRouteName()); + String batchTaskNumber = null; + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) { + batchTaskNumber = "hkqdermyy_message_batch" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); + batchSendTaskRecordInfo.setTemplateId(batchSendTaskRecordDto.getMessageTemplateId().toString()); + batchSendTaskRecordInfo.setTemplateName(batchSendTaskRecordDto.getMessageTemplateName()); + batchSendTaskRecordInfo.setRobotPublishId(batchSendTaskRecordDto.getMessageTemplateCode()); + } + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) { + batchTaskNumber = "hkqdermyy_phone_batch" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); + batchSendTaskRecordInfo.setTemplateId(batchSendTaskRecordDto.getPhoneTemplateId()); + batchSendTaskRecordInfo.setTemplateName(batchSendTaskRecordDto.getPhoneTemplateName()); + batchSendTaskRecordInfo.setRobotPublishId(batchSendTaskRecordInfo.getRobotPublishId()); + } + batchSendTaskRecordInfo.setBatchTaskNumber(batchTaskNumber); + batchSendTaskRecordInfo.setTaskExecuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo()); + batchSendTaskRecordInfo.setNodePlanTime(batchSendTaskRecordDto.getNodePlanTime()); + batchSendTaskRecordInfo.setCreateBy(SecurityUtils.getUsername()); + batchSendTaskRecordInfo.setBatchTaskSource(batchSendTaskRecordDto.getBatchTaskSource()); + batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now()); + int insertBatchSendTaskRecord = batchSendTaskRecordInfoMapper.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo); + if (insertBatchSendTaskRecord <= 0) { + log.info("新增批量推送任务记录失败"); + return AjaxResult.error("上传任务失败!请联系管理员!"); + } + //保存变量 + if (Objects.nonNull(batchSendTaskRecordDto.getVars())) { + List batchSendTaskVariableInfos = new ArrayList<>(); + Set keys = batchSendTaskRecordDto.getVars().keySet(); + for (String key : keys) { + BatchSendTaskVariableInfo batchSendTaskVariableInfo = new BatchSendTaskVariableInfo(); + batchSendTaskVariableInfo.setBatchSendTaskRecordId(batchSendTaskRecordInfo.getId()); + batchSendTaskVariableInfo.setVariable(key); + batchSendTaskVariableInfo.setVariableAttribute(batchSendTaskRecordDto.getVars().get(key)); + batchSendTaskVariableInfo.setCreateBy(SecurityUtils.getUsername()); + batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now()); + batchSendTaskVariableInfos.add(batchSendTaskVariableInfo); + } + if (CollectionUtils.isNotEmpty(batchSendTaskVariableInfos)) { + batchSendTaskVariableInfoMapper.insertBatchSendTaskVariableInfos(batchSendTaskVariableInfos); + } + } + List signPatientManageRoutes = new ArrayList<>(); + List signPatientManageRouteNodes = new ArrayList<>(); + List shortMessageSendRecords = new ArrayList<>(); + for (BatchSendTaskInfo batchSendTaskInfo : batchSendTaskRecordDto.getList()) { + //节点主表 + SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute(); + signPatientManageRoute.setRouteName(batchSendTaskRecordDto.getManageRouteName()); + signPatientManageRoute.setTaskCreateType(TaskCreateTypeEnum.MANUAL_CREATE.getInfo()); + signPatientManageRoute.setCreateBy(SecurityUtils.getUsername()); + signPatientManageRoute.setCreateTime(LocalDateTime.now()); + signPatientManageRoute.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo()); + signPatientManageRoute.setPatientName(batchSendTaskInfo.getPatientName()); + signPatientManageRoute.setBatchSendTaskRecordId(batchSendTaskRecordInfo.getId()); + signPatientManageRoute.setBatchSendTaskId(batchSendTaskInfo.getId()); + signPatientManageRoutes.add(signPatientManageRoute); + //节点node表 + SignPatientManageRouteNode signPatientManageRouteNode = new SignPatientManageRouteNode(); + signPatientManageRouteNode.setManageRouteName(batchSendTaskRecordDto.getManageRouteName()); + signPatientManageRouteNode.setSn(batchTaskNumber); + signPatientManageRouteNode.setDialStatus(DialStatusEnum.NODIALED.getInfo()); + signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo()); + signPatientManageRouteNode.setNodePlanTime(batchSendTaskRecordDto.getNodePlanTime()); + signPatientManageRouteNode.setTaskNodeType(TaskNodeTypeEnum.PHONE_OUTBOUND.getInfo()); + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) { + signPatientManageRouteNode.setPhonePushSign(1); + signPatientManageRouteNode.setScriptInfoId(Objects.isNull(batchSendTaskRecordDto.getScriptInfoId()) ? null : batchSendTaskRecordDto.getScriptInfoId()); + signPatientManageRouteNode.setRobotPublishId(batchSendTaskRecordDto.getRobotPublishId()); + signPatientManageRouteNode.setPhoneTemplateId(Objects.isNull(batchSendTaskRecordDto.getPhoneTemplateId()) ? null : batchSendTaskRecordDto.getPhoneTemplateId()); + signPatientManageRouteNode.setPhoneTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneTemplateName()) ? null : batchSendTaskRecordDto.getPhoneTemplateName()); + signPatientManageRouteNode.setPhoneNodeContent(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneNodeContent()) ? null : batchSendTaskRecordDto.getPhoneNodeContent()); + signPatientManageRouteNode.setPhoneRedialTimes(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneRedialTimes()) ? null : batchSendTaskRecordDto.getPhoneRedialTimes()); + signPatientManageRouteNode.setPhoneTimeInterval(Objects.isNull(batchSendTaskRecordDto.getPhoneTimeInterval()) ? null : batchSendTaskRecordDto.getPhoneTimeInterval()); + signPatientManageRouteNode.setPhoneMessageRemind(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneMessageRemind()) ? null : batchSendTaskRecordDto.getPhoneMessageRemind()); + signPatientManageRouteNode.setPhoneMessageTemplateId(Objects.isNull(batchSendTaskRecordDto.getPhoneMessageTemplateId()) ? null : batchSendTaskRecordDto.getPhoneMessageTemplateId()); + signPatientManageRouteNode.setPhoneMessageTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneMessageTemplateName()) ? null : batchSendTaskRecordDto.getPhoneMessageTemplateName()); + signPatientManageRouteNode.setPhoneDialMethod(PhoneDialMethodEnum.AI.getInfo()); + } + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) { + signPatientManageRouteNode.setMessagePushSign(1); + signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(batchSendTaskRecordDto.getMessageTemplateId()) ? null : batchSendTaskRecordDto.getMessageTemplateId()); + signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(batchSendTaskRecordDto.getMessageTemplateCode()) ? null : batchSendTaskRecordDto.getMessageTemplateCode()); + signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(batchSendTaskRecordDto.getMessageTemplateName()) ? null : batchSendTaskRecordDto.getMessageTemplateName()); + signPatientManageRouteNode.setMessageNodeContent(batchSendTaskRecordDto.getMessageNodeContent()); + + } + signPatientManageRouteNode.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo()); + signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTING.getInfo()); + signPatientManageRouteNode.setDelFlag(0); + signPatientManageRouteNode.setCreateBy(SecurityUtils.getUsername()); + signPatientManageRouteNode.setCreateTime(LocalDateTime.now()); + signPatientManageRouteNodes.add(signPatientManageRouteNode); + //短信发送记录表 + ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord(); + shortMessageSendRecord.setMessageType(ShortMessageTypeEnum.COMMON.getInfo()); + shortMessageSendRecord.setPatientPhone(batchSendTaskInfo.getPatientPhone()); + shortMessageSendRecord.setSendTime(LocalDateTime.now()); + shortMessageSendRecord.setMessageTemplateId(batchSendTaskRecordDto.getMessageTemplateCode()); + shortMessageSendRecord.setMessageNodeContent(batchSendTaskRecordDto.getMessageNodeContent()); + shortMessageSendRecord.setCreateTime(LocalDateTime.now()); + shortMessageSendRecords.add(shortMessageSendRecord); + } + signPatientManageRouteMapper.insertBatch(signPatientManageRoutes); + for (int i = 0; i < signPatientManageRouteNodes.size(); i++) { + signPatientManageRouteNodes.get(i).setManageRouteId(signPatientManageRoutes.get(i).getId()); + } + signPatientManageRouteNodeMapper.insertBatch(signPatientManageRouteNodes); + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.TELEPHONE.getInfo())) { + SysUser sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId()); + Agency agency = agencyMapper.selectAgencyById(sysUser.getHospitalAgencyId()); + DialTime dialTime = patientInfoImportMainMapper.selectDialTimeById(agency.getId()); + LocalTime localStartTime = null; + LocalTime localEndTime = null; + LocalTime dateStartTime; + LocalTime dateEndTime; + if (Objects.nonNull(dialTime)) { + localStartTime = LocalTime.parse(dialTime.getDialStartTime()); + localEndTime = LocalTime.parse(dialTime.getDialEndTime()); + } else { + localStartTime = LocalTime.parse("08:00"); + localEndTime = LocalTime.parse("19:00"); + } + List sysDictDataList = iSysDictTypeService.selectDictDataByType(Constants.DIAL_TIME); + if (CollectionUtils.isEmpty(sysDictDataList) || sysDictDataList.size() != 2) { + dateStartTime = LocalTime.parse("08:00"); + dateEndTime = LocalTime.parse("19:00"); + } else { + dateStartTime = LocalTime.parse(sysDictDataList.get(0).getDictValue()); + dateEndTime = LocalTime.parse(sysDictDataList.get(1).getDictValue()); + } + if (dateStartTime.isAfter(localStartTime)) { + localStartTime = dateStartTime; + } + if (dateEndTime.isBefore(localEndTime)) { + localEndTime = dateEndTime; + } + log.info("开始创建批量电话推送任务---------------"); + CreateTaskDto createTaskDto = new CreateTaskDto(); + //临时重复测试用, + String taskName = batchTaskNumber + "-" + batchSendTaskRecordDto.getPhoneTemplateName(); + log.info("任务名称:" + taskName); + createTaskDto.setTaskName(taskName); + createTaskDto.setRobotId(batchSendTaskRecordDto.getRobotPublishId()); + createTaskDto.setDialStartDate(batchSendTaskRecordDto.getNodePlanTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + //默认为空,表示不限制终止时间 + //createTaskDto.setDialEndDate(batchSendTaskRecordDto.getNodePlanTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + createTaskDto.setForbidDialDate(Arrays.asList(99)); + List retryRuleLists = new ArrayList<>(); + RetryRuleList retryRuleList = new RetryRuleList(); + retryRuleList.setForbidDialStartTime("11:50"); + retryRuleList.setForbidDialEndTime("13:30"); + createTaskDto.setForbidDialTime(retryRuleLists); + createTaskDto.setRetryTimes(StringUtils.isBlank(batchSendTaskRecordDto.getPhoneRedialTimes()) ? 0 : PhoneRedialTimesEnum.getValueByInfo(batchSendTaskRecordDto.getPhoneRedialTimes()).getValue()); + createTaskDto.setRetryInterval(batchSendTaskRecordDto.getPhoneTimeInterval()); + createTaskDto.setNumTypeFilterList(Arrays.asList(1, 2)); + createTaskDto.setTaskDataCallback(true); + createTaskDto.setCallBackUrl(callBackUrl + "/taskCallBack"); + createTaskDto.setDialStartTime(localStartTime.format(DateTimeFormatter.ofPattern("HH:mm"))); + createTaskDto.setDialEndTime(localEndTime.format(DateTimeFormatter.ofPattern("HH:mm"))); + //1.创建任务 + String taskId = aiobService.createTask(createTaskDto); + //2.任务状态变更 + aiobService.updateTaskStatus(taskId, 2); + //3.导入名单 + List customerInfoList = new ArrayList<>(); + signPatientManageRouteNodes.forEach(node -> { + CustomerInfoDto customerInfoDto = new CustomerInfoDto(); + customerInfoDto.setExtJson(node.getId() + ""); + SignPatientManageRoute signPatientManageRoute = signPatientManageRoutes.stream().filter(Objects::nonNull).filter(item -> item.getId().equals(node.getManageRouteId())).findFirst().orElse(new SignPatientManageRoute()); + BatchSendTaskInfo batchSendTaskInfo = batchSendTaskRecordDto.getList().stream().filter(Objects::nonNull).filter(item -> item.getId().equals(signPatientManageRoute.getBatchSendTaskId())).findFirst().orElse(new BatchSendTaskInfo()); + //校验手机号 + if (StringUtils.isNotBlank(batchSendTaskInfo.getPatientPhone())) { + if (regexUtil.regexPhone(batchSendTaskInfo.getPatientPhone())) { + customerInfoDto.setMobile(batchSendTaskInfo.getPatientPhone()); + // 处理变量 + JSONObject jsonObject = new JSONObject(); + if (Objects.nonNull(batchSendTaskRecordDto.getVars())) { + Set keys = batchSendTaskRecordDto.getVars().keySet(); + keys.forEach(variable -> { + jsonObject.fluentPut(variable, ObjectUtils.isEmpty(batchSendTaskRecordDto.getVars().get(variable)) ? "" : batchSendTaskRecordDto.getVars().get(variable)); + }); + } + customerInfoDto.setVar(jsonObject); + customerInfoList.add(customerInfoDto); + } + } + }); + //3.1上传名单 + log.info("任务导入客户名单......"); + ImportTaskDto importTaskDto = new ImportTaskDto(); + importTaskDto.setTaskId(taskId); + importTaskDto.setSecretType(2); + importTaskDto.setCustomerInfoList(customerInfoList); + aiobService.importTask(importTaskDto); + //根据机器人id查询智能外呼系统的任务id + log.info("创建批量电话推送任务执行完成......"); + return AjaxResult.success("创建批量电话推送任务执行完成"); + } + if (batchSendTaskRecordDto.getBatchTaskSource().equals(BillSourceEnum.MESSAGE.getInfo())) { + SmsInfoDTO smsInfoDTO = new SmsInfoDTO(); + List phones = batchSendTaskRecordDto.getList().stream().filter(Objects::nonNull).map(BatchSendTaskInfo::getPatientPhone).distinct().collect(Collectors.toList()); + String phoneString = String.join(",", phones); + smsInfoDTO.setPhoneNumbers(phoneString); + smsInfoDTO.setSignName(aliYunSmsTwoConfig.getSignName()); + // 处理变量 + JSONObject jsonObject = new JSONObject(); + if (Objects.nonNull(batchSendTaskRecordDto.getVars())) { + Set keys = batchSendTaskRecordDto.getVars().keySet(); + keys.forEach(variable -> { + jsonObject.fluentPut(variable, ObjectUtils.isEmpty(batchSendTaskRecordDto.getVars().get(variable)) ? "" : batchSendTaskRecordDto.getVars().get(variable)); + }); + } + smsInfoDTO.setTemplateParam(jsonObject); + // 根据模版id发送 + smsInfoDTO.setTemplateCode(batchSendTaskRecordDto.getMessageTemplateCode()); + Boolean aBoolean = sendSms(smsInfoDTO); + if (!aBoolean) { + return AjaxResult.error("短信发送失败"); + } + for (int i = 0; i < signPatientManageRouteNodes.size(); i++) { + shortMessageSendRecords.get(i).setManageRouteNodeId(signPatientManageRouteNodes.get(i).getId()); + shortMessageSendRecords.get(i).setErrorCode(0L); + shortMessageSendRecords.get(i).setErrorStatus(ErrorStatusEnum.success.getValue()); + } + //发送记录批量 + log.info("创建批量电信推送任务执行完成......"); + return AjaxResult.success("短信发送成功"); + } + return AjaxResult.success(); + } + + /** + * 单{code}替换值,发送短信 + */ + public Boolean sendSms(SmsInfoDTO smsInfoDTO) throws ClientException, ServiceException { + try { + // 短信发送参数非空性判断 + if (ObjectUtils.isEmpty(smsInfoDTO)) { + throw new ServiceException("短信发送参数不能为空!"); + } + if (StringUtils.isBlank(smsInfoDTO.getPhoneNumbers())) { + throw new ServiceException("待发送手机号不能为空!"); + } + if (StringUtils.isBlank(smsInfoDTO.getSignName())) { + throw new ServiceException("短信签名不能为空!"); + } + if (StringUtils.isBlank(smsInfoDTO.getTemplateCode())) { + throw new ServiceException("短信模板Code不能为空!"); + } + + // 设置系统的默认连接超时时间和读取超时时间 + System.setProperty("sun.net.client.defaultConnectTimeout", "10000"); + System.setProperty("sun.net.client.defaultReadTimeout", "10000"); + + // 初始化acsClient,暂不支持region化 + IClientProfile profile = DefaultProfile.getProfile(aliyunSmsConfig.getRegionId(), aliyunSmsConfig.getAccessKeyId(), aliyunSmsConfig.getAccessKeySecret()); + DefaultProfile.addEndpoint(aliyunSmsConfig.getRegionId(), aliyunSmsConfig.getProduct(), aliyunSmsConfig.getDomain()); + IAcsClient acsClient = new DefaultAcsClient(profile); + + // 组装请求对象 + SendSmsRequest request = new SendSmsRequest(); + request.setPhoneNumbers(smsInfoDTO.getPhoneNumbers()); + request.setSignName(smsInfoDTO.getSignName()); + request.setTemplateCode(smsInfoDTO.getTemplateCode()); + request.setTemplateParam(smsInfoDTO.getTemplateParam().toJSONString()); + + SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request); + // 判断响应的结果 + if (!SUCCESS.equals(sendSmsResponse.getCode())) { + SmsErrorCodeEnum errorCode = SmsErrorCodeEnum.getMsgByCode(sendSmsResponse.getCode()); + log.error("短信发送失败,错误码:{},错误信息:{}", sendSmsResponse.getCode(), errorCode.getMessage()); + return false; + } + log.info("短信发送成功:code:{}", sendSmsResponse.getCode()); + return true; + } catch (ClientException e) { + log.error("发送短信出现异常,异常信息:{}", e.getMessage()); + throw e; + } + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/IBatchSendTaskRecordInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/IBatchSendTaskRecordInfoService.java new file mode 100644 index 00000000..266c45a7 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/IBatchSendTaskRecordInfoService.java @@ -0,0 +1,70 @@ +package com.xinelu.manage.service.batchsendtaskrecordinfo; + +import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo; + +import java.util.List; + +/** + * 批量推送任务记录Service接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface IBatchSendTaskRecordInfoService { + + /** + * 查询批量推送任务记录 + * + * @param id 批量推送任务记录主键 + * @return 批量推送任务记录 + */ + BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id); + + /** + * 查询批量推送任务记录列表 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 批量推送任务记录集合 + */ + List selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 新增批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 修改批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo); + + /** + * 批量删除批量推送任务记录 + * + * @param ids 需要删除的批量推送任务记录主键集合 + * @return 结果 + */ + int deleteBatchSendTaskRecordInfoByIds(Long[] ids); + + /** + * 删除批量推送任务记录信息 + * + * @param id 批量推送任务记录主键 + * @return 结果 + */ + int deleteBatchSendTaskRecordInfoById(Long id); + + /** + * 获取短信或电话模板 + * + * @param batchTaskSource 短信或电话 + * @return BatchSendTaskRecordInfo + */ + List getTemplate(String batchTaskSource); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/impl/BatchSendTaskRecordInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/impl/BatchSendTaskRecordInfoServiceImpl.java new file mode 100644 index 00000000..3ef1075b --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskrecordinfo/impl/BatchSendTaskRecordInfoServiceImpl.java @@ -0,0 +1,137 @@ +package com.xinelu.manage.service.batchsendtaskrecordinfo.impl; + +import com.xinelu.common.annotation.DataScope; +import com.xinelu.common.enums.BillSourceEnum; +import com.xinelu.manage.domain.batchsendtaskrecordinfo.BatchSendTaskRecordInfo; +import com.xinelu.manage.domain.scriptInfo.ScriptInfo; +import com.xinelu.manage.mapper.batchsendtaskrecordinfo.BatchSendTaskRecordInfoMapper; +import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper; +import com.xinelu.manage.mapper.textmessage.TextMessageMapper; +import com.xinelu.manage.service.batchsendtaskrecordinfo.IBatchSendTaskRecordInfoService; +import com.xinelu.manage.vo.textmessage.TextMessageVO; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * 批量推送任务记录Service业务层处理 + * + * @author zh + * @date 2026-04-26 + */ +@Service +public class BatchSendTaskRecordInfoServiceImpl implements IBatchSendTaskRecordInfoService { + @Resource + private BatchSendTaskRecordInfoMapper batchSendTaskRecordInfoMapper; + @Resource + private ScriptInfoMapper scriptInfoMapper; + @Resource + private TextMessageMapper textMessageMapper; + + /** + * 查询批量推送任务记录 + * + * @param id 批量推送任务记录主键 + * @return 批量推送任务记录 + */ + @Override + public BatchSendTaskRecordInfo selectBatchSendTaskRecordInfoById(Long id) { + return batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordInfoById(id); + } + + /** + * 查询批量推送任务记录列表 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 批量推送任务记录 + */ + @Override + public List selectBatchSendTaskRecordInfoList(BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + return batchSendTaskRecordInfoMapper.selectBatchSendTaskRecordInfoList(batchSendTaskRecordInfo); + } + + /** + * 新增批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + @Override + public int insertBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + batchSendTaskRecordInfo.setCreateTime(LocalDateTime.now()); + return batchSendTaskRecordInfoMapper.insertBatchSendTaskRecordInfo(batchSendTaskRecordInfo); + } + + /** + * 修改批量推送任务记录 + * + * @param batchSendTaskRecordInfo 批量推送任务记录 + * @return 结果 + */ + @Override + public int updateBatchSendTaskRecordInfo(BatchSendTaskRecordInfo batchSendTaskRecordInfo) { + return batchSendTaskRecordInfoMapper.updateBatchSendTaskRecordInfo(batchSendTaskRecordInfo); + } + + /** + * 批量删除批量推送任务记录 + * + * @param ids 需要删除的批量推送任务记录主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskRecordInfoByIds(Long[] ids) { + return batchSendTaskRecordInfoMapper.deleteBatchSendTaskRecordInfoByIds(ids); + } + + /** + * 删除批量推送任务记录信息 + * + * @param id 批量推送任务记录主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskRecordInfoById(Long id) { + return batchSendTaskRecordInfoMapper.deleteBatchSendTaskRecordInfoById(id); + } + + /** + * 获取短信或电话模板 + * + * @param batchTaskSource 短信或电话 + * @return BatchSendTaskRecordInfo + */ + @DataScope(agencyAlias = "d") + @Override + public List getTemplate(String batchTaskSource) { + if (StringUtils.isBlank(batchTaskSource)) { + return new ArrayList<>(); + } + List batchSendTaskRecordInfos = new ArrayList<>(); + if (batchTaskSource.equals(BillSourceEnum.TELEPHONE.getInfo())) { + List scriptInfos = scriptInfoMapper.selectScriptInfos(); + for (ScriptInfo scriptInfo : scriptInfos) { + BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo(); + batchSendTaskRecordInfo.setTemplateId(scriptInfo.getScriptId()); + batchSendTaskRecordInfo.setRobotPublishId(scriptInfo.getRobotPublishId()); + batchSendTaskRecordInfo.setTemplateName(scriptInfo.getScriptName()); + batchSendTaskRecordInfos.add(batchSendTaskRecordInfo); + } + } + if (batchTaskSource.equals(BillSourceEnum.MESSAGE.getInfo())) { + List textMessageVOS = textMessageMapper.selectTextMessages(); + for (TextMessageVO textMessageVO : textMessageVOS) { + BatchSendTaskRecordInfo batchSendTaskRecordInfo = new BatchSendTaskRecordInfo(); + batchSendTaskRecordInfo.setTemplateId(textMessageVO.getId().toString()); + batchSendTaskRecordInfo.setRobotPublishId(textMessageVO.getTextMessageId()); + batchSendTaskRecordInfo.setTemplateName(textMessageVO.getTextMessageName()); + batchSendTaskRecordInfos.add(batchSendTaskRecordInfo); + } + } + return batchSendTaskRecordInfos; + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/IBatchSendTaskVariableInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/IBatchSendTaskVariableInfoService.java new file mode 100644 index 00000000..00be8a0d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/IBatchSendTaskVariableInfoService.java @@ -0,0 +1,61 @@ +package com.xinelu.manage.service.batchsendtaskvariableinfo; + +import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo; + +import java.util.List; + +/** + * 批量推送任务记录变量属性Service接口 + * + * @author zh + * @date 2026-04-26 + */ +public interface IBatchSendTaskVariableInfoService { + /** + * 查询批量推送任务记录变量属性 + * + * @param id 批量推送任务记录变量属性主键 + * @return 批量推送任务记录变量属性 + */ + BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id); + + /** + * 查询批量推送任务记录变量属性列表 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 批量推送任务记录变量属性集合 + */ + List selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 新增批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 修改批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo); + + /** + * 批量删除批量推送任务记录变量属性 + * + * @param ids 需要删除的批量推送任务记录变量属性主键集合 + * @return 结果 + */ + int deleteBatchSendTaskVariableInfoByIds(Long[] ids); + + /** + * 删除批量推送任务记录变量属性信息 + * + * @param id 批量推送任务记录变量属性主键 + * @return 结果 + */ + int deleteBatchSendTaskVariableInfoById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/impl/BatchSendTaskVariableInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/impl/BatchSendTaskVariableInfoServiceImpl.java new file mode 100644 index 00000000..f7057fdf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/batchsendtaskvariableinfo/impl/BatchSendTaskVariableInfoServiceImpl.java @@ -0,0 +1,89 @@ +package com.xinelu.manage.service.batchsendtaskvariableinfo.impl; + +import com.xinelu.manage.domain.batchsendtaskvariableinfo.BatchSendTaskVariableInfo; +import com.xinelu.manage.mapper.batchsendtaskvariableinfo.BatchSendTaskVariableInfoMapper; +import com.xinelu.manage.service.batchsendtaskvariableinfo.IBatchSendTaskVariableInfoService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.List; + +/** + * 批量推送任务记录变量属性Service业务层处理 + * + * @author zh + * @date 2026-04-26 + */ +@Service +public class BatchSendTaskVariableInfoServiceImpl implements IBatchSendTaskVariableInfoService { + @Resource + private BatchSendTaskVariableInfoMapper batchSendTaskVariableInfoMapper; + + /** + * 查询批量推送任务记录变量属性 + * + * @param id 批量推送任务记录变量属性主键 + * @return 批量推送任务记录变量属性 + */ + @Override + public BatchSendTaskVariableInfo selectBatchSendTaskVariableInfoById(Long id) { + return batchSendTaskVariableInfoMapper.selectBatchSendTaskVariableInfoById(id); + } + + /** + * 查询批量推送任务记录变量属性列表 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 批量推送任务记录变量属性 + */ + @Override + public List selectBatchSendTaskVariableInfoList(BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + return batchSendTaskVariableInfoMapper.selectBatchSendTaskVariableInfoList(batchSendTaskVariableInfo); + } + + /** + * 新增批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + @Override + public int insertBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + batchSendTaskVariableInfo.setCreateTime(LocalDateTime.now()); + return batchSendTaskVariableInfoMapper.insertBatchSendTaskVariableInfo(batchSendTaskVariableInfo); + } + + /** + * 修改批量推送任务记录变量属性 + * + * @param batchSendTaskVariableInfo 批量推送任务记录变量属性 + * @return 结果 + */ + @Override + public int updateBatchSendTaskVariableInfo(BatchSendTaskVariableInfo batchSendTaskVariableInfo) { + return batchSendTaskVariableInfoMapper.updateBatchSendTaskVariableInfo(batchSendTaskVariableInfo); + } + + /** + * 批量删除批量推送任务记录变量属性 + * + * @param ids 需要删除的批量推送任务记录变量属性主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskVariableInfoByIds(Long[] ids) { + return batchSendTaskVariableInfoMapper.deleteBatchSendTaskVariableInfoByIds(ids); + } + + /** + * 删除批量推送任务记录变量属性信息 + * + * @param id 批量推送任务记录变量属性主键 + * @return 结果 + */ + @Override + public int deleteBatchSendTaskVariableInfoById(Long id) { + return batchSendTaskVariableInfoMapper.deleteBatchSendTaskVariableInfoById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/IBillInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/IBillInfoService.java new file mode 100644 index 00000000..532efef4 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/IBillInfoService.java @@ -0,0 +1,70 @@ +package com.xinelu.manage.service.billinfo; + +import com.xinelu.manage.domain.billinfo.BillInfo; +import com.xinelu.manage.dto.billinfo.BillInfoDto; + +import java.util.List; + +/** + * 账单信息Service接口 + * + * @author zh + * @date 2026-04-16 + */ +public interface IBillInfoService { + /** + * 查询账单信息 + * + * @param id 账单信息主键 + * @return 账单信息 + */ + BillInfo selectBillInfoById(Long id); + + /** + * 查询账单信息列表 + * + * @param billInfo 账单信息 + * @return 账单信息集合 + */ + List selectBillInfoList(BillInfo billInfo); + + /** + * 新增账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + int insertBillInfo(BillInfo billInfo); + + /** + * 修改账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + int updateBillInfo(BillInfo billInfo); + + /** + * 批量删除账单信息 + * + * @param ids 需要删除的账单信息主键集合 + * @return 结果 + */ + int deleteBillInfoByIds(Long[] ids); + + /** + * 删除账单信息信息 + * + * @param id 账单信息主键 + * @return 结果 + */ + int deleteBillInfoById(Long id); + + /** + * 账单明细信息列表 + * + * @param code 账单编号 + * @return BillInfoDto + */ + List selectBillDetails(String code); +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/impl/BillInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/impl/BillInfoServiceImpl.java new file mode 100644 index 00000000..bbd6c6e6 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/billinfo/impl/BillInfoServiceImpl.java @@ -0,0 +1,130 @@ +package com.xinelu.manage.service.billinfo.impl; + +import com.xinelu.common.enums.BillSourceEnum; +import com.xinelu.manage.domain.billinfo.BillInfo; +import com.xinelu.manage.dto.billinfo.BillInfoDto; +import com.xinelu.manage.mapper.billinfo.BillInfoMapper; +import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper; +import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper; +import com.xinelu.manage.service.billinfo.IBillInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * 账单信息Service业务层处理 + * + * @author zh + * @date 2026-04-16 + */ +@Service +public class BillInfoServiceImpl implements IBillInfoService { + @Resource + private BillInfoMapper billInfoMapper; + @Resource + private PhoneDialRecordMapper phoneDialRecordMapper; + @Resource + private ShortMessageSendRecordMapper shortMessageSendRecordMapper; + + /** + * 查询账单信息 + * + * @param id 账单信息主键 + * @return 账单信息 + */ + @Override + public BillInfo selectBillInfoById(Long id) { + return billInfoMapper.selectBillInfoById(id); + } + + /** + * 查询账单信息列表 + * + * @param billInfo 账单信息 + * @return 账单信息 + */ + @Override + public List selectBillInfoList(BillInfo billInfo) { + return billInfoMapper.selectBillInfoList(billInfo); + } + + /** + * 新增账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + @Override + public int insertBillInfo(BillInfo billInfo) { + billInfo.setCreateTime(LocalDateTime.now()); + return billInfoMapper.insertBillInfo(billInfo); + } + + /** + * 修改账单信息 + * + * @param billInfo 账单信息 + * @return 结果 + */ + @Override + public int updateBillInfo(BillInfo billInfo) { + return billInfoMapper.updateBillInfo(billInfo); + } + + /** + * 批量删除账单信息 + * + * @param ids 需要删除的账单信息主键 + * @return 结果 + */ + @Override + public int deleteBillInfoByIds(Long[] ids) { + return billInfoMapper.deleteBillInfoByIds(ids); + } + + /** + * 删除账单信息信息 + * + * @param id 账单信息主键 + * @return 结果 + */ + @Override + public int deleteBillInfoById(Long id) { + return billInfoMapper.deleteBillInfoById(id); + } + + /** + * 账单明细信息列表 + * + * @param code 账单编号 + * @return BillInfoDto + */ + @Override + public List selectBillDetails(String code) { + //查询总账单信息 + BillInfo billInfo = billInfoMapper.selectBillInfoByCode(code); + if (Objects.isNull(billInfo) || StringUtils.isBlank(billInfo.getBillSource())) { + return new ArrayList<>(); + } + BillInfoDto billInfoDto = new BillInfoDto(); + billInfoDto.setPatientName("总计"); + billInfoDto.setPushLength(billInfo.getPushLength()); + billInfoDto.setExpense(billInfo.getBillExpense()); + List bills = new ArrayList<>(); + //根据账单查询数据 + if (billInfo.getBillSource().equals(BillSourceEnum.TELEPHONE.getInfo())) { + bills = phoneDialRecordMapper.selectPhoneDialStatisticByBillId(billInfo.getId()); + bills.add(billInfoDto); + } + if (billInfo.getBillSource().equals(BillSourceEnum.MESSAGE.getInfo())) { + bills = shortMessageSendRecordMapper.selectShortMessageRecordByBillId(billInfo.getId()); + bills.add(billInfoDto); + } + return bills; + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java index 3304caaa..ed8a30b8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/IPhoneDialRecordService.java @@ -1,6 +1,7 @@ package com.xinelu.manage.service.phonedialrecord; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; +import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; import java.util.List; @@ -25,7 +26,7 @@ public interface IPhoneDialRecordService { * @param phoneDialRecord 电话拨打记录 * @return 电话拨打记录集合 */ - List selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord); + List selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord); /** * 新增电话拨打记录 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java index 8c9fe2c8..b808350e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/phonedialrecord/impl/PhoneDialRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.xinelu.manage.service.phonedialrecord.impl; import com.xinelu.manage.domain.phonedialrecord.PhoneDialRecord; import com.xinelu.manage.mapper.phonedialrecord.PhoneDialRecordMapper; import com.xinelu.manage.service.phonedialrecord.IPhoneDialRecordService; +import com.xinelu.manage.vo.phonedialrecord.BillPhoneDialVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -38,8 +39,8 @@ public class PhoneDialRecordServiceImpl implements IPhoneDialRecordService { * @return 电话拨打记录 */ @Override - public List selectPhoneDialRecordList(PhoneDialRecord phoneDialRecord) { - return phoneDialRecordMapper.selectPhoneDialRecordList(phoneDialRecord); + public List selectPhoneDialRecordList(BillPhoneDialVo phoneDialRecord) { + return phoneDialRecordMapper.selectPhoneDialRecords(phoneDialRecord); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java index d0ef4483..6963629a 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java @@ -78,4 +78,9 @@ public interface IScriptInfoService { * 新增话术节点 */ AjaxResult updateScriptEdgeNode(ScriptVO scriptVO); + + /** + * 查询话术变量 + */ + AjaxResult selectScriptVariable(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java index 8b9d18ee..e3fc9946 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java @@ -8,7 +8,6 @@ import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.MimeTypeUtils; -import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge; import com.xinelu.manage.dto.script.ScriptInfoDto; @@ -19,17 +18,16 @@ import com.xinelu.manage.service.scriptInfo.IScriptInfoService; import com.xinelu.manage.vo.scriptInfo.Edge; import com.xinelu.manage.vo.scriptInfo.Node; import com.xinelu.manage.vo.scriptInfo.ScriptVO; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import javax.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.*; + /** * 话术信息Service业务层处理 * @@ -292,4 +290,18 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { } return AjaxResult.success(); } + + @Override + public AjaxResult selectScriptVariable(Long id) { + ScriptInfo scriptInfo = scriptInfoMapper.selectScriptInfoById(id); + if (Objects.isNull(scriptInfo) || StringUtils.isBlank(scriptInfo.getVariables())) { + return AjaxResult.success(); + } + List variables = Arrays.asList(scriptInfo.getVariables().split("\\|")); + Map variablehMap = new HashMap<>(); + for (String variable : variables) { + variablehMap.put(variable, null); + } + return AjaxResult.success(variablehMap); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java index a9a32ab0..b5e54689 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/IShortMessageSendRecordService.java @@ -1,6 +1,7 @@ package com.xinelu.manage.service.shortmessagesendrecord; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; +import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import java.util.List; @@ -25,7 +26,7 @@ public interface IShortMessageSendRecordService { * @param shortMessageSendRecord 短信发送结果记录 * @return 短信发送结果记录集合 */ - List selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord); + List selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord); /** * 新增短信发送结果记录 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java index 42ea8463..f5aa4375 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/shortmessagesendrecord/impl/ShortMessageSendRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.xinelu.manage.service.shortmessagesendrecord.impl; import com.xinelu.manage.domain.shortmessagesendrecord.ShortMessageSendRecord; import com.xinelu.manage.mapper.shortmessagesendrecord.ShortMessageSendRecordMapper; import com.xinelu.manage.service.shortmessagesendrecord.IShortMessageSendRecordService; +import com.xinelu.manage.vo.shortmessagesendrecord.ShortMessageSendRecordVo; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -38,8 +39,8 @@ public class ShortMessageSendRecordServiceImpl implements IShortMessageSendRecor * @return 短信发送结果记录 */ @Override - public List selectShortMessageSendRecordList(ShortMessageSendRecord shortMessageSendRecord) { - return shortMessageSendRecordMapper.selectShortMessageSendRecordList(shortMessageSendRecord); + public List selectShortMessageSendRecordList(ShortMessageSendRecordVo shortMessageSendRecord) { + return shortMessageSendRecordMapper.selectShortMessageSendRecords(shortMessageSendRecord); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java index 00b19817..e4da3fb7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -200,7 +200,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout SignPatientManageRouteNodeDto signPatientManageRouteNode = new SignPatientManageRouteNodeDto(); signPatientManageRouteNode.setNodePlanTime(LocalDateTime.now()); List signPatientManageRouteNodes = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode); - if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 100) { + if (CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && signPatientManageRouteNodes.size() >= 1000) { return AjaxResult.error("今日创建任务已达上线,请改日创建任务!"); } //获取患者信息 @@ -208,10 +208,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout PatientInfoDto patientInfo = new PatientInfoDto(); patientInfo.setSn(signPatientManageRoute.getSn()); listPatient = patientInfoMapper.getPatientList(patientInfo); - if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 100) { + if (CollectionUtils.isNotEmpty(listPatient) && listPatient.size() > 1000) { return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!"); } - if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 100) { + if (CollectionUtils.isNotEmpty(listPatient) && CollectionUtils.isNotEmpty(signPatientManageRouteNodes) && (listPatient.size() + signPatientManageRouteNodes.size()) > 1000) { return AjaxResult.error("创建任务数量超出当日上限,请减少创建任务数量!"); } for (PatientInfoVo patientInfoVo : listPatient) { @@ -274,10 +274,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout if (insertBatchCount < 0) { return AjaxResult.error(901, "新增签约患者管理任务路径失败!请联系管理员!"); } - - SignPatientRecord signPatientRecord = new SignPatientRecord(); - // if(Objects.isNull(signPatientManageRoute.getSignPatientRecordId())) { // //更新 签约记录的 审核状态为 已审核,适用场景:手动创建任务 zyk 20241204 // signPatientRecord.setRouteCheckStatus(RouteCheckStatusEnum.AGREE.getInfo()); @@ -301,12 +298,10 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout LabelField labelField = new LabelField(); labelField.setLabelFieldAndPartitionDictList(labelFieldAndPartitionDictList); labelFieldContentService.insertLabelField(labelField); - // 替换手动生成的任务中的标签 signPatientManageRouteNodeService.manualCreateTaskLabelReplaceByPatientId(signPatientManageRoute.getPatientId()); } - return AjaxResult.success(); } @@ -1452,10 +1447,9 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout if (StringUtils.isNotBlank(signPatientManageRoute.getSn())) { signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.BATCH_TASK.getInfo()); signPatientManageRouteNode.setSn(signPatientManageRoute.getSn()); - } else signPatientManageRouteNode.setTaskExcuteType(TaskExcuteTypeEnum.ACTUAL_TIME_TASK.getInfo()); - signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime()); + signPatientManageRouteNode.setNodePlanTime(routeNode.getNodePlanTime()); //电话外呼 if (Objects.nonNull(routeNode) && TaskNodeTypeEnum.PHONE_OUTBOUND.getInfo().equals(routeNode.getTaskNodeType())) { @@ -1515,7 +1509,6 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout signPatientManageRouteNode.setMessagePushSign(Objects.isNull(routeNode.getMessagePushSign()) ? null : routeNode.getMessagePushSign()); signPatientManageRouteNode.setMessageTemplateId(Objects.isNull(routeNode.getMessageTemplateId()) ? null : routeNode.getMessageTemplateId()); signPatientManageRouteNode.setMessageTemplateCode(Objects.isNull(routeNode.getMessageTemplateCode()) ? null : routeNode.getMessageTemplateCode()); - ; signPatientManageRouteNode.setMessageTemplateName(StringUtils.isBlank(routeNode.getMessageTemplateName()) ? null : routeNode.getMessageTemplateName()); //公众号 signPatientManageRouteNode.setOfficialPushSign(Objects.isNull(routeNode.getOfficialPushSign()) ? null : routeNode.getOfficialPushSign()); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/ITextMessageService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/ITextMessageService.java index d7a89ead..79a5020c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/ITextMessageService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/ITextMessageService.java @@ -1,10 +1,9 @@ package com.xinelu.manage.service.textmessage; -import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.dto.textmessage.TextMessageDTO; import com.xinelu.manage.dto.textmessage.TextMessageTaskDTO; import com.xinelu.manage.vo.textmessage.TextMessageTaskVO; -import com.xinelu.manage.vo.textmessage.TextMessageVO; import java.util.List; @@ -62,4 +61,9 @@ public interface ITextMessageService { * @return 结果 */ public int deleteTextMessageById(Long id); + + /** + * 查询话术变量 + */ + AjaxResult selectTextMessageVariable(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java index ad3380ec..e010a262 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/textmessage/impl/TextMessageServiceImpl.java @@ -1,11 +1,11 @@ package com.xinelu.manage.service.textmessage.impl; import com.xinelu.common.annotation.DataScope; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.entity.SysDictData; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; -import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.textmessage.TextMessage; import com.xinelu.manage.domain.textmessagesuittask.TextMessageSuitTask; import com.xinelu.manage.dto.textmessage.TextMessageDTO; @@ -15,13 +15,13 @@ import com.xinelu.manage.service.textmessage.ITextMessageService; import com.xinelu.manage.vo.textmessage.TextMessageTaskVO; import com.xinelu.manage.vo.textmessage.TextMessageVO; import com.xinelu.system.mapper.SysDictDataMapper; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; /** @@ -218,4 +218,21 @@ public class TextMessageServiceImpl implements ITextMessageService { public int deleteTextMessageById(Long id) { return textMessageMapper.deleteTextMessageById(id); } + + /** + * 查询话术变量 + */ + @Override + public AjaxResult selectTextMessageVariable(Long id) { + TextMessage textMessage = textMessageMapper.selectTextMessageById(id); + if (Objects.isNull(textMessage) || StringUtils.isBlank(textMessage.getVariables())) { + return AjaxResult.success(); + } + List variables = Arrays.asList(textMessage.getVariables().split("\\|")); + Map variablehMap = new HashMap<>(); + for (String variable : variables) { + variablehMap.put(variable, null); + } + return AjaxResult.success(variablehMap); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/phonedialrecord/BillPhoneDialVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/phonedialrecord/BillPhoneDialVo.java new file mode 100644 index 00000000..3e1fe2fc --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/phonedialrecord/BillPhoneDialVo.java @@ -0,0 +1,125 @@ +package com.xinelu.manage.vo.phonedialrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 电话账单信息 + */ +@Data +public class BillPhoneDialVo { + + /** + * 主键id + */ + private Long id; + + /** + * 患者id + */ + @ApiModelProperty(value = "患者id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** + * 签约患者管理任务节点表id + */ + @ApiModelProperty(value = "签约患者管理任务节点表id") + private Long manageRouteNodeId; + + /** + * 患者手机号 + */ + @ApiModelProperty(value = "患者手机号") + @Excel(name = "手机号") + private String patientPhone; + + /** + * 呼叫时间 + */ + @ApiModelProperty(value = "呼叫时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "呼叫时间", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime dialTime; + + /** + * 电话模板id + */ + @ApiModelProperty(value = "电话模板id") + private String phoneTemplateId; + + /** + * 电话模板名称 + */ + @ApiModelProperty(value = "电话模板名称") + @Excel(name = "模板名称") + private String phoneTemplateName; + + /** + * 替换标签之后的电话内容 + */ + @ApiModelProperty(value = "替换标签之后的电话内容") + private String messageNodeContent; + + /** + * AI :自动外呼 或 COMMON:人工随访电话,否则为空 + */ + @ApiModelProperty(value = "AI :自动外呼 或 COMMON:人工随访电话,否则为空") + private String phoneDialMethod; + + /** + * 生成通话录音唯一标识,可通过该标识,获取录音 + */ + @ApiModelProperty(value = "生成通话录音唯一标识,可通过该标识,获取录音") + private String ctUuid; + + /** + * 通话录音存储路径 + */ + @ApiModelProperty(value = "通话录音存储路径") + private String phoneDialRecordVideo; + + /** + * 通话时长 + */ + @ApiModelProperty(value = "通话时长") + @Excel(name = "通话时长") + private BigDecimal phoneDuration; + + /** + * 通话费用 + */ + @ApiModelProperty(value = "单价") + @Excel(name = "单价") + private BigDecimal phoneUnitPrice; + + /** + * 通话费用 + */ + @ApiModelProperty(value = "通话费用") + @Excel(name = "通话费用") + private BigDecimal phoneExpense; + + /** + * 关联账单id + */ + @ApiModelProperty(value = "关联账单id") + private Long billId; + + /** + * 关联账单名称 + */ + @ApiModelProperty(value = "关联账单名称") + private Long billName; +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java new file mode 100644 index 00000000..8c5b2f8b --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/shortmessagesendrecord/ShortMessageSendRecordVo.java @@ -0,0 +1,114 @@ +package com.xinelu.manage.vo.shortmessagesendrecord; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 账单短信 + */ +@Data +public class ShortMessageSendRecordVo { + + /** + * 主键id + */ + private Long id; + + /** + * 患者id + */ + @ApiModelProperty(value = "患者id") + private Long patientId; + + /** + * 患者姓名 + */ + @ApiModelProperty(value = "患者姓名") + @Excel(name = "姓名") + private String patientName; + + /** + * 签约患者管理任务节点表id + */ + @ApiModelProperty(value = "签约患者管理任务节点表id") + private Long manageRouteNodeId; + + /** + * 患者手机号 + */ + @ApiModelProperty(value = "患者手机号") + @Excel(name = "手机号") + private String patientPhone; + + /** + * 消息发送时间 + */ + @ApiModelProperty(value = "消息发送时间") + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "消息发送时间", width = 30, dateFormat = "yyyy-MM-dd") + private LocalDateTime sendTime; + + /** + * 消息模板id + */ + @ApiModelProperty(value = "消息模板id") + private String messageTemplateId; + + /** + * 电话模板名称 + */ + @ApiModelProperty(value = "电话模板名称") + @Excel(name = "模板名称") + private String template; + + /** + * 消息内容 + */ + @ApiModelProperty(value = "消息内容") + private String messageNodeContent; + + /** + * 短信长度 + */ + @ApiModelProperty(value = "短信长度") + @Excel(name = "短信长度") + private Long messageLength; + + /** + * 短信数量 + */ + @ApiModelProperty(value = "短信数量") + @Excel(name = "短信数量") + private Long messageQuantity; + + /** + * 短信单价 + */ + @ApiModelProperty(value = "短信单价") + @Excel(name = "短信单价") + private BigDecimal messageUnitPrice; + + /** + * 短信价格 + */ + @ApiModelProperty(value = "短信价格") + @Excel(name = "短信价格") + private BigDecimal messageExpense; + + /** + * 关联账单id + */ + @ApiModelProperty(value = "关联账单id") + private Long billId; + + /** + * 关联账单名称 + */ + @ApiModelProperty(value = "关联账单名称") + private Long billName; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageTaskVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageTaskVO.java index 8feb8f93..82dfd823 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageTaskVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageTaskVO.java @@ -122,4 +122,9 @@ public class TextMessageTaskVO { * 短信模版code(手动创建人任务使用) */ private String messageTemplateCode; + + /** + * 短信变量,竖线隔开。来源于创建短息任务页面 + */ + private String variables; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageVO.java index 57052560..3b929691 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/textmessage/TextMessageVO.java @@ -122,4 +122,9 @@ public class TextMessageVO extends BaseEntity { * 短信模版code(手动创建人任务使用) */ private String messageTemplateCode; + + /** + * 短信变量,竖线隔开。来源于创建短息任务页面 + */ + private String variables; } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskinfo/BatchSendTaskInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskinfo/BatchSendTaskInfoMapper.xml new file mode 100644 index 00000000..a6364eb0 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskinfo/BatchSendTaskInfoMapper.xml @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + order_num, + sn, + import_name, + team_name, + hospital_agency_id, + hospital_agency_name, + department_id, + department_name, + visit_date, + in_hospital_number, + patient_name, + patient_phone, + age, + sex, + card_no, + crowd_id, + crowd_name, + physical_examination_summary, + physical_examination_label, + create_by, + create_time, + del_flag + from batch_send_task_info + + + + + + + + insert into batch_send_task_info + + order_num, + + sn, + + import_name, + + team_name, + + hospital_agency_id, + + hospital_agency_name, + + department_id, + + department_name, + + visit_date, + + in_hospital_number, + + patient_name, + + patient_phone, + + age, + + sex, + + card_no, + + crowd_id, + + crowd_name, + + physical_examination_summary, + + physical_examination_label, + + create_by, + + create_time, + + del_flag, + + + + #{orderNum}, + + #{sn}, + + #{importName}, + + #{teamName}, + + #{hospitalAgencyId}, + + #{hospitalAgencyName}, + + #{departmentId}, + + #{departmentName}, + + #{visitDate}, + + #{inHospitalNumber}, + + #{patientName}, + + #{patientPhone}, + + #{age}, + + #{sex}, + + #{cardNo}, + + #{crowdId}, + + #{crowdName}, + + #{physicalExaminationSummary}, + + #{physicalExaminationLabel}, + + #{createBy}, + + #{createTime}, + + #{delFlag}, + + + + + + update batch_send_task_info + + order_num = + #{orderNum}, + + sn = + #{sn}, + + import_name = + #{importName}, + + team_name = + #{teamName}, + + hospital_agency_id = + #{hospitalAgencyId}, + + hospital_agency_name = + #{hospitalAgencyName}, + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + visit_date = + #{visitDate}, + + in_hospital_number = + #{inHospitalNumber}, + + patient_name = + #{patientName}, + + patient_phone = + #{patientPhone}, + + age = + #{age}, + + + sex = #{sex}, + + card_no = + #{cardNo}, + + crowd_id = + #{crowdId}, + + crowd_name = + #{crowdName}, + + physical_examination_summary = + #{physicalExaminationSummary}, + + physical_examination_label = + #{physicalExaminationLabel}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + del_flag = + #{delFlag}, + + + where id = #{id} + + + + delete + from batch_send_task_info + where id = #{id} + + + + delete from batch_send_task_info where id in + + #{id} + + + + + insert into batch_send_task_info( + order_num, + sn, + import_name, + team_name, + hospital_agency_id, + hospital_agency_name, + department_id, + department_name, + visit_date, + in_hospital_number, + patient_name, + patient_phone, + age, + sex, + card_no, + crowd_id, + crowd_name, + physical_examination_summary, + physical_examination_label, + del_flag, + create_by, + create_time + ) values + + ( + #{BatchSendTaskInfo.orderNum}, + #{BatchSendTaskInfo.sn}, + #{BatchSendTaskInfo.importname}, + #{BatchSendTaskInfo.teamName}, + #{BatchSendTaskInfo.hospitalAgencyId}, + #{BatchSendTaskInfo.hospitalAgencyName}, + #{BatchSendTaskInfo.departmentId}, + #{BatchSendTaskInfo.departmentName}, + #{BatchSendTaskInfo.visitDate}, + #{BatchSendTaskInfo.inHospitalNumber}, + #{BatchSendTaskInfo.patientName}, + #{BatchSendTaskInfo.patientPhone}, + #{BatchSendTaskInfo.age}, + #{BatchSendTaskInfo.sex}, + #{BatchSendTaskInfo.cardNo}, + #{BatchSendTaskInfo.crowdId}, + #{BatchSendTaskInfo.crowdName}, + #{BatchSendTaskInfo.physicalExaminationSummary}, + #{BatchSendTaskInfo.physicalExaminationLabel}, + #{BatchSendTaskInfo.delFlag}, + #{BatchSendTaskInfo.createBy}, + #{BatchSendTaskInfo.createTime} + ) + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.xml new file mode 100644 index 00000000..38954e8e --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskrecordinfo/BatchSendTaskRecordInfoMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + select id, + batch_task_number, + batch_task_name, + task_execute_type, + node_plan_time, + batch_task_source, + template_id, + template_name, + node_content, + node_execute_status, + physical_examination_label, + create_by, + create_time + from batch_send_task_record_info + + + + + + + + insert into batch_send_task_record_info + + batch_task_number, + + batch_task_name, + + task_execute_type, + + node_plan_time, + + batch_task_source, + + template_id, + + template_name, + + node_content, + + node_execute_status, + + physical_examination_label, + + create_by, + + create_time, + + + + #{batchTaskNumber}, + + #{batchTaskName}, + + #{taskExecuteType}, + + #{nodePlanTime}, + + #{batchTaskSource}, + + #{templateId}, + + #{templateName}, + + #{nodeContent}, + + #{nodeExecuteStatus}, + + #{physicalExaminationLabel}, + + #{createBy}, + + #{createTime}, + + + + + + update batch_send_task_record_info + + batch_task_number = + #{batchTaskNumber}, + + batch_task_name = + #{batchTaskName}, + + task_execute_type = + #{taskExecuteType}, + + node_plan_time = + #{nodePlanTime}, + + batch_task_source = + #{batchTaskSource}, + + template_id = + #{templateId}, + + template_name = + #{templateName}, + + node_content = + #{nodeContent}, + + node_execute_status = + #{nodeExecuteStatus}, + + physical_examination_label = + #{physicalExaminationLabel}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + + where id = #{id} + + + + delete + from batch_send_task_record_info + where id = #{id} + + + + delete from batch_send_task_record_info where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.xml new file mode 100644 index 00000000..fef83876 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/batchsendtaskvariableinfo/BatchSendTaskVariableInfoMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + select id, variable, variable_attribute, batch_send_task_record_id, create_by, create_time from batch_send_task_variable_info + + + + + + + + insert into batch_send_task_variable_info + + variable, + + variable_attribute, + + batch_send_task_record_id, + + create_by, + + create_time, + + + + #{variable}, + + #{variableAttribute}, + + #{batchSendTaskRecordId}, + + #{createBy}, + + #{createTime}, + + + + + + update batch_send_task_variable_info + + variable = + #{variable}, + + variable_attribute = + #{variableAttribute}, + + batch_send_task_record_id = + #{batchSendTaskRecordId}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + + where id = #{id} + + + + delete from batch_send_task_variable_info where id = #{id} + + + + delete from batch_send_task_variable_info where id in + + #{id} + + + + + insert into batch_send_task_variable_info( + variable, + variable_attribute, + batch_send_task_record_id, + create_by, + create_time) + values + + ( + #{BatchSendTaskVariableInfo.variable}, + #{BatchSendTaskVariableInfo.variableAttribute}, + #{BatchSendTaskVariableInfo.batchSendTaskRecordId}, + #{BatchSendTaskVariableInfo.createBy}, + #{BatchSendTaskVariableInfo.createTime} + ) + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/billinfo/BillInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/billinfo/BillInfoMapper.xml new file mode 100644 index 00000000..f3fb7d24 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/billinfo/BillInfoMapper.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + select id, + bill_code, + bill_name, + bill_month, + bill_expense, + payment_status, + bill_source, + create_time + from bill_info + + + + + + + + + insert into bill_info + + bill_code, + + bill_name, + + bill_month, + + bill_expense, + + payment_status, + + bill_source, + + create_time, + + + + #{billCode}, + + #{billName}, + + #{billMonth}, + + #{billExpense}, + + #{paymentStatus}, + + #{billSource}, + + #{createTime}, + + + + + + update bill_info + + bill_code = + #{billCode}, + + bill_name = + #{billName}, + + bill_month = + #{billMonth}, + + bill_expense = + #{billExpense}, + + payment_status = + #{paymentStatus}, + + bill_source = + #{billSource}, + + create_time = + #{createTime}, + + + where id = #{id} + + + + delete + from bill_info + where id = #{id} + + + + delete from bill_info where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml index 19b7591a..3190bfe8 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/phonedialrecord/PhoneDialRecordMapper.xml @@ -20,9 +20,12 @@ - - - + + + + + + @@ -42,7 +45,11 @@ update_by, update_time, ct_uuid, - phone_dial_record_video + phone_dial_record_video, + phone_duration, + phone_expense, + phone_unit_price, + bill_id from phone_dial_record @@ -79,9 +86,63 @@ and error_status = #{errorStatus} + + and ct_uuid = #{ctUuid} + + + and phone_dial_record_video = #{phoneDialRecordVideo} + + + and phone_duration = #{phoneDuration} + + + and phone_expense = #{phoneExpense} + + + and bill_id = #{billId} + + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml index 95fd9f67..55ae49e3 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml @@ -361,4 +361,8 @@ from script_info_edge where script_info_id = #{id} + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml index a6fe4f25..e3c9048b 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/shortmessagesendrecord/ShortMessageSendRecordMapper.xml @@ -19,6 +19,11 @@ + + + + + @@ -35,7 +40,12 @@ create_time, update_by, update_time, - message_type + message_type, + message_length, + message_quantity, + message_unit_price, + message_expense, + bill_id from short_message_send_record @@ -70,9 +80,60 @@ and message_type = #{messageType} + + and message_length = #{messageLength} + + + and message_quantity = #{messageQuantity} + + + and message_unit_price = #{messageUnitPrice} + + + and message_expense = #{messageExpense} + + + and bill_id = #{billId} + + + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml index f84b7367..a8db0709 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -586,7 +586,9 @@ suit_range, task_excute_type, create_by, - create_time + create_time, + batch_send_task_record_id, + batch_send_task_id ) values ( @@ -599,7 +601,9 @@ #{SignPatientManageRoute.suitRange}, #{SignPatientManageRoute.taskExcuteType}, #{SignPatientManageRoute.createBy}, - #{SignPatientManageRoute.createTime} + #{SignPatientManageRoute.createTime}, + #{SignPatientManageRoute.batchSendTaskRecordId}, + #{SignPatientManageRoute.batchSendTaskId} ) diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml index 8f6eda7c..aaa11fbe 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -564,27 +564,28 @@ - - insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_id, route_node_name, route_node_day,sn,task_excute_type,node_plan_time, task_type, task_status, task_subdivision, task_node_type, second_classify_describe, - execute_time, phone_push_sign, script_info_id, robot_publish_id, phone_template_id, phone_template_name, phone_node_content, phone_result_json, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, - phone_message_template_name, phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, - message_template_id, message_template_code, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_code,official_template_name, official_remind_content, - official_node_content, applet_push_sign, applet_template_id, applet_template_code, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, - route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status, - route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method,follow_template_id, follow_template_name, task_id_ext) - values - - (#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.sn},#{item.taskExcuteType},#{item.nodePlanTime},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.taskNodeType},#{item.secondClassifyDescribe}, - #{item.executeTime},#{item.phonePushSign},#{item.scriptInfoId},#{item.robotPublishId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneResultJson},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId}, - #{item.phoneMessageTemplateName},#{item.phoneMessageTemplateContent}, - #{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign}, - #{item.messageTemplateId}, #{item.messageTemplateCode}, - #{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateCode},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent}, - #{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateCode},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent}, - #{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus}, - #{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod},#{item.followTemplateId},#{item.followTemplateName},#{item.taskIdExt}) - - + + insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_id, route_node_name,route_node_day,sn,dial_status,task_excute_type,node_plan_time, task_type, task_status, task_subdivision, task_node_type, second_classify_describe, + execute_time, phone_push_sign, script_info_id, robot_publish_id, phone_template_id, phone_template_name, phone_node_content, phone_result_json, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, + phone_message_template_name, phone_message_template_content,question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, + message_template_id, message_template_code, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_code,official_template_name, official_remind_content, + official_node_content, applet_push_sign, applet_template_id, applet_template_code, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, + route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,phone_connect_status, + route_handle_id, route_handle_person, route_link, text_remind_content,node_content, del_flag, create_by, create_time, update_by, update_time,phone_dial_method,follow_template_id, follow_template_name, task_id_ext) + values + + (#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeId},#{item.routeNodeName},#{item.routeNodeDay},#{item.sn},#{item.dialStatus},#{item.taskExcuteType},#{item.nodePlanTime},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.taskNodeType},#{item.secondClassifyDescribe}, + #{item.executeTime},#{item.phonePushSign},#{item.scriptInfoId},#{item.robotPublishId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneResultJson},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId}, + #{item.phoneMessageTemplateName},#{item.phoneMessageTemplateContent}, + #{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign}, + #{item.messageTemplateId}, #{item.messageTemplateCode}, + #{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateCode},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent}, + #{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateCode},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent}, + #{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},#{item.phoneConnectStatus}, + #{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.textRemindContent},#{item.nodeContent},0,#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.phoneDialMethod},#{item.followTemplateId},#{item.followTemplateName},#{item.taskIdExt} + ) + + update sign_patient_manage_route_node @@ -852,10 +853,10 @@ - update sign_patient_manage_route_node set dial_status = #{dialStatus} - where - sn = #{sn} - and script_info_id = #{scriptInfoId} + update sign_patient_manage_route_node + set dial_status = #{dialStatus} + where sn = #{sn} + and script_info_id = #{scriptInfoId} @@ -1045,6 +1046,14 @@ + + update sign_patient_manage_route_node + set task_id_ext = #{taskIdExt} + where id in + + #{manageRouteNodeIds} + + + + \ No newline at end of file