| | |
| | | import com.ltkj.common.enums.DataSourceType; |
| | | import com.ltkj.framework.config.UserHoder; |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.domain.TjOrderRemark; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.sqlDomain.*; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.system.service.ISysDeptService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.ConvertingCursor; |
| | | import org.springframework.data.redis.core.Cursor; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.sql.ResultSet; |
| | | import java.sql.SQLException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ltkj.framework.datasource.DynamicDataSourceContextHolder.log; |
| | | import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.save; |
| | |
| | | public class TjSqlController extends BaseController { |
| | | @Resource |
| | | private TestMapper testMapper; |
| | | |
| | | @Resource |
| | | private TjvLtkjvtjpatService tjvLtkjvtjpatService; |
| | | |
| | | @Resource |
| | | private LtkjMiddleDetailService middleDetailService; |
| | | |
| | | @Resource |
| | | private LtkjMiddleHeadService headService; |
| | | @Resource |
| | |
| | | private LtkjHybgdService ltkjHybgdService; |
| | | @Resource |
| | | private LtkjHysqdService ltkjHysqdService; |
| | | @Autowired |
| | | public RedisTemplate<Object,Object> redisTemplate; |
| | | @Resource |
| | | private ITjCustomerService tjCustomerService; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | @Resource |
| | | private TjAsyncService asyncService; |
| | | @Resource |
| | | private ITjOrderRemarkService remarkService; |
| | | @Resource |
| | | private ITjOrderService orderService; |
| | | @Resource |
| | | private ISysDeptService deptService; |
| | | @Resource |
| | | private LtkjHisUserService hisUserService; |
| | | @Resource |
| | | private ITjProjectService tjProjectService; |
| | | @Autowired |
| | | private ITjOrderDetailService tjOrderDetailService; |
| | | @Resource |
| | | private ITjOrderRemarkService tjOrderRemarkService; |
| | | @Resource |
| | | private ITjProjectService projectService; |
| | | |
| | | |
| | | @GetMapping("/getTjHyBgList") |
| | | @ApiOperation(value = "查询lis数据库项目信息接口") |
| | | public AjaxResult getTjHyBgList(@RequestParam(required = false)String pacCode, |
| | | @RequestParam(required = false)String pacName, |
| | | @RequestParam(required = false)String pacRemark) { |
| | | List<Map<String, Object>> maps = testMapper.getTjHyBgList(pacCode,pacName,pacRemark); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(maps); |
| | | public AjaxResult getTjHyBgList(@RequestParam(defaultValue = "1")Integer page, |
| | | @RequestParam(defaultValue = "10")Integer pageSize, |
| | | @RequestParam(required = false)String pname, |
| | | @RequestParam(required = false)String pid, |
| | | @RequestParam(required = false)String pym, |
| | | @RequestParam(required = false)String checktype) { |
| | | // List<Map<String, Object>> maps = testMapper.getTjHyBgList(pacCode,pacName,pacRemark); |
| | | // DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | Map<String,Object> map= projectService.getTjHyBgList(page,pageSize,pname,pid,pym,checktype); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/newGetTjPat") |
| | | @ApiOperation(value = "新的查询体检信息接口") |
| | | @ApiOperation(value = "A------新的查询体检信息接口") |
| | | public AjaxResult newGetTjPat(@RequestParam(required = false)String pacCode, |
| | | @RequestParam(required = false)String pacName, |
| | | @RequestParam(required = false)String pacRemark) { |
| | | // List<Map<String, Object>> maps = testMapper.newGetTjPat111111(pacName); |
| | | List<Map<String, Object>> maps = testMapper.newGetTjPat(pacCode,pacName,pacRemark); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | List<String> strings = orderService.selectTjOrderByCardId1(); |
| | | if(null !=strings && strings.size()>0){ |
| | | List<Map<String, Object>> collect = maps.stream() |
| | | .filter(item -> !strings.contains(item.get("pacCode").toString())).collect(Collectors.toList()); |
| | | return AjaxResult.success(collect); |
| | | } |
| | | return AjaxResult.success(maps); |
| | | } |
| | | |
| | |
| | | //同步化验项目 |
| | | testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(), "1"); |
| | | //同步检查项目 |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),"1"); |
| | | // testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),"1"); |
| | | } |
| | | // } |
| | | return AjaxResult.success("同步成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/getTjYxjcList") |
| | | @ApiOperation(value = "查询影响检查项目") |
| | | public AjaxResult getTjYxjcList() { |
| | | List<Map<String, Object>> tjYxjcList = testMapper.getTjYxjcList("杨云云",null,null); |
| | | return AjaxResult.success(tjYxjcList); |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/getPacTjProjectList") |
| | | @ApiOperation(value = "维护套餐页面新增项目时调用") |
| | | public AjaxResult getPacTjProjectList() { |
| | | // LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); |
| | | // wq.eq(TjProject::getProParentId, 0); |
| | | // wq.eq(TjProject::getProStatus, 0); |
| | | List<TjProject> tjProjects = tjProjectService.getPacTjProjectList(); |
| | | // if (tjProjects != null) { |
| | | // for (TjProject project : tjProjects) { |
| | | // List<TjProject> projectList = tjProjectService.getTjProjectListBySoneId(String.valueOf(project.getProId())); |
| | | // project.setTjProjectList(projectList); |
| | | // } |
| | | // return AjaxResult.success(tjProjects); |
| | | // } |
| | | return AjaxResult.success(tjProjects); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getHuaYanProByTjNum") |
| | | @ApiOperation(value = "根据体检号查询化验项目接口") |
| | | public AjaxResult getHuaYanProByTjNum(@RequestParam @ApiParam(value = "体检号") String tjNumber) { |
| | | Map<String,Object> map=new HashMap<>(); |
| | | |
| | | List<TjOrderDetail> tjOrderDetails = tjOrderDetailService.addHuaYanTable(tjNumber); |
| | | List<TjOrderRemark> tjOrderRemarks = tjOrderRemarkService.addHuaYanTable(tjNumber); |
| | | map.put("tjOrderDetails",tjOrderDetails); |
| | | map.put("tjOrderRemarks",tjOrderRemarks); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getWsxmLtkjHysqdByLisViBySLAVEWS") |
| | | @ApiOperation(value = "查询外送项目SqlServer接口") |
| | | public AjaxResult getWsxmLtkjHysqdByLisViBySLAVEWS(@RequestParam String s) { |
| | | // List<LtkjHybgd> wsbg = testMapper.getWsxmLtkjHybgdByLisViBySLAVEWS(s); |
| | | // log.info(wsbg.toString()); |
| | | return AjaxResult.success(testMapper.getWsxmLtkjHysqdByLisViBySLAVEWS(s)); |
| | | } |
| | | |
| | | |
| | | } |