ltkj-admin/src/main/java/com/ltkj/web/controller/api/DefaultController.java
@@ -9,10 +9,8 @@ import com.itextpdf.text.Paragraph; import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.framework.config.MatchUtils; import com.ltkj.hosp.domain.DictHosp; import com.ltkj.hosp.domain.TjCustomer; import com.ltkj.hosp.domain.TjOrder; import com.ltkj.hosp.domain.TjOrderYcxm; import com.ltkj.framework.config.UserHoder; import com.ltkj.hosp.domain.*; import com.ltkj.hosp.mapper.TjCustomerMapper; import com.ltkj.hosp.service.*; import com.ltkj.hosp.vodomain.ShenGaoTiZhongVo; @@ -481,6 +479,24 @@ } // @PostMapping("/wx/bindPhoneV2") // public AjaxResult bindPhoneV2(@RequestBody String json) { // cn.hutool.json.JSONObject entries = JSONUtil.parseObj(json); // String phone = entries.getStr("phone"); // Wxuser wxuser = UserHoder.getWxuser(); // LambdaQueryWrapper<Wxuser> wq = new LambdaQueryWrapper<>(); // wq.eq(Wxuser::getOpenid, wxuser.getOpenid()); // Wxuser one = wxuserService.getOne(wq); // System.out.println("绑定 ->"+wxuser.getOpenid()+",json = "+json); // if (one != null){ // one.setPhone(phone); // wxuserService.updateById(one); // return AjaxResult.success(); // } // return AjaxResult.error(); // } public static void removeNullFields(JSONObject jsonObject) { ArrayList<String> strings = new ArrayList<>(); strings.add("orderId"); ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -92,7 +92,7 @@ wq.eq(TjCustomer::getCusPhone, tjCustomer.getCusPhone()); wq.eq(TjCustomer::getCusName, tjCustomer.getCusName()); final TjCustomer one = customerService.getOne(wq); one.setConnect(""); one.setConnect(null); final boolean b = customerService.updateById(one); if (b) { return AjaxResult.success(); @@ -132,14 +132,15 @@ // } // } LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>(); wq.eq(TjCustomer::getCusIdcard, cusIdcard); TjCustomer customer = customerService.getOne(wq); TjCustomer customer = customerService.getTjCustomerByCusIdCard(cusIdcard); String key = sysConfigService.selectConfigByKey("sfkqdyhis"); if (customer != null) { customer.setConnect(tjCustomer.getConnect()); customer.setCusPhone(tjCustomer.getCusPhone()); customer.setCusMarryStatus(tjCustomer.getCusMarryStatus()); customerService.updateById(customer); return AjaxResult.success(customer); } @@ -261,7 +262,7 @@ LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); qw.eq(TjCustomer::getCusPhone, phone); List<TjCustomer> tjCustomer1 = customerService.list(qw); if (tjCustomer1 != null && tjCustomer1.size() > 0) { if (tjCustomer1 != null && !tjCustomer1.isEmpty()) { List<String> num = new ArrayList<>(); for (TjCustomer tjCustomer : tjCustomer1) { num.add(tjCustomer.getCusIdcard()); ltkj-admin/src/main/java/com/ltkj/web/controller/app/ReportController.java
@@ -104,7 +104,7 @@ LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>(); wq1.eq(TjCustomer::getCusPhone, cusPhone); List<TjCustomer> list1 = customerService.list(wq1); if (list1.size() != 0) { if (null != list1 && !list1.isEmpty()) { for (TjCustomer tjCustomer : list1) { Map<String, Object> map = new HashMap<>(); QueryWrapper<TjOrder> wq2 = new QueryWrapper<>(); @@ -113,7 +113,7 @@ wq2.isNotNull("finish_time"); wq2.orderByDesc("finish_time"); List<TjOrder> list = orderService.list(wq2); if (null != list && list.size() > 0) { if (null != list && !list.isEmpty()) { TjOrder tjOrder = orderService.list(wq2).get(0); map.put("report", tjOrder); map.put("customer", tjCustomer); ltkj-admin/src/main/java/com/ltkj/web/controller/app/WxloginController.java
@@ -388,7 +388,7 @@ LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); qw.eq(TjCustomer::getCusPhone, phone); List<TjCustomer> tjCustomer1 = customerService.list(qw); if (tjCustomer1 != null && tjCustomer1.size()>0) { if (tjCustomer1 != null && !tjCustomer1.isEmpty()) { for (TjCustomer tjCustomer : tjCustomer1) { tjCustomer.setConnect(openId); customerService.updateById(tjCustomer); ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -151,6 +151,7 @@ @PostMapping(value = "/cusIdcard") @ApiOperation(value = "根据身份证号获取用户信息") // @Log(title = "客户身份信息", businessType = BusinessType.EXPORT) @RepeatSubmit public AjaxResult getInfoByIdCard(@RequestParam @ApiParam(value = "客户身份证号") String cusIdcard) { if (!"".equals(cusIdcard) && cusIdcard != null) { @@ -229,9 +230,7 @@ tjReservationService.updateById(tjReservation); return AjaxResult.error("对不起您的预约已超时请重新预约"); } LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); qw.eq(TjCustomer::getCusIdcard, cusIdcard); TjCustomer tjCustomer1 = tjCustomerService.getOne(qw); TjCustomer tjCustomer1 = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); if (tjCustomer1 != null) { // if (null != tjReservation.getCompanyId()) tjCustomer1.setDictCompId(Long.valueOf(tjReservation.getCompanyId())); // if (null != tjReservation.getCompany()) tjCustomer1.setCompName(tjReservation.getCompany()); @@ -327,7 +326,9 @@ } else if(null != s && s.equalsIgnoreCase("Y")) { tjCustomer = isRequestCommonHisApi(tjCustomer); } tjCustomerService.save(tjCustomer); // TjCustomer tjCustomerByCusIdCard = tjCustomerService.getTjCustomerByCusIdCard(cusIdcard); // if(null != tjCustomerByCusIdCard) tjCustomerService.save(tjCustomer); tjCustomer.setTeamNo(tjReservation.getTeamNo()); tjCustomer.setCompId(tjReservation.getCompanyId()); tjCustomer.setReservationId(tjReservation.getId());