Commit b9f9ad4f authored by sherlock's avatar sherlock

Merge remote-tracking branch 'origin/dev_oracle' into dev_oracle_sherlock

parents 20e3dc57 ee6f7988
package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
......@@ -11,13 +13,20 @@ import pwc.taxtech.atms.exception.ServiceException;
@ControllerAdvice
public class AtmsExceptionHandler extends ResponseEntityExceptionHandler {
private static Logger LOGGER = LoggerFactory.getLogger(AtmsExceptionHandler.class);
@ExceptionHandler(value = {
ApplicationException.class,
ServiceException.class
})
protected ResponseEntity<Object> handleExceptions(Exception ex) throws ServiceException {
logger.error("Rest Exception!", ex);
LOGGER.error("Rest Exception!", ex);
ex.printStackTrace();
if (ex.getMessage() != null) {
LOGGER.debug("Rest Exception for {}", ex.getMessage());
LOGGER.info("Rest Exception for {]", ex.getMessage());
}
if (ex instanceof ApplicationException) {
ex.printStackTrace();
return handleApplicationException((ApplicationException) ex);
......
......@@ -254,7 +254,7 @@ public class CellTemplateServiceImpl extends AbstractService {
private String getFormulaDataSource(String formula, List<String> keyValueConfigIds) {
FormulaConfigExample example = new FormulaConfigExample();
example.setOrderByClause("LENGTH(FormulaName) desc");
example.setOrderByClause("LENGTH(FORMULA_NAME) desc");
List<FormulaConfig> dataSourceList = formulaConfigMapper.selectByExample(example);
List<String> nameList = new ArrayList<>();
FormulaHelper formulaHelper = new FormulaHelper();
......@@ -270,7 +270,7 @@ public class CellTemplateServiceImpl extends AbstractService {
String keyValueMethodName = "KEYVALUE(";
if (tmpFormula.contains(keyValueMethodName)) {
KeyValueConfigExample keyValueConfigExample = new KeyValueConfigExample();
keyValueConfigExample.setOrderByClause("LENGTH(KeyCode) desc");
keyValueConfigExample.setOrderByClause("LENGTH(KEY_CODE) desc");
List<KeyValueConfig> keyValueList = keyValueConfigMapper.selectByExample(keyValueConfigExample);
for (KeyValueConfig keyValueConfig : keyValueList) {
if (tmpFormula.contains(keyValueMethodName + "\"" + keyValueConfig.getKeyCode().toUpperCase() + "\")")) {
......
......@@ -628,20 +628,41 @@
return typeof floatVal == 'undefined' ? Math.round(randVal) : randVal.toFixed(floatVal);
}
var loadApprovalFromDB = function (pageIndex) {
var loadApprovalFromDB = function () {
vatApproveService.approvalTasks().success(function (data) {
if (data) {
var index = 1;
data.forEach(function (v) {
v.index = index++;
v.amount = PWC.round(v.amount, 2);
v.taxAmount = PWC.round(v.taxAmount, 2);
});
$scope.gridOptions.data = data;
$scope.gridOptions = {
dataSource: data,
keyExpr: "instanceId",
showBorders: true,
editing: {
mode: "form",
allowUpdating: true
},
columns: [
{ caption: '项目名称', width: '12%', dataField: "projectName"},
{ caption: '期间', width: '7%', dataField: "period"},
{ caption: '提审人', width: '10%', dataField: "createBy"},
{ caption: '审批人', width: '10%', dataField: "approvalBy"},
{ caption: '审批状态', width: '10%', dataField: "status"},
{ caption: '审批意见', width: '15%', dataField: "approvalResult"},
{ caption: '创建时间', width: '7.5%', dataField: "createTime"},
{ caption: '审批时间', width: '7.5%', dataField: "approvalTime"}
],
onRowClick: function (e) {
$scope.newProductModalInstance = ackUibModal($scope, 'liucheng.html', 'liucheng', '.app-overview ', 'static')
$scope.newProductModalInstance.open();
}
};
}
});
};
$scope.cancel = function () {
$scope.newProductModalInstance.cancel();
};
(function initialize() {
initDatePickers();
......@@ -659,39 +680,6 @@
orgDisplay.main();
loadApprovalFromDB();
});
/**
private String projectName;
private Integer period;
private String instanceId;
private String createBy;
private String approvalBy;
private String status;
private String approvalResult;
private Date createTime;
private Date approvalTime;
private String reportPaths;
*/
$scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.rowHeight,
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
enableSorting: false,
enableColumnMenus: false,
columnDefs: [
{ name: '序号', width: '7%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
{ name: '项目名称', width: '12%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.projectName}}<span></div>' },
{ name: '期间', width: '7%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.period}}<span></div>' },
{ name: '提审人', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.createBy}}</span></div>' },
{ name: '审批人', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span> {{row.entity.approvalBy}}</span></div>' },
{ name: '审批状态', width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.status}}</span></div>' },
{ name: '审批意见', width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.approvalResult}}</span></div>' },
{ name: '创建时间', width: '7.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.createTime | date:"yyyy-MM-dd"}}</span></div>' },
{ name: '审批时间', width: '7.5%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.approvalTime | date:"yyyy-MM-dd"}}</span></div>' },
{ name: '操作', width: '15%', cellTemplate: '<div class="ui-grid-cell-contents"><span>审批</span>|<span>下载</span>|<span>流程图</span></div>' }
]
};
})();
}
]);
......@@ -88,12 +88,28 @@
</div>
<div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" ui-grid-expandable ui-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span>
<div class="inputInvoiceGrid" id="grid" dx-data-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span
translate="NoDataAvailable"></span>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/ng-template" id="liucheng.html">
<div class="modal-content" style="width:900px">
<div class="modal-header" style="width:900px">
<div class="modal-title" id="modal-title">报表审批流程</div>
</div>
<div class="modal-body" id="modal-body" style="width:900px">
<div class="content">
<img src="../../../app-resources/images/vat/liucheng.png">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancel()">关闭</button>
</div>
</div>
</script>
</div>
\ 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