Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
6b2078e8
Commit
6b2078e8
authored
Feb 25, 2019
by
liboyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成保存派出所申领表数据
parent
46a955db
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
110 additions
and
601 deletions
+110
-601
BizApi.java
src/main/java/com/yxproject/start/api/BizApi.java
+9
-73
PoliceApplyCountDto.java
...ain/java/com/yxproject/start/dto/PoliceApplyCountDto.java
+34
-0
SlhGajgDmEntity.java
...main/java/com/yxproject/start/entity/SlhGajgDmEntity.java
+0
-53
SysPermissionEntity.java
.../java/com/yxproject/start/entity/SysPermissionEntity.java
+0
-128
SysRoleEntity.java
src/main/java/com/yxproject/start/entity/SysRoleEntity.java
+0
-76
SysRolePermissionEntity.java
...a/com/yxproject/start/entity/SysRolePermissionEntity.java
+0
-53
SysUserRoleEntity.java
...in/java/com/yxproject/start/entity/SysUserRoleEntity.java
+0
-53
TaskStateDicEntity.java
...n/java/com/yxproject/start/entity/TaskStateDicEntity.java
+0
-50
UserInfoEntity.java
src/main/java/com/yxproject/start/entity/UserInfoEntity.java
+0
-115
PoliceStationApplyReasonMapper.java
...xproject/start/mapper/PoliceStationApplyReasonMapper.java
+26
-0
PoliceStationApplyReasonService.java
...roject/start/service/PoliceStationApplyReasonService.java
+8
-0
PoliceStationApplyReasonServiceImpl.java
...art/service/impl/PoliceStationApplyReasonServiceImpl.java
+33
-0
No files found.
src/main/java/com/yxproject/start/api/BizApi.java
View file @
6b2078e8
package
com
.
yxproject
.
start
.
api
;
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.dto.CardsStatusAndCardsMsgDto
;
import
com.yxproject.start.service.PoliceStationApplyReasonService
;
import
com.yxproject.start.dto.CardsStatusAndPostMsgDto
;
import
com.yxproject.start.entity.PersonPostAbnormalEntity
;
import
com.yxproject.start.entity.PersonPostEntity
;
import
com.yxproject.start.entity.PersonalProgressStatusEntity
;
import
com.yxproject.start.service.PersonPostAbnormalService
;
import
com.yxproject.start.service.PersonPostService
;
import
com.yxproject.start.service.PersonalProgressStatusService
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -29,77 +22,20 @@ import java.util.Map;
...
@@ -29,77 +22,20 @@ import java.util.Map;
public
class
BizApi
{
public
class
BizApi
{
@Autowired
@Autowired
private
PersonPostAbnormalService
personPostAbnormalService
;
private
PoliceStationApplyReasonService
policeStationApplyReasonService
;
@Autowired
private
PersonalProgressStatusService
personalProgressStatusService
;
@Autowired
private
PersonPostService
personPostService
;
/**
* 查询个人邮寄信息异常数据
* @param date
* @param police
* @return
*/
@RequestMapping
(
"getErrorPostMsg"
)
public
List
<
PersonPostAbnormalEntity
>
getErrorPostMsg
(
@RequestParam
(
"date"
)
String
date
,
@RequestParam
(
"police"
)
String
police
)
{
List
<
PersonPostAbnormalEntity
>
list
=
personPostAbnormalService
.
getPersonPostAbnormal
(
date
,
police
);
return
list
;
}
/**
/**
* 查询对公邮寄包查询
* 保存派出所申领表数据
* @param date
* @param taskIdList
* @param police
* @return
* @return
*/
*/
@RequestMapping
(
"getCardsPostMsg"
)
@RequestMapping
(
"savePoliceApplicationData"
)
public
List
<
CardsStatusAndPostMsgDto
>
getCardsPostMsg
(
@RequestParam
(
"date"
)
String
date
,
@RequestParam
(
"police"
)
String
police
)
{
public
int
savePoliceApplicationData
(
@RequestBody
String
taskIdList
)
{
List
<
CardsStatusAndPostMsgDto
>
list
=
personalProgressStatusService
.
getStatusAndPostMsg
(
date
,
police
);
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
taskIdList
);
return
list
;
int
i
=
policeStationApplyReasonService
.
getAndSavePoliceStationApplyReason
(
jsonArray
);
return
i
;
}
}
/**
* 通过运单号查询邮寄信息
* @param waybillNumber
* @return
*/
@RequestMapping
(
"getPostMsgByWaybillNo"
)
public
PersonPostEntity
getPostMsgByWaybillNo
(
@RequestParam
(
"waybillNumber"
)
String
waybillNumber
)
{
PersonPostEntity
personPostEntity
=
personPostService
.
getPersonPostMsg
(
waybillNumber
);
return
personPostEntity
;
}
/**
*查询个人证件信息和证件状态
* @param date
* @param police
* @return
*/
@RequestMapping
(
"getCardsStatusAndCardMsg"
)
public
List
<
CardsStatusAndCardsMsgDto
>
getCardsStatusAndCardMsg
(
@RequestParam
(
"date"
)
String
date
,
@RequestParam
(
"police"
)
String
police
)
{
List
<
CardsStatusAndCardsMsgDto
>
list
=
personalProgressStatusService
.
getStatusAndCardMsg
(
date
,
police
);
return
list
;
}
/**
* 签收(修改状态表中的状态)
* @param uploadNoList
* @return
*/
@RequestMapping
(
"setSignInDate"
)
public
Map
<
String
,
String
>
setSignInDate
(
@RequestBody
String
uploadNoList
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
uploadNoList
);
Boolean
flag
=
personalProgressStatusService
.
updateSignInDate
(
jsonArray
);
if
(
flag
){
map
.
put
(
"msg"
,
"修改成功"
);
}
else
{
map
.
put
(
"msg"
,
"修改失败"
);
}
return
map
;
}
}
}
src/main/java/com/yxproject/start/dto/PoliceApplyCountDto.java
0 → 100644
View file @
6b2078e8
package
com
.
yxproject
.
start
.
dto
;
/**
* @author Administrator
*/
public
class
PoliceApplyCountDto
{
private
String
policeStationCode
;
private
String
drawType
;
private
int
applyCount
;
public
String
getPoliceStationCode
()
{
return
policeStationCode
;
}
public
void
setPoliceStationCode
(
String
policeStationCode
)
{
this
.
policeStationCode
=
policeStationCode
;
}
public
String
getDrawType
()
{
return
drawType
;
}
public
void
setDrawType
(
String
drawType
)
{
this
.
drawType
=
drawType
;
}
public
int
getApplyCount
()
{
return
applyCount
;
}
public
void
setApplyCount
(
int
applyCount
)
{
this
.
applyCount
=
applyCount
;
}
}
src/main/java/com/yxproject/start/entity/SlhGajgDmEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.Basic
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"SLH_GAJG_DM"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
SlhGajgDmEntity
{
private
String
gajgDm
;
private
String
slhGajgDm
;
@Basic
@Column
(
name
=
"GAJG_DM"
)
public
String
getGajgDm
()
{
return
gajgDm
;
}
public
void
setGajgDm
(
String
gajgDm
)
{
this
.
gajgDm
=
gajgDm
;
}
@Basic
@Column
(
name
=
"SLH_GAJG_DM"
)
public
String
getSlhGajgDm
()
{
return
slhGajgDm
;
}
public
void
setSlhGajgDm
(
String
slhGajgDm
)
{
this
.
slhGajgDm
=
slhGajgDm
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SlhGajgDmEntity
that
=
(
SlhGajgDmEntity
)
o
;
if
(
gajgDm
!=
null
?
!
gajgDm
.
equals
(
that
.
gajgDm
)
:
that
.
gajgDm
!=
null
)
return
false
;
if
(
slhGajgDm
!=
null
?
!
slhGajgDm
.
equals
(
that
.
slhGajgDm
)
:
that
.
slhGajgDm
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
gajgDm
!=
null
?
gajgDm
.
hashCode
()
:
0
;
result
=
31
*
result
+
(
slhGajgDm
!=
null
?
slhGajgDm
.
hashCode
()
:
0
);
return
result
;
}
}
src/main/java/com/yxproject/start/entity/SysPermissionEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"SYS_PERMISSION"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
SysPermissionEntity
{
private
int
id
;
private
Boolean
available
;
private
String
name
;
private
Long
parentId
;
private
String
parentIds
;
private
String
permission
;
private
String
resourceType
;
private
String
url
;
@Id
@Column
(
name
=
"ID"
)
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
@Basic
@Column
(
name
=
"AVAILABLE"
)
public
Boolean
getAvailable
()
{
return
available
;
}
public
void
setAvailable
(
Boolean
available
)
{
this
.
available
=
available
;
}
@Basic
@Column
(
name
=
"NAME"
)
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"PARENT_ID"
)
public
Long
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Long
parentId
)
{
this
.
parentId
=
parentId
;
}
@Basic
@Column
(
name
=
"PARENT_IDS"
)
public
String
getParentIds
()
{
return
parentIds
;
}
public
void
setParentIds
(
String
parentIds
)
{
this
.
parentIds
=
parentIds
;
}
@Basic
@Column
(
name
=
"PERMISSION"
)
public
String
getPermission
()
{
return
permission
;
}
public
void
setPermission
(
String
permission
)
{
this
.
permission
=
permission
;
}
@Basic
@Column
(
name
=
"RESOURCE_TYPE"
)
public
String
getResourceType
()
{
return
resourceType
;
}
public
void
setResourceType
(
String
resourceType
)
{
this
.
resourceType
=
resourceType
;
}
@Basic
@Column
(
name
=
"URL"
)
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SysPermissionEntity
that
=
(
SysPermissionEntity
)
o
;
if
(
id
!=
that
.
id
)
return
false
;
if
(
available
!=
null
?
!
available
.
equals
(
that
.
available
)
:
that
.
available
!=
null
)
return
false
;
if
(
name
!=
null
?
!
name
.
equals
(
that
.
name
)
:
that
.
name
!=
null
)
return
false
;
if
(
parentId
!=
null
?
!
parentId
.
equals
(
that
.
parentId
)
:
that
.
parentId
!=
null
)
return
false
;
if
(
parentIds
!=
null
?
!
parentIds
.
equals
(
that
.
parentIds
)
:
that
.
parentIds
!=
null
)
return
false
;
if
(
permission
!=
null
?
!
permission
.
equals
(
that
.
permission
)
:
that
.
permission
!=
null
)
return
false
;
if
(
resourceType
!=
null
?
!
resourceType
.
equals
(
that
.
resourceType
)
:
that
.
resourceType
!=
null
)
return
false
;
if
(
url
!=
null
?
!
url
.
equals
(
that
.
url
)
:
that
.
url
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
id
;
result
=
31
*
result
+
(
available
!=
null
?
available
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
name
!=
null
?
name
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
parentId
!=
null
?
parentId
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
parentIds
!=
null
?
parentIds
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
permission
!=
null
?
permission
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
resourceType
!=
null
?
resourceType
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
url
!=
null
?
url
.
hashCode
()
:
0
);
return
result
;
}
}
src/main/java/com/yxproject/start/entity/SysRoleEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"SYS_ROLE"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
SysRoleEntity
{
private
int
id
;
private
Boolean
available
;
private
String
description
;
private
String
role
;
@Id
@Column
(
name
=
"ID"
)
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
@Basic
@Column
(
name
=
"AVAILABLE"
)
public
Boolean
getAvailable
()
{
return
available
;
}
public
void
setAvailable
(
Boolean
available
)
{
this
.
available
=
available
;
}
@Basic
@Column
(
name
=
"DESCRIPTION"
)
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
@Basic
@Column
(
name
=
"ROLE"
)
public
String
getRole
()
{
return
role
;
}
public
void
setRole
(
String
role
)
{
this
.
role
=
role
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SysRoleEntity
that
=
(
SysRoleEntity
)
o
;
if
(
id
!=
that
.
id
)
return
false
;
if
(
available
!=
null
?
!
available
.
equals
(
that
.
available
)
:
that
.
available
!=
null
)
return
false
;
if
(
description
!=
null
?
!
description
.
equals
(
that
.
description
)
:
that
.
description
!=
null
)
return
false
;
if
(
role
!=
null
?
!
role
.
equals
(
that
.
role
)
:
that
.
role
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
id
;
result
=
31
*
result
+
(
available
!=
null
?
available
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
description
!=
null
?
description
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
role
!=
null
?
role
.
hashCode
()
:
0
);
return
result
;
}
}
src/main/java/com/yxproject/start/entity/SysRolePermissionEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.Basic
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"SYS_ROLE_PERMISSION"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
SysRolePermissionEntity
{
private
int
roleId
;
private
int
permissionId
;
@Basic
@Column
(
name
=
"ROLE_ID"
)
public
int
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
int
roleId
)
{
this
.
roleId
=
roleId
;
}
@Basic
@Column
(
name
=
"PERMISSION_ID"
)
public
int
getPermissionId
()
{
return
permissionId
;
}
public
void
setPermissionId
(
int
permissionId
)
{
this
.
permissionId
=
permissionId
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SysRolePermissionEntity
that
=
(
SysRolePermissionEntity
)
o
;
if
(
roleId
!=
that
.
roleId
)
return
false
;
if
(
permissionId
!=
that
.
permissionId
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
roleId
;
result
=
31
*
result
+
permissionId
;
return
result
;
}
}
src/main/java/com/yxproject/start/entity/SysUserRoleEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.Basic
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"SYS_USER_ROLE"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
SysUserRoleEntity
{
private
int
userId
;
private
int
roleId
;
@Basic
@Column
(
name
=
"USER_ID"
)
public
int
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
int
userId
)
{
this
.
userId
=
userId
;
}
@Basic
@Column
(
name
=
"ROLE_ID"
)
public
int
getRoleId
()
{
return
roleId
;
}
public
void
setRoleId
(
int
roleId
)
{
this
.
roleId
=
roleId
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
SysUserRoleEntity
that
=
(
SysUserRoleEntity
)
o
;
if
(
userId
!=
that
.
userId
)
return
false
;
if
(
roleId
!=
that
.
roleId
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
userId
;
result
=
31
*
result
+
roleId
;
return
result
;
}
}
src/main/java/com/yxproject/start/entity/TaskStateDicEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"TASK_STATE_DIC"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
TaskStateDicEntity
{
private
long
taskStateId
;
private
String
taskState
;
@Id
@Column
(
name
=
"TASK_STATE_ID"
)
public
long
getTaskStateId
()
{
return
taskStateId
;
}
public
void
setTaskStateId
(
long
taskStateId
)
{
this
.
taskStateId
=
taskStateId
;
}
@Basic
@Column
(
name
=
"TASK_STATE"
)
public
String
getTaskState
()
{
return
taskState
;
}
public
void
setTaskState
(
String
taskState
)
{
this
.
taskState
=
taskState
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
TaskStateDicEntity
that
=
(
TaskStateDicEntity
)
o
;
if
(
taskStateId
!=
that
.
taskStateId
)
return
false
;
if
(
taskState
!=
null
?
!
taskState
.
equals
(
that
.
taskState
)
:
that
.
taskState
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
(
int
)
(
taskStateId
^
(
taskStateId
>>>
32
));
result
=
31
*
result
+
(
taskState
!=
null
?
taskState
.
hashCode
()
:
0
);
return
result
;
}
}
src/main/java/com/yxproject/start/entity/UserInfoEntity.java
deleted
100644 → 0
View file @
46a955db
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"USER_INFO"
,
schema
=
"AUXILIARY"
,
catalog
=
""
)
public
class
UserInfoEntity
{
private
int
id
;
private
String
name
;
private
String
password
;
private
String
salt
;
private
byte
state
;
private
String
username
;
private
String
workshop
;
@Id
@Column
(
name
=
"ID"
)
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
@Basic
@Column
(
name
=
"NAME"
)
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"PASSWORD"
)
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
@Basic
@Column
(
name
=
"SALT"
)
public
String
getSalt
()
{
return
salt
;
}
public
void
setSalt
(
String
salt
)
{
this
.
salt
=
salt
;
}
@Basic
@Column
(
name
=
"STATE"
)
public
byte
getState
()
{
return
state
;
}
public
void
setState
(
byte
state
)
{
this
.
state
=
state
;
}
@Basic
@Column
(
name
=
"USERNAME"
)
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
@Basic
@Column
(
name
=
"WORKSHOP"
)
public
String
getWorkshop
()
{
return
workshop
;
}
public
void
setWorkshop
(
String
workshop
)
{
this
.
workshop
=
workshop
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
UserInfoEntity
that
=
(
UserInfoEntity
)
o
;
if
(
id
!=
that
.
id
)
return
false
;
if
(
state
!=
that
.
state
)
return
false
;
if
(
name
!=
null
?
!
name
.
equals
(
that
.
name
)
:
that
.
name
!=
null
)
return
false
;
if
(
password
!=
null
?
!
password
.
equals
(
that
.
password
)
:
that
.
password
!=
null
)
return
false
;
if
(
salt
!=
null
?
!
salt
.
equals
(
that
.
salt
)
:
that
.
salt
!=
null
)
return
false
;
if
(
username
!=
null
?
!
username
.
equals
(
that
.
username
)
:
that
.
username
!=
null
)
return
false
;
if
(
workshop
!=
null
?
!
workshop
.
equals
(
that
.
workshop
)
:
that
.
workshop
!=
null
)
return
false
;
return
true
;
}
@Override
public
int
hashCode
()
{
int
result
=
id
;
result
=
31
*
result
+
(
name
!=
null
?
name
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
password
!=
null
?
password
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
salt
!=
null
?
salt
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
int
)
state
;
result
=
31
*
result
+
(
username
!=
null
?
username
.
hashCode
()
:
0
);
result
=
31
*
result
+
(
workshop
!=
null
?
workshop
.
hashCode
()
:
0
);
return
result
;
}
}
src/main/java/com/yxproject/start/mapper/PoliceStationApplyReasonMapper.java
0 → 100644
View file @
6b2078e8
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.dto.PoliceApplyCountDto
;
import
com.yxproject.start.entity.PoliceStationApplyReasonEntity
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* @author Administrator
*/
@Mapper
public
interface
PoliceStationApplyReasonMapper
{
@Select
(
"SELECT SUBSTR(B.UPLOAD_NO,0,9) police_station_code,B.DRAW_TYPE,count(b.UPLOAD_NO) apply_count from GROUP_NO a\n"
+
" LEFT JOIN PROD_APPLY_INFO_T@prod_link b ON a.GROUP_NO=substr(b.ACCEPT_NO,0,8)\n"
+
"WHERE TASK_ID=#{taskId} GROUP BY SUBSTR(B.UPLOAD_NO,0,9),B.DRAW_TYPE"
)
public
List
<
PoliceApplyCountDto
>
getPoliceStationApplyReason
(
@Param
(
"taskId"
)
String
taskId
);
@Insert
(
"INSERT INTO POLICE_STATION_APPLY_REASON(SAVE_DATE,TASK_ID,POLICE_STATION_CODE,APPLY_CODE,APPLY_COUNT)\n"
+
"VALUES(SYSDATE,#{taskId},#{policeStationCode},#{drawType},#{applyCount})"
)
public
int
savePoliceStationApplyReason
(
@Param
(
"taskId"
)
String
taskId
,
@Param
(
"policeStationCode"
)
String
policeStationCode
,
@Param
(
"drawType"
)
String
drawType
,
@Param
(
"applyCount"
)
int
applyCount
);
}
src/main/java/com/yxproject/start/service/PoliceStationApplyReasonService.java
0 → 100644
View file @
6b2078e8
package
com
.
yxproject
.
start
.
service
;
import
net.sf.json.JSONArray
;
public
interface
PoliceStationApplyReasonService
{
public
int
getAndSavePoliceStationApplyReason
(
JSONArray
jsonArray
);
}
src/main/java/com/yxproject/start/service/impl/PoliceStationApplyReasonServiceImpl.java
0 → 100644
View file @
6b2078e8
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.dto.PoliceApplyCountDto
;
import
com.yxproject.start.entity.PoliceStationApplyReasonEntity
;
import
com.yxproject.start.mapper.PoliceStationApplyReasonMapper
;
import
com.yxproject.start.service.PoliceStationApplyReasonService
;
import
net.sf.json.JSONArray
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Service
public
class
PoliceStationApplyReasonServiceImpl
implements
PoliceStationApplyReasonService
{
@Autowired
private
PoliceStationApplyReasonMapper
policeStationApplyReasonMapper
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
getAndSavePoliceStationApplyReason
(
JSONArray
taskIdArray
)
{
int
count
=
0
;
for
(
Object
object:
taskIdArray
){
List
<
PoliceApplyCountDto
>
list
=
policeStationApplyReasonMapper
.
getPoliceStationApplyReason
(
object
.
toString
());
System
.
out
.
println
(
object
.
toString
());
System
.
out
.
println
(
list
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
int
saveCount
=
policeStationApplyReasonMapper
.
savePoliceStationApplyReason
(
object
.
toString
(),
list
.
get
(
i
).
getPoliceStationCode
(),
list
.
get
(
i
).
getDrawType
(),
list
.
get
(
i
).
getApplyCount
());
count
+=
saveCount
;
}
}
return
count
;
}
}
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