Commit 81a74e4d authored by zhkwei's avatar zhkwei

CIT数据预览

parent babc14ff
...@@ -1112,6 +1112,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1112,6 +1112,7 @@ public class CitImportExcelServiceImpl extends BaseService {
*/ */
public OperationResultDto autoGeneTB(Integer period, String orgId, List<String> orgList){ public OperationResultDto autoGeneTB(Integer period, String orgId, List<String> orgList){
OperationResultDto autoGeneResult = new OperationResultDto();
//第一步,根据合并日记账计算出借方发生额,贷方发生额,科目代码等相关信息 //第一步,根据合并日记账计算出借方发生额,贷方发生额,科目代码等相关信息
StringBuilder periodSb = new StringBuilder(); StringBuilder periodSb = new StringBuilder();
periodSb.append(period); periodSb.append(period);
...@@ -1143,7 +1144,7 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1143,7 +1144,7 @@ public class CitImportExcelServiceImpl extends BaseService {
criteria.andAccountCodeEqualTo(citJournal.getSubjectCode()); criteria.andAccountCodeEqualTo(citJournal.getSubjectCode());
criteria.andPeriodEqualTo(period-1); criteria.andPeriodEqualTo(period-1);
List<CitTrialBalance> trialBalances = citTrialBalanceMapper.selectByExample(citTrialBalanceExample); List<CitTrialBalance> trialBalances = citTrialBalanceMapper.selectByExample(citTrialBalanceExample);
if(trialBalances != null || trialBalances.size() > 0){ if(trialBalances != null && trialBalances.size() > 0){
lastYearBegBla = trialBalances.get(0).getBeginningBalance(); lastYearBegBla = trialBalances.get(0).getBeginningBalance();
} }
trialBalance.setBeginningBalance(lastYearBegBla); trialBalance.setBeginningBalance(lastYearBegBla);
...@@ -1154,7 +1155,9 @@ public class CitImportExcelServiceImpl extends BaseService { ...@@ -1154,7 +1155,9 @@ public class CitImportExcelServiceImpl extends BaseService {
} }
int insertBatch = citTrialBalanceMapper.insertBatch(trialBalanceList); int insertBatch = citTrialBalanceMapper.insertBatch(trialBalanceList);
return null; autoGeneResult.setResult(true);
autoGeneResult.setResultMsg("自动生成TB成功");
return autoGeneResult;
} }
} }
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<otherwise>0,</otherwise> <otherwise>0,</otherwise>
</choose> </choose>
<choose> <choose>
<when test="item.createBy != null">#{item.createdBy,jdbcType=VARCHAR},</when> <when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise> <otherwise>'',</otherwise>
</choose> </choose>
<choose> <choose>
...@@ -77,45 +77,10 @@ ...@@ -77,45 +77,10 @@
SELECT 1 FROM DUAL; SELECT 1 FROM DUAL;
</insert> </insert>
<select id="selectLastYearBegBla" parameterType="map" resultMap="BaseResultMap"> <select id="selectLastYearBegBla" parameterType="map" resultMap="BaseResultMap">
SELECT
subject_code as subject_code,
sum(jfinal.accounted_dr) as accounted_dr,
sum(jfinal.accounted_cr) as accounted_cr
from
(
select select
cj.accounted_dr as accounted_dr, <include refid="Base_Column_List" />
cj.accounted_cr as accounted_cr , from cit_trial_balance
cj.subject_code as subject_code where caccount_code=#{item.accountCode} AND ctb.period=#{item.period}
from
cit_journal_entry_adjust cj
where
cj.period like #{period}
<if test="orgList != null and orgList.size > 0">
AND organization_id in
<foreach item="item" index="index" collection="orgList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
UNION ALL
select
j.accounted_dr as accounted_dr,
j.accounted_cr as accounted_cr,
j.segment3 as subject_code
from
journal_entry j
where
j.period like #{period}
<if test="orgList != null and orgList.size > 0">
AND organization_id in
<foreach item="item" index="index" collection="orgList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
) as jfinal
group by jfinal.subject_code
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -88,5 +88,11 @@ ...@@ -88,5 +88,11 @@
"CitEAMAssetsDisposalImport": "EAM资产处置导入-CIT", "CitEAMAssetsDisposalImport": "EAM资产处置导入-CIT",
"CitDraftAccountMappingImport": "底稿&科目Mapping表导入-CIT", "CitDraftAccountMappingImport": "底稿&科目Mapping表导入-CIT",
"PleaseSelectOrganization": "请选择机构!", "PleaseSelectOrganization": "请选择机构!",
"PleaseSelectPeriod": "请选择期间!" "PleaseSelectPeriod": "请选择期间!",
"balanceSheet": "试算平衡表",
"bsGenerateVer": "试算平衡生成版",
"bsMappingVer": "试算平衡Mapping版",
"salaryAdvance": "预提重分类",
"eamDisposal": "EAM资产处置金额记录表"
} }
\ No newline at end of file
...@@ -1113,6 +1113,10 @@ ...@@ -1113,6 +1113,10 @@
"PleaseEnterTheFiledWordings": "请输入取值字段", "PleaseEnterTheFiledWordings": "请输入取值字段",
"PleaseEnterTheFilteredCondition": "请输入筛选条件", "PleaseEnterTheFilteredCondition": "请输入筛选条件",
"PleaseSelectTheField": "请选择字段", "PleaseSelectTheField": "请选择字段",
"PleaseFillinAllDataField": "请输入数据源筛选条件" "PleaseFillinAllDataField": "请输入数据源筛选条件",
"bsGenerateVer": "试算平衡生成版",
"bsMappingVer": "试算平衡Mapping版",
"salaryAdvance": "预提重分类",
"eamDisposal": "EAM资产处置金额记录表"
} }
\ No newline at end of file
...@@ -231,6 +231,66 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate, ...@@ -231,6 +231,66 @@ function ($scope, $rootScope, $location, $q, $log, $timeout, $state, $translate,
permission: constant.citPermission.dataPreview.accountVoucher.queryCode, url: '#/cit/previewData/accountVoucher' permission: constant.citPermission.dataPreview.accountVoucher.queryCode, url: '#/cit/previewData/accountVoucher'
}); });
} }
else if (data[constant.citPermission.dataPreview.journalMerge.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.journalMerge', state: 'previewData.journalMerge', num: 2,
permission: constant.citPermission.dataPreview.journalMerge.queryCode, url: '#/cit/previewData/journalMerge'
});
}
else if (data[constant.citPermission.dataPreview.bsGenerateVer.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.bsGenerateVer', state: 'previewData.bsGenerateVer', num: 2,
permission: constant.citPermission.dataPreview.bsGenerateVer.queryCode, url: '#/cit/previewData/bsGenerateVer'
});
}
else if (data[constant.citPermission.dataPreview.bsMappingVer.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.bsMappingVer', state: 'previewData.bsMappingVer', num: 2,
permission: constant.citPermission.dataPreview.bsMappingVer.queryCode, url: '#/cit/previewData/bsMappingVer'
});
}
else if (data[constant.citPermission.dataPreview.assetsList.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.assetsList', state: 'previewData.assetsList', num: 2,
permission: constant.citPermission.dataPreview.assetsList.queryCode, url: '#/cit/previewData/assetsList'
});
}
else if (data[constant.citPermission.dataPreview.salaryAdvance.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.salaryAdvance', state: 'previewData.salaryAdvance', num: 2,
permission: constant.citPermission.dataPreview.salaryAdvance.queryCode, url: '#/cit/previewData/salaryAdvance'
});
}
else if (data[constant.citPermission.dataPreview.eamDisposal.queryCode]) {
$scope.menus.push({
name: 'previewData', state: 'previewData', num: 2,
permission: constant.citPermission.dataPreview.dataPreviewCode, url: '#/cit/previewData'
});
subMenus.push({
name: 'previewData.eamDisposal', state: 'previewData.eamDisposal', num: 2,
permission: constant.citPermission.dataPreview.eamDisposal.queryCode, url: '#/cit/previewData/eamDisposal'
});
}
if (data[constant.citPermission.dataManage.caculateDataCode]) { if (data[constant.citPermission.dataManage.caculateDataCode]) {
$scope.menus.push({ $scope.menus.push({
......
...@@ -23,6 +23,30 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi ...@@ -23,6 +23,30 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi
name: 'accountVoucher', permission: constant.citPermission.dataPreview.accountVoucher.queryCode, name: 'accountVoucher', permission: constant.citPermission.dataPreview.accountVoucher.queryCode,
text: $translate.instant('accountVoucher'), icon: 'fa fa-columns' text: $translate.instant('accountVoucher'), icon: 'fa fa-columns'
}, },
{
name: 'journalMerge', permission: constant.citPermission.dataPreview.journalMerge.queryCode,
text: $translate.instant('journal'), icon: 'fa fa-bank'
},
{
name: 'bsGenerateVer', permission: constant.citPermission.dataPreview.bsGenerateVer.queryCode,
text: $translate.instant('bsGenerateVer'), icon: 'fa fa-bank'
},
{
name: 'bsMappingVer', permission: constant.citPermission.dataPreview.bsMappingVer.queryCode,
text: $translate.instant('bsMappingVer'), icon: 'fa fa-bank'
},
{
name: 'assetsList', permission: constant.citPermission.dataPreview.assetsList.queryCode,
text: $translate.instant('AssetList'), icon: 'fa fa-bank'
},
{
name: 'salaryAdvance', permission: constant.citPermission.dataPreview.salaryAdvance.queryCode,
text: $translate.instant('salaryAdvance'), icon: 'fa fa-bank'
},
{
name: 'eamDisposal', permission: constant.citPermission.dataPreview.eamDisposal.queryCode,
text: $translate.instant('eamDisposal'), icon: 'fa fa-bank'
},
]; ];
// TODO: For DCH Demo // TODO: For DCH Demo
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '/app/cit/preview/vat-preview-balanceSheet/vat-preview-balanceSheet.html' + '?_=' + Math.random(), templateUrl: '/app/cit/preview/cit-preview-balanceSheet/cit-preview-balanceSheet.html' + '?_=' + Math.random(),
scope: {}, scope: {},
controller: 'citPreviewBalanceSheetController', controller: 'citPreviewBalanceSheetController',
link: function ($scope, element) { link: function ($scope, element) {
......
...@@ -624,6 +624,24 @@ constant.citPermission = { ...@@ -624,6 +624,24 @@ constant.citPermission = {
accountVoucher: { accountVoucher: {
queryCode: '03.002.002' queryCode: '03.002.002'
}, },
journalMerge: {
queryCode: '03.002.003'
},
bsGenerateVer: {
queryCode: '03.002.004'
},
bsMappingVer: {
queryCode: '03.002.005'
},
assetsList: {
queryCode: '03.002.006'
},
salaryAdvance: {
queryCode: '03.002.007'
},
eamDisposal: {
queryCode: '03.002.008'
},
}, },
dataManage: { dataManage: {
dataManageCode: '03.003', dataManageCode: '03.003',
...@@ -833,6 +851,12 @@ constant.citMenuList = [ ...@@ -833,6 +851,12 @@ constant.citMenuList = [
constant.citPermission.dataPreview.balanceSheet.queryCode, constant.citPermission.dataPreview.balanceSheet.queryCode,
constant.citPermission.dataPreview.accountVoucher.queryCode, constant.citPermission.dataPreview.accountVoucher.queryCode,
constant.citPermission.dataPreview.journalMerge.queryCode,
constant.citPermission.dataPreview.bsGenerateVer.queryCode,
constant.citPermission.dataPreview.bsMappingVer.queryCode,
constant.citPermission.dataPreview.assetsList.queryCode,
constant.citPermission.dataPreview.salaryAdvance.queryCode,
constant.citPermission.dataPreview.eamDisposal.queryCode,
constant.citPermission.dataManage.accountMappingCode, constant.citPermission.dataManage.accountMappingCode,
constant.citPermission.dataManage.caculateDataCode, constant.citPermission.dataManage.caculateDataCode,
......
...@@ -760,6 +760,120 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru ...@@ -760,6 +760,120 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
sticky: true sticky: true
}); });
$stateProvider.state({
name: 'cit.previewData.journalMerge',
url: '/journalMerge',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData.bsGenerateVer',
url: '/bsGenerateVer',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData.bsMappingVer',
url: '/bsMappingVer',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData.assetsList',
url: '/assetsList',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData.salaryAdvance',
url: '/salaryAdvance',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.previewData.eamDisposal',
url: '/eamDisposal',
views: {
'@cit.previewData': {
controller: [
'$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}
],
template: '<cit-preview-account-voucher></cit-preview-account-voucher>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({ $stateProvider.state({
name: 'cit.previewData.outputInvoice', name: 'cit.previewData.outputInvoice',
url: '/outputInvoice', url: '/outputInvoice',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
return { return {
restrict: 'E', restrict: 'E',
templateUrl: '/app/vat/preview/vat-preview-balanceSheet/vat-preview-balanceSheet.html' + '?_=' + Math.random(), templateUrl: '/app/vat/preview/vat-preview-balanceSheet/cit-preview-balanceSheet.html' + '?_=' + Math.random(),
scope: {}, scope: {},
controller: 'vatPreviewBalanceSheetController', controller: 'vatPreviewBalanceSheetController',
link: function ($scope, element) { link: function ($scope, element) {
......
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