Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
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
吴迪
gs1-office-web-sit
Commits
f28c5bff
Commit
f28c5bff
authored
Nov 07, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】bug修改
parent
60135a7f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
2 deletions
+38
-2
sqlserver.sql
db/sqlserver.sql
+0
-0
MedicalController.java
...o/office/modules/manage/controller/MedicalController.java
+12
-0
MedicalDao.java
src/main/java/io/office/modules/manage/dao/MedicalDao.java
+2
-0
MedicalEntity.java
...n/java/io/office/modules/manage/entity/MedicalEntity.java
+2
-0
MedicalService.java
...java/io/office/modules/manage/service/MedicalService.java
+2
-0
MedicalServiceImpl.java
...ffice/modules/manage/service/impl/MedicalServiceImpl.java
+15
-0
MedicalDao.xml
src/main/resources/mapper/manage/MedicalDao.xml
+5
-2
No files found.
db/sqlserver.sql
View file @
f28c5bff
This diff is collapsed.
Click to expand it.
src/main/java/io/office/modules/manage/controller/MedicalController.java
View file @
f28c5bff
...
@@ -71,6 +71,7 @@ public class MedicalController extends AbstractController {
...
@@ -71,6 +71,7 @@ public class MedicalController extends AbstractController {
if
(
medical
.
getReleasetime
()==
null
)
{
if
(
medical
.
getReleasetime
()==
null
)
{
medical
.
setReleasetime
(
new
Date
());
medical
.
setReleasetime
(
new
Date
());
}
}
dealMedicalTypeId
(
medical
.
getType
(),
medical
);
medicalService
.
save
(
medical
);
medicalService
.
save
(
medical
);
return
R
.
ok
(
"新增成功!"
);
return
R
.
ok
(
"新增成功!"
);
}
}
...
@@ -87,6 +88,7 @@ public class MedicalController extends AbstractController {
...
@@ -87,6 +88,7 @@ public class MedicalController extends AbstractController {
medical
.
setEditor
(
username
);
medical
.
setEditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setLasteditor
(
username
);
medical
.
setUpdatetime
(
new
Date
());
medical
.
setUpdatetime
(
new
Date
());
dealMedicalTypeId
(
medical
.
getType
(),
medical
);
medicalService
.
updateById
(
medical
);
medicalService
.
updateById
(
medical
);
return
R
.
ok
(
"修改成功!"
);
return
R
.
ok
(
"修改成功!"
);
}
}
...
@@ -170,4 +172,14 @@ public class MedicalController extends AbstractController {
...
@@ -170,4 +172,14 @@ public class MedicalController extends AbstractController {
}
}
private
void
dealMedicalTypeId
(
String
type
,
MedicalEntity
medical
)
{
if
(
StringUtils
.
isNotBlank
(
type
))
{
String
medicalTypeId
=
medicalService
.
getMedicalTypeId
(
type
);
medical
.
setTypeid
(
Integer
.
parseInt
(
medicalTypeId
));
}
}
}
}
src/main/java/io/office/modules/manage/dao/MedicalDao.java
View file @
f28c5bff
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -20,4 +21,5 @@ public interface MedicalDao extends BaseMapper<MedicalEntity> {
...
@@ -20,4 +21,5 @@ public interface MedicalDao extends BaseMapper<MedicalEntity> {
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
String
getMedicalTypeId
(
@Param
(
"typeName"
)
String
typeName
);
}
}
src/main/java/io/office/modules/manage/entity/MedicalEntity.java
View file @
f28c5bff
...
@@ -37,6 +37,8 @@ public class MedicalEntity implements Serializable {
...
@@ -37,6 +37,8 @@ public class MedicalEntity implements Serializable {
* $column.comments
* $column.comments
*/
*/
private
String
type
;
private
String
type
;
@TableField
(
"typeid"
)
private
Integer
typeid
;
/**
/**
* $column.comments
* $column.comments
*/
*/
...
...
src/main/java/io/office/modules/manage/service/MedicalService.java
View file @
f28c5bff
...
@@ -20,5 +20,7 @@ public interface MedicalService extends IService<MedicalEntity> {
...
@@ -20,5 +20,7 @@ public interface MedicalService extends IService<MedicalEntity> {
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
List
<
Map
<
String
,
Object
>>
getMedicalTypeList
();
String
getMedicalTypeId
(
String
typeName
);
}
}
src/main/java/io/office/modules/manage/service/impl/MedicalServiceImpl.java
View file @
f28c5bff
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
io.netty.util.internal.StringUtil
;
import
io.netty.util.internal.StringUtil
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.dao.MedicalDao
;
import
io.office.modules.manage.entity.MedicalEntity
;
import
io.office.modules.manage.entity.MedicalEntity
;
...
@@ -37,10 +38,17 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
...
@@ -37,10 +38,17 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
}
else
{
}
else
{
medicalEntityQueryWrapper
.
gt
(
"level"
,
0
);
medicalEntityQueryWrapper
.
gt
(
"level"
,
0
);
}
}
if
(!
StringUtil
.
isNullOrEmpty
(
String
.
valueOf
(
params
.
get
(
"sidx"
)))){
if
(
String
.
valueOf
(
params
.
get
(
"sidx"
)).
equalsIgnoreCase
(
"type"
))
{
params
.
put
(
"sidx"
,
"typeid"
);
}
}
IPage
<
MedicalEntity
>
page
=
this
.
page
(
IPage
<
MedicalEntity
>
page
=
this
.
page
(
new
Query
<
MedicalEntity
>().
getPage
(
params
),
new
Query
<
MedicalEntity
>().
getPage
(
params
),
medicalEntityQueryWrapper
medicalEntityQueryWrapper
);
);
return
new
PageUtils
(
page
);
return
new
PageUtils
(
page
);
}
}
...
@@ -50,4 +58,10 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
...
@@ -50,4 +58,10 @@ public class MedicalServiceImpl extends ServiceImpl<MedicalDao, MedicalEntity> i
return
list
;
return
list
;
}
}
@Override
public
String
getMedicalTypeId
(
String
typeName
)
{
return
medicalDao
.
getMedicalTypeId
(
typeName
);
}
}
}
\ No newline at end of file
src/main/resources/mapper/manage/MedicalDao.xml
View file @
f28c5bff
...
@@ -20,8 +20,10 @@
...
@@ -20,8 +20,10 @@
<result
property=
"inputDate"
column=
"inputDate"
/>
<result
property=
"inputDate"
column=
"inputDate"
/>
</resultMap>
</resultMap>
<select
id=
"getMedicalTypeList"
resultType=
"java.util.Map"
>
<select
id=
"getMedicalTypeList"
resultType=
"java.util.Map"
>
select * from medical_type t
select * from medical_type t
order by t.id asc
</select>
</select>
<select
id=
"getMedicalTypeId"
parameterType=
"string"
resultType=
"string"
>
select * from medical_type where typeName=#{typeName}
</select>
</mapper>
</mapper>
\ No newline at end of file
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