Commit 149c215f authored by kevin's avatar kevin

#

parent 838b9b65
......@@ -86,10 +86,6 @@ public class CellCommentController {
for(CitTbam citTbam1 : citTbams){
citTbam.setId(citTbam1.getId());
citTbamMapper.updateByPrimaryKey(citTbam);
for(OperationLogEntryLog operationLogEntryLog : citTbam1.getOperationLogEntryLogList()){
operationLogEntryLog.setMyId(distributedIdService.nextId());
operationLogEntryLogMapper.insert(operationLogEntryLog);
}
}
operationResultDto.setResultMsg("success");
return operationResultDto;
......@@ -105,4 +101,17 @@ public class CellCommentController {
return operationResultDto;
}
/**
* 添加日志
*/
@RequestMapping("addLog")
public OperationResultDto addLog(@RequestBody OperationLogEntryLog[] operationLogEntryLogs ){
for(OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs){
operationLogEntryLogMapper.insert(operationLogEntryLog);
}
OperationResultDto<Object> objectOperationResultDto = new OperationResultDto<>();
objectOperationResultDto.setResultMsg("success");
return objectOperationResultDto;
}
}
......@@ -36,7 +36,6 @@ public class CitTbam extends BaseEntity implements Serializable {
private String organizationId;
private Long adjustAccount;
private OperationLogEntryLog[] operationLogEntryLogList;
public Long getAdjustAccount() {
return adjustAccount;
......@@ -46,13 +45,6 @@ public class CitTbam extends BaseEntity implements Serializable {
this.adjustAccount = adjustAccount;
}
public OperationLogEntryLog[] getOperationLogEntryLogList() {
return operationLogEntryLogList;
}
public void setOperationLogEntryLogList(OperationLogEntryLog[] operationLogEntryLogList) {
this.operationLogEntryLogList = operationLogEntryLogList;
}
/**
* Database Column Remarks:
......
......@@ -154,8 +154,17 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
* @mbg.generated
*/
private String orgCode;
private String operate;
/**
public String getOperate() {
return operate;
}
public void setOperate(String operate) {
this.operate = operate;
}
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column operation_log_entry_log.create_time
......
......@@ -9,7 +9,7 @@
// 根据ServiceType判断当前实际Period
var getActualPeriod = function () {
return $scope.serviceType === enums.serviceType.VAT ? vatSessionService.month : 0;
return $scope.serviceType === enums.serviceType.CIT ? vatSessionService.month : 0;
};
//Voucher Comments:
......@@ -1325,7 +1325,6 @@
} else {
$scope.manualDataSources.push({item1: manualData.cellTemplateId, item2: manualData});
}
// 刷新spreadsheet,获取操作数据源后最新的计算结果,并拿来与当前所有单元格value比较,得到value修改前后的值对比
var updatedCells = $scope.reportApi.refreshReport();
loadCellData(getActualPeriod());
......@@ -1602,7 +1601,6 @@
return $q.when();
});
}
return $q.reject();
}
});
......
......@@ -51,17 +51,29 @@
});
$log.debug($scope.selectedItems);*/
name: "124600SYSADMIN20180900025 社保公积金 CNY"
orgCode: "124600"
orgName: "滴滴智慧交通科技有限公司"
organizationId: "5bbd739c-1a13-4b0f-aba6-32ba41e4de69"
period: 2018
$scope.doCalcute(selectedItems.selectedRowsData);
var _in = {};
if(selectedItems.currentDeselectedRowKeys.length == 0){
_in.operate = "增";
_in.accountingDate = selectedItems.currentSelectedRowKeys[0];
_in.voucherNum = selectedItems.currentSelectedRowKeys[0];
_in.accountingDate = selectedItems.currentSelectedRowKeys[0].accountingDate;
_in.voucherNum = selectedItems.currentSelectedRowKeys[0].voucherNum;
_in.orgCode = selectedItems.currentSelectedRowKeys[0].orgCode;
_in.organizationId = selectedItems.currentSelectedRowKeys[0].organizationId;
}else{
_in.operate = "减";
_in.accountingDate = selectedItems.currentDeselectedRowKeys[0];
_in.voucherNum = selectedItems.currentDeselectedRowKeys[0];
_in.accountingDate = selectedItems.currentDeselectedRowKeys[0].accountingDate;
_in.voucherNum = selectedItems.currentDeselectedRowKeys[0].voucherNum;
_in.orgCode = selectedItems.currentDeselectedRowKeys[0].orgCode;
_in.organizationId = selectedItems.currentDeselectedRowKeys[0].organizationId;
}
_in.subjectCode = $scope.relObj.entryLogIdByCode;
$scope.relObj.logs.push(_in);
},
allowColumnResizing: true,
......
......@@ -79,7 +79,5 @@
$scope.hideCellAttachmentModel = function () {
$('#entryListModal').modal('hide');
}
}
]);
\ No newline at end of file
......@@ -239,8 +239,11 @@
});
}
});
updateAdjustDto.push($scope.relObj.logs);
cellCommentService.updateAdjust(updateAdjustDto).success(function (res) {
cellCommentService.updateAdjust(updateAdjustDto).success(function (res1) {
if (res1.resultMsg == "success") {
cellCommentService.addLog($scope.relObj.logs).success(function (res) {
});
}
}).error(function (error) {
if (error) {
alert("调整金额数据更新失败");
......@@ -249,7 +252,6 @@
}
};
//确定点击事件的处理函数
var confirmEventHandler = function () {
if (vatSessionService.project.projectStatusList[vatSessionService.month] >= constant.ProjectStatusEnum.AccountMapSubmitted) {
......@@ -463,7 +465,6 @@
if (!$scope.selectedAccountCodes) {
$scope.selectedAccountCodes = [];
}
if (!_.isEmpty($scope.selectedAccountCodes)) {
var selectedData = _.filter($scope.accountDataSource, function (data) {
return $scope.selectedAccountCodes.indexOf(data.code) > -1;
......@@ -639,6 +640,7 @@
}
};
//弹框表格右下角合计值
var getConclusionVal = function () {
var precition = 2;
//如果数值是份数类型,则精度为0,否则为2
......@@ -709,11 +711,7 @@
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
} else if ($scope.selectedTabIndex === enums.formulaDataSourceType.CIT_TBAM) {
evalVal = _.reduce($scope.detail.dataGridSource, function (memo, x) {
return memo + x.endingBalance;
}, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
calculateSum(null);
}
else { // For 报表数据源 and BSPL数据源
if ($scope.detail.dataGridSource && $scope.detail.dataGridSource.length > 0) {
......@@ -1542,22 +1540,45 @@
$scope.$watch('relObj.checkRadio', function (n, o) {
if ($scope.detail.entryIndex != undefined) {
$scope.detail.dataGridSourceBind[$scope.detail.entryIndex].adjustBack = n;
$scope.detail.dataGridSourceBind[$scope.detail.entryIndex].isBack = true;
calculateSum(n);
}
});
//重新计算合计值
var calculateSum = function (n) {
var evalVal = _.reduce($scope.detail.dataGridSourceBind, function (memo, x) {
if ((x.accountCode == $scope.relObj.account) && x.accountCode != undefined && $scope.relObj.account != undefined) {
memo + n;
} else {
return memo + x.endingBalance;
var evalVal = 0;
var s;
if (n != null) {
for (var i = 0, j = $scope.detail.dataGridSourceBind.length; i < j; i++) {
if (i == $scope.detail.entryIndex) {
continue;
}
evalVal += Number($scope.detail.dataGridSourceBind[i].endingBalance);
}
evalVal = evalVal + Number(n);
$scope.detail.penValue = evalVal;
var _v1 = 0;
if ($scope.detail.keyinData != null && $scope.detail.keyinData != undefined) {
_v1 = Number($scope.detail.keyinData);
}
}, 0);
$scope.detail.cellInfo.money = _v1.formatAmount((_v1 + evalVal), true);
} else {
for (var i = 0, j = $scope.detail.dataGridSourceBind.length; i < j; i++) {
s = $scope.detail.dataGridSourceBind[i].adjustAccount;
if (s == null && $scope.detail.dataGridSourceBind[$scope.detail.entryIndex].isBack == undefined) {
evalVal += $scope.detail.dataGridSourceBind[$scope.detail.entryIndex].endingBalance;
} else if (s != null && $scope.detail.dataGridSourceBind[$scope.detail.entryIndex].isBack == undefined) {
evalVal += s;
} else {
evalVal += s;
}
}
}
var va = evalVal.formatAmount(evalVal, true);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(evalVal, true));
$scope.detail.penValue = evalVal.formatAmount(evalVal, true);
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + va);
}
$scope.showLog = function () {//显示日志
......@@ -1576,6 +1597,7 @@
$scope.loadEntryListDataList = function (e) {
$scope.detail.entryIndex = e.dataIndex;
$scope.detail.entryLogIdByCode = e.data.accountCode;
$scope.relObj.entryLogIdByCode = e.data.accountCode;
cellCommentService.loadEntryListDataList(e.data.accountCode).success(function (res) {
$scope.relObj.account = e.data.accountCode;
if (res.resultMsg == "success") {
......@@ -1588,7 +1610,6 @@
}
//-------------------------------------------------------------------- end --------------------------------------------------------------
//设置数据源表格的列
......@@ -2279,7 +2300,6 @@
});
var getBlowGridData = function (data) {
cellCommentService.getCellInformation(data).success(function (res) {
debugger;
if (res.resultMsg) {
$scope.detail.dataGridSourceBind = res.data;
calculateSum(null);
......
......@@ -302,7 +302,7 @@
<!--分录弹框-->
<entry-list-modal id ="entryListId" rel-obj = "relObj" show-log = "showLog()" ></entry-list-modal>
<entry-list-modal id ="entryListId" rel-obj = "relObj" show-log = "showLog()" detail = "detail" ></entry-list-modal>
<entry-log id ="entryLogId" rel-obj = "relObj" ></entry-log>
</div>
......
......@@ -9,9 +9,6 @@
$scope.isWriteBackUpdate = false;
$scope.projectYear = vatSessionService.year;
$scope.projectPeriod = vatSessionService.month;
$scope.relObj = {};
//关闭数据源弹出框
var hidePanel = function () {
$scope.selectedDataSourceTabIndex = 1;
......@@ -604,9 +601,6 @@
}
}]
},
onInitialized: function (e) {
dxDataGridService.registerRowDbClick(e.component);
},
paging: {
enabled: false
},
......
......@@ -273,9 +273,6 @@
break;
case enums.formulaDataSourceType.InvoiceFilter:
break;
case enums.formulaDataSourceType.CIT_TBAM:
obj.relSql = sourceData.rel_sql;
}
if (sourceData.type === 0 && sourceData.dataSourceType === enums.cellDataSourceType.RelatedModel) {
......
......@@ -52,7 +52,7 @@
if (!Number.prototype.formatAmount) {
Number.prototype.formatAmount = function (decPlaces, type) {
if(type){
return Number(decPlaces.toString().match(/^\d+(?:\.\d{0,2})?/));
return Number(decPlaces.toString().match(/^\d+(?:\.\d{2})?/));
}
decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces;
var n = this.toFixed(decPlaces);
......
......@@ -22,6 +22,9 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
},
selectEntryLog : function (code) {
return $http.get('/CellComment/selectEntryLog?code=' + code, apiConfig.createVat());
}
},
addLog :function(data){
return $http.post('/CellComment/addLog', data, apiConfig.createVat());
}
};
}]);
\ 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