| | |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.save; |
| | | |
| | | |
| | | @RestController |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getLtkjTjPatById") |
| | | public AjaxResult getLtkjTjPatById(String id) { |
| | | LtkjTjPat one = testMapper.getTjPatById(id); |
| | | |
| | | @GetMapping("/getTjPatByCusId") |
| | | public AjaxResult getTjPatByCusId(String cusId) { |
| | | testMapper.getTjPatByCusId(cusId); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/saveMiddleHeadByPatId") |
| | | public AjaxResult saveMiddleHeadByPatId(String id) { |
| | | List<LtkjMiddleHead> one = testMapper.saveMiddleHeadByPatId(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = tjvLtkjvtjpatService.save(one); |
| | | for (LtkjMiddleHead ltkjMiddleHead : one) { |
| | | final boolean save = headService.save(ltkjMiddleHead); |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getMiddleDetailById") |
| | | public AjaxResult getMiddleDetailById(String id) { |
| | | LtkjMiddleDetail one = testMapper.getMiddleDetailById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = middleDetailService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | @GetMapping("/getMiddleDetailByHeadId") |
| | | public AjaxResult getMiddleDetailByHeadId(String id) { |
| | | List<LtkjMiddleDetail> one = testMapper.getMiddleDetailByHeadId(id); |
| | | for (LtkjMiddleDetail ltkjMiddleDetail : one) { |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = middleDetailService.save(ltkjMiddleDetail); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | return AjaxResult.success(one); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getMiddleHeadById") |
| | | public AjaxResult getMiddleHeadById(String id) { |
| | | LtkjMiddleHead one = testMapper.getMiddleHeadById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = headService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getExamJcbgdById") |
| | | public AjaxResult getExamJcbgdById(String id) { |
| | | LtkjExamJcbgd one = testMapper.getExamJcbgdById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = ltkjExamJcbgdService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | |
| | | @GetMapping("/getExamJcsqdById") |
| | | public AjaxResult getExamJcsqdById(String id) { |
| | | LtkjExamJcsqd one = testMapper.getExamJcsqdById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = ltkjExamJcsqdService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | |
| | | @GetMapping("/getHybgdById") |
| | | public AjaxResult getHybgdById(String id) { |
| | | LtkjHybgd one = testMapper.getHybgdById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = ltkjHybgdService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | |
| | | @GetMapping("/getHysqdById") |
| | | public AjaxResult getHysqdById(String id) { |
| | | LtkjHysqd one = testMapper.getHysqdById(id); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | final boolean save = ltkjHysqdService.save(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | return AjaxResult.success(save); |
| | | } |
| | | } |