zhaowenxuan
2 天以前 2a85542341319a4085b04ec9a6a667be6ae799df
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -163,11 +163,6 @@
                        return AjaxResult.error("身份证号码错误");
                    }
                }
//                if(cusIdcard.length()==9){
//                    if (!MatchUtils.cardValidates(cusIdcard)) {
//                        return AjaxResult.error("身份证号码错误");
//                    }
//                }
            }
@@ -287,8 +282,8 @@
                    tjCustomer.setCusPhone(tjReservation.getPhoe());
                    tjCustomer.setCusEmail(tjReservation.getEmail());
                    tjCustomer.setCusAddr(tjReservation.getAddress());
                    tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage()));
                    tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()));
                    tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())==null ?"0": tjReservation.getMarriage().toString());
                    tjCustomer.setCusNational(String.valueOf(tjReservation.getNation()) ==null ? "0": tjReservation.getNation().toString());
                    tjCustomer.setIdType(tjReservation.getIdType());
                    tjCustomer.setAge(tjReservation.getAge());
@@ -318,7 +313,7 @@
                                String pationid = resultData.get("PationId").toString();
                                if (null != pationid) {
                                    tjCustomer.setPationId(pationid);
                                    tjCustomerService.save(tjCustomer);
//                                    tjCustomerService.save(tjCustomer);
                                    //保存注册入参出参
                                    resultData.put("cardId",pationid);
                                    JSONObject object4 = JSONUtil.parseObj(resultData);
@@ -330,18 +325,15 @@
                            }
                        }
                    } else if(null != s && s.equalsIgnoreCase("Y")) {
                        TjCustomer requestCommonHisApi = isRequestCommonHisApi(tjCustomer);
                        if (null !=requestCommonHisApi){
                            tjCustomerService.save(requestCommonHisApi);
                        }
                    }else {
                        tjCustomerService.save(tjCustomer);
                        tjCustomer = isRequestCommonHisApi(tjCustomer);
                    }
                    tjCustomer.setTeamNo(tjReservation.getTeamNo());
                    tjCustomer.setCompId(tjReservation.getCompanyId());
                    tjCustomer.setReservationId(tjReservation.getId());
                    tjCustomer.setDiscount(tjReservation.getDiscount());
                    tjCustomer.setGroupingId(tjReservation.getGroupingId());
                        tjCustomerService.save(tjCustomer);
                        tjCustomer.setTeamNo(tjReservation.getTeamNo());
                        tjCustomer.setCompId(tjReservation.getCompanyId());
                        tjCustomer.setReservationId(tjReservation.getId());
                        tjCustomer.setDiscount(tjReservation.getDiscount());
                        tjCustomer.setGroupingId(tjReservation.getGroupingId());
                    return success(tjCustomer);
                }
@@ -354,16 +346,7 @@
            if (null == tjCustomerServiceOne) {
                return AjaxResult.error("该人员信息不存在请先进行登记!!!");
            }
//            if (null != key && key.equals("Y")) {
                String cardId = tjCustomerServiceOne.getCardId();
                if (null != cardId && !cardId.equals("0")) {
//                    int i = tjOrderService.selectTjOrderByCardId(cardId);
//                    if (i > 0) {
//                        return AjaxResult.error("不可重复签到");
//                    }
                }
//            }
            if(!tjCustomerServiceOne.getAge().equals(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday())))){
                tjCustomerServiceOne.setAge(String.valueOf(DateUtil.ageOfNow(tjCustomerServiceOne.getCusBrithday())));
                tjCustomerService.updateById(tjCustomerServiceOne);