Commit cc5d91a2 authored by gary's avatar gary

1、添加股权修改、变更的页面

2、sqldebug
parent 4cf57147
package pwc.taxtech.atms.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.vatdto.*;
import pwc.taxtech.atms.vat.service.impl.ExportServiceImpl;
@RestController
@RequestMapping(value = "api/v1/export")
public class ExportController {
@Autowired
private ExportServiceImpl exportServiceImpl;
@RequestMapping(value = "jsonData", method = RequestMethod.POST)
public ResponseEntity getExportFile(@RequestBody JsonExportDto exportData) {
return ResponseEntity.ok(exportServiceImpl.export(exportData, "~"));
}
}
\ No newline at end of file
package pwc.taxtech.atms.dto.vatdto;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class JsonExportDto {
@JSONField(name = "type")
private String type;
@JSONField(name = "jsonData")
private String jsonData;
}
package pwc.taxtech.atms.vat.service.impl;
import com.grapecity.documents.excel.Workbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import pwc.taxtech.atms.dto.vatdto.JsonExportDto;
import java.io.File;
import java.io.InputStream;
import java.util.UUID;
@Component
public class ExportServiceImpl {
private final static Logger logger = LoggerFactory.getLogger(ExportServiceImpl.class);
public String export(JsonExportDto jsonExportDto, String serverPath) {
String filePath = "";
try{
filePath = String.format("%s_%s.xlsx",jsonExportDto.getType(), UUID.randomUUID().toString());
String fullFilePath = combine(serverPath, filePath);
Workbook workbook = new Workbook();
workbook.fromJson(jsonExportDto.getJsonData());
workbook.save(fullFilePath);
}catch (Exception e){
logger.error(String.format("导出文件异常:%s",e.getMessage()));
}
return filePath;
}
private String combine(String parent, String child) {
return String.format("%s" + File.separator + "%s", parent, child);
}
}
<div class="edit-equity-change-modal-wrapper">
<div class="modal fade editEquityChangeControlPop" id="editEquityChangeControlPop{{dimensionId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header border-bottom-divide">
<div class="modal-title" >{{'AlterEquity' | translate}}</div>
</div>
<div id="myTabContent" class="tab-content">
<div id="equityData" class="tab-pane in active">
<form class="form-horizontal" id="orgControlForm" name="orgControlForm">
<div class="bottom-row">
<div class="row">
<!--变更日期-->
<div class="form-group center paddingtop10">
<label class="col-sm-4 control-label"><span class="must-input">*</span>{{'RevisionDate' | translate}}:</label>
<div class="col-sm-8">
<div class="input-daterange input-group changeDatepicker" >
<input type="text" id="revisionDate" class="input-sm form-control" name="revisionDate" ng-model="searchEntity.uploadDateFrom" />
</div>
</div>
</div>
</div>
<div class="row">
<!--机构名称-->
<div class="form-group center paddingtop10">
<label class="col-sm-4 control-label"><span class="must-input">*</span>{{'OrganizationName' | translate}}:</label>
<div class="col-sm-8" ng-class="{'has-error':orgControlForm.name.$invalid && (orgControlForm.name.$dirty || orgControlForm.$submitted)}">
<input class="form-control" readonly="readonly " id="name" ng-model="editOrgModel.name" name="name" placeholder="{{resources.OrganizationName}}" ng-keyup="nameKeyUp()" maxlength="100" required>
<p ng-show="orgControlForm.name.$error.required && (orgControlForm.name.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgNameRequired}}</p>
<p ng-show="editOrgModel.nameError" class="has-error label">{{editOrgModel.nameError}}</p>
</div>
</div>
</div>
<div class="row">
<!--注册资本-->
<div class="form-group center paddingtop10">
<label for="clientCode" class="col-sm-4 control-label"><span class="must-input">*</span>{{'RegistrationCapital' | translate}}:</label>
<div class="col-sm-8" ng-class="{'has-error':orgControlForm.clientCode.$invalid && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="clientCode" id="clientCode" ng-model="editOrgModel.clientCode" placeholder="{{resources.OrganizationClientCode}}" maxlength="50" required>
<p ng-show="orgControlForm.clientCode.$error.required && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgClientCodeRequired}}</p>
</div>
</div>
</div>
</div>
<div style="clear: both;"></div>
<div class="row-line"></div>
<div class="bottom-row">
<div class="row">
<label class="col-sm-4 control-label">{{'HoldingList' | translate}} :</label>
<div class="col-sm-8"></div>
</div>
<div class="dx-viewport grid-container">
<div id="equityInfoGridContainer" dx-data-grid="equityInfoGridOptions">
<!--style="margin-top: 30px;">-->
</div>
</div>
</div>
<div class="row-line"></div>
</form>
</div>
<!--<div class="tab-pane fade" id="rightControlManagement">
<p>权限设置待开发,敬请期待!</p>
</div>-->
</div>
<div class="modal-footer" id="orgModalFooter" style="padding-left:139px;">
<button type="submit" class="btn btn-primary" ng-click="saveOrg()">
{{'Confirm' | translate}}
</button>
<button type="button" class="btn btn-third" ng-click="closeModal()" data-dismiss="modal">
{{'Cancel' | translate}}
</button>
</div>
</div>
</div>
</div>
</div>
commonModule.directive('editEquityChangeModal', ['$log',
function ($log) {
'use strict';
$log.debug('editEquityChangeModal.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/common/controls/edit-equity-change-modal/edit-equity-change-modal.html' + '?_=' + Math.random(),
replace: true,
controller: 'editEquityChangeModalController',
scope:
{
//区分是添加还是编辑
operateType: '=',
//如果是编辑的话,传递机构ID
selectedOrganization: '=?',
//watch 是否有机构添加或者编辑
isUpdate: '=?',
newOrganization: '=?',
dimensionId: '=?',
forceUpdate:'=?'
}
//,
//link: function (scope, element) {
// element.find('.selector-input').on('focus', function () {
// element.find('.org-tree-container').show();
// });
// $(document).on('click', function () {
// element.find('.org-tree-container').hide();
// }).on('click', '.org-tree-wrapper', function (e) {
// e.stopPropagation();
// });
//}
};
}
]);
\ No newline at end of file
@footer-button-left: 159px;
.edit-equity-change-modal-wrapper {
.editEquityChangeControlPop {
.modal-header {
border-bottom: 0px;
}
.modal-title {
font-size: 16px;
}
.border-bottom-divide {
border-bottom: 1px solid #dbd8d3;
}
.must-input {
color: red;
}
.modal-dialog {
width: 850px;
height: 600px;
}
.btn-default {
height: 33px;
}
input {
width: 280px;
height: 33px;
}
.modal-body {
padding-left: 0px !important;
width: auto;
}
.dropdown-menu {
max-height: 220px;
overflow-y: auto;
width: 250px;
}
.scoreDropDownBtn {
width: 250px;
}
select {
width: 250px;
height: 33px;
padding-left: 8px !important;
}
form .col-sm-3 {
font-weight: normal;
width: 35%;
}
form .col-sm-9 {
width: 65%;
margin-left: -20px;
}
form input[type='radio'] {
margin: 0 5px;
}
.control-label {
padding-left: 12px;
white-space: nowrap;
}
.dropdown-toggle .caret {
width: 10px;
height: 10px;
border: none; //IE
margin-top: -2px !important;
}
.dropdown-toggle .caret:before {
//IE
content: url(../../../../app-resources/images/ie11Trigangle.png);
margin-left: -12px !important;
margin-right: 1px;
}
.main {
margin: 20px 1px;
border-bottom: 1px;
}
//Target Chrome
@media screen and (-webkit-min-device-pixel-ratio: 0) {
.dropdown-toggle .caret {
width: 10px;
height: 10px;
border: none;
margin-top: 0px;
margin-right: -10px;
}
.dropdown-toggle .caret:before {
content: url(../../../../app-resources/images/chromeTriangle.png);
margin-left: 3px;
}
}
.bottom-row {
display: block;
}
.input-group input{
border-radius: 4px;
text-align: left;
}
.quarter-div {
width: 50%;
float: left;
padding: 30px 10px 10px 10px;
}
.row-line {
height: 1px;
border-bottom: 1px solid #CDCDCD;
margin: 0px 20px;
}
.center {
text-align: center;
}
.paddingtop10 {
padding-top: 10px;
}
.leftUp {
/*background-color: #5BC0DE;*/
width: 50%;
/*margin-left: 20px;*/
/*width: 44%;*/
}
.rightUp {
width: 45%;
/*background-color: #5CB85C;*/
}
.leftDown {
/*border-top: 1px solid #D5D5D5;*/
/*margin-left: 20px;*/
width: 50%;
/*background-color: #F0AD4E;*/
/*overflow-y: auto;*/
}
.rightDown {
/*border-top: 1px solid #D5D5D5;*/
width: 45%;
/*overflow-y: auto;*/
/*background-color: #FFC706;*/
}
.tab-pane {
/*height: 460px;*/
overflow-y: auto;
}
#equityData {
max-height: 460px;
overflow-y: auto;
}
#orgControlTab {
padding: 0 10px;
ul {
color: #ffc107;
border-bottom: 0px;
li {
/*height: 30px;*/
width: 20%;
border: 1px solid #F2F2F2;
&:hover {
/*border: 1px solid #F2F2F2!important;*/
}
a:hover {
color: #D35412 !important;
background-color: white !important;
}
}
li a {
font-size: 16px;
height: 38px;
line-height: 38px;
border-radius: 1px;
padding: 0px 20px;
vertical-align: middle;
text-align: center;
border: 0px;
color: black !important;
}
li.active {
background-color: #f3f2f0 !important;
/*border:0px;*/
a,
a:hover,
a:focus {
color: black !important;
background-color: #f3f2f0 !important;
}
}
li a span {
float: right;
vertical-align: middle;
line-height: 30px;
margin-top: -2px;
}
.glyphicon-exclamation-sign {
color: red;
}
}
}
.level-title {
padding: 18px 15px;
span {
color: #D35412;
font-weight: bold;
}
}
.account-modal-table {
margin-left: 15px;
margin-right: 15px;
.account-set-select {
width: 150px;
}
.row {
margin-left: 0px;
margin-right: 0px;
span {
margin-top: 8px;
display: inline-block;
}
select {
margin-right: 10px;
}
.delete {
color: #D35412;
cursor: pointer;
}
.add {
cursor: pointer;
}
}
.box {
border-left: 1px solid #d4d4d4;
border-top: 1px solid #d4d4d4;
height: 54px;
padding: 9px;
.AccountName-span {
padding-right: 0px;
padding-left: 0px;
width: 56px;
}
.StartTime-span {
width: 56px;
padding-left: 0px;
padding-right: 0px;
margin-left: 55px;
}
.To-span {
width: 5px;
padding-left: 15px;
padding-right: 0px;
}
.test-select {
width: 130px;
}
.col-sm-5 {
padding-right: 0px;
width: 120px;
}
.col-sm-4 {
width: 180px;
}
.form_datetime {
width: 120px;
border-radius: 4px;
padding-left: 15px;
background-color: white;
}
}
.box-right {
border-right: 1px solid #d4d4d4;
}
.box-bottom {
border-bottom: 1px solid #d4d4d4;
}
}
.server-modal-table {
margin-left: 15px;
margin-right: 15px;
width: 800px;
height: 163px;
.row {
margin-left: 0px;
margin-right: 0px;
span {
margin-top: 8px;
display: inline-block;
}
select {
margin-right: 10px;
}
.delete {
color: #D35412;
cursor: pointer;
}
.add {
cursor: pointer;
}
}
.box {
/*border-left: 1px solid #d4d4d4;*/
border-bottom: 1px solid #d4d4d4;
height: 54px;
padding: 9px;
width: 630px;
.serviceCheckBox {
width: 60px;
padding-top: 4px;
}
.ServiceName-span {
padding-right: 0px;
padding-left: 0px;
width: 150px;
font-weight: inherit;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
margin-top: 6px;
}
.ReportTemplate-span {
width: 80px;
padding-left: 0px;
padding-right: 0px;
margin-left: 55px;
font-weight: inherit;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
margin-top: 6px;
}
.test-select {
width: 130px;
}
.col-sm-5 {
padding-right: 0px;
width: 80px;
}
.col-sm-4 {
width: 180px;
}
.form_datetime {
width: 80px;
border: 1px solid #cccccc;
border-radius: 4px;
padding-left: 15px;
background-color: white;
}
}
.box-right {
border-right: 1px solid #d4d4d4;
}
.box-bottom {
border-bottom: 1px solid #d4d4d4;
}
.checkService {
width: 16px;
height: 16px;
}
}
.dx-viewport {
height: calc(~"100% - 28px");
min-height: 200px;
#equityInfoGridContainer {
height: 100%;
margin: 0px 20px;
> div {
height: 100%;
.dx-datagrid-rowsview {
height: calc(~"100% - 36px") !important;
overflow-y: auto;
}
}
.dx-datagrid-headers .dx-datagrid-table .dx-row > td {
border-bottom: 0px;
padding-left: 0px;
}
.dx-datagrid .dx-row > td {
padding: 12px 0px;
}
.dx-datagrid-rowsview .dx-row {
border-bottom: 1px solid @color-light-gray-e4;
height: 30px;
vertical-align: middle;
}
.material-icons {
color: @color-red-ext0;
}
}
}
}
}
\ No newline at end of file
<div class="edit-equity-modal-wrapper">
<div class="modal fade editEquityControlPop" id="editEquityControlPop{{dimensionId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header border-bottom-divide">
<div class="modal-title" >{{'EditEquity' | translate}}</div>
</div>
<div id="myTabContent" class="tab-content">
<div id="equityData" class="tab-pane in active">
<form class="form-horizontal" id="orgControlForm" name="orgControlForm">
<div class="bottom-row">
<div class="row">
<!--机构名称-->
<div class="form-group center paddingtop10">
<label class="col-sm-4 control-label"><span class="must-input">*</span>{{'OrganizationName' | translate}}:</label>
<div class="col-sm-8" ng-class="{'has-error':orgControlForm.name.$invalid && (orgControlForm.name.$dirty || orgControlForm.$submitted)}">
<input class="form-control" readonly="readonly " id="name" ng-model="editOrgModel.name" name="name" placeholder="{{resources.OrganizationName}}" ng-keyup="nameKeyUp()" maxlength="100" required>
<p ng-show="orgControlForm.name.$error.required && (orgControlForm.name.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgNameRequired}}</p>
<p ng-show="editOrgModel.nameError" class="has-error label">{{editOrgModel.nameError}}</p>
</div>
</div>
</div>
<div class="row">
<!--机构名称-->
<div class="form-group center paddingtop10">
<label for="clientCode" class="col-sm-4 control-label"><span class="must-input">*</span>{{'RegistrationCapital' | translate}}:</label>
<div class="col-sm-8" ng-class="{'has-error':orgControlForm.clientCode.$invalid && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="clientCode" id="clientCode" ng-model="editOrgModel.clientCode" placeholder="{{resources.OrganizationClientCode}}" maxlength="50" required>
<p ng-show="orgControlForm.clientCode.$error.required && (orgControlForm.clientCode.$dirty || orgControlForm.$submitted)" class="has-error label">{{resources.OrganizationMsgClientCodeRequired}}</p>
</div>
</div>
</div>
</div>
<div style="clear: both;"></div>
<div class="row-line"></div>
<div class="bottom-row">
<div class="row">
<label class="col-sm-4 control-label">{{'HoldingList' | translate}} :</label>
<div class="col-sm-8"></div>
</div>
<div class="dx-viewport grid-container">
<div id="equityInfoGridContainer" dx-data-grid="equityInfoGridOptions">
<!--style="margin-top: 30px;">-->
</div>
</div>
</div>
<div class="row-line"></div>
</form>
</div>
<!--<div class="tab-pane fade" id="rightControlManagement">
<p>权限设置待开发,敬请期待!</p>
</div>-->
</div>
<div class="modal-footer" id="orgModalFooter" style="padding-left:139px;">
<button type="submit" class="btn btn-primary" ng-click="saveOrg()">
{{'Confirm' | translate}}
</button>
<button type="button" class="btn btn-third" ng-click="closeModal()" data-dismiss="modal">
{{'Cancel' | translate}}
</button>
</div>
</div>
</div>
</div>
</div>
commonModule.directive('editEquityModal', ['$log',
function ($log) {
'use strict';
$log.debug('editEquityModal.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/common/controls/edit-equity-modal/edit-equity-modal.html' + '?_=' + Math.random(),
replace: true,
controller: 'editEquityModalController',
scope:
{
//区分是添加还是编辑
operateType: '=',
//如果是编辑的话,传递机构ID
selectedOrganization: '=?',
//watch 是否有机构添加或者编辑
isUpdate: '=?',
newOrganization: '=?',
dimensionId: '=?',
forceUpdate:'=?'
}
//,
//link: function (scope, element) {
// element.find('.selector-input').on('focus', function () {
// element.find('.org-tree-container').show();
// });
// $(document).on('click', function () {
// element.find('.org-tree-container').hide();
// }).on('click', '.org-tree-wrapper', function (e) {
// e.stopPropagation();
// });
//}
};
}
]);
\ No newline at end of file
// web service proxy for role
webservices.factory('exportService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
exportJsonData: function (exportData) {
return $http.post('/export/jsonData', exportData, apiConfig.create());
}
};
}]);
\ 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