Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huang.tao
/
jmai-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
30444162
authored
Jan 16, 2026
by
zhu.zewen
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
科室创建专账同时药房也创建一条对应专账
parent
8dbe3e15
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
21 deletions
jmai-physic/src/main/java/com/jmai/physic/dto/PhysicRecordQueryReq.java
jmai-physic/src/main/java/com/jmai/physic/entity/PhysicRecord.java
jmai-physic/src/main/java/com/jmai/physic/service/impl/PhysicRecordServiceImpl.java
jmai-physic/src/main/resources/mapper/PhysicRecordMapper.xml
jmai-physic/src/main/java/com/jmai/physic/dto/PhysicRecordQueryReq.java
View file @
30444162
...
@@ -9,12 +9,11 @@ import javax.validation.constraints.NotBlank;
...
@@ -9,12 +9,11 @@ import javax.validation.constraints.NotBlank;
@Data
@Data
public
class
PhysicRecordQueryReq
extends
PageReq
{
public
class
PhysicRecordQueryReq
extends
PageReq
{
@ApiModelProperty
(
"关键字"
)
@ApiModelProperty
(
"关键字"
)
private
String
keyword
;
private
String
keyword
;
@ApiModelProperty
(
value
=
"类型:2-药房,3-科室(参考组织部门)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"状态 0-待调配 1-待发药 2-已完成"
)
@ApiModelProperty
(
value
=
"状态 0-待调配 1-待发药 2-已完成"
)
private
Integer
status
;
private
Integer
status
;
...
...
jmai-physic/src/main/java/com/jmai/physic/entity/PhysicRecord.java
View file @
30444162
...
@@ -31,6 +31,9 @@ public class PhysicRecord extends BaseVersionEntity {
...
@@ -31,6 +31,9 @@ public class PhysicRecord extends BaseVersionEntity {
@ApiModelProperty
(
value
=
"药品数量"
)
@ApiModelProperty
(
value
=
"药品数量"
)
private
Integer
physicNum
;
private
Integer
physicNum
;
@ApiModelProperty
(
value
=
"类型:2-药房,3-科室(参考组织部门)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"患者姓名"
)
@ApiModelProperty
(
value
=
"患者姓名"
)
private
String
sickName
;
private
String
sickName
;
@ApiModelProperty
(
value
=
"患者性别"
)
@ApiModelProperty
(
value
=
"患者性别"
)
...
...
jmai-physic/src/main/java/com/jmai/physic/service/impl/PhysicRecordServiceImpl.java
View file @
30444162
...
@@ -52,6 +52,39 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
...
@@ -52,6 +52,39 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
public
List
<
PhysicRecord
>
physicRecordCreate
(
PhysicRecordCreateReq
req
)
{
public
List
<
PhysicRecord
>
physicRecordCreate
(
PhysicRecordCreateReq
req
)
{
List
<
PhysicRecord
>
records
=
new
ArrayList
<>();
List
<
PhysicRecord
>
records
=
new
ArrayList
<>();
for
(
PhysicRecordCreateReq
.
Physic
physic
:
req
.
getPhysicList
())
{
for
(
PhysicRecordCreateReq
.
Physic
physic
:
req
.
getPhysicList
())
{
// 1)科室专账
// 专账类型:2-药房,3-科室(参考组织部门)
PhysicRecord
record
=
newRecord
(
req
,
physic
,
3
);
physicRecordMapper
.
insert
(
record
);
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
bizFileService
.
addBizFilesIfAbsent
(
BizFileTypes
.
PHYSIC_RECORD_IMAGE
,
record
.
getId
().
toString
(),
req
.
getPrescriptionImages
());
}
}
// 调配人签名
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getSign
()))
{
PhysicRecordSignReq
signReq
=
new
PhysicRecordSignReq
();
copyTo
(
req
.
getSign
(),
signReq
);
signReq
.
setPhysicRecordId
(
record
.
getId
());
sign
(
signReq
);
}
records
.
add
(
record
);
// 2)药房专账
PhysicRecord
dupRecord
=
newRecord
(
req
,
physic
,
2
);
physicRecordMapper
.
insert
(
dupRecord
);
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
bizFileService
.
addBizFilesIfAbsent
(
BizFileTypes
.
PHYSIC_RECORD_IMAGE
,
dupRecord
.
getId
().
toString
(),
req
.
getPrescriptionImages
());
}
}
}
return
records
;
}
private
PhysicRecord
newRecord
(
PhysicRecordCreateReq
req
,
PhysicRecordCreateReq
.
Physic
physic
,
Integer
type
)
{
PhysicRecord
record
=
new
PhysicRecord
();
PhysicRecord
record
=
new
PhysicRecord
();
BeanUtil
.
copyProperties
(
req
,
record
);
BeanUtil
.
copyProperties
(
req
,
record
);
record
.
setDeptId
(
SpringContextUtils
.
getDeptId
());
record
.
setDeptId
(
SpringContextUtils
.
getDeptId
());
...
@@ -64,6 +97,8 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
...
@@ -64,6 +97,8 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
record
.
setBatchNo
(
physic
.
getBatchNo
());
record
.
setBatchNo
(
physic
.
getBatchNo
());
record
.
setPhysicNum
(
physic
.
getPhysicNum
());
record
.
setPhysicNum
(
physic
.
getPhysicNum
());
record
.
setType
(
type
);
record
.
setSickName
(
req
.
getSickName
());
record
.
setSickName
(
req
.
getSickName
());
record
.
setSickSex
(
req
.
getSickSex
());
record
.
setSickSex
(
req
.
getSickSex
());
record
.
setSickAge
(
req
.
getSickAge
());
record
.
setSickAge
(
req
.
getSickAge
());
...
@@ -79,24 +114,7 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
...
@@ -79,24 +114,7 @@ public class PhysicRecordServiceImpl extends AbstractService implements PhysicRe
record
.
setYsUser
(
null
);
record
.
setYsUser
(
null
);
record
.
setFhUser
(
null
);
record
.
setFhUser
(
null
);
physicRecordMapper
.
insert
(
record
);
return
record
;
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getPrescriptionImages
()))
{
bizFileService
.
addBizFilesIfAbsent
(
BizFileTypes
.
PHYSIC_RECORD_IMAGE
,
record
.
getId
().
toString
(),
req
.
getPrescriptionImages
());
}
}
// 调配人签名
if
(
ObjectUtil
.
isNotEmpty
(
req
.
getSign
()))
{
PhysicRecordSignReq
signReq
=
new
PhysicRecordSignReq
();
copyTo
(
req
.
getSign
(),
signReq
);
signReq
.
setPhysicRecordId
(
record
.
getId
());
sign
(
signReq
);
}
records
.
add
(
record
);
}
return
records
;
}
}
@Override
@Override
...
...
jmai-physic/src/main/resources/mapper/PhysicRecordMapper.xml
View file @
30444162
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
<select
id=
"selectRecordPage"
resultType=
"com.jmai.physic.vo.PhysicRecordVO"
>
<select
id=
"selectRecordPage"
resultType=
"com.jmai.physic.vo.PhysicRecordVO"
>
select a.*,b.name as createName from physic_record a left join sys_user b on a.create_by =b.id
select a.*,b.name as createName from physic_record a left join sys_user b on a.create_by =b.id
where a.del_flag =0
where a.del_flag =0
<if
test=
"req.type !=null"
>
AND a.type=#{req.type}
</if>
<if
test=
"req.status !=null"
>
<if
test=
"req.status !=null"
>
and a.status=#{req.status}
and a.status=#{req.status}
</if>
</if>
...
...
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