| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.enums.DataSourceType; |
| | | import com.ltkj.common.utils.bean.BeanUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.TjReservation; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.hosp.service.ITjReservationService; |
| | | import com.ltkj.hosp.service.TjvLtkjvtjpatService; |
| | | import com.ltkj.hosp.sqlDomain.LtkjTjPat; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @Resource |
| | | private TestMapper testMapper; |
| | | @Resource |
| | | private TjvLtkjvtjpatService tjvLtkjvtjpatService; |
| | | |
| | | |
| | | |
| | |
| | | //根据配置调取存储过程 将临时表数据存入预约表2023.12.12 |
| | | final String getInfoFromSqlData = sysConfigService.selectConfigByKey("getInfoFromSqlData"); |
| | | if ("Y".equals(getInfoFromSqlData)){ |
| | | final LtkjTjPat tjPatByIdCard = testMapper.getTjPatByIdCard(cusIdcard); |
| | | if (tjPatByIdCard!=null){ |
| | | testMapper.getTjPatByCusId(cusIdcard); |
| | | }else { |
| | | return error("身份证号不存在"); |
| | | LtkjTjPat tjPatByIdCard = testMapper.getTjPatByIdCard(cusIdcard); |
| | | List<LtkjTjPat> list = testMapper.getTjPat(); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjTjPat ltkjTjPat : list) { |
| | | final boolean save = tjvLtkjvtjpatService.save(ltkjTjPat); |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | testMapper.getTjPatByCusId(cusIdcard); |
| | | } |
| | | //end2023.12.12 |
| | | |
| | | |
| | | //end====2023.12.12 |
| | | LambdaQueryWrapper<TjReservation> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjReservation::getIdCard, cusIdcard); |
| | | wq.eq(TjReservation::getIsExpire, 2); |