Commit 18602f5c authored by zhkwei's avatar zhkwei

1、更改机构账套要更换卡片对应的账套;2、EBS抽取汇率表状态设置;3、CIT导出报表bug;4、预提更改下载的模板

parent abda5873
......@@ -2522,6 +2522,9 @@ public class DataImportService extends BaseService {
log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc()));
} else {
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
if (EbsExtractTypeConstant.JE == type) {
resp.setCompanyCode(null != resp.getSegment1() ? resp.getSegment1() : "");
}else if(EbsExtractTypeConstant.RATE == type){
......@@ -2534,10 +2537,8 @@ public class DataImportService extends BaseService {
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
logger.info("查询的汇率条数:"+itemList.size());
log.setRecordSize(itemList.size());
log.setErrorMsg(resp.getTaskDesc());
}
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
}
}
dataImportLogMapper.insertSelective(log);
......
......@@ -179,6 +179,9 @@ public class OrganizationServiceImpl extends BaseService{
@Resource
private UserMapper userMapper;
@Resource
private ProjectMapper projectMapper;
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
public boolean isOrganizationStructureExists(String organizationStructureId) {
......@@ -2457,6 +2460,14 @@ public class OrganizationServiceImpl extends BaseService{
tempDto.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId());
tempDto.setExpiredDate(p.getExpiredDate());
enterpriseAccountSetOrgMapper.updateByPrimaryKey(tempDto);
//若为更新匹配账套,则要检查是否已经生成卡片并更新卡片里面的卡套ID create by zhikai.z.wei start
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andOrganizationIdEqualTo(p.getOrganizationId());
Project project = new Project();
project.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId());
project.setUpdateTime(new Date());
projectMapper.updateByExampleSelective(project,projectExample);
//若为更新匹配账套,则要检查是否已经生成卡片并更新卡片里面的卡套ID create by zhikai.z.wei end
} else {
EnterpriseAccountSetOrg temp = new EnterpriseAccountSetOrg();
temp.setId(CommonUtils.getUUID());
......
......@@ -928,27 +928,27 @@
return g.name == 'TaxReturnType';
});
if (!grp || !grp.children) {
return;
if ( grp && grp.children ) {
$scope.exportReportTreeOptions.dataSource[0].items = [];
$scope.exportReportTreeOptions.dataSource[0].items = _.map(grp.children, function (item) {
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
}
$scope.exportReportTreeOptions.dataSource[0].items = [];
$scope.exportReportTreeOptions.dataSource[0].items = _.map(grp.children, function (item) {
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType'
});
if (!grp2 || !grp2.children) {
return;
if ( grp2 && grp2.children ) {
$scope.exportReportTreeOptions.dataSource[1].items = [];
$scope.exportReportTreeOptions.dataSource[1].items = _.map(grp2.children, function (item) {
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
}
$scope.exportReportTreeOptions.dataSource[1].items = [];
$scope.exportReportTreeOptions.dataSource[1].items = _.map(grp2.children, function (item) {
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'};
});
if((!grp || !grp.children) && (!grp2 || !grp2.children)) {
return;
}
var parentElem = angular.element($('#exportReportFilesContainer'));
$scope.exportReportInstance = $uibModal.open({
......@@ -985,15 +985,11 @@
return g.name == 'TaxReturnType';
});
if (!grp || !grp.children) {
return;
}
var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType'
});
if (!grp2 || !grp2.children) {
if ( (!grp || !grp.children) && (!grp2 || !grp2.children) ) {
return;
}
......@@ -1003,11 +999,16 @@
}
var reportIds = [];
angular.forEach($scope.selectedReportIds, function (reportId) {
var node = _.first(_.where(grp.children, {reportId: reportId}));
var node;
if ( grp && grp.children ) {
node = _.first(_.where(grp.children, {reportId: reportId}));
}
if (node) {
reportIds.push(node.reportId);
}else{
node = _.first(_.where(grp2.children, {reportId: reportId}));
if ( grp2 && grp2.children ) {
node = _.first(_.where(grp2.children, {reportId: reportId}));
}
if (node) {
reportIds.push(node.reportId);
}
......
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