Commit 6b1094d2 authored by kevin's avatar kevin

#debug

parent b006169e
......@@ -14,6 +14,15 @@ public class ManualDataSourceDto {
Integer period;
Long reportId;
Long id;
String penValue;//穿透修改值
public String getPenValue() {
return penValue;
}
public void setPenValue(String penValue) {
this.penValue = penValue;
}
public Long getCellId() {
return this.cellId;
......
......@@ -722,17 +722,17 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue(0.00);
} else if (1 == config.getAccountType()) {//科目
row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")-"
+"JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
+ "JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"" + config.getTbSegment5() + "\",\"" + config.getTbSegment6() + "\")");
} else if(2 == config.getAccountType()){//手工输入
} else if (2 == config.getAccountType()) {//手工输入
}else{
} else {
row.getCell(TaxesCalculateReportEnum.Column.Column_5.getIndex()).setCellValue("");
}
row.getCell(TaxesCalculateReportEnum.Column.Column_6.getIndex()).setCellValue("");
row.getCell(TaxesCalculateReportEnum.Column.Column_7.getIndex()).setCellValue("");
if (1 == config.getTaxBase()) {//账载
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\""+config.getName()+"\",\"E\")");
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"B\",\"" + config.getName() + "\",\"E\")");
} else if (2 == config.getTaxBase()) {//开票收入
} else if (3 == config.getTaxBase()) {//手工录入
......@@ -741,7 +741,7 @@ public class ReportServiceImpl extends BaseService {
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("JFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"\",\"\")");
} else if (5 == config.getTaxBase()) {//贷方发生额
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("DFFS(\"" + config.getTbSegment3() + "\"," + project.getYear() + "," + period + "," + 1 + ",\"\",\"\")");
}else{
} else {
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("");
}
row.getCell(TaxesCalculateReportEnum.Column.Column_8.getIndex()).setCellValue("WPNAME(\"VAT020\",\"C\",\"增值税进项税\",\"G\")");
......@@ -974,7 +974,7 @@ public class ReportServiceImpl extends BaseService {
PeriodCellDataExample cellDataExample = new PeriodCellDataExample();
cellDataExample.createCriteria().andPeriodEqualTo(report.getPeriod()).andProjectIdEqualTo(projectId).andReportIdEqualTo(reportId);
List<PeriodCellData> currentCellDataList = periodCellDataMapper.selectByExample(cellDataExample);
List<PeriodCellData> currentCellDataList = periodCellDataMapper.selectByExample(cellDataExample); //这是取的是单元格中显示的值
PeriodFormulaBlockExample periodFormulaBlockExample = new PeriodFormulaBlockExample();
periodFormulaBlockExample.createCriteria().andProjectIdEqualTo(projectId).andPeriodEqualTo(report.getPeriod())
.andReportIdEqualTo(reportId);
......@@ -1299,17 +1299,35 @@ public class ReportServiceImpl extends BaseService {
data.setCellId(cellData.getId());
} else {
PeriodCellData cellData = periodCellDataMapper.selectByPrimaryKey(data.getCellId());
if (StringUtils.isNotBlank(data.getKeyinData())) {
/*if (StringUtils.isNotBlank(data.getKeyinData())) {
cellData.setKeyinData(data.getKeyinData());
if (StringUtils.isEmpty(cellData.getFormulaExp()))
cellData.setFormulaExp(data.getKeyinData());
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
} else if (data.getAmount() != null && cellData.getData() != data.getAmount().toString()) {
}*/ /*else if (data.getAmount() != null && cellData.getData() != data.getAmount().toString()) {
cellData.setData(data.getAmount().toString());
if (StringUtils.isEmpty(cellData.getFormulaExp()))
cellData.setFormulaExp(data.getAmount().toString());
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
}*//* else if (StringUtils.isNotBlank(data.getPenValue())) {//穿透调整数据
cellData.setData(data.getPenValue());
if (StringUtils.isEmpty(cellData.getFormulaExp()))
cellData.setFormulaExp(data.getAmount().toString());
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
}*/
boolean boo1 = StringUtils.isNotBlank(data.getPenValue());//穿透合并值
boolean boo2 = StringUtils.isNotBlank(data.getKeyinData());//手工输入
if (boo1 && boo2) {
cellData.setData(String.valueOf((Double.parseDouble(data.getPenValue()) + Double.parseDouble(data.getKeyinData()))));
} else if (boo1 && !boo2) {
cellData.setData(String.valueOf((Double.parseDouble(data.getPenValue()))));
} else if (!boo1 && boo2) {
cellData.setData(String.valueOf((Double.parseDouble(data.getKeyinData()))));
}
if (StringUtils.isEmpty(cellData.getFormulaExp()))
cellData.setFormulaExp(data.getAmount().toString());
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
}
......
......@@ -36,7 +36,7 @@ public class CitTbam extends BaseEntity implements Serializable {
private String organizationId;
private Long adjustAccount;
private List<OperationLogEntryLog> operationLogEntryLogList;
private OperationLogEntryLog[] operationLogEntryLogList;
public Long getAdjustAccount() {
return adjustAccount;
......@@ -46,11 +46,11 @@ public class CitTbam extends BaseEntity implements Serializable {
this.adjustAccount = adjustAccount;
}
public List<OperationLogEntryLog> getOperationLogEntryLogList() {
public OperationLogEntryLog[] getOperationLogEntryLogList() {
return operationLogEntryLogList;
}
public void setOperationLogEntryLogList(List<OperationLogEntryLog> operationLogEntryLogList) {
public void setOperationLogEntryLogList(OperationLogEntryLog[] operationLogEntryLogList) {
this.operationLogEntryLogList = operationLogEntryLogList;
}
......
......@@ -1212,6 +1212,7 @@
// 更新spreadjs计算所需datasource信息
$scope.updateCellByManualChange = function (manualData) {
debugger;
var cellData = _.find($scope.reportData, function (x) {
return x.cellTemplateID == manualData.cellTemplateId
|| x.cellID === manualData.cellId;
......@@ -1551,36 +1552,48 @@
//单元格详细信息点击确定时执行
$scope.confirm = function () {
if (vatSessionService.month)
vatSessionService.project.period = vatSessionService.month;
vatApproveService.approvalStatus(vatSessionService.project.id, vatSessionService.project.period).success(function (result) {
$scope.handInputModel.name = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.description = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.projectID = vatSessionService.project.id;
$scope.handInputModel.serviceTypeID = vatSessionService.project.serviceTypeID;
$scope.handInputModel.period = vatSessionService.month;
//日志对象
logDto.ID = PWC.newGuid();
logDto.CreateTime = new Date();
logDto.UpdateTime = new Date();
logDto.OperationContent = "Amount: " + $scope.handInputModel.amount
+ "; Description: " + $scope.handInputModel.description + "keyinData:" + $scope.handInputModel.keyinData;
logDto.OperationName = $translate.instant('ManualInputDataSource');
logDto.Comment = comment + "(Cell ID:" + $scope.handInputModel.cellID
+ ", Cell Template ID:" + $scope.handInputModel.cellTemplateID + ")";
logDto.OperationType = enums.vatLogOperationTypeEnum.RV_ManualInput;
if (result && result == 'committed') {
SweetAlert.error('报表提审中!');
} else {
$scope.handInputModel.name = $scope.taxCellDetail.inputMemo;
var r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;
}/*else if(($scope.taxCellDetail.penValue != undefined && $scope.taxCellDetail.penValue != null) && $scope.taxCellDetail.keyinData){//手工输入和穿透合并值都存在
$scope.handInputModel.penValue = $scope.taxCellDetail.penValue;//
$scope.handInputModel.keyinData = $scope.taxCellDetail.keyinData;
return vatReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
var obj = manualData.data.data;
obj.dataSourceType = manualData.dataSourceType;
$scope.updateCellByManualChange(obj);
return $q.when();
});
return $q.reject();
}*/ else {
/* var r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;*/
if ($scope.taxCellDetail.keyinData) {
$scope.handInputModel.keyinData = $scope.taxCellDetail.keyinData;
} else {
$scope.handInputModel.amount = $scope.taxCellDetail.inputValue;
}
$scope.handInputModel.description = $scope.taxCellDetail.inputMemo;
$scope.handInputModel.projectID = vatSessionService.project.id;
$scope.handInputModel.serviceTypeID = vatSessionService.project.serviceTypeID;
$scope.handInputModel.period = vatSessionService.month;
if ($scope.handInputModel.amount || $scope.handInputModel.name || $scope.handInputModel.keyinData) {
//日志对象
logDto.ID = PWC.newGuid();
logDto.CreateTime = new Date();
logDto.UpdateTime = new Date();
logDto.OperationContent = "Amount: " + $scope.handInputModel.amount
+ "; Description: " + $scope.handInputModel.description + "keyinData:" + $scope.handInputModel.keyinData;
logDto.OperationName = $translate.instant('ManualInputDataSource');
logDto.Comment = comment + "(Cell ID:" + $scope.handInputModel.cellID
+ ", Cell Template ID:" + $scope.handInputModel.cellTemplateID + ")";
logDto.OperationType = enums.vatLogOperationTypeEnum.RV_ManualInput;
if($scope.taxCellDetail.penValue != undefined && $scope.taxCellDetail.penValue != null){
$scope.handInputModel.penValue = $scope.taxCellDetail.penValue;
}
if ($scope.handInputModel.amount || $scope.handInputModel.name || $scope.handInputModel.keyinData || $scope.handInputModel.penValue ) {
// 前端保存数据
return vatReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
var obj = manualData.data.data;
......@@ -2072,7 +2085,6 @@
$scope.closeModal = function () {
$scope.modalInstance.dismiss('cancel');
};
setApproveValue(operationTypeId);
}
......@@ -2294,6 +2306,7 @@
}
var modelFillBackFunc = $scope.$on("ModelWriteBackHasChanged", function (event, data) {
var dataSource = {
id: data.dataSourceId,
name: 'ModelBackFill',
......
......@@ -13,6 +13,7 @@
QMYETotalend: ""
}
}
var _logIndex =0;
if($scope.relObj.logs == undefined || $scope.relObj.logs.length == 0){
$scope.relObj.logs = [];
}
......@@ -51,14 +52,17 @@
$log.debug($scope.selectedItems);*/
$scope.doCalcute(selectedItems.selectedRowsData);
var _in = {};
if(selectedItems.currentDeselectedRowKeys.length == 0){
selectedItems.currentSelectedRowKeys[0].operate = '增'
$scope.relObj.logs.push(selectedItems.currentSelectedRowKeys[0]);
_in.operate = "增";
_in.accountingDate = selectedItems.currentSelectedRowKeys[0];
_in.voucherNum = selectedItems.currentSelectedRowKeys[0];
}else{
selectedItems.currentDeselectedRowKeys[0].operate = '减';
$scope.relObj.logs.push(selectedItems.currentDeselectedRowKeys[0]);
_in.operate = "减";
_in.accountingDate = selectedItems.currentDeselectedRowKeys[0];
_in.voucherNum = selectedItems.currentDeselectedRowKeys[0];
}
$scope.relObj.logs.push(_in);
},
allowColumnResizing: true,
hoverStateEnabled: true,
......
<div>
<div class="modal fade" id="entryLogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 1100">
<div class="modal fade" id="entryLogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 1100">
<div class="modal-dialog modal-lg" style="width: 1200px;">
<div class="modal-content">
<div class="modal-header">
......
citModule.controller('citTaxReportCellDetailModalController', ['$log', 'apiInterceptor', 'Upload', '$scope', '$q', '$translate', '$uibModal', '$document', '$rootScope', 'SweetAlert', 'enums',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', 'commonWebService', 'dxDataGridService',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', 'commonWebService', 'dxDataGridService', 'commonWebService',
function ($log, apiInterceptor, Upload, $scope, $q, $translate, $uibModal, $document, $rootScope, SweetAlert, enums, vatReportService, loginContext,
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService, dxDataGridService) {
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService, dxDataGridService, commonWebService) {
var activeClass = 'active';
$scope.currentUserName = loginContext.userName;
......@@ -578,7 +578,6 @@
$scope.selectedTabIndex != enums.formulaDataSourceType.Special) {
$("#dataGridFooterSummary").show();
$scope.dataGridHeight = 165;
} else {
$("#dataGridFooterSummary").hide();
$scope.dataGridHeight = 195;
......@@ -1549,28 +1548,28 @@
//重新计算合计值
var calculateSum = function (n) {
var precition = 2;
var evalVal = _.reduce($scope.detail.dataGridSourceBind, function (memo, x) {
if (x.accountCode == $scope.relObj.account) {
if ((x.accountCode == $scope.relObj.account) && x.accountCode != undefined && $scope.relObj.account != undefined) {
memo + n;
} else {
return memo + x.endBalance;
return memo + x.endingBalance;
}
}, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(evalVal, true));
$scope.detail.penValue = evalVal.formatAmount(evalVal, true);
}
$scope.showLog = function () {//显示日志
alert('调用了');
//在点击日志前 科目代码下是否有日志
cellCommentService.selectEntryLog(entryLogIdByCode).success(function(res){
if(res.data){
$scope.relObj.logs = res.data;
cellCommentService.selectEntryLog($scope.detail.entryLogIdByCode).success(function (res) {
if (res.data) {
$scope.relObj.logs = commonWebService._index(res.data.concat($scope.relObj.logs));
$('#entryLogModal').modal('show');
}
}).error();
$('#entryLogModal').modal('show');
}).error(function (error) {
alert("日志信息获取失败");
});
}
//显示分录信息 同时加载数据
......@@ -1580,14 +1579,18 @@
cellCommentService.loadEntryListDataList(e.data.accountCode).success(function (res) {
$scope.relObj.account = e.data.accountCode;
if (res.resultMsg == "success") {
$scope.relObj.entryDataSource = commonWebService._index(res.data)
$scope.relObj.entryDataSource = commonWebService._index(res.data);
}
$('#entryListModal').modal('show')
$('#entryListModal').modal('show');
}).error(function (error) {
alert(error);
});
}
//-------------------------------------------------------------------- end --------------------------------------------------------------
//设置数据源表格的列
var getAllDataGridColumns = function () {
var dataGridColumns;
......@@ -1742,9 +1745,6 @@
}
return dataGridColumns;
};
//-------------------------------------------------------------------- end --------------------------------------------------------------
//添加数据源(发票|凭证)数据过滤
var allDataFilter = function (config, data) {
var dataGridColumns;
......@@ -2228,6 +2228,7 @@
}
$scope.$watch('detail.dataGridSource', function (newVal, oldValue) {
$timeout(function () {
$scope.selectedTabIndex = $scope.detail.cellType;
$scope.selectedTabId = $scope.detail.cellTypeId;
......@@ -2278,8 +2279,10 @@
});
var getBlowGridData = function (data) {
cellCommentService.getCellInformation(data).success(function (res) {
debugger;
if (res.resultMsg) {
$scope.detail.dataGridSourceBind = [res.data[0]];
$scope.detail.dataGridSourceBind = res.data;
calculateSum(null);
}
}).error(function (error) {
});
......
......@@ -302,9 +302,8 @@
<!--分录弹框-->
<entry-list-modal id ="entryListId" rel-obj = "relObj" ></entry-list-modal>
<entry-log id ="entryLogId" rel-obj = "relObj" show-log = "showLog" ></entry-log>
<entry-list-modal id ="entryListId" rel-obj = "relObj" show-log = "showLog()" ></entry-list-modal>
<entry-log id ="entryLogId" rel-obj = "relObj" ></entry-log>
</div>
<div class="tax-report-cell-detail" id="addSourceContainer"></div>
......
......@@ -50,7 +50,10 @@
}
if (!Number.prototype.formatAmount) {
Number.prototype.formatAmount = function (decPlaces) {
Number.prototype.formatAmount = function (decPlaces, type) {
if(type){
return Number(decPlaces.toString().match(/^\d+(?:\.\d{0,2})?/));
}
decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces;
var n = this.toFixed(decPlaces);
if (decPlaces) {
......
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