|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
package com.glxp.api.service.sync;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import com.glxp.api.dao.collect.RelCodeBatchMapper;
|
|
|
|
|
import com.glxp.api.dao.collect.RelCodeDetailMapper;
|
|
|
|
|
import com.glxp.api.dao.dev.*;
|
|
|
|
|
import com.glxp.api.dao.thrsys.ThrManufacturerMapper;
|
|
|
|
|
import com.glxp.api.entity.collect.RelCodeBatch;
|
|
|
|
@ -1802,6 +1804,9 @@ public class HeartService {
|
|
|
|
|
case PRODUCE_BUSINESS_DATA:
|
|
|
|
|
this.insertProBusinessData(bean.getFileContent());
|
|
|
|
|
break;
|
|
|
|
|
case DRUG_DATA_TASK:
|
|
|
|
|
this.insertDrugData(bean.getFileContent());
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
String taskId = bean.getTaskId();
|
|
|
|
|
if (StrUtil.isNotBlank(taskId)) {
|
|
|
|
@ -2188,6 +2193,31 @@ public class HeartService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 批量 || 插入 药品关联信息
|
|
|
|
|
* insertDrugData
|
|
|
|
|
*/
|
|
|
|
|
@Resource
|
|
|
|
|
RelCodeDetailMapper relCodeDetailMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
RelCodeBatchMapper relCodeBatchMapper;
|
|
|
|
|
|
|
|
|
|
@Transactional(propagation = Propagation.NESTED)
|
|
|
|
|
public void insertDrugData(String content){
|
|
|
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
|
|
|
|
|
SpsSyncDrugDataTaskResponse spsSyncDrugDataTaskResponse = JSONUtil.toBean(String.valueOf(jsonObject.get(SpsSyncDrugDataTaskResponse.class.getSimpleName())), SpsSyncDrugDataTaskResponse.class);
|
|
|
|
|
|
|
|
|
|
if (CollectionUtil.isNotEmpty(spsSyncDrugDataTaskResponse.getRelCodeBatches())) {
|
|
|
|
|
for (RelCodeBatch entity : spsSyncDrugDataTaskResponse.getRelCodeBatches()) {
|
|
|
|
|
entity.setUpdateTime(null);
|
|
|
|
|
}
|
|
|
|
|
boolean b = relCodeBatchMapper.replaceBatchs(spsSyncDrugDataTaskResponse.getRelCodeBatches());
|
|
|
|
|
}
|
|
|
|
|
if (CollectionUtil.isNotEmpty(spsSyncDrugDataTaskResponse.getRelCodeDetails())) {
|
|
|
|
|
boolean b = relCodeDetailMapper.replaceBatchs(spsSyncDrugDataTaskResponse.getRelCodeDetails());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 从UDI自助平台拉取基础数据
|
|
|
|
|
*/
|
|
|
|
|