| | |
| | | |
| | | if (customer != null) { |
| | | customer.setConnect(tjCustomer.getConnect()); |
| | | if (customerService.updateById(customer)) { |
| | | if(null !=key && key.equals("Y")){ |
| | | AjaxResult xinXi = suijieHisXinXi(tjCustomer); |
| | | if(!xinXi.get("code").toString().equals("200")){ |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("注册失败,请到前台登记!" + xinXi.get("msg").toString()); |
| | | } |
| | | } |
| | | } |
| | | customerService.updateById(customer); |
| | | return AjaxResult.success(customer); |
| | | } |
| | | String substring = cusIdcard.substring(cusIdcard.length() - 6); |
| | |
| | | tjCustomer.setCusPassword(substring); |
| | | tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(cusIdcard), "yyyy-MM-dd")); |
| | | tjCustomer.setCusSex(Long.valueOf(MatchUtils.getSexByIdCard(cusIdcard))); |
| | | //tjCustomer.setAddr(MatchUtils.getNativePlace(Integer.parseInt((cusIdcard)))); |
| | | tjCustomer.setAge(String.valueOf(MatchUtils.getAgeByIdCard(cusIdcard))); |
| | | tjCustomer.setIdType("1"); |
| | | tjCustomer.setAgeUnit("0"); |
| | |
| | | tjCustomer.setCusIntroduce("无"); |
| | | tjCustomer.setCusNumber(0L); |
| | | tjCustomer.setCusIsvip("N"); |
| | | if (customerService.save(tjCustomer)) { |
| | | if(null !=key && key.equals("Y")){ |
| | | AjaxResult xinXi = suijieHisXinXi(tjCustomer); |
| | | if(!xinXi.get("code").toString().equals("200")){ |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("注册失败,请到前台登记!" + xinXi.get("msg").toString()); |
| | | } |
| | | } |
| | | } else { |
| | | customerService.save(tjCustomer); |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | return AjaxResult.error("添加失败"); |
| | | |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | |
| | | /** |
| | |
| | | one.setCusPhone(tjCustomer.getCusPhone()); |
| | | one.setCusNational(tjCustomer.getCusNational()); |
| | | one.setCusMarryStatus(tjCustomer.getCusMarryStatus()); |
| | | if (customerService.updateById(one)) { |
| | | |
| | | if(null !=key && key.equals("Y")){ |
| | | AjaxResult xinXi = suijieHisXinXi(one); |
| | | if(!xinXi.get("code").toString().equals("200")){ |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("添加就诊人信息失败!" + xinXi.get("msg").toString()); |
| | | return AjaxResult.error("修改就诊人信息失败!" + xinXi.get("msg").toString()); |
| | | } |
| | | } else { |
| | | if (!customerService.updateById(one)) { |
| | | return AjaxResult.error("修改失败"); |
| | | } |
| | | } |
| | | return AjaxResult.success(one); |
| | | } |
| | | return AjaxResult.error("修改失败"); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //将方法返回值解析成json格式 |
| | | public JSONObject getJSONObject(String builder) { |
| | | String Response = JSONUtil.parseObj(builder).getStr("Response"); |
| | |
| | | if (null != resultData && resultData.size() > 0) { |
| | | String pationid = resultData.get("PationId").toString(); |
| | | if (null != pationid) { |
| | | try { |
| | | if (tjCustomer.getCusId() == null) { |
| | | tjCustomer.setPationId(pationid); |
| | | customerService.updateById(tjCustomer); |
| | | } |
| | | customerService.saveOrUpdate(tjCustomer); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return AjaxResult.error("操作失败!"); |
| | | } |
| | | //保存注册入参出参 |
| | | resultData.put("cardId",pationid); |
| | | JSONObject object4 = JSONUtil.parseObj(resultData); |
| | |
| | | } |
| | | |
| | | } |
| | | return AjaxResult.success(); |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | return AjaxResult.error(object.getStr("ResultContent")); |
| | | } |