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
62ee1f91
Commit
62ee1f91
authored
Oct 09, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改进场物资编码问题;
parent
57282c37
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
462 additions
and
31 deletions
+462
-31
EntrustController.java
...cloud/service/lims/hmhj/controller/EntrustController.java
+26
-0
EntrustSampleController.java
...service/lims/hmhj/controller/EntrustSampleController.java
+25
-2
EntrustSampleItemMapper.java
...oud/service/lims/hmhj/mapper/EntrustSampleItemMapper.java
+3
-5
EntrustSampleMapper.java
...n/cloud/service/lims/hmhj/mapper/EntrustSampleMapper.java
+2
-0
IdentifierMapper.java
...atzn/cloud/service/lims/hmhj/mapper/IdentifierMapper.java
+16
-0
IEntrustReportService.java
...loud/service/lims/hmhj/service/IEntrustReportService.java
+4
-0
IEntrustReportTemplateService.java
...vice/lims/hmhj/service/IEntrustReportTemplateService.java
+4
-2
IEntrustSampleItemService.java
.../service/lims/hmhj/service/IEntrustSampleItemService.java
+5
-0
IEntrustSampleService.java
...loud/service/lims/hmhj/service/IEntrustSampleService.java
+6
-4
IEntrustService.java
...atzn/cloud/service/lims/hmhj/service/IEntrustService.java
+1
-0
IIdentifierService.java
...n/cloud/service/lims/hmhj/service/IIdentifierService.java
+22
-0
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+0
-0
EntrustReportTemplateServiceImpl.java
...s/hmhj/service/impl/EntrustReportTemplateServiceImpl.java
+12
-4
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+48
-5
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+0
-0
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+41
-7
IdentifierServiceImpl.java
...service/lims/hmhj/service/impl/IdentifierServiceImpl.java
+116
-0
application-local.yml
src/main/resources/application-local.yml
+1
-1
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+7
-1
EntrustSampleItemMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
+21
-0
EntrustSampleMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
+48
-0
TestThreadLocal.java
...va/com/patzn/cloud/service/lims/test/TestThreadLocal.java
+38
-0
20211008新增字段.sql
src/test/java/resources/db_sql/hmhj/v170/20211008新增字段.sql
+16
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustController.java
View file @
62ee1f91
...
...
@@ -3,6 +3,7 @@ package com.patzn.cloud.service.lims.hmhj.controller;
import
com.baomidou.kisso.annotation.Action
;
import
com.baomidou.kisso.annotation.Login
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.google.common.collect.Lists
;
import
com.patzn.cloud.commons.api.RestConstants
;
import
com.patzn.cloud.commons.api.RestResult
;
...
...
@@ -820,6 +821,21 @@ public class EntrustController extends ServiceController {
return
success
(
entrustService
.
pageEntrustByReportHis
(
getPage
(),
entrust
));
}
@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
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SIDX
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SORD
,
value
=
"排序方式"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
})
@PostMapping
(
"/page_report_product"
)
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportProduct
(
EntrustVO
entrust
)
{
// entrust.setGroupNameList(userInfoService.getCurGroupNameList());
// 查询成品报告列表
entrust
.
setSampleType
(
2
);
return
success
(
entrustService
.
getPageReportProduct
(
getPage
(),
entrust
));
}
@ApiOperation
(
"质量判定委托分页列表"
)
@ApiImplicitParams
({
...
...
@@ -948,4 +964,14 @@ public class EntrustController extends ServiceController {
public
RestResult
<
Page
<
EntrustVO
>>
getPageEntrustTpl
(
EntrustVO
entrust
)
{
return
success
(
entrustService
.
getPageEntrustTpl
(
getPage
(),
entrust
));
}
@ApiOperation
(
"是否属于化验组织"
)
@RequestMapping
(
value
=
"/belong_assay"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
RestResult
<
Boolean
>
isBelongAssay
()
{
List
<
String
>
orgNames
=
userInfoService
.
getUserOrgNames
(
getAccount
());
if
(
CollectionUtils
.
isEmpty
(
orgNames
))
{
return
success
(
false
);
}
return
success
(
userInfoService
.
getUserOrgNames
(
getAccount
()).
stream
().
anyMatch
(
t
->
t
.
contains
(
"化验"
)
&&
!
t
.
contains
(
"净化化验"
)));
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustSampleController.java
View file @
62ee1f91
...
...
@@ -17,6 +17,7 @@ import com.patzn.cloud.service.hmhj.enums.EntrustSamplePrepareStatusEnum;
import
com.patzn.cloud.service.hmhj.enums.EntrustSampleStatusEnum
;
import
com.patzn.cloud.service.hmhj.vo.AlGradeStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.ElectrolyteRatioStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleIndexVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleVO
;
import
com.patzn.cloud.service.lims.hmhj.service.IEntrustSampleService
;
import
com.patzn.cloud.service.lims.hmhj.service.impl.UserInfoServiceImpl
;
...
...
@@ -146,6 +147,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_report_issue"
)
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportIssue
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_ISSUE
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
}
...
...
@@ -159,6 +161,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_report_allow"
)
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportAllow
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_ALLOW
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
}
...
...
@@ -172,6 +175,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_report_send"
)
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportSend
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_SEND
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
}
...
...
@@ -185,6 +189,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_quality_inspect"
)
public
RestResult
<
Page
<
EntrustSample
>>
getPageQualityInspect
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
QUALITY_INSPECT
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
}
...
...
@@ -488,8 +493,8 @@ public class EntrustSampleController extends ServiceController {
private
void
handlerData
(
EntrustSampleVO
vo
)
{
// 数据来源
// 若为数据录入节点且不为分组管理员,那么需要过滤数据
boolean
isLeader
=
userInfoService
.
isGroupLeader
(
vo
.
getEntrustId
(),
getAccount
());
if
(
"TEST"
.
equalsIgnoreCase
(
vo
.
getSource
())
&&
!
isLeader
)
{
boolean
isLeader
=
userInfoService
.
isGroupLeader
(
vo
.
getEntrustId
(),
getAccount
());
if
(
"TEST"
.
equalsIgnoreCase
(
vo
.
getSource
())
&&
!
isLeader
)
{
vo
.
setTesterId
(
getAccount
().
getUserId
());
}
}
...
...
@@ -622,4 +627,22 @@ public class EntrustSampleController extends ServiceController {
public
RestResult
<
Boolean
>
scanReceive
(
@RequestParam
(
"sampleCode"
)
String
sampleCode
)
{
return
success
(
entrustSampleService
.
scanReceive
(
sampleCode
,
getAccount
()));
}
@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
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SIDX
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SORD
,
value
=
"排序方式"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
})
@PostMapping
(
"/page_sample_index"
)
public
RestResult
<
Page
<
EntrustSampleIndexVO
>>
getPageSampleIndex
(
EntrustSampleIndexVO
sampleIndexVO
)
{
return
success
(
entrustSampleService
.
getPageSampleIndex
(
getPage
(),
sampleIndexVO
));
}
@ApiOperation
(
"导出样品指标信息"
)
@RequestMapping
(
value
=
"/export_sample_index"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
void
exportSampleIndex
(
Long
entrustId
)
{
entrustSampleService
.
exportSampleIndex
(
entrustId
,
getAccount
(),
response
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/EntrustSampleItemMapper.java
View file @
62ee1f91
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
mapper
;
import
com.baomidou.mybatisplus.annotations.SqlParser
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.service.hmhj.dto.QueryDTO
;
import
com.patzn.cloud.service.hmhj.dto.SampleItemDTO
;
import
com.patzn.cloud.service.hmhj.entity.EntrustSampleItem
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleCalcResultVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO
;
import
com.patzn.cloud.service.hmhj.vo.SampleItemStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.TesterWorkloadStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.*
;
import
com.patzn.cloud.service.lims.base.entity.LmsUserRelGroup
;
import
com.patzn.cloud.service.lims.base.vo.LmsUserRelGroupVO
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -81,4 +77,6 @@ public interface EntrustSampleItemMapper extends BatchMapper<EntrustSampleItem>
@SqlParser
(
filter
=
true
)
boolean
updateSampleRetakeInfoByEntrustId
(
@Param
(
"entrustId"
)
Long
entrustId
);
List
<
EntrustSampleItemIndexVO
>
selectItemTestByEntrustId
(
@Param
(
"entrustId"
)
Long
entrustId
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/EntrustSampleMapper.java
View file @
62ee1f91
...
...
@@ -47,4 +47,6 @@ public interface EntrustSampleMapper extends BatchMapper<EntrustSample> {
List
<
ReportSampleVO
>
selectReportSampleInfos
(
@Param
(
"sampleIds"
)
Long
[]
sampleIds
);
String
selectLastCode
(
@Param
(
"queryKey"
)
String
queryKey
);
List
<
EntrustSampleIndexVO
>
selectSampleIndex
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustSampleIndexVO
sampleIndexVO
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/IdentifierMapper.java
0 → 100644
View file @
62ee1f91
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
mapper
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.service.hmhj.entity.Identifier
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author meazty
* @since 2021-10-09
*/
public
interface
IdentifierMapper
extends
BatchMapper
<
Identifier
>
{
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustReportService.java
View file @
62ee1f91
...
...
@@ -28,6 +28,10 @@ public interface IEntrustReportService extends IBaseService<EntrustReport> {
void
uploadReportGenerateDocx
(
Entrust
entrust
,
Long
[]
ids
,
Account
account
,
String
name
,
String
remark
,
File
file
);
void
uploadReportGenerateXlsx
(
Entrust
entrust
,
Long
[]
ids
,
Account
account
,
String
name
,
String
remark
,
File
file
);
boolean
submitReportMake
(
Long
[]
ids
,
Account
account
);
boolean
submitReportCheck
(
Long
[]
ids
,
Account
account
);
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustReportTemplateService.java
View file @
62ee1f91
...
...
@@ -9,7 +9,7 @@ import org.springframework.web.multipart.MultipartFile;
import
java.util.List
;
/**
*
服务类
* 服务类
*
* @author wwd
* @since 2021-02-26
...
...
@@ -20,7 +20,9 @@ public interface IEntrustReportTemplateService extends IBaseService<EntrustRepor
boolean
removeByIds
(
List
<
Long
>
ids
);
boolean
uploadTemplate
(
MultipartFile
file
,
String
name
,
String
classType
,
String
remark
);
boolean
uploadTemplate
(
MultipartFile
file
,
String
name
,
String
classType
,
String
remark
);
boolean
updateTemplateById
(
EntrustReportTemplate
entrustReportTemplate
,
Account
account
);
EntrustReportTemplate
getByClassType
(
String
classType
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustSampleItemService.java
View file @
62ee1f91
...
...
@@ -10,6 +10,7 @@ import com.patzn.cloud.service.hmhj.entity.ItemDeviate;
import
com.patzn.cloud.service.hmhj.entity.OriginalRecord
;
import
com.patzn.cloud.service.hmhj.enums.EntrustFlowEnum
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleCalcResultVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleItemIndexVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO
;
import
com.patzn.cloud.service.hmhj.vo.TesterWorkloadStatsVO
;
import
com.patzn.cloud.service.lims.base.entity.LmsUserRelGroup
;
...
...
@@ -119,4 +120,8 @@ public interface IEntrustSampleItemService extends IBaseService<EntrustSampleIte
boolean
updateSampleRetakeByEntrustId
(
Long
entrustId
);
List
<
EntrustSampleItemVO
>
getSampleItemIndexList
(
Long
sampleId
);
List
<
EntrustSampleItemIndexVO
>
getItemTestByEntrustId
(
Long
entrustIds
);
EntrustSampleItem
getItemModelBySampleId
(
Long
sampleId
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustSampleService.java
View file @
62ee1f91
...
...
@@ -11,11 +11,9 @@ import com.patzn.cloud.service.hmhj.dto.StatsQueryDTO;
import
com.patzn.cloud.service.hmhj.entity.Entrust
;
import
com.patzn.cloud.service.hmhj.entity.EntrustSample
;
import
com.patzn.cloud.service.hmhj.enums.EntrustFlowEnum
;
import
com.patzn.cloud.service.hmhj.vo.AlGradeStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.ElectrolyteRatioStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleVO
;
import
com.patzn.cloud.service.hmhj.vo.ReportSampleVO
;
import
com.patzn.cloud.service.hmhj.vo.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -128,4 +126,8 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
EntrustSample
getByContractId
(
Long
contractId
);
boolean
saveOrUpdateInfoBatch
(
List
<
EntrustSample
>
sampleList
);
Page
<
EntrustSampleIndexVO
>
getPageSampleIndex
(
Page
<
EntrustSampleIndexVO
>
page
,
EntrustSampleIndexVO
sampleIndexVO
);
void
exportSampleIndex
(
Long
entrustId
,
Account
account
,
HttpServletResponse
response
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustService.java
View file @
62ee1f91
...
...
@@ -116,4 +116,5 @@ public interface IEntrustService extends IBaseService<Entrust> {
boolean
submitToNextFlow
(
Long
[]
ids
,
Account
account
);
boolean
saveOrUpdateToSubmit
(
EntrustDTO
entrustDTO
,
Account
account
);
Page
<
EntrustVO
>
getPageReportProduct
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IIdentifierService.java
0 → 100644
View file @
62ee1f91
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.Identifier
;
import
java.util.List
;
/**
* 服务类
*
* @author meazty
* @since 2021-10-09
*/
public
interface
IIdentifierService
extends
IBaseService
<
Identifier
>
{
Page
<
Identifier
>
page
(
Page
<
Identifier
>
page
,
Identifier
identifier
);
boolean
removeByIds
(
List
<
Long
>
ids
);
String
getNextSN
(
String
type
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
62ee1f91
This diff is collapsed.
Click to expand it.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportTemplateServiceImpl.java
View file @
62ee1f91
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
.
impl
;
import
com.baomidou.mybatisplus.mapper.Condition
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.oss.starter.OssClient
;
import
com.patzn.cloud.oss.starter.OssFileResult
;
import
com.patzn.cloud.service.hmhj.entity.EntrustReportTemplate
;
import
com.patzn.cloud.service.lims.hmhj.mapper.EntrustReportTemplateMapper
;
import
com.patzn.cloud.service.lims.hmhj.service.IEntrustReportTemplateService
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Date
;
...
...
@@ -76,4 +78,10 @@ public class EntrustReportTemplateServiceImpl extends BaseServiceImpl<EntrustRep
entrustReportTemplate
.
setLid
(
account
.
getUserId
()).
setLtime
(
new
Date
());
return
baseMapper
.
updateTemplateById
(
entrustReportTemplate
);
}
@Override
public
EntrustReportTemplate
getByClassType
(
String
classType
)
{
List
<
EntrustReportTemplate
>
list
=
list
(
Condition
.
create
().
eq
(
"class_type"
,
classType
));
return
CollectionUtils
.
isEmpty
(
list
)
?
null
:
list
.
get
(
0
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
62ee1f91
...
...
@@ -975,7 +975,17 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
RestAssert
.
fail
(
null
==
ids
||
ids
.
length
==
0
,
"样品编号不能为空"
);
// ==
List
<
EntrustSampleVO
>
sampleList
=
entrustSampleService
.
getVOListByIds
(
Arrays
.
asList
(
ids
));
RestAssert
.
fail
(
CollectionUtils
.
isEmpty
(
sampleList
),
"样品信息不能为空"
);
Long
entrustId
=
sampleList
.
get
(
0
).
getEntrustId
();
EntrustSampleVO
voEntity
=
new
EntrustSampleVO
();
voEntity
.
setEntrustId
(
entrustId
).
setType
(
2
);
List
<
EntrustSampleVO
>
batchSampleList
=
entrustSampleService
.
selectVOLists
(
voEntity
);
if
(
CollectionUtils
.
isNotEmpty
(
batchSampleList
))
{
sampleList
.
addAll
(
batchSampleList
);
}
//其他稀有元素
List
<
String
>
otherYsList
=
Arrays
.
asList
(
"Mn"
,
"V"
,
"Ni"
);
...
...
@@ -1125,7 +1135,10 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if
(
updateSampleList
.
size
()
>
0
)
{
entrustSampleService
.
updateBatchById
(
updateSampleList
);
}
handleSampleBrand
(
ids
);
// 处理正常的报告文件
handleSampleBrand
(
ids
,
false
);
// 处理一级编码的报告文件
handleSampleBrand
(
ids
,
true
);
return
true
;
}
...
...
@@ -1137,6 +1150,21 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
return
baseMapper
.
listIndexReplaceItemBySampleId
(
sampleId
);
}
@Override
public
List
<
EntrustSampleItemIndexVO
>
getItemTestByEntrustId
(
Long
entrustId
)
{
if
(
null
==
entrustId
)
return
null
;
return
baseMapper
.
selectItemTestByEntrustId
(
entrustId
);
}
@Override
public
EntrustSampleItem
getItemModelBySampleId
(
Long
sampleId
)
{
if
(
null
==
sampleId
)
{
return
null
;
}
List
<
EntrustSampleItem
>
itemList
=
list
(
Condition
.
create
().
eq
(
"entrust_sample_id"
,
sampleId
));
return
CollectionUtils
.
isNotEmpty
(
itemList
)
?
itemList
.
get
(
0
)
:
null
;
}
private
String
getCellValue
(
XSSFRow
xssfRow
,
int
cellIndex
)
{
XSSFCell
cell
=
xssfRow
.
getCell
(
cellIndex
);
String
value
=
HSSFWorkbookUtil
.
getJavaValue
(
cell
).
toString
();
...
...
@@ -1148,7 +1176,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
*
* @param ids
*/
private
void
handleSampleBrand
(
Long
[]
ids
)
{
private
void
handleSampleBrand
(
Long
[]
ids
,
Boolean
isOther
)
{
if
(
null
==
ids
||
0
==
ids
.
length
)
{
return
;
}
...
...
@@ -1157,16 +1185,27 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if
(
CollectionUtils
.
isEmpty
(
reportSampleList
))
{
return
;
}
Boolean
finalIsOther
=
null
!=
isOther
&&
isOther
;
List
<
EntrustReport
>
reportList
=
new
ArrayList
<>();
// objectKey data
Map
<
String
,
Long
>
objReportMap
=
reportSampleList
.
stream
().
collect
(
Collectors
.
toMap
(
ReportSampleVO:
:
getObjectKey
,
ReportSampleVO:
:
getReportId
,
(
v1
,
v2
)
->
v1
));
Map
<
String
,
Long
>
objReportMap
=
reportSampleList
.
stream
().
collect
(
Collectors
.
toMap
(
t
->
{
return
finalIsOther
?
t
.
getOtherObjectKey
()
:
t
.
getObjectKey
();
},
ReportSampleVO:
:
getReportId
,
(
v1
,
v2
)
->
v1
));
for
(
Map
.
Entry
<
String
,
Long
>
entry
:
objReportMap
.
entrySet
())
{
EntrustReport
entrustReport
=
new
EntrustReport
();
String
objectKey
=
entry
.
getKey
();
Long
reportId
=
entry
.
getValue
();
entrustReport
.
setId
(
reportId
);
Map
<
String
,
String
>
sampleMap
=
reportSampleList
.
stream
().
filter
(
t
->
t
.
getObjectKey
().
equals
(
objectKey
)).
collect
(
Collectors
.
toMap
(
ReportSampleVO:
:
getSampleCode
,
ReportSampleVO:
:
getSampleGrading
));
Map
<
String
,
String
>
sampleMap
=
reportSampleList
.
stream
().
filter
(
t
->
t
.
getObjectKey
().
equals
(
objectKey
)).
collect
(
Collectors
.
toMap
(
t
->
{
return
finalIsOther
?
t
.
getFirstCode
()
:
t
.
getSampleCode
();
},
ReportSampleVO:
:
getSampleGrading
));
if
(
StringUtils
.
isBlank
(
objectKey
))
{
continue
;
}
InputStream
io
=
ossClient
.
download
(
objectKey
);
//结果回调
...
...
@@ -1227,7 +1266,11 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
os
.
flush
();
OssFileResult
fileResult
=
ossClient
.
upload
(
file
);
if
(
null
!=
fileResult
)
{
entrustReport
.
setObjectKey
(
fileResult
.
getObjectKey
());
if
(
finalIsOther
)
{
entrustReport
.
setOtherObjectKey
(
fileResult
.
getObjectKey
());
}
else
{
entrustReport
.
setObjectKey
(
fileResult
.
getObjectKey
());
}
reportList
.
add
(
entrustReport
);
}
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
62ee1f91
This diff is collapsed.
Click to expand it.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
62ee1f91
...
...
@@ -110,6 +110,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Autowired
private
OssClient
ossClient
;
@Autowired
private
IIdentifierService
identifierService
;
@Autowired
private
IMaterialService
materialService
;
@Override
public
Page
<
Entrust
>
page
(
Page
<
Entrust
>
page
,
Entrust
entrust
)
{
...
...
@@ -151,7 +157,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
public
void
initSampleCode
(
EntrustSample
sample
)
{
public
void
initSampleCode
(
Entrust
entrust
,
Entrust
Sample
sample
)
{
// 如果合同编号不为空,样品编号不为空,一级编号不为空,则不进行编号生成
if
(
null
!=
sample
.
getContractSampleId
()
&&
StringUtils
.
isNotBlank
(
sample
.
getCode
())
&&
StringUtils
.
isNotBlank
(
sample
.
getFirstCode
()))
{
...
...
@@ -234,7 +240,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
else
if
(
CodeTypeEnum
.
SAMPLE_YFL_CODE
==
codeType
)
{
sampleCode
=
phase
+
sampleCode
.
substring
(
1
);
secondCode
=
sampleCode
.
replace
(
"A"
,
"B"
).
replace
(
replaceStr
,
inspectNo
);
thirdCode
=
sampleCode
.
replace
(
"A"
,
"C"
).
replace
(
replaceStr
,
"HY"
);
// 进场物资,使用针对进场物资的生成规则
if
(
1
==
entrust
.
getType
())
{
thirdCode
=
getSampleThirdCode
(
sample
);
}
else
{
thirdCode
=
sampleCode
.
replace
(
"A"
,
"C"
).
replace
(
replaceStr
,
"HY"
);
}
sampleCode
=
sampleCode
.
replace
(
replaceStr
,
inspectNo
);
}
// 原铝散样样品编号处理
...
...
@@ -307,19 +318,37 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
/**
* 样品编号处理
*/
private
void
handleSampleCode
(
EntrustSample
sample
)
{
private
void
handleSampleCode
(
Entrust
entrust
,
Entrust
Sample
sample
)
{
String
sampleCode
=
sample
.
getCode
();
if
(
isExistSampleCode
(
sample
)
&&
StringUtils
.
isBlank
(
sampleCode
))
{
throw
new
PatznException
(
"样品编号为空"
);
}
// 非已有编码物质为空时,需要生成样品编号
// 生成样品编号
initSampleCode
(
sample
);
initSampleCode
(
entrust
,
sample
);
if
(
StringUtils
.
isNotBlank
(
sampleCode
))
{
sample
.
setCode
(
sampleCode
);
}
}
private
String
getSampleThirdCode
(
EntrustSample
sample
)
{
RestAssert
.
fail
(
null
==
sample
.
getMaterialId
(),
"样品库-物资ID为空"
);
Material
material
=
materialService
.
getById
(
sample
.
getMaterialId
());
RestAssert
.
fail
(
null
==
material
,
"样品库-物资为空"
);
String
factoryArea
=
material
.
getFactoryArea
(),
abbr
=
material
.
getAbbr
();
RestAssert
.
fail
(
StringUtils
.
isBlank
(
factoryArea
),
"样品库-物资厂区为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
abbr
),
"样品库-物资简写为空"
);
String
type
=
""
;
// type 处理
if
(
factoryArea
.
contains
(
"二三期"
))
{
String
period
=
userInfoService
.
getUserPeriod
(
LoginHelper
.
getAccount
());
type
=
HmConst
.
SECOND_PERIOD
.
equals
(
period
)
?
"A"
:
"B"
;
}
type
=
type
+
(
abbr
.
length
()
>
2
?
abbr
:
abbr
+
"0"
);
String
code
=
identifierService
.
getNextSN
(
type
.
toUpperCase
());
return
code
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
boolean
saveEntrustDTO
(
EntrustDTO
dto
,
Account
account
)
{
...
...
@@ -361,7 +390,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
EntrustSample
sample
=
sampleDTO
.
convert
(
EntrustSample
.
class
);
sample
.
setEntrustId
(
entrust
.
getId
());
handleSampleCode
(
sample
);
handleSampleCode
(
entrust
,
sample
);
judgeSampleFields
(
sample
,
true
);
sample
.
setId
(
IdWorker
.
getId
());
sample
.
setOrderBy
(
incNum
);
...
...
@@ -574,7 +603,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
updateSampleList
.
add
(
sample
);
}
else
{
sample
.
setEntrustId
(
entrust
.
getId
());
handleSampleCode
(
sample
);
handleSampleCode
(
entrust
,
sample
);
sample
.
setId
(
IdWorker
.
getId
());
saveSampleList
.
add
(
sample
);
}
...
...
@@ -1071,7 +1100,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
sample
.
setId
(
IdWorker
.
getId
());
sample
.
setCode
(
null
);
//生成样品编号,可能存在为空的情况
initSampleCode
(
sample
);
initSampleCode
(
entrust
,
sample
);
// 样品编号问题,手填的样品编号不清空
if
(
StringUtils
.
isBlank
(
sample
.
getCode
()))
{
sample
.
setCode
(
sampleCode
);
...
...
@@ -1561,4 +1590,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
return
submitToNextFlow
(
new
Long
[]{
entrustDTO
.
getId
()},
account
);
}
@Override
public
Page
<
EntrustVO
>
getPageReportProduct
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
)
{
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/IdentifierServiceImpl.java
0 → 100644
View file @
62ee1f91
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
.
impl
;
import
com.baomidou.mybatisplus.mapper.Condition
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.constant.CommonConstants
;
import
com.patzn.cloud.commons.exception.PatznException
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
com.patzn.cloud.commons.toolkit.FreemarkerUtils
;
import
com.patzn.cloud.service.hmhj.entity.Identifier
;
import
com.patzn.cloud.service.lims.common.StringHandleUtils
;
import
com.patzn.cloud.service.lims.hmhj.mapper.IdentifierMapper
;
import
com.patzn.cloud.service.lims.hmhj.service.IIdentifierService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.joda.time.DateTime
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务实现类
*
* @author meazty
* @since 2021-10-09
*/
@Service
public
class
IdentifierServiceImpl
extends
BaseServiceImpl
<
IdentifierMapper
,
Identifier
>
implements
IIdentifierService
{
@Override
public
Page
<
Identifier
>
page
(
Page
<
Identifier
>
page
,
Identifier
identifier
)
{
Wrapper
wrapper
=
new
EntityWrapper
<>(
identifier
);
return
this
.
page
(
page
,
wrapper
);
}
@Override
public
boolean
removeByIds
(
List
<
Long
>
ids
)
{
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
String
getNextSN
(
String
type
)
{
if
(
StringUtils
.
isBlank
(
type
))
{
throw
new
PatznException
(
"编号类型不能为空"
);
}
Identifier
identifier
=
super
.
getOne
(
Condition
.
create
().
eq
(
"type"
,
type
).
last
(
"LIMIT 1"
));
if
(
null
==
identifier
)
{
throw
new
PatznException
(
"请配置编号规则"
);
}
StringBuilder
key
=
new
StringBuilder
();
// 前缀规则
if
(
null
!=
identifier
.
getPrefix
())
{
key
.
append
(
identifier
.
getPrefix
());
}
String
[]
rules
=
identifier
.
getRule
().
split
(
"&"
);
Map
<
String
,
Object
>
model
=
new
HashMap
<>(
2
);
for
(
String
rule
:
rules
)
{
// 日期规则
if
(
rule
.
contains
(
"@"
))
{
if
(
"@YY"
.
equalsIgnoreCase
(
rule
))
{
key
.
append
(
new
DateTime
().
toString
(
"YYYY"
).
substring
(
2
));
}
else
{
key
.
append
(
new
DateTime
().
toString
(
rule
.
substring
(
1
)));
}
}
else
if
(
rule
.
contains
(
"%"
))
{
String
myRules
=
rule
.
replace
(
"%"
,
""
).
replace
(
"{"
,
""
).
replace
(
"}"
,
""
);
String
[]
dictArr
=
myRules
.
split
(
"\\."
);
if
(
null
!=
dictArr
[
1
])
{
key
.
append
(
StringHandleUtils
.
getFieldValueByFieldName
(
dictArr
[
1
],
model
.
get
(
"et"
)));
}
}
// 属性规则
else
if
(
rule
.
contains
(
"$"
))
{
try
{
key
.
append
(
FreemarkerUtils
.
process
(
rule
,
model
));
}
catch
(
Exception
e
)
{
RestAssert
.
fail
(
"编号生成异常,请联系管理员"
);
}
}
// SN 序列号
else
if
(
"SN"
.
equals
(
rule
))
{
key
.
append
(
CommonConstants
.
SN
);
}
// 原样输出
else
{
key
.
append
(
rule
);
}
}
// 更新SN,限定长度最高9位
String
sn
=
""
;
StringBuilder
sb
=
new
StringBuilder
(
"0"
);
int
snInt
=
null
==
identifier
.
getSn
()
?
0
:
identifier
.
getSn
(),
lens
=
null
==
identifier
.
getLength
()
?
1
:
identifier
.
getLength
();
while
(
sb
.
length
()
<
lens
)
{
sb
.
append
(
"0"
);
}
String
defZero
=
sb
.
toString
();
sn
=
defZero
.
substring
(
0
,
defZero
.
length
()
-
Integer
.
toString
(
snInt
).
length
());
snInt
+=
1
;
if
(
Integer
.
toString
(
snInt
).
length
()
>
lens
)
{
identifier
.
setLength
(++
lens
);
}
identifier
.
setSn
(
snInt
);
updateById
(
identifier
);
return
key
.
toString
().
replaceAll
(
CommonConstants
.
SN
,
sn
);
}
}
src/main/resources/application-local.yml
View file @
62ee1f91
...
...
@@ -50,7 +50,7 @@ spring:
data
:
mongodb
:
# uri: mongodb://hmuser:hj564Aq@meazty.fun:27017/lims
uri
:
mongodb://mongo:
mong123
@meazty.fun:27017/lims
uri
:
mongodb://mongo:
Mong$6358#
@meazty.fun:27017/lims
grid-fs-database
:
lims
# Mongodb GridFS 存储
...
...
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
62ee1f91
...
...
@@ -129,13 +129,19 @@
with sample as (
SELECT
s.company_id,s.entrust_id,max(s.sample_from) "sample_from"
from entrust_sample s where s.deleted = 0
and s.type = 0
from entrust_sample s where s.deleted = 0
<if
test=
"null != vo.sampleStatus"
>
and s.status = #{vo.sampleStatus}
</if>
<if
test=
"null != vo.judgeStatus"
>
and s.judge_status = #{vo.judgeStatus}
</if>
<if
test=
"null == vo.sampleType"
>
and s.type = 0
</if>
<if
test=
"null != vo.sampleType"
>
and s.type = #{vo.sampleType}
</if>
<if
test=
"null != vo.judgeStatusList"
>
and s.judge_status IN
<foreach
collection=
"vo.judgeStatusList"
index=
"index"
item=
"judgeStatus"
open=
"("
separator=
","
close=
")"
>
...
...
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
View file @
62ee1f91
...
...
@@ -704,6 +704,27 @@
AND s.deleted = 0
AND s.id = #{sampleId}
</select>
<!--查询样品下分批中最大的检测值信息-->
<select
id=
"selectItemTestByEntrustId"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleItemIndexVO"
>
SELECT
s.entrust_id,
split_part( s.code, '-', 1 ) "sample_code",
ii.NAME ,
MAX ( ii.test_value :: NUMERIC ) "test_value"
FROM
entrust_sample_item_index ii
JOIN entrust_sample_item i ON i.ID = ii.entrust_sample_item_id
JOIN entrust_sample s ON s.ID = i.entrust_sample_id
WHERE
ii.deleted = 0
AND is_numeric ( ii.test_value )
AND s.NAME = '铝成品'
AND s.entrust_id = #{entrustId}
GROUP BY
s.entrust_id,
split_part( s.code, '-', 1 ),
ii.NAME
</select>
<update
id=
"updateBatchByData"
parameterType=
"java.util.List"
>
<foreach
collection=
"itemList"
item=
"item"
index=
"index"
open=
""
close=
""
separator=
";"
>
...
...
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
View file @
62ee1f91
...
...
@@ -432,10 +432,14 @@
distinct
r.entrust_id,
r.object_key,
r.other_object_key,
rs.report_id,
rs.sample_id,
s.code "sample_code",
s.name "sample_name",
s.first_code,
s.second_code,
s.third_code,
s.sample_grading
from entrust_report r
join entrust_report_rel_sample rs on rs.report_id = r.id
...
...
@@ -451,6 +455,50 @@
select max(s.code) "max_code" from entrust_sample s where s.deleted = 0 and s.code like concat(#{queryKey},'%')
</select>
<!-- 查询样品指标 -->
<select
id=
"selectSampleIndex"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleIndexVO"
>
SELECT
s.entrust_id,
s.code "sample_code",
s.NAME "sample_name",
s.sample_grading "brand",
i.*
FROM
(
SELECT
i.entrust_sample_id,
MAX ( CASE WHEN ii.NAME = '原铝Cu' THEN ii.test_value ELSE '' END ) "cu",
MAX ( CASE WHEN ii.NAME = '原铝Fe' THEN ii.test_value ELSE '' END ) "fe",
MAX ( CASE WHEN ii.NAME = '原铝Ga' THEN ii.test_value ELSE '' END ) "ga",
MAX ( CASE WHEN ii.NAME = '原铝Mg' THEN ii.test_value ELSE '' END ) "mg",
MAX ( CASE WHEN ii.NAME = '原铝Mn' THEN ii.test_value ELSE '' END ) "mn",
MAX ( CASE WHEN ii.NAME = '原铝Ni' THEN ii.test_value ELSE '' END ) "ni",
MAX ( CASE WHEN ii.NAME = '原铝Si' THEN ii.test_value ELSE '' END ) "si",
MAX ( CASE WHEN ii.NAME = '原铝V' THEN ii.test_value ELSE '' END ) "v",
MAX ( CASE WHEN ii.NAME = '原铝Zn' THEN ii.test_value ELSE '' END ) "zn"
FROM
entrust_sample_item_index ii
JOIN entrust_sample_item i ON i.ID = ii.entrust_sample_item_id
WHERE
ii.deleted = 0 AND i.deleted = 0
GROUP BY
i.entrust_sample_id
) i
JOIN entrust_sample s ON s.ID = i.entrust_sample_id
WHERE
s.NAME = '铝成品' AND s.TYPE = 2
<if
test=
"null != vo.entrustId"
>
AND s.entrust_id = #{vo.entrustId}
</if>
<if
test=
"null != vo.sampleCode"
>
AND s.code like concat('%',#{vo.sampleCode},'%')
</if>
<if
test=
"null != vo.sampleName"
>
AND s.name like concat('%',#{vo.sampleName},'%')
</if>
</select>
<update
id=
"updateBatchByData"
parameterType=
"java.util.List"
>
<foreach
collection=
"sampleList"
item=
"item"
index=
"index"
open=
""
close=
""
separator=
";"
>
update entrust_sample
...
...
src/test/java/com/patzn/cloud/service/lims/test/TestThreadLocal.java
0 → 100644
View file @
62ee1f91
package
com
.
patzn
.
cloud
.
service
.
lims
.
test
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
public
class
TestThreadLocal
{
public
static
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
16
);
private
static
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
for
(
int
i
=
0
;
i
<
1000
;
i
++){
executorService
.
submit
(
new
Runnable
()
{
@Override
public
void
run
()
{
String
format
=
simpleDateFormat
.
format
(
new
Date
());
try
{
Date
parse
=
simpleDateFormat
.
parse
(
"2021-09-01 00:00:00"
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
System
.
out
.
println
(
format
);
}
});
}
Thread
.
sleep
(
3000
);
executorService
.
shutdownNow
();
}
}
src/test/java/resources/db_sql/hmhj/v170/20211008新增字段.sql
0 → 100644
View file @
62ee1f91
/** created by meazty on 2021/10/8 15:50 **/
/** created by meazty on 2021/10/8 15:50 **/
ALTER
TABLE
"public"
.
"material"
ADD
COLUMN
"factory_area"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
,
ADD
COLUMN
"abbr"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
;
COMMENT
ON
COLUMN
"public"
.
"material"
.
"factory_area"
IS
'厂区'
;
COMMENT
ON
COLUMN
"public"
.
"material"
.
"abbr"
IS
'缩写'
;
ALTER
TABLE
"public"
.
"entrust_report"
ADD
COLUMN
"other_object_key"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
,
ADD
COLUMN
"other_pdf_object_key"
varchar
(
64
)
COLLATE
"pg_catalog"
.
"default"
;
COMMENT
ON
COLUMN
"public"
.
"entrust_report"
.
"other_object_key"
IS
'其他对象Key'
;
COMMENT
ON
COLUMN
"public"
.
"entrust_report"
.
"other_pdf_object_key"
IS
'其他对象PdfKey'
;
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