| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ltkj.common.core.controller.BaseController; |
| | |
| | | */ |
| | | @PostMapping |
| | | @ApiOperation(value = "新增客户") |
| | | @Transactional |
| | | public AjaxResult add(@RequestBody @ApiParam(value = "客户对象信息") TjCustomer tjCustomer) { |
| | | if (null == tjCustomer.getCusIdcard() || null == tjCustomer.getCusPhone()) { |
| | | return AjaxResult.error("请输入身份证号或手机号"); |
| | |
| | | if(null !=config && config.equals("Y")){ |
| | | AjaxResult tjCustomer1 = suijieHisXinXi(tjCustomer, date); |
| | | if (tjCustomer1 != null) return tjCustomer1; |
| | | }else { |
| | | if (tjCustomerService.save(tjCustomer)) { |
| | | return AjaxResult.success(tjCustomer); |
| | | } |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | |
| | | String hisRegistrationId = resultDatasss.get("his_registration_id").toString(); |
| | | if (null != hisRegistrationId) { |
| | | //门诊医生接诊 |
| | | AjaxResult result3 = controller.Outpinconapply(hisRegistrationId, date, SecurityUtils.getUsername()); |
| | | AjaxResult result3 = controller.Outpinconapply(hisRegistrationId, date,"00029"); |
| | | String result4 = getAjaxResult(result3); |
| | | JSONObject object2 = getJSONObject(result4); |
| | | String code2 = object2.getStr("ResultCode"); |
| | | if (code2.equals("0")) { |
| | | Map<String, Object> data = object2.getJSONObject("ResultData"); |
| | | String toString = data.get("his_registration_id").toString(); |
| | | // tjCustomer.setPationId(pationid); |
| | | tjCustomer.setCardId(toString); |
| | | String hisRegistrationId1 = data.get("his_registration_id").toString(); |
| | | tjCustomer.setPationId(pationid); |
| | | tjCustomer.setCardId(hisRegistrationId1); |
| | | // tjCustomerService.updateById(tjCustomer); |
| | | } |
| | | } |