|
|
|
@ -1,13 +1,17 @@
|
|
|
|
|
package com.docus.bgts.service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.docus.bgts.entity.*;
|
|
|
|
|
import com.docus.bgts.enums.Codes;
|
|
|
|
|
import com.docus.bgts.facade.IAfCollectTaskService;
|
|
|
|
|
import com.docus.bgts.mapper.AfCollectTaskMapper;
|
|
|
|
|
import com.docus.bgts.mapper.AfInterfaceCollectMapper;
|
|
|
|
|
import com.docus.bgts.mapper.AfInterfaceCollectSubMapper;
|
|
|
|
|
import com.docus.bgts.utils.FileUtils;
|
|
|
|
|
import com.docus.bgts.utils.HttpUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
@ -15,8 +19,11 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <p>
|
|
|
|
@ -29,7 +36,7 @@ import java.util.List;
|
|
|
|
|
@Service
|
|
|
|
|
public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, AfCollectTask> implements IAfCollectTaskService {
|
|
|
|
|
|
|
|
|
|
private Logger log= LogManager.getLogger();
|
|
|
|
|
private Logger log = LogManager.getLogger();
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
AfCollectTaskMapper afCollectTaskMapper;
|
|
|
|
@ -49,7 +56,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
@Transactional
|
|
|
|
|
@Override
|
|
|
|
|
public void insert(ReportDownDto reportDownDto) {
|
|
|
|
|
log.info("新增任务表初始数据:"+reportDownDto);
|
|
|
|
|
log.info("新增任务表初始数据:" + reportDownDto);
|
|
|
|
|
AfCollectTask afCollectTask;
|
|
|
|
|
String patientId = getpatientIdByEmpId(reportDownDto.getPatient().getJzh());
|
|
|
|
|
if (StringUtils.isBlank(patientId)) {
|
|
|
|
@ -116,4 +123,17 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void invokeRepoalFile(CanlcelDto canlcelDto) throws Exception {
|
|
|
|
|
//上传接口地址
|
|
|
|
|
Map<String, Object> headMap = new HashMap<>();
|
|
|
|
|
headMap.put("Content-Type", "application/json");
|
|
|
|
|
log.info("开始文件撤回操作:"+canlcelDto);
|
|
|
|
|
String post = HttpUtils.post(String.valueOf(FileUtils.getJsonByName(Codes.REPOAL.getMessage())), headMap, JSON.parseObject(JSON.toJSONString(canlcelDto), Map.class));
|
|
|
|
|
Map resMap = JSON.parseObject(post, Map.class);
|
|
|
|
|
if (String.valueOf(resMap.get("code")).equals("500")) {
|
|
|
|
|
throw new RuntimeException(String.valueOf(resMap.get("msg")));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|