| | |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.common.core.domain.entity.SysUser; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.enums.DataSourceType; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.common.utils.StringUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.framework.datasource.DynamicDataSourceContextHolder; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.mapper.TestMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.sqlDomain.*; |
| | | import com.ltkj.hosp.vodomain.CsProVo; |
| | | import com.ltkj.hosp.vodomain.UpdateOrderRemarkVo; |
| | | import com.ltkj.mall.mallOrderUtils.TjConstants; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.apache.poi.hemf.record.emfplus.HemfPlusRecordType.save; |
| | | |
| | | /** |
| | | * @Author: 西安路泰科技有限公司/赵佳豪 |
| | |
| | | private ISysConfigService configService; |
| | | @Resource |
| | | private ISysDeptService deptService; |
| | | @Resource |
| | | private TestMapper testMapper; |
| | | @Resource |
| | | private TjvLtkjvtjpatService tjvLtkjvtjpatService; |
| | | |
| | | @Resource |
| | | private LtkjMiddleDetailService middleDetailService; |
| | | |
| | | @Resource |
| | | private LtkjMiddleHeadService headService; |
| | | @Resource |
| | | private LtkjExamJcbgdService ltkjExamJcbgdService; |
| | | @Resource |
| | | private LtkjExamJcsqdService ltkjExamJcsqdService; |
| | | @Resource |
| | | private LtkjHybgdService ltkjHybgdService; |
| | | @Resource |
| | | private LtkjHysqdService ltkjHysqdService; |
| | | |
| | | |
| | | |
| | | @GetMapping("/getOperationPermissionsByTjNum") |
| | |
| | | */ |
| | | @GetMapping("/confirmOrder") |
| | | @ApiOperation(value = "初审(并修改状态)接口") |
| | | // @PreAuthorize("@ss.hasPermi('check:check:confirmOrder')") |
| | | @Transactional |
| | | public AjaxResult confirmOrder(@ApiParam(value = "tjNumber") @RequestParam String tjNumber, |
| | | @ApiParam(value = "状态 0同意 1拒绝 默认同意") @RequestParam(defaultValue = "0") Integer status, |
| | |
| | | |
| | | |
| | | /** |
| | | * 同步数据接口 |
| | | */ |
| | | @GetMapping("/dataSynchronization") |
| | | @ApiOperation(value = "同步数据接口") |
| | | @Transactional |
| | | public AjaxResult dataSynchronization(@RequestParam String tjNumber){ |
| | | List<LtkjHysqd> one = testMapper.getHysqdByTmh(tjNumber); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjHysqd hysqd : one) { |
| | | ltkjHysqdService.save(hysqd); |
| | | |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(hysqd.getTmh()); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjHybgd hybgd : one1) { |
| | | ltkjHybgdService.save(hybgd); |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | |
| | | List<LtkjExamJcsqd> one2 = testMapper.getExamJcsqdTmh(tjNumber); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjExamJcsqd examJcsqd : one2) { |
| | | ltkjExamJcsqdService.save(examJcsqd); |
| | | |
| | | List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(examJcsqd.getTmh()); |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjExamJcbgd examJcbgd : one3) { |
| | | ltkjExamJcbgdService.save(examJcbgd); |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 查询体检记录客户列表 |
| | | * |
| | | * @param tjNumber |
| | | * @param checkStatus |
| | | * @param page |
| | | * @param pageSize |
| | | * @param compId |
| | | * @param beginTime |
| | | * @param endTime |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | @ApiOperation(value = "查询体检记录客户列表")//0待1已 |
| | |
| | | customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone())); |
| | | customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard())); |
| | | customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | customer.setTjCategory(tjOrder.getTjCategory()); |
| | | if (tjOrder.getFirmId().equals("0")) { |
| | | customer.setTjCompName(null); |
| | | } else { |
| | |
| | | // longList.add(Long.valueOf(str)); |
| | | // } |
| | | // } |
| | | // parent.put("parentAdvice", tjAdviceService.getAdviceStringByIds(longList)); |
| | | parent.put("parentAdvice", tjAdviceService.getAdviceStringsByIds(Arrays.asList(split))); |
| | | parent.put("parentAdvice", tjAdviceService.getAdviceStringByIds(split)); |
| | | |
| | | } else { |
| | | parent.put("parentAdvice", null); |
| | |
| | | customer.setTjTime(tjOrder.getCreateTime()); |
| | | customer.setFinishTime(tjOrder.getFinishTime()); |
| | | customer.setConfirmStatus(String.valueOf(tjOrder.getStatus())); |
| | | customer.setTjCategory(tjOrder.getTjCategory()); |
| | | if (tjOrder.getFirmId() == null) { |
| | | customer.setTjCompName("无"); |
| | | } else { |