代码同步

purchase
anthonyywj2 3 years ago
parent 80b19f4cea
commit 66706d2019

@ -422,11 +422,7 @@ public class StockOrderDetailController {
if (code.length() > 13) {
String tStr = code.substring(0, 2);
if (tStr.contains("MA") || tStr.contains("#") || tStr.contains("01")) {
try {
udiEntity = FilterUdiUtils.getUdi(code);
} catch (Exception e) {
}
udiEntity = FilterUdiUtils.getUdi(code);
}
}
StockOrderDetailQueryProductResponse stockOrderDetailQueryProductResponse = new StockOrderDetailQueryProductResponse();

@ -376,7 +376,11 @@ public class OrderController {
} else {
if (orderEntity.getFromType().intValue() != ConstantStatus.FROM_CHANGE && orderEntity.getFromType().intValue() != ConstantStatus.FROM_PEACE_CHANGE) {
transferOrder(orderEntity, entrustReceEntity);
if (StrUtil.isEmpty(entrustReceEntity.getAction())) {
transferOrder(orderEntity, entrustReceEntity);
}
}
if (!entrustReceEntity.isFinishRece()) {
StockOrderFilterRequest stockOrderFilterRequest = new StockOrderFilterRequest();

@ -83,15 +83,12 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic
//基础表导入
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiInfoEntities())) {
try {
List<UdiInfoEntity> corpList = udiRelevanceExportJsonResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity basicUnitMaintainEntity : corpList) {
mapper.insertUdiInfo(basicUnitMaintainEntity);
}
batchSession.commit();
} catch (Exception e) {
List<UdiInfoEntity> corpList = udiRelevanceExportJsonResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity basicUnitMaintainEntity : corpList) {
mapper.insertUdiInfo(basicUnitMaintainEntity);
}
batchSession.commit();
}
batchSession.close();
// udiInfoDao.importUdiInfo(udiRelevanceExportJsonResponse.getUdiInfoEntities());
@ -101,15 +98,12 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic
//关联表导入
if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getUdiRelevanceEntities())) {
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
try {
List<UdiRelevanceEntity> corpList = udiRelevanceExportJsonResponse.getUdiRelevanceEntities();
UdiRelevanceDao mapper = batchSession.getMapper(UdiRelevanceDao.class);
for (UdiRelevanceEntity basicUnitMaintainEntity : corpList) {
mapper.insertUdiRelevance(basicUnitMaintainEntity);
}
batchSession.commit();
} catch (Exception e) {
List<UdiRelevanceEntity> corpList = udiRelevanceExportJsonResponse.getUdiRelevanceEntities();
UdiRelevanceDao mapper = batchSession.getMapper(UdiRelevanceDao.class);
for (UdiRelevanceEntity basicUnitMaintainEntity : corpList) {
mapper.insertUdiRelevance(basicUnitMaintainEntity);
}
batchSession.commit();
batchSession.close();
// udiRelevanceDao.importUdiRelevance(udiRelevanceExportJsonResponse.getUdiRelevanceEntities());
}
@ -118,15 +112,12 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic
if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getThrProductsEntities())) {
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
try {
List<ThrProductsEntity> corpList = udiRelevanceExportJsonResponse.getThrProductsEntities();
ThrProductsDao mapper = batchSession.getMapper(ThrProductsDao.class);
for (ThrProductsEntity basicUnitMaintainEntity : corpList) {
mapper.insertThrProducts(basicUnitMaintainEntity);
}
batchSession.commit();
} catch (Exception e) {
List<ThrProductsEntity> corpList = udiRelevanceExportJsonResponse.getThrProductsEntities();
ThrProductsDao mapper = batchSession.getMapper(ThrProductsDao.class);
for (ThrProductsEntity basicUnitMaintainEntity : corpList) {
mapper.insertThrProducts(basicUnitMaintainEntity);
}
batchSession.commit();
batchSession.close();
// thrProductsDao.importThrProductss(udiRelevanceExportJsonResponse.getThrProductsEntities());
}
@ -135,15 +126,12 @@ public class UdiInfoImportDetailServiceImpl implements UdiInfoImportDetailServic
if (CollUtil.isNotEmpty(udiRelevanceExportJsonResponse.getCompanyProductRelevanceEntities())) {
SqlSession batchSession = sqlSessionFactory.openSession(ExecutorType.BATCH, TransactionIsolationLevel.READ_COMMITTED);
try {
List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = udiRelevanceExportJsonResponse.getCompanyProductRelevanceEntities();
CompanyProductRelevanceDao mapper = batchSession.getMapper(CompanyProductRelevanceDao.class);
for (CompanyProductRelevanceEntity companyProductRelevanceEntity : companyProductRelevanceEntities) {
mapper.importCompanyProductRelevance(companyProductRelevanceEntity);
}
batchSession.commit();
} catch (Exception e) {
List<CompanyProductRelevanceEntity> companyProductRelevanceEntities = udiRelevanceExportJsonResponse.getCompanyProductRelevanceEntities();
CompanyProductRelevanceDao mapper = batchSession.getMapper(CompanyProductRelevanceDao.class);
for (CompanyProductRelevanceEntity companyProductRelevanceEntity : companyProductRelevanceEntities) {
mapper.importCompanyProductRelevance(companyProductRelevanceEntity);
}
batchSession.commit();
batchSession.close();
}

@ -6,6 +6,7 @@ import com.glxp.api.admin.req.info.SystemParamConfigRequest;
import com.glxp.api.admin.req.info.SystemParamConfigSaveRequest;
import java.util.List;
import java.util.Map;
public interface SystemParamConfigService {
@ -29,4 +30,8 @@ public interface SystemParamConfigService {
boolean updateParentId(SystemParamConfigSaveRequest systemParamConfigSaveRequest);
boolean insert(SystemParamConfigEntity systemParamConfigEntity);
Map<String, SystemParamConfigEntity> findBasicAll();
}

@ -1,5 +1,6 @@
package com.glxp.api.admin.service.info.impl;
import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.schedule.SystemParamConfigDao;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
@ -9,7 +10,9 @@ import com.glxp.api.admin.service.info.SystemParamConfigService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class SystemParamConfigServiceImpl implements SystemParamConfigService {
@ -78,4 +81,26 @@ public class SystemParamConfigServiceImpl implements SystemParamConfigService {
public boolean insert(SystemParamConfigEntity systemParamConfigEntity) {
return systemParamConfigDao.insert(systemParamConfigEntity);
}
@Override
public Map<String, SystemParamConfigEntity> findBasicAll() {
SystemParamConfigRequest systemParamConfigRequest = new SystemParamConfigRequest();
systemParamConfigRequest.setParamType(2);
systemParamConfigRequest.setParamStatus(1);
List<SystemParamConfigEntity> systemParamConfigEntities = queryPage(systemParamConfigRequest);
Map<String, SystemParamConfigEntity> systemParamConfigEntityMap = new HashMap<>();
if (CollUtil.isNotEmpty(systemParamConfigEntities)) {
for (SystemParamConfigEntity systemParamConfigEntity : systemParamConfigEntities) {
systemParamConfigEntityMap.put(systemParamConfigEntity.getParamKey(), systemParamConfigEntity);
}
}
return systemParamConfigEntityMap;
}
}

@ -208,16 +208,13 @@ public class DlBasicService {
//耗材字典导入
if (CollUtil.isNotEmpty(syncDataResponse.getUdiInfoEntities())) {
if (CollUtil.isNotEmpty(syncDataResponse.getUdiInfoEntities())) {
try {
List<UdiInfoEntity> corpList = syncDataResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity udiInfoEntity : corpList) {
mapper.insertUdiInfo(udiInfoEntity);
}
batchSession.commit();
remark.append("耗材字典:").append(syncDataResponse.getUdiInfoEntities().size()).append("条\n");
} catch (Exception e) {
List<UdiInfoEntity> corpList = syncDataResponse.getUdiInfoEntities();
UdiInfoDao mapper = batchSession.getMapper(UdiInfoDao.class);
for (UdiInfoEntity udiInfoEntity : corpList) {
mapper.insertUdiInfo(udiInfoEntity);
}
batchSession.commit();
remark.append("耗材字典:").append(syncDataResponse.getUdiInfoEntities().size()).append("条\n");
}
}

@ -1,4 +1,4 @@
spring.profiles.active=test2
spring.profiles.active=test1
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

Loading…
Cancel
Save