| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjXdPicture; |
| | | import com.ltkj.hosp.service.ITjCustomerService; |
| | | import com.ltkj.hosp.service.ITjProjectService; |
| | | import com.ltkj.hosp.service.TjAsyncService; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import com.ltkj.common.core.controller.BaseController; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.enums.BusinessType; |
| | | import com.ltkj.hosp.domain.TjPureToneTest; |
| | | import com.ltkj.hosp.service.ITjPureToneTestService; |
| | | import com.ltkj.common.utils.poi.ExcelUtil; |
| | | import com.ltkj.common.core.page.TableDataInfo; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/pureToneTest/pureToneTest") |
| | | @Api(tags = "纯音听阈测试") |
| | | @Api(tags = "C==============纯音听阈测试") |
| | | public class TjPureToneTestController extends BaseController { |
| | | @Resource |
| | | private ITjPureToneTestService tjPureToneTestService; |
| | |
| | | private ITjCustomerService customerService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | @Resource |
| | | private ITjOrderService orderService; |
| | | @Resource |
| | | private TjPureToneTestDetilService toneTestDetilService; |
| | | |
| | | |
| | | @PostMapping("/saveTjPureToneTestDetil") |
| | | @ApiOperation(value = "保存纯音听阈结果测定值接口") |
| | | public AjaxResult saveTjPureToneTestDetil(@RequestBody List<TjPureToneTestDetil> pureToneTestDetils) { |
| | | if(null !=pureToneTestDetils && pureToneTestDetils.size()>0){ |
| | | String pureTestId = pureToneTestDetils.get(0).getPureTestId(); |
| | | if(null==pureTestId){ |
| | | return AjaxResult.error("参数格式有误请检查核对!"); |
| | | } |
| | | toneTestDetilService.deletedTjPureToneTestDetilByPureTestId(pureTestId); |
| | | toneTestDetilService.saveBatch(pureToneTestDetils); |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error("请输入数据!"); |
| | | } |
| | | |
| | | @GetMapping("/getTjPureToneTestDetilList") |
| | | @ApiOperation(value = "获取纯音听阈结果测定值接口") |
| | | public AjaxResult getTjPureToneTestDetilList(@RequestParam String pureTestId) { |
| | | return AjaxResult.success(toneTestDetilService.list(new LambdaQueryWrapper<TjPureToneTestDetil>().eq(TjPureToneTestDetil::getPureTestId,pureTestId))); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | for (Map.Entry<String, List<TjPureToneTest>> entry : stringListMap.entrySet()) { |
| | | Map<String,Object>map=new HashMap<>(); |
| | | TjCustomer customer = customerService.getById(entry.getKey()); |
| | | if(customer==null) continue; |
| | | customer.setCusName(MatchUtils.hideCusName(customer.getCusName())); |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | customer.setTjNumber(entry.getValue().get(0).getTjNum()); |
| | | TjOrder order = orderService.getOrderByTjNum(entry.getValue().get(0).getTjNum()); |
| | | if(null !=order){ |
| | | customer.setTjTime(order.getCreateTime()); |
| | | customer.setTjType(order.getTjCategory()); |
| | | } |
| | | map.put("list",entry.getValue()); |
| | | map.put("customer",customer); |
| | | map.put("picturePath",configService.selectConfigByKey("TjPureToneTest")); |