| | |
| | | package com.ltkj.web.controller.service; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdUtil; |
| | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.druid.sql.visitor.functions.If; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.core.domain.entity.SysDept; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.utils.IdUtils; |
| | | import com.ltkj.common.utils.StringUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.hisDto.*; |
| | | import com.ltkj.hosp.idutil.IdUtils; |
| | | import com.ltkj.hosp.mapper.TjSamplingMapper; |
| | | import com.ltkj.hosp.pacsDto.SavePacsApply; |
| | | import com.ltkj.hosp.service.*; |
| | |
| | | import com.ltkj.web.controller.lis.LisApiMethod; |
| | | import com.ltkj.web.controller.pacs.PacsApiMethodService; |
| | | import com.ltkj.web.controller.system.SamplingServiceApi; |
| | | import jodd.util.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | |
| | | if (null != detailList && detailList1) { |
| | | String format = DateUtil.format(new Date(), "yyMMddHHmmssSSS"); |
| | | for (TjOrderDetail detail : detailList) { |
| | | int i = samplingService.isExistProId(order.getTjNumber(), String.valueOf(detail.getProId())); |
| | | if(i>0) continue; |
| | | TjSampling sampling = new TjSampling(); |
| | | if (null == projectService.getById(detail.getProId())) continue; |
| | | TjProject project = projectService.getById(detail.getProId()); |
| | |
| | | } |
| | | } |
| | | |
| | | // 使用 stream 过滤出 proName 为 "舒张压" 或 "收缩压" 的元素 |
| | | List<TjOrderDetail> filteredList = tjOrderDetailList.stream() |
| | | .filter(a -> ("舒张压".equals(a.getProName()) || "收缩压".equals(a.getProName())) && a.getExceptionDesc()==1) |
| | | .collect(Collectors.toList()); |
| | | if(StrUtil.isNotBlank(ssyszys.toString())){ |
| | | |
| | | LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderYcxm::getTjh, order.getTjNumber()); |
| | | wq.like(TjOrderYcxm::getJcxm,"舒张压"); |
| | | ycxmService.remove(wq); |
| | | TjOrderYcxm orderYcxm =new TjOrderYcxm(); |
| | | orderYcxm.setTjh(order.getTjNumber()); |
| | | orderYcxm.setParentName(tjProject.getProName()); |
| | | orderYcxm.setJcxm(ssyszys.toString().replaceFirst("/$", "")); |
| | | orderYcxm.setJcjg(ssyszyjgs.toString().replaceFirst("/$", "")); |
| | | orderYcxm.setJynr(JSONUtil.toJsonStr(jianyilis)); |
| | | orderYcxm.setJyjc("0"); |
| | | ycxmService.save(orderYcxm); |
| | | |
| | | if(!filteredList.isEmpty()){ |
| | | TjOrderYcxm orderYcxm =new TjOrderYcxm(); |
| | | orderYcxm.setTjh(order.getTjNumber()); |
| | | orderYcxm.setParentName(tjProject.getProName()); |
| | | orderYcxm.setJcxm(ssyszys.toString().replaceFirst("/$", "")); |
| | | orderYcxm.setJcjg(ssyszyjgs.toString().replaceFirst("/$", "")); |
| | | orderYcxm.setJynr(JSONUtil.toJsonStr(jianyilis)); |
| | | orderYcxm.setJyjc("0"); |
| | | ycxmService.save(orderYcxm); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | Date date = new Date(); |
| | | String format = DateUtil.format(date, "yyMMddHHmmssSSS"); |
| | | for (TjOrderDetail detail : detailList) { |
| | | int i = samplingService.isExistProId(order.getTjNumber(), String.valueOf(detail.getProId())); |
| | | if(i>0) continue; |
| | | TjSampling sampling = new TjSampling(); |
| | | if (null == projectService.getById(detail.getProId())) continue; |
| | | TjProject project = projectService.getById(detail.getProId()); |