Commit 149c215f authored by kevin's avatar kevin

#

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