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
77a372e3
Commit
77a372e3
authored
Nov 02, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加查询区县列表
添加下载装箱单
parent
5ff0201b
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1042 additions
and
83 deletions
+1042
-83
ShiroApi.java
src/main/java/com/yxproject/start/api/ShiroApi.java
+77
-64
UserInfoApi.java
src/main/java/com/yxproject/start/api/UserInfoApi.java
+772
-1
FailedinfoEntity.java
...ain/java/com/yxproject/start/entity/FailedinfoEntity.java
+2
-3
GroupinfoEntity.java
...main/java/com/yxproject/start/entity/GroupinfoEntity.java
+3
-1
PoliceStationVailedInfoEntity.java
...yxproject/start/entity/PoliceStationVailedInfoEntity.java
+7
-1
AccCardTEntity.java
.../java/com/yxproject/start/entity/accu/AccCardTEntity.java
+10
-0
AccGroupRelationTEntity.java
.../yxproject/start/entity/accu/AccGroupRelationTEntity.java
+5
-0
AccGroupTEntity.java
...java/com/yxproject/start/entity/accu/AccGroupTEntity.java
+8
-0
ProdApplyInfoTEntity.java
...com/yxproject/start/entity/prod/ProdApplyInfoTEntity.java
+9
-1
ProdGroupTEntity.java
...ava/com/yxproject/start/entity/prod/ProdGroupTEntity.java
+22
-0
ProdTraceTEntity.java
...ava/com/yxproject/start/entity/prod/ProdTraceTEntity.java
+14
-0
FailedinfoMapper.java
...ain/java/com/yxproject/start/mapper/FailedinfoMapper.java
+1
-2
GroupinfoMapper.java
...main/java/com/yxproject/start/mapper/GroupinfoMapper.java
+11
-0
GroupinfoService.java
...in/java/com/yxproject/start/service/GroupinfoService.java
+13
-0
ProductionTaskListService.java
...om/yxproject/start/service/ProductionTaskListService.java
+12
-5
GroupinfoServiceImpl.java
...om/yxproject/start/service/impl/GroupinfoServiceImpl.java
+65
-0
UtilServiceImpl.java
...ava/com/yxproject/start/service/impl/UtilServiceImpl.java
+0
-1
GroupinfoMapper.xml
src/main/resources/mapper/GroupinfoMapper.xml
+11
-4
No files found.
src/main/java/com/yxproject/start/api/ShiroApi.java
View file @
77a372e3
...
...
@@ -51,22 +51,22 @@ public class ShiroApi {
@Autowired
private
FailedinfoService
failedinfoService
;
@RequestMapping
(
value
={
"/"
,
"/index"
})
public
String
index
(
Map
<
String
,
Object
>
map
)
{
@RequestMapping
(
value
=
{
"/"
,
"/index"
})
public
String
index
(
Map
<
String
,
Object
>
map
)
{
System
.
out
.
println
(
"HomeController.index()"
);
//获取到用户信息;
Subject
subject
=
SecurityUtils
.
getSubject
();
Subject
subject
=
SecurityUtils
.
getSubject
();
UserInfo
ui
=
(
UserInfo
)
subject
.
getPrincipal
();
map
.
put
(
"userInfo"
,
ui
);
map
.
put
(
"userInfo"
,
ui
);
return
"/index"
;
}
@RequestMapping
(
"/welcome"
)
public
String
welcome
(
Map
<
String
,
Object
>
map
)
{
public
String
welcome
(
Map
<
String
,
Object
>
map
)
{
//获取到用户信息;
Subject
subject
=
SecurityUtils
.
getSubject
();
Subject
subject
=
SecurityUtils
.
getSubject
();
UserInfo
ui
=
(
UserInfo
)
subject
.
getPrincipal
();
map
.
put
(
"userInfo"
,
ui
);
map
.
put
(
"userInfo"
,
ui
);
return
"/welcome"
;
}
...
...
@@ -85,9 +85,9 @@ public class ShiroApi {
msg
=
"密码不正确!"
;
}
else
if
(
"kaptchaValidateFailed"
.
equals
(
exception
))
{
msg
=
"验证码错误!"
;
}
else
if
(
AuthenticationException
.
class
.
getName
().
equals
(
exception
))
{
}
else
if
(
AuthenticationException
.
class
.
getName
().
equals
(
exception
))
{
msg
=
"用户名密码不能为空!"
;
}
else
{
}
else
{
msg
=
exception
;
}
}
...
...
@@ -99,109 +99,120 @@ public class ShiroApi {
/**
* 角色添加;
*
* @return
*/
@RequestMapping
(
"/roleAdd"
)
@RequiresPermissions
(
"role.add"
)
//权限管理;
public
String
roleAdd
(
Map
<
String
,
Object
>
map
)
{
Subject
subject
=
SecurityUtils
.
getSubject
();
public
String
roleAdd
(
Map
<
String
,
Object
>
map
)
{
Subject
subject
=
SecurityUtils
.
getSubject
();
UserInfo
ui
=
(
UserInfo
)
subject
.
getPrincipal
();
map
.
put
(
"userInfo"
,
ui
);
map
.
put
(
"userInfo"
,
ui
);
return
"roleAdd"
;
}
/**
* 权限添加;
*
* @return
*/
@RequestMapping
(
"/permissionAdd"
)
@RequiresPermissions
(
"permission.add"
)
//权限管理;
public
String
permissionAdd
(
Map
<
String
,
Object
>
map
)
{
public
String
permissionAdd
(
Map
<
String
,
Object
>
map
)
{
List
<
SysPermission
>
permissionList
=
sysPermissionService
.
getAllActivePermission
();
map
.
put
(
"permissionList"
,
permissionList
);
map
.
put
(
"permissionList"
,
permissionList
);
return
"permissionAdd"
;
}
/**
* 用户添加;
*
* @return
*/
@RequestMapping
(
"/userAdd"
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
public
String
userInfoAdd
(
Map
<
String
,
Object
>
map
)
{
public
String
userInfoAdd
(
Map
<
String
,
Object
>
map
)
{
List
<
SysRole
>
list
=
sysRoleService
.
getAllActiveRoleInfo
();
map
.
put
(
"activeRoleList"
,
list
);
map
.
put
(
"activeRoleList"
,
list
);
return
"userInfoAdd"
;
}
/**
* 用户查询.
*
* @return
*/
@RequestMapping
(
"/userList"
)
@RequiresPermissions
(
"userInfo.view"
)
//权限管理;
public
String
userInfo
(
Map
<
String
,
Object
>
map
)
{
List
<
UserInfo
>
list
=
userInfoService
.
getAllUserInfo
();
map
.
put
(
"userInfoList"
,
list
);
public
String
userInfo
(
Map
<
String
,
Object
>
map
)
{
List
<
UserInfo
>
list
=
userInfoService
.
getAllUserInfo
();
map
.
put
(
"userInfoList"
,
list
);
return
"userInfo"
;
}
/**
* 角色查询.
*
* @return
*/
@RequestMapping
(
"/roleList"
)
@RequiresPermissions
(
"userInfo.view"
)
//权限管理;
public
String
roleList
(
Map
<
String
,
Object
>
map
)
{
public
String
roleList
(
Map
<
String
,
Object
>
map
)
{
List
<
SysRole
>
list
=
sysRoleService
.
getAllRoleInfo
();
map
.
put
(
"roleInfoList"
,
list
);
map
.
put
(
"roleInfoList"
,
list
);
return
"roleInfo"
;
}
/**
* 权限查询.
*
* @return
*/
@RequestMapping
(
"/permissionList"
)
@RequiresPermissions
(
"userInfo.view"
)
//权限管理;
public
String
permissionList
(
Map
<
String
,
Object
>
map
)
{
public
String
permissionList
(
Map
<
String
,
Object
>
map
)
{
List
<
SysPermission
>
list
=
sysPermissionService
.
getAllPermission
();
map
.
put
(
"permissionList"
,
list
);
map
.
put
(
"permissionList"
,
list
);
return
"permissionInfo"
;
}
/**
* 修改用户.
*
* @return
*/
@RequestMapping
(
"/updateUserInfo"
)
public
String
updateUserInfo
(
@RequestParam
(
"userId"
)
String
userId
,
Map
<
String
,
Object
>
map
)
{
public
String
updateUserInfo
(
@RequestParam
(
"userId"
)
String
userId
,
Map
<
String
,
Object
>
map
)
{
UserInfo
userInfo
=
userInfoService
.
getUserInfoByUserId
(
Integer
.
parseInt
(
userId
));
List
<
SysRole
>
roleList
=
sysRoleService
.
getAllRoleInfo
();
map
.
put
(
"userInfo"
,
userInfo
);
map
.
put
(
"roleList"
,
roleList
);
map
.
put
(
"userInfo"
,
userInfo
);
map
.
put
(
"roleList"
,
roleList
);
return
"updateUserInfo"
;
}
/**
* 修改角色
*
* @return
*/
@RequestMapping
(
"/updateRoleInfo"
)
public
String
updateRoleInfo
(
@RequestParam
(
"roleId"
)
String
roleId
,
Map
<
String
,
Object
>
map
)
{
public
String
updateRoleInfo
(
@RequestParam
(
"roleId"
)
String
roleId
,
Map
<
String
,
Object
>
map
)
{
SysRole
sysRole
=
sysRoleService
.
getRoleByRoleId
(
Integer
.
parseInt
(
roleId
));
List
<
SysPermission
>
permissionList
=
sysPermissionService
.
getAllActivePermission
();
map
.
put
(
"sysRole"
,
sysRole
);
map
.
put
(
"permissionList"
,
permissionList
);
map
.
put
(
"sysRole"
,
sysRole
);
map
.
put
(
"permissionList"
,
permissionList
);
return
"updateRoleInfo"
;
}
/**
* 查询任务单;
*
* @return
*/
@RequestMapping
(
value
=
"/getProductionTaskListByID"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getProductionTaskListByID"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.del"
)
//权限管理;
@ResponseBody
public
String
getProductionTaskListByID
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
public
String
getProductionTaskListByID
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
List
<
ProductionTaskListEntity
>
productionTaskListEntity
=
productionTaskListService
.
findProductionTaskListEntityByID
(
id
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
...
...
@@ -214,52 +225,55 @@ public class ShiroApi {
/**
* 更新任务单;
*
* @return
*/
@RequestMapping
(
value
=
"/updateProductionTask"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateProductionTask"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
updateProductionTask
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
String
map
=
"{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} "
;
public
String
updateProductionTask
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
String
map
=
"{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
ProductionTaskListEntity
productionTaskListEntity
=
(
ProductionTaskListEntity
)
jsonObject
.
toBean
(
jsonObject
,
ProductionTaskListEntity
.
class
);
ProductionTaskListEntity
productionTaskListEntity
=
(
ProductionTaskListEntity
)
jsonObject
.
toBean
(
jsonObject
,
ProductionTaskListEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
productionTaskListService
.
updateProductionTask
(
productionTaskListEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 保存任务单;
*
* @return
*/
@RequestMapping
(
value
=
"/addProductionTaskList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/addProductionTaskList"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
addProductionTaskList
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
String
map
=
"{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}"
;
public
String
addProductionTaskList
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
String
map
=
"{\"productionTaskListId\":\"20181016001\",\"makeType\":4,\"oldMakeType\":7}"
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
Object
productionTaskList
=
jsonObject
.
get
(
"productionTaskList"
);
Object
groupInfoList
=
jsonObject
.
get
(
"groupInfoList"
);
List
<
GroupinfoEntity
>
groupinfoEntities
=
(
List
<
GroupinfoEntity
>)
groupInfoList
;
ProductionTaskListEntity
productionTaskListEntity
=
(
ProductionTaskListEntity
)
productionTaskList
;
List
<
GroupinfoEntity
>
groupinfoEntities
=
(
List
<
GroupinfoEntity
>)
groupInfoList
;
ProductionTaskListEntity
productionTaskListEntity
=
(
ProductionTaskListEntity
)
productionTaskList
;
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
productionTaskListService
.
addProductionTaskListEntity
(
productionTaskListEntity
,
groupinfoEntities
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
int
i
=
productionTaskListService
.
addProductionTaskListEntity
(
productionTaskListEntity
,
groupinfoEntities
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 查询证件信息;
*
* @return
*/
@RequestMapping
(
value
=
"/findCardInfoByCardIDOrAcceptNo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/findCardInfoByCardIDOrAcceptNo"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
findCardInfoByCardIDOrAcceptNo
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
public
String
findCardInfoByCardIDOrAcceptNo
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
...
...
@@ -270,69 +284,70 @@ public class ShiroApi {
/**
* 添加快证任务单;
*
* @return
*/
@RequestMapping
(
value
=
"/addQuickCyclesheetInfo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/addQuickCyclesheetInfo"
,
method
=
RequestMethod
.
GET
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
addQuickCyclesheetInfo
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
public
String
addQuickCyclesheetInfo
(
@RequestParam
(
"id"
)
String
id
,
@Context
HttpServletResponse
resp
)
{
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
productionTaskListService
.
addQuickCyclesheetInfo
(
id
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 修改权限
*
* @return
*/
@RequestMapping
(
"/updatePermission"
)
public
String
updatePermission
(
@RequestParam
(
"permissionId"
)
String
permissionId
,
Map
<
String
,
Object
>
map
)
{
public
String
updatePermission
(
@RequestParam
(
"permissionId"
)
String
permissionId
,
Map
<
String
,
Object
>
map
)
{
SysPermission
sysPermission
=
sysPermissionService
.
getPermissionByPId
(
Integer
.
parseInt
(
permissionId
));
String
parentName
=
sysPermissionService
.
getParentNameByParentId
(
sysPermission
.
getParent_id
());
List
<
SysPermission
>
permissionList
=
sysPermissionService
.
getAllActivePermission
();
map
.
put
(
"sysPermission"
,
sysPermission
);
map
.
put
(
"parentName"
,
parentName
);
map
.
put
(
"permissionList"
,
permissionList
);
map
.
put
(
"sysPermission"
,
sysPermission
);
map
.
put
(
"parentName"
,
parentName
);
map
.
put
(
"permissionList"
,
permissionList
);
return
"updatePermission"
;
}
/**
* 保存派出所照片质量详情;
*
* @return
*/
@RequestMapping
(
value
=
"/savePoliceStationVailedInfoEntity"
,
method
=
RequestMethod
.
GET
)
@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}]"
;
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
);
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
+
"添加成功"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"添加成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* test
*
* @return
*/
@RequestMapping
(
"/test"
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
@ResponseBody
public
String
test
(
@RequestParam
(
"id"
)
String
permissionId
,
@Context
HttpServletResponse
resp
)
{
public
String
test
(
@RequestParam
(
"id"
)
String
permissionId
,
@Context
HttpServletResponse
resp
)
{
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
=
productionTaskListService
.
find
(
permissionId
);
...
...
@@ -342,6 +357,4 @@ public class ShiroApi {
}
}
src/main/java/com/yxproject/start/api/UserInfoApi.java
View file @
77a372e3
...
...
@@ -6,6 +6,9 @@ import com.yxproject.start.utils.Md5Utils;
import
com.yxproject.start.utils.YXJSONResponse
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang.time.DateFormatUtils
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.authc.IncorrectCredentialsException
;
import
org.apache.shiro.authc.UnknownAccountException
;
...
...
@@ -21,6 +24,8 @@ import javax.servlet.http.HttpServletResponse;
import
javax.ws.rs.*
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.MediaType
;
import
java.io.*
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -45,6 +50,8 @@ public class UserInfoApi {
@Autowired
private
FailedinfoService
failedinfoService
;
@Autowired
private
GroupinfoService
groupinfoService
;
@GET
@Path
(
"login"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
...
...
@@ -464,6 +471,770 @@ public class UserInfoApi {
return
yxjsonResponse
.
toJSONString
();
}
/**
* 查询区县列表详情;
* @return
*/
@GET
@Path
(
"findProdCountyList"
)
@Produces
(
MediaType
.
APPLICATION_JSON
)
@RequiresPermissions
(
"userInfo.add"
)
//权限管理;
public
String
findProdCountyList
(
@RequestParam
(
"cyclesheetID"
)
String
cyclesheetID
,
@Context
HttpServletResponse
resp
){
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
List
<
Map
<
String
,
Object
>>
countyInfoList
=
groupinfoService
.
findCountyInfoList
(
cyclesheetID
);
yxjsonResponse
.
outPutSuccess
(
countyInfoList
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 打印装箱单
*/
@GET
@Path
(
"printPackingList"
)
@Produces
(
MediaType
.
APPLICATION_OCTET_STREAM
)
@Consumes
(
MediaType
.
APPLICATION_JSON
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
byte
[]
printPackingList
(
@QueryParam
(
"cyclesheetID"
)
String
cyclesheetID
,
@Context
HttpServletResponse
response
)
{
// cyclesheetID ="20180802032";
response
.
setContentType
(
"application/x-download"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
String
dateTime
=
DateFormatUtils
.
format
(
new
Date
(),
"yyyyMMddHH"
);
// //使用Servlet实现文件下载的时候,避免浏览器自动打开文件
String
fout
=
null
;
List
<
Map
<
String
,
Object
>>
countyInfoList
=
groupinfoService
.
findCountyInfoList
(
cyclesheetID
);
List
<
ProductionTaskListEntity
>
productionTaskListEntityList
=
productionTaskListService
.
findProductionTaskListEntityByID
(
cyclesheetID
);
fout
=
exportExcel
(
countyInfoList
,
productionTaskListEntityList
.
get
(
0
).
getMake_Type
()+
""
,
productionTaskListEntityList
.
get
(
0
).
getWorkshop
(),
6000
,
productionTaskListEntityList
.
get
(
0
).
getCitycode
()
,
dateTime
,
cyclesheetID
);
String
outFile
=
dateTime
+
productionTaskListEntityList
.
get
(
0
).
getCitycode
()
+
"二代身份证统计表"
;
try
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
fout
));
byte
[]
b
=
new
byte
[
fis
.
available
()];
fis
.
read
(
b
);
fis
.
close
();
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
outFile
+
".xls"
);
return
b
;
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 下载装箱单
*
* @param countyInfoList 装箱单信息
* @param typeName 制证类型
* @param workShop 制证车间
* @param sum 总数
* @param cityName 地市
*/
private
String
exportExcel
(
List
<
Map
<
String
,
Object
>>
countyInfoList
,
String
typeName
,
String
workShop
,
int
sum
,
String
cityName
,
String
permanentPositionDate
,
String
cyclesheetid
)
{
if
(
typeName
.
contains
(
"null"
)){
typeName
=
typeName
.
replace
(
"null"
,
""
);
}
//第一步创建workbook
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
HSSFSheet
sheet
=
wb
.
createSheet
(
"二代身份证统计表"
);
sheet
.
setColumnWidth
(
0
,
(
int
)
30
*
100
);
sheet
.
setColumnWidth
(
1
,
(
int
)
30
*
70
);
sheet
.
setColumnWidth
(
2
,
(
int
)
30
*
80
);
sheet
.
setColumnWidth
(
3
,
(
int
)
30
*
50
);
sheet
.
setColumnWidth
(
4
,
(
int
)
30
*
110
);
HSSFPrintSetup
ps
=
sheet
.
getPrintSetup
();
ps
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
ps
.
setPaperSize
(
HSSFPrintSetup
.
B5_PAPERSIZE
);
//纸张
sheet
.
setColumnWidth
(
0
,
(
int
)
35.7
*
100
);
//第三步创建行row:添加表头0行
HSSFRow
row
=
sheet
.
createRow
(
0
);
HSSFCellStyle
style
=
wb
.
createCellStyle
();
//样式
style
.
setVerticalAlignment
(
HSSFCellStyle
.
ALIGN_LEFT
);
//设置垂直居中
style
.
setAlignment
(
HSSFCellStyle
.
ALIGN_LEFT
);
style
.
setWrapText
(
true
);
//设置自动换行
style
.
setBorderBottom
(
HSSFCellStyle
.
BORDER_THIN
);
//下边框
style
.
setBorderLeft
(
HSSFCellStyle
.
BORDER_THIN
);
//左边框
style
.
setBorderTop
(
HSSFCellStyle
.
BORDER_THIN
);
//上边框
style
.
setBorderRight
(
HSSFCellStyle
.
BORDER_THIN
);
//右边框
HSSFFont
font
=
wb
.
createFont
();
font
.
setFontHeightInPoints
((
short
)
12
);
style
.
setFont
(
font
);
HSSFCellStyle
style2
=
wb
.
createCellStyle
();
//表头样式
style2
.
setVerticalAlignment
(
HSSFCellStyle
.
VERTICAL_CENTER
);
//设置垂直居中
style2
.
setAlignment
(
HSSFCellStyle
.
ALIGN_CENTER
);
HSSFFont
font2
=
wb
.
createFont
();
font2
.
setBoldweight
(
HSSFFont
.
BOLDWEIGHT_BOLD
);
//粗体显示
font2
.
setFontHeightInPoints
((
short
)
14
);
style2
.
setFont
(
font2
);
row
=
sheet
.
createRow
(
0
);
//创建下标为0的单元格
row
.
setHeightInPoints
(
Short
.
parseShort
(
"20"
));
//设置行高
HSSFCell
cell
=
row
.
createCell
(
0
);
//设定值
cell
.
setCellValue
(
"二代身份证统计表"
);
cell
.
setCellStyle
(
style2
);
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
cell
=
row
.
createCell
(
i
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style2
);
}
CellRangeAddress
callRangeAddress
=
new
CellRangeAddress
(
0
,
0
,
0
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangeAddress
);
row
=
sheet
.
createRow
(
1
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"单位"
);
//设定值
cell
.
setCellStyle
(
style
);
//内容居中
cell
=
row
.
createCell
(
1
);
//第二个单元格
cell
.
setCellValue
(
"数量"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
//第三个单元格
cell
.
setCellValue
(
"质检号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
//第四个单元格
cell
.
setCellValue
(
"盒数"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
//第五个单元格
cell
.
setCellValue
(
"入库日期"
);
cell
.
setCellStyle
(
style
);
row
=
sheet
.
createRow
(
2
);
//i+2行之后开始创建
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
cityName
);
cell
.
setCellStyle
(
style
);
for
(
int
i
=
0
;
i
<
4
;
i
++)
{
cell
=
row
.
createCell
(
i
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
//第五步插入数据
int
num
=
0
;
for
(
int
i
=
0
;
i
<
countyInfoList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
countyInfoList
.
get
(
i
);
//创建行
row
=
sheet
.
createRow
(
i
+
3
);
//i+2行之后开始创建
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
((
String
)
map
.
get
(
"countyName"
));
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
map
.
get
(
"download"
).
toString
().
equals
(
"0"
)
?
""
:
map
.
get
(
"download"
).
toString
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(((
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
/
250
+
1
))
+
""
);
num
+=
((
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
).
toString
())
/
250
+
1
));
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
if
(
countyInfoList
.
size
()
<
16
)
{
for
(
int
i
=
0
;
i
<=
16
-
countyInfoList
.
size
();
i
++)
{
//创建行
row
=
sheet
.
createRow
(
countyInfoList
.
size
()
+
3
+
i
);
// 行之后开始创建
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
for
(
int
j
=
0
;
j
<
5
;
j
++)
{
cell
=
row
.
createCell
(
j
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
}
row
=
sheet
.
createRow
(
18
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"合计"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
sum
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"制证车间"
);
cell
.
setCellStyle
(
style
);
if
(
"p1"
.
equals
(
workShop
)
||
"p3"
.
equals
(
workShop
))
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
" 平 一 "
);
cell
.
setCellStyle
(
style2
);
}
else
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平二"
);
cell
.
setCellStyle
(
style2
);
}
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
num
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
permanentPositionDate
);
cell
.
setCellStyle
(
style
);
row
=
sheet
.
createRow
(
19
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"类型"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
typeName
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
cell
=
row
.
createCell
(
j
+
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
CellRangeAddress
callRangeNum1
=
new
CellRangeAddress
(
19
,
19
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangeNum1
);
row
=
sheet
.
createRow
(
20
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"32"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"循环单"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
cyclesheetid
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
cell
=
row
.
createCell
(
j
+
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
CellRangeAddress
callRangeNum
=
new
CellRangeAddress
(
20
,
20
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangeNum
);
row
=
sheet
.
createRow
(
21
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"出库日期"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"20 年 月 日"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangedate
=
new
CellRangeAddress
(
21
,
21
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangedate
);
}
if
(
countyInfoList
.
size
()
>=
16
)
{
row
=
sheet
.
createRow
(
countyInfoList
.
size
()
+
3
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"合计"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
sum
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"制证车间"
);
cell
.
setCellStyle
(
style
);
if
(
"p1"
.
equals
(
workShop
)
||
"p3"
.
equals
(
workShop
))
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平一"
);
cell
.
setCellStyle
(
style
);
}
else
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平二"
);
cell
.
setCellStyle
(
style
);
}
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
num
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
permanentPositionDate
);
cell
.
setCellStyle
(
style
);
row
=
sheet
.
createRow
(
countyInfoList
.
size
()
+
4
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"类型"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
typeName
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
cell
=
row
.
createCell
(
j
+
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
row
=
sheet
.
createRow
(
countyInfoList
.
size
()
+
5
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"32"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"循环单"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
cyclesheetid
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
cell
=
row
.
createCell
(
j
+
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
CellRangeAddress
callRangeNum
=
new
CellRangeAddress
(
countyInfoList
.
size
()
+
5
,
countyInfoList
.
size
()
+
5
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangeNum
);
row
=
sheet
.
createRow
(
countyInfoList
.
size
()
+
6
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"出库日期"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"20 年 月 日"
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
3
;
j
++)
{
cell
=
row
.
createCell
(
j
+
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
CellRangeAddress
callRangedate
=
new
CellRangeAddress
(
countyInfoList
.
size
()
+
6
,
countyInfoList
.
size
()
+
6
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangedate
);
}
//创建分单
//创建辖区合单
HSSFSheet
mergeSheet
=
wb
.
createSheet
(
"辖区合单"
);
mergeSheet
.
setColumnWidth
(
0
,
(
int
)
30
*
115
);
mergeSheet
.
setColumnWidth
(
1
,
(
int
)
30
*
70
);
mergeSheet
.
setColumnWidth
(
2
,
(
int
)
30
*
80
);
mergeSheet
.
setColumnWidth
(
3
,
(
int
)
30
*
50
);
mergeSheet
.
setColumnWidth
(
4
,
(
int
)
30
*
110
);
HSSFPrintSetup
ps1
=
mergeSheet
.
getPrintSetup
();
ps1
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
ps1
.
setPaperSize
(
HSSFPrintSetup
.
B5_PAPERSIZE
);
//纸张
//计算合单的行数
int
lineNum
=
0
;
//计算合单的总数
int
mergeSum
=
0
;
//计算合单的盒数
int
boxNum
=
0
;
for
(
int
a
=
0
;
a
<
countyInfoList
.
size
();
a
++)
{
Map
<
String
,
Object
>
map
=
countyInfoList
.
get
(
a
);
//第二步创建sheet
if
(
map
.
get
(
"countyName"
).
toString
().
contains
(
"区"
))
{
//第三步创建行row:添加表头0行
row
=
mergeSheet
.
createRow
(
0
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"20"
));
//设置行高
cell
=
row
.
createCell
(
0
);
//第一个单元格
cell
.
setCellValue
(
"二代身份证统计表"
);
//设定值
cell
.
setCellStyle
(
style2
);
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
cell
=
row
.
createCell
(
j
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style2
);
}
CellRangeAddress
callRange
=
new
CellRangeAddress
(
0
,
0
,
0
,
4
);
//起始行,结束行,起始列,结束列
mergeSheet
.
addMergedRegion
(
callRange
);
row
=
mergeSheet
.
createRow
(
1
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//第四步创建单元格
cell
=
row
.
createCell
(
0
);
//第一个单元格
cell
.
setCellValue
(
"单位"
);
//设定值
cell
.
setCellStyle
(
style
);
//内容居中
cell
=
row
.
createCell
(
1
);
//第二个单元格
cell
.
setCellValue
(
"数量"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
//第三个单元格
cell
.
setCellValue
(
"质检号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
//第四个单元格
cell
.
setCellValue
(
"盒数"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
//第五个单元格
cell
.
setCellValue
(
"入库日期"
);
cell
.
setCellStyle
(
style
);
//第五步插入数据
//创建行
row
=
mergeSheet
.
createRow
(
2
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
cityName
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
cell
=
row
.
createCell
(
j
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
row
=
mergeSheet
.
createRow
(
lineNum
+
3
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
map
.
get
(
"countyName"
).
toString
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
map
.
get
(
"download"
)
+
""
);
mergeSum
+=
Integer
.
valueOf
(
map
.
get
(
"download"
)
+
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellStyle
(
style
);
cell
.
setCellValue
(((
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
+
1
))
+
""
);
boxNum
+=
((
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
+
1
));
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
//创建空的行和列
for
(
int
i
=
0
;
i
<=
14
-
lineNum
;
i
++)
{
//创建行
row
=
mergeSheet
.
createRow
(
lineNum
+
4
+
i
);
// 行之后开始创建
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
for
(
int
j
=
0
;
j
<
5
;
j
++)
{
cell
=
row
.
createCell
(
j
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
}
row
=
mergeSheet
.
createRow
(
18
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"合计"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
mergeSum
+
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"制证车间"
);
cell
.
setCellStyle
(
style
);
if
(
"p1"
.
equals
(
workShop
)
||
"p3"
.
equals
(
workShop
))
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平一"
);
cell
.
setCellStyle
(
style
);
}
else
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平二"
);
cell
.
setCellStyle
(
style
);
}
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
boxNum
+
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
permanentPositionDate
);
cell
.
setCellStyle
(
style
);
//创建单元格并且添加数据
row
=
mergeSheet
.
createRow
(
19
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"类型"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
typeName
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangea
=
new
CellRangeAddress
(
19
,
19
,
1
,
4
);
//起始行,结束行,起始列,结束列
mergeSheet
.
addMergedRegion
(
callRangea
);
//创建单元格并且添加数据
row
=
mergeSheet
.
createRow
(
20
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"32"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"编号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
cyclesheetid
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"循环单"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangea1
=
new
CellRangeAddress
(
20
,
20
,
1
,
4
);
//起始行,结束行,起始列,结束列
mergeSheet
.
addMergedRegion
(
callRangea1
);
row
=
mergeSheet
.
createRow
(
21
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"出库日期"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"20 年 月 日"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangeb
=
new
CellRangeAddress
(
21
,
21
,
1
,
4
);
//起始行,结束行,起始列,结束列
mergeSheet
.
addMergedRegion
(
callRangeb
);
lineNum
++;
}
else
{
sheet
=
wb
.
createSheet
(
a
+
"-"
+
(
String
)
map
.
get
(
"countyName"
));
sheet
.
setColumnWidth
(
0
,
(
int
)
30
*
100
);
sheet
.
setColumnWidth
(
1
,
(
int
)
30
*
70
);
sheet
.
setColumnWidth
(
2
,
(
int
)
30
*
80
);
sheet
.
setColumnWidth
(
3
,
(
int
)
30
*
50
);
sheet
.
setColumnWidth
(
4
,
(
int
)
30
*
110
);
HSSFPrintSetup
ps2
=
sheet
.
getPrintSetup
();
ps2
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
ps2
.
setPaperSize
(
HSSFPrintSetup
.
B5_PAPERSIZE
);
//第三步创建行row:添加表头0行
row
=
sheet
.
createRow
(
0
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"20"
));
//设置行高
cell
=
row
.
createCell
(
0
);
//第一个单元格
cell
.
setCellValue
(
"二代身份证统计表"
);
//设定值
cell
.
setCellStyle
(
style2
);
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
cell
=
row
.
createCell
(
j
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style2
);
}
CellRangeAddress
callRange
=
new
CellRangeAddress
(
0
,
0
,
0
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRange
);
row
=
sheet
.
createRow
(
1
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//第四步创建单元格
cell
=
row
.
createCell
(
0
);
//第一个单元格
cell
.
setCellValue
(
"单位"
);
//设定值
cell
.
setCellStyle
(
style
);
//内容居中
cell
=
row
.
createCell
(
1
);
//第二个单元格
cell
.
setCellValue
(
"数量"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
//第三个单元格
cell
.
setCellValue
(
"质检号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
//第四个单元格
cell
.
setCellValue
(
"盒数"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
//第五个单元格
cell
.
setCellValue
(
"入库日期"
);
cell
.
setCellStyle
(
style
);
//第五步插入数据
//创建行
row
=
sheet
.
createRow
(
2
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
// cell.setCellValue(typeName);
cell
.
setCellValue
(
cityName
);
cell
.
setCellStyle
(
style
);
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
cell
=
row
.
createCell
(
j
+
1
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
row
=
sheet
.
createRow
(
3
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
map
.
get
(
"countyName"
).
toString
());
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
map
.
get
(
"download"
)
+
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellStyle
(
style
);
cell
.
setCellValue
(((
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
+
1
))
+
""
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
//创建空的行和列
for
(
int
i
=
0
;
i
<=
14
;
i
++)
{
//创建行
row
=
sheet
.
createRow
(
4
+
i
);
// 行之后开始创建
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
for
(
int
j
=
0
;
j
<
5
;
j
++)
{
cell
=
row
.
createCell
(
j
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
}
}
row
=
sheet
.
createRow
(
18
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"合计"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
Integer
.
valueOf
(
map
.
get
(
"download"
)
+
""
));
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"制证车间"
);
cell
.
setCellStyle
(
style
);
if
(
"p1"
.
equals
(
workShop
)
||
"p3"
.
equals
(
workShop
))
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平一"
);
cell
.
setCellStyle
(
style
);
}
else
{
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"平二"
);
cell
.
setCellStyle
(
style
);
}
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(((
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
%
250
==
0
?
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
:
Integer
.
parseInt
(
map
.
get
(
"download"
)
+
""
)
/
250
+
1
))
+
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
permanentPositionDate
);
cell
.
setCellStyle
(
style
);
//创建单元格并且添加数据
row
=
sheet
.
createRow
(
19
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"类型"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
typeName
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangea
=
new
CellRangeAddress
(
19
,
19
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangea
);
//创建单元格并且添加数据
row
=
sheet
.
createRow
(
20
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"32"
));
//设置行高
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"编号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
cyclesheetid
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"循环单"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangea1
=
new
CellRangeAddress
(
20
,
20
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangea1
);
row
=
sheet
.
createRow
(
21
);
row
.
setHeightInPoints
(
Short
.
parseShort
(
"16"
));
//设置行高
//创建单元格并且添加数据
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"出库日期"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
1
);
cell
.
setCellValue
(
"20 年 月 日"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
""
);
cell
.
setCellStyle
(
style
);
CellRangeAddress
callRangeb
=
new
CellRangeAddress
(
21
,
21
,
1
,
4
);
//起始行,结束行,起始列,结束列
sheet
.
addMergedRegion
(
callRangeb
);
}
}
//第六步将生成excel文件保存到指定路径下
FileOutputStream
fout
=
null
;
try
{
fout
=
new
FileOutputStream
(
"F:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())
+
countyInfoList
.
get
(
0
).
get
(
"countyName"
)
+
".xls"
);
// fout = new FileOutputStream("D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls");
wb
.
write
(
fout
);
fout
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
System
.
out
.
println
(
"Excel文件生成成功..."
+
new
Date
());
return
"F:\\Excel\\"
+
simpleDateFormat
.
format
(
new
Date
())
+
countyInfoList
.
get
(
0
).
get
(
"countyName"
)
+
".xls"
;
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("countyName") + ".xls";
}
}
}
src/main/java/com/yxproject/start/entity/FailedinfoEntity.java
View file @
77a372e3
...
...
@@ -100,6 +100,7 @@ public class FailedinfoEntity {
public
void
setPrint_Date
(
String
print_Date
)
{
this
.
print_Date
=
print_Date
;
}
@Basic
@Column
(
name
=
"STATE"
,
nullable
=
false
,
precision
=
0
)
public
long
getState
()
{
...
...
@@ -129,10 +130,8 @@ public class FailedinfoEntity {
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
failedinfoid
,
failed_Reason
,
groupno
,
cyclesheetid
,
position_Date
,
finish_Date
,
allot_Date
,
print_Date
,
state
);
return
Objects
.
hash
(
failedinfoid
,
failed_Reason
,
groupno
,
cyclesheetid
,
position_Date
,
finish_Date
,
allot_Date
,
print_Date
,
state
);
}
}
src/main/java/com/yxproject/start/entity/GroupinfoEntity.java
View file @
77a372e3
...
...
@@ -53,6 +53,7 @@ public class GroupinfoEntity {
public
void
setGrouptype
(
Long
grouptype
)
{
this
.
grouptype
=
grouptype
;
}
@Basic
@Column
(
name
=
"VAILD_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Long
getValid_Count
()
{
...
...
@@ -62,6 +63,7 @@ public class GroupinfoEntity {
public
void
setValid_Count
(
Long
valid_Count
)
{
this
.
valid_Count
=
valid_Count
;
}
@Basic
@Column
(
name
=
"INVALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Long
getInvalid_Count
()
{
...
...
@@ -87,6 +89,6 @@ public class GroupinfoEntity {
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
groupid
,
groupno
,
cyclesheetid
,
grouptype
,
valid_Count
,
invalid_Count
);
return
Objects
.
hash
(
groupid
,
groupno
,
cyclesheetid
,
grouptype
,
valid_Count
,
invalid_Count
);
}
}
src/main/java/com/yxproject/start/entity/PoliceStationVailedInfoEntity.java
View file @
77a372e3
...
...
@@ -15,6 +15,7 @@ public class PoliceStationVailedInfoEntity {
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
()
{
...
...
@@ -24,6 +25,7 @@ public class PoliceStationVailedInfoEntity {
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
()
{
...
...
@@ -33,6 +35,7 @@ public class PoliceStationVailedInfoEntity {
public
void
setCyclesheetid
(
String
cyclesheetid
)
{
this
.
cyclesheetid
=
cyclesheetid
;
}
@Basic
@Column
(
name
=
"POLICE_STATION_CODE"
,
nullable
=
true
,
precision
=
0
)
public
String
getPolice_Station_Code
()
{
...
...
@@ -52,6 +55,7 @@ public class PoliceStationVailedInfoEntity {
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
()
{
...
...
@@ -61,6 +65,7 @@ public class PoliceStationVailedInfoEntity {
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
()
{
...
...
@@ -70,6 +75,7 @@ public class PoliceStationVailedInfoEntity {
public
void
setSava_Date
(
String
sava_Date
)
{
this
.
sava_Date
=
sava_Date
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
@@ -85,6 +91,6 @@ public class PoliceStationVailedInfoEntity {
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
police_Station_Vailed_Info_Id
,
cyclesheetid
,
police_Station_Code
,
vailed_Count
,
invalid_Count
,
sava_Date
);
return
Objects
.
hash
(
police_Station_Vailed_Info_Id
,
cyclesheetid
,
police_Station_Code
,
vailed_Count
,
invalid_Count
,
sava_Date
);
}
}
src/main/java/com/yxproject/start/entity/accu/AccCardTEntity.java
View file @
77a372e3
...
...
@@ -23,6 +23,7 @@ public class AccCardTEntity {
private
String
begin_Date
;
private
String
apply_Reason
;
private
String
status_No
;
@Basic
@Column
(
name
=
"UPLOAD_NO"
,
nullable
=
false
,
length
=
22
)
public
String
getUpload_No
()
{
...
...
@@ -32,6 +33,7 @@ public class AccCardTEntity {
public
void
setUpload_No
(
String
upload_No
)
{
this
.
upload_No
=
upload_No
;
}
@Id
@Column
(
name
=
"ACCEPT_NO"
,
nullable
=
false
,
length
=
12
)
public
String
getAccept_No
()
{
...
...
@@ -61,6 +63,7 @@ public class AccCardTEntity {
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"SEX_NO"
,
nullable
=
false
,
length
=
1
)
public
String
getSex_No
()
{
...
...
@@ -70,6 +73,7 @@ public class AccCardTEntity {
public
void
setSex_No
(
String
sex_No
)
{
this
.
sex_No
=
sex_No
;
}
@Basic
@Column
(
name
=
"NATION_NO"
,
nullable
=
false
,
length
=
2
)
public
String
getNation_No
()
{
...
...
@@ -89,6 +93,7 @@ public class AccCardTEntity {
public
void
setBirthday
(
String
birthday
)
{
this
.
birthday
=
birthday
;
}
@Basic
@Column
(
name
=
"ID_NO"
,
nullable
=
false
,
length
=
18
)
public
String
getId_No
()
{
...
...
@@ -138,6 +143,7 @@ public class AccCardTEntity {
public
void
setAddress1
(
String
address1
)
{
this
.
address1
=
address1
;
}
@Basic
@Column
(
name
=
"SIGN_GOVT"
,
nullable
=
false
,
length
=
45
)
public
String
getSign_Govt
()
{
...
...
@@ -147,6 +153,7 @@ public class AccCardTEntity {
public
void
setSign_Govt
(
String
sign_Govt
)
{
this
.
sign_Govt
=
sign_Govt
;
}
@Basic
@Column
(
name
=
"EXPIRE_DATE"
,
nullable
=
false
,
length
=
8
)
public
String
getExpire_Date
()
{
...
...
@@ -156,6 +163,7 @@ public class AccCardTEntity {
public
void
setExpire_Date
(
String
expire_Date
)
{
this
.
expire_Date
=
expire_Date
;
}
@Basic
@Column
(
name
=
"BEGIN_DATE"
,
nullable
=
false
,
length
=
8
)
public
String
getBegin_Date
()
{
...
...
@@ -165,6 +173,7 @@ public class AccCardTEntity {
public
void
setBegin_Date
(
String
begin_Date
)
{
this
.
begin_Date
=
begin_Date
;
}
@Basic
@Column
(
name
=
"APPLY_REASON"
,
nullable
=
false
,
length
=
2
)
public
String
getApply_Reason
()
{
...
...
@@ -174,6 +183,7 @@ public class AccCardTEntity {
public
void
setApply_Reason
(
String
apply_Reason
)
{
this
.
apply_Reason
=
apply_Reason
;
}
@Basic
@Column
(
name
=
"STATUS_NO"
,
nullable
=
true
,
length
=
1
)
public
String
getStatus_No
()
{
...
...
src/main/java/com/yxproject/start/entity/accu/AccGroupRelationTEntity.java
View file @
77a372e3
...
...
@@ -11,6 +11,7 @@ public class AccGroupRelationTEntity {
private
String
deal_Status
;
private
String
deal_Date
;
private
String
upload_Unit_No
;
@Id
@Column
(
name
=
"GROUP_NO"
,
nullable
=
false
,
length
=
10
)
public
String
getGroup_No
()
{
...
...
@@ -20,6 +21,7 @@ public class AccGroupRelationTEntity {
public
void
setGroup_No
(
String
group_No
)
{
this
.
group_No
=
group_No
;
}
@Basic
@Column
(
name
=
"ORIGINAL_NO"
,
nullable
=
false
,
length
=
25
)
public
String
getOriginal_No
()
{
...
...
@@ -29,6 +31,7 @@ public class AccGroupRelationTEntity {
public
void
setOriginal_No
(
String
original_No
)
{
this
.
original_No
=
original_No
;
}
@Basic
@Column
(
name
=
"DEAL_STATUS"
,
nullable
=
true
,
length
=
1
)
public
String
getDeal_Status
()
{
...
...
@@ -38,6 +41,7 @@ public class AccGroupRelationTEntity {
public
void
setDeal_Status
(
String
deal_Status
)
{
this
.
deal_Status
=
deal_Status
;
}
@Basic
@Column
(
name
=
"DEAL_DATE"
,
nullable
=
false
,
length
=
8
)
public
String
getDeal_Date
()
{
...
...
@@ -47,6 +51,7 @@ public class AccGroupRelationTEntity {
public
void
setDeal_Date
(
String
deal_Date
)
{
this
.
deal_Date
=
deal_Date
;
}
@Basic
@Column
(
name
=
"UPLOAD_UNIT_NO"
,
nullable
=
false
,
length
=
12
)
public
String
getUpload_Unit_No
()
{
...
...
src/main/java/com/yxproject/start/entity/accu/AccGroupTEntity.java
View file @
77a372e3
...
...
@@ -15,6 +15,7 @@ public class AccGroupTEntity {
private
Byte
invalid_Count
;
private
Time
submit_Date
;
private
String
submit_Code
;
@Id
@Column
(
name
=
"GROUP_NO"
,
nullable
=
false
,
length
=
10
)
public
String
getGroup_No
()
{
...
...
@@ -24,6 +25,7 @@ public class AccGroupTEntity {
public
void
setGroup_No
(
String
group_No
)
{
this
.
group_No
=
group_No
;
}
@Basic
@Column
(
name
=
"USER_CODE"
,
nullable
=
true
,
length
=
8
)
public
String
getUser_Code
()
{
...
...
@@ -33,6 +35,7 @@ public class AccGroupTEntity {
public
void
setUser_Code
(
String
user_Code
)
{
this
.
user_Code
=
user_Code
;
}
@Basic
@Column
(
name
=
"IMPORT_TIME"
,
nullable
=
true
)
public
Time
getImport_Time
()
{
...
...
@@ -42,6 +45,7 @@ public class AccGroupTEntity {
public
void
setImport_Time
(
Time
import_Time
)
{
this
.
import_Time
=
import_Time
;
}
@Basic
@Column
(
name
=
"DEAL_FLAG"
,
nullable
=
false
,
length
=
1
)
public
String
getDeal_Flag
()
{
...
...
@@ -51,6 +55,7 @@ public class AccGroupTEntity {
public
void
setDeal_Flag
(
String
deal_Flag
)
{
this
.
deal_Flag
=
deal_Flag
;
}
@Basic
@Column
(
name
=
"VALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getValid_Count
()
{
...
...
@@ -60,6 +65,7 @@ public class AccGroupTEntity {
public
void
setValid_Count
(
Byte
valid_Count
)
{
this
.
valid_Count
=
valid_Count
;
}
@Basic
@Column
(
name
=
"INVALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getInvalid_Count
()
{
...
...
@@ -69,6 +75,7 @@ public class AccGroupTEntity {
public
void
setInvalid_Count
(
Byte
invalid_Count
)
{
this
.
invalid_Count
=
invalid_Count
;
}
@Basic
@Column
(
name
=
"SUBMIT_DATE"
,
nullable
=
true
)
public
Time
getSubmit_Date
()
{
...
...
@@ -78,6 +85,7 @@ public class AccGroupTEntity {
public
void
setSubmit_Date
(
Time
submit_Date
)
{
this
.
submit_Date
=
submit_Date
;
}
@Basic
@Column
(
name
=
"SUBMIT_CODE"
,
nullable
=
true
,
length
=
8
)
public
String
getSubmit_Code
()
{
...
...
src/main/java/com/yxproject/start/entity/prod/ProdApplyInfoTEntity.java
View file @
77a372e3
...
...
@@ -15,6 +15,7 @@ public class ProdApplyInfoTEntity {
private
String
apply_Address
;
private
String
draw_Type
;
private
String
province_No
;
@Basic
@Column
(
name
=
"UPLOAD_NO"
,
nullable
=
false
,
length
=
22
)
public
String
getUpload_No
()
{
...
...
@@ -24,6 +25,7 @@ public class ProdApplyInfoTEntity {
public
void
setUpload_No
(
String
upload_No
)
{
this
.
upload_No
=
upload_No
;
}
@Id
@Column
(
name
=
"ACCEPT_NO"
,
nullable
=
false
,
length
=
12
)
public
String
getAccept_No
()
{
...
...
@@ -33,6 +35,7 @@ public class ProdApplyInfoTEntity {
public
void
setAccept_No
(
String
accept_No
)
{
this
.
accept_No
=
accept_No
;
}
@Basic
@Column
(
name
=
"MAKE_TYPE"
,
nullable
=
true
,
length
=
1
)
public
String
getMake_Type
()
{
...
...
@@ -42,6 +45,7 @@ public class ProdApplyInfoTEntity {
public
void
setMake_Type
(
String
make_Type
)
{
this
.
make_Type
=
make_Type
;
}
@Basic
@Column
(
name
=
"APPLY_NAME"
,
nullable
=
true
,
length
=
45
)
public
String
getApply_Name
()
{
...
...
@@ -51,6 +55,7 @@ public class ProdApplyInfoTEntity {
public
void
setApply_Name
(
String
apply_Name
)
{
this
.
apply_Name
=
apply_Name
;
}
@Basic
@Column
(
name
=
"APPLY_PHONE"
,
nullable
=
true
,
length
=
20
)
public
String
getApply_Phone
()
{
...
...
@@ -60,6 +65,7 @@ public class ProdApplyInfoTEntity {
public
void
setApply_Phone
(
String
apply_Phone
)
{
this
.
apply_Phone
=
apply_Phone
;
}
@Basic
@Column
(
name
=
"APPLY_POSTCODE"
,
nullable
=
true
,
length
=
6
)
public
String
getApply_Postcode
()
{
...
...
@@ -69,6 +75,7 @@ public class ProdApplyInfoTEntity {
public
void
setApply_Postcode
(
String
apply_Postcode
)
{
this
.
apply_Postcode
=
apply_Postcode
;
}
@Basic
@Column
(
name
=
"APPLY_ADDRESS"
,
nullable
=
true
,
length
=
105
)
public
String
getApply_Address
()
{
...
...
@@ -78,6 +85,7 @@ public class ProdApplyInfoTEntity {
public
void
setApply_Address
(
String
apply_Address
)
{
this
.
apply_Address
=
apply_Address
;
}
@Basic
@Column
(
name
=
"DRAW_TYPE"
,
nullable
=
false
,
length
=
2
)
public
String
getDraw_Type
()
{
...
...
@@ -87,6 +95,7 @@ public class ProdApplyInfoTEntity {
public
void
setDraw_Type
(
String
draw_Type
)
{
this
.
draw_Type
=
draw_Type
;
}
@Basic
@Column
(
name
=
"PROVINCE_NO"
,
nullable
=
true
,
length
=
6
)
public
String
getProvince_No
()
{
...
...
@@ -98,7 +107,6 @@ public class ProdApplyInfoTEntity {
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
src/main/java/com/yxproject/start/entity/prod/ProdGroupTEntity.java
View file @
77a372e3
...
...
@@ -29,6 +29,7 @@ public class ProdGroupTEntity {
private
String
move_Flag
;
private
Byte
move_Count
;
private
Time
move_Date
;
@Id
@Column
(
name
=
"GROUP_NO"
,
nullable
=
false
,
length
=
10
)
public
String
getGroup_No
()
{
...
...
@@ -38,6 +39,7 @@ public class ProdGroupTEntity {
public
void
setGroup_No
(
String
group_No
)
{
this
.
group_No
=
group_No
;
}
@Basic
@Column
(
name
=
"VALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getValid_Count
()
{
...
...
@@ -47,6 +49,7 @@ public class ProdGroupTEntity {
public
void
setValid_Count
(
Byte
valid_Count
)
{
this
.
valid_Count
=
valid_Count
;
}
@Basic
@Column
(
name
=
"INVALID_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getInvalid_Count
()
{
...
...
@@ -56,6 +59,7 @@ public class ProdGroupTEntity {
public
void
setInvalid_Count
(
Byte
invalid_Count
)
{
this
.
invalid_Count
=
invalid_Count
;
}
@Basic
@Column
(
name
=
"SUBMIT_DATE"
,
nullable
=
true
)
public
Time
getSubmit_Date
()
{
...
...
@@ -65,6 +69,7 @@ public class ProdGroupTEntity {
public
void
setSubmit_Date
(
Time
submit_Date
)
{
this
.
submit_Date
=
submit_Date
;
}
@Basic
@Column
(
name
=
"SUBMIT_CODE"
,
nullable
=
true
,
length
=
8
)
public
String
getSubmit_Code
()
{
...
...
@@ -74,6 +79,7 @@ public class ProdGroupTEntity {
public
void
setSubmit_Code
(
String
submit_Code
)
{
this
.
submit_Code
=
submit_Code
;
}
@Basic
@Column
(
name
=
"EXPORT_DATE"
,
nullable
=
true
)
public
Time
getExport_Date
()
{
...
...
@@ -83,6 +89,7 @@ public class ProdGroupTEntity {
public
void
setExport_Date
(
Time
export_Date
)
{
this
.
export_Date
=
export_Date
;
}
@Basic
@Column
(
name
=
"EXPORT_CODE"
,
nullable
=
true
,
length
=
8
)
public
String
getExport_Code
()
{
...
...
@@ -92,6 +99,7 @@ public class ProdGroupTEntity {
public
void
setExport_Code
(
String
export_Code
)
{
this
.
export_Code
=
export_Code
;
}
@Basic
@Column
(
name
=
"DOWNLOAD_FLAG"
,
nullable
=
true
,
length
=
1
)
public
String
getDownload_Flag
()
{
...
...
@@ -101,6 +109,7 @@ public class ProdGroupTEntity {
public
void
setDownload_Flag
(
String
download_Flag
)
{
this
.
download_Flag
=
download_Flag
;
}
@Basic
@Column
(
name
=
"DOWNLOAD_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getDownload_Count
()
{
...
...
@@ -110,6 +119,7 @@ public class ProdGroupTEntity {
public
void
setDownload_Count
(
Byte
download_Count
)
{
this
.
download_Count
=
download_Count
;
}
@Basic
@Column
(
name
=
"DOWNLOAD_DATE"
,
nullable
=
true
)
public
Time
getDownload_Date
()
{
...
...
@@ -119,6 +129,7 @@ public class ProdGroupTEntity {
public
void
setDownload_Date
(
Time
download_Date
)
{
this
.
download_Date
=
download_Date
;
}
@Basic
@Column
(
name
=
"EWRITE_FLAG"
,
nullable
=
true
,
length
=
1
)
public
String
getEwrite_Flag
()
{
...
...
@@ -128,6 +139,7 @@ public class ProdGroupTEntity {
public
void
setEwrite_Flag
(
String
ewrite_Flag
)
{
this
.
ewrite_Flag
=
ewrite_Flag
;
}
@Basic
@Column
(
name
=
"EWRITE_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getEwrite_Count
()
{
...
...
@@ -137,6 +149,7 @@ public class ProdGroupTEntity {
public
void
setEwrite_Count
(
Byte
ewrite_Count
)
{
this
.
ewrite_Count
=
ewrite_Count
;
}
@Basic
@Column
(
name
=
"EWRITE_DATE"
,
nullable
=
true
)
public
Time
getEwrite_Date
()
{
...
...
@@ -146,6 +159,7 @@ public class ProdGroupTEntity {
public
void
setEwrite_Date
(
Time
ewrite_Date
)
{
this
.
ewrite_Date
=
ewrite_Date
;
}
@Basic
@Column
(
name
=
"CHECK_FLAG"
,
nullable
=
true
,
length
=
1
)
public
String
getCheck_Flag
()
{
...
...
@@ -155,6 +169,7 @@ public class ProdGroupTEntity {
public
void
setCheck_Flag
(
String
check_Flag
)
{
this
.
check_Flag
=
check_Flag
;
}
@Basic
@Column
(
name
=
"CHECK_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getCheck_Count
()
{
...
...
@@ -164,6 +179,7 @@ public class ProdGroupTEntity {
public
void
setCheck_Count
(
Byte
check_Count
)
{
this
.
check_Count
=
check_Count
;
}
@Basic
@Column
(
name
=
"CHECK_DATE"
,
nullable
=
true
)
public
Time
getCheck_Date
()
{
...
...
@@ -173,6 +189,7 @@ public class ProdGroupTEntity {
public
void
setCheck_Date
(
Time
check_Date
)
{
this
.
check_Date
=
check_Date
;
}
@Basic
@Column
(
name
=
"SEND_FLAG"
,
nullable
=
true
,
length
=
1
)
public
String
getSend_Flag
()
{
...
...
@@ -182,6 +199,7 @@ public class ProdGroupTEntity {
public
void
setSend_Flag
(
String
send_Flag
)
{
this
.
send_Flag
=
send_Flag
;
}
@Basic
@Column
(
name
=
"SEND_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getSend_Count
()
{
...
...
@@ -191,6 +209,7 @@ public class ProdGroupTEntity {
public
void
setSend_Count
(
Byte
send_Count
)
{
this
.
send_Count
=
send_Count
;
}
@Basic
@Column
(
name
=
"SEND_DATE"
,
nullable
=
true
)
public
Time
getSend_Date
()
{
...
...
@@ -200,6 +219,7 @@ public class ProdGroupTEntity {
public
void
setSend_Date
(
Time
send_Date
)
{
this
.
send_Date
=
send_Date
;
}
@Basic
@Column
(
name
=
"MOVE_FLAG"
,
nullable
=
true
,
length
=
1
)
public
String
getMove_Flag
()
{
...
...
@@ -209,6 +229,7 @@ public class ProdGroupTEntity {
public
void
setMove_Flag
(
String
move_Flag
)
{
this
.
move_Flag
=
move_Flag
;
}
@Basic
@Column
(
name
=
"MOVE_COUNT"
,
nullable
=
true
,
precision
=
0
)
public
Byte
getMove_Count
()
{
...
...
@@ -218,6 +239,7 @@ public class ProdGroupTEntity {
public
void
setMove_Count
(
Byte
move_Count
)
{
this
.
move_Count
=
move_Count
;
}
@Basic
@Column
(
name
=
"MOVE_DATE"
,
nullable
=
true
)
public
Time
getMove_Date
()
{
...
...
src/main/java/com/yxproject/start/entity/prod/ProdTraceTEntity.java
View file @
77a372e3
...
...
@@ -20,6 +20,7 @@ public class ProdTraceTEntity {
private
Time
check_Date
;
private
String
mover_No
;
private
Time
move_Date
;
@Id
@Column
(
name
=
"ACCEPT_NO"
,
nullable
=
false
,
length
=
12
)
public
String
getAccept_No
()
{
...
...
@@ -29,6 +30,7 @@ public class ProdTraceTEntity {
public
void
setAccept_No
(
String
accept_No
)
{
this
.
accept_No
=
accept_No
;
}
@Basic
@Column
(
name
=
"PHOTOER_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getPhotoer_No
()
{
...
...
@@ -38,6 +40,7 @@ public class ProdTraceTEntity {
public
void
setPhotoer_No
(
String
photoer_No
)
{
this
.
photoer_No
=
photoer_No
;
}
@Basic
@Column
(
name
=
"PHOTO_DATE"
,
nullable
=
true
)
public
Time
getPhoto_Date
()
{
...
...
@@ -47,6 +50,7 @@ public class ProdTraceTEntity {
public
void
setPhoto_Date
(
Time
photo_Date
)
{
this
.
photo_Date
=
photo_Date
;
}
@Basic
@Column
(
name
=
"EXPORT_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getExport_No
()
{
...
...
@@ -56,6 +60,7 @@ public class ProdTraceTEntity {
public
void
setExport_No
(
String
export_No
)
{
this
.
export_No
=
export_No
;
}
@Basic
@Column
(
name
=
"EXPORT_DATE"
,
nullable
=
true
)
public
Time
getExport_Date
()
{
...
...
@@ -65,6 +70,7 @@ public class ProdTraceTEntity {
public
void
setExport_Date
(
Time
export_Date
)
{
this
.
export_Date
=
export_Date
;
}
@Basic
@Column
(
name
=
"DOWNLOAD_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getDownload_No
()
{
...
...
@@ -74,6 +80,7 @@ public class ProdTraceTEntity {
public
void
setDownload_No
(
String
download_No
)
{
this
.
download_No
=
download_No
;
}
@Basic
@Column
(
name
=
"DOWNLOAD_DATE"
,
nullable
=
true
)
public
Time
getDownload_Date
()
{
...
...
@@ -83,6 +90,7 @@ public class ProdTraceTEntity {
public
void
setDownload_Date
(
Time
download_Date
)
{
this
.
download_Date
=
download_Date
;
}
@Basic
@Column
(
name
=
"ELECTRIC_WRITER_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getElectric_Writer_No
()
{
...
...
@@ -92,6 +100,7 @@ public class ProdTraceTEntity {
public
void
setElectric_Writer_No
(
String
electric_Writer_No
)
{
this
.
electric_Writer_No
=
electric_Writer_No
;
}
@Basic
@Column
(
name
=
"ELECTRIC_WRITE_DATE"
,
nullable
=
true
)
public
Time
getElectric_Write_Date
()
{
...
...
@@ -101,6 +110,7 @@ public class ProdTraceTEntity {
public
void
setElectric_Write_Date
(
Time
electric_Write_Date
)
{
this
.
electric_Write_Date
=
electric_Write_Date
;
}
@Basic
@Column
(
name
=
"CHECKER_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getChecker_No
()
{
...
...
@@ -110,6 +120,7 @@ public class ProdTraceTEntity {
public
void
setChecker_No
(
String
checker_No
)
{
this
.
checker_No
=
checker_No
;
}
@Basic
@Column
(
name
=
"CHECK_DATE"
,
nullable
=
true
)
public
Time
getCheck_Date
()
{
...
...
@@ -119,6 +130,7 @@ public class ProdTraceTEntity {
public
void
setCheck_Date
(
Time
check_Date
)
{
this
.
check_Date
=
check_Date
;
}
@Basic
@Column
(
name
=
"MOVER_NO"
,
nullable
=
true
,
length
=
8
)
public
String
getMover_No
()
{
...
...
@@ -128,6 +140,7 @@ public class ProdTraceTEntity {
public
void
setMover_No
(
String
mover_No
)
{
this
.
mover_No
=
mover_No
;
}
@Basic
@Column
(
name
=
"MOVE_DATE"
,
nullable
=
true
)
public
Time
getMove_Date
()
{
...
...
@@ -137,6 +150,7 @@ public class ProdTraceTEntity {
public
void
setMove_Date
(
Time
move_Date
)
{
this
.
move_Date
=
move_Date
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
src/main/java/com/yxproject/start/mapper/FailedinfoMapper.java
View file @
77a372e3
package
com
.
yxproject
.
start
.
mapper
;
import
com.yxproject.start.entity.FailedinfoEntity
;
import
com.yxproject.start.entity.UserInfo
;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
...
...
src/main/java/com/yxproject/start/mapper/GroupinfoMapper.java
View file @
77a372e3
...
...
@@ -4,6 +4,7 @@ import com.yxproject.start.entity.GroupinfoEntity;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by zhangyusheng on 2018/10/13 9:36
...
...
@@ -12,7 +13,17 @@ import java.util.List;
public
interface
GroupinfoMapper
{
public
int
insertGroupinfoEntity
(
GroupinfoEntity
groupinfoEntity
);
public
List
<
GroupinfoEntity
>
findGroupinfoEntityByAcceptNo
(
String
acceptNo
);
public
int
updateGroupinfoEntity
(
GroupinfoEntity
groupinfoEntity
);
public
List
<
GroupinfoEntity
>
findGroupinfoEntityListByProductionTaskListId
(
String
cyclesheetid
);
public
List
<
Map
<
String
,
Object
>>
findCountyInfoList8_10
(
String
groupinfo10
,
String
groupinfo8
);
public
List
<
Map
<
String
,
Object
>>
findCountyInfoList8
(
String
groupinfo8
);
public
List
<
Map
<
String
,
Object
>>
findCountyInfoList10
(
String
groupinfo10
);
}
src/main/java/com/yxproject/start/service/GroupinfoService.java
0 → 100644
View file @
77a372e3
package
com
.
yxproject
.
start
.
service
;
import
com.yxproject.start.entity.GroupinfoEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by zhangyusheng on 2018/11/1 14:22
*/
public
interface
GroupinfoService
{
public
List
<
Map
<
String
,
Object
>>
findCountyInfoList
(
String
cyclesheetID
);
}
src/main/java/com/yxproject/start/service/ProductionTaskListService.java
View file @
77a372e3
...
...
@@ -10,13 +10,20 @@ import java.util.List;
public
interface
ProductionTaskListService
{
public
List
<
ProductionTaskListEntity
>
findProductionTaskListEntityByID
(
String
id
);
public
int
updateProductionTask
(
ProductionTaskListEntity
map
);
public
int
addProductionTaskListEntity
(
ProductionTaskListEntity
productionTaskListEntity
,
List
<
GroupinfoEntity
>
groupinfoEntities
);
public
int
updateProductionTask
(
ProductionTaskListEntity
map
);
public
int
addProductionTaskListEntity
(
ProductionTaskListEntity
productionTaskListEntity
,
List
<
GroupinfoEntity
>
groupinfoEntities
);
public
int
addQuickCyclesheetInfo
(
String
acceptNo
);
public
List
<
Object
>
findCardInfoByCardIDOrAcceptNo
(
String
cardInfo
);
public
List
<
Object
>
findCardInfoByCardIDOrAcceptNo
(
String
cardInfo
);
public
List
<
Object
>
findAccuProductionInfo
(
String
importDate
);
public
int
savePoliceStationVailedInfoEntity
(
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
);
public
List
<
PoliceStationVailedInfoEntity
>
find
(
String
id
);
public
int
savePoliceStationVailedInfoEntity
(
List
<
PoliceStationVailedInfoEntity
>
policeStationVailedInfoEntities
);
public
List
<
PoliceStationVailedInfoEntity
>
find
(
String
id
);
public
List
<
ProductionTaskListEntity
>
findProductionTaskListEntityByState
(
int
state
);
...
...
src/main/java/com/yxproject/start/service/impl/GroupinfoServiceImpl.java
0 → 100644
View file @
77a372e3
package
com
.
yxproject
.
start
.
service
.
impl
;
import
com.yxproject.start.entity.GroupinfoEntity
;
import
com.yxproject.start.mapper.GroupinfoMapper
;
import
com.yxproject.start.service.GroupinfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
/**
* Created by zhangyusheng on 2018/11/1 14:26
*/
@Service
public
class
GroupinfoServiceImpl
implements
GroupinfoService
{
@Autowired
public
GroupinfoMapper
groupinfoMapper
;
@Override
public
List
<
Map
<
String
,
Object
>>
findCountyInfoList
(
String
cyclesheetid
)
{
List
<
Map
<
String
,
Object
>>
countyInfoList
=
new
ArrayList
<>();
List
<
GroupinfoEntity
>
groupinfoEntityList
=
groupinfoMapper
.
findGroupinfoEntityListByProductionTaskListId
(
cyclesheetid
);
List
<
String
>
groupnoLength10
=
new
ArrayList
<
String
>();
List
<
String
>
groupnoLength8
=
new
ArrayList
<
String
>();
for
(
GroupinfoEntity
groupinfoEntity
:
groupinfoEntityList
)
{
if
(
groupinfoEntity
.
getGroupno
().
length
()
==
10
)
{
groupnoLength10
.
add
(
groupinfoEntity
.
getGroupno
());
}
else
{
groupnoLength8
.
add
(
groupinfoEntity
.
getGroupno
());
}
}
String
group_no10
=
""
;
for
(
int
i
=
0
;
i
<
groupnoLength10
.
size
();
i
++)
{
if
(
i
!=
groupnoLength10
.
size
()
-
1
)
{
group_no10
+=
"'"
+
groupnoLength10
.
get
(
i
)
+
"',"
;
}
else
{
group_no10
+=
"'"
+
groupnoLength10
.
get
(
i
)
+
"'"
;
}
}
String
group_no8
=
""
;
for
(
int
i
=
0
;
i
<
groupnoLength8
.
size
();
i
++)
{
if
(
i
!=
groupnoLength8
.
size
()
-
1
)
{
group_no8
+=
"'"
+
groupnoLength8
.
get
(
i
)
+
"',"
;
}
else
{
group_no8
+=
"'"
+
groupnoLength8
.
get
(
i
)
+
"'"
;
}
}
//数组中有长度为10和8 的
if
(
groupnoLength8
.
size
()
!=
0
&&
groupnoLength10
.
size
()
!=
0
)
{
countyInfoList
=
groupinfoMapper
.
findCountyInfoList8_10
(
group_no10
,
group_no8
);
}
else
if
(
groupnoLength8
.
size
()
==
0
&&
groupnoLength10
.
size
()
!=
10
)
{
//数组中只有长度为10 的
countyInfoList
=
groupinfoMapper
.
findCountyInfoList10
(
group_no10
);
}
else
if
(
groupnoLength8
.
size
()
!=
0
&&
groupnoLength10
.
size
()
==
0
)
{
//数组中只有长度为8 的
countyInfoList
=
groupinfoMapper
.
findCountyInfoList8
(
group_no8
);
}
return
countyInfoList
;
}
}
src/main/java/com/yxproject/start/service/impl/UtilServiceImpl.java
View file @
77a372e3
...
...
@@ -14,7 +14,6 @@ public class UtilServiceImpl implements UtilService {
public
UtilMapper
utilMapper
;
@Override
public
int
findProductionTaskListSequenceNextValue
()
{
return
utilMapper
.
findProductionTaskListSequenceNextValue
();
}
...
...
src/main/resources/mapper/GroupinfoMapper.xml
View file @
77a372e3
...
...
@@ -11,7 +11,7 @@
</resultMap>
<select
id=
"findGroupinfoEntityListByProductionTaskListId"
resultType=
"com.yxproject.start.entity.GroupinfoEntity"
parameterType=
"String"
>
select * from GROUPINFO where cyclesheetid like #{id}
select * from GROUPINFO where cyclesheetid like #{
cyclesheet
id}
</select>
<insert
id=
"insertGroupinfoEntity"
parameterType=
"com.yxproject.start.entity.GroupinfoEntity"
>
...
...
@@ -34,7 +34,13 @@
where GROUPID=#{groupid}
</update>
<!--<select id="findGroupinfoEntityByAcceptNo" resultType="java.util.HashMap" parameterType="String">-->
<!--select * from GROUPINFO where GROUPNO =#{acceptNo} or GROUPNO =substr(#{acceptNo},0,8)-->
<!--</select>-->
<select
id=
"findCountyInfoList8_10"
resultType=
"java.util.HashMap"
parameterType=
"String"
>
select * from FINDPRODCOUNTYLIST8_10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10} AND p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
</select>
<select
id=
"findCountyInfoList8"
resultType=
"java.util.HashMap"
parameterType=
"String"
>
select * from FINDPRODCOUNTYLIST8_VIEW where p_view_param.set_param2(#{groupinfo8})=#{groupinfo8}
</select>
<select
id=
"findCountyInfoList10"
resultType=
"java.util.HashMap"
parameterType=
"String"
>
select * from FINDPRODCOUNTYLIST10_VIEW where p_view_param.set_param(#{groupinfo10})=#{groupinfo10}
</select>
</mapper>
\ No newline at end of file
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