| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- package com.tuoren.web;
- import com.tuoren.TuorenApplication;
- import com.tuoren.web.layer.controller.BusPatientController;
- import com.tuoren.web.layer.d0.PumpRemoveRequestDTO;
- import com.tuoren.web.layer.d0.PumpVo;
- import com.tuoren.web.layer.entity.BusPatientEntity;
- import com.tuoren.web.layer.service.IBusPatientService;
- import com.tuoren.web.layer.service.impl.BusPumpServiceImpl;
- import com.tuoren.web.layer.vo.PumpParam;
- import lombok.extern.slf4j.Slf4j;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.amqp.rabbit.core.RabbitTemplate;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
- import org.springframework.web.bind.annotation.RequestBody;
- import javax.annotation.Resource;
- import java.util.Arrays;
- import java.util.Date;
- import java.util.List;
- /**
- * @ClassName : Test
- * @Description :
- * @Author : LF
- * @Date: 2025年03月12日
- */
- @RunWith(SpringRunner.class)
- @Slf4j
- @SpringBootTest(classes = TuorenApplication.class)
- public class Test1 {
- @Autowired
- private RabbitTemplate rabbitTemplate;
- @Resource
- private BusPumpServiceImpl busPumpService;
- @Resource
- private BusPatientController busPatientController;
- @Resource
- private IBusPatientService iBusPatientEntityService;
- @Test
- public void test() throws Exception {
- rabbitTemplate.convertAndSend("removePump","123412412", Arrays.asList("12","23","3455"));
- }
- @Test
- public void test2() throws Exception {
- PumpRemoveRequestDTO pumpRemoveRequestDTO = new PumpRemoveRequestDTO();
- pumpRemoveRequestDTO.setIds(Arrays.asList("382"));
- pumpRemoveRequestDTO.setRemoveUser("admin");
- pumpRemoveRequestDTO.setUndoTime(new Date());
- busPumpService.removePumpNew(pumpRemoveRequestDTO);
- }
- @Test
- public void test3() throws Exception {
- BusPatientEntity busPatientEntity = new BusPatientEntity();
- busPatientEntity.setPatientId("007a44e8-8c33-449f-bb96-78144352cfbc");
- /**
- * @return void
- * @author wangzl
- * @date 2025/6/18
- * @description
- *
- * "anesthesiaMode":"这是我的麻醉方式",
- * "bedCode":"这是我的床号",
- * "patientId":"ad649e03-7b5c-4f94-9a37-b994012b0120",
- * "sex":"男","name":"这是我的姓名",
- * "operationName":"这是我的手术名称",
- * "wardCode":"这是我的病区",
- * "operationDoctor":"这是我的手术医生",
- * "easyMode":"这是我的镇痛方式",
- * "patientCode":"5210800000000"
- */
- busPatientEntity.setAnesthesiaMode("这是我的麻醉方式");
- busPatientEntity.setBedCode("这是我的床号");
- busPatientEntity.setName("这是我的姓名");
- busPatientEntity.setOperationName("这是我的手术名称");
- busPatientEntity.setWardCode("这是我的病区");
- busPatientEntity.setOperationDoctor("这是我的手术医生");
- busPatientEntity.setEasyMode("这是我的镇痛方式");
- busPatientEntity.setPatientCode("5210800000000");
- boolean flag = this.iBusPatientEntityService.updateById(busPatientEntity);
- System.out.println(flag);
- if(flag){
- iBusPatientEntityService.sendPatientInfoToPump(busPatientEntity.getPatientId());
- }
- }
- @Test
- public void test4() throws Exception {
- PumpParam pumpParam = new PumpParam();
- pumpParam.setPumpCode("4319571630430293");
- pumpParam.setHospitalCode("5490dd8896e54ecab824b006074361de");
- pumpParam.setPatientId("5d892e4f-7c85-40b3-8b4d-8006f3771e2f");
- // pumpParam.setPatientCode("436167");
- List<PumpVo> pumpVos = busPumpService.queryPumpInfo(pumpParam);
- System.out.println(pumpVos);
- }
- }
|