Commit 5aeb1221 authored by kevin's avatar kevin

#

parent 64c3bbd1
package pwc.taxtech.atms.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
......@@ -12,6 +13,7 @@ import pwc.taxtech.atms.constant.enums.EnumServiceType;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ReportAttachDto;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig;
import pwc.taxtech.atms.vat.entity.PeriodJob;
......@@ -165,9 +167,10 @@ public class ReportController {
return operationResultDto;
}
@RequestMapping(value = "loadAttachList", method = RequestMethod.GET)
public List<PwcReportAttach> loadAttachList(Long col, Long row, String templateId){
return reportService.loadAttachList(col, row, templateId);
@RequestMapping("loadAttachList")
public PageInfo<PwcReportAttach> loadAttachList(@RequestBody ReportAttachDto reportAttachDto){
System.out.println("sdsdfsd");
return reportService.loadAttachList(reportAttachDto);
}
......
......@@ -37,5 +37,4 @@ public class RevenueConfController extends BaseController {
revenueConfService.updateConfig(config);
return ApiResultDto.success();
}
}
package pwc.taxtech.atms.dto;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfParam;
public class ReportAttachDto extends RevenueConfParam {
private Long activeCol;
private Long activeRow;
private String activeTemplateId;
public Long getActiveCol() {
return activeCol;
}
public void setActiveCol(Long activeCol) {
this.activeCol = activeCol;
}
public Long getActiveRow() {
return activeRow;
}
public void setActiveRow(Long activeRow) {
this.activeRow = activeRow;
}
public String getActiveTemplateId() {
return activeTemplateId;
}
public void setActiveTemplateId(String activeTemplateId) {
this.activeTemplateId = activeTemplateId;
}
@Override
public String toString() {
return "ReportAttachDto{" +
"activeCol=" + activeCol +
", activeRow=" + activeRow +
", activeTemplateId='" + activeTemplateId + '\'' +
'}';
}
}
package pwc.taxtech.atms.vat.service.impl;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
......@@ -23,6 +26,8 @@ import pwc.taxtech.atms.dao.*;
import pwc.taxtech.atms.dpo.ReportDto;
import pwc.taxtech.atms.dto.FileDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.ReportAttachDto;
import pwc.taxtech.atms.dto.revenuconf.RevenueConfResult;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.exception.Exceptions;
......@@ -495,6 +500,8 @@ public class ReportServiceImpl extends BaseService {
@Override
public void run() {
try {
//进行数据校验
DataValidation(periodParam, projectId);
updateConfig(projectId, periodParam, isMergeManualData, templates, genJob);
......@@ -519,6 +526,7 @@ public class ReportServiceImpl extends BaseService {
periodJobMapper.updateByPrimaryKey(genJob);
}
}
}).start();
operationResultDto.setData(new PeriodJobDto().copyFromPeriodJob(genJob));
operationResultDto.setResult(true);
......@@ -528,6 +536,39 @@ public class ReportServiceImpl extends BaseService {
}
return operationResultDto;
}
@Autowired
private TrialBalanceMapper trialBalanceMapper;
@Autowired
private AdjustmentTableMapper adjustmentTableMapper;
@Autowired
private ProfitLossStatementMapper profitLossStatementMapper;
/* @Autowired
private CitJour*/
//数据校验
private void DataValidation(Integer periodParam, String projectId) {
//本期余额表
TrialBalanceExample trialBalanceExample = new TrialBalanceExample();
TrialBalanceExample.Criteria criteria = trialBalanceExample.createCriteria();
criteria.andProjectIdEqualTo(projectId);
criteria.andPeriodEqualTo(periodParam);
TrialBalance trialBalances = trialBalanceMapper.selectByExample(trialBalanceExample).get(0);
//调整表
AdjustmentTableExample adjustmentTableExample = new AdjustmentTableExample();
AdjustmentTableExample.Criteria criteria1 = adjustmentTableExample.createCriteria();
criteria1.andPeriodEqualTo(periodParam);
criteria1.andProjectIdEqualTo(projectId);
AdjustmentTable adjustmentTables = adjustmentTableMapper.selectByExample(adjustmentTableExample).get(0);
//本期利润表
ProfitLossStatementExample profitLossStatementExample = new ProfitLossStatementExample();
ProfitLossStatementExample.Criteria criteria2 = profitLossStatementExample.createCriteria();
criteria2.andProjectIdEqualTo(projectId);
criteria2.andPeriodEqualTo(periodParam);
ProfitLossStatement profitLossStatements = profitLossStatementMapper.selectByExample(profitLossStatementExample).get(0);
}
public List<CellTemplateReferenceDto> getTemplateReferences(int period) {
return new ArrayList<>();
......@@ -1333,17 +1374,21 @@ public class ReportServiceImpl extends BaseService {
pwcReportAttach.setUploadUser(file.getUploadUser());
pwcReportAttach.setFileUrl(file.getFileUrl());
pwcReportAttach.setSize(file.getSize());
pwcReportAttach.setRemarks(file.getRemarks());
pwcReportAttachMapper.insert(pwcReportAttach);
System.out.println("==>>>附件绑定成功");
}
public List<PwcReportAttach> loadAttachList(Long col, Long row, String templateId) {
public PageInfo loadAttachList(ReportAttachDto param) {
PwcReportAttachExample example = new PwcReportAttachExample();
Page page = PageHelper.startPage(param.getPageInfo().getPageIndex(), param.getPageInfo().getPageSize());
PwcReportAttachExample.Criteria criteria = example.createCriteria();
criteria.andColEqualTo(col);
criteria.andRowEqualTo(row);
criteria.andTemplateIdEqualTo(templateId);
criteria.andColEqualTo(param.getActiveCol());
criteria.andRowEqualTo(param.getActiveRow());
criteria.andTemplateIdEqualTo(param.getActiveTemplateId());
example.setOrderByClause("create_time DESC");
return pwcReportAttachMapper.selectByExample(example);
PageInfo<PwcReportAttach> pageInfo = new PageInfo<PwcReportAttach>(pwcReportAttachMapper.selectByExample(example));
pageInfo.setTotal(page.getTotal());
return pageInfo;
}
}
......@@ -1840,8 +1840,6 @@
"extractInvoiceData": "Extract Invoice Data",
"ExtractInvoiceDataTitle": "Extract Invoice Data",
"TBInterCompany": "Inter-Company",
"~MustBeEndOneApp": "I Must be the End One, please!"
"~MustBeEndOneApp": "I Must be the End One, please!",
"dataValidate" : "数据校验"
}
\ No newline at end of file
......@@ -2338,11 +2338,8 @@
columns: [{caption: '序号', dataField: "xh"},
{caption: '文件名', dataField: "fileName",cellTemplate: function (container, options) {
try {
$('<i class="fa fa-pencil-square-o" style="cursor: pointer"></i>&nbsp;&nbsp;')
.on('click', function () {
location.href = options.data.fileUrl;
});
$('<a href="'+options.data.fileUrl+'" target="_blank" style="cursor: pointer">"'+options.data.fileName+'"</a>&nbsp;&nbsp;')
.appendTo(container);
}
catch (e) {
$log.error(e);
......@@ -2371,24 +2368,35 @@
//加载附件信息列表
$scope.loadAttach = function () {
$scope._gridData = [];
$scope.activeSheet.pageInfo = $scope.pagingOptions;
if ($scope.activeSheet.activeRow && $scope.activeSheet.activeCol && $scope.activeSheet.activeTemplateId) {
//获取附件信息
vatReportService.loadAttachList($scope.activeSheet).success(function (data) {
var _xh = 0;
for(var i = 0; i< data.length; i++){
var _data = {
xh : i+1,
fileName : data[i].fileName,
size : data[i].size,
remarks : data[i].remarks,
uploadUser : data[i].uploadUser,
createTime : data[i].createTime
vatReportService.loadAttachList($scope.activeSheet).success(function (_data) {
var data = _data.list;
if (_data && data) {
var _xh = 0;
for(var i = 0; i< data.length; i++){
/* var _data1 = {
xh : i+1,
fileName : data[i].fileName,
size : data[i].size,
remarks : data[i].remarks,
uploadUser : data[i].uploadUser,
createTime : data[i].createTime,
fileUrl : data[i].
}*/
data[i].xh = i+1;
$scope._gridData.push(data[i]);
_xh = i+1;
}
$scope._gridData.push(_data);
_xh = i+1;
$scope.xh = _xh;
//$scope._gridData = data;
$scope.pagingOptions.totalItems = _data.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
$scope.xh = _xh;
//刷新附件列表
// $scope.dataGrid.refresh();
// dataGrid.refresh();
......@@ -2403,6 +2411,7 @@
$scope.remarks = "";
$scope.fileNameWrapper = {};
$scope.fileName = "";
$scope.$apply();
$('#addCellAttachmentContainer').modal('show');
}
......@@ -2441,7 +2450,8 @@
size : dataSource.data.size,
remarks : dataSource.data.remarks,
uploadUser : dataSource.data.uploadUser,
createTime : dataSource.data.createTime
createTime : dataSource.data.createTime,
fileUrl : dataSource.data.fileUrl
}
$scope._gridData.push(_data);
......@@ -2494,6 +2504,22 @@
}
}
});
//点击分页
/* //刷新页面
$scope.refreshConfigGrid = function () {
$http.post('/revenueConf/queryPage',{pageInfo: $scope.pagingOptions}, apiConfig.createVat())
.success(function (res) {
if (res && res.list) {
$scope.pageConfDataSource = res.list;
$scope.pagingOptions.totalItems = res.pageInfo.totalCount;
}else {
SweetAlert.error($translate.instant('SystemError'));
}
})
};*/
//保存按钮
$scope.uploadCellAttachment = function () {
uploadfile($scope.fileNameWrapper);
......@@ -2504,8 +2530,12 @@
(function () {
//分页的设置
$scope.pagingOptions = {
pageIndex: 1, //当前页码
totalItems: 0, //总数据
pageSize: 20, //每页多少条数据
};
$scope.hidePanel = hidePanel;
$scope.isExpand = true;
$scope.togglePanel = togglePanel;
......
......@@ -280,11 +280,18 @@
<div class="attach-upload" ng-show="tabType===5" style="">
<button style="margin-bottom:20px;" class="btn btn-primary" ng-click="openAddCellAttachmentDialog();">上传文档
</button>
<div class="dt-init-wrapper">
<div id="cellAttachmentDataGrid" dx-data-grid="cellAttachmentDataGirdOptions"
class="dx-widget dx-visibility-change-handler" role="application" aria-label="Data grid"
style="height: 450px;">
</div>
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="loadAttach()"></ack-pagination>
</div>
</div>
</div>
</div>
......
......@@ -196,7 +196,7 @@
return $http.get('/Report/hasManualDataSource/' + projectId+ '/' +period, apiConfig.createVat());
},
loadAttachList : function(activeSheet){
return $http.get('/Report/loadAttachList?col='+ activeSheet.activeCol + "&row=" + activeSheet.activeRow + "&templateId=" +activeSheet.activeTemplateId, apiConfig.createVat());
return $http.post('/Report/loadAttachList' , activeSheet, apiConfig.createVat());
}
};
......
......@@ -205,7 +205,12 @@
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CaculateUnbilled', 'unstarted'), new task('UpdateReportConfig', 'unstarted'), new task('GenerateFinanceReport', 'unstarted')] });
result.push({ name: $translate.instant('ProcessData'), items: [new task('UpdateReportConfig', 'unstarted')] });
result[result.length - 1].items.forEach(function (t) { t.seqNo = result.length - 1 });
var dataValidateItems = ["本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计", "上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)"];
var reItem = [];
for(var i = 0; i< dataValidateItems.length; i++){///添加数据数据校验选项
reItem.push(new task(dataValidateItems[i], "unstarted"));
}
result.push({ name: $translate.instant('dataValidate'), items : reItem});
fixedRef = [];
if (report && report.data && report.data.data) {
result.push({
......@@ -238,7 +243,7 @@
i++;
taskList = taskList.concat(item.items);
});
$scope.tasks = result;
getInitTaskStatus();
});
};
......@@ -276,12 +281,14 @@
// });
}
function doStartCaculate2(isMergeManualDataSource) {
vatReportService.generateAll(vatSessionService.project.id, isMergeManualDataSource, vatSessionService.month, vatSessionService.logUser.id ? vatSessionService.logUser.id : "").success(function (data) {
$scope.readonly = true;
if(data && data.result)
updateTasksStatus(data.data);
alert(JSON.stringify(data.data));
updateTasksStatus(data.data);
if(data.data.jobStatus=='Begin'||data.data.jobStatus=='Running'){
if(!$scope.timer)
$scope.timer= $interval(function(){
......@@ -605,6 +612,7 @@
var getInitTaskStatus = function(){
vatReportService.getRunningJob(vatSessionService.project.id,vatSessionService.month).then(function (result) {
debugger;
if(result.data && result.status == 200){
updateTasksStatus(result.data);
if(result.data.jobStatus=='Begin'||result.data.jobStatus=='Running'){
......@@ -625,7 +633,6 @@
}else{
$log.debug("not running job");
}
});
}
......
......@@ -8,23 +8,23 @@
<span class="vat-subheader" style="margin:0px 20px 0px 0px;font-weight:bold" title="{{projectName}}">{{projectName | limitString:15}}</span>
<!--<span class="vat-subheader" style="margin:0px 20px 0px 0px;font-weight:bold">{{projectName}}</span>-->
<span class="project-statuts-title">
<i id="imgProjectStatus" class="fa fa-lightbulb-o"
<i id="imgProjectStatus" class="fa fa-lightbulb-o"
ng-class="{'project-statuts-title-i-inactive' : layoutVatSession.project.projectStatusList[period] === 10}"
aria-hidden="true" ng-click="showProjectStatus()">&nbsp;&nbsp;{{statusTitle}}</i>
</span>
<!--<i id="imgProjectStatus" class="fa fa-info" aria-hidden="true" ng-click="showProjectStatus()"></i>-->
<i class="fa fa-calendar vat-subheader red-color" style="font-size:20px;"></i>
<i class="fa fa-calendar vat-subheader red-color" style="font-size:20px;"></i>
<input type="text" id="vatDatepicker" class="datepicker vat-subheader" style="border-width:0;outline:none;" readonly="readonly" />
<div id="vat-menu-buttons" style="display:inline-block;">
<a ng-repeat="menu in menus" ui-sref-active="active" ng-click="setReportSession(menu.name);" ui-sref=".{{menu.name}}"
atms-permission permission-control-type="ngIf" permission-code="{{menu.permission}}">{{menu.state | translate}}</a>
</div>
<!--<button class="btn btn-vat-primary" translate="TriggerMessageSchedulerJob" ng-click="triggerSchedulerJob()"></button>-->
</div>
<!--<div id="vat-menu-buttons">
<a ng-repeat="menu in menus" ui-sref-active="active" ui-sref=".{{menu.name}}"><span>{{menu.num}}</span>{{menu.name | translate}}</a>
</div>-->
......@@ -39,24 +39,24 @@
ng-class="[{ 'slideup': menuState === menuStates.collapsing }, { 'slidedown': menuState === menuStates.expanding }, { 'expanded': menuState === menuStates.collapsing || menuState === menuStates.collapsed }]"></div>
<!-- 项目状态 -->
<script type="text/ng-template" id="model-project-status.html" class="model-project-status">
<!--<div class="modal-header">
<!--<div class="modal-header">
<div class="modal-title">
</div>
</div>-->
<div class="modal-body">
<i class="fa fa-times" aria-hidden="true" style="float: right; font-size: 11px; color: #CF2D1B" ng-click="closeModal()"></i>
<i class="fa fa-times" aria-hidden="true" style="float: right; font-size: 11px; color: #CF2D1B" ng-click="closeModal()"></i>
<ul class="ul-status">
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] === 10}">&nbsp;&nbsp;&nbsp;{{startStatusText}}</i>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] === 10}">&nbsp;&nbsp;&nbsp;{{startStatusText}}</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] === 10}">&nbsp;</div>
</li>
<li ng-click="showSubStatus()">
<i class="fa fa-dot-circle-o" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 20}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusImported' | translate }}</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 20, 'verticalLine-add-bottom-line' : displaySubStatus}">&nbsp;</div>
<ul ng-show="displaySubStatus">
<ul ng-show="displaySubStatus">
<li ng-repeat="item in subStatusList track by $index">
<i class="fa fa-check-circle" aria-hidden="true" ng-class="{'i-inactive' : !item.isImported}">&nbsp;&nbsp;{{item.name }}</i>
<div ng-show="$index < subStatusList.length - 1" class="vertical-bottom-line" ng-class="{'verticalLine-inactive' : !item.isImported}">&nbsp;</div>
......@@ -68,12 +68,12 @@
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 30}">&nbsp;</div>
</li>
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 40}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusGenerated' | translate }} </i>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 40}">&nbsp;&nbsp;&nbsp;{{'ProjectStatusGenerated' | translate }} </i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 40}">&nbsp;</div>
</li>
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 50}">
&nbsp;&nbsp;{{'ProjectStatusReportSubmitted' | translate }}
&nbsp;&nbsp;{{'ProjectStatusReportSubmitted' | translate }}
&nbsp;&nbsp;<span ng-show="submitDetailDto.isDone" style="font-size:12px">{{submitDetailDto.finishedData}}</span>
</i>
<div class="verticalLine" ng-class="{'verticalLine-inactive' : layoutVatSession.project.projectStatusList[period] < 50}">&nbsp; </div>
......@@ -93,7 +93,7 @@
<li>
<i class="fa fa-circle" aria-hidden="true" ng-class="{'i-inactive' : layoutVatSession.project.projectStatusList[period] < 100}">&nbsp;&nbsp;&nbsp;{{'ProejctStatusCompleted' | translate }} </i>
</li>
</ul>
</div>
......@@ -102,5 +102,5 @@
</div>-->
</script>
</div>
\ No newline at end of file
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