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
01d623dd
Commit
01d623dd
authored
Apr 30, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加并修改查询提交人提交的废证详情
parent
8c4dd12e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
4 deletions
+67
-4
FailedCardApi.java
src/main/java/com/yxproject/start/api/FailedCardApi.java
+25
-0
FailedCardEntity.java
...ain/java/com/yxproject/start/entity/FailedCardEntity.java
+27
-3
FailedCardMapper.java
...ain/java/com/yxproject/start/mapper/FailedCardMapper.java
+9
-0
FailedCardService.java
...n/java/com/yxproject/start/service/FailedCardService.java
+2
-0
FailedCardServiceImpl.java
...m/yxproject/start/service/impl/FailedCardServiceImpl.java
+4
-1
No files found.
src/main/java/com/yxproject/start/api/FailedCardApi.java
View file @
01d623dd
package
com
.
yxproject
.
start
.
api
;
import
com.yxproject.start.entity.FailedCardEntity
;
import
com.yxproject.start.entity.FailedCardReasonDicEntity
;
import
com.yxproject.start.entity.SpecialCardEntity
;
import
com.yxproject.start.entity.TaskEntity
;
...
...
@@ -11,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
...
...
@@ -64,6 +66,20 @@ public class FailedCardApi {
return
resultList
;
}
/**
* 查询提交人上传的废证详情
* @param date 提交日期
* @param name 提交人姓名
* @return
*/
@RequestMapping
(
"queryFailedCardInfo"
)
public
List
<
FailedCardEntity
>
queryFailedCardInfo
(
@RequestParam
(
"date"
)
String
date
,
@RequestParam
(
"name"
)
String
name
)
{
List
<
FailedCardEntity
>
failedCardEntities
=
failedCardService
.
selectFailedCardInfo
(
replaceDate
(
date
),
name
);
return
failedCardEntities
;
}
/**
* 添加废证
*
...
...
@@ -190,6 +206,15 @@ public class FailedCardApi {
}
return
true
;
}
/**
* 去除字符串中中线
*
* @param str
* @return
*/
private
String
replaceDate
(
String
str
)
{
return
str
.
replace
(
"-"
,
""
).
replace
(
" "
,
""
).
replace
(
":"
,
""
);
}
}
src/main/java/com/yxproject/start/entity/FailedCardEntity.java
View file @
01d623dd
...
...
@@ -6,7 +6,7 @@ import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/
1 10:42
* 2019/4/
30 10:05
*/
@Entity
@Table
(
name
=
"FAILED_CARD"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
...
...
@@ -23,6 +23,8 @@ public class FailedCardEntity {
private
Long
initiator
;
private
String
note
;
private
Long
workGroup
;
private
String
name
;
private
Time
submitDate
;
@Id
@Column
(
name
=
"FAILED_CARD_ID"
)
...
...
@@ -144,6 +146,26 @@ public class FailedCardEntity {
this
.
workGroup
=
workGroup
;
}
@Basic
@Column
(
name
=
"NAME"
)
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"SUBMIT_DATE"
)
public
Time
getSubmitDate
()
{
return
submitDate
;
}
public
void
setSubmitDate
(
Time
submitDate
)
{
this
.
submitDate
=
submitDate
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
...
...
@@ -160,11 +182,13 @@ public class FailedCardEntity {
Objects
.
equals
(
state
,
that
.
state
)
&&
Objects
.
equals
(
initiator
,
that
.
initiator
)
&&
Objects
.
equals
(
note
,
that
.
note
)
&&
Objects
.
equals
(
workGroup
,
that
.
workGroup
);
Objects
.
equals
(
workGroup
,
that
.
workGroup
)
&&
Objects
.
equals
(
name
,
that
.
name
)
&&
Objects
.
equals
(
submitDate
,
that
.
submitDate
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
failedCardId
,
failedCardReasonId
,
acceptNo
,
taskId
,
positionDate
,
finishDate
,
allotDate
,
printDate
,
state
,
initiator
,
note
,
workGroup
);
return
Objects
.
hash
(
failedCardId
,
failedCardReasonId
,
acceptNo
,
taskId
,
positionDate
,
finishDate
,
allotDate
,
printDate
,
state
,
initiator
,
note
,
workGroup
,
name
,
submitDate
);
}
}
src/main/java/com/yxproject/start/mapper/FailedCardMapper.java
View file @
01d623dd
...
...
@@ -143,4 +143,13 @@ public interface FailedCardMapper {
" WHERE PROD_CARD_T.ID_NO=#{id} or PROD_CARD_T.ACCEPT_NO=#{id}"
)
public
Map
<
String
,
Object
>
selectDataById
(
String
id
);
/**
* 查询提交人提交的废证详情
* @param date 提交日期
* @param name 提交人姓名
* @return
*/
@Select
(
"select * from failed_card where name = #{name} and to_char(submit_date,'yyyyMMdd') = #{date}"
)
public
List
<
FailedCardEntity
>
selectFailedCardInfo
(
@Param
(
"date"
)
String
date
,
@Param
(
"name"
)
String
name
);
}
src/main/java/com/yxproject/start/service/FailedCardService.java
View file @
01d623dd
...
...
@@ -40,5 +40,7 @@ public interface FailedCardService {
public
Map
<
String
,
Object
>
selectDataById
(
String
id
);
public
List
<
FailedCardEntity
>
selectFailedCardInfo
(
String
date
,
String
name
);
}
src/main/java/com/yxproject/start/service/impl/FailedCardServiceImpl.java
View file @
01d623dd
...
...
@@ -132,5 +132,8 @@ public class FailedCardServiceImpl implements FailedCardService {
return
resultMap
;
}
@Override
public
List
<
FailedCardEntity
>
selectFailedCardInfo
(
String
date
,
String
name
)
{
return
failedCardMapper
.
selectFailedCardInfo
(
date
,
name
);
}
}
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