diff --git a/src/main/java/com/glxp/api/service/sync/HeartService.java b/src/main/java/com/glxp/api/service/sync/HeartService.java index e402e33..857a291 100644 --- a/src/main/java/com/glxp/api/service/sync/HeartService.java +++ b/src/main/java/com/glxp/api/service/sync/HeartService.java @@ -1,72 +1,176 @@ package com.glxp.api.service.sync; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONArray; -import cn.hutool.json.JSONUtil; +import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_ORDER; +import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_UDIS; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.WeakHashMap; +import java.util.function.Function; + +import javax.annotation.Resource; + +import org.apache.ibatis.session.ExecutorType; +import org.apache.ibatis.session.SqlSession; +import org.apache.ibatis.session.SqlSessionFactory; +import org.apache.ibatis.session.TransactionIsolationLevel; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.ApplicationContext; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; -import com.glxp.api.constant.*; -import com.glxp.api.dao.basic.*; -import com.glxp.api.dao.inout.*; -import com.glxp.api.dao.purchase.*; +import com.glxp.api.constant.BasicExportStatusTimeEnum; +import com.glxp.api.constant.BasicExportTypeEnum; +import com.glxp.api.constant.BasicProcessStatus; +import com.glxp.api.constant.Constant; +import com.glxp.api.constant.ConstantStatus; +import com.glxp.api.constant.StatusEnum; +import com.glxp.api.dao.basic.BasicBusTypeChangeDao; +import com.glxp.api.dao.basic.BasicBussinessTypeDao; +import com.glxp.api.dao.basic.BasicCorpDao; +import com.glxp.api.dao.basic.BasicHospTypeDao; +import com.glxp.api.dao.basic.BasicProductsDao; +import com.glxp.api.dao.basic.CompanyProductRelevanceDao; +import com.glxp.api.dao.basic.ProductInfoDao; +import com.glxp.api.dao.basic.UdiCompanyDao; +import com.glxp.api.dao.basic.UdiRelevanceDao; +import com.glxp.api.dao.inout.IoCodeLostMapper; +import com.glxp.api.dao.inout.IoCodeRelMapper; +import com.glxp.api.dao.inout.IoOrderDao; +import com.glxp.api.dao.inout.IoOrderDetailBizDao; +import com.glxp.api.dao.inout.IoOrderDetailCodeDao; +import com.glxp.api.dao.inout.IoOrderInvoiceMapper; +import com.glxp.api.dao.purchase.SupCertDao; +import com.glxp.api.dao.purchase.SupCertSetDao; +import com.glxp.api.dao.purchase.SupCompanyDao; +import com.glxp.api.dao.purchase.SupManufacturerDao; +import com.glxp.api.dao.purchase.SupProductDao; import com.glxp.api.dao.thrsys.ThrBusTypeOriginDao; import com.glxp.api.dto.RelaySyncDto; -import com.glxp.api.entity.auth.*; -import com.glxp.api.entity.basic.*; -import com.glxp.api.entity.inout.*; -import com.glxp.api.entity.purchase.*; +import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.auth.DeptEntity; +import com.glxp.api.entity.auth.DeptUserEntity; +import com.glxp.api.entity.auth.InvBusUserEntity; +import com.glxp.api.entity.auth.InvSpace; +import com.glxp.api.entity.auth.InvWarehouseEntity; +import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity; +import com.glxp.api.entity.auth.WarehouseUserEntity; +import com.glxp.api.entity.basic.BasicBusTypeChangeEntity; +import com.glxp.api.entity.basic.BasicBusTypePreEntity; +import com.glxp.api.entity.basic.BasicBussinessTypeEntity; +import com.glxp.api.entity.basic.BasicCorpEntity; +import com.glxp.api.entity.basic.BasicHospTypeEntity; +import com.glxp.api.entity.basic.BasicProductsEntity; +import com.glxp.api.entity.basic.CompanyProductRelevanceEntity; +import com.glxp.api.entity.basic.EntrustReceEntity; +import com.glxp.api.entity.basic.ProductInfoEntity; +import com.glxp.api.entity.basic.UdiCompanyEntity; +import com.glxp.api.entity.basic.UdiRelevanceEntity; +import com.glxp.api.entity.inout.IoCodeEntity; +import com.glxp.api.entity.inout.IoCodeLostEntity; +import com.glxp.api.entity.inout.IoCodeRelEntity; +import com.glxp.api.entity.inout.IoCodeTempEntity; +import com.glxp.api.entity.inout.IoOrderDetailBizEntity; +import com.glxp.api.entity.inout.IoOrderDetailCodeEntity; +import com.glxp.api.entity.inout.IoOrderDetailResultEntity; +import com.glxp.api.entity.inout.IoOrderEntity; +import com.glxp.api.entity.inout.IoOrderInvoiceEntity; +import com.glxp.api.entity.purchase.SupCertEntity; +import com.glxp.api.entity.purchase.SupCertSetEntity; +import com.glxp.api.entity.purchase.SupCompanyEntity; +import com.glxp.api.entity.purchase.SupManufacturerEntity; +import com.glxp.api.entity.purchase.SupProductEntity; import com.glxp.api.entity.sync.BasicDownloadStatusEntity; import com.glxp.api.entity.sync.BasicExportStatusEntity; import com.glxp.api.entity.sync.BasicExportStatusTimeEntity; -import com.glxp.api.entity.system.*; -import com.glxp.api.entity.thrsys.*; +import com.glxp.api.entity.system.SyncDataBustypeEntity; +import com.glxp.api.entity.system.SyncDataSetEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceBizEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity; +import com.glxp.api.entity.system.SystemPDFModuleEntity; +import com.glxp.api.entity.system.SystemPDFTemplateEntity; +import com.glxp.api.entity.system.SystemParamConfigEntity; +import com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity; +import com.glxp.api.entity.thrsys.ThrCorpEntity; +import com.glxp.api.entity.thrsys.ThrDeptEntity; +import com.glxp.api.entity.thrsys.ThrInvWarehouseEntity; +import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.http.sync.SpGetHttpClient; import com.glxp.api.idc.service.FileService; import com.glxp.api.idc.service.IdcService; import com.glxp.api.req.sync.SpsSyncDataRequest; -import com.glxp.api.res.sync.*; -import com.glxp.api.service.auth.*; +import com.glxp.api.res.sync.BaseSyncResponse; +import com.glxp.api.res.sync.SpSyncUdiResponse; +import com.glxp.api.res.sync.SpsSyncBasicDataResponse; +import com.glxp.api.res.sync.SpsSyncBusOrderResponse; +import com.glxp.api.res.sync.SpsSyncBusResponse; +import com.glxp.api.res.sync.SpsSyncDataResponse; +import com.glxp.api.res.sync.SpsSyncOrderResponse; +import com.glxp.api.res.sync.SpsSyncOtherDataResponse; +import com.glxp.api.res.sync.SpsSyncSysSettingResponse; +import com.glxp.api.res.sync.SpsSyncThrDataResponse; +import com.glxp.api.res.sync.SpsSyncThrProductsResponse; +import com.glxp.api.service.auth.AuthAdminService; +import com.glxp.api.service.auth.DeptService; +import com.glxp.api.service.auth.DeptUserService; +import com.glxp.api.service.auth.InvBusUserService; +import com.glxp.api.service.auth.InvSpaceService; +import com.glxp.api.service.auth.InvWarehouseService; +import com.glxp.api.service.auth.WarehouseBussinessTypeService; +import com.glxp.api.service.auth.WarehouseUserService; import com.glxp.api.service.basic.EntrustReceService; import com.glxp.api.service.basic.IBasicBusTypeChangeService; import com.glxp.api.service.basic.IBasicBusTypePreService; import com.glxp.api.service.basic.IBasicBussinessTypeService; -import com.glxp.api.service.inout.*; -import com.glxp.api.service.system.*; -import com.glxp.api.service.thrsys.*; +import com.glxp.api.service.inout.IoAddInoutService; +import com.glxp.api.service.inout.IoCheckInoutService; +import com.glxp.api.service.inout.IoCodeTempService; +import com.glxp.api.service.inout.IoOrderDetailBizService; +import com.glxp.api.service.inout.IoOrderDetailCodeService; +import com.glxp.api.service.inout.IoOrderDetailResultService; +import com.glxp.api.service.inout.IoOrderInvoiceService; +import com.glxp.api.service.inout.IoOrderService; +import com.glxp.api.service.system.SystemPDFModuleService; +import com.glxp.api.service.system.SystemPDFTemplateRelevanceBizService; +import com.glxp.api.service.system.SystemPDFTemplateRelevanceCodeService; +import com.glxp.api.service.system.SystemPDFTemplateRelevanceLabelService; +import com.glxp.api.service.system.SystemPDFTemplateRelevanceStatemenService; +import com.glxp.api.service.system.SystemPDFTemplateService; +import com.glxp.api.service.system.SystemParamConfigService; +import com.glxp.api.service.thrsys.IThrBusTypeOriginService; +import com.glxp.api.service.thrsys.ThrCorpService; +import com.glxp.api.service.thrsys.ThrDeptService; +import com.glxp.api.service.thrsys.ThrInvWarehouseService; +import com.glxp.api.service.thrsys.ThrProductsService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.DateUtil; import com.glxp.api.util.JsonUtils; import com.glxp.api.util.RedisUtil; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONArray; +import cn.hutool.json.JSONUtil; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.ibatis.session.ExecutorType; -import org.apache.ibatis.session.SqlSession; -import org.apache.ibatis.session.SqlSessionFactory; -import org.apache.ibatis.session.TransactionIsolationLevel; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Lazy; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.*; -import java.util.function.Function; - -import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_ORDER; -import static com.glxp.api.constant.BasicProcessStatus.NEW_ALL_UDIS; @Slf4j @Service @@ -1875,7 +1979,7 @@ public class HeartService { @Resource IoOrderDao orderDao; - +/* @Resource public void updateOrderDb(SpsSyncOrderResponse syncDataResponse, IoOrderEntity orderEntity) { orderDao.updateOrder(orderEntity); @@ -1908,7 +2012,7 @@ public class HeartService { } } } - } + }*/ /**