Commit 4abc4c68 authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents fd46b4ca 41c01ae3
......@@ -6,6 +6,7 @@ import java.util.UUID;
public final class Constant {
public static final String Comma = ",";
public static final String Other = "其他";
public static final String ALL = "ALL";
public static final int WholeYear = -1;
/* ----------------------------- kevin insert -----------------*/
......
......@@ -1931,6 +1931,7 @@ public class DataImportService extends BaseService {
List<String> orgIds = organizationService.getMyOrgList().stream().map(OrgSelectDto::getId).collect(Collectors.toList());
// 这里会导致任何人都可以看到未映射到主体的数据
orgIds.add("");
orgIds.add(Constant.ALL);
criteria.andOrganizationIdIn(orgIds).andCreateTimeBetween(strDate, endDate);
example.setOrderByClause("update_time desc");
......@@ -1964,7 +1965,13 @@ public class DataImportService extends BaseService {
List<Integer> dataTypes = param.getDataTypes();
String operator = authUserHelper.getCurrentAuditor().get();
dataTypes.forEach(type -> {
orgs.forEach(o -> {
List<Organization> tmpOrgList = Collections.emptyList();
if (type == EbsExtractTypeConstant.RATE) {
tmpOrgList = orgs.stream().limit(1).collect(Collectors.toList());
}else {
tmpOrgList = orgs;
}
tmpOrgList.forEach(o -> {
try {
Callable callEbs = new CallEbsThread(type, o, ebsCallUrl, dataImportLogMapper, authUserHelper,
idService, dtsTokenService, period, effectiveDateFrom, effectiveDateTo, operator);
......@@ -2114,9 +2121,17 @@ public class DataImportService extends BaseService {
int month = periodInt % 100;
DataImportLog log = new DataImportLog();
log.setTaxpayerIdNum(org.getTaxPayerNumber());
log.setOrganizationId(org.getId());
log.setCompanyCode(code);
log.setCompanyName(org.getName());
if (type == EbsExtractTypeConstant.RATE) {
log.setCompanyName(Constant.ALL);
log.setOrganizationId(Constant.ALL);
log.setCompanyCode(Constant.ALL);
} else {
log.setCompanyName(org.getName());
log.setOrganizationId(org.getId());
log.setCompanyCode(code);
}
log.setPeriodYear(year);
log.setPeriodMonth(month);
log.setType(EnumImportType.ExtractFinancialData.getCode());
......
......@@ -1586,7 +1586,7 @@ constant.fileTypeList = [
{code: 104, type: "资产负债表"},
{code: 105, type: "利润表"},
{code: 106, type: "直接法现金流量表"},
{code: 107, type: "所有者权益变动表"},
// {code: 107, type: "所有者权益变动表"}, //todo 暂未开放
{code: 108, type: "汇率表"}
];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment