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
3048dfb2
Commit
3048dfb2
authored
Jun 05, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_neo' into 'dev'
Dev neo add get project status api impl See merge request root/atms!17
parents
feedbc03
ff585ba2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
7 deletions
+71
-7
ProjectStatusManageController.java
...axtech/atms/controller/ProjectStatusManageController.java
+10
-0
AddProjectResult.java
.../java/pwc/taxtech/atms/dto/taxadmin/AddProjectResult.java
+5
-5
ProjectStatusManageService.java
.../pwc/taxtech/atms/service/ProjectStatusManageService.java
+2
-0
ProjectServiceImpl.java
...ava/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
+1
-1
ProjectStatusManageServiceImpl.java
...ech/atms/service/impl/ProjectStatusManageServiceImpl.java
+52
-0
framework.js
atms-web/src/main/webapp/bundles/framework.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectStatusManageController.java
View file @
3048dfb2
...
...
@@ -32,4 +32,14 @@ public class ProjectStatusManageController {
@PathVariable
(
"status"
)
Integer
status
)
{
return
projectStatusManageService
.
setProjectStatus
(
dbName
,
periodId
,
status
,
identityService
.
getIdentityUser
().
getID
());
}
@ApiOperation
(
value
=
"getProjectStatus"
,
notes
=
""
)
@RequestMapping
(
value
=
{
"getProjectStatus/{dbName}/{projectId}/{periodId}"
},
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
@PathVariable
String
dbName
,
@PathVariable
String
projectId
,
@PathVariable
Integer
periodId
)
{
return
projectStatusManageService
.
getProjectStatus
(
dbName
,
projectId
,
periodId
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/taxadmin/AddProjectResult.java
View file @
3048dfb2
package
pwc
.
taxtech
.
atms
.
dto
.
taxadmin
;
public
class
AddProjectResult
{
private
String
d
Bn
ame
;
private
String
d
bN
ame
;
private
String
projectID
;
private
Boolean
result
;
private
String
resultMsg
;
public
String
get
dBn
ame
()
{
return
d
Bn
ame
;
public
String
get
DbN
ame
()
{
return
d
bN
ame
;
}
public
void
set
dBname
(
String
dBn
ame
)
{
this
.
d
Bname
=
dBn
ame
;
public
void
set
DbName
(
String
dbN
ame
)
{
this
.
d
bName
=
dbN
ame
;
}
public
String
getProjectID
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/ProjectStatusManageService.java
View file @
3048dfb2
...
...
@@ -5,4 +5,6 @@ import pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto;
public
interface
ProjectStatusManageService
{
OperationResultDto
<
ProjectStatusManageDto
>
setProjectStatus
(
String
dbName
,
Integer
periodId
,
Integer
status
,
String
id
);
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
String
dbName
,
String
projectId
,
Integer
periodId
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
View file @
3048dfb2
...
...
@@ -206,7 +206,7 @@ public class ProjectServiceImpl implements ProjectService {
AddProjectResult
addProjectResult
=
new
AddProjectResult
();
addProjectResult
.
setResult
(
true
);
addProjectResult
.
set
dBn
ame
(
project
.
getDbName
());
addProjectResult
.
set
DbN
ame
(
project
.
getDbName
());
addProjectResult
.
setProjectID
(
project
.
getID
());
return
addProjectResult
;
}
catch
(
Exception
e
){
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectStatusManageServiceImpl.java
View file @
3048dfb2
...
...
@@ -7,6 +7,7 @@ import org.springframework.stereotype.Service;
import
pwc.taxtech.atms.dao.ProjectStatusManageMapper
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.taxadmin.ProjectImportSubStatusDto
;
import
pwc.taxtech.atms.dto.taxadmin.ProjectStatusManageDto
;
import
pwc.taxtech.atms.entitiy.ProjectStatusManage
;
import
pwc.taxtech.atms.entitiy.ProjectStatusManageExample
;
...
...
@@ -75,4 +76,55 @@ public class ProjectStatusManageServiceImpl implements ProjectStatusManageServic
return
ord
;
}
}
@Override
public
OperationResultDto
<
ProjectStatusManageDto
>
getProjectStatus
(
String
dbName
,
String
projectId
,
Integer
periodId
)
{
try
{
ProjectStatusManageExample
example
=
new
ProjectStatusManageExample
();
example
.
createCriteria
().
andDbNameEqualTo
(
dbName
).
andPeriodIdEqualTo
(
periodId
);
List
<
ProjectStatusManage
>
psmList
=
projectStatusManageMapper
.
selectByExample
(
example
);
if
(
psmList
!=
null
&&
!
psmList
.
isEmpty
())
{
ProjectStatusManage
first
=
psmList
.
get
(
FIRST_OR_DFAULT
);
ProjectStatusManageDto
dto
=
new
ProjectStatusManageDto
();
try
{
FieldsMapper
.
map
(
first
,
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
LOGGER
.
warn
(
"field map some error"
);
}
ProjectImportSubStatusDto
ssd
=
new
ProjectImportSubStatusDto
();
//TODO:should query status from db (neo)
ssd
.
setAdjustImport
(
false
);
ssd
.
setCustomInvoiceImport
(
false
);
ssd
.
setEntryImport
(
false
);
ssd
.
setErpImport
(
false
);
ssd
.
setInputInvoiceImport
(
false
);
ssd
.
setOutputInvoiceImport
(
false
);
ssd
.
setTbImport
(
false
);
ssd
.
setVoucherMapImport
(
false
);
dto
.
setImportSubStatus
(
ssd
);
OperationResultDto
resultDto
=
new
OperationResultDto
();
resultDto
.
setResult
(
true
);
resultDto
.
setResultMsg
(
""
);
resultDto
.
setData
(
dto
);
return
resultDto
;
}
else
{
throw
new
Exception
(
"数据库"
+
dbName
+
"状态信息为NULL"
);
}
}
catch
(
Exception
e
){
OperationResultDto
resultDto
=
new
OperationResultDto
();
resultDto
.
setResult
(
false
);
resultDto
.
setResultMsg
(
e
.
getMessage
());
resultDto
.
setData
(
null
);
return
resultDto
;
}
}
}
atms-web/src/main/webapp/bundles/framework.js
View file @
3048dfb2
...
...
@@ -1697,7 +1697,7 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
d
Bn
ame
;
project
.
dbName
=
rsp
.
d
bN
ame
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
...
...
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