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 { ...@@ -2522,6 +2522,9 @@ public class DataImportService extends BaseService {
log.setImportResult(false); log.setImportResult(false);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc())); log.setErrorMsg(String.format(EnumApiCodeMsg.CALLFAILED.getMsg(), resp.getTaskDesc()));
} else { } else {
log.setId(taskId);
log.setImportResult(true);
log.setErrorMsg(String.format(EnumApiCodeMsg.CALLSUCCESS.getMsg(), resp.getTaskDesc()));
if (EbsExtractTypeConstant.JE == type) { if (EbsExtractTypeConstant.JE == type) {
resp.setCompanyCode(null != resp.getSegment1() ? resp.getSegment1() : ""); resp.setCompanyCode(null != resp.getSegment1() ? resp.getSegment1() : "");
}else if(EbsExtractTypeConstant.RATE == type){ }else if(EbsExtractTypeConstant.RATE == type){
...@@ -2534,10 +2537,8 @@ public class DataImportService extends BaseService { ...@@ -2534,10 +2537,8 @@ public class DataImportService extends BaseService {
List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example); List<OrganizationAccountingRate> itemList = organizationAccountingRateMapper.selectByExample(example);
logger.info("查询的汇率条数:"+itemList.size()); logger.info("查询的汇率条数:"+itemList.size());
log.setRecordSize(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); dataImportLogMapper.insertSelective(log);
......
...@@ -179,6 +179,9 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -179,6 +179,9 @@ public class OrganizationServiceImpl extends BaseService{
@Resource @Resource
private UserMapper userMapper; private UserMapper userMapper;
@Resource
private ProjectMapper projectMapper;
private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(ProjectServiceImpl.class);
public boolean isOrganizationStructureExists(String organizationStructureId) { public boolean isOrganizationStructureExists(String organizationStructureId) {
...@@ -2457,6 +2460,14 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2457,6 +2460,14 @@ public class OrganizationServiceImpl extends BaseService{
tempDto.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId()); tempDto.setEnterpriseAccountSetId(p.getEnterpriseAccountSetId());
tempDto.setExpiredDate(p.getExpiredDate()); tempDto.setExpiredDate(p.getExpiredDate());
enterpriseAccountSetOrgMapper.updateByPrimaryKey(tempDto); 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 { } else {
EnterpriseAccountSetOrg temp = new EnterpriseAccountSetOrg(); EnterpriseAccountSetOrg temp = new EnterpriseAccountSetOrg();
temp.setId(CommonUtils.getUUID()); temp.setId(CommonUtils.getUUID());
......
...@@ -928,27 +928,27 @@ ...@@ -928,27 +928,27 @@
return g.name == 'TaxReturnType'; return g.name == 'TaxReturnType';
}); });
if (!grp || !grp.children) { if ( grp && grp.children ) {
return; $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) { var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType' return g.name == 'WorkingPaperType'
}); });
if (!grp2 || !grp2.children) { if ( grp2 && grp2.children ) {
return; $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 = []; if((!grp || !grp.children) && (!grp2 || !grp2.children)) {
$scope.exportReportTreeOptions.dataSource[1].items = _.map(grp2.children, function (item) { return;
return {id: item.reportId, templateId: item.id, name: item.name, parentId: '0'}; }
});
var parentElem = angular.element($('#exportReportFilesContainer')); var parentElem = angular.element($('#exportReportFilesContainer'));
$scope.exportReportInstance = $uibModal.open({ $scope.exportReportInstance = $uibModal.open({
...@@ -985,15 +985,11 @@ ...@@ -985,15 +985,11 @@
return g.name == 'TaxReturnType'; return g.name == 'TaxReturnType';
}); });
if (!grp || !grp.children) {
return;
}
var grp2 = _.find($scope.$parent.$parent.groups, function (g) { var grp2 = _.find($scope.$parent.$parent.groups, function (g) {
return g.name == 'WorkingPaperType' return g.name == 'WorkingPaperType'
}); });
if (!grp2 || !grp2.children) { if ( (!grp || !grp.children) && (!grp2 || !grp2.children) ) {
return; return;
} }
...@@ -1003,11 +999,16 @@ ...@@ -1003,11 +999,16 @@
} }
var reportIds = []; var reportIds = [];
angular.forEach($scope.selectedReportIds, function (reportId) { 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) { if (node) {
reportIds.push(node.reportId); reportIds.push(node.reportId);
}else{ }else{
node = _.first(_.where(grp2.children, {reportId: reportId})); if ( grp2 && grp2.children ) {
node = _.first(_.where(grp2.children, {reportId: reportId}));
}
if (node) { if (node) {
reportIds.push(node.reportId); 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