Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_REFACTORING
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_REFACTORING
Commits
2747e9c5
Commit
2747e9c5
authored
Oct 29, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
601b1180
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
211 additions
and
13 deletions
+211
-13
ShiroApi.java
src/main/java/com/yxproject/start/api/ShiroApi.java
+42
-1
UserInfoApi.java
src/main/java/com/yxproject/start/api/UserInfoApi.java
+3
-2
PoliceStationVailedInfoEntity.java
...yxproject/start/entity/PoliceStationVailedInfoEntity.java
+90
-0
PoliceStationVailedInfoMapper.java
...yxproject/start/mapper/PoliceStationVailedInfoMapper.java
+31
-0
SysRoleMapper.java
src/main/java/com/yxproject/start/mapper/SysRoleMapper.java
+2
-2
UserInfoMapper.java
src/main/java/com/yxproject/start/mapper/UserInfoMapper.java
+1
-1
UtilMapper.java
src/main/java/com/yxproject/start/mapper/UtilMapper.java
+4
-0
ProductionTaskListService.java
...om/yxproject/start/service/ProductionTaskListService.java
+3
-0
ProductionTaskListServiceImpl.java
...ect/start/service/impl/ProductionTaskListServiceImpl.java
+35
-7
No files found.
src/main/java/com/yxproject/start/api/ShiroApi.java
View file @
2747e9c5
...
...
@@ -6,6 +6,7 @@ import com.yxproject.start.service.SysPermissionService;
import
com.yxproject.start.service.SysRoleService
;
import
com.yxproject.start.service.UserInfoService
;
import
com.yxproject.start.utils.YXJSONResponse
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
...
...
@@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.ws.rs.core.Context
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -225,7 +227,7 @@ public class ShiroApi {
}
/**
*
生成
任务单;
*
保存
任务单;
* @return
*/
@RequestMapping
(
value
=
"/addProductionTaskList"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -293,5 +295,44 @@ public class ShiroApi {
return
"updatePermission"
;
}
/**
* 保存派出所照片质量详情;
* @return
*/
@RequestMapping
(
value
=
"/savePoliceStationVailedInfoEntity"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
savePoliceStationVailedInfoEntity
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
){
String
map
=
"[{\"cyclesheetid\":\"20181016001\",\"invalid_Count\":1,\"police_Station_Code\":\"41108201\",\"police_Station_Vailed_Info_Id\":\"1\",\"sava_Date\":\"20181025\",\"vailed_Count\":1}]"
;
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
map
);
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
=
new
ArrayList
<>();
for
(
Object
object:
jsonArray
)
{
PoliceStationVailedInfoEntity
o
=
(
PoliceStationVailedInfoEntity
)
JSONObject
.
toBean
((
JSONObject
)
object
,
PoliceStationVailedInfoEntity
.
class
);
policeStationVailedInfoEntities
.
add
(
o
);
}
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
productionTaskListService
.
savePoliceStationVailedInfoEntity
(
policeStationVailedInfoEntities
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* test
* @return
*/
@RequestMapping
(
"/test"
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
test
(
@RequestParam
(
"id"
)
String
permissionId
,
@Context
HttpServletResponse
resp
){
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
=
productionTaskListService
.
find
(
permissionId
);
yxjsonResponse
.
outPutSuccess
(
policeStationVailedInfoEntities
);
System
.
out
.
println
(
yxjsonResponse
);
return
yxjsonResponse
.
toJSONString
();
}
}
src/main/java/com/yxproject/start/api/UserInfoApi.java
View file @
2747e9c5
...
...
@@ -27,7 +27,7 @@ import java.util.*;
/**
* @author Administrator
*/
@
Controller
@
Path
(
"user"
)
public
class
UserInfoApi
{
@Autowired
...
...
@@ -42,7 +42,8 @@ public class UserInfoApi {
@Autowired
private
ProductionTaskListService
productionTaskListService
;
@RequestMapping
(
"login"
)
@GET
@Path
(
"login"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
public
Map
<
String
,
Object
>
submitLogin
(
@QueryParam
(
"username"
)
String
username
,
@QueryParam
(
"password"
)
String
password
)
{
Map
<
String
,
Object
>
resultMap
=
new
LinkedHashMap
<
String
,
Object
>();
...
...
src/main/java/com/yxproject/start/entity/PoliceStationVailedInfoEntity.java
0 → 100644
View file @
2747e9c5
package
com
.
yxproject
.
start
.
entity
;
import
javax.persistence.*
;
import
java.util.Objects
;
/**
* Created by zhangyusheng on 2018/10/25 13:38
*/
@Entity
@Table
(
name
=
"POLICE_STATION_VAILED_INFO"
,
schema
=
"DAHAI"
,
catalog
=
""
)
public
class
PoliceStationVailedInfoEntity
{
private
String
police_Station_Vailed_Info_Id
;
private
String
cyclesheetid
;
private
String
police_Station_Code
;
private
Long
vailed_Count
;
private
Long
invalid_Count
;
private
String
sava_Date
;
@Id
@Column
(
name
=
"POLICE_STATION_VAILED_INFO_ID"
,
nullable
=
false
,
length
=
20
)
public
String
getPolice_Station_Vailed_Info_Id
()
{
return
police_Station_Vailed_Info_Id
;
}
public
void
setPolice_Station_Vailed_Info_Id
(
String
police_Station_Vailed_Info_Id
)
{
this
.
police_Station_Vailed_Info_Id
=
police_Station_Vailed_Info_Id
;
}
@Basic
@Column
(
name
=
"CYCLESHEETID"
,
nullable
=
true
,
precision
=
0
)
public
String
getCyclesheetid
()
{
return
cyclesheetid
;
}
public
void
setCyclesheetid
(
String
cyclesheetid
)
{
this
.
cyclesheetid
=
cyclesheetid
;
}
@Basic
@Column
(
name
=
"POLICE_STATION_CODE"
,
nullable
=
true
,
precision
=
0
)
public
String
getPolice_Station_Code
()
{
return
police_Station_Code
;
}
public
void
setPolice_Station_Code
(
String
police_Station_Code
)
{
this
.
police_Station_Code
=
police_Station_Code
;
}
@Basic
@Column
(
name
=
"VAILED_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Long
getVailed_Count
()
{
return
vailed_Count
;
}
public
void
setVailed_Count
(
Long
vailed_Count
)
{
this
.
vailed_Count
=
vailed_Count
;
}
@Basic
@Column
(
name
=
"INVALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Long
getInvalid_Count
()
{
return
invalid_Count
;
}
public
void
setInvalid_Count
(
Long
invalid_Count
)
{
this
.
invalid_Count
=
invalid_Count
;
}
@Basic
@Column
(
name
=
"SAVA_DATE"
,
nullable
=
true
,
length
=
20
)
public
String
getSava_Date
()
{
return
sava_Date
;
}
public
void
setSava_Date
(
String
sava_Date
)
{
this
.
sava_Date
=
sava_Date
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
PoliceStationVailedInfoEntity
that
=
(
PoliceStationVailedInfoEntity
)
o
;
return
Objects
.
equals
(
police_Station_Vailed_Info_Id
,
that
.
police_Station_Vailed_Info_Id
)
&&
Objects
.
equals
(
cyclesheetid
,
that
.
cyclesheetid
)
&&
Objects
.
equals
(
police_Station_Code
,
that
.
police_Station_Code
)
&&
Objects
.
equals
(
vailed_Count
,
that
.
vailed_Count
)
&&
Objects
.
equals
(
invalid_Count
,
that
.
invalid_Count
)
&&
Objects
.
equals
(
sava_Date
,
that
.
sava_Date
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
police_Station_Vailed_Info_Id
,
cyclesheetid
,
police_Station_Code
,
vailed_Count
,
invalid_Count
,
sava_Date
);
}
}
src/main/java/com/yxproject/start/mapper/PoliceStationVailedInfoMapper.java
0 → 100644
View file @
2747e9c5
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.entity.PoliceStationVailedInfoEntity
;
import
org.apache.ibatis.annotations.*
;
import
java.util.List
;
/**
* Created by zhangyusheng on 2018/10/25 13:45
*/
@Mapper
public
interface
PoliceStationVailedInfoMapper
{
/**
* 保存派出所照片质量报表
* @param policeStationVailedInfoEntity
* @return
*/
@Insert
(
"INSERT INTO POLICE_STATION_VAILED_INFO (POLICE_STATION_VAILED_INFO_ID,CYCLESHEETID,POLICE_STATION_CODE,VAILED_COUNT,INVALID_COUNT,SAVA_DATE) "
+
"values (#{police_Station_Vailed_Info_Id},#{cyclesheetid},#{police_Station_Code},#{vailed_Count},#{invalid_Count},#{sava_Date})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"police_Station_Vailed_Info_Id"
,
keyColumn
=
"police_Station_Vailed_Info_Id"
)
public
void
savePoliceStationVailedInfoEntity
(
PoliceStationVailedInfoEntity
policeStationVailedInfoEntity
);
@Select
(
"select * from POLICE_STATION_VAILED_INFO WHERE POLICE_STATION_VAILED_INFO_ID=#{id}"
)
@Results
({
@Result
(
property
=
"police_Station_Vailed_Info_Id"
,
column
=
"police_Station_Vailed_Info_Id"
),
@Result
(
property
=
"cyclesheetid"
,
column
=
"cyclesheetid"
),
@Result
(
property
=
"police_Station_Code"
,
column
=
"police_Station_Code"
),
@Result
(
property
=
"vailed_Count"
,
column
=
"vailed_Count"
),
@Result
(
property
=
"invalid_Count"
,
column
=
"invalid_Count"
),
@Result
(
property
=
"sava_Date"
,
column
=
"sava_Date"
)})
public
List
<
PoliceStationVailedInfoEntity
>
findPoliceStationVailedInfoEntityByID
(
String
id
);
}
src/main/java/com/yxproject/start/mapper/SysRoleMapper.java
View file @
2747e9c5
...
...
@@ -15,7 +15,7 @@ public interface SysRoleMapper {
* 添加角色
* @param sysRole
*/
@Insert
(
"INSERT INTO
DAHAI.
SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE)\n"
+
@Insert
(
"INSERT INTO SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE)\n"
+
"VALUES(PERMISSION_seq.nextval,0,#{description},#{role})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
,
keyColumn
=
"id"
)
public
void
addRoleByMap
(
SysRole
sysRole
);
...
...
@@ -25,7 +25,7 @@ public interface SysRoleMapper {
* @param roleId
* @param permissionId
*/
@Insert
(
"INSERT INTO
DAHAI.
SYS_ROLE_PERMISSION(ROLE_ID,PERMISSION_ID)VALUES(#{roleId},#{permissionId})"
)
@Insert
(
"INSERT INTO SYS_ROLE_PERMISSION(ROLE_ID,PERMISSION_ID)VALUES(#{roleId},#{permissionId})"
)
public
void
addRolePermission
(
@Param
(
"roleId"
)
Integer
roleId
,
@Param
(
"permissionId"
)
Integer
permissionId
);
/**
...
...
src/main/java/com/yxproject/start/mapper/UserInfoMapper.java
View file @
2747e9c5
...
...
@@ -15,7 +15,7 @@ public interface UserInfoMapper {
* @param userinfo
* @return
*/
@Insert
(
"INSERT INTO
DAHAI.
USER_INFO(ID, NAME, PASSWORD, STATE, USERNAME, SALT) "
+
@Insert
(
"INSERT INTO USER_INFO(ID, NAME, PASSWORD, STATE, USERNAME, SALT) "
+
"VALUES(USER_INFO_seq.nextval,#{name},#{password},0,#{username},#{salt})\n"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
,
keyColumn
=
"id"
)
public
void
saveUserInfo
(
UserInfo
userinfo
);
...
...
src/main/java/com/yxproject/start/mapper/UtilMapper.java
View file @
2747e9c5
...
...
@@ -17,4 +17,8 @@ public interface UtilMapper {
* 查询组号信息序列值
*/
public
int
findGroupInfoSequenceNextValue
();
/**
* 查询派出所照片质量表序列值
*/
public
int
findPoliceStationVailedSequenceNextValue
();
}
src/main/java/com/yxproject/start/service/ProductionTaskListService.java
View file @
2747e9c5
...
...
@@ -2,6 +2,7 @@ package com.yxproject.start.service;
import
com.yxproject.start.entity.GroupinfoEntity
;
import
com.yxproject.start.entity.PoliceStationVailedInfoEntity
;
import
com.yxproject.start.entity.ProductionTaskListEntity
;
import
java.util.List
;
...
...
@@ -14,6 +15,8 @@ public interface ProductionTaskListService {
public
int
addQuickCyclesheetInfo
(
String
acceptNo
);
public
List
<
Object
>
findCardInfoByCardIDOrAcceptNo
(
String
cardInfo
);
public
List
<
Object
>
findAccuProductionInfo
(
String
importDate
);
public
int
savePoliceStationVailedInfoEntity
(
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
);
public
List
<
PoliceStationVailedInfoEntity
>
find
(
String
id
);
}
src/main/java/com/yxproject/start/service/impl/ProductionTaskListServiceImpl.java
View file @
2747e9c5
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.GroupinfoEntity
;
import
com.yxproject.start.entity.PoliceStationVailedInfoEntity
;
import
com.yxproject.start.entity.ProductionTaskListEntity
;
import
com.yxproject.start.entity.accu.AccCardTEntity
;
import
com.yxproject.start.entity.prod.ProdCardTEntity
;
...
...
@@ -31,11 +32,16 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
@Autowired
public
UtilMapper
utilMapper
;
@Autowired
public
AccCardTMapper
accCardTMapper
;
@Autowired
public
ProdCardTMapper
prodCardTMapper
;
@Autowired
public
PoliceStationVailedInfoMapper
policeStationVailedInfoMapper
;
/**
* 查询任务单
* 通过任务单ID
...
...
@@ -108,8 +114,6 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
accept_no
=
prodCardTEntity
.
getAccept_No
()
;
}
}
List
<
Map
<
String
,
Object
>>
accGroupTEntityByCardIdOrAcceptNo
=
accCardTMapper
.
findAccGroupTEntityByCardIdOrAcceptNo
(
accept_no
);
System
.
out
.
println
(
accGroupTEntityByCardIdOrAcceptNo
);
List
<
ProductionTaskListEntity
>
productionTaskListEntityByAcceptNo
=
productionTaskListMapper
.
findProductionTaskListEntityByAcceptNo
(
accept_no
);
list
.
addAll
(
productionTaskListEntityByAcceptNo
);
return
list
;
...
...
@@ -282,13 +286,9 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
groupinfoEntity
.
setGrouptype
((
long
)
1
);
groupinfoMapper
.
updateGroupinfoEntity
(
groupinfoEntity
);
}
}
}
return
0
;
return
1
;
}
/**
...
...
@@ -302,4 +302,32 @@ public class ProductionTaskListServiceImpl implements ProductionTaskListService
public
List
<
Object
>
findAccuProductionInfo
(
String
importDate
)
{
return
new
ArrayList
<>();
}
/**
* 保持派出所照片质量详情
* @param policeStationVailedInfoEntities
* @return
*/
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
savePoliceStationVailedInfoEntity
(
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
)
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
for
(
PoliceStationVailedInfoEntity
policeEntity:
policeStationVailedInfoEntities
)
{
int
policeStationVailedSequenceNextValue
=
utilMapper
.
findPoliceStationVailedSequenceNextValue
();
policeEntity
.
setPolice_Station_Vailed_Info_Id
(
simpleDateFormat
.
format
(
new
Date
())+
policeStationVailedSequenceNextValue
);
policeStationVailedInfoMapper
.
savePoliceStationVailedInfoEntity
(
policeEntity
);
}
return
1
;
}
/**
* 测试查询
* @param id
* @return
*/
@Override
public
List
<
PoliceStationVailedInfoEntity
>
find
(
String
id
)
{
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntityByID
=
policeStationVailedInfoMapper
.
findPoliceStationVailedInfoEntityByID
(
id
);
return
policeStationVailedInfoEntityByID
;
}
}
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