Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
YX_IDENT_beijing_auxiliary_YD
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangyusheng
YX_IDENT_beijing_auxiliary_YD
Commits
6f50c5b4
Commit
6f50c5b4
authored
Mar 11, 2019
by
suichenguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据核验
parent
a097571e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
14 deletions
+37
-14
ReceiptApi.java
src/main/java/com/yxproject/start/api/ReceiptApi.java
+17
-0
ReceiptListApi.java
src/main/java/com/yxproject/start/api/ReceiptListApi.java
+0
-14
ReceiptMapper.java
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
+10
-0
ReceiptService.java
...main/java/com/yxproject/start/service/ReceiptService.java
+3
-0
ReceiptServiceImpl.java
.../com/yxproject/start/service/impl/ReceiptServiceImpl.java
+7
-0
No files found.
src/main/java/com/yxproject/start/api/ReceiptApi.java
View file @
6f50c5b4
...
...
@@ -7,6 +7,9 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -102,4 +105,18 @@ public class ReceiptApi {
return
resultList
;
}
@RequestMapping
(
"updateReceiptList"
)
public
boolean
updateReceiptList
(
@Param
(
"receiptId"
)
int
receiptId
,
@Param
(
"checkName"
)
String
chechName
){
SimpleDateFormat
dt
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
//设置日期格式
try
{
Date
date
=
dt
.
parse
(
dt
.
format
(
new
Date
()));
receiptService
.
updateReceiptList
(
receiptId
,
chechName
,
date
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
return
true
;
}
}
src/main/java/com/yxproject/start/api/ReceiptListApi.java
deleted
100644 → 0
View file @
a097571e
package
com
.
yxproject
.
start
.
api
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @auther zhangyusheng
* 2019/3/1 21:39
*/
@RestController
@RequestMapping
(
"receiptList"
)
public
class
ReceiptListApi
{
}
src/main/java/com/yxproject/start/mapper/ReceiptMapper.java
View file @
6f50c5b4
...
...
@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import
org.apache.ibatis.annotations.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -81,5 +82,14 @@ public interface ReceiptMapper {
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
String
receiptId
);
//根据传入的交接单ID和复核人ID插入复核人、复核时间
@Update
(
"update receipt_list set \n"
+
"check_date = #{date},\n"
+
"check_name=#{checkName} \n"
+
"where id=#{receiptId}"
)
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
);
}
src/main/java/com/yxproject/start/service/ReceiptService.java
View file @
6f50c5b4
...
...
@@ -2,6 +2,7 @@ package com.yxproject.start.service;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -28,4 +29,6 @@ public interface ReceiptService {
public
Map
<
String
,
Object
>
selectReceiptList
(
String
id
);
public
List
<
Map
<
String
,
Object
>>
selectDetailList
(
String
receiptId
);
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
);
}
src/main/java/com/yxproject/start/service/impl/ReceiptServiceImpl.java
View file @
6f50c5b4
...
...
@@ -5,6 +5,7 @@ import com.yxproject.start.service.ReceiptService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -79,5 +80,11 @@ public class ReceiptServiceImpl implements ReceiptService {
return
resultList
;
}
@Override
public
boolean
updateReceiptList
(
int
receiptId
,
String
checkName
,
Date
date
)
{
receiptMapper
.
updateReceiptList
(
receiptId
,
checkName
,
date
);
return
true
;
}
}
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