bug修复

master
wj 2 years ago
parent 9fc23761ac
commit bc5891aa28

@ -562,17 +562,17 @@ public class HeartService {
*/
@Transactional(propagation = Propagation.NESTED)
public void insertBasicData(String content) {
Dict map = JsonUtils.parseMap(content);
List<BasicHospTypeEntity> hospTypeList = (List<BasicHospTypeEntity>) map.get(BasicHospTypeEntity.class.getSimpleName());
List<UdiRelevanceEntity> udiRelevanceList = (List<UdiRelevanceEntity>) map.get(UdiRelevanceEntity.class.getSimpleName());
List<BasicProductsEntity> productsList = (List<BasicProductsEntity>) map.get(BasicProductsEntity.class.getSimpleName());
List<CompanyProductRelevanceEntity> relevanceList = (List<CompanyProductRelevanceEntity>) map.get(CompanyProductRelevanceEntity.class.getSimpleName());
List<BasicCorpEntity> corpList = (List<BasicCorpEntity>) map.get(BasicCorpEntity.class.getSimpleName());
List<SupCertEntity> supCertList = (List<SupCertEntity>) map.get(SupCertEntity.class.getSimpleName());
List<SupCertSetEntity> supCertSetList = (List<SupCertSetEntity>) map.get(SupCertSetEntity.class.getSimpleName());
List<SupCompanyEntity> supCompanyList = (List<SupCompanyEntity>) map.get(SupCompanyEntity.class.getSimpleName());
List<SupManufacturerEntity> supManufacturerList = (List<SupManufacturerEntity>) map.get(SupManufacturerEntity.class.getSimpleName());
List<SupProductEntity> supProductList = (List<SupProductEntity>) map.get(SupProductEntity.class.getSimpleName());
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
List<BasicHospTypeEntity> hospTypeList = JSONUtil.toList(jsonObject.getJSONArray(BasicHospTypeEntity.class.getSimpleName()), BasicHospTypeEntity.class);
List<UdiRelevanceEntity> udiRelevanceList = JSONUtil.toList(jsonObject.getJSONArray(UdiRelevanceEntity.class.getSimpleName()), UdiRelevanceEntity.class);
List<BasicProductsEntity> productsList = JSONUtil.toList(jsonObject.getJSONArray(BasicProductsEntity.class.getSimpleName()), BasicProductsEntity.class);
List<CompanyProductRelevanceEntity> relevanceList = JSONUtil.toList(jsonObject.getJSONArray(CompanyProductRelevanceEntity.class.getSimpleName()), CompanyProductRelevanceEntity.class);
List<BasicCorpEntity> corpList = JSONUtil.toList(jsonObject.getJSONArray(BasicCorpEntity.class.getSimpleName()), BasicCorpEntity.class);
List<SupCertEntity> supCertList = JSONUtil.toList(jsonObject.getJSONArray(SupCertEntity.class.getSimpleName()), SupCertEntity.class);
List<SupCertSetEntity> supCertSetList = JSONUtil.toList(jsonObject.getJSONArray(SupCertSetEntity.class.getSimpleName()), SupCertSetEntity.class);
List<SupCompanyEntity> supCompanyList = JSONUtil.toList(jsonObject.getJSONArray(SupCompanyEntity.class.getSimpleName()), SupCompanyEntity.class);
List<SupManufacturerEntity> supManufacturerList = JSONUtil.toList(jsonObject.getJSONArray(SupManufacturerEntity.class.getSimpleName()), SupManufacturerEntity.class);
List<SupProductEntity> supProductList = JSONUtil.toList(jsonObject.getJSONArray(SupProductEntity.class.getSimpleName()), SupProductEntity.class);
if (CollectionUtil.isNotEmpty(hospTypeList)) {
basicHospTypeDao.insertOrUpdateBatch(hospTypeList);
@ -617,9 +617,9 @@ public class HeartService {
*/
@Transactional(propagation = Propagation.NESTED)
public void insertOtherData(String content) {
Dict map = JsonUtils.parseMap(content);
List<IoCodeLostEntity> ioCodeLostList = (List<IoCodeLostEntity>) map.get(IoCodeLostEntity.class.getSimpleName());
List<IoCodeRelEntity> ioCodeRelList = (List<IoCodeRelEntity>) map.get(IoCodeRelEntity.class.getSimpleName());
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(content);
List<IoCodeLostEntity> ioCodeLostList = JSONUtil.toList(jsonObject.getJSONArray(IoCodeLostEntity.class.getSimpleName()), IoCodeLostEntity.class);
List<IoCodeRelEntity> ioCodeRelList = JSONUtil.toList(jsonObject.getJSONArray(IoCodeRelEntity.class.getSimpleName()), IoCodeRelEntity.class);
if (CollectionUtil.isNotEmpty(ioCodeLostList)) {
ioCodeLostMapper.insertOrUpdateBatch(ioCodeLostList);
}

@ -20,8 +20,8 @@ import javax.annotation.Resource;
import java.util.Arrays;
//@Component
//@EnableScheduling
@Component
@EnableScheduling
public class SyncHeartTask implements SchedulingConfigurer {
final Logger logger = LoggerFactory.getLogger(SyncHeartTask.class);

Loading…
Cancel
Save