| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | |
| | | @RestController |
| | | @RequestMapping("/hosp/customer") |
| | | @Api(tags = "客户管理接口") |
| | | @Slf4j |
| | | public class TjCustomerController extends BaseController { |
| | | @Resource |
| | | private ITjCustomerService tjCustomerService; |
| | |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody @ApiParam(value = "客户对象") TjCustomer tjCustomer) { |
| | | |
| | | try { |
| | | TjCustomer customer = tjCustomerService.getById(tjCustomer.getCusId()); |
| | | if(null==customer){ |
| | | return AjaxResult.error("该人员不存在!"); |
| | |
| | | |
| | | tjCustomer.setCusPhone(cusPhone); |
| | | tjCustomer.setPym(PinyinUtil.getFirstLetter(tjCustomer.getCusName(),"")); |
| | | tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd")); |
| | | if (tjCustomerService.updateById(tjCustomer)) { |
| | | String config = sysConfigService.selectConfigByKey("sfkqdyhis"); |
| | | if (null != config && config.equals("Y")) { |
| | |
| | | } |
| | | } |
| | | return AjaxResult.error(); |
| | | } catch (Exception e) { |
| | | log.error(e.toString()); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |