| | |
| | | import com.itextpdf.text.Element; |
| | | import com.itextpdf.text.Paragraph; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.domain.TjOrderYcxm; |
| | | import com.ltkj.hosp.mapper.TjCustomerMapper; |
| | | import com.ltkj.hosp.service.ITjCustomerService; |
| | | import com.ltkj.hosp.service.ITjOrderDetailService; |
| | | import com.ltkj.hosp.service.ITjOrderService; |
| | | import com.ltkj.hosp.service.TjOrderYcxmService; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | |
| | | private TjCheckController tjCheckController; |
| | | @Autowired |
| | | private TjCustomerMapper tjCustomerMapper; |
| | | @Resource |
| | | private ITjCustomerService customerService; |
| | | @Autowired |
| | | private ITjOrderService tjOrderService; |
| | | @Autowired |
| | |
| | | wrapper.eq(TjOrder::getTjNumber,tjNum); |
| | | List<TjOrder> list = tjOrderService.list(wrapper); |
| | | if (list.isEmpty()){ |
| | | return AjaxResult.error(); |
| | | return AjaxResult.error("报告未核收,请核收后查看"); |
| | | } |
| | | TjOrder tjOrder = tjOrderService.getOrderByTjNum(tjNum); |
| | | TjCustomer tjCustomer = tjCustomerMapper.selectById( tjOrder.getUserId()); |
| | |
| | | public AjaxResult reportData(@RequestBody String json){ |
| | | String tjNum = JSONUtil.parseObj(json).getStr("tjNum"); |
| | | LambdaQueryWrapper<TjOrder> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjOrder::getHeshouStatus,1); |
| | | // wrapper.eq(TjOrder::getHeshouStatus,1); |
| | | wrapper.eq(TjOrder::getTjNumber,tjNum); |
| | | List<TjOrder> list = tjOrderService.list(wrapper); |
| | | if (list.isEmpty()){ |
| | |
| | | /** |
| | | * 小程序点击体检报告查询详情,显示身高体重体重指数收缩压舒张压 |
| | | */ |
| | | @GetMapping("/getShenGaoTiZhong") |
| | | @ApiOperation(value = "小程序-体检报告查询详情") |
| | | public AjaxResult getShenGaoTiZhong(@RequestParam @ApiParam(value = "体检号") String tjNumber) { |
| | | // Map<String, Object> objectMap = new HashMap<>(); |
| | | LambdaQueryWrapper<TjOrder> wq1 = new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrder::getTjNumber, tjNumber); |
| | | wq1.eq(TjOrder::getCheckStatus, 1); |
| | | TjOrder one = tjOrderService.getOne(wq1); |
| | | if (one == null) { |
| | | return AjaxResult.success("体检暂未完成!!"); |
| | | @GetMapping("/updatePhone") |
| | | @ApiOperation(value = "小程序-修改手机号接口") |
| | | public AjaxResult updatePhone(@RequestParam @ApiParam(value = "身份证号") String sfzh, |
| | | @RequestParam @ApiParam(value = "姓名") String name, |
| | | @RequestParam @ApiParam(value = "手机号") String phone) { |
| | | if(StrUtil.isBlank(sfzh) || StrUtil.isBlank(name) || StrUtil.isBlank(phone)){ |
| | | return AjaxResult.error("请输入正确的信息!"); |
| | | } |
| | | |
| | | List<ShenGaoTiZhongVo> maps = detailService.getShenGaoTiZhongList(one.getTjNumber()); |
| | | |
| | | log.info("ltkj {}的体检报告查询详情"+maps,tjNumber); |
| | | return AjaxResult.success(maps); |
| | | if(!MatchUtils.isIdCard(sfzh)){ |
| | | return AjaxResult.error("身份证号格式错误 请核对后重新输入!"); |
| | | } |
| | | LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjCustomer::getCusIdcard, sfzh); |
| | | wq.like(TjCustomer::getCusName, name); |
| | | TjCustomer customer = customerService.getOne(wq); |
| | | if(null != customer){ |
| | | if(!MatchUtils.isMobileNO( phone)){ |
| | | return AjaxResult.error("手机号不正确 请核对后重新输入!"); |
| | | } |
| | | customer.setCusPhone( phone); |
| | | customerService.updateById(customer); |
| | | return AjaxResult.success("修改成功!"); |
| | | } |
| | | return AjaxResult.error("未查询到该人员!"); |
| | | |
| | | } |
| | | |