zjh
11 小时以前 a0dde8aa21d8bc2b55ccbb2278fc730f75f7ef8b
ltkj-admin/src/main/java/com/ltkj/web/controller/api/DefaultController.java
@@ -8,10 +8,12 @@
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;
@@ -25,6 +27,7 @@
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;
@@ -50,6 +53,8 @@
    private TjCheckController tjCheckController;
    @Autowired
    private TjCustomerMapper tjCustomerMapper;
    @Resource
    private ITjCustomerService customerService;
    @Autowired
    private ITjOrderService tjOrderService;
    @Autowired
@@ -300,22 +305,30 @@
    /**
     * 小程序点击体检报告查询详情,显示身高体重体重指数收缩压舒张压
     */
    @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("未查询到该人员!");
    }