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
c6b50cb5
Commit
c6b50cb5
authored
Jun 21, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质检编号基础数据管理
parent
0e2e536a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
441 additions
and
198 deletions
+441
-198
UserInspectionCodeController.java
...ce/lims/hmhj/controller/UserInspectionCodeController.java
+75
-0
UserInspectionCodeMapper.java
...ud/service/lims/hmhj/mapper/UserInspectionCodeMapper.java
+16
-0
IUserInspectionCodeService.java
...service/lims/hmhj/service/IUserInspectionCodeService.java
+20
-0
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+236
-197
UserInspectionCodeServiceImpl.java
...lims/hmhj/service/impl/UserInspectionCodeServiceImpl.java
+34
-0
UserInspectionCodeMapper.xml
src/main/resources/mapper/hmhj/UserInspectionCodeMapper.xml
+1
-1
新增质检编号-user_inspection_code.sql
...esources/db_sql/hmhj/v113/新增质检编号-user_inspection_code.sql
+59
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/UserInspectionCodeController.java
0 → 100644
View file @
c6b50cb5
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
controller
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.api.RestConstants
;
import
com.patzn.cloud.commons.api.RestResult
;
import
com.patzn.cloud.commons.controller.ServiceController
;
import
com.patzn.cloud.service.hmhj.entity.UserInspectionCode
;
import
com.patzn.cloud.service.lims.hmhj.service.IUserInspectionCodeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 用户质检编码基础数据 前端控制器
*
* @author meazty
* @since 2021-06-20
*/
@Api
(
tags
=
"用户质检编码基础数据"
)
@RestController
@RequestMapping
(
"/v1/user_inspection_code"
)
public
class
UserInspectionCodeController
extends
ServiceController
{
@Autowired
private
IUserInspectionCodeService
userInspectionCodeService
;
@ApiOperation
(
"分页列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_PAGE
,
value
=
"请求数据的页码"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
})
@PostMapping
(
"/page"
)
public
RestResult
<
Page
<
UserInspectionCode
>>
getPage
(
UserInspectionCode
userInspectionCode
)
{
return
success
(
userInspectionCodeService
.
page
(
getPage
(),
userInspectionCode
));
}
@ApiOperation
(
"查询 id 信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
})
@GetMapping
(
"/{id}"
)
public
RestResult
<
UserInspectionCode
>
get
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
userInspectionCodeService
.
getById
(
id
));
}
@ApiOperation
(
"根据 id 修改信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
})
@PutMapping
(
"/{id}"
)
public
RestResult
<
Boolean
>
edit
(
@PathVariable
(
"id"
)
Long
id
,
UserInspectionCode
userInspectionCode
)
{
userInspectionCode
.
setId
(
id
);
return
success
(
userInspectionCodeService
.
updateById
(
userInspectionCode
));
}
@ApiOperation
(
"添加"
)
@PostMapping
(
"/"
)
public
RestResult
<
Boolean
>
add
(
UserInspectionCode
userInspectionCode
)
{
return
success
(
userInspectionCodeService
.
save
(
userInspectionCode
));
}
@ApiOperation
(
"根据 ids 删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"主键列表"
,
required
=
true
,
paramType
=
"query"
,
allowMultiple
=
true
,
dataTypeClass
=
Long
.
class
),
})
@DeleteMapping
(
"/"
)
public
RestResult
<
Boolean
>
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
return
success
(
userInspectionCodeService
.
removeByIds
(
ids
));
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/UserInspectionCodeMapper.java
0 → 100644
View file @
c6b50cb5
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
mapper
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.service.hmhj.entity.UserInspectionCode
;
/**
* <p>
* 用户质检编码基础数据 Mapper 接口
* </p>
*
* @author meazty
* @since 2021-06-20
*/
public
interface
UserInspectionCodeMapper
extends
BatchMapper
<
UserInspectionCode
>
{
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IUserInspectionCodeService.java
0 → 100644
View file @
c6b50cb5
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.service.IBaseService
;
import
com.patzn.cloud.service.hmhj.entity.UserInspectionCode
;
import
java.util.List
;
/**
* 用户质检编码基础数据 服务类
*
* @author meazty
* @since 2021-06-20
*/
public
interface
IUserInspectionCodeService
extends
IBaseService
<
UserInspectionCode
>
{
Page
<
UserInspectionCode
>
page
(
Page
<
UserInspectionCode
>
page
,
UserInspectionCode
sysUserInspectionCode
);
boolean
removeByIds
(
List
<
Long
>
ids
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
c6b50cb5
...
...
@@ -4,7 +4,11 @@ import com.baomidou.mybatisplus.mapper.Condition;
import
com.baomidou.mybatisplus.toolkit.IdWorker
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.controller.LoginHelper
;
import
com.patzn.cloud.commons.toolkit.DateUtils
;
import
com.patzn.cloud.commons.toolkit.StringHandleUtils
;
import
com.patzn.cloud.feign.base.client.SysOrgClient
;
import
com.patzn.cloud.service.base.entity.SysOrg
;
import
com.patzn.cloud.service.hmhj.dto.EntrustDTO
;
import
com.patzn.cloud.service.hmhj.dto.EntrustSampleDTO
;
import
com.patzn.cloud.service.hmhj.entity.*
;
...
...
@@ -19,6 +23,7 @@ import com.patzn.cloud.commons.service.impl.BaseServiceImpl;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jfree.data.DataUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
...
...
@@ -49,7 +54,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
private
IEntrustSampleService
entrustSampleService
;
@Autowired
private
IEntrustReportService
entrustReportService
;
...
...
@@ -61,13 +65,19 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
private
IEntrustRecordService
entrustRecordService
;
@Autowired
private
IUserInspectionCodeService
userInspectionCodeService
;
@Autowired
private
ILmsMsgService
lmsMsgService
;
@Autowired
private
SysOrgClient
sysOrgClient
;
@Override
public
Page
<
Entrust
>
page
(
Page
<
Entrust
>
page
,
Entrust
entrust
)
{
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrust
);
wrapper
.
orderBy
(
"entrust_time"
,
false
);
wrapper
.
orderBy
(
"entrust_time"
,
false
);
return
this
.
page
(
page
,
wrapper
);
}
...
...
@@ -76,41 +86,77 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
saveEntrust
(
Entrust
entrust
)
{
String
entrustCode
=
codeRuleService
.
getKey
((
Integer
)
CodeTypeEnum
.
ENTRUST_CODE
.
getValue
(),
CodeTypeEnum
.
ENTRUST_CODE
.
getName
(),
entrust
);
if
(
StringUtils
.
isNotEmpty
(
entrustCode
)){
String
entrustCode
=
codeRuleService
.
getKey
((
Integer
)
CodeTypeEnum
.
ENTRUST_CODE
.
getValue
(),
CodeTypeEnum
.
ENTRUST_CODE
.
getName
(),
entrust
);
if
(
StringUtils
.
isNotEmpty
(
entrustCode
))
{
entrust
.
setCode
(
entrustCode
);
}
return
save
(
entrust
);
}
public
void
initSampleCode
(
EntrustSample
sample
){
String
sampleCode
=
codeRuleService
.
getKey
((
Integer
)
CodeTypeEnum
.
ENTRUST_SAMPLE_CODE
.
getValue
(),
CodeTypeEnum
.
ENTRUST_SAMPLE_CODE
.
getName
(),
sample
);
if
(
StringUtils
.
isNotBlank
(
sampleCode
)){
public
void
initSampleCode
(
EntrustSample
sample
)
{
Account
account
=
LoginHelper
.
getAccount
();
int
codeTypeNo
=
0
;
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
// 是否包含二期部门
boolean
secondPhase
=
orgList
.
stream
().
filter
(
t
->
t
.
getName
().
contains
(
"二期"
)).
count
()
>
0
;
// 默认样品初始编号
CodeTypeEnum
codeType
=
null
;
switch
(
sample
.
getName
())
{
case
"原铝"
:
codeType
=
CodeTypeEnum
.
SAMPLE_YL_CODE
;
break
;
case
"电解质"
:
codeType
=
CodeTypeEnum
.
SAMPLE_DJZ_CODE
;
break
;
case
"外委检测"
:
codeType
=
CodeTypeEnum
.
SAMPLE_WWJC_CODE
;
break
;
default
:
codeType
=
CodeTypeEnum
.
SAMPLE_CODE
;
break
;
}
String
sampleCode
=
codeRuleService
.
getKey
((
Integer
)
codeType
.
getValue
(),
codeType
.
getName
(),
sample
);
if
(
CodeTypeEnum
.
SAMPLE_YL_CODE
==
codeType
||
CodeTypeEnum
.
SAMPLE_DJZ_CODE
==
codeType
)
{
sampleCode
+=
sample
.
getSlotNo
();
}
else
if
(
CodeTypeEnum
.
SAMPLE_WWJC_CODE
==
codeType
)
{
sampleCode
=
(
secondPhase
?
"Z"
:
"F"
)
+
sampleCode
.
substring
(
1
);
// XX替换成质检员编号
// sampleCode = sampleCode.replace("XX", "01");
List
<
UserInspectionCode
>
userInspectionCodeList
=
userInspectionCodeService
.
list
(
Condition
.
create
().
eq
(
"user_id"
,
account
.
getUserId
()).
eq
(
"type"
,
"ZJ"
).
eq
(
"deleted"
,
0
));
if
(
CollectionUtils
.
isNotEmpty
(
userInspectionCodeList
)){
sampleCode
=
sampleCode
.
replace
(
"XX"
,
userInspectionCodeList
.
get
(
0
).
getNo
());
}
}
if
(
StringUtils
.
isNotBlank
(
sampleCode
))
{
sample
.
setCode
(
sampleCode
);
// 现只有一级编码
sample
.
setCodeType
(
codeTypeNo
);
sample
.
setFirstCode
(
sampleCode
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveEntrustDTO
(
EntrustDTO
dto
,
Account
account
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
dto
.
getClient
()),
"委托单位不能为空!"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
dto
.
getClient
()),
"委托单位不能为空!"
);
Entrust
entrust
=
dto
.
convert
(
Entrust
.
class
);
List
<
EntrustSampleDTO
>
sampleDTOList
=
dto
.
getSampleDTOList
();
if
(
null
==
entrust
.
getEntrustTime
()){
if
(
null
==
entrust
.
getEntrustTime
())
{
entrust
.
setEntrustTime
(
new
Date
());
}
if
(
saveEntrust
(
entrust
)){
if
(
CollectionUtils
.
isNotEmpty
(
sampleDTOList
)){
if
(
saveEntrust
(
entrust
))
{
if
(
CollectionUtils
.
isNotEmpty
(
sampleDTOList
))
{
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveEntrustSampleItemList
=
new
ArrayList
<>();
for
(
EntrustSampleDTO
sampleDTO
:
sampleDTOList
)
{
for
(
EntrustSampleDTO
sampleDTO
:
sampleDTOList
)
{
EntrustSample
sample
=
sampleDTO
.
convert
(
EntrustSample
.
class
);
sample
.
setEntrustId
(
entrust
.
getId
());
//生成样品编号
...
...
@@ -119,21 +165,21 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
saveSampleList
.
add
(
sample
);
List
<
EntrustSampleItem
>
experiments
=
sampleDTO
.
getItemList
();
if
(
CollectionUtils
.
isEmpty
(
experiments
)){
if
(
CollectionUtils
.
isEmpty
(
experiments
))
{
continue
;
}
for
(
EntrustSampleItem
sampleItem
:
experiments
)
{
for
(
EntrustSampleItem
sampleItem
:
experiments
)
{
sampleItem
.
setEntrustSampleId
(
sample
.
getId
());
saveEntrustSampleItemList
.
add
(
sampleItem
);
}
}
if
(
CollectionUtils
.
isNotEmpty
(
saveSampleList
)){
if
(
CollectionUtils
.
isNotEmpty
(
saveSampleList
))
{
entrustSampleService
.
saveBatch
(
saveSampleList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
saveEntrustSampleItemList
)){
if
(
CollectionUtils
.
isNotEmpty
(
saveEntrustSampleItemList
))
{
entrustSampleItemService
.
saveBatch
(
saveEntrustSampleItemList
);
}
}
...
...
@@ -146,15 +192,15 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitToCheck
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托登记的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托登记的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
CHECK
);
entrust
.
setProgress
(
EntrustStatusEnum
.
CHECK
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
0
,
account
,
"提交至委托审核"
);
lmsMsgService
.
sendMsg
(
"/hmhj/entrust_manage/entrust_review"
,
"有委托从委托登记提交过来,请及时审核"
,
"新的委托审核任务!"
,
account
,
null
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
0
,
account
,
"提交至委托审核"
);
lmsMsgService
.
sendMsg
(
"/hmhj/entrust_manage/entrust_review"
,
"有委托从委托登记提交过来,请及时审核"
,
"新的委托审核任务!"
,
account
,
null
);
}
return
true
;
}
...
...
@@ -163,48 +209,47 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
submitToOutInput
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
OUT_DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择外委登记的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
OUT_DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择外委登记的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
OUT_INPUT
);
entrust
.
setProgress
(
EntrustStatusEnum
.
OUT_INPUT
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
OUT_DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
OUT_INPUT
.
getDisplay
(),
0
,
account
,
"提交至外委数据录入"
);
lmsMsgService
.
sendMsg
(
"/hmhj/accept_manage/sub_input"
,
"有外委登记提交过来,请及时填写外委数据"
,
"新的委托外委数据录入任务!"
,
account
,
null
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
OUT_DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
OUT_INPUT
.
getDisplay
(),
0
,
account
,
"提交至外委数据录入"
);
lmsMsgService
.
sendMsg
(
"/hmhj/accept_manage/sub_input"
,
"有外委登记提交过来,请及时填写外委数据"
,
"新的委托外委数据录入任务!"
,
account
,
null
);
}
return
true
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
backFromCheck
(
Long
[]
ids
,
Account
account
,
String
reason
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
CHECK
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择退回委托审核的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
CHECK
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择退回委托审核的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
DRAFT
);
entrust
.
setProgress
(
EntrustStatusEnum
.
BACK_CHECK
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
1
,
account
,
reason
);
lmsMsgService
.
sendMsg
(
"/hmhj/entrust_manage/entrust_register"
,
"有委托从委托审核驳回,请及时查看退回原因并处理"
,
"新的委托审核退回任务!"
,
account
,
null
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
1
,
account
,
reason
);
lmsMsgService
.
sendMsg
(
"/hmhj/entrust_manage/entrust_register"
,
"有委托从委托审核驳回,请及时查看退回原因并处理"
,
"新的委托审核退回任务!"
,
account
,
null
);
}
return
true
;
}
@Override
public
boolean
submitToMake
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交到制备的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
CHECK
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托审核的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交到制备的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
CHECK
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托审核的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
MAKE
);
entrust
.
setProgress
(
EntrustStatusEnum
.
MAKE
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
EntrustStatusEnum
.
MAKE
.
getDisplay
(),
0
,
account
,
"提交至样品待制备"
);
lmsMsgService
.
sendMsg
(
"/hmhj/sample_manage/sample_prepare"
,
"有委托审核通过,请及时进行样品的制备"
,
"新的样品制备任务!"
,
account
,
null
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
CHECK
.
getDisplay
(),
EntrustStatusEnum
.
MAKE
.
getDisplay
(),
0
,
account
,
"提交至样品待制备"
);
lmsMsgService
.
sendMsg
(
"/hmhj/sample_manage/sample_prepare"
,
"有委托审核通过,请及时进行样品的制备"
,
"新的样品制备任务!"
,
account
,
null
);
}
return
true
;
}
...
...
@@ -212,15 +257,15 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Override
public
boolean
registerSubmitToMake
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交到制备的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托登记的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交到制备的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
DRAFT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择委托登记的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
MAKE
);
entrust
.
setProgress
(
EntrustStatusEnum
.
MAKE
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
MAKE
.
getDisplay
(),
0
,
account
,
"委托登记提交至样品待制备"
);
lmsMsgService
.
sendMsg
(
"/hmhj/sample_manage/sample_prepare"
,
"有委托登记提交至样品待制备,请及时进行样品的制备"
,
"新的样品制备任务!"
,
account
,
null
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
DRAFT
.
getDisplay
(),
EntrustStatusEnum
.
MAKE
.
getDisplay
(),
0
,
account
,
"委托登记提交至样品待制备"
);
lmsMsgService
.
sendMsg
(
"/hmhj/sample_manage/sample_prepare"
,
"有委托登记提交至样品待制备,请及时进行样品的制备"
,
"新的样品制备任务!"
,
account
,
null
);
}
return
true
;
}
...
...
@@ -228,32 +273,32 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Override
public
boolean
editEntrust
(
EntrustDTO
entrustDTO
,
Account
account
)
{
if
(
null
==
entrustDTO
.
getId
()){
if
(
null
==
entrustDTO
.
getId
())
{
return
false
;
}
List
<
EntrustSampleDTO
>
sampleList
=
entrustDTO
.
getSampleDTOList
();
if
(
CollectionUtils
.
isEmpty
(
sampleList
)){
if
(
CollectionUtils
.
isEmpty
(
sampleList
))
{
// PtAssert.fail("样品不能为空");
}
for
(
EntrustSampleDTO
sampleDTO
:
sampleList
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sampleDTO
.
getName
()),
"样品名称不能为空"
);
for
(
EntrustSampleDTO
sampleDTO
:
sampleList
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sampleDTO
.
getName
()),
"样品名称不能为空"
);
}
Entrust
entrust
=
entrustDTO
.
convert
(
Entrust
.
class
);
if
(
updateById
(
entrust
)){
Entrust
entrust
=
entrustDTO
.
convert
(
Entrust
.
class
);
if
(
updateById
(
entrust
))
{
List
<
Long
>
sampleIdsList
=
new
ArrayList
<>();
List
<
EntrustSample
>
updateSampleList
=
new
ArrayList
<>();
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveItemList
=
new
ArrayList
<>();
for
(
EntrustSampleDTO
dto
:
sampleList
)
{
for
(
EntrustSampleDTO
dto
:
sampleList
)
{
EntrustSample
sample
=
dto
.
convert
(
EntrustSample
.
class
);
if
(
null
!=
sample
.
getId
()){
if
(
null
!=
sample
.
getId
())
{
updateSampleList
.
add
(
sample
);
sampleIdsList
.
add
(
sample
.
getId
());
}
else
{
}
else
{
sample
.
setEntrustId
(
entrust
.
getId
());
initSampleCode
(
sample
);
...
...
@@ -262,10 +307,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
List
<
EntrustSampleItem
>
viewItemList
=
dto
.
getItemList
();
if
(
CollectionUtils
.
isNotEmpty
(
viewItemList
)){
for
(
EntrustSampleItem
item
:
viewItemList
)
{
if
(
null
==
item
.
getId
()){
List
<
EntrustSampleItem
>
viewItemList
=
dto
.
getItemList
();
if
(
CollectionUtils
.
isNotEmpty
(
viewItemList
))
{
for
(
EntrustSampleItem
item
:
viewItemList
)
{
if
(
null
==
item
.
getId
())
{
item
.
setId
(
IdWorker
.
getId
());
item
.
setEntrustSampleId
(
sample
.
getId
());
item
.
setStatus
(
EntrustSampleItemStatusEnum
.
DRAFT
);
...
...
@@ -276,14 +321,14 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
}
if
(
CollectionUtils
.
isNotEmpty
(
updateSampleList
)){
if
(
CollectionUtils
.
isNotEmpty
(
updateSampleList
))
{
entrustSampleService
.
updateBatchById
(
updateSampleList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
saveSampleList
)){
if
(
CollectionUtils
.
isNotEmpty
(
saveSampleList
))
{
entrustSampleService
.
saveBatch
(
saveSampleList
);
}
if
(
CollectionUtils
.
isNotEmpty
(
saveItemList
)){
if
(
CollectionUtils
.
isNotEmpty
(
saveItemList
))
{
entrustSampleItemService
.
saveBatch
(
saveItemList
);
}
}
...
...
@@ -294,49 +339,47 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Override
public
EntrustDTO
getDTOById
(
Long
id
)
{
Entrust
entrust
=
getById
(
id
);
if
(
null
!=
entrust
){
EntrustDTO
vo
=
entrust
.
convert
(
EntrustDTO
.
class
);
if
(
null
!=
entrust
)
{
EntrustDTO
vo
=
entrust
.
convert
(
EntrustDTO
.
class
);
List
<
EntrustSampleDTO
>
sampleList
=
baseMapper
.
listByContractId
(
id
);
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
)){
List
<
Long
>
sampleIdList
=
sampleList
.
stream
().
map
(
s
->
{
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
List
<
Long
>
sampleIdList
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getId
();
}).
collect
(
Collectors
.
toList
());
List
<
EntrustSampleItem
>
experimentList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIdList
));
List
<
EntrustSampleItem
>
experimentList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIdList
));
Map
<
Long
,
Set
<
String
>>
itemSetMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
EntrustSampleItem
>>
itemEntitySetMap
=
new
HashMap
<>();
for
(
EntrustSampleItem
experiment
:
experimentList
)
{
if
(!
itemSetMap
.
containsKey
(
experiment
.
getEntrustSampleId
())){
Map
<
Long
,
List
<
EntrustSampleItem
>>
itemEntitySetMap
=
new
HashMap
<>();
for
(
EntrustSampleItem
experiment
:
experimentList
)
{
if
(!
itemSetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
Set
<
String
>
set
=
new
TreeSet
<>();
set
.
add
(
experiment
.
getName
());
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
}
else
{
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
}
else
{
Set
<
String
>
set
=
itemSetMap
.
get
(
experiment
.
getEntrustSampleId
());
set
.
add
(
experiment
.
getName
());
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
}
if
(!
itemEntitySetMap
.
containsKey
(
experiment
.
getEntrustSampleId
())){
if
(!
itemEntitySetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
List
<
EntrustSampleItem
>
list
=
new
ArrayList
<>();
list
.
add
(
experiment
);
itemEntitySetMap
.
put
(
experiment
.
getEntrustSampleId
(),
list
);
}
else
{
itemEntitySetMap
.
put
(
experiment
.
getEntrustSampleId
(),
list
);
}
else
{
List
<
EntrustSampleItem
>
list
=
itemEntitySetMap
.
get
(
experiment
.
getEntrustSampleId
());
list
.
add
(
experiment
);
itemEntitySetMap
.
put
(
experiment
.
getEntrustSampleId
(),
list
);
itemEntitySetMap
.
put
(
experiment
.
getEntrustSampleId
(),
list
);
}
}
for
(
EntrustSampleDTO
sampleDTO
:
sampleList
)
{
if
(
itemSetMap
.
containsKey
(
sampleDTO
.
getId
())){
for
(
EntrustSampleDTO
sampleDTO
:
sampleList
)
{
if
(
itemSetMap
.
containsKey
(
sampleDTO
.
getId
()))
{
sampleDTO
.
setItemNames
(
StringHandleUtils
.
join
(
itemSetMap
.
get
(
sampleDTO
.
getId
())));
}
if
(
itemEntitySetMap
.
containsKey
(
sampleDTO
.
getId
())){
if
(
itemEntitySetMap
.
containsKey
(
sampleDTO
.
getId
()))
{
sampleDTO
.
setItemList
(
itemEntitySetMap
.
get
(
sampleDTO
.
getId
()));
}
}
...
...
@@ -353,30 +396,30 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
public
Page
<
EntrustVO
>
pageEntrustSampleReceive
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
List
<
EntrustSamplePrepare
>
prepareList
=
entrustSamplePrepareService
.
list
(
Condition
.
create
().
setSqlSelect
(
"entrust_sample_id"
).
eq
(
"status"
,
EntrustSamplePrepareStatusEnum
.
RECEIVE
));
if
(
CollectionUtils
.
isEmpty
(
prepareList
)){
if
(
CollectionUtils
.
isEmpty
(
prepareList
))
{
return
page
;
}
List
<
Long
>
sampleIds
=
prepareList
.
stream
().
map
(
p
->
{
List
<
Long
>
sampleIds
=
prepareList
.
stream
().
map
(
p
->
{
return
p
.
getEntrustSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
sampleIds
)){
if
(
CollectionUtils
.
isEmpty
(
sampleIds
))
{
return
page
;
}
List
<
EntrustSample
>
entrustSamples
=
entrustSampleService
.
getBatchIds
(
sampleIds
);
if
(
CollectionUtils
.
isEmpty
(
entrustSamples
)){
if
(
CollectionUtils
.
isEmpty
(
entrustSamples
))
{
return
page
;
}
List
<
Long
>
ids
=
entrustSamples
.
stream
().
map
(
e
->
{
List
<
Long
>
ids
=
entrustSamples
.
stream
().
map
(
e
->
{
return
e
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectEntrustSampleReceive
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectEntrustSampleReceive
(
page
,
entrust
));
}
...
...
@@ -384,341 +427,337 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
public
Page
<
EntrustVO
>
pageEntrustSampleReceiveHis
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
List
<
EntrustSamplePrepare
>
prepareList
=
entrustSamplePrepareService
.
list
(
Condition
.
create
().
setSqlSelect
(
"entrust_sample_id"
).
ne
(
"status"
,
EntrustSamplePrepareStatusEnum
.
RECEIVE
));
if
(
CollectionUtils
.
isEmpty
(
prepareList
)){
if
(
CollectionUtils
.
isEmpty
(
prepareList
))
{
return
page
;
}
List
<
Long
>
sampleIds
=
prepareList
.
stream
().
map
(
p
->
{
List
<
Long
>
sampleIds
=
prepareList
.
stream
().
map
(
p
->
{
return
p
.
getEntrustSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
sampleIds
)){
if
(
CollectionUtils
.
isEmpty
(
sampleIds
))
{
return
page
;
}
List
<
EntrustSample
>
entrustSamples
=
entrustSampleService
.
getBatchIds
(
sampleIds
);
if
(
CollectionUtils
.
isEmpty
(
entrustSamples
)){
if
(
CollectionUtils
.
isEmpty
(
entrustSamples
))
{
return
page
;
}
List
<
Long
>
ids
=
entrustSamples
.
stream
().
map
(
e
->
{
List
<
Long
>
ids
=
entrustSamples
.
stream
().
map
(
e
->
{
return
e
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectEntrustSampleReceive
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectEntrustSampleReceive
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByItem
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
if
(
null
==
entrust
.
getItemStatus
()){
if
(
null
==
entrust
.
getItemStatus
())
{
return
page
;
}
List
<
EntrustSampleItem
>
itemList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getItemStatus
()));
if
(
CollectionUtils
.
isEmpty
(
itemList
)){
List
<
EntrustSampleItem
>
itemList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getItemStatus
()));
if
(
CollectionUtils
.
isEmpty
(
itemList
))
{
return
page
;
}
List
<
Long
>
sampleIdsList
=
itemList
.
stream
().
map
(
i
->
{
List
<
Long
>
sampleIdsList
=
itemList
.
stream
().
map
(
i
->
{
return
i
.
getEntrustSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
sampleIdsList
)){
if
(
CollectionUtils
.
isEmpty
(
sampleIdsList
))
{
return
page
;
}
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
));
if
(
CollectionUtils
.
isEmpty
(
sampleList
)){
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
));
if
(
CollectionUtils
.
isEmpty
(
sampleList
))
{
return
page
;
}
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByItemHis
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
if
(
CollectionUtils
.
isEmpty
(
entrust
.
getItemStatusEnumList
())){
if
(
CollectionUtils
.
isEmpty
(
entrust
.
getItemStatusEnumList
()))
{
return
page
;
}
List
<
EntrustSampleItem
>
itemList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"status"
,
entrust
.
getItemStatusEnumList
()));
if
(
CollectionUtils
.
isEmpty
(
itemList
)){
List
<
EntrustSampleItem
>
itemList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"status"
,
entrust
.
getItemStatusEnumList
()));
if
(
CollectionUtils
.
isEmpty
(
itemList
))
{
return
page
;
}
List
<
Long
>
sampleIdsList
=
itemList
.
stream
().
map
(
i
->
{
List
<
Long
>
sampleIdsList
=
itemList
.
stream
().
map
(
i
->
{
return
i
.
getEntrustSampleId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
sampleIdsList
)){
if
(
CollectionUtils
.
isEmpty
(
sampleIdsList
))
{
return
page
;
}
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
));
if
(
CollectionUtils
.
isEmpty
(
sampleList
)){
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
in
(
"id"
,
sampleIdsList
));
if
(
CollectionUtils
.
isEmpty
(
sampleList
))
{
return
page
;
}
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustBySample
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
null
==
entrust
.
getSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()));
RestAssert
.
fail
(
null
==
entrust
.
getSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()));
if
(
CollectionUtils
.
isEmpty
(
sampleList
)){
if
(
CollectionUtils
.
isEmpty
(
sampleList
))
{
return
page
;
}
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByNotSample
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
null
==
entrust
.
getNotSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
ne
(
"status"
,
entrust
.
getNotSampleStatus
()));
RestAssert
.
fail
(
null
==
entrust
.
getNotSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
sampleList
=
entrustSampleService
.
list
(
Condition
.
create
().
ne
(
"status"
,
entrust
.
getNotSampleStatus
()));
if
(
CollectionUtils
.
isEmpty
(
sampleList
)){
if
(
CollectionUtils
.
isEmpty
(
sampleList
))
{
return
page
;
}
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByReport
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
null
==
entrust
.
getReportStatus
(),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getReportStatus
()));
RestAssert
.
fail
(
null
==
entrust
.
getReportStatus
(),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getReportStatus
()));
if
(
CollectionUtils
.
isEmpty
(
reportList
)){
if
(
CollectionUtils
.
isEmpty
(
reportList
))
{
return
page
;
}
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByReportNotHis
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
null
==
entrust
.
getReportNotStatus
(),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
ne
(
"status"
,
entrust
.
getReportNotStatus
()));
RestAssert
.
fail
(
null
==
entrust
.
getReportNotStatus
(),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
ne
(
"status"
,
entrust
.
getReportNotStatus
()));
if
(
CollectionUtils
.
isEmpty
(
reportList
)){
if
(
CollectionUtils
.
isEmpty
(
reportList
))
{
return
page
;
}
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustByReportHis
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
entrust
.
getReportStatusList
()),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
in
(
"status"
,
entrust
.
getReportStatusList
()));
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
entrust
.
getReportStatusList
()),
"报告状态不能为空"
);
List
<
EntrustReport
>
reportList
=
entrustReportService
.
list
(
Condition
.
create
().
in
(
"status"
,
entrust
.
getReportStatusList
()));
if
(
CollectionUtils
.
isEmpty
(
reportList
)){
if
(
CollectionUtils
.
isEmpty
(
reportList
))
{
return
page
;
}
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustJudge
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
RestAssert
.
fail
(
null
==
entrust
.
getSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
reportList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()).
eq
(
"judge_status"
,
entrust
.
getJudgeStatus
()));
RestAssert
.
fail
(
null
==
entrust
.
getSampleStatus
(),
"样品状态不能为空"
);
List
<
EntrustSample
>
reportList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()).
eq
(
"judge_status"
,
entrust
.
getJudgeStatus
()));
if
(
CollectionUtils
.
isEmpty
(
reportList
)){
if
(
CollectionUtils
.
isEmpty
(
reportList
))
{
return
page
;
}
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustJudgeHis
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
List
<
EntrustSample
>
reportList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()).
in
(
"judge_status"
,
entrust
.
getJudgeStatusList
()));
List
<
EntrustSample
>
reportList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"status"
,
entrust
.
getSampleStatus
()).
in
(
"judge_status"
,
entrust
.
getJudgeStatusList
()));
if
(
CollectionUtils
.
isEmpty
(
reportList
)){
if
(
CollectionUtils
.
isEmpty
(
reportList
))
{
return
page
;
}
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
List
<
Long
>
ids
=
reportList
.
stream
().
map
(
s
->
{
return
s
.
getEntrustId
();
}).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
ids
)){
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
page
;
}
entrust
.
setIdsList
(
ids
);
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
outInputSubmitToQualityCheck
(
Long
[]
ids
,
Account
account
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
OUT_INPUT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择外委数据录入的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要提交的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
OUT_INPUT
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择外委数据录入的委托"
);
Entrust
entrust
=
new
Entrust
();
entrust
.
setStatus
(
EntrustStatusEnum
.
QUALITY_CHECK
);
entrust
.
setProgress
(
EntrustStatusEnum
.
QUALITY_CHECK
);
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
if
(
update
(
entrust
,
Condition
.
create
().
in
(
"id"
,
ids
)))
{
EntrustSample
entrustSample
=
new
EntrustSample
();
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
END
);
entrustSample
.
setProgress
(
EntrustSampleStatusEnum
.
END
);
entrustSampleService
.
update
(
entrustSample
,
Condition
.
create
().
in
(
"entrust_id"
,
ids
));
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
OUT_INPUT
.
getDisplay
(),
EntrustStatusEnum
.
QUALITY_CHECK
.
getDisplay
(),
0
,
account
,
"外委数据录入提交至质量判定"
);
lmsMsgService
.
sendMsg
(
"/hmhj/quality_manage/quality_decide"
,
"有外委数据录入提交过来进行质量判定,请及时进行质量判定"
,
"新的质量判定任务!"
,
account
,
null
);
entrustSampleService
.
update
(
entrustSample
,
Condition
.
create
().
in
(
"entrust_id"
,
ids
));
entrustRecordService
.
record
(
ids
,
EntrustStatusEnum
.
OUT_INPUT
.
getDisplay
(),
EntrustStatusEnum
.
QUALITY_CHECK
.
getDisplay
(),
0
,
account
,
"外委数据录入提交至质量判定"
);
lmsMsgService
.
sendMsg
(
"/hmhj/quality_manage/quality_decide"
,
"有外委数据录入提交过来进行质量判定,请及时进行质量判定"
,
"新的质量判定任务!"
,
account
,
null
);
}
return
true
;
}
@Override
public
Page
<
EntrustVO
>
pageVO
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
@Override
public
Page
<
EntrustVO
>
pageEntrustProgress
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
List
<
EntrustVO
>
voList
=
baseMapper
.
selectEntrustProgressList
(
page
,
entrust
);
if
(
CollectionUtils
.
isEmpty
(
voList
)){
List
<
EntrustVO
>
voList
=
baseMapper
.
selectEntrustProgressList
(
page
,
entrust
);
if
(
CollectionUtils
.
isEmpty
(
voList
))
{
return
page
;
}
List
<
Long
>
entrustIds
=
voList
.
stream
().
map
(
e
->
{
List
<
Long
>
entrustIds
=
voList
.
stream
().
map
(
e
->
{
return
e
.
getId
();
}).
collect
(
Collectors
.
toList
());
List
<
EntrustSampleVO
>
sampleVOList
=
entrustSampleService
.
listMinStatusByEntrustIds
(
entrustIds
);
Map
<
Long
,
EntrustSampleVO
>
sampleVOMap
=
new
HashMap
<>();
Map
<
Long
,
EntrustSampleVO
>
sampleVOMap
=
new
HashMap
<>();
for
(
EntrustSampleVO
vo
:
sampleVOList
)
{
sampleVOMap
.
put
(
vo
.
getEntrustId
(),
vo
);
sampleVOMap
.
put
(
vo
.
getEntrustId
(),
vo
);
}
Map
<
Long
,
EntrustSampleItemVO
>
itemVOMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
sampleVOList
)){
List
<
Long
>
sampleIds
=
sampleVOList
.
stream
().
map
(
e
->
{
if
(
CollectionUtils
.
isNotEmpty
(
sampleVOList
))
{
List
<
Long
>
sampleIds
=
sampleVOList
.
stream
().
map
(
e
->
{
return
e
.
getId
();
}).
collect
(
Collectors
.
toList
());
List
<
EntrustSampleItemVO
>
itemVOList
=
entrustSampleItemService
.
listMinStatusBySampleIds
(
sampleIds
);
for
(
EntrustSampleItemVO
entrustSampleItemVO
:
itemVOList
)
{
itemVOMap
.
put
(
entrustSampleItemVO
.
getEntrustSampleId
(),
entrustSampleItemVO
);
itemVOMap
.
put
(
entrustSampleItemVO
.
getEntrustSampleId
(),
entrustSampleItemVO
);
}
}
for
(
EntrustVO
vo
:
voList
)
{
EntrustSampleVO
sampleVO
=
sampleVOMap
.
get
(
vo
.
getId
());
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
DRAFT
)){
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
DRAFT
))
{
vo
.
setNowStatus
(
"委托登记"
);
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
OUT_DRAFT
))
{
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
OUT_DRAFT
))
{
vo
.
setNowStatus
(
"委托登记"
);
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
CHECK
))
{
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
CHECK
))
{
vo
.
setNowStatus
(
"委托评审"
);
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
MAKE
))
{
}
else
if
(
vo
.
getStatus
().
equals
(
EntrustStatusEnum
.
MAKE
))
{
vo
.
setNowStatus
(
"样品制备"
);
}
if
(
sampleVO
==
null
)
{
if
(
sampleVO
==
null
)
{
continue
;
}
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
DRAFT
)){
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
DRAFT
))
{
continue
;
}
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
RECEIVE
)){
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
RECEIVE
))
{
vo
.
setNowStatus
(
"样品接收"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
TEST
))
{
EntrustSampleItemVO
itemVO
=
itemVOMap
.
get
(
sampleVO
.
getId
());
if
(
null
!=
itemVO
&&
itemVO
.
getStatus
().
equals
(
EntrustSampleItemStatusEnum
.
ALLOT
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
TEST
))
{
EntrustSampleItemVO
itemVO
=
itemVOMap
.
get
(
sampleVO
.
getId
());
if
(
null
!=
itemVO
&&
itemVO
.
getStatus
().
equals
(
EntrustSampleItemStatusEnum
.
ALLOT
))
{
vo
.
setNowStatus
(
"任务分配"
);
}
else
if
(
null
!=
itemVO
&&
itemVO
.
getStatus
().
equals
(
EntrustSampleItemStatusEnum
.
TEST
))
{
}
else
if
(
null
!=
itemVO
&&
itemVO
.
getStatus
().
equals
(
EntrustSampleItemStatusEnum
.
TEST
))
{
vo
.
setNowStatus
(
"试样检测"
);
}
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_MAKE
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_MAKE
))
{
vo
.
setNowStatus
(
"报告编制"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_CHECK
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_CHECK
))
{
vo
.
setNowStatus
(
"报告审核中"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_ALLOW
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_ALLOW
))
{
vo
.
setNowStatus
(
"报告审核中"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_ISSUE
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_ISSUE
))
{
vo
.
setNowStatus
(
"报告发放"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_SEND
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
REPORT_SEND
))
{
vo
.
setNowStatus
(
"报告发放"
);
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
END
))
{
}
else
if
(
sampleVO
.
getStatus
().
equals
(
EntrustSampleStatusEnum
.
END
))
{
vo
.
setNowStatus
(
"质量判定"
);
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/UserInspectionCodeServiceImpl.java
0 → 100644
View file @
c6b50cb5
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
.
impl
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.service.hmhj.entity.UserInspectionCode
;
import
com.patzn.cloud.service.lims.hmhj.mapper.UserInspectionCodeMapper
;
import
com.patzn.cloud.service.lims.hmhj.service.IUserInspectionCodeService
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* 用户质检编码基础数据 服务实现类
*
* @author meazty
* @since 2021-06-20
*/
@Service
public
class
UserInspectionCodeServiceImpl
extends
BaseServiceImpl
<
UserInspectionCodeMapper
,
UserInspectionCode
>
implements
IUserInspectionCodeService
{
@Override
public
Page
<
UserInspectionCode
>
page
(
Page
<
UserInspectionCode
>
page
,
UserInspectionCode
sysUserInspectionCode
)
{
Wrapper
wrapper
=
new
EntityWrapper
<>(
sysUserInspectionCode
);
return
this
.
page
(
page
,
wrapper
);
}
@Override
public
boolean
removeByIds
(
List
<
Long
>
ids
)
{
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
}
}
src/main/
java/com/patzn/cloud/service/lims/hmhj/sql/Electrolyzer
Mapper.xml
→
src/main/
resources/mapper/hmhj/UserInspectionCode
Mapper.xml
View file @
c6b50cb5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.patzn.cloud.service.lims.hmhj.mapper.
Electrolyzer
Mapper"
>
<mapper
namespace=
"com.patzn.cloud.service.lims.hmhj.mapper.
UserInspectionCode
Mapper"
>
</mapper>
src/test/java/resources/db_sql/hmhj/v113/新增质检编号-user_inspection_code.sql
0 → 100644
View file @
c6b50cb5
/*
/*
Navicat Premium Data Transfer
Source Server : 本地库
Source Server Type : PostgreSQL
Source Server Version : 120006
Source Host : localhost:5432
Source Catalog : dev_lims_hmhj
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 120006
File Encoding : 65001
Date: 21/06/2021 09:22:35
*/
-- ----------------------------
-- Table structure for user_inspection_code
-- ----------------------------
DROP
TABLE
IF
EXISTS
"public"
.
"user_inspection_code"
;
CREATE
TABLE
"public"
.
"user_inspection_code"
(
"id"
int8
NOT
NULL
,
"user_id"
int8
,
"username"
varchar
(
120
)
COLLATE
"pg_catalog"
.
"default"
,
"realname"
varchar
(
32
)
COLLATE
"pg_catalog"
.
"default"
,
"type"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
,
"no"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
,
"remark"
varchar
(
255
)
COLLATE
"pg_catalog"
.
"default"
,
"creator"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
,
"company_id"
int8
,
"uid"
int8
,
"ctime"
timestamp
(
0
),
"ltime"
timestamp
(
0
),
"lid"
int8
,
"deleted"
int2
DEFAULT
0
)
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"user_id"
IS
'用户id'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"username"
IS
'用户名'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"realname"
IS
'用户姓名'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"type"
IS
'类型【ZJ:质检员,HY:化验员,HL:衡量员】'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"no"
IS
'用户编码'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"remark"
IS
'备注'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"creator"
IS
'创建人'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"company_id"
IS
'企业ID'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"uid"
IS
'创建人ID'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"ctime"
IS
'创建时间'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"ltime"
IS
'最后修改时间'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"lid"
IS
'最后修改人ID'
;
COMMENT
ON
COLUMN
"public"
.
"user_inspection_code"
.
"deleted"
IS
'是否删除0否1是'
;
COMMENT
ON
TABLE
"public"
.
"user_inspection_code"
IS
'用户质检编码基础数据'
;
-- ----------------------------
-- Primary Key structure for table user_inspection_code
-- ----------------------------
ALTER
TABLE
"public"
.
"user_inspection_code"
ADD
CONSTRAINT
"electrolyzer_copy1_pkey"
PRIMARY
KEY
(
"id"
);
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