Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/resources/schemas/schema_v2.1.sql
master
郑明梁 2 years ago
commit 10d93106ce

@ -7,6 +7,7 @@ import com.glxp.api.dao.system.DbVersionDao;
import com.glxp.api.entity.system.DbVersionEntity;
import com.glxp.api.entity.system.SchemaData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
@ -26,10 +27,16 @@ public class HdSchemaExecutor implements ApplicationRunner {
@Resource
DbVersionDao hdCommonDao;
@Value("${initSql:true}")
private boolean initSql;
private List<SchemaData> schema = new ArrayList<>();
@Override
public void run(ApplicationArguments args) throws Exception {
if (!initSql) {
return;
}
//初始版本列表
buildSchemas();
//定义sql文件路径

@ -76,7 +76,7 @@ public class UdiRlSupController extends BaseController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (StrUtil.isEmpty(companyProductRelevanceRequest.getCustomerId())) {
if (StrUtil.isNotEmpty(companyProductRelevanceRequest.getCustomerId())) {
String customerId = getCustomerId();
if (customerId.equals("110")) {
companyProductRelevanceRequest.setCustomerId(null);

@ -528,6 +528,9 @@ public class IoCodeTempController extends BaseController {
}
// 是否检验寄售库存
if (addOrderRequest.getFromCorp() == null) {
BasicCorpEntity basicCorpEntity = basicUnitMaintainService.selectByName(addOrderRequest.getFromCorp());

@ -175,7 +175,7 @@ public class SpsSyncDownloadController {
StringBuilder str = new StringBuilder();
int data;
while ((data = reader.read()) != -1) {
str.append(data);
str.append((char)data);
}
reader.close();
Dict map = JsonUtils.parseMap(str.toString());

@ -82,6 +82,7 @@ public class SpsSyncExportStatusController {
return ResultVOUtils.error(500, "更新成功!");
}
@AuthRuleAnnotation("")
@GetMapping("/spssync/basic/schedule/lastTime")
public BaseResponse getLastUpdateTime(BasicExportTimeRequest basicExportTimeRequest) {

@ -347,7 +347,7 @@ public class SpsSyncDownloadService {
.set(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_SYNC.getCode())
.set(BasicExportStatusEntity::getUpdateTime, new Date())
.set(BasicExportStatusEntity::getCacheFilePath, fileFullPath)
.set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportStatusEnum.WAIT_SYNC.getRemark(), total))
.set(BasicExportStatusEntity::getRemark, String.format("%s: %s条", BasicExportTypeEnum.BASIC_DATA.getRemark(), total))
.eq(BasicExportStatusEntity::getType, BasicExportTypeEnum.BASIC_DATA.getRemark())
.eq(BasicExportStatusEntity::getStatus, BasicExportStatusEnum.WAIT_BUILT.getCode())
.isNull(BasicExportStatusEntity::getCacheFilePath)
@ -460,12 +460,18 @@ public class SpsSyncDownloadService {
private String writeFile(String filePath, String fileDesc, String content) throws IOException {
String fileFullPath = String.format("%s/%s/%s-%s.udi", filePath, DateUtil.getDate(), fileDesc, IdUtil.fastSimpleUUID());
File file = new File(fileFullPath);
filePath = String.format("%s/%s", filePath, DateUtil.getDate());
String fileFullPath = String.format("%s/%s-%s.udi", filePath, fileDesc, IdUtil.fastSimpleUUID());
File file = new File(filePath);
if (!file.exists()) {
file.mkdirs();
}
file = new File(fileFullPath);
while (!file.createNewFile()) {
fileFullPath = String.format("%s/%s/%s-%s.udi", filePath, DateUtil.getDate(), fileDesc, IdUtil.fastSimpleUUID());
file = new File(fileFullPath);
}
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(content);
fileWriter.flush();

@ -66,6 +66,8 @@ CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkPreInOrders', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1);
@ -104,9 +106,15 @@ CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1);
# INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1);
# INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1);
# INSERT INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1);
INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`,
`thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`)
VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);

Loading…
Cancel
Save