Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
a2ed84ef
Commit
a2ed84ef
authored
Apr 17, 2019
by
eddie.woo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
cb9a4f47
7af95349
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
369 additions
and
64 deletions
+369
-64
pom.xml
atms-api/pom.xml
+32
-23
EnumImportType.java
.../java/pwc/taxtech/atms/constant/enums/EnumImportType.java
+2
-1
RevenueConfEnum.java
...java/pwc/taxtech/atms/constant/enums/RevenueConfEnum.java
+49
-5
RevenueConfController.java
...va/pwc/taxtech/atms/controller/RevenueConfController.java
+36
-4
RevenueConfService.java
...ava/pwc/taxtech/atms/service/impl/RevenueConfService.java
+0
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
RevenueConfig.xlsx
...src/main/resources/Document/DataImport/RevenueConfig.xlsx
+0
-0
RevenueConfigMapper.java
...in/java/pwc/taxtech/atms/vat/dao/RevenueConfigMapper.java
+5
-1
RevenueTypeMappingMapper.xml
...ces/pwc/taxtech/atms/vat/dao/RevenueTypeMappingMapper.xml
+0
-21
RevenueConfigExtendsMapper.xml
...xtech/atms/vat/dao/extends/RevenueConfigExtendsMapper.xml
+34
-0
RevenueTypeMappingExtendsMapper.xml
.../atms/vat/dao/extends/RevenueTypeMappingExtendsMapper.xml
+25
-0
index.html
atms-orangeheap/public/index.html
+53
-0
IndexController.java
...java/pwc/taxtech/atms/web/controller/IndexController.java
+3
-2
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+1
-1
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+2
-1
vat-revenue-config.ctrl.js
.../dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
+112
-2
vat-revenue-config.html
...app/dataImport/vat-revenue-config/vat-revenue-config.html
+15
-3
No files found.
atms-api/pom.xml
View file @
a2ed84ef
...
...
@@ -16,9 +16,9 @@
<dependencies>
<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc6 -->
<!--<dependency>-->
<!--<groupId>com.oracle</groupId>-->
<!--<artifactId>ojdbc</artifactId>-->
<!--<version>0.0.1</version>-->
<!--<groupId>com.oracle</groupId>-->
<!--<artifactId>ojdbc</artifactId>-->
<!--<version>0.0.1</version>-->
<!--</dependency>-->
<!--<dependency>
<groupId>com.oracle</groupId>
...
...
@@ -74,17 +74,18 @@
<version>
4.2.3.RELEASE
</version>
</dependency>
<!--去除swagger-->
<!-- <dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>-->
<!-- <dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>-->
<dependency>
<groupId>
io.jsonwebtoken
</groupId>
...
...
@@ -442,7 +443,7 @@
<profiles>
<profile>
<id>
dev
</id>
<activation>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<build>
...
...
@@ -454,8 +455,8 @@
<env>
dev
</env>
</properties>
</profile>
<profile>
<id>
staging
</id>
<build>
...
...
@@ -522,13 +523,13 @@
<targetPath>
${basedir}/target/classes/userTemplate
</targetPath>
</resource>
<resource>
<directory>
src/main/resources/vat_excel_template
</directory>
<includes>
<include>
**/*.xls
</include>
<include>
**/*.xlsx
</include>
</includes>
<targetPath>
${basedir}/target/classes/vat_excel_template
</targetPath>
</resource>
<directory>
src/main/resources/vat_excel_template
</directory>
<includes>
<include>
**/*.xls
</include>
<include>
**/*.xlsx
</include>
</includes>
<targetPath>
${basedir}/target/classes/vat_excel_template
</targetPath>
</resource>
<resource>
<directory>
src/main/resources/cit_excel_template
</directory>
<includes>
...
...
@@ -553,6 +554,14 @@
</includes>
<targetPath>
${basedir}/target/classes/user_excel_template
</targetPath>
</resource>
<resource>
<directory>
src/main/resources/analysis_excel_init
</directory>
<includes>
<include>
**/*.xls
</include>
<include>
**/*.xlsx
</include>
</includes>
<targetPath>
${basedir}/target/classes/analysis_excel_init
</targetPath>
</resource>
</resources>
<plugins>
<plugin>
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumImportType.java
View file @
a2ed84ef
...
...
@@ -13,7 +13,8 @@ public enum EnumImportType {
InvoiceRecord
(
9
),
ExtractFinancialData
(
10
),
ExtractInvoiceData
(
11
),
RevenueMapping
(
12
)
RevenueMapping
(
12
),
RevenueConfig
(
13
)
;
private
Integer
code
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/RevenueConfEnum.java
View file @
a2ed84ef
...
...
@@ -15,7 +15,7 @@ public class RevenueConfEnum {
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
REVERSAL_MAPPING
=
new
HashMap
<>();
AccountType
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -32,6 +32,7 @@ public class RevenueConfEnum {
static
{
for
(
RevenueConfEnum
.
AccountType
accountType
:
RevenueConfEnum
.
AccountType
.
values
())
{
MAPPING
.
put
(
accountType
.
getCode
(),
accountType
.
getName
());
REVERSAL_MAPPING
.
put
(
accountType
.
getName
(),
accountType
.
getCode
());
}
}
}
...
...
@@ -48,7 +49,7 @@ public class RevenueConfEnum {
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
REVERSAL_MAPPING
=
new
HashMap
<>();
TaxBase
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -65,6 +66,7 @@ public class RevenueConfEnum {
static
{
for
(
RevenueConfEnum
.
TaxBase
taxBase
:
RevenueConfEnum
.
TaxBase
.
values
())
{
MAPPING
.
put
(
taxBase
.
getCode
(),
taxBase
.
getName
());
REVERSAL_MAPPING
.
put
(
taxBase
.
getName
(),
taxBase
.
getCode
());
}
}
}
...
...
@@ -80,7 +82,7 @@ public class RevenueConfEnum {
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
REVERSAL_MAPPING
=
new
HashMap
<>();
TaxType
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -97,6 +99,7 @@ public class RevenueConfEnum {
static
{
for
(
RevenueConfEnum
.
TaxType
taxType
:
RevenueConfEnum
.
TaxType
.
values
())
{
MAPPING
.
put
(
taxType
.
getCode
(),
taxType
.
getName
());
REVERSAL_MAPPING
.
put
(
taxType
.
getName
(),
taxType
.
getCode
());
}
}
}
...
...
@@ -110,7 +113,7 @@ public class RevenueConfEnum {
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
REVERSAL_MAPPING
=
new
HashMap
<>();
RevenueType
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -127,6 +130,7 @@ public class RevenueConfEnum {
static
{
for
(
RevenueConfEnum
.
RevenueType
revenueType
:
RevenueConfEnum
.
RevenueType
.
values
())
{
MAPPING
.
put
(
revenueType
.
getCode
(),
revenueType
.
getName
());
REVERSAL_MAPPING
.
put
(
revenueType
.
getName
(),
revenueType
.
getCode
());
}
}
}
...
...
@@ -140,7 +144,7 @@ public class RevenueConfEnum {
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
REVERSAL_MAPPING
=
new
HashMap
<>();
Status
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
@@ -157,8 +161,48 @@ public class RevenueConfEnum {
static
{
for
(
RevenueConfEnum
.
Status
status
:
RevenueConfEnum
.
Status
.
values
())
{
MAPPING
.
put
(
status
.
getCode
(),
status
.
getName
());
REVERSAL_MAPPING
.
put
(
status
.
getName
(),
status
.
getCode
());
}
}
}
public
enum
EXECLColumn
{
Column_1
(
0
,
"收入类型名称"
),
Column_2
(
1
,
"适用公司"
),
Column_3
(
2
,
"账载收入"
),
Column_4
(
3
,
"科目代码"
),
Column_5
(
4
,
"利润中心代码"
),
Column_6
(
5
,
"产品代码"
),
Column_7
(
6
,
"税率"
),
Column_8
(
7
,
"计税收入"
),
Column_9
(
8
,
"计税收入科目代码"
),
Column_10
(
9
,
"收入类型"
),
Column_11
(
10
,
"计税方法"
),
Column_12
(
11
,
"状态"
),
Column_13
(
12
,
"起始日期"
),
Column_14
(
13
,
"终止日期"
)
;
private
Integer
index
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
EXECLColumn
(
Integer
index
,
String
name
)
{
this
.
index
=
index
;
this
.
name
=
name
;
}
public
Integer
getIndex
()
{
return
index
;
}
public
String
getName
()
{
return
name
;
}
static
{
for
(
TaxesCalculateReportEnum
.
Column
accountType
:
TaxesCalculateReportEnum
.
Column
.
values
())
{
MAPPING
.
put
(
accountType
.
getIndex
(),
accountType
.
getName
());
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/RevenueConfController.java
View file @
a2ed84ef
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.
springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.
RequestBody
;
import
org.springframework.web.
bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.
apache.poi.ss.usermodel.Workbook
;
import
org.springframework.web.bind.annotation.
*
;
import
org.springframework.web.
multipart.MultipartFile
;
import
pwc.taxtech.atms.constant.enums.EnumImportType
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.input.CamelPagingResultDto
;
import
pwc.taxtech.atms.dto.revenuconf.RevConfAddDto
;
...
...
@@ -13,6 +13,9 @@ import pwc.taxtech.atms.service.impl.RevenueConfService;
import
pwc.taxtech.atms.vat.entity.RevenueConfig
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.util.List
;
@RestController
...
...
@@ -48,4 +51,33 @@ public class RevenueConfController extends BaseController {
revenueConfService
.
delConfig
(
idList
);
return
ApiResultDto
.
success
();
}
@PostMapping
(
"upload"
)
public
ApiResultDto
upload
(
@RequestParam
MultipartFile
file
,
@RequestParam
Integer
type
)
throws
Exception
{
List
<
String
>
unSuccessList
=
revenueConfService
.
upload
(
file
,
type
);
return
ApiResultDto
.
success
(
unSuccessList
);
}
@GetMapping
(
"export"
)
public
void
export
(
HttpServletResponse
response
)
throws
Exception
{
OutputStream
ouputStream
=
null
;
try
{
InputStream
inputStream
=
this
.
getClass
().
getResourceAsStream
(
"/document/DataImport/"
+
EnumImportType
.
RevenueConfig
.
name
()
+
".xlsx"
);
Workbook
tWorkbook
=
revenueConfService
.
export
(
inputStream
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
EnumImportType
.
RevenueConfig
.
name
()
+
".xlsx"
);
ouputStream
=
response
.
getOutputStream
();
tWorkbook
.
write
(
ouputStream
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
ouputStream
!=
null
)
{
ouputStream
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueConfService.java
View file @
a2ed84ef
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
a2ed84ef
This diff is collapsed.
Click to expand it.
atms-api/src/main/resources/Document/DataImport/RevenueConfig.xlsx
0 → 100644
View file @
a2ed84ef
File added
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/RevenueConfigMapper.java
View file @
a2ed84ef
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
...
...
@@ -8,6 +7,8 @@ import pwc.taxtech.atms.MyVatMapper;
import
pwc.taxtech.atms.vat.entity.RevenueConfig
;
import
pwc.taxtech.atms.vat.entity.RevenueConfigExample
;
import
java.util.List
;
@Mapper
public
interface
RevenueConfigMapper
extends
MyVatMapper
{
/**
...
...
@@ -105,4 +106,6 @@ public interface RevenueConfigMapper extends MyVatMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
RevenueConfig
record
);
int
batchInsert
(
List
<
RevenueConfig
>
list
);
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/RevenueTypeMappingMapper.xml
View file @
a2ed84ef
...
...
@@ -414,24 +414,4 @@
</if>
</select>
<insert
id=
"batchInsert"
>
insert into revenue_type_mapping
(id, org_id, ou_name, content, tax_rate, revenue_type_name, start_date, end_date, status, create_by, update_by, create_time, update_time) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(#{item.id},
#{item.orgId},
#{item.ouName},
#{item.content},
#{item.taxRate},
#{item.revenueTypeName},
#{item.startDate},
#{item.endDate},
#{item.status,jdbcType=TINYINT},
#{item.createBy},
#{item.updateBy},
#{item.createTime},
#{item.updateTime})
</foreach>
</insert>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/RevenueConfigExtendsMapper.xml
0 → 100644
View file @
a2ed84ef
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.RevenueConfigMapper"
>
<insert
id=
"batchInsert"
>
insert into revenue_config
(id, serial_no, name, org_id, account_type, account_name, tax_rate, tax_base, revenue_type, tax_type, status, start_date, end_date, tb_segment3, tb_segment5, tb_segment6, update_time, create_time, update_by, create_by, base_cr_code, base_dr_code) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.id,jdbcType=BIGINT},
#{item.serialNo,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR},
#{item.orgId,jdbcType=VARCHAR},
#{item.accountType,jdbcType=TINYINT},
#{item.accountName,jdbcType=VARCHAR},
#{item.taxRate,jdbcType=DECIMAL},
#{item.taxBase,jdbcType=TINYINT},
#{item.revenueType,jdbcType=TINYINT},
#{item.taxType,jdbcType=TINYINT},
#{item.status,jdbcType=TINYINT},
#{item.startDate,jdbcType=VARCHAR},
#{item.endDate,jdbcType=VARCHAR},
#{item.tbSegment3,jdbcType=VARCHAR},
#{item.tbSegment5,jdbcType=VARCHAR},
#{item.tbSegment6,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.baseCrCode,jdbcType=VARCHAR},
#{item.baseDrCode,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/RevenueTypeMappingExtendsMapper.xml
0 → 100644
View file @
a2ed84ef
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.RevenueTypeMappingMapper"
>
<insert
id=
"batchInsert"
>
insert into revenue_type_mapping
(id, org_id, ou_name, content, tax_rate, revenue_type_name, start_date, end_date, status, create_by, update_by, create_time, update_time) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(#{item.id},
#{item.orgId},
#{item.ouName},
#{item.content},
#{item.taxRate},
#{item.revenueTypeName},
#{item.startDate},
#{item.endDate},
#{item.status,jdbcType=TINYINT},
#{item.createBy},
#{item.updateBy},
#{item.createTime},
#{item.updateTime})
</foreach>
</insert>
</mapper>
\ No newline at end of file
atms-orangeheap/public/index.html
View file @
a2ed84ef
...
...
@@ -4,6 +4,59 @@
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<script>
//获取地址栏参数,name:参数名称
window
.
str
=
""
;
var
z
=
function
getUrlParms
(
name
){
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
}
var
ddTicket
=
z
(
"ticketStr"
);
//設置cookie
var
sc
=
function
setCookie
(
name
,
value
)
{
var
Days
=
30
;
var
exp
=
new
Date
();
exp
.
setTime
(
exp
.
getTime
()
+
Days
*
24
*
60
*
60
*
1000
);
document
.
cookie
=
name
+
"="
+
escape
(
value
)
+
";expires="
+
exp
.
toGMTString
()
+
";path=./"
;
}
sc
(
"ddTicket"
,
ddTicket
);
var
ReUrl
=
"https://me.xiaojukeji.com/project/stargate-auth/html/login.html?redirect_uri=http%3A%2F%2Fmis.diditaxi.com.cn%2Fauth%3Fapp_id%3D2500%26version%3D1.0%26jumpto%3Dhttp://dts-test.erp.didichuxing.com/orangeweb/index.html%26callback_index%3D0"
if
(
ddTicket
==
undefined
||
ddTicket
==
""
||
ddTicket
==
null
){
document
.
location
=
ReUrl
;
}
/* else {
//创建核心对象
xmlhttp = null;
if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc.
xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//编写回调函数
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//
}
}
//這個 url 測試的
var getUserUrl="http://dts-test.erp.didichuxing.com/sso/getUser?ticket=";
//open设置请求方式和请求路径
xmlhttp.open("get", getUserUrl+ddTicket);
//send 发送
xmlhttp.send();
}*/
</script>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
didi2
</title>
<link
rel=
"stylesheet"
href=
"font_roboto.css"
>
...
...
atms-web/src/main/java/pwc/taxtech/atms/web/controller/IndexController.java
View file @
a2ed84ef
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.client.RestTemplate
;
import
pwc.taxtech.atms.common.DDUserInfoRes
;
import
pwc.taxtech.atms.common.HttpUtil
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.AtmsTokenDto
;
import
pwc.taxtech.atms.web.AtmsWebSettings
;
import
pwc.taxtech.atms.web.service.OrangeHeapService
;
...
...
@@ -196,7 +197,7 @@ public class IndexController {
*/
@RequestMapping
(
value
=
{
"/sso/getUser"
},
method
=
RequestMethod
.
GET
)
@ResponseBody
public
String
accept
(
@RequestParam
(
value
=
"ticket"
)
String
ticket
,
HttpServletRequest
request
,
public
ApiResultDto
accept
(
@RequestParam
(
value
=
"ticket"
)
String
ticket
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
DDUserInfoRes
ddUserInfoRes
=
null
;
try
{
...
...
@@ -207,7 +208,7 @@ public class IndexController {
}
catch
(
Exception
e
)
{
logger
.
info
(
String
.
format
(
"调用DDSSO获取用户信息失败:[%s]"
,
e
.
getMessage
()),
e
);
}
return
JSON
.
toJSONString
(
ddUserInfoRes
);
return
ApiResultDto
.
success
(
ddUserInfoRes
);
}
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
a2ed84ef
...
...
@@ -3140,7 +3140,7 @@
sheet
.
setValue
(
40
,
2
,
$scope
.
_ebitResult
.
rate
+
"%"
);
sheet
.
setValue
(
41
,
2
,
$scope
.
_ebitResult
.
gljyye
);
sheet
.
setValue
(
42
,
2
,
$scope
.
_ebitResult
.
sixAddtax
);
sheet
.
setValue
(
43
,
2
,
$scope
.
_ebitResult
.
klzcjsz
);
sheet
.
setValue
(
43
,
2
,
$scope
.
_ebitResult
.
tsklys
);
}
setTimeout
(
function
(){
spreadTODb
();},
1000
)
}
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
a2ed84ef
...
...
@@ -1563,7 +1563,8 @@ constant.importFileType = {
invoiceRecord
:
9
,
ExtractFinancialData
:
10
,
ExtractInvoiceData
:
11
,
RevenueMapping
:
12
RevenueMapping
:
12
,
RevenueConfig
:
13
};
constant
.
citImportFileType
=
{
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
View file @
a2ed84ef
vatModule
.
controller
(
'VatRevenueConfigController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
)
{
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
'Upload'
,
'apiInterceptor'
,
'templateService'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
,
Upload
,
apiInterceptor
,
templateService
)
{
'use strict'
;
$scope
.
upload
=
function
(
uploadType
)
{
if
(
!
$scope
.
uploadFile
||
!
$scope
.
uploadFile
.
file
.
name
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'SelectUploadFileRequired'
));
return
;
}
$
(
'#busy-indicator-container'
).
show
();
var
deferred
=
$q
.
defer
();
Upload
.
upload
({
url
:
apiInterceptor
.
webApiHostUrl
+
'/revenueConf/upload'
,
data
:
{
type
:
uploadType
,
},
file
:
$scope
.
uploadFile
.
file
,
// resumeChunkSize: resumable ? $scope.chunkSize : null,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
Authorization
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
(),
withCredentials
:
true
},
withCredentials
:
true
}).
then
(
function
(
res
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
res
&&
res
.
data
&&
0
===
res
.
data
.
code
)
{
if
(
res
.
data
.
data
.
length
==
0
){
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
}
else
{
var
msg
=
''
;
angular
.
forEach
(
res
.
data
.
data
,
function
(
item
)
{
msg
+=
item
+
"
\n
"
;
});
SweetAlert
.
success
(
msg
);
}
$scope
.
refreshConfigGrid
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
},
function
(
resp
)
{
deferred
.
resolve
();
if
(
resp
.
statusText
===
'HttpRequestValidationException'
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'HttpRequestValidationException'
));
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'SaveFail'
));
}
$
(
'#busy-indicator-container'
).
hide
();
},
function
(
evt
)
{
deferred
.
resolve
();
var
progressPercentage
=
parseInt
(
100.0
*
evt
.
loaded
/
evt
.
total
);
$log
.
debug
(
'progress: '
+
progressPercentage
+
'% '
+
evt
.
config
.
data
.
file
.
name
);
});
};
$scope
.
downloadTemplate
=
function
()
{
templateService
.
downloadTemplate
(
constant
.
importFileType
.
RevenueConfig
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"收入类型配置导入模板"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"收入类型配置导入模板.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
$scope
.
exportRevenueConf
=
function
()
{
$http
.
get
(
'/revenueConf/export'
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
})).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"收入类型配置报表"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"收入类型配置报表.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//表格配置
$scope
.
revenueGridOptions
=
$
.
extend
(
true
,
{},
dxDataGridService
.
BASIC_GRID_OPTIONS
,
{
columns
:
[
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.html
View file @
a2ed84ef
...
...
@@ -5,10 +5,22 @@
</div>
<div
id=
"tab_total"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
style=
"margin-top: 5px;"
>
<div
class=
"import-wrapper"
>
<button
type=
"button"
class=
"btn btn-
prim
ary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<div
class=
"form-group"
style=
"margin-top: 5px;"
>
<button
type=
"button"
class=
"btn btn-
second
ary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"batchDelConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
</div></div>
<label
class=
"control-label"
>
文件:
</label>
<input
class=
"form-control"
type=
"text"
name=
"fileName"
ng-model=
"uploadFile.file.name"
readonly
placeholder=
""
/>
<button
type=
"button"
type=
"file"
ngf-select
ng-model=
"uploadFile.file"
accept=
".xls,.xlsx"
class=
"btn btn-secondary browse"
>
{{'SelectFile' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"CoverImportBtn"
ng-click=
"upload(1)"
></button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"AddImportBtn"
ng-click=
"upload(2)"
></button>
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"downloadTemplate()"
><i
class=
"fa fa-download"
aria-hidden=
"true"
></i>
下载模板
</button>
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"exportRevenueConf()"
><i
class=
"fa fa-download"
aria-hidden=
"true"
></i>
导出报表
</button>
</div>
</form>
<div
class=
"dt-init-wrapper"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment