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
b4f788e6
Commit
b4f788e6
authored
Dec 21, 2018
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了插入出入库数并更新出入库时间
parent
5460e796
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
92 deletions
+119
-92
UserApi.java
src/main/java/com/yxproject/start/api/UserApi.java
+48
-47
CountyListMapper.java
...ain/java/com/yxproject/start/mapper/CountyListMapper.java
+4
-1
TaskMapper.java
src/main/java/com/yxproject/start/mapper/TaskMapper.java
+3
-3
CountyListService.java
...n/java/com/yxproject/start/service/CountyListService.java
+1
-1
TaskService.java
src/main/java/com/yxproject/start/service/TaskService.java
+1
-1
CountyListServiceImpl.java
...m/yxproject/start/service/impl/CountyListServiceImpl.java
+20
-10
TaskServiceImpl.java
...ava/com/yxproject/start/service/impl/TaskServiceImpl.java
+18
-18
CountyListMapper.xml
src/main/resources/mapper/CountyListMapper.xml
+17
-4
TaskMapper.xml
src/main/resources/mapper/TaskMapper.xml
+7
-7
No files found.
src/main/java/com/yxproject/start/api/UserApi.java
View file @
b4f788e6
...
...
@@ -520,30 +520,30 @@ public class UserApi {
*
* @return
*/
@RequestMapping
(
"revise
Bound
Count"
)
@RequestMapping
(
"revise
Storage
Count"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
revise
BoundCount
(
@RequestParam
(
"countyListId"
)
String
countyListId
,
@RequestParam
(
"outStorageCount"
)
String
out_Storage_Count
,
@RequestParam
(
"inStorageCount"
)
String
in
_Storage_Count
,
HttpServletResponse
resp
)
{
int
i
=
countyListService
.
revise
BoundCount
(
countyListId
,
out_Storage_Count
,
in
_Storage_Count
);
public
String
revise
StorageCount
(
@RequestParam
(
"taskListId"
)
String
taskListId
,
@RequestParam
(
"countyCode"
)
String
countyCode
,
@RequestParam
(
"inStorageCount"
)
String
in_Storage_Count
,
@RequestParam
(
"outStorageCount"
)
String
out
_Storage_Count
,
HttpServletResponse
resp
)
{
int
i
=
countyListService
.
revise
StorageCount
(
taskListId
,
countyCode
,
in_Storage_Count
,
out
_Storage_Count
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"--更新成功--"
);
return
yxjsonResponse
.
toJSONString
();
}
/**
* 更新入库时间
* 前端空值
* @return
*/
@RequestMapping
(
"updateInStorageDate"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
String
updateInStorageDate
(
@RequestParam
(
"taskListId"
)
String
taskListId
,
@RequestParam
(
"inStorageCount"
)
String
inStorageCount
,
@RequestParam
(
"outStorageCount"
)
String
outStorageCount
,
HttpServletResponse
resp
)
{
int
i
=
taskService
.
updateStorageDate
(
taskListId
,
inStorageCount
,
outStorageCount
);
YXJSONResponse
yxjsonResponse
=
new
YXJSONResponse
();
resp
.
setCharacterEncoding
(
"UTF-8"
);
yxjsonResponse
.
outPutSuccess
(
i
+
"更新成功"
);
return
yxjsonResponse
.
toJSONString
();
}
//
/**
//
* 更新入库时间
//
* 前端空值
//
* @return
//
*/
//
@RequestMapping("updateInStorageDate")
//
//
@RequiresPermissions("userInfo.add")//权限管理;
//
public String updateInStorageDate(@RequestParam("taskListId") String taskListId,@RequestParam("inStorageCount") String inStorageCount,@RequestParam("outStorageCount") String outStorageCount, HttpServletResponse resp) {
//
int i = taskService.updateStorageDate(taskListId,inStorageCount,outStorageCount);
//
YXJSONResponse yxjsonResponse = new YXJSONResponse();
//
resp.setCharacterEncoding("UTF-8");
//
yxjsonResponse.outPutSuccess(i + "更新成功");
//
return yxjsonResponse.toJSONString();
//
}
// /**
// * 更新出库时间
...
...
@@ -582,36 +582,6 @@ public class UserApi {
return
yxjsonResponse
.
toJSONString
();
}
/**
* 下载装箱单
*/
@RequestMapping
(
"printPackingList"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
byte
[]
printPackingList
(
@RequestParam
(
"cyclesheetID"
)
String
taskID
,
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
=
groupNoService
.
findCountyInfoList
(
taskID
);
List
<
TaskEntity
>
taskEntities
=
taskService
.
findProductionTaskListEntityByID
(
Long
.
valueOf
(
taskID
));
fout
=
exportExcel
(
countyInfoList
,
taskEntities
.
get
(
0
).
getCard_Type
()
+
""
,
"p1"
,
6000
,
taskEntities
.
get
(
0
).
getCitycode
(),
dateTime
,
taskID
);
String
outFile
=
dateTime
+
taskEntities
.
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
;
}
/**
* 下载交接单
...
...
@@ -898,6 +868,37 @@ public class UserApi {
// return "D:\\" + simpleDateFormat.format(new Date()) + list.get(0).getString("COUNTYNAME") + ".xls";
}
/**
* 下载装箱单
*/
@RequestMapping
(
"printPackingList"
)
// @RequiresPermissions("userInfo.add")//权限管理;
public
byte
[]
printPackingList
(
@RequestParam
(
"cyclesheetID"
)
String
taskID
,
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
=
groupNoService
.
findCountyInfoList
(
taskID
);
List
<
TaskEntity
>
taskEntities
=
taskService
.
findProductionTaskListEntityByID
(
Long
.
valueOf
(
taskID
));
fout
=
exportExcel
(
countyInfoList
,
taskEntities
.
get
(
0
).
getCard_Type
()
+
""
,
"p1"
,
6000
,
taskEntities
.
get
(
0
).
getCitycode
(),
dateTime
,
taskID
);
String
outFile
=
dateTime
+
taskEntities
.
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
;
}
/**
* 下载装箱单
*
...
...
src/main/java/com/yxproject/start/mapper/CountyListMapper.java
View file @
b4f788e6
...
...
@@ -17,9 +17,12 @@ import java.util.Map;
@Mapper
public
interface
CountyListMapper
{
public
List
<
CountyEntity
>
findCountyList
(
@Param
(
"taskListId"
)
String
taskListId
,
@Param
(
"taskStateId"
)
String
taskStateId
,
@Param
(
"cardType"
)
String
cardType
);
public
int
updateBoundCount
(
@Param
(
"county_List_Id"
)
String
county_List_Id
,
@Param
(
"out_Storage_Count"
)
String
out_Storage_Count
,
@Param
(
"in_Storage_Count"
)
String
in
_Storage_Count
);
public
int
reviseStorageCount
(
@Param
(
"taskListId"
)
String
taskListId
,
@Param
(
"countyCode"
)
String
countyCode
,
@Param
(
"in_Storage_Count"
)
String
in_Storage_Count
,
@Param
(
"out_Storage_Count"
)
String
out
_Storage_Count
);
public
List
<
ReceiptListEntity
>
getReceiptList
(
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"endDate"
)
String
endDate
);
public
List
<
CountyListEntity
>
findStorageCountByTaskListId
(
String
taskListId
);
public
int
totalFinshCount
();
public
int
totalInStorageCount
();
public
int
totalOutStorageCount
();
// public List<Map<String, Object>> PrintCountyListXML();
}
src/main/java/com/yxproject/start/mapper/TaskMapper.java
View file @
b4f788e6
...
...
@@ -18,9 +18,9 @@ public interface TaskMapper {
public
List
<
TaskEntity
>
findTaskEntityByAcceptNo
(
String
acceptNo
);
public
List
<
TaskEntity
>
findTaskEntityByState
(
int
state
);
public
int
replaceExceptionInformation
(
TaskEntity
taskEntity
);
public
int
totalNum
(
int
i
);
public
List
<
TypeListEntity
>
findTypeListByTaskStateId
(
String
taskStateId
);
public
List
<
CityListEntity
>
findCityList
(
@Param
(
"taskStateId"
)
String
taskStateId
,
@Param
(
"cardType"
)
String
cardType
);
public
int
updateOutStorageDate
(
@Param
(
"taskListId"
)
String
taskId
,
@Param
(
"inStorageCount"
)
String
inStorageCount
,
@Param
(
"outStorageCount"
)
String
outStorageCount
);
public
int
updateInStorageDate
(
String
taskListId
,
String
inStorageCount
,
String
outStorageCount
);
public
int
updateOutStorageDate
(
String
taskListId
);
public
int
updateInStorageDate
(
String
taskListId
);
public
int
updateStorageDate
(
String
taskListId
);
}
src/main/java/com/yxproject/start/service/CountyListService.java
View file @
b4f788e6
...
...
@@ -9,5 +9,5 @@ import java.util.Map;
public
interface
CountyListService
{
public
List
<
CountyListEntity
>
findStorageCountByTaskListId
(
String
taskListId
);
public
int
revise
BoundCount
(
String
county_List_Id
,
String
out_Storage_Count
,
String
in
_Storage_Count
);
public
int
revise
StorageCount
(
String
taskListId
,
String
countyCode
,
String
in_Storage_Count
,
String
out
_Storage_Count
);
}
src/main/java/com/yxproject/start/service/TaskService.java
View file @
b4f788e6
...
...
@@ -28,7 +28,7 @@ public interface TaskService {
public
int
addExceptionState
(
TaskEntity
state
);
public
int
updateStorageDate
(
String
taskListId
,
String
inStorageCount
,
String
outStorageCount
);
//
public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount);
...
...
src/main/java/com/yxproject/start/service/impl/CountyListServiceImpl.java
View file @
b4f788e6
...
...
@@ -2,10 +2,12 @@ package com.yxproject.start.service.impl;
import
com.yxproject.start.entity.CountyListEntity
;
import
com.yxproject.start.mapper.CountyListMapper
;
import
com.yxproject.start.mapper.TaskMapper
;
import
com.yxproject.start.service.CountyListService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -18,21 +20,29 @@ import java.util.Map;
public
class
CountyListServiceImpl
implements
CountyListService
{
@Autowired
public
CountyListMapper
countyListMapper
;
@Autowired
public
TaskMapper
taskMapper
;
@Override
public
int
reviseBoundCount
(
String
county_List_Id
,
String
out_Storage_Count
,
String
in_Storage_Count
)
{
int
i
=
0
;
if
(
out_Storage_Count
.
equals
(
0
)&&!
in_Storage_Count
.
equals
(
0
)){
i
=
countyListMapper
.
updateBoundCount
(
county_List_Id
,
out_Storage_Count
,
in_Storage_Count
);
public
int
reviseStorageCount
(
String
taskListId
,
String
countyCode
,
String
in_Storage_Count
,
String
out_Storage_Count
)
{
int
i
=
0
;
int
totalFinshCount
=
0
;
int
totalInStorageCount
=
0
;
int
totalOutStorageCount
=
0
;
totalFinshCount
=
countyListMapper
.
totalFinshCount
();
totalInStorageCount
=
countyListMapper
.
totalInStorageCount
();
totalOutStorageCount
=
countyListMapper
.
totalOutStorageCount
();
i
=
countyListMapper
.
reviseStorageCount
(
taskListId
,
countyCode
,
in_Storage_Count
,
out_Storage_Count
);
if
(
totalInStorageCount
==
totalFinshCount
){
taskMapper
.
updateInStorageDate
(
taskListId
);
}
if
(
!
out_Storage_Count
.
equals
(
0
)&&
in_Storage_Count
.
equals
(
0
)
){
i
=
countyListMapper
.
updateBoundCount
(
county_List_Id
,
out_Storage_Count
,
in_Storage_Count
);
if
(
totalOutStorageCount
==
totalFinshCount
){
taskMapper
.
updateOutStorageDate
(
taskListId
);
}
if
(
!
out_Storage_Count
.
equals
(
0
)&&!
in_Storage_Count
.
equals
(
0
)
){
i
=
countyListMapper
.
updateBoundCount
(
county_List_Id
,
out_Storage_Count
,
in_Storage_Count
);
if
(
totalInStorageCount
==
totalFinshCount
&&
totalOutStorageCount
==
totalFinshCount
){
taskMapper
.
updateStorageDate
(
taskListId
);
}
return
i
;
return
i
;
}
@Override
...
...
src/main/java/com/yxproject/start/service/impl/TaskServiceImpl.java
View file @
b4f788e6
...
...
@@ -433,24 +433,24 @@ public class TaskServiceImpl implements TaskService {
return
i
;
}
/**
* 更新出入库时间
* @param
* @return
*/
@Override
public
int
updateStorageDate
(
String
taskListId
,
String
inStorageCount
,
String
outStorageCount
)
{
int
i
=
0
;
i
=
taskMapper
.
totalNum
(
i
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
if
(
inStorageCount
.
equals
(
i
)){
return
taskMapper
.
updateInStorageDate
(
taskListId
,
inStorageCount
,
outStorageCount
);
}
if
(
outStorageCount
.
equals
(
i
)){
return
taskMapper
.
updateOutStorageDate
(
taskListId
,
inStorageCount
,
outStorageCount
);
}
return
0
;
}
//
/**
//
* 更新出入库时间
//
* @param
//
* @return
//
*/
//
@Override
//
public int updateStorageDate(String taskListId,String inStorageCount,String outStorageCount ) {
// int j
=0;
// j= taskMapper.totalNum(j
);
//
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
// if (inStorageCount.equals(j
)){
//
taskMapper.updateInStorageDate(taskListId,inStorageCount,outStorageCount);
//
}
// if(outStorageCount.equals(j
)){
//
taskMapper.updateOutStorageDate(taskListId,inStorageCount,outStorageCount);
//
}
//
return 0;
//
}
/**
...
...
src/main/resources/mapper/CountyListMapper.xml
View file @
b4f788e6
...
...
@@ -21,10 +21,6 @@
WHERE TASK.TASK_ID=#{taskListId} AND TASK.CARD_TYPE=#{cardType} AND TASK.TASK_STATE_ID=#{taskStateId}
</select>
<update
id=
"updateBoundCount"
parameterType=
"String"
>
update COUNTY_LIST SET OUT_STORAGE_COUNT =#{out_Storage_Count},IN_STORAGE_COUNT =#{in_Storage_Count} where COUNTY_LIST_ID =#{county_List_Id}
</update>
<select
id=
"getReceiptList"
resultType=
"com.yxproject.start.entity.ReceiptListEntity"
parameterType=
"String"
>
WITH
t_county
...
...
@@ -69,6 +65,23 @@
WHERE TASK_ID=#{task_Id}
</select>
<insert
id=
"reviseStorageCount"
parameterType=
"String"
>
INSERT INTO COUNTY_LIST (TASK_ID,COUNTY_CODE,IN_STORAGE_COUNT,OUT_STORAGE_COUNT) VALUES ( #{taskListId},#{countyCode},#{in_Storage_Count},#{out_Storage_Count} )
</insert>
<select
id=
"totalFinshCount"
resultType=
"Integer"
>
select nvl(SUM(FINISH_COUNT),0) FROM COUNTY_LIST
</select>
<select
id=
"totalInStorageCount"
resultType=
"Integer"
>
select nvl(SUM(IN_STORAGE_COUNT),0) FROM COUNTY_LIST
</select>
<select
id=
"totalOutStorageCount"
resultType=
"Integer"
>
select nvl(SUM(OUT_STORAGE_COUNT),0) FROM COUNTY_LIST
</select>
<!--<select id="PrintCountyListXML" resultType="com.yxproject.start.entity.CountyListEntity" parameterType="String">-->
<!--SELECT * FROM COUNTY_LIST-->
<!--</select>-->
...
...
src/main/resources/mapper/TaskMapper.xml
View file @
b4f788e6
...
...
@@ -72,16 +72,16 @@
update TASK set exception_Information = NULL and IS_EXCEPTION =#{is_Exception} where TASK_ID =#{task_Id}
</update>
<
select
id=
"totalNum"
resultType=
"Integer
"
>
select nvl(SUM(VALID_COUNT),0) FROM GROUP_NO
</
select
>
<
update
id=
"updateOutStorageDate
"
>
UPDATE TASK SET OUT_STORAGE_DATE = SYSDATE WHERE TASK_ID = #{taskListId}
</
update
>
<update
id=
"update
OutStorageDate"
parameterType=
"String"
>
update TASK SET OUT_STORAGE_DATE = SYSDATE where TASK_ID =#{task_
Id}
<update
id=
"update
InStorageDate"
>
UPDATE TASK SET IN_STORAGE_DATE = SYSDATE WHERE TASK_ID = #{taskList
Id}
</update>
<update
id=
"update
InStorageDate"
parameterType=
"String"
>
update TASK SET IN_STORAGE_DATE = SYSDATE where TASK_ID =#{task_
Id}
<update
id=
"update
StorageDate"
>
UPDATE TASK SET IN_STORAGE_DATE = SYSDATE , OUT_STORAGE_DATE = SYSDATE WHERE TASK_ID = #{taskList
Id}
</update>
<select
id=
"findTypeListByTaskStateId"
resultType=
"com.yxproject.start.entity.TypeListEntity"
parameterType=
"String"
>
...
...
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