Commit 42c55b25 authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents e37de606 f29b7fa0
......@@ -7,10 +7,14 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dao.CitJournalEntryAdjustMapper;
import pwc.taxtech.atms.dao.CitTbamMapper;
import pwc.taxtech.atms.dao.OperationLogEntryLogMapper;
import pwc.taxtech.atms.dpo.CitTbamDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.entity.CitJournalEntryAdjust;
import pwc.taxtech.atms.entity.CitTbam;
import pwc.taxtech.atms.entity.OperationLogEntryLog;
import pwc.taxtech.atms.entity.OperationLogEntryLogExample;
import pwc.taxtech.atms.service.impl.DistributedIdService;
import pwc.taxtech.atms.vat.dao.JournalEntryMapper;
import pwc.taxtech.atms.vat.dao.PeriodFormulaBlockMapper;
import pwc.taxtech.atms.vat.entity.CellComment;
......@@ -69,6 +73,11 @@ public class CellCommentController {
@Autowired
private PeriodFormulaBlockMapper periodFormulaBlockMapper;
@Autowired
private OperationLogEntryLogMapper operationLogEntryLogMapper;
@Autowired
private DistributedIdService distributedIdService;
//更新调整后金额
@RequestMapping("updateAdjust")
public OperationResultDto updateAdjust(@RequestBody CitTbam[] citTbams){
......@@ -77,8 +86,23 @@ 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;
}
@RequestMapping("selectEntryLog")
public OperationResultDto selectEntryLog(String code){
OperationResultDto operationResultDto = new OperationResultDto();
OperationLogEntryLogExample operationLogEntryLogExample = new OperationLogEntryLogExample();
OperationLogEntryLogExample.Criteria criteria = operationLogEntryLogExample.createCriteria();
criteria.andSubjectCodeEqualTo(code);
operationResultDto.setData(operationLogEntryLogMapper.selectByExample(operationLogEntryLogExample));
return operationResultDto;
}
}
......@@ -41,7 +41,7 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyMapper"/>
</javaClientGenerator>
<table tableName="organization_accounting_rate" domainObjectName="OrganizationAccountingRate">
<table tableName="operation_log_entry_log" domainObjectName="OperationLogEntryLog">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
......
package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.OperationLogEntryLog;
import pwc.taxtech.atms.entity.OperationLogEntryLogExample;
@Mapper
public interface OperationLogEntryLogMapper extends MyMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
long countByExample(OperationLogEntryLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int deleteByExample(OperationLogEntryLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int deleteByPrimaryKey(String subjectCode);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int insert(OperationLogEntryLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int insertSelective(OperationLogEntryLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
List<OperationLogEntryLog> selectByExampleWithRowbounds(OperationLogEntryLogExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
List<OperationLogEntryLog> selectByExample(OperationLogEntryLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
OperationLogEntryLog selectByPrimaryKey(String subjectCode);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") OperationLogEntryLog record, @Param("example") OperationLogEntryLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int updateByExample(@Param("record") OperationLogEntryLog record, @Param("example") OperationLogEntryLogExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OperationLogEntryLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
int updateByPrimaryKey(OperationLogEntryLog record);
}
\ No newline at end of file
......@@ -3,6 +3,7 @@ package pwc.taxtech.atms.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
*
......@@ -35,6 +36,8 @@ public class CitTbam extends BaseEntity implements Serializable {
private String organizationId;
private Long adjustAccount;
private List<OperationLogEntryLog> operationLogEntryLogList;
public Long getAdjustAccount() {
return adjustAccount;
}
......@@ -43,6 +46,14 @@ public class CitTbam extends BaseEntity implements Serializable {
this.adjustAccount = adjustAccount;
}
public List<OperationLogEntryLog> getOperationLogEntryLogList() {
return operationLogEntryLogList;
}
public void setOperationLogEntryLogList(List<OperationLogEntryLog> operationLogEntryLogList) {
this.operationLogEntryLogList = operationLogEntryLogList;
}
/**
* Database Column Remarks:
* 项目ID
......
......@@ -83,8 +83,6 @@
</insert>
<select id="selectBySql" parameterType="java.lang.String" resultType="pwc.taxtech.atms.dpo.CitTbamDto">
select
id as id,
attribute attribute,
......
......@@ -275,6 +275,7 @@
break;
case enums.formulaDataSourceType.CIT_TBAM:
obj.relSql = sourceData.rel_sql;
obj.endingBalance = sourceData.amount;
}
if (sourceData.type === 0 && sourceData.dataSourceType === enums.cellDataSourceType.RelatedModel) {
......
......@@ -24,7 +24,7 @@
</cit-report-sheet>
</div>
<cell-detail-panel detail="cellDetail" id="cell-detail" source-type="isBSPLSpecial"></cell-detail-panel>
<cit-tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" active-sheet = "activeSheet"
<cit-tax-report-cell-detail-modal on-confirm="confirm()" detail="taxCellDetail" id="tax-cell-detail" active-sheet = "activeSheet"
<!--service-type="serviceType"
on-update-data-source="updateCellByManualChange(manualData)"
on-delete-data-source="updateCellByManualSourceDelete(dataSourceId, cellId)"
......
......@@ -13,8 +13,9 @@
QMYETotalend: ""
}
}
$scope.relObj.logs = [];
if($scope.relObj.logs == undefined || $scope.relObj.logs.length == 0){
$scope.relObj.logs = [];
}
entityInit();
$scope.dataGridOptions = {
......@@ -50,9 +51,13 @@
$log.debug($scope.selectedItems);*/
$scope.doCalcute(selectedItems.selectedRowsData);
//更新日志
var _data = selectedItems.selectedRowsData;
$scope.relObj.logs = commonWebService._index(_data);
if(selectedItems.currentDeselectedRowKeys.length == 0){
selectedItems.currentSelectedRowKeys[0].operate = '增'
$scope.relObj.logs.push(selectedItems.currentSelectedRowKeys[0]);
}else{
selectedItems.currentDeselectedRowKeys[0].operate = '减';
$scope.relObj.logs.push(selectedItems.currentDeselectedRowKeys[0]);
}
},
allowColumnResizing: true,
......@@ -141,10 +146,11 @@
}
_index++;
});
$scope.entry.JFFSETotal = v1;
$scope.entry.DFFSETotal = v2;
$scope.entry.QMYETotalFirst = v2 - v1;
$scope.entry.QMYETotalend = v1 - v2;
$scope.entry.JFFSETotal = v1.toFixed(2);
$scope.entry.DFFSETotal = v2.toFixed(2);
$scope.entry.QMYETotalFirst = (v2 - v1).toFixed(2);
$scope.entry.QMYETotalend = (v1 - v2).toFixed(2);
}
}
......
......@@ -14,7 +14,7 @@
<div class="col-sm-4">
<div class="row">
<div class="menu-log" style="display: inline-block">
<a class="btn btn-not-important" href="javascript:void(0)" ng-click="showLog()"> <i class="material-icons" style = "margin-bottom: 9px;">description</i><span>日志</span></a>
<a class="btn btn-not-important" ng-click="showLog()"> <i class="material-icons" style = "margin-bottom: 9px;">description</i><span>日志</span></a>
</div>
<div class="button" style="display: inline-block">
<button type="button" class="btn btn-primary" ng-click="makeSure()">确定</button>
......@@ -23,8 +23,6 @@
</div>
</div>
</div>
<div class="dx-viewport">
<div id="dataSourceGrid" dx-data-grid="dataGridOptions"></div>
</div>
......
......@@ -8,7 +8,8 @@ function ($log) {
showLog :'&'
},
controller: 'entryListModalController',
link: function ($scope, $element, $attr) {
link: function (scope, $element, $attr) {
//$scope.showLog = scope.showLog;
}
}
}]);
\ No newline at end of file
......@@ -63,7 +63,7 @@
alignment: 'center'
},
{
dataField: 'description',
dataField: 'operate',
caption: $translate.instant('Operate'),
alignment: 'center'
}
......
<div class="modal fade" id="entryLogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog modal-lg" style="width: 1200px;">
<div class="modal-content">
<div class="modal-header">
<div>
<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">
<span class="close" data-dismiss="modal" aria-hidden="true"
ng-click="hideCellAttachmentModel()">×</span>
<h4 class="modal-title" translate="Remarks"></h4>
</div>
<div class="dx-viewport">
<div id="dataSourceGrid" dx-data-grid="dataGridOptions"></div>
<h4 class="modal-title" translate="Remarks"></h4>
</div>
<div class="dx-viewport">
<div id="dataSourceGrid" dx-data-grid="dataGridOptions"></div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
citModule.directive('entryModal', ['$log',
citModule.directive('entryLog', ['$log',
function ($log) {
return {
restrict: 'E',
......
......@@ -228,20 +228,21 @@
}
$scope.hidePanel();
vatCommonService.setProjectStatus(vatSessionService.project.id, vatSessionService.month, status, null, null);
if($scope.detail.cellType == enums.formulaDataSourceType.CIT_TBAM){//
if ($scope.detail.cellType == enums.formulaDataSourceType.CIT_TBAM) {//
[$scope.detail.entryIndex].adjustBack
var updateAdjustDto = [];
$scope.detail.dataGridSourceBind.forEach(function(e, index){
if(e.adjustBack != undefined && e.adjustBack != null){
$scope.detail.dataGridSourceBind.forEach(function (e, index) {
if (e.adjustBack != undefined && e.adjustBack != null) {
updateAdjustDto.push({
id : e.id,
adjustAccount :e.adjustBack
id: e.id,
adjustAccount: e.adjustBack
});
}
});
updateAdjustDto.push($scope.relObj.logs);
cellCommentService.updateAdjust(updateAdjustDto).success(function (res) {
}).error(function (error) {
if(error){
if (error) {
alert("调整金额数据更新失败");
}
});
......@@ -708,10 +709,9 @@
}, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&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) {
debugger;
return memo + x.endBalance;
return memo + x.endingBalance;
}, 0);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
......@@ -1541,19 +1541,19 @@
//-----------------------------------------------------kevin insert ----------------------------------------------------------------
//监听穿透返回值(调整后金额)
$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;
calculateSum(n);
}
});
//重新计算合计值
var calculateSum = function(n){
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) {
memo + n;
}else{
} else {
return memo + x.endBalance;
}
}, 0);
......@@ -1562,14 +1562,21 @@
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + evalVal.formatAmount(precition));
}
$scope.entryShowLog= function(){//显示日志
$scope.showLog = function () {//显示日志
alert('调用了');
//在点击日志前 科目代码下是否有日志
cellCommentService.selectEntryLog(entryLogIdByCode).success(function(res){
if(res.data){
$scope.relObj.logs = res.data;
}
}).error();
$('#entryLogModal').modal('show');
}
//显示分录信息 同时加载数据
$scope.loadEntryListDataList = function (e) {
$scope.detail.entryIndex = e.dataIndex;
$scope.detail.entryIndex = e.dataIndex;
$scope.detail.entryLogIdByCode = e.data.accountCode;
cellCommentService.loadEntryListDataList(e.data.accountCode).success(function (res) {
$scope.relObj.account = e.data.accountCode;
if (res.resultMsg == "success") {
......@@ -1581,7 +1588,6 @@
});
}
//设置数据源表格的列
var getAllDataGridColumns = function () {
var dataGridColumns;
......@@ -1805,6 +1811,7 @@
});
addDataSource();
}
//计算凭证的数值
function calculateVoucherValue(voucher) {
return voucher.direction * ((voucher.debitAmount ? voucher.debitAmount : 0) - (voucher.creditAmount ? voucher.creditAmount : 0));
......@@ -2265,10 +2272,8 @@
}
});
$scope.dataGridColumns = getDataGridColumns();
getConclusionVal();
}, 500);
});
var getBlowGridData = function (data) {
......@@ -2277,14 +2282,10 @@
$scope.detail.dataGridSourceBind = [res.data[0]];
}
}).error(function (error) {
});
}
//当数据源数量变化是,重新排序数据源
$scope.$watch('detail.items.length', function (newVal, oldValue) {
if (newVal) {
$scope.detail.items = _.sortBy($scope.detail.items, function (item) {
if (item.type === enums.formulaDataSourceType.ModelDatasource ||
......@@ -2307,7 +2308,6 @@
$scope.$watch('detail.items', function (newVal, oldValue) {
$timeout(function () {
$scope.selectedTabIndex = $scope.detail.cellType;
$scope.selectedTabId = $scope.detail.cellTypeId;
$scope.selectedTypeName = null;
......@@ -2319,7 +2319,6 @@
$scope.selectedTabIndex = element.type;
$scope.selectedTabId = element.id;
}
if (element.type === $scope.detail.cellType && element.id === $scope.selectedTabId &&
(element.type !== enums.formulaDataSourceType.OutputInvoice &&
element.type !== enums.formulaDataSourceType.Voucher &&
......@@ -2362,9 +2361,7 @@
}
$scope.dataGridColumns = getDataGridColumns();
getConclusionVal();
$scope.isWriteBackUpdate = true;
}, 500);
});
......
......@@ -303,7 +303,7 @@
<!--分录弹框-->
<entry-list-modal id ="entryListId" rel-obj = "relObj" ></entry-list-modal>
<entry-Log id ="entryLogId" rel-obj = "relObj"show-log = "entryShowLog" ></entry-Log>
<entry-log id ="entryLogId" rel-obj = "relObj" show-log = "showLog" ></entry-log>
</div>
......
......@@ -6,7 +6,7 @@ function ($log) {
scope: {
detail: '=',
onConfirm: '&',
activeSheet : '='
activeSheet : '=',
},
controller: 'citTaxReportCellDetailModalController',
link: function ($scope, $element, $attr) {
......
......@@ -19,6 +19,9 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
},
updateAdjust : function (data) {
return $http.post('/CellComment/updateAdjust', data, apiConfig.createVat());
},
selectEntryLog : function (code) {
return $http.get('/CellComment/selectEntryLog?code=' + code, 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