Commit d2292a10 authored by zhkwei's avatar zhkwei

CIT--分配表功能及其他功能bug修改

parent 5e581708
......@@ -57,10 +57,10 @@ public class CitImportExcelController {
opeResultDto = citImportExcelService.citImportExcel(file, orgList, file.getOriginalFilename(), periodDate, importType, importFileType);
return opeResultDto;
}catch (Exception e){
logger.error("资产导入失败,错误信息如下:");
logger.error("文件导入失败,错误信息如下:");
e.printStackTrace();
opeResultDto.setResult(false);
opeResultDto.setResultMsg("资产导入失败");
opeResultDto.setResultMsg("文件导入失败");
return opeResultDto;
}
}
......
......@@ -123,7 +123,7 @@ public class CitReportController {
/**
* 日记账合并版导出
* 固定资产及EAM Mapping导出
* @param paras
* @param response
*/
......@@ -137,6 +137,36 @@ public class CitReportController {
}
}
/**
* 获取 企业所得税汇总纳税分支机构所得税分配表(A202000)
* @param citAssetsListDto
* @return
*/
@RequestMapping(value = "/getCitDistribution", method = RequestMethod.POST)
public @ResponseBody
ApiResultDto getCitDistribution(@RequestBody CitAssetsListDto citAssetsListDto){
logger.info("获取 企业所得税汇总纳税分支机构所得税分配表 的数据");
ApiResultDto apiResultDto = new ApiResultDto();
try{
apiResultDto.setCode(1);
apiResultDto.setMessage("获取成功");
apiResultDto.setData(citReportService.getAssetEamMappingPage(citAssetsListDto));
return apiResultDto;
}catch(Exception e){
e.printStackTrace();
apiResultDto.setCode(0);
apiResultDto.setMessage("获取失败");
return apiResultDto;
}
}
/**
* 获取单元格相关数据
* @param reportId
* @param from
* @return
*/
@RequestMapping(value = "reportData/{reportId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<ReportDataDto> getReportData(@PathVariable Long reportId, @RequestHeader String from) {
OperationResultDto resultDto = new OperationResultDto();
......@@ -147,6 +177,12 @@ public class CitReportController {
return reportService.getCellData(reportId, from);
}
/**
* 添加手工数据源
* @param data
* @param from
* @return
*/
@RequestMapping(value = "addCellManualData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity addCellManualDataSource(@RequestBody ManualDataSourceDto data, @RequestHeader String from) {
String projectId = StringUtils.EMPTY;
......
......@@ -110,10 +110,6 @@ public class CitReportServiceImpl extends BaseService {
@Resource
private TemplateMapper templateMapper;
@Resource
private ProjectServiceTypeMapper projectServiceTypeMapper;
@Resource
private TaxPayerReportRuleMapper taxPayerReportRuleMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private DistributedIdService distributedIdService;
......@@ -127,20 +123,16 @@ public class CitReportServiceImpl extends BaseService {
private HttpFileService httpFileService;
@Autowired
DidiFileUploadService didiFileUploadService;
@Resource
private TrialBalanceMapper trialBalanceMapper;
@Resource
private AdjustmentTableMapper adjustmentTableMapper;
@Resource
private ProfitLossStatementMapper profitLossStatementMapper;
@Resource
private JournalEntryMapper journalEntryMapper;
@Autowired
private DataUtil dataUtil;
@Autowired
private OrganizationServiceTemplateGroupMapper orgServiceTemplateGroupMapper;
@Autowired
private OrganizationMapper organizationMapper;
public OperationResultDto<List<ReportDto>> getReportTemplate(String projectId, EnumServiceType serviceType, Integer period) {
......@@ -1112,8 +1104,9 @@ public class CitReportServiceImpl extends BaseService {
} else if (!boo1 && boo2) {
sumValue = String.valueOf((Double.parseDouble(data.getKeyinData())));
}
if (StringUtils.isEmpty(cellData.getFormulaExp()))
if (StringUtils.isEmpty(cellData.getFormulaExp())){
cellData.setFormulaExp(data.getAmount().toString());
}
cellData.setData(sumValue);
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
......@@ -1332,4 +1325,22 @@ public class CitReportServiceImpl extends BaseService {
return FormulaDataSourceType.Other.getCode();
}
}
private List<Organization> getTotalBranchByProjectId(String projectId){
Project project = projectMapper.selectByPrimaryKey(projectId);
Organization organization = organizationMapper.selectByPrimaryKey(project.getOrganizationId());
if(organization.getCode() == null){
return null;
}else{
//判断是不是总机构,若机构代码最后两位是00代表是总机构
if(organization.getCode().substring(organization.getCode().length()-3,organization.getCode().length()).equals("00")){
OrganizationExample example = new OrganizationExample();
example.createCriteria().andCodeLike(organization.getCode().substring(0,organization.getCode().length()-2));
List<Organization> organizations = organizationMapper.selectByExample(example);
return organizations;
}else{
return null;
}
}
}
}
......@@ -76,6 +76,10 @@
<when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when>
<otherwise>CURRENT_TIMESTAMP,</otherwise>
</choose>
<choose>
<when test="item.dataType != null">#{item.dataType,jdbcType=VARCHAR},</when>
<otherwise>'',</otherwise>
</choose>
</trim>
</foreach>
;
......
......@@ -1010,6 +1010,23 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
sticky: true
});
$stateProvider.state({
name: 'cit.reductionData.distributionTable',
url: '/distributionTable',
views: {
'@cit.reductionData': {
controller: ['$scope', '$stateParams', 'appTranslation',
function ($scope, $stateParams, appTranslation) {
appTranslation.load([appTranslation.cit]);
}],
template: '<cit-asset-eam-mapping></cit-asset-eam-mapping>',
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.cit),
deepStateRedirect: true,
sticky: true
});
$stateProvider.state({
name: 'cit.reductionData.inputInvoice',
url: '/inputInvoice',
......
......@@ -1140,5 +1140,6 @@
"AssetEamMapping": "Asset Eam Mapping",
"DisposalProfitAndLoss": "Disposal Profit And Loss",
"TaxNetValue": "Tax Net Value",
"DisposalTaxBenefit": "Disposal Tax Benefit"
"DisposalTaxBenefit": "Disposal Tax Benefit",
"DistributionTable" : "Distribution Table"
}
\ No newline at end of file
......@@ -1194,7 +1194,8 @@
"TaxNetValue": "资产的税务净值",
"DisposalTaxBenefit": "处置的税收损益",
"BackAdjustAmount" : "调整后金额",
"OperateDate" : "操作日期"
"OperateDate" : "操作日期",
"DistributionTable" : "总分机构分配表"
......
......@@ -343,6 +343,18 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
permission: constant.citPermission.dataManage.assetEamMapping,
url: '#/cit/reductionData/assetEamMapping'
});
}else if (data[constant.citPermission.dataManage.distributionTable]) {
$scope.menus.push({
name: 'reductionData', state: 'reductionData', num: 3,
permission: constant.citPermission.dataManage.dataManageCode, url: '#/cit/reductionData'
});
subMenus.push({
name: 'reductionData.distributionTable',
state: 'reductionData.distributionTable',
num: 3,
permission: constant.citPermission.dataManage.distributionTable,
url: '#/cit/reductionData/distributionTable'
});
}
if (data[constant.citPermission.reportView.bsplCode]
......
......@@ -138,7 +138,7 @@
atms-popover ng-mouseenter="prepareSummary()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
use-optimized-placement-algorithm="true"
data-placement="bottom"
data-placement="left"
data-templateurl="/app/cit/import/cit-import-asset-list/cit-import-asset-list-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
......
......@@ -86,6 +86,10 @@ function ($scope, $q, $log, $translate, $location, loginContext, enums, vatSessi
name: 'assetEamMapping', permission: constant.citPermission.dataManage.assetEamMapping,
text: $translate.instant('AssetEamMapping'), icon: 'fa fa-map'
},
{
name: 'distributionTable', permission: constant.citPermission.dataManage.distributionTable,
text: $translate.instant('DistributionTable'), icon: 'fa fa-map'
},
];
}
else {
......
......@@ -302,14 +302,14 @@
{ name: $translate.instant('DocumentDate'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.accountingDate | date:"yyyy-MM-dd"}}</span></div>' },
{ name: $translate.instant('JournalSource'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.journalSource}}</span></div>' },
{ name: $translate.instant('JournalCategory'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.category}}</span></div>' },
{ name: $translate.instant('JournalName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.name}}</span></div>' },
{ name: $translate.instant('JournalName'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.name}}">{{row.entity.name}}</span></div>' },
{ name: $translate.instant('DocumentNo'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.voucherNum}}</span></div>' },
{ name: $translate.instant('Summary'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.description}}</span></div>' },
{ name: $translate.instant('Summary'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.description}}">{{row.entity.description}}</span></div>' },
{ name: $translate.instant('MainBodyCode'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.orgCode}}</span></div>' },
{ name: $translate.instant('MainBodyDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.orgName}}</span></div>' },
// { name: $translate.instant('CostCenterDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.segment2Name}}</span></div>' },
{ name: $translate.instant('AccountCode'),width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.subjectCode}}</span></div>' },
{ name: $translate.instant('SubjectDescription'),width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.subjectName}}</span></div>' },
{ name: $translate.instant('SubjectDescription'),width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.subjectName}}">{{row.entity.subjectName}}</span></div>' },
// { name: $translate.instant('AuxiliaryAccountDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.segment4Name}}</span></div>' },
// { name: $translate.instant('ProfitCenterDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.segment5Name}}</span></div>' },
// { name: $translate.instant('ProductManual'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.segment6Name}}</span></div>' },
......
......@@ -39,15 +39,8 @@
pageInfo: {},
periodStart: '',
periodEnd: '',
// orgId: '',
// segment3: null,
// segment3Name: null,
// segment5: null,
// segment5Name: null,
// segment6: null,
// segment6Name: null,
// description: null,
// containsAdjustmentRecord: null
accountCode: '',
accountDescription: '',
projectId: vatSessionService.project.id
};
};
......@@ -157,35 +150,20 @@
// $scope.queryParams.periodEnd = $scope.queryParams.periodStart;
// }
//设置需要去掉的查询条件的值为空
// if (!PWC.isNullOrEmpty(removeData)) {
// var removeItem = removeData.split("|");
// removeItem.forEach(function (v) {
// $scope.queryParams[v] = null;
//
// if ($scope.queryParams.segment3 === null) {
// $scope.queryParams.segment3 = '';
// }
// if ($scope.queryParams.segment3Name === null) {
// $scope.queryParams.segment3Name = '';
// }
// if ($scope.queryParams.segment5 === null) {
// $scope.queryParams.segment5Name = '';
// }
// if ($scope.queryParams.segment6 === null) {
// $scope.queryParams.segment6 = '';
// }
// if ($scope.queryParams.segment6Name === null) {
// $scope.queryParams.segment6Name = '';
// }
// if ($scope.queryParams.description === null) {
// $scope.queryParams.description = '';
// }
// if ($scope.queryParams.invoiceType === null) {
// $scope.InvoiceType.selected = undefined;
// }
// });
// }
设置需要去掉的查询条件的值为空
if (!PWC.isNullOrEmpty(removeData)) {
var removeItem = removeData.split("|");
removeItem.forEach(function (v) {
$scope.queryParams[v] = null;
if ($scope.queryParams.accountCode === null) {
$scope.queryParams.accountCode = '';
}
if ($scope.queryParams.accountDescription === null) {
$scope.queryParams.accountDescription = '';
}
});
}
loadJournalEntryDataFromDB(1);
if ($scope.criteriaList.length > 6) {
......@@ -310,7 +288,7 @@
enableHorizontalScrollbar : 1,
columnDefs: [
{ name: $translate.instant('AccountCode'), width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.accountCode}}<span></div>' },
{ name: $translate.instant('AccountDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.accountDescription}}<span></div>' },
{ name: $translate.instant('AccountDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.accountDescription}}">{{row.entity.accountDescription}}<span></div>' },
{ name: $translate.instant('AccountPeriod'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.accountPeriod}}</span></div>' },
{ name: $translate.instant('DebitAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.debitAmount}}</span></div>' },
{ name: $translate.instant('CreditAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.creditAmount}}</span></div>' },
......
......@@ -8,8 +8,9 @@
data-templateurl="/app/cit/preview/cit-preview-tb-generate-ver/cit-preview-tb-generate-ver-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
<span translate="TrialBalanceGeneVer" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;" id="input-invoice-period-picker" />
<span translate="TrialBalanceGeneVer" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;
<span class="text-bold" translate="InvoiceQJ" style="display: none"></span>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;display: none;" id="input-invoice-period-picker" />
<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
......
......@@ -42,15 +42,9 @@
pageInfo: {},
periodStart: '',
periodEnd: '',
// orgId: '',
// segment3: null,
// segment3Name: null,
// segment5: null,
// segment5Name: null,
// segment6: null,
// segment6Name: null,
// description: null,
// containsAdjustmentRecord: null
accountCode: '',
accountDescription: '',
attribute : '',
projectId: vatSessionService.project.id
};
};
......@@ -160,35 +154,23 @@
// $scope.queryParams.periodEnd = $scope.queryParams.periodStart;
// }
//设置需要去掉的查询条件的值为空
// if (!PWC.isNullOrEmpty(removeData)) {
// var removeItem = removeData.split("|");
// removeItem.forEach(function (v) {
// $scope.queryParams[v] = null;
//
// if ($scope.queryParams.segment3 === null) {
// $scope.queryParams.segment3 = '';
// }
// if ($scope.queryParams.segment3Name === null) {
// $scope.queryParams.segment3Name = '';
// }
// if ($scope.queryParams.segment5 === null) {
// $scope.queryParams.segment5Name = '';
// }
// if ($scope.queryParams.segment6 === null) {
// $scope.queryParams.segment6 = '';
// }
// if ($scope.queryParams.segment6Name === null) {
// $scope.queryParams.segment6Name = '';
// }
// if ($scope.queryParams.description === null) {
// $scope.queryParams.description = '';
// }
// if ($scope.queryParams.invoiceType === null) {
// $scope.InvoiceType.selected = undefined;
// }
// });
// }
设置需要去掉的查询条件的值为空
if (!PWC.isNullOrEmpty(removeData)) {
var removeItem = removeData.split("|");
removeItem.forEach(function (v) {
$scope.queryParams[v] = null;
if ($scope.queryParams.accountCode === null) {
$scope.queryParams.accountCode = '';
}
if ($scope.queryParams.accountDescription === null) {
$scope.queryParams.accountDescription = '';
}
if ($scope.queryParams.attribute === null) {
$scope.queryParams.attribute = '';
}
});
}
loadJournalEntryDataFromDB(1);
if ($scope.criteriaList.length > 6) {
......@@ -314,7 +296,7 @@
columnDefs: [
{ name: $translate.instant('Attribute'), width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.attribute}}<span></div>' },
{ name: $translate.instant('AccountCode'), width: 200, cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.accountCode}}<span></div>' },
{ name: $translate.instant('AccountDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.accountDescription}}<span></div>' },
{ name: $translate.instant('AccountDescription'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span title="{{row.entity.accountDescription}}">{{row.entity.accountDescription}}<span></div>' },
{ name: $translate.instant('AccountPeriod'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.accountPeriod}}</span></div>' },
{ name: $translate.instant('DebitAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.debitAmount}}</span></div>' },
{ name: $translate.instant('CreditAmount'), width: 200,cellTemplate: '<div class="ui-grid-cell-contents"><span >{{row.entity.creditAmount}}</span></div>' },
......
......@@ -8,8 +8,9 @@
data-templateurl="/app/cit/preview/cit-preview-tb-mapping-ver/cit-preview-tb-mapping-ver-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>
<span translate="TrialBalanceMappingVer" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class="text-bold" translate="InvoiceQJ"></span>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;" id="input-invoice-period-picker" />
<span translate="TrialBalanceMappingVer" class="text-bold"></span> &nbsp;&nbsp;|&nbsp;&nbsp;
<span class="text-bold" translate="InvoiceQJ" style="display: none"></span>
<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;display: none" id="input-invoice-period-picker" />
<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>
</div>
......
......@@ -651,6 +651,7 @@ constant.citPermission = {
dataManageCode: '03.003',
accountMappingCode: '03.003.001',
assetEamMapping: '03.003.002',
distributionTable: '03.003.003',
accountMapping: {
queryCode: '03.003.001.001',
importCode: '03.003.001.002'
......
......@@ -872,7 +872,7 @@
var goRightPath = function (project) {
// TODO: CIT 权限
if (project.serviceTypeID === enums.serviceType.CIT) {
$state.go('cit.importData.balanceSheet');
$state.go('cit.importData.assetList');
}
else {
var menuList = [
......
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