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
14170667
Commit
14170667
authored
Apr 28, 2019
by
dahai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加审核耗材管理API
修改添加耗材管理状态
parent
04db94e3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
51 deletions
+145
-51
MaterialManagementApi.java
...n/java/com/yxproject/start/api/MaterialManagementApi.java
+45
-4
CardBodyEntity.java
src/main/java/com/yxproject/start/entity/CardBodyEntity.java
+28
-17
PlasticFilmEntity.java
...in/java/com/yxproject/start/entity/PlasticFilmEntity.java
+17
-5
MaterialManagementMapper.java
.../com/yxproject/start/mapper/MaterialManagementMapper.java
+17
-11
MaterialManagementService.java
...om/yxproject/start/service/MaterialManagementService.java
+11
-6
MaterialManagementServiceImpl.java
...ect/start/service/impl/MaterialManagementServiceImpl.java
+27
-8
No files found.
src/main/java/com/yxproject/start/api/MaterialManagementApi.java
View file @
14170667
...
...
@@ -26,8 +26,8 @@ public class MaterialManagementApi {
* @return
*/
@RequestMapping
(
"insertFilm"
)
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
){
boolean
result
=
materialManagementService
.
insertFilm
(
totalCount
,
plasticFilmType
,
note
,
name
);
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"state"
)
String
state
){
boolean
result
=
materialManagementService
.
insertFilm
(
totalCount
,
plasticFilmType
,
note
,
name
,
Long
.
valueOf
(
state
)
);
return
result
;
}
...
...
@@ -39,8 +39,8 @@ public class MaterialManagementApi {
* @return
*/
@RequestMapping
(
"insertCardBody"
)
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
String
cardBodyType
){
boolean
result
=
materialManagementService
.
insertCardBody
(
cardType
,
totalCount
,
note
,
name
,
cardBodyType
);
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
String
cardBodyType
,
@Param
(
"state"
)
String
state
){
boolean
result
=
materialManagementService
.
insertCardBody
(
cardType
,
totalCount
,
note
,
name
,
cardBodyType
,
Long
.
valueOf
(
state
)
);
return
result
;
}
...
...
@@ -108,6 +108,47 @@ public class MaterialManagementApi {
}
/**
* 更新卡体详情状态
* @param id cardBodyID
* @return
*/
@RequestMapping
(
"updateCardBody"
)
public
boolean
updateCardBody
(
@Param
(
"id"
)
String
id
){
return
materialManagementService
.
updateCardBodyState
(
Long
.
valueOf
(
id
));
}
/**
* 查询未审核卡体详情
*/
@RequestMapping
(
"selectCardBody"
)
public
List
<
CardBodyEntity
>
selectCardBody
(){
return
materialManagementService
.
selectCardBody
();
}
/**
* 更新膜详情状态
* @param id cardBodyID
* @return
*/
@RequestMapping
(
"updatePlasticFilm"
)
public
boolean
updatePlasticFilm
(
@Param
(
"id"
)
String
id
){
return
materialManagementService
.
updatePlasticFilm
(
Long
.
valueOf
(
id
));
}
/**
* 查询未审核膜详情
*/
@RequestMapping
(
"selectPlasticFilm"
)
public
List
<
PlasticFilmEntity
>
selectPlasticFilm
(){
return
materialManagementService
.
selectPlasticFilm
();
}
...
...
src/main/java/com/yxproject/start/entity/CardBodyEntity.java
View file @
14170667
...
...
@@ -2,23 +2,23 @@ package com.yxproject.start.entity;
import
javax.persistence.*
;
import
java.sql.Time
;
import
java.util.Date
;
import
java.util.Objects
;
/**
* @auther zhangyusheng
* 2019/4/
1 15:03
* 2019/4/
28 15:12
*/
@Entity
@Table
(
name
=
"CARD_BODY"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
public
class
CardBodyEntity
{
private
long
cardBodyId
;
private
Dat
e
saveDate
;
private
Tim
e
saveDate
;
private
Long
cardType
;
private
Long
totalCount
;
private
String
note
;
private
String
name
;
private
Long
cardBodyType
;
private
String
name
;
private
long
state
;
@Id
@Column
(
name
=
"CARD_BODY_ID"
)
...
...
@@ -32,11 +32,11 @@ public class CardBodyEntity {
@Basic
@Column
(
name
=
"SAVE_DATE"
)
public
Dat
e
getSaveDate
()
{
public
Tim
e
getSaveDate
()
{
return
saveDate
;
}
public
void
setSaveDate
(
Dat
e
saveDate
)
{
public
void
setSaveDate
(
Tim
e
saveDate
)
{
this
.
saveDate
=
saveDate
;
}
...
...
@@ -70,6 +70,16 @@ public class CardBodyEntity {
this
.
note
=
note
;
}
@Basic
@Column
(
name
=
"CARD_BODY_TYPE"
)
public
Long
getCardBodyType
()
{
return
cardBodyType
;
}
public
void
setCardBodyType
(
Long
cardBodyType
)
{
this
.
cardBodyType
=
cardBodyType
;
}
@Basic
@Column
(
name
=
"NAME"
)
public
String
getName
()
{
...
...
@@ -80,12 +90,23 @@ public class CardBodyEntity {
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"STATE"
)
public
long
getState
()
{
return
state
;
}
public
void
setState
(
long
state
)
{
this
.
state
=
state
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
CardBodyEntity
that
=
(
CardBodyEntity
)
o
;
return
cardBodyId
==
that
.
cardBodyId
&&
state
==
that
.
state
&&
Objects
.
equals
(
saveDate
,
that
.
saveDate
)
&&
Objects
.
equals
(
cardType
,
that
.
cardType
)
&&
Objects
.
equals
(
totalCount
,
that
.
totalCount
)
&&
...
...
@@ -96,16 +117,6 @@ public class CardBodyEntity {
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
cardBodyId
,
saveDate
,
cardBodyType
,
cardType
,
totalCount
,
note
,
name
);
}
@Basic
@Column
(
name
=
"CARD_BODY_TYPE"
)
public
Long
getCardBodyType
()
{
return
cardBodyType
;
}
public
void
setCardBodyType
(
Long
cardBodyType
)
{
this
.
cardBodyType
=
cardBodyType
;
return
Objects
.
hash
(
cardBodyId
,
saveDate
,
cardType
,
totalCount
,
note
,
cardBodyType
,
name
,
state
);
}
}
src/main/java/com/yxproject/start/entity/PlasticFilmEntity.java
View file @
14170667
...
...
@@ -6,17 +6,18 @@ import java.util.Objects;
/**
* @auther zhangyusheng
* 2019/4/
1 15:04
* 2019/4/
28 15:12
*/
@Entity
@Table
(
name
=
"PLASTIC_FILM"
,
schema
=
"YINGXIN"
,
catalog
=
""
)
public
class
PlasticFilmEntity
{
private
long
plasticFilmId
;
private
String
saveDate
;
private
Time
saveDate
;
private
Long
totalCount
;
private
Long
plasticFilmType
;
private
String
note
;
private
String
name
;
private
long
state
;
@Id
@Column
(
name
=
"PLASTIC_FILM_ID"
)
...
...
@@ -30,11 +31,11 @@ public class PlasticFilmEntity {
@Basic
@Column
(
name
=
"SAVE_DATE"
)
public
String
getSaveDate
()
{
public
Time
getSaveDate
()
{
return
saveDate
;
}
public
void
setSaveDate
(
String
saveDate
)
{
public
void
setSaveDate
(
Time
saveDate
)
{
this
.
saveDate
=
saveDate
;
}
...
...
@@ -78,12 +79,23 @@ public class PlasticFilmEntity {
this
.
name
=
name
;
}
@Basic
@Column
(
name
=
"STATE"
)
public
long
getState
()
{
return
state
;
}
public
void
setState
(
long
state
)
{
this
.
state
=
state
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
PlasticFilmEntity
that
=
(
PlasticFilmEntity
)
o
;
return
plasticFilmId
==
that
.
plasticFilmId
&&
state
==
that
.
state
&&
Objects
.
equals
(
saveDate
,
that
.
saveDate
)
&&
Objects
.
equals
(
totalCount
,
that
.
totalCount
)
&&
Objects
.
equals
(
plasticFilmType
,
that
.
plasticFilmType
)
&&
...
...
@@ -93,6 +105,6 @@ public class PlasticFilmEntity {
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
plasticFilmId
,
saveDate
,
totalCount
,
plasticFilmType
,
note
,
name
);
return
Objects
.
hash
(
plasticFilmId
,
saveDate
,
totalCount
,
plasticFilmType
,
note
,
name
,
state
);
}
}
src/main/java/com/yxproject/start/mapper/MaterialManagementMapper.java
View file @
14170667
...
...
@@ -2,19 +2,14 @@ package com.yxproject.start.mapper;
import
com.yxproject.start.entity.CardBodyEntity
;
import
com.yxproject.start.entity.PlasticFilmEntity
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
MaterialManagementMapper
{
@Insert
(
"INSERT INTO PLASTIC_FILM (TOTAL_COUNT,PLASTIC_FILM_TYPE,NOTE,name
)VALUES(#{totalCount},#{plasticFilmType},#{note},#{nam
e})"
)
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
);
@Insert
(
"INSERT INTO PLASTIC_FILM (TOTAL_COUNT,PLASTIC_FILM_TYPE,NOTE,name
,state) VALUES(#{totalCount},#{plasticFilmType},#{note},#{name},#{stat
e})"
)
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"state"
)
long
state
);
@Select
(
"<script>"
+
"select * from plastic_film where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate}"
+
...
...
@@ -50,8 +45,8 @@ public interface MaterialManagementMapper {
public
String
selectFilmCount2
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"name"
)
String
name
);
@Insert
(
"INSERT INTO CARD_BODY (CARD_TYPE,TOTAL_COUNT,NOTE,name,CARD_BODY_TYPE
)VALUES(#{cardType},#{totalCount},#{note},#{name},#{cardBodyTyp
e})"
)
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
long
cardBodyType
);
@Insert
(
"INSERT INTO CARD_BODY (CARD_TYPE,TOTAL_COUNT,NOTE,name,CARD_BODY_TYPE
,state)VALUES(#{cardType},#{totalCount},#{note},#{name},#{cardBodyType},#{stat
e})"
)
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
long
cardBodyType
,
@Param
(
"state"
)
long
state
);
@Select
(
"<script>"
+
...
...
@@ -66,7 +61,7 @@ public interface MaterialManagementMapper {
" and card_Body_Type =#{cardBodyType} "
+
"</if>"
+
"</script>"
)
public
List
<
CardBodyEntity
>
selectCardBody
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
String
cardBodyType
);
public
List
<
CardBodyEntity
>
selectCardBody
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"name"
)
String
name
,
@Param
(
"cardBodyType"
)
String
cardBodyType
);
@Select
(
"<script>"
+
"select sum(TOTAL_COUNT) cardType1 from CARD_BODY where to_char(save_date,'yyyyMMdd') BETWEEN #{beginDate} and #{endDate} and CARD_TYPE=1"
+
...
...
@@ -90,4 +85,15 @@ public interface MaterialManagementMapper {
"</script>"
)
public
String
selectCardCount2
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
@Param
(
"typeCode"
)
String
typeCode
,
@Param
(
"name"
)
String
name
);
@Select
(
"select * from card_body where state = 0"
)
public
List
<
CardBodyEntity
>
selectCardBodyByState
();
@Select
(
"select * from Plastic_Film where state = 0"
)
public
List
<
PlasticFilmEntity
>
selectPlasticFilmByState
();
@Update
(
"update card_body set state =1 where CARD_BODY_ID = #{id}"
)
public
boolean
updateCardBodyState
(
long
id
);
@Update
(
"update PLASTIC_FILM set state =1 where PLASTIC_FILM_ID = #{id}"
)
public
boolean
updatePlasticFilmState
(
long
id
);
}
src/main/java/com/yxproject/start/service/MaterialManagementService.java
View file @
14170667
...
...
@@ -4,19 +4,17 @@ import com.yxproject.start.entity.CardBodyEntity;
import
com.yxproject.start.entity.PlasticFilmEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
public
interface
MaterialManagementService
{
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
String
name
);
public
boolean
insertFilm
(
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"plasticFilmType"
)
String
plasticFilmType
,
@Param
(
"note"
)
String
note
,
String
name
,
long
state
);
public
List
<
PlasticFilmEntity
>
selectFilm
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
);
public
List
<
PlasticFilmEntity
>
selectFilm
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
);
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
String
name
,
String
cardBodyType
);
public
boolean
insertCardBody
(
@Param
(
"cardType"
)
String
cardType
,
@Param
(
"totalCount"
)
String
totalCount
,
@Param
(
"note"
)
String
note
,
String
name
,
String
cardBodyType
,
long
state
);
public
List
<
CardBodyEntity
>
selectCardBody
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
,
String
cardBodyType
);
public
List
<
CardBodyEntity
>
selectCardBody
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
,
String
cardBodyType
);
public
String
selectFilmCount1
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
);
...
...
@@ -26,5 +24,12 @@ public interface MaterialManagementService {
public
String
selectCardCount2
(
@Param
(
"beginDate"
)
String
beginDate
,
@Param
(
"endDate"
)
String
endDate
,
String
typeCode
,
String
name
);
public
boolean
updateCardBodyState
(
long
id
);
public
List
<
CardBodyEntity
>
selectCardBody
();
public
boolean
updatePlasticFilm
(
long
id
);
public
List
<
PlasticFilmEntity
>
selectPlasticFilm
();
}
src/main/java/com/yxproject/start/service/impl/MaterialManagementServiceImpl.java
View file @
14170667
...
...
@@ -7,34 +7,32 @@ import com.yxproject.start.service.MaterialManagementService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
MaterialManagementServiceImpl
implements
MaterialManagementService
{
@Autowired
private
MaterialManagementMapper
materialManagementMapper
;
@Override
public
boolean
insertFilm
(
String
totalCount
,
String
plasticFilmType
,
String
note
,
String
name
)
{
materialManagementMapper
.
insertFilm
(
totalCount
,
plasticFilmType
,
note
,
name
);
public
boolean
insertFilm
(
String
totalCount
,
String
plasticFilmType
,
String
note
,
String
name
,
long
state
)
{
materialManagementMapper
.
insertFilm
(
totalCount
,
plasticFilmType
,
note
,
name
,
state
);
return
true
;
}
@Override
public
List
<
PlasticFilmEntity
>
selectFilm
(
String
beginDate
,
String
endDate
,
String
typeCode
,
String
name
)
{
public
List
<
PlasticFilmEntity
>
selectFilm
(
String
beginDate
,
String
endDate
,
String
typeCode
,
String
name
)
{
List
<
PlasticFilmEntity
>
resultList
=
materialManagementMapper
.
selectFilm
(
beginDate
,
endDate
,
typeCode
,
name
);
return
resultList
;
}
@Override
public
boolean
insertCardBody
(
String
cardType
,
String
totalCount
,
String
note
,
String
name
,
String
cardBodyType
)
{
materialManagementMapper
.
insertCardBody
(
cardType
,
totalCount
,
note
,
name
,
Long
.
valueOf
(
cardBodyType
));
public
boolean
insertCardBody
(
String
cardType
,
String
totalCount
,
String
note
,
String
name
,
String
cardBodyType
,
long
state
)
{
materialManagementMapper
.
insertCardBody
(
cardType
,
totalCount
,
note
,
name
,
Long
.
valueOf
(
cardBodyType
)
,
state
);
return
true
;
}
@Override
public
List
<
CardBodyEntity
>
selectCardBody
(
String
beginDate
,
String
endDate
,
String
typeCode
,
String
name
,
String
cardBodyType
)
{
public
List
<
CardBodyEntity
>
selectCardBody
(
String
beginDate
,
String
endDate
,
String
typeCode
,
String
name
,
String
cardBodyType
)
{
List
<
CardBodyEntity
>
resultList
=
materialManagementMapper
.
selectCardBody
(
beginDate
,
endDate
,
typeCode
,
name
,
cardBodyType
);
return
resultList
;
}
...
...
@@ -64,4 +62,25 @@ public class MaterialManagementServiceImpl implements MaterialManagementService
}
@Override
public
boolean
updateCardBodyState
(
long
id
)
{
return
materialManagementMapper
.
updateCardBodyState
(
id
);
}
@Override
public
List
<
CardBodyEntity
>
selectCardBody
()
{
return
materialManagementMapper
.
selectCardBodyByState
();
}
@Override
public
boolean
updatePlasticFilm
(
long
id
)
{
return
materialManagementMapper
.
updatePlasticFilmState
(
id
);
}
@Override
public
List
<
PlasticFilmEntity
>
selectPlasticFilm
()
{
return
materialManagementMapper
.
selectPlasticFilmByState
();
}
}
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