Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
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
wangweidong
patzn-cloud-service-hmhj
Commits
65a718d2
Commit
65a718d2
authored
Jul 09, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改字段名称 单价为price;
相关样品修改
parent
372cd089
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
11 deletions
+36
-11
EntrustController.java
...cloud/service/lims/hmhj/controller/EntrustController.java
+6
-0
IEntrustService.java
...atzn/cloud/service/lims/hmhj/service/IEntrustService.java
+2
-0
EntrustSamplePrepareServiceImpl.java
...ms/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
+3
-0
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+9
-4
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+7
-0
EntrustSampleItemMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
+5
-2
EntrustSampleMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
+1
-2
20210708添加记录表和字段.sql
...test/java/resources/db_sql/hmhj/v145/20210708添加记录表和字段.sql
+3
-3
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustController.java
View file @
65a718d2
...
...
@@ -332,6 +332,12 @@ public class EntrustController extends ServiceController {
return
success
(
entrustService
.
registerSubmitToMake
(
ids
,
getAccount
()));
}
@ApiOperation
(
"提交修改审批申请"
)
@PostMapping
(
"/submit_update_apply"
)
public
RestResult
<
Boolean
>
submitUpdateApply
(
@RequestParam
(
"id"
)
Long
id
,
String
reason
)
{
return
success
(
entrustService
.
submitUpdateApply
(
id
,
reason
,
getAccount
()));
}
@ApiOperation
(
"复制委托信息"
)
@PostMapping
(
"/clone_entrust"
)
public
RestResult
<
Boolean
>
clone
(
@RequestParam
(
"ids"
)
Long
[]
ids
)
{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustService.java
View file @
65a718d2
...
...
@@ -82,4 +82,6 @@ public interface IEntrustService extends IBaseService<Entrust> {
boolean
backFromMake
(
Long
[]
ids
,
Account
account
,
String
reason
);
boolean
backFromReceive
(
Long
[]
ids
,
Account
account
,
String
reason
);
boolean
submitUpdateApply
(
Long
id
,
String
reason
,
Account
account
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
View file @
65a718d2
...
...
@@ -99,6 +99,9 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
prepare
.
setId
(
null
);
savePrepare
.
add
(
prepare
);
sampleIdsList
.
add
(
vo
.
getEntrustSampleId
());
// 主要用来修改委托的复合型检测信息
EntrustSample
entrustSample
=
vo
.
convert
(
EntrustSample
.
class
);
entrustSampleService
.
updateById
(
entrustSample
);
}
else
if
(
"备样"
.
equalsIgnoreCase
(
vo
.
getMakeType
())){
EntrustSampleBackup
backup
=
new
EntrustSampleBackup
();
backup
.
setEntrustId
(
vo
.
getEntrustId
());
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
65a718d2
...
...
@@ -1142,16 +1142,21 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
BeanUtils
.
copyProperties
(
sourceSample
,
updateSample
);
BeanUtils
.
copyProperties
(
entrustSample
,
updateSample
,
true
);
updateById
(
updateSample
);
String
sampleShape
=
null
==
entrustSample
.
getSampleShape
()
?
""
:
entrustSample
.
getSampleShape
();
String
sampleFrom
=
null
==
entrustSample
.
getSampleFrom
()
?
""
:
entrustSample
.
getSampleFrom
();
String
sampleShape
=
entrustSample
.
getSampleShape
();
String
sampleFrom
=
entrustSample
.
getSampleFrom
();
Integer
complianceTest
=
entrustSample
.
getComplianceTest
();
StringBuffer
sb
=
new
StringBuffer
();
String
remark
=
""
;
if
(!
sourceSample
.
getSampleShape
().
equals
(
sampleShape
))
{
if
(
StringUtils
.
isNotBlank
(
sampleShape
)
&&
!
sourceSample
.
getSampleShape
().
equals
(
sampleShape
))
{
sb
.
append
(
String
.
format
(
"样品状态:由【%s】 修改为 【%s】,"
,
sourceSample
.
getSampleShape
(),
sampleShape
));
}
if
(!
sourceSample
.
getSampleFrom
().
equals
(
sampleFrom
))
{
if
(
StringUtils
.
isNotBlank
(
sampleFrom
)
&&
!
sourceSample
.
getSampleFrom
().
equals
(
sampleFrom
))
{
sb
.
append
(
String
.
format
(
"样品来源:由【%s】 修改为 【%s】,"
,
sourceSample
.
getSampleFrom
(),
sampleFrom
));
}
if
(
null
!=
complianceTest
&&
sourceSample
.
getComplianceTest
()
!=
complianceTest
)
{
sb
.
append
(
String
.
format
(
"现场见证:由【%s】 修改为 【%s】,"
,
sourceSample
.
getComplianceTest
(),
complianceTest
));
}
if
(
sb
.
length
()
>
0
)
{
remark
=
sb
.
substring
(
0
,
sb
.
length
()
-
1
);
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
65a718d2
...
...
@@ -1154,6 +1154,13 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
true
;
}
@Override
public
boolean
submitUpdateApply
(
Long
id
,
String
reason
,
Account
account
)
{
RestAssert
.
fail
(
null
==
id
||
0
==
id
.
longValue
(),
"请选择要申请修改的委托"
);
Entrust
entrust
=
getById
(
id
);
return
true
;
}
private
List
<
EntrustSampleDTO
>
listSampleDTOByType
(
Long
entrustId
,
int
type
)
{
List
<
EntrustSampleDTO
>
sampleDTOList
=
baseMapper
.
listByContractId
(
entrustId
);
return
sampleDTOList
.
stream
().
filter
(
t
->
(
null
==
t
.
getType
()
?
0
:
t
.
getType
().
intValue
())
==
type
).
collect
(
Collectors
.
toList
());
...
...
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
View file @
65a718d2
...
...
@@ -91,7 +91,9 @@
</if>
)
SELECT i.*,s.name AS "sampleName",e.test_side "testSide",s.code AS "sampleCode",l.record_id,r.object_key AS "recordObjectKey" FROM i
SELECT i.*,s.name AS "sampleName",e.test_side "testSide",s.code AS "sampleCode",l.record_id,r.object_key AS "recordObjectKey",
s.compliance_test
FROM i
JOIN entrust_sample s ON i.entrust_sample_id = s.id
LEFT JOIN ( SELECT id,item_id,record_id FROM item_rel_original_record WHERE deleted = 0 ) l ON i.id = l.item_id
LEFT JOIN ( SELECT id,object_key FROM original_record WHERE deleted = 0 ) r ON l.record_id = r.id
...
...
@@ -156,7 +158,8 @@
</if>
)
SELECT i.*,s.name AS "sampleName",s.code AS "sampleCode",e.test_side "testSide",l.record_id,r.object_key AS "recordObjectKey"
SELECT i.*,s.name AS "sampleName",s.code AS "sampleCode",e.test_side "testSide",l.record_id,r.object_key AS "recordObjectKey",
s.compliance_test
FROM i
JOIN entrust_sample s ON i.entrust_sample_id = s.id
JOIN (select t.id,t.code,t.test_side from entrust t where t.deleted = 0 ) e on s.entrust_id = e.id
...
...
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
View file @
65a718d2
...
...
@@ -6,8 +6,7 @@
SELECT
p.id, p.entrust_sample_id,s.code,s.name,s.product_code,s.product_basis_name,s.compose_judge,s.product_standard_id,s.name_code,
p.group_id,p.group_name,p.make_type,p.make_quantity,p.store_way,p.store_location,p.maker,p.make_time
s.compliance_test,p.group_id,p.group_name,p.make_type,p.make_quantity,p.store_way,p.store_location,p.maker,p.make_time
FROM
entrust_sample_prepare
P JOIN entrust_sample s ON P.entrust_sample_id = s.ID
...
...
src/test/java/resources/db_sql/hmhj/v145/20210708添加记录表和字段.sql
View file @
65a718d2
CREAT
E
TABLE
"public"
.
"entrust_sample_record"
(
CREAT
E
TABLE
"public"
.
"entrust_sample_record"
(
...
...
@@ -61,6 +61,6 @@ COMMENT ON COLUMN "public"."entrust_sample"."compliance_test" IS '符合性检
-- 新增样品检测项目字段 --
ALTER
TABLE
"public"
.
"entrust_sample_item"
ADD
COLUMN
"
univalent
"
numeric
(
10
,
2
)
default
0
.
00
;
ADD
COLUMN
"
price
"
numeric
(
10
,
2
)
default
0
.
00
;
COMMENT
ON
COLUMN
"public"
.
"entrust_sample_item"
.
"
univalent
"
IS
'单价'
;
COMMENT
ON
COLUMN
"public"
.
"entrust_sample_item"
.
"
price
"
IS
'单价'
;
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