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
c457ef0b
Commit
c457ef0b
authored
Dec 11, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
除了下载交接单以外的大部分的接口已完成
parent
00a640b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
61 deletions
+74
-61
UserApi.java
src/main/java/com/yxproject/start/api/UserApi.java
+74
-61
No files found.
src/main/java/com/yxproject/start/api/UserApi.java
View file @
c457ef0b
...
...
@@ -14,6 +14,12 @@ import org.apache.shiro.authc.UnknownAccountException;
import
org.apache.shiro.authc.UsernamePasswordToken
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.subject.Subject
;
import
org.dom4j.*
;
import
org.dom4j.Attribute
;
import
org.dom4j.Document
;
import
org.dom4j.Element
;
import
org.dom4j.io.*
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -40,6 +46,12 @@ public class UserApi {
private
CountyListService
countyListService
;
@Autowired
private
CardBodyService
cardBodyService
;
// @Autowired
// private ReadCountyListXMLService readCountyListXMLService;
// @Autowired
// private PrintCountyListXMLService printCountyListXMLService;
// @Autowired
// private static Dom4JCRUD dom4JCRUD;
@PostMapping
(
"login"
)
public
Map
<
String
,
Object
>
submitLogin
(
@RequestBody
String
jsonStr
)
{
...
...
@@ -108,7 +120,7 @@ public class UserApi {
public
String
updateProductionTask
(
@RequestParam
(
"id"
)
String
id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"production_Task_List_Id\":\"20181016001\",\"make_Type\":8,\"old_Make_Type\":8,} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
TaskEntity
productionTaskListEntity
=
(
TaskEntity
)
json
Object
.
toBean
(
jsonObject
,
TaskEntity
.
class
);
TaskEntity
productionTaskListEntity
=
(
TaskEntity
)
JSON
Object
.
toBean
(
jsonObject
,
TaskEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
updateProductionTask
(
productionTaskListEntity
);
...
...
@@ -579,7 +591,7 @@ public class UserApi {
public
String
addExceptionState
(
@RequestParam
(
"exception_Information"
)
String
exception_Information
,
HttpServletResponse
resp
)
{
String
map
=
"{\"task_Id\":\"20181016001\",\"exception_Information\":0} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
TaskEntity
taskEntity
=
(
TaskEntity
)
json
Object
.
toBean
(
jsonObject
,
TaskEntity
.
class
);
TaskEntity
taskEntity
=
(
TaskEntity
)
JSON
Object
.
toBean
(
jsonObject
,
TaskEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
addExceptionState
(
taskEntity
);
...
...
@@ -587,47 +599,6 @@ public class UserApi {
return
yxjsonResponse
.
toJSONString
();
}
/**
* 更新入库时间
* 修改方法,在sql里面对合计值与出库数进行判断
* @return
*/
@RequestMapping
(
"updateInStorageDate"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
updateInStorageDate
(
@RequestParam
(
"id"
)
String
id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"id\":\"20181016001\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
Object
inStorageCount
=
jsonObject
.
get
(
"inStorageCount"
);
Object
inStorageDate
=
jsonObject
.
get
(
"inStorageDate"
);
TaskEntity
taskEntity
=
(
TaskEntity
)
inStorageDate
;
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
inStorageCount
;
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
updateInStorageDate
(
taskEntity
,
countyListEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 更新出库时间
* @return
*/
@RequestMapping
(
"updateOutBoundDate"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
updateOutBoundDate
(
@RequestParam
(
"id"
)
String
id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"id\":\"20181016001\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
Object
outStorageCount
=
jsonObject
.
get
(
"outStorageCount"
);
Object
putOutStorageDate
=
jsonObject
.
get
(
"putOutStorageDate"
);
TaskEntity
taskEntity
=
(
TaskEntity
)
putOutStorageDate
;
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
outStorageCount
;
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
updateOutBoundDate
(
taskEntity
,
countyListEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 对出库数进行更改
* 更新出库数
...
...
@@ -638,7 +609,7 @@ public class UserApi {
public
String
reviseOutBoundCount
(
@RequestParam
(
"county_List_Id"
)
String
county_List_Id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"county_List_Id\":\"20181016001\",\"Out_Storage_County\":\"52\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
json
Object
.
toBean
(
jsonObject
,
CountyListEntity
.
class
);
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
JSON
Object
.
toBean
(
jsonObject
,
CountyListEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
countyListService
.
reviseOutBoundCount
(
countyListEntity
);
...
...
@@ -656,7 +627,7 @@ public class UserApi {
public
String
reviseInBoundCount
(
@RequestParam
(
"county_List_Id"
)
String
county_List_Id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"county_List_Id\":\"20181016001\",\"In_Storage_County\":\"52\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
json
Object
.
toBean
(
jsonObject
,
CountyListEntity
.
class
);
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
JSON
Object
.
toBean
(
jsonObject
,
CountyListEntity
.
class
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
countyListService
.
reviseInBoundCount
(
countyListEntity
);
...
...
@@ -681,6 +652,48 @@ public class UserApi {
return
yxjsonResponse
.
toJSONString
();
}
/**
* 更新入库时间
* 前端空值
* @return
*/
@RequestMapping
(
"updateInStorageDate"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
updateInStorageDate
(
@RequestParam
(
"id"
)
String
id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"id\":\"20181016001\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
Object
inStorageCount
=
jsonObject
.
get
(
"inStorageCount"
);
Object
inStorageDate
=
jsonObject
.
get
(
"inStorageDate"
);
TaskEntity
taskEntity
=
(
TaskEntity
)
inStorageDate
;
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
inStorageCount
;
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
updateInStorageDate
(
taskEntity
,
countyListEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 更新出库时间
* @return
*/
@RequestMapping
(
"updateOutBoundDate"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
updateOutBoundDate
(
@RequestParam
(
"id"
)
String
id
,
HttpServletResponse
resp
)
{
String
map
=
"{\"id\":\"20181016001\",} "
;
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
map
);
Object
outStorageCount
=
jsonObject
.
get
(
"outStorageCount"
);
Object
putOutStorageDate
=
jsonObject
.
get
(
"putOutStorageDate"
);
TaskEntity
taskEntity
=
(
TaskEntity
)
putOutStorageDate
;
CountyListEntity
countyListEntity
=
(
CountyListEntity
)
outStorageCount
;
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
int
i
=
taskService
.
updateOutBoundDate
(
taskEntity
,
countyListEntity
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
// /**
// * 下载交接单;
...
...
@@ -733,11 +746,11 @@ public class UserApi {
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
);
sheet
.
setColumnWidth
(
0
,
30
*
100
);
sheet
.
setColumnWidth
(
1
,
30
*
70
);
sheet
.
setColumnWidth
(
2
,
30
*
80
);
sheet
.
setColumnWidth
(
3
,
30
*
50
);
sheet
.
setColumnWidth
(
4
,
30
*
110
);
HSSFPrintSetup
ps
=
sheet
.
getPrintSetup
();
ps
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
...
...
@@ -1021,11 +1034,11 @@ public class UserApi {
//创建分单
//创建辖区合单
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
);
mergeSheet
.
setColumnWidth
(
0
,
30
*
115
);
mergeSheet
.
setColumnWidth
(
1
,
30
*
70
);
mergeSheet
.
setColumnWidth
(
2
,
30
*
80
);
mergeSheet
.
setColumnWidth
(
3
,
30
*
50
);
mergeSheet
.
setColumnWidth
(
4
,
30
*
110
);
HSSFPrintSetup
ps1
=
mergeSheet
.
getPrintSetup
();
ps1
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
...
...
@@ -1220,13 +1233,13 @@ public class UserApi {
mergeSheet
.
addMergedRegion
(
callRangeb
);
lineNum
++;
}
else
{
sheet
=
wb
.
createSheet
(
a
+
"-"
+
(
String
)
map
.
get
(
"COUNTYNAME"
));
sheet
=
wb
.
createSheet
(
a
+
"-"
+
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
);
sheet
.
setColumnWidth
(
0
,
30
*
100
);
sheet
.
setColumnWidth
(
1
,
30
*
70
);
sheet
.
setColumnWidth
(
2
,
30
*
80
);
sheet
.
setColumnWidth
(
3
,
30
*
50
);
sheet
.
setColumnWidth
(
4
,
30
*
110
);
HSSFPrintSetup
ps2
=
sheet
.
getPrintSetup
();
ps2
.
setLandscape
(
true
);
// 打印方向,true:横向,false:纵向
...
...
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