Commit 782e07a0 authored by kevin's avatar kevin

# fix

parent 52ffcc3c
......@@ -24,6 +24,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.locks.ReentrantLock;
@RestController
@RequestMapping(value = "api/v1/CellComment")
......@@ -104,10 +105,11 @@ public class CellCommentController {
}
@RequestMapping("selectEntryLog")
public OperationResultDto selectEntryLog(String code) {
public OperationResultDto selectEntryLog(String code, Long id ) {
OperationResultDto operationResultDto = new OperationResultDto();
OperationLogEntryLogExample operationLogEntryLogExample = new OperationLogEntryLogExample();
OperationLogEntryLogExample.Criteria criteria = operationLogEntryLogExample.createCriteria();
criteria.andIdEqualTo(id);
criteria.andSubjectCodeEqualTo(code);
operationResultDto.setData(operationLogEntryLogMapper.selectByExample(operationLogEntryLogExample));
return operationResultDto;
......@@ -118,6 +120,8 @@ public class CellCommentController {
*/
@RequestMapping("addLog")
public OperationResultDto addLog(@RequestBody List<OperationLogEntryLog> operationLogEntryLogs) {
for (OperationLogEntryLog operationLogEntryLog : operationLogEntryLogs) {
operationLogEntryLog.setMyId(distributedIdService.nextId());
operationLogEntryLogMapper.insert(operationLogEntryLog);
......
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -12,7 +13,9 @@ import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.dto.CitAssetsListDto;
import pwc.taxtech.atms.dto.CitJournalAdjustDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.vatdto.ManualDataSourceDto;
import pwc.taxtech.atms.dto.vatdto.PeriodJobDto;
import pwc.taxtech.atms.dto.vatdto.ReportDataDto;
import pwc.taxtech.atms.service.impl.CitReportServiceImpl;
import pwc.taxtech.atms.vat.entity.PeriodJob;
import pwc.taxtech.atms.vat.service.impl.ReportServiceImpl;
......@@ -34,7 +37,7 @@ public class CitReportController {
private static Logger logger = LoggerFactory.getLogger(CitReportController.class);
@Autowired
ReportServiceImpl reportService;
CitReportServiceImpl reportService;
@Autowired
CitReportServiceImpl citReportService;
......@@ -134,6 +137,23 @@ public class CitReportController {
}
}
@RequestMapping(value = "reportData/{reportId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public OperationResultDto<ReportDataDto> getReportData(@PathVariable Long reportId, @RequestHeader String from) {
OperationResultDto resultDto = new OperationResultDto();
if (reportId == null || reportId == 0L) {
resultDto.setResult(false);
return resultDto;
}
return reportService.getCellData(reportId, from);
}
@RequestMapping(value = "addCellManualData", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseEntity addCellManualDataSource(@RequestBody ManualDataSourceDto data, @RequestHeader String from) {
String projectId = StringUtils.EMPTY;
if (StringUtils.isNotBlank(from) && from.split("@").length > 0) {
projectId = from.split("@")[0];
}
return ResponseEntity.ok(reportService.addCellManualDataSource(data, from));
}
}
\ No newline at end of file
......@@ -1353,35 +1353,17 @@ 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);
}
......@@ -1397,7 +1379,7 @@ public class ReportServiceImpl extends BaseService {
PeriodDataSource dataSourceModel = null;
if (dataSourceExtendDtos.size() > 0) {
dataSourceModel = dataSourceExtendDtos.get(0).getDataSource();
if (StringUtils.isBlank(data.getKeyinData()))
if(StringUtils.isBlank(data.getKeyinData()))
updateCellValueForDataSourceChange(dataSourceModel, data.getAmount());
originalAmount = dataSourceModel.getAmount() != null ? dataSourceModel.getAmount() : new BigDecimal("0");
dataSourceModel.setName(data.getName());
......@@ -1479,7 +1461,7 @@ public class ReportServiceImpl extends BaseService {
dataSource.setUpdateTime(new Date());
periodDataSourceMapper.updateByPrimaryKeySelective(dataSource);
if (!cellData.getData().equals("#VALUE!")) {
if (StringUtils.isBlank(cellData.getData())) cellData.setData("0");
if(StringUtils.isBlank(cellData.getData())) cellData.setData("0");
cellData.setData(new BigDecimal(cellData.getData()).add(changeValue).toString());
} else {
cellData.setData(new BigDecimal("0.0").add(changeValue).toString());
......@@ -1487,7 +1469,7 @@ public class ReportServiceImpl extends BaseService {
//cellData.setFormulaExp(cellData.getData());
cellData.setUpdateTime(new Date());
periodCellDataMapper.updateByPrimaryKeySelective(cellData);
} else if (dataSource.getDescription().equals(cellName) && StringUtils.isNotBlank(data.getKeyinData())) {
} else if(dataSource.getDescription().equals(cellName) && StringUtils.isNotBlank(data.getKeyinData())){
dataSource.setKeyinData(data.getKeyinData());
dataSource.setUpdateBy("admin");
dataSource.setUpdateTime(new Date());
......
......@@ -26,14 +26,6 @@ public interface OperationLogEntryLogMapper extends MyMapper {
*/
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
......@@ -66,14 +58,6 @@ public interface OperationLogEntryLogMapper extends MyMapper {
*/
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
......@@ -89,20 +73,4 @@ public interface OperationLogEntryLogMapper extends MyMapper {
* @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
......@@ -11,15 +11,6 @@ import java.util.Date;
* @mbg.generated do_not_delete_during_merge
*/
public class OperationLogEntryLog extends BaseEntity implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column operation_log_entry_log.subject_code
*
* @mbg.generated
*/
private String subjectCode;
/**
*
* This field was generated by MyBatis Generator.
......@@ -119,6 +110,15 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
*/
private String source;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column operation_log_entry_log.subject_code
*
* @mbg.generated
*/
private String subjectCode;
/**
*
* This field was generated by MyBatis Generator.
......@@ -154,23 +154,15 @@ 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
*
* @mbg.generated
*/
private Date createTime;
/**
*
......@@ -191,36 +183,21 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
private String updateBy;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column operation_log_entry_log.subject_code
*
* @return the value of operation_log_entry_log.subject_code
* This field was generated by MyBatis Generator.
* This field corresponds to the database column operation_log_entry_log.operate
*
* @mbg.generated
*/
public String getSubjectCode() {
return subjectCode;
}
private String operate;
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column operation_log_entry_log.subject_code
*
* @param subjectCode the value for operation_log_entry_log.subject_code
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operation_log_entry_log
*
* @mbg.generated
*/
public void setSubjectCode(String subjectCode) {
this.subjectCode = subjectCode == null ? null : subjectCode.trim();
}
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
......@@ -486,6 +463,30 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
this.source = source == null ? null : source.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column operation_log_entry_log.subject_code
*
* @return the value of operation_log_entry_log.subject_code
*
* @mbg.generated
*/
public String getSubjectCode() {
return subjectCode;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column operation_log_entry_log.subject_code
*
* @param subjectCode the value for operation_log_entry_log.subject_code
*
* @mbg.generated
*/
public void setSubjectCode(String subjectCode) {
this.subjectCode = subjectCode == null ? null : subjectCode.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column operation_log_entry_log.subject_name
......@@ -590,6 +591,9 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method was generated by MyBatis Generator.
......@@ -599,6 +603,9 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method was generated by MyBatis Generator.
......@@ -648,6 +655,30 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column operation_log_entry_log.operate
*
* @return the value of operation_log_entry_log.operate
*
* @mbg.generated
*/
public String getOperate() {
return operate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column operation_log_entry_log.operate
*
* @param operate the value for operation_log_entry_log.operate
*
* @mbg.generated
*/
public void setOperate(String operate) {
this.operate = operate == null ? null : operate.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operation_log_entry_log
......@@ -660,7 +691,6 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", subjectCode=").append(subjectCode);
sb.append(", myId=").append(myId);
sb.append(", organizationId=").append(organizationId);
sb.append(", accountPeriod=").append(accountPeriod);
......@@ -672,12 +702,15 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
sb.append(", id=").append(id);
sb.append(", period=").append(period);
sb.append(", source=").append(source);
sb.append(", subjectCode=").append(subjectCode);
sb.append(", subjectName=").append(subjectName);
sb.append(", updateTime=").append(updateTime);
sb.append(", voucherNum=").append(voucherNum);
sb.append(", orgCode=").append(orgCode);
sb.append(", createTime=").append(createTime);
sb.append(", createBy=").append(createBy);
sb.append(", updateBy=").append(updateBy);
sb.append(", operate=").append(operate);
sb.append("]");
return sb.toString();
}
......
......@@ -170,7 +170,7 @@
});
});
//给单元格增加单击事件
//给单元格增加单击事件ActiveSheetChanged
sheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
scope.$apply(function () {
if (window.event.ctrlKey) {
......@@ -330,7 +330,7 @@
};
manualFunc.prototype = new GC.Spread.CalcEngine.Functions.Function("_Manual", 1, 1);
manualFunc.prototype.evaluate = function (args) {
debugger;
if (!_.isString(args)) {
return "#VALUE!";
}
......@@ -448,7 +448,6 @@
// 根据已有信息通过spreadJS计算各单元格的值
var setData = function () {
debugger;
var sheet = scope.spread.sheets[0];
var isExportData = false;
if (angular.isArray(scope.reportSource)) {
......@@ -458,7 +457,7 @@
}
scope.reportSource.forEach(function (data) {
debugger;
//fix bug11737 导出需要显示千分位
// 避免直接使用data.value = parseFloat(data.value)导致非数字型value无法显示
data.value = PWC.tryParseStringToNum(data.value);
......@@ -493,7 +492,6 @@
) { // 存在用户手工输入值,需要改变底色
cell.backColor('#fbe8cc');
}
if (!_.isEmpty(data.dataSourceList)) {
var reports = _.chain(data.dataSourceList)
.where({type: enums.formulaDataSourceType.Report})
......@@ -558,7 +556,7 @@
}
if (!_.isEmpty(parsedFormula)) {
debugger;
// parsedFormula = 'IFERROR(' + parsedFormula + ', "")';
sheet.setFormula(data.rowIndex, data.columnIndex, '=' + parsedFormula);
// sheet.setValue(data.rowIndex, data.columnIndex, data.value);
......@@ -574,12 +572,10 @@
sheet.setValue(data.rowIndex, data.columnIndex, data.value); // 只有数值,设置为数值
}
}
sheet.setTag(data.rowIndex, data.columnIndex, JSON.stringify(data));
//设置 tooltip 和 图标信息
spreadJsTipService.setCellTipByCellData(sheet.getCell(data.rowIndex, data.columnIndex), data);
});
debugger;
// 设置破折号单元格的值和显示格式,将其替换为带破折号格式的0值,这样引用到的其他单元格才能正常计算
var rowCount = sheet.getRowCount();
var columnCount = sheet.getColumnCount();
......@@ -599,7 +595,7 @@ debugger;
// 更新数据源后,通过调用该方法计算所有当前sheet单元格,并通过比较原数据列表与spreadJS计算的新值列表,获取保存时需要修改库中Value的单元格信息列表
var updateCells = function () {
debugger;
setData();
var sheet = getSpreadControl().sheets[0];
var cells = [];
......@@ -607,7 +603,7 @@ debugger;
.pluck('dataSourceList')
.flatten(true).value();
angular.forEach(scope.reportSource, function (x) {
debugger;
// 比较刷新前后报表中的值的变化
// 优先将单元格转换成数值比较,如果不能则转换为字符串比较
var cell = sheet.getCell(x.rowIndex, x.columnIndex);
......@@ -643,7 +639,6 @@ debugger;
newVal = PWC.tryParseStringToNum(newVal);
ds.amount = newVal;
});
sheet.setTag(x.rowIndex, x.columnIndex, JSON.stringify(x));
}
});
......
citModule.controller('citReportViewController', ['$scope', '$rootScope', '$log', '$translate', '$timeout', '$q', '$compile', '$state', '$stateParams',
'apiInterceptor', 'vatExportService', 'SweetAlert', 'BSPLService', 'vatReportService', 'vatReportCacheService', 'vatSessionService',
'loginContext', 'enums', 'vatCommonService', 'vatWorkflowService', 'projectService', '$uibModal', '$cookies', 'Upload', 'vatImportService', 'vatApproveService',
'loginContext', 'enums', 'vatCommonService', 'vatWorkflowService', 'projectService', '$uibModal', '$cookies', 'Upload', 'vatImportService', 'vatApproveService', 'citReportService',
function ($scope, $rootScope, $log, $translate, $timeout, $q, $compile, $state, $stateParams, apiInterceptor, vatExportService, SweetAlert, BSPLService,
vatReportService, vatReportCacheService, vatSessionService, loginContext, enums, vatCommonService, vatWorkflowService, projectService,
$uibModal, $cookies, Upload, vatImportService, vatApproveService) {
$uibModal, $cookies, Upload, vatImportService, vatApproveService, citReportService) {
'use strict';
$log.debug('citReportViewController.ctor()...');
......@@ -796,6 +796,7 @@
};
var cellDoubleClick = function ($event) {
var row = $event.args.row;
var column = $event.args.col;
if ($scope.isBSPL) {
......@@ -994,11 +995,11 @@
if (!node) {
return;
}
var reportPromiss = vatReportService.getReportData(node.reportId).success(function (reportData) {
debugger;
var reportPromiss = citReportService.getReportData(node.reportId).success(function (reportData) {
if (reportData && reportData.data && reportData.data.cellData) {
_.each(reportData.data.cellData, function (x) {
debugger;
x.value = x.cellValue;
if (x.formula && reg.test(x.formula)) {
x.isFormula = true;
......@@ -1125,9 +1126,9 @@
};
var getReportData = function () {
debugger;
vatReportService.getReportData($scope.reportId).success(function (reportData) {
debugger;
if (reportData && reportData.data && reportData.data.cellData) {
_.each(reportData.data.cellData, function (x) {
x.value = x.cellValue;
......@@ -1597,7 +1598,7 @@
}
if ($scope.handInputModel.amount || $scope.handInputModel.name || $scope.handInputModel.keyinData || $scope.handInputModel.penValue ) {
// 前端保存数据
return vatReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
return citReportService.addCellManualData($scope.handInputModel, logDto).then(function (manualData) {
var obj = manualData.data.data;
obj.dataSourceType = manualData.dataSourceType;
$scope.updateCellByManualChange(obj);
......
citModule.controller('entryListModalController', ['$log', 'apiInterceptor', 'Upload', '$scope', '$q', '$translate', '$uibModal', '$document', '$rootScope', 'SweetAlert', 'enums',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService','commonWebService',
'vatReportService', 'loginContext', 'vatSessionService', 'stdAccountService', 'vatCommonService', 'formulaService', 'KeyValueConfigService', 'modelConfigurationService', '$timeout', 'cellCommentService', 'modifiedReportCellService', '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) {
vatSessionService, stdAccountService, vatCommonService, formulaService, KeyValueConfigService, modelConfigurationService, $timeout, cellCommentService, modifiedReportCellService, commonWebService) {
var _ra = null;
var entityInit = function () {
//初始化值
$scope.entry = {
......@@ -13,8 +13,8 @@
QMYETotalend: ""
}
}
var _logIndex =0;
if($scope.relObj.logs == undefined || $scope.relObj.logs.length == 0){
var _logIndex = 0;
if ($scope.relObj.logs == undefined || $scope.relObj.logs.length == 0) {
$scope.relObj.logs = [];
}
entityInit();
......@@ -51,27 +51,22 @@
});
$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){
if (selectedItems.currentDeselectedRowKeys.length == 0) {
_in.operate = "增";
_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.id = selectedItems.currentSelectedRowKeys[0].id;
} else {
_in.operate = "减";
_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.id = selectedItems.currentDeselectedRowKeys[0].id;
}
_in.subjectCode = $scope.relObj.entryLogIdByCode;
$scope.relObj.logs.push(_in);
......@@ -85,8 +80,7 @@
//设置数据源表格的列
var getEntryListColumns = function () {
var dataGridColumns;
dataGridColumns = [
return [
{
dataField: 'index',
caption: $translate.instant('ImportErrorPopUpNoCol'),
......@@ -125,17 +119,21 @@
alignment: 'right'
},
];
return dataGridColumns;
};
$scope.entryListColumns = getEntryListColumns();
//确定
$scope.makeSure = function () {
$scope.relObj.checkRadio = $scope.check;
$scope.relObj.checkRadio = _ra;
$('#entryListModal').modal('hide');
}
$scope.selectRadio = function(event){
debugger;
_ra = event.target.value;
}
$scope.cancel = function () {
$('#entryListModal').modal('hide');
//entityInit();
......@@ -157,8 +155,8 @@
v1 = parseFloat(item.accountedDr);
v2 = parseFloat(item.accountedCr);
} else {
v1 += parseFloat(item.accountedDr);
v2 += parseFloat(item.accountedCr);
v1 += parseFloat(item.accountedDr);
v2 += parseFloat(item.accountedCr);
}
_index++;
});
......
......@@ -28,17 +28,17 @@
</div>
<div class="row backColor" style="margin-right: 0px;">
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "check.checkRadio1" ng-value="entry.JFFSETotal" > <h4 translate="JFFSETotal"></h4>:{{entry.JFFSETotal}}
<input type="radio" name ="checkRadio" ng-click ="selectRadio($event)" ng-value="entry.JFFSETotal" > <h4 translate="JFFSETotal"></h4>:{{entry.JFFSETotal}}
</div>
<div class="col-sm-3 ">
<span><input type="radio" name ="checkRadio" ng-model = "check.checkRadio2" ng-value="entry.DFFSETotal" > <h4 translate="DFFSETotal"></h4>:{{entry.DFFSETotal}}</span>
<span><input type="radio" name ="checkRadio" ng-click ="selectRadio($event)" ng-value="entry.DFFSETotal" > <h4 translate="DFFSETotal"></h4>:{{entry.DFFSETotal}}</span>
</div>
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "check.checkRadio3" ng-value="entry.QMYETotalFirst" > <h4 translate="QMYETotalFirst"></h4>:{{entry.QMYETotalFirst}}
<input type="radio" name ="checkRadio" ng-click ="selectRadio($event)" ng-value="entry.QMYETotalFirst" > <h4 translate="QMYETotalFirst"></h4>:{{entry.QMYETotalFirst}}
</div>
<div class="col-sm-3 ">
<input type="radio" name ="checkRadio" ng-model = "check.checkRadio4" ng-value="entry.QMYETotalend" > <h4 translate="QMYETotalend"></h4>:{{entry.QMYETotalend}}
<input type="radio" name ="checkRadio" ng-click ="selectRadio($event)" ng-value="entry.QMYETotalend" > <h4 translate="QMYETotalend"></h4>:{{entry.QMYETotalend}}
</div>
</div>
<div class="row">
......
......@@ -232,10 +232,10 @@
if ($scope.detail.cellType == enums.formulaDataSourceType.CIT_TBAM) {
var updateAdjustDto = [];
$scope.detail.dataGridSourceBind.forEach(function (e, index) {
if (e.adjustBack != undefined && e.adjustBack != null) {
if (e.adjustAccount != undefined && e.adjustAccount != null) {
updateAdjustDto.push({
"id": e.id,
"adjustAccount": Number(e.adjustBack)
"adjustAccount": Number(e.adjustAccount)
});
}
});
......@@ -366,6 +366,7 @@
};
//---------------------------凭证范围-------------------------//start
$scope.formulaList = [];
$scope.keyValueList = [];
$scope.accountDataSource = [];
......@@ -1535,7 +1536,7 @@
return dataGridColumns;
};
//-----------------------------------------------------kevin insert ----------------------------------------------------------------
//监听穿透返回值(调整后金额)
//监听穿透返回值(调整后金额)
$scope.$watch('relObj.checkRadio', function (n, o) {
if ($scope.detail.entryIndex != undefined) {
$scope.detail.dataGridSourceBind[$scope.detail.entryIndex].adjustAccount = n;
......@@ -1543,7 +1544,7 @@
}
});
var addWatch = function(target){
/* var addWatch = function(target){
$scope.$watch(target, function (n, o) {
if ($scope.detail.entryIndex != undefined) {
$scope.detail.dataGridSourceBind[$scope.detail.entryIndex].adjustAccount = n;
......@@ -1554,8 +1555,11 @@
addWatch('relObj.checkRadio.checkRadio1');
addWatch('relObj.checkRadio.checkRadio2');
addWatch('relObj.checkRadio.checkRadio3');
addWatch('relObj.checkRadio.checkRadio4');
addWatch('relObj.checkRadio.checkRadio4');*/
//
$scope.detail.relObj = $scope.relObj;
//重新计算合计值
var calculateSum = function (n) {
var evalVal = 0;
......@@ -1565,7 +1569,11 @@
if (i == $scope.detail.entryIndex) {
continue;
}
evalVal += Number($scope.detail.dataGridSourceBind[i].endingBalance);
if($scope.detail.dataGridSourceBind[i].adjustAccount == null){
evalVal += Number($scope.detail.dataGridSourceBind[i].endingBalance);
}else{
evalVal += Number($scope.detail.dataGridSourceBind[i].adjustAccount);
}
}
evalVal = evalVal + Number(n);
$scope.detail.penValue = evalVal;
......@@ -1588,11 +1596,12 @@
var va = evalVal.formatAmount(evalVal, true);
$("#dataGridFooterSummary").html($translate.instant('Conclusion')
+ '&nbsp;&nbsp;&nbsp;&nbsp;' + va);
$scope.detail.cellInfo.money = evalVal.formatAmount(evalVal, true);
}
$scope.showLog = function () {//显示日志
//在点击日志前 科目代码下是否有日志
cellCommentService.selectEntryLog($scope.detail.entryLogIdByCode).success(function (res) {
cellCommentService.selectEntryLog($scope.detail.entryLogIdByCode, $scope.detail.entryLogIdById).success(function (res) {
if (res.data) {
$scope.relObj.logs = commonWebService._index(res.data.concat($scope.relObj.logs));
$('#entryLogModal').modal('show');
......@@ -1606,6 +1615,7 @@
$scope.loadEntryListDataList = function (e) {
$scope.detail.entryIndex = e.dataIndex;
$scope.detail.entryLogIdByCode = e.data.accountCode;
$scope.detail.entryLogIdById = e.data.id;
$scope.relObj.entryLogIdByCode = e.data.accountCode;
cellCommentService.loadEntryListDataList(e.data.accountCode).success(function (res) {
$scope.relObj.account = e.data.accountCode;
......@@ -1896,6 +1906,7 @@
$scope.config = config;
$scope.choiceGroupButton = choiceGroupButton;
$scope.confirmAddDataSource = function (config) {
if (config.contentStatus === 'dataSourceTitle') {
saveDataSource(config);
......
......@@ -20,8 +20,8 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
updateAdjust : function (data) {
return $http.post('/CellComment/updateAdjust', JSON.stringify(data), apiConfig.createVat({contentType: 'application/json;charset=UTF-8'}));
},
selectEntryLog : function (code) {
return $http.get('/CellComment/selectEntryLog?code=' + code, apiConfig.createVat());
selectEntryLog : function (code, id ) {
return $http.get('/CellComment/selectEntryLog?code=' + code +'&id=' +id, apiConfig.createVat());
},
addLog :function(data){
return $http.post('/CellComment/addLog', data, apiConfig.createVat());
......
......@@ -58,7 +58,7 @@
return $http.get('/Report/getJobStatus/' + projectId + '/' + period + '/' + jobId, apiConfig.createVat({ignoreLoadingBar: true}));
},
getReportData: function (reportId) {
return $http.get('/Report/reportData/' + reportId, apiConfig.createVat());
return $http.get('/citReport/reportData/' + reportId, apiConfig.createVat());
},
calculateKeyValue: function (projectId, period) {
return $http.post('/Report/calculateKeyValue/' + projectId + '/' + period, {}, apiConfig.createVat({ignoreLoadingBar: true}));
......@@ -86,7 +86,7 @@
return $http.get('/Report/cellInvoice/' + cellDataID + '/' + invoiceType, apiConfig.createVat());
},
addCellManualData: function (manualData, logInfo) {
return $http.post('/Report/addCellManualData', manualData, apiConfig.createVat()).then(function (data) {
return $http.post('/citReport/addCellManualData', manualData, apiConfig.createVat()).then(function (data) {
logInfo.UpdateState = $translate.instant('ManualInputSuccess');
vatOperationLogService.addOperationLog(logInfo);
data.dataSourceType = enums.cellDataSourceType.KeyIn;
......
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