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
98f3001a
Commit
98f3001a
authored
Jul 25, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报告审批中因为标样的问题;
parent
1c897ad5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
476 additions
and
123 deletions
+476
-123
EntrustFlowUtils.java
...atzn/cloud/service/lims/hmhj/common/EntrustFlowUtils.java
+85
-3
EntrustController.java
...cloud/service/lims/hmhj/controller/EntrustController.java
+4
-5
OriginalTemplateConfigController.java
...ims/hmhj/controller/OriginalTemplateConfigController.java
+16
-17
OriginalTemplateController.java
...vice/lims/hmhj/controller/OriginalTemplateController.java
+21
-12
EntrustMapper.java
...m/patzn/cloud/service/lims/hmhj/mapper/EntrustMapper.java
+7
-5
EntrustSampleItemMapper.java
...oud/service/lims/hmhj/mapper/EntrustSampleItemMapper.java
+3
-0
EntrustSampleMapper.java
...n/cloud/service/lims/hmhj/mapper/EntrustSampleMapper.java
+4
-2
OriginalTemplateConfigMapper.java
...ervice/lims/hmhj/mapper/OriginalTemplateConfigMapper.java
+2
-1
OriginalTemplateMapper.java
...loud/service/lims/hmhj/mapper/OriginalTemplateMapper.java
+2
-0
IEntrustReportService.java
...loud/service/lims/hmhj/service/IEntrustReportService.java
+1
-0
IEntrustSampleItemService.java
.../service/lims/hmhj/service/IEntrustSampleItemService.java
+3
-0
IEntrustSampleService.java
...loud/service/lims/hmhj/service/IEntrustSampleService.java
+4
-0
IEntrustService.java
...atzn/cloud/service/lims/hmhj/service/IEntrustService.java
+2
-0
IOriginalTemplateConfigService.java
...ice/lims/hmhj/service/IOriginalTemplateConfigService.java
+4
-0
IOriginalTemplateService.java
...d/service/lims/hmhj/service/IOriginalTemplateService.java
+2
-0
EntrustRecordServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustRecordServiceImpl.java
+1
-1
EntrustReportServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustReportServiceImpl.java
+0
-0
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+97
-36
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+17
-2
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+21
-6
OriginalTemplateConfigServiceImpl.java
.../hmhj/service/impl/OriginalTemplateConfigServiceImpl.java
+11
-1
OriginalTemplateServiceImpl.java
...e/lims/hmhj/service/impl/OriginalTemplateServiceImpl.java
+19
-19
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+89
-13
EntrustSampleItemMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
+0
-0
EntrustSampleMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
+15
-0
OriginalTemplateConfigMapper.xml
...in/resources/mapper/hmhj/OriginalTemplateConfigMapper.xml
+19
-0
OriginalTemplateMapper.xml
src/main/resources/mapper/hmhj/OriginalTemplateMapper.xml
+27
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/common/EntrustFlowUtils.java
View file @
98f3001a
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
common
;
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
common
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.toolkit.CollectionUtils
;
import
com.patzn.cloud.service.hmhj.enums.EntrustFlowEnum
;
import
com.patzn.cloud.service.hmhj.enums.*
;
import
com.patzn.cloud.service.hmhj.enums.EntrustStatusEnum
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -113,7 +112,90 @@ public class EntrustFlowUtils {
...
@@ -113,7 +112,90 @@ public class EntrustFlowUtils {
if
(
StringUtils
.
isBlank
(
statusPath
)
||
StringUtils
.
isBlank
(
flowStatus
))
{
if
(
StringUtils
.
isBlank
(
statusPath
)
||
StringUtils
.
isBlank
(
flowStatus
))
{
return
false
;
return
false
;
}
}
List
<
String
>
flowList
=
Arrays
.
asList
(
statusPath
.
split
(
"->"
));
List
<
String
>
flowList
=
Arrays
.
asList
(
statusPath
.
split
(
SEQ
));
return
flowList
.
stream
().
anyMatch
(
t
->
t
.
equals
(
flowStatus
));
return
flowList
.
stream
().
anyMatch
(
t
->
t
.
equals
(
flowStatus
));
}
}
public
static
EntrustSampleStatusEnum
getSampleStatus
(
EntrustFlowEnum
flowEnum
)
{
if
(
null
==
flowEnum
)
{
return
null
;
}
int
flowStatus
=
flowEnum
.
getValue
().
intValue
();
EntrustSampleStatusEnum
sampleStatusEnum
=
null
;
switch
(
flowStatus
)
{
case
1
:
case
2
:
case
3
:
case
4
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
DRAFT
;
break
;
case
5
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
RECEIVE
;
break
;
case
6
:
case
7
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
TEST
;
break
;
case
8
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
REPORT_MAKE
;
break
;
case
9
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
REPORT_CHECK
;
break
;
case
10
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
REPORT_ALLOW
;
break
;
case
11
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
REPORT_ISSUE
;
break
;
case
12
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
REPORT_SEND
;
break
;
case
14
:
case
15
:
sampleStatusEnum
=
EntrustSampleStatusEnum
.
END
;
break
;
}
return
sampleStatusEnum
;
}
public
static
EntrustSampleItemStatusEnum
getItemStatus
(
EntrustFlowEnum
flowEnum
)
{
if
(
null
==
flowEnum
)
{
return
null
;
}
int
flowStatus
=
flowEnum
.
getValue
().
intValue
();
EntrustSampleItemStatusEnum
itemStatusEnum
;
if
(
flowStatus
>
7
)
{
itemStatusEnum
=
EntrustSampleItemStatusEnum
.
END
;
}
else
if
(
flowStatus
>
6
)
{
itemStatusEnum
=
EntrustSampleItemStatusEnum
.
TEST
;
}
else
if
(
flowStatus
>
5
)
{
itemStatusEnum
=
EntrustSampleItemStatusEnum
.
ALLOT
;
}
else
{
itemStatusEnum
=
EntrustSampleItemStatusEnum
.
DRAFT
;
}
return
itemStatusEnum
;
}
public
static
EntrustReportStatusEnum
getReportStatus
(
EntrustFlowEnum
flowEnum
)
{
if
(
null
==
flowEnum
)
{
return
null
;
}
if
(
flowEnum
==
EntrustFlowEnum
.
REPORT_MAKE
)
{
return
EntrustReportStatusEnum
.
MAKING
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
REPORT_CHECK
)
{
return
EntrustReportStatusEnum
.
CHECK
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
REPORT_ALLOW
)
{
return
EntrustReportStatusEnum
.
ALLOW
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
REPORT_ISSUE
)
{
return
EntrustReportStatusEnum
.
ISSUE
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
REPORT_SEND
)
{
return
EntrustReportStatusEnum
.
SEND
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
QUALITY_JUDGE
)
{
return
EntrustReportStatusEnum
.
END
;
}
else
if
(
flowEnum
==
EntrustFlowEnum
.
ARCHIVES
)
{
return
EntrustReportStatusEnum
.
END
;
}
return
null
;
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustController.java
View file @
98f3001a
...
@@ -52,10 +52,10 @@ public class EntrustController extends ServiceController {
...
@@ -52,10 +52,10 @@ public class EntrustController extends ServiceController {
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SORD
,
value
=
"排序方式"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SORD
,
value
=
"排序方式"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
})
})
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
public
RestResult
<
Page
<
Entrust
>>
getPage
(
Entrust
entrust
)
{
public
RestResult
<
Page
<
Entrust
VO
>>
getPage
(
EntrustVO
entrust
)
{
entrust
.
setStatus
(
EntrustStatusEnum
.
DRAFT
);
entrust
.
setStatus
(
EntrustStatusEnum
.
DRAFT
);
entrust
.
setUid
(
getAccount
().
getUserId
());
entrust
.
setUid
(
getAccount
().
getUserId
());
return
success
(
entrustService
.
page
(
getPage
(),
entrust
));
return
success
(
entrustService
.
page
VO
(
getPage
(),
entrust
));
}
}
@ApiOperation
(
"外委登记分页列表"
)
@ApiOperation
(
"外委登记分页列表"
)
...
@@ -491,6 +491,8 @@ public class EntrustController extends ServiceController {
...
@@ -491,6 +491,8 @@ public class EntrustController extends ServiceController {
}
}
// 获取当前用户分组
// 获取当前用户分组
entrust
.
setGroupNameList
(
userInfoService
.
getCurGroupNameList
());
entrust
.
setGroupNameList
(
userInfoService
.
getCurGroupNameList
());
//
entrust
.
setFlowStatus
(
EntrustFlowEnum
.
TEST
.
getName
());
return
success
(
entrustService
.
pageEntrustByItemData
(
getPage
(),
entrust
));
return
success
(
entrustService
.
pageEntrustByItemData
(
getPage
(),
entrust
));
}
}
...
@@ -635,7 +637,6 @@ public class EntrustController extends ServiceController {
...
@@ -635,7 +637,6 @@ public class EntrustController extends ServiceController {
@PostMapping
(
"/page_entrust_report_check"
)
@PostMapping
(
"/page_entrust_report_check"
)
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportCheck
(
EntrustVO
entrust
)
{
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportCheck
(
EntrustVO
entrust
)
{
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
CHECK
);
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
CHECK
);
entrust
.
setFlowStatus
(
EntrustFlowEnum
.
REPORT_CHECK
.
getName
());
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
}
}
...
@@ -670,7 +671,6 @@ public class EntrustController extends ServiceController {
...
@@ -670,7 +671,6 @@ public class EntrustController extends ServiceController {
@PostMapping
(
"/page_entrust_report_approve"
)
@PostMapping
(
"/page_entrust_report_approve"
)
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportApprove
(
EntrustVO
entrust
)
{
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportApprove
(
EntrustVO
entrust
)
{
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
ALLOW
);
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
ALLOW
);
entrust
.
setFlowStatus
(
EntrustFlowEnum
.
REPORT_ALLOW
.
getName
());
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
}
}
...
@@ -736,7 +736,6 @@ public class EntrustController extends ServiceController {
...
@@ -736,7 +736,6 @@ public class EntrustController extends ServiceController {
@PostMapping
(
"/page_entrust_report_issue"
)
@PostMapping
(
"/page_entrust_report_issue"
)
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportIssue
(
EntrustVO
entrust
)
{
public
RestResult
<
Page
<
EntrustVO
>>
getPageReportIssue
(
EntrustVO
entrust
)
{
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
ISSUE
);
entrust
.
setReportStatus
(
EntrustReportStatusEnum
.
ISSUE
);
entrust
.
setFlowStatus
(
EntrustFlowEnum
.
REPORT_ISSUE
.
getName
());
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
return
success
(
entrustService
.
pageEntrustByReport
(
getPage
(),
entrust
));
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/OriginalTemplateConfigController.java
View file @
98f3001a
...
@@ -2,14 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.controller;
...
@@ -2,14 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.controller;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.api.RestConstants
;
import
com.patzn.cloud.commons.api.RestConstants
;
...
@@ -44,9 +37,9 @@ public class OriginalTemplateConfigController extends ServiceController {
...
@@ -44,9 +37,9 @@ public class OriginalTemplateConfigController extends ServiceController {
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
})
})
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
public
RestResult
<
Page
<
OriginalTemplateConfig
>>
getPage
(
OriginalTemplateConfig
originalTemplateConfig
)
{
public
RestResult
<
Page
<
OriginalTemplateConfig
>>
getPage
(
OriginalTemplateConfig
originalTemplateConfig
)
{
return
success
(
originalTemplateConfigService
.
page
(
getPage
(),
originalTemplateConfig
));
return
success
(
originalTemplateConfigService
.
page
(
getPage
(),
originalTemplateConfig
));
}
}
@ApiOperation
(
"查询 id 信息"
)
@ApiOperation
(
"查询 id 信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -62,23 +55,29 @@ public class OriginalTemplateConfigController extends ServiceController {
...
@@ -62,23 +55,29 @@ public class OriginalTemplateConfigController extends ServiceController {
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
})
})
@PutMapping
(
"/{id}"
)
@PutMapping
(
"/{id}"
)
public
RestResult
<
Boolean
>
edit
(
@PathVariable
(
"id"
)
Long
id
,
OriginalTemplateConfig
originalTemplateConfig
)
{
public
RestResult
<
Boolean
>
edit
(
@PathVariable
(
"id"
)
Long
id
,
OriginalTemplateConfig
originalTemplateConfig
)
{
originalTemplateConfig
.
setId
(
id
);
originalTemplateConfig
.
setId
(
id
);
return
success
(
originalTemplateConfigService
.
updateById
(
originalTemplateConfig
));
return
success
(
originalTemplateConfigService
.
updateById
(
originalTemplateConfig
));
}
}
@ApiOperation
(
"根据 id 修改信息"
)
@PostMapping
(
"/update"
)
public
RestResult
<
Boolean
>
edit
(
@RequestBody
OriginalTemplateConfig
originalTemplateConfig
)
{
return
success
(
originalTemplateConfigService
.
updateConfigById
(
originalTemplateConfig
,
getAccount
()));
}
@ApiOperation
(
"添加"
)
@ApiOperation
(
"添加"
)
@PostMapping
(
"/"
)
@PostMapping
(
"/"
)
public
RestResult
<
Boolean
>
add
(
OriginalTemplateConfig
originalTemplateConfig
)
{
public
RestResult
<
Boolean
>
add
(
OriginalTemplateConfig
originalTemplateConfig
)
{
return
success
(
originalTemplateConfigService
.
save
(
originalTemplateConfig
));
return
success
(
originalTemplateConfigService
.
save
(
originalTemplateConfig
));
}
}
@ApiOperation
(
"根据 ids 删除"
)
@ApiOperation
(
"根据 ids 删除"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"主键列表"
,
required
=
true
,
paramType
=
"query"
,
allowMultiple
=
true
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"主键列表"
,
required
=
true
,
paramType
=
"query"
,
allowMultiple
=
true
,
dataTypeClass
=
Long
.
class
),
})
})
@DeleteMapping
(
"/"
)
@DeleteMapping
(
"/"
)
public
RestResult
<
Boolean
>
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
public
RestResult
<
Boolean
>
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
return
success
(
originalTemplateConfigService
.
removeByIds
(
ids
));
return
success
(
originalTemplateConfigService
.
removeByIds
(
ids
));
}
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/OriginalTemplateController.java
View file @
98f3001a
...
@@ -42,9 +42,9 @@ public class OriginalTemplateController extends ServiceController implements Ori
...
@@ -42,9 +42,9 @@ public class OriginalTemplateController extends ServiceController implements Ori
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
})
})
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
public
RestResult
<
Page
<
OriginalTemplate
>>
getPage
(
OriginalTemplate
originalTemplate
)
{
public
RestResult
<
Page
<
OriginalTemplate
>>
getPage
(
OriginalTemplate
originalTemplate
)
{
return
success
(
originalTemplateService
.
page
(
getPage
(),
originalTemplate
));
return
success
(
originalTemplateService
.
page
(
getPage
(),
originalTemplate
));
}
}
@ApiOperation
(
"查询 id 信息"
)
@ApiOperation
(
"查询 id 信息"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
@@ -60,30 +60,39 @@ public class OriginalTemplateController extends ServiceController implements Ori
...
@@ -60,30 +60,39 @@ public class OriginalTemplateController extends ServiceController implements Ori
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
})
})
@PutMapping
(
"/{id}"
)
@PutMapping
(
"/{id}"
)
public
RestResult
<
Boolean
>
edit
(
@PathVariable
(
"id"
)
Long
id
,
OriginalTemplate
originalTemplate
)
{
public
RestResult
<
Boolean
>
edit
(
@PathVariable
(
"id"
)
Long
id
,
OriginalTemplate
originalTemplate
)
{
originalTemplate
.
setId
(
id
);
originalTemplate
.
setId
(
id
);
return
success
(
originalTemplateService
.
updateById
(
originalTemplate
));
return
success
(
originalTemplateService
.
updateTemplateById
(
originalTemplate
));
}
}
@ApiOperation
(
"根据 id 修改信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
paramType
=
"path"
,
dataTypeClass
=
Long
.
class
),
})
@PostMapping
(
"/update"
)
public
RestResult
<
Boolean
>
update
(
@RequestBody
OriginalTemplate
originalTemplate
)
{
return
success
(
originalTemplateService
.
updateTemplateById
(
originalTemplate
));
}
@ApiOperation
(
"添加"
)
@ApiOperation
(
"添加"
)
@PostMapping
(
"/"
)
@PostMapping
(
"/"
)
public
RestResult
<
Boolean
>
add
(
OriginalTemplate
originalTemplate
)
{
public
RestResult
<
Boolean
>
add
(
OriginalTemplate
originalTemplate
)
{
return
success
(
originalTemplateService
.
save
(
originalTemplate
));
return
success
(
originalTemplateService
.
save
(
originalTemplate
));
}
}
@ApiOperation
(
"根据 ids 删除"
)
@ApiOperation
(
"根据 ids 删除"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"主键列表"
,
required
=
true
,
paramType
=
"query"
,
allowMultiple
=
true
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"主键列表"
,
required
=
true
,
paramType
=
"query"
,
allowMultiple
=
true
,
dataTypeClass
=
Long
.
class
),
})
})
@DeleteMapping
(
"/"
)
@DeleteMapping
(
"/"
)
public
RestResult
<
Boolean
>
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
public
RestResult
<
Boolean
>
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
return
success
(
originalTemplateService
.
removeByIds
(
ids
));
return
success
(
originalTemplateService
.
removeByIds
(
ids
));
}
}
@ApiOperation
(
value
=
"附件上传"
,
notes
=
"附件上传"
)
@ApiOperation
(
value
=
"附件上传"
,
notes
=
"附件上传"
)
@PostMapping
(
"/upload_template/"
)
@PostMapping
(
"/upload_template/"
)
public
RestResult
<
Boolean
>
uploadTemplate
(
@RequestParam
(
"classType"
)
String
classType
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"remark"
)
String
remark
,
MultipartFile
file
)
{
public
RestResult
<
Boolean
>
uploadTemplate
(
@RequestParam
(
"classType"
)
String
classType
,
@RequestParam
(
"name"
)
String
name
,
@RequestParam
(
"remark"
)
String
remark
,
MultipartFile
file
)
{
return
success
(
originalTemplateService
.
uploadTemplate
(
file
,
classType
,
name
,
remark
,
0
));
return
success
(
originalTemplateService
.
uploadTemplate
(
file
,
classType
,
name
,
remark
,
0
));
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/EntrustMapper.java
View file @
98f3001a
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
/**
/**
* <p>
* <p>
*
Mapper 接口
* Mapper 接口
* </p>
* </p>
*
*
* @author wwd
* @author wwd
...
@@ -22,13 +22,15 @@ public interface EntrustMapper extends BatchMapper<Entrust> {
...
@@ -22,13 +22,15 @@ public interface EntrustMapper extends BatchMapper<Entrust> {
List
<
EntrustSampleDTO
>
listByContractId
(
@Param
(
"entrustId"
)
Long
id
);
List
<
EntrustSampleDTO
>
listByContractId
(
@Param
(
"entrustId"
)
Long
id
);
List
<
EntrustVO
>
selectEntrustSampleReceive
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectEntrustSampleReceive
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectVOList
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectVOList
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectEntrustProgressList
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectEntrustProgressList
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectVOListByItem
(
Page
<
EntrustVO
>
page
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectVOListByItem
(
Page
<
EntrustVO
>
page
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectEntrustVOHisList
(
Page
<
EntrustVO
>
page
,
@Param
(
"vo"
)
EntrustVO
entrust
);
List
<
EntrustVO
>
selectEntrustVOHisList
(
Page
<
EntrustVO
>
page
,
@Param
(
"vo"
)
EntrustVO
entrust
);
Integer
updateEntrustById
(
@Param
(
"vo"
)
Entrust
entrust
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/EntrustSampleItemMapper.java
View file @
98f3001a
...
@@ -66,4 +66,7 @@ public interface EntrustSampleItemMapper extends BatchMapper<EntrustSampleItem>
...
@@ -66,4 +66,7 @@ public interface EntrustSampleItemMapper extends BatchMapper<EntrustSampleItem>
List
<
SampleItemStatsVO
>
selectSampleItemStats
(
@Param
(
"vo"
)
SampleItemDTO
sampleItemDTO
);
List
<
SampleItemStatsVO
>
selectSampleItemStats
(
@Param
(
"vo"
)
SampleItemDTO
sampleItemDTO
);
List
<
EntrustSampleItemVO
>
listIndexReplaceItemBySampleId
(
@Param
(
"sampleId"
)
Long
sampleId
);
List
<
EntrustSampleItemVO
>
listIndexReplaceItemBySampleId
(
@Param
(
"sampleId"
)
Long
sampleId
);
List
<
EntrustSampleItemVO
>
selectUnfinishItemList
(
@Param
(
"vo"
)
QueryDTO
dto
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/EntrustSampleMapper.java
View file @
98f3001a
...
@@ -17,7 +17,7 @@ import java.util.Map;
...
@@ -17,7 +17,7 @@ import java.util.Map;
/**
/**
* <p>
* <p>
*
Mapper 接口
* Mapper 接口
* </p>
* </p>
*
*
* @author wwd
* @author wwd
...
@@ -31,7 +31,7 @@ public interface EntrustSampleMapper extends BatchMapper<EntrustSample> {
...
@@ -31,7 +31,7 @@ public interface EntrustSampleMapper extends BatchMapper<EntrustSample> {
List
<
EntrustSampleVO
>
selectMinStatusByEntrustIds
(
@Param
(
"entrustIds"
)
List
<
Long
>
entrustIds
);
List
<
EntrustSampleVO
>
selectMinStatusByEntrustIds
(
@Param
(
"entrustIds"
)
List
<
Long
>
entrustIds
);
List
<
EntrustSampleVO
>
selectTestResultQuery
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustSampleVO
entrustSample
);
List
<
EntrustSampleVO
>
selectTestResultQuery
(
RowBounds
rowBounds
,
@Param
(
"vo"
)
EntrustSampleVO
entrustSample
);
List
<
AlTasteStatsVO
>
selectAlTasteStats
(
@Param
(
"vo"
)
StatsQueryDTO
queryDTO
);
List
<
AlTasteStatsVO
>
selectAlTasteStats
(
@Param
(
"vo"
)
StatsQueryDTO
queryDTO
);
...
@@ -40,4 +40,6 @@ public interface EntrustSampleMapper extends BatchMapper<EntrustSample> {
...
@@ -40,4 +40,6 @@ public interface EntrustSampleMapper extends BatchMapper<EntrustSample> {
List
<
PMakeFeStatsVO
>
selectPMakeFeStats
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
List
<
PMakeFeStatsVO
>
selectPMakeFeStats
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
Map
<
String
,
Object
>
selectAlBrandsRateStatus
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
Map
<
String
,
Object
>
selectAlBrandsRateStatus
(
@Param
(
"vo"
)
QueryDTO
queryDTO
);
List
<
EntrustSample
>
selectByReportIds
(
@Param
(
"reportIds"
)
Long
[]
reportIds
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/OriginalTemplateConfigMapper.java
View file @
98f3001a
...
@@ -2,6 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.mapper;
...
@@ -2,6 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.mapper;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* <p>
* <p>
...
@@ -12,5 +13,5 @@ import com.patzn.cloud.commons.mapper.BatchMapper;
...
@@ -12,5 +13,5 @@ import com.patzn.cloud.commons.mapper.BatchMapper;
* @since 2021-03-15
* @since 2021-03-15
*/
*/
public
interface
OriginalTemplateConfigMapper
extends
BatchMapper
<
OriginalTemplateConfig
>
{
public
interface
OriginalTemplateConfigMapper
extends
BatchMapper
<
OriginalTemplateConfig
>
{
Integer
updateConfigById
(
@Param
(
"vo"
)
OriginalTemplateConfig
config
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/mapper/OriginalTemplateMapper.java
View file @
98f3001a
...
@@ -2,6 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.mapper;
...
@@ -2,6 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.mapper;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplate
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplate
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
com.patzn.cloud.commons.mapper.BatchMapper
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* <p>
* <p>
...
@@ -13,4 +14,5 @@ import com.patzn.cloud.commons.mapper.BatchMapper;
...
@@ -13,4 +14,5 @@ import com.patzn.cloud.commons.mapper.BatchMapper;
*/
*/
public
interface
OriginalTemplateMapper
extends
BatchMapper
<
OriginalTemplate
>
{
public
interface
OriginalTemplateMapper
extends
BatchMapper
<
OriginalTemplate
>
{
Integer
updateTemplateById
(
@Param
(
"vo"
)
OriginalTemplate
originalTemplate
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustReportService.java
View file @
98f3001a
...
@@ -54,4 +54,5 @@ public interface IEntrustReportService extends IBaseService<EntrustReport> {
...
@@ -54,4 +54,5 @@ public interface IEntrustReportService extends IBaseService<EntrustReport> {
Page
<
EntrustReport
>
pageBranchReport
(
Page
<
EntrustReport
>
page
,
EntrustReportVO
entrustReportVO
,
Account
account
);
Page
<
EntrustReport
>
pageBranchReport
(
Page
<
EntrustReport
>
page
,
EntrustReportVO
entrustReportVO
,
Account
account
);
boolean
updateLastFlowCheckByEntrustId
(
Long
entrustId
,
Account
account
);
boolean
updateLastFlowCheckByEntrustId
(
Long
entrustId
,
Account
account
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustSampleItemService.java
View file @
98f3001a
...
@@ -9,6 +9,7 @@ import com.patzn.cloud.service.hmhj.entity.Entrust;
...
@@ -9,6 +9,7 @@ import com.patzn.cloud.service.hmhj.entity.Entrust;
import
com.patzn.cloud.service.hmhj.entity.EntrustSampleItem
;
import
com.patzn.cloud.service.hmhj.entity.EntrustSampleItem
;
import
com.patzn.cloud.service.hmhj.entity.ItemDeviate
;
import
com.patzn.cloud.service.hmhj.entity.ItemDeviate
;
import
com.patzn.cloud.service.hmhj.entity.OriginalRecord
;
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.EntrustSampleCalcResultVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO
;
import
com.patzn.cloud.service.hmhj.vo.EntrustSampleItemVO
;
import
com.patzn.cloud.service.hmhj.vo.TesterWorkloadStatsVO
;
import
com.patzn.cloud.service.hmhj.vo.TesterWorkloadStatsVO
;
...
@@ -97,4 +98,6 @@ public interface IEntrustSampleItemService extends IBaseService<EntrustSampleIte
...
@@ -97,4 +98,6 @@ public interface IEntrustSampleItemService extends IBaseService<EntrustSampleIte
Map
<
String
,
Object
>
getSampleItemStatsQuery
(
SampleItemDTO
sampleItemDTO
);
Map
<
String
,
Object
>
getSampleItemStatsQuery
(
SampleItemDTO
sampleItemDTO
);
boolean
autoAllotItem
(
Long
[]
ids
,
Account
account
);
boolean
autoAllotItem
(
Long
[]
ids
,
Account
account
);
boolean
autoAllotItemFromFlowStatus
(
Long
entrustId
,
EntrustFlowEnum
flowEnum
,
Account
account
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustSampleService.java
View file @
98f3001a
...
@@ -76,6 +76,8 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
...
@@ -76,6 +76,8 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
List
<
EntrustSample
>
getByEntrustId
(
Long
entrustId
);
List
<
EntrustSample
>
getByEntrustId
(
Long
entrustId
);
List
<
EntrustSample
>
getNormalByEntrustId
(
Long
entrustId
);
List
<
EntrustSampleVO
>
getVOListByEntrustId
(
Long
entrustId
);
List
<
EntrustSampleVO
>
getVOListByEntrustId
(
Long
entrustId
);
List
<
EntrustSampleVO
>
getVOListByIds
(
List
<
Long
>
sampleIdList
);
List
<
EntrustSampleVO
>
getVOListByIds
(
List
<
Long
>
sampleIdList
);
...
@@ -109,4 +111,6 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
...
@@ -109,4 +111,6 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
boolean
delStandardSampleByIds
(
List
<
Long
>
ids
);
boolean
delStandardSampleByIds
(
List
<
Long
>
ids
);
boolean
updateSampleInfo
(
EntrustSample
entrustSample
);
boolean
updateSampleInfo
(
EntrustSample
entrustSample
);
List
<
EntrustSample
>
getByReportIds
(
Long
[]
reportIds
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustService.java
View file @
98f3001a
...
@@ -104,4 +104,6 @@ public interface IEntrustService extends IBaseService<Entrust> {
...
@@ -104,4 +104,6 @@ public interface IEntrustService extends IBaseService<Entrust> {
boolean
isCanIntoPrevNode
(
Entrust
entrust
);
boolean
isCanIntoPrevNode
(
Entrust
entrust
);
Page
<
EntrustVO
>
pageEntrustSampleMake
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
);
Page
<
EntrustVO
>
pageEntrustSampleMake
(
Page
<
EntrustVO
>
page
,
EntrustVO
entrust
);
boolean
updateEntrustById
(
Entrust
entrust
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IOriginalTemplateConfigService.java
View file @
98f3001a
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
;
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.service.IBaseService
;
import
com.patzn.cloud.commons.service.IBaseService
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplate
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
java.util.List
;
import
java.util.List
;
...
@@ -17,4 +19,6 @@ public interface IOriginalTemplateConfigService extends IBaseService<OriginalTem
...
@@ -17,4 +19,6 @@ public interface IOriginalTemplateConfigService extends IBaseService<OriginalTem
Page
<
OriginalTemplateConfig
>
page
(
Page
<
OriginalTemplateConfig
>
page
,
OriginalTemplateConfig
originalTemplateConfig
);
Page
<
OriginalTemplateConfig
>
page
(
Page
<
OriginalTemplateConfig
>
page
,
OriginalTemplateConfig
originalTemplateConfig
);
boolean
removeByIds
(
List
<
Long
>
ids
);
boolean
removeByIds
(
List
<
Long
>
ids
);
boolean
updateConfigById
(
OriginalTemplateConfig
config
,
Account
account
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IOriginalTemplateService.java
View file @
98f3001a
...
@@ -31,4 +31,6 @@ public interface IOriginalTemplateService extends IBaseService<OriginalTemplate>
...
@@ -31,4 +31,6 @@ public interface IOriginalTemplateService extends IBaseService<OriginalTemplate>
boolean
editReportTemplate
(
String
someParam
,
OssFileResult
obsFileResult
);
boolean
editReportTemplate
(
String
someParam
,
OssFileResult
obsFileResult
);
boolean
editEntrustReport
(
String
someParam
,
OssFileResult
obsFileResult
);
boolean
editEntrustReport
(
String
someParam
,
OssFileResult
obsFileResult
);
boolean
updateTemplateById
(
OriginalTemplate
originalTemplate
);
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustRecordServiceImpl.java
View file @
98f3001a
...
@@ -29,7 +29,7 @@ public class EntrustRecordServiceImpl extends BaseServiceImpl<EntrustRecordMappe
...
@@ -29,7 +29,7 @@ public class EntrustRecordServiceImpl extends BaseServiceImpl<EntrustRecordMappe
@Override
@Override
public
Page
<
EntrustRecord
>
page
(
Page
<
EntrustRecord
>
page
,
EntrustRecord
entrustRecord
)
{
public
Page
<
EntrustRecord
>
page
(
Page
<
EntrustRecord
>
page
,
EntrustRecord
entrustRecord
)
{
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrustRecord
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrustRecord
);
wrapper
.
orderBy
(
"ctime"
,
false
);
return
this
.
page
(
page
,
wrapper
);
return
this
.
page
(
page
,
wrapper
);
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustReportServiceImpl.java
View file @
98f3001a
This diff is collapsed.
Click to expand it.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
98f3001a
This diff is collapsed.
Click to expand it.
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
98f3001a
...
@@ -393,6 +393,10 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -393,6 +393,10 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
sampleStatus
=
EntrustSampleStatusEnum
.
TEST
;
sampleStatus
=
EntrustSampleStatusEnum
.
TEST
;
itemStatus
=
EntrustSampleItemStatusEnum
.
TEST
;
itemStatus
=
EntrustSampleItemStatusEnum
.
TEST
;
entrustSamplePrepareService
.
addOrUpdateToSetStatus
(
sampleIds
,
EntrustSamplePrepareStatusEnum
.
TEST
);
entrustSamplePrepareService
.
addOrUpdateToSetStatus
(
sampleIds
,
EntrustSamplePrepareStatusEnum
.
TEST
);
// 若没有分配任务到人,那么将执行自动分配
if
(!
entrustSampleItemService
.
isAllocatedByEntrustId
(
entrust
.
getId
(),
null
))
{
entrustSampleItemService
.
autoAllotItemFromFlowStatus
(
entrust
.
getId
(),
nextFlowStatus
,
account
);
}
}
else
if
(
nextFlowStatus
==
EntrustFlowEnum
.
REPORT_MAKE
)
{
}
else
if
(
nextFlowStatus
==
EntrustFlowEnum
.
REPORT_MAKE
)
{
sampleStatus
=
EntrustSampleStatusEnum
.
REPORT_MAKE
;
sampleStatus
=
EntrustSampleStatusEnum
.
REPORT_MAKE
;
itemStatus
=
EntrustSampleItemStatusEnum
.
END
;
itemStatus
=
EntrustSampleItemStatusEnum
.
END
;
...
@@ -457,7 +461,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -457,7 +461,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
updateBatchById
(
sampleList
);
updateBatchById
(
sampleList
);
}
}
if
(
null
!=
itemStatus
)
{
if
(
null
!=
itemStatus
)
{
updateItem
.
setStatus
(
itemStatus
);
updateItem
.
setStatus
(
itemStatus
)
.
setProgress
(
itemStatus
)
;
entrustSampleItemService
.
update
(
updateItem
,
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIds
));
entrustSampleItemService
.
update
(
updateItem
,
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIds
));
}
}
return
false
;
return
false
;
...
@@ -595,6 +599,11 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -595,6 +599,11 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
}
}
@Override
@Override
public
List
<
EntrustSample
>
getNormalByEntrustId
(
Long
entrustId
)
{
return
list
(
Condition
.
create
().
eq
(
"entrust_id"
,
entrustId
).
eq
(
"type"
,
0
));
}
@Override
public
List
<
EntrustSampleVO
>
getVOListByEntrustId
(
Long
entrustId
)
{
public
List
<
EntrustSampleVO
>
getVOListByEntrustId
(
Long
entrustId
)
{
if
(
null
==
entrustId
)
{
if
(
null
==
entrustId
)
{
return
null
;
return
null
;
...
@@ -949,7 +958,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -949,7 +958,7 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
mapReplace
.
put
(
"#{nowDate}"
,
DateUtils
.
toYearMonthDay
(
new
Date
()));
mapReplace
.
put
(
"#{nowDate}"
,
DateUtils
.
toYearMonthDay
(
new
Date
()));
mapReplace
.
put
(
"#{sampleNum}"
,
countByEntrustId
(
entrust
.
getId
())
+
""
);
mapReplace
.
put
(
"#{sampleNum}"
,
countByEntrustId
(
entrust
.
getId
())
+
""
);
List
<
EntrustSample
>
list
=
sampleList
.
stream
().
filter
(
s
->
StringUtils
.
isNotEmpty
(
s
.
getSampleFrom
())).
collect
(
Collectors
.
toList
());
List
<
EntrustSample
>
list
=
sampleList
.
stream
().
filter
(
s
->
StringUtils
.
isNotEmpty
(
s
.
getSampleFrom
())).
collect
(
Collectors
.
toList
());
mapReplace
.
put
(
"#{sampleFrom}"
,
list
.
size
()
>
0
?
list
.
get
(
0
).
getSampleFrom
()
:
" - "
);
mapReplace
.
put
(
"#{sampleFrom}"
,
list
.
size
()
>
0
?
list
.
get
(
0
).
getSampleFrom
()
:
" - "
);
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
0
);
HSSFWorkbookUtil
.
replaceModel
(
mapReplace
,
xssfWorkbook
,
0
);
XSSFSheet
sheetOne
=
xssfWorkbook
.
getSheetAt
(
0
);
XSSFSheet
sheetOne
=
xssfWorkbook
.
getSheetAt
(
0
);
String
sheetName
=
sheetOne
.
getSheetName
();
String
sheetName
=
sheetOne
.
getSheetName
();
...
@@ -1857,4 +1866,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -1857,4 +1866,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
}),
String
.
format
(
"样品编号【%s】的顺序号【%d】已存在"
,
sampleCodeAtomic
.
get
(),
orderByAtomic
.
get
()));
}),
String
.
format
(
"样品编号【%s】的顺序号【%d】已存在"
,
sampleCodeAtomic
.
get
(),
orderByAtomic
.
get
()));
return
updateById
(
entrustSample
);
return
updateById
(
entrustSample
);
}
}
@Override
public
List
<
EntrustSample
>
getByReportIds
(
Long
[]
reportIds
)
{
return
baseMapper
.
selectByReportIds
(
reportIds
);
}
}
}
\ No newline at end of file
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
98f3001a
...
@@ -246,7 +246,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -246,7 +246,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveEntrustSampleItemList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveEntrustSampleItemList
=
new
ArrayList
<>();
int
incNum
=
0
;
int
incNum
=
1
0
;
for
(
EntrustSampleDTO
sampleDTO
:
sampleDTOList
)
{
for
(
EntrustSampleDTO
sampleDTO
:
sampleDTOList
)
{
EntrustSample
sample
=
sampleDTO
.
convert
(
EntrustSample
.
class
);
EntrustSample
sample
=
sampleDTO
.
convert
(
EntrustSample
.
class
);
sample
.
setEntrustId
(
entrust
.
getId
());
sample
.
setEntrustId
(
entrust
.
getId
());
...
@@ -434,10 +434,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -434,10 +434,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSample
>
saveSampleList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveItemList
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
saveItemList
=
new
ArrayList
<>();
for
(
int
x
=
0
;
x
<
sampleList
.
size
();
x
++)
{
int
incNum
=
10
;
EntrustSampleDTO
dto
=
sampleList
.
get
(
x
);
for
(
EntrustSampleDTO
dto
:
sampleList
)
{
EntrustSample
sample
=
dto
.
convert
(
EntrustSample
.
class
);
EntrustSample
sample
=
dto
.
convert
(
EntrustSample
.
class
);
sample
.
setOrderBy
(
x
);
sample
.
setOrderBy
(
incNum
);
incNum
+=
10
;
if
(
null
!=
sample
.
getId
())
{
if
(
null
!=
sample
.
getId
())
{
updateSampleList
.
add
(
sample
);
updateSampleList
.
add
(
sample
);
sampleIdsList
.
add
(
sample
.
getId
());
sampleIdsList
.
add
(
sample
.
getId
());
...
@@ -833,8 +834,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -833,8 +834,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
true
;
return
true
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
submitToNextNode
(
Entrust
entrust
,
Account
account
)
{
public
boolean
submitToNextNode
(
Entrust
entrust
,
Account
account
)
{
String
statusPath
=
entrust
.
getStatusPath
(),
flowStatus
=
entrust
.
getFlowStatus
();
String
statusPath
=
entrust
.
getStatusPath
(),
flowStatus
=
entrust
.
getFlowStatus
();
RestAssert
.
fail
(
StringUtils
.
isBlank
(
statusPath
),
String
.
format
(
"编号为【%s】的委托,未配置流程状态路径信息!"
,
entrust
.
getCode
()));
RestAssert
.
fail
(
StringUtils
.
isBlank
(
statusPath
),
String
.
format
(
"编号为【%s】的委托,未配置流程状态路径信息!"
,
entrust
.
getCode
()));
...
@@ -843,12 +844,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -843,12 +844,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
flowStatus
=
EntrustFlowEnum
.
DRAFT
.
getName
();
flowStatus
=
EntrustFlowEnum
.
DRAFT
.
getName
();
}
}
EntrustFlowEnum
nextFlowStatus
=
EntrustFlowUtils
.
getNextFlowStatus
(
flowStatus
,
statusPath
);
EntrustFlowEnum
nextFlowStatus
=
EntrustFlowUtils
.
getNextFlowStatus
(
flowStatus
,
statusPath
);
RestAssert
.
fail
(
null
==
nextFlowStatus
,
String
.
format
(
"编号为【%s】的委托,未配置下一流程状态信息!"
,
entrust
.
getCode
()));
int
nextFlowValue
=
nextFlowStatus
.
getValue
().
intValue
();
EntrustStatusEnum
nextStatus
=
EntrustFlowUtils
.
getStatus
(
nextFlowStatus
);
EntrustStatusEnum
nextStatus
=
EntrustFlowUtils
.
getStatus
(
nextFlowStatus
);
RestAssert
.
fail
(
null
==
nextStatus
,
String
.
format
(
"编号为【%s】的委托,未配置下一流程状态信息!"
,
entrust
.
getCode
()));
RestAssert
.
fail
(
null
==
nextStatus
,
String
.
format
(
"编号为【%s】的委托,未配置下一流程状态信息!"
,
entrust
.
getCode
()));
// 当前委托状态
// 当前委托状态
EntrustStatusEnum
status
=
entrust
.
getStatus
();
EntrustStatusEnum
status
=
entrust
.
getStatus
();
// 是否特殊需求
// 是否特殊需求
boolean
isSpecAsk
=
null
==
entrust
.
getSpecialAsk
()
?
false
:
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()));
boolean
isSpecAsk
=
null
==
entrust
.
getSpecialAsk
()
?
false
:
(
"是"
.
equals
(
entrust
.
getSpecialAsk
()));
// 是否需要修改样品和检测项目(由于报告处只会修改部分样品)
boolean
isUpdateSampleInfo
=
nextFlowValue
<
9
||
nextFlowValue
>
12
;
// 若为特殊需求,必须要走评审
// 若为特殊需求,必须要走评审
String
uri
=
""
;
String
uri
=
""
;
if
(
isSpecAsk
||
nextStatus
==
EntrustStatusEnum
.
CHECK
)
{
if
(
isSpecAsk
||
nextStatus
==
EntrustStatusEnum
.
CHECK
)
{
...
@@ -861,7 +866,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -861,7 +866,11 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
uri
=
"/hmhj/quality_manage/quality_decide"
;
uri
=
"/hmhj/quality_manage/quality_decide"
;
}
}
// 处理样品以及检测项目的流程状态
// 处理样品以及检测项目的流程状态
if
(!
isUpdateSampleInfo
)
{
return
true
;
}
entrustSampleService
.
updateSampleNextFlowInfo
(
entrust
,
nextFlowStatus
,
account
);
entrustSampleService
.
updateSampleNextFlowInfo
(
entrust
,
nextFlowStatus
,
account
);
entrust
.
setStatus
(
nextStatus
);
entrust
.
setStatus
(
nextStatus
);
entrust
.
setProgress
(
nextStatus
);
entrust
.
setProgress
(
nextStatus
);
entrust
.
setFlowStatus
(
nextFlowStatus
.
getName
());
entrust
.
setFlowStatus
(
nextFlowStatus
.
getName
());
...
@@ -1000,6 +1009,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1000,6 +1009,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
backFromMake
(
Long
[]
ids
,
Account
account
,
String
reason
)
{
public
boolean
backFromMake
(
Long
[]
ids
,
Account
account
,
String
reason
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
MAKE
));
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
MAKE
));
...
@@ -1031,12 +1041,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1031,12 +1041,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
backFromReceive
(
Long
[]
ids
,
Account
account
,
String
reason
)
{
public
boolean
backFromReceive
(
Long
[]
ids
,
Account
account
,
String
reason
)
{
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
RestAssert
.
fail
(
ArrayUtils
.
isEmpty
(
ids
),
"请选择要驳回的委托"
);
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
TEST
));
int
count
=
super
.
count
(
Condition
.
create
().
in
(
"id"
,
ids
).
eq
(
"status"
,
EntrustStatusEnum
.
TEST
));
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择要退回至登记的委托"
);
RestAssert
.
fail
(
ids
.
length
!=
count
,
"请选择要退回至登记的委托"
);
List
<
Entrust
>
entrustList
=
getBatchIds
(
Arrays
.
asList
(
ids
));
List
<
Entrust
>
entrustList
=
getBatchIds
(
Arrays
.
asList
(
ids
));
boolean
hasSendMessage
=
false
;
for
(
Entrust
e
:
entrustList
)
{
for
(
Entrust
e
:
entrustList
)
{
e
.
setStatus
(
EntrustStatusEnum
.
DRAFT
);
e
.
setStatus
(
EntrustStatusEnum
.
DRAFT
);
e
.
setProgress
(
EntrustStatusEnum
.
BACK_RECEIVE
);
e
.
setProgress
(
EntrustStatusEnum
.
BACK_RECEIVE
);
...
@@ -1307,4 +1317,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -1307,4 +1317,9 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrust
));
}
}
@Override
public
boolean
updateEntrustById
(
Entrust
entrust
)
{
return
baseMapper
.
updateEntrustById
(
entrust
)
>
0
;
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/OriginalTemplateConfigServiceImpl.java
View file @
98f3001a
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
.
impl
;
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
.
impl
;
import
com.patzn.cloud.commons.api.RestAssert
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.service.hmhj.entity.OriginalTemplateConfig
;
import
com.patzn.cloud.service.lims.hmhj.mapper.OriginalTemplateConfigMapper
;
import
com.patzn.cloud.service.lims.hmhj.mapper.OriginalTemplateConfigMapper
;
import
com.patzn.cloud.service.lims.hmhj.service.IOriginalTemplateConfigService
;
import
com.patzn.cloud.service.lims.hmhj.service.IOriginalTemplateConfigService
;
...
@@ -9,10 +11,11 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
...
@@ -9,10 +11,11 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
*
服务实现类
* 服务实现类
*
*
* @author wwd
* @author wwd
* @since 2021-03-15
* @since 2021-03-15
...
@@ -31,4 +34,11 @@ public class OriginalTemplateConfigServiceImpl extends BaseServiceImpl<OriginalT
...
@@ -31,4 +34,11 @@ public class OriginalTemplateConfigServiceImpl extends BaseServiceImpl<OriginalT
public
boolean
removeByIds
(
List
<
Long
>
ids
)
{
public
boolean
removeByIds
(
List
<
Long
>
ids
)
{
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
return
baseMapper
.
deleteBatchIds
(
ids
)
>
0
;
}
}
@Override
public
boolean
updateConfigById
(
OriginalTemplateConfig
config
,
Account
account
)
{
RestAssert
.
fail
(
null
==
config
.
getId
(),
"配置项ID为空"
);
config
.
setLid
(
account
.
getUserId
()).
setLtime
(
new
Date
());
return
baseMapper
.
updateConfigById
(
config
)
>
0
;
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/OriginalTemplateServiceImpl.java
View file @
98f3001a
...
@@ -83,7 +83,7 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -83,7 +83,7 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
@Override
@Override
public
Page
<
OriginalTemplate
>
page
(
Page
<
OriginalTemplate
>
page
,
OriginalTemplate
originalTemplate
)
{
public
Page
<
OriginalTemplate
>
page
(
Page
<
OriginalTemplate
>
page
,
OriginalTemplate
originalTemplate
)
{
String
name
=
originalTemplate
.
getName
()
,
alias
=
originalTemplate
.
getAlias
();
String
name
=
originalTemplate
.
getName
(),
alias
=
originalTemplate
.
getAlias
();
// 支持模糊搜索
// 支持模糊搜索
originalTemplate
.
setAlias
(
null
);
originalTemplate
.
setAlias
(
null
);
originalTemplate
.
setName
(
null
);
originalTemplate
.
setName
(
null
);
...
@@ -100,6 +100,12 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -100,6 +100,12 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
}
}
@Override
@Override
public
boolean
updateTemplateById
(
OriginalTemplate
originalTemplate
)
{
RestAssert
.
fail
(
null
==
originalTemplate
.
getId
(),
"原始记录模板ID为空"
);
return
baseMapper
.
updateTemplateById
(
originalTemplate
)
>
0
;
}
@Override
public
boolean
uploadTemplate
(
MultipartFile
file
,
String
classType
,
String
name
,
String
remark
,
int
templateType
)
{
public
boolean
uploadTemplate
(
MultipartFile
file
,
String
classType
,
String
name
,
String
remark
,
int
templateType
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
classType
),
"模板类别不能为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
classType
),
"模板类别不能为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
name
),
"请填写原始记录名称"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
name
),
"请填写原始记录名称"
);
...
@@ -235,8 +241,8 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -235,8 +241,8 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
return
true
;
return
true
;
}
}
public
void
addVersionRecord
(
OriginalRecord
report
)
{
public
void
addVersionRecord
(
OriginalRecord
report
)
{
OriginalRecordVersion
recordVersion
=
report
.
convert
(
OriginalRecordVersion
.
class
);
OriginalRecordVersion
recordVersion
=
report
.
convert
(
OriginalRecordVersion
.
class
);
recordVersion
.
setId
(
null
);
recordVersion
.
setId
(
null
);
recordVersion
.
setOriginalRecordId
(
report
.
getId
());
recordVersion
.
setOriginalRecordId
(
report
.
getId
());
originalRecordVersionService
.
save
(
recordVersion
);
originalRecordVersionService
.
save
(
recordVersion
);
...
@@ -286,11 +292,6 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -286,11 +292,6 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
int
sheetSize
=
xssfWorkbook
.
getNumberOfSheets
();
int
sheetSize
=
xssfWorkbook
.
getNumberOfSheets
();
Integer
moreSheet
=
template
.
getMoreSheet
();
Integer
moreSheet
=
template
.
getMoreSheet
();
List
<
OriginalTemplateConfig
>
configList
=
originalTemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
template
.
getId
()));
List
<
OriginalTemplateConfig
>
configList
=
originalTemplateConfigService
.
list
(
Condition
.
create
().
eq
(
"template_id"
,
template
.
getId
()));
...
@@ -335,7 +336,7 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -335,7 +336,7 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
for
(
OriginalTemplateConfig
config
:
configList
)
{
for
(
OriginalTemplateConfig
config
:
configList
)
{
if
(
"sampleCode"
.
equals
(
config
.
getDataAttribute
())
||
"code"
.
equals
(
config
.
getDataAttribute
()))
{
if
(
"sampleCode"
.
equals
(
config
.
getDataAttribute
())
||
"code"
.
equals
(
config
.
getDataAttribute
()))
{
sampleCol
=
config
.
getColumnPlace
();
sampleCol
=
config
.
getColumnPlace
();
break
;
break
;
}
}
...
@@ -361,10 +362,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -361,10 +362,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
collectEntity
.
setItemMegerRow
(
config
.
getMergeRowNum
());
collectEntity
.
setItemMegerRow
(
config
.
getMergeRowNum
());
collectEntity
.
setAttribute
(
config
.
getDataAttribute
());
collectEntity
.
setAttribute
(
config
.
getDataAttribute
());
if
(
StringUtils
.
isBlank
(
config
.
getDataAttribute
())){
if
(
StringUtils
.
isBlank
(
config
.
getDataAttribute
()))
{
collectEntity
.
setName
(
config
.
getAttributeName
());
collectEntity
.
setName
(
config
.
getAttributeName
());
}
else
{
}
else
{
if
(
config
.
getDataAttribute
().
startsWith
(
"clc."
)){
if
(
config
.
getDataAttribute
().
startsWith
(
"clc."
))
{
collectEntity
.
setName
(
config
.
getAttributeName
());
collectEntity
.
setName
(
config
.
getAttributeName
());
}
else
{
}
else
{
collectEntity
.
setName
(
config
.
getDataAttribute
());
collectEntity
.
setName
(
config
.
getDataAttribute
());
...
@@ -383,10 +384,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -383,10 +384,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
collectEntity
.
setItemMegerRow
(
config
.
getMergeRowNum
());
collectEntity
.
setItemMegerRow
(
config
.
getMergeRowNum
());
collectEntity
.
setAttribute
(
config
.
getDataAttribute
());
collectEntity
.
setAttribute
(
config
.
getDataAttribute
());
if
(
StringUtils
.
isBlank
(
config
.
getDataAttribute
())){
if
(
StringUtils
.
isBlank
(
config
.
getDataAttribute
()))
{
collectEntity
.
setName
(
config
.
getAttributeName
());
collectEntity
.
setName
(
config
.
getAttributeName
());
}
else
{
}
else
{
if
(
config
.
getDataAttribute
().
startsWith
(
"clc."
)){
if
(
config
.
getDataAttribute
().
startsWith
(
"clc."
))
{
collectEntity
.
setName
(
config
.
getAttributeName
());
collectEntity
.
setName
(
config
.
getAttributeName
());
}
else
{
}
else
{
collectEntity
.
setName
(
config
.
getDataAttribute
());
collectEntity
.
setName
(
config
.
getDataAttribute
());
...
@@ -488,10 +489,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -488,10 +489,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
exp
=
expList
.
get
(
0
);
exp
=
expList
.
get
(
0
);
}
else
if
(
expList
.
size
()
>
1
)
{
}
else
if
(
expList
.
size
()
>
1
)
{
for
(
EntrustSampleItem
item
:
expList
)
{
for
(
EntrustSampleItem
item
:
expList
)
{
if
(
StringUtils
.
isBlank
(
item
.
getName
())
||
StringUtils
.
isBlank
(
soilItemCollectData
.
getAttraute
()))
{
if
(
StringUtils
.
isBlank
(
item
.
getName
())
||
StringUtils
.
isBlank
(
soilItemCollectData
.
getAttraute
()))
{
continue
;
continue
;
}
}
if
(
item
.
getName
().
equals
(
soilItemCollectData
.
getAttraute
())){
if
(
item
.
getName
().
equals
(
soilItemCollectData
.
getAttraute
()))
{
exp
=
item
;
exp
=
item
;
break
;
break
;
}
}
...
@@ -581,11 +582,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
...
@@ -581,11 +582,10 @@ public class OriginalTemplateServiceImpl extends BaseServiceImpl<OriginalTemplat
originalRecord
.
setId
(
businessId
);
originalRecord
.
setId
(
businessId
);
originalRecord
.
setObjectKey
(
obsFileResult
.
getObjectKey
());
originalRecord
.
setObjectKey
(
obsFileResult
.
getObjectKey
());
return
originalTemplateService
.
updateById
(
originalRecord
);
return
originalTemplateService
.
update
Template
ById
(
originalRecord
);
}
}
@Override
@Override
public
boolean
editReportTemplate
(
String
someParam
,
OssFileResult
obsFileResult
)
{
public
boolean
editReportTemplate
(
String
someParam
,
OssFileResult
obsFileResult
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
someParam
),
"业务ID不能为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
someParam
),
"业务ID不能为空"
);
...
...
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
98f3001a
...
@@ -48,7 +48,12 @@
...
@@ -48,7 +48,12 @@
</select>
</select>
<select
id=
"selectEntrustSampleReceive"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
<select
id=
"selectEntrustSampleReceive"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
SELECT e.* FROM entrust e WHERE e.deleted = 0
SELECT e.*,s.sample_name
FROM entrust e
LEFT JOIN (
select s.entrust_id, max(s.name) "sample_name" from entrust_sample s where s.deleted = 0 group by s.entrust_id
) s on s.entrust_id = e.id
WHERE e.deleted = 0
<include
refid=
"basicCondition"
/>
<include
refid=
"basicCondition"
/>
<if
test=
"null != vo.prepareStatus"
>
<if
test=
"null != vo.prepareStatus"
>
and exists (
and exists (
...
@@ -72,13 +77,18 @@
...
@@ -72,13 +77,18 @@
<select
id=
"selectVOList"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
<select
id=
"selectVOList"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
SELECT e.* FROM entrust e WHERE e.deleted = 0
SELECT e.*,s.sample_name
FROM entrust e
LEFT JOIN (
select s.entrust_id, max(s.name) "sample_name" from entrust_sample s where s.deleted = 0 group by s.entrust_id
) s on s.entrust_id = e.id
WHERE e.deleted = 0
<include
refid=
"basicCondition"
/>
<include
refid=
"basicCondition"
/>
<if
test=
"null != vo.sampleStatus"
>
<if
test=
"null != vo.sampleStatus"
>
AND exists (
AND exists (
select 1 from entrust_sample s where s.deleted = 0
select 1 from entrust_sample s where s.deleted = 0
and s.entrust_id = e.id and s.status = #{vo.sampleStatus}
and s.entrust_id = e.id and s.
type = 0 and s.
status = #{vo.sampleStatus}
)
)
</if>
</if>
...
@@ -137,23 +147,43 @@
...
@@ -137,23 +147,43 @@
</select>
</select>
<select
id=
"selectVOListByItem"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
<select
id=
"selectVOListByItem"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
SELECT distinct e.* FROM
SELECT
entrust e,entrust_sample s,entrust_sample_item i
e.*,s.sample_name
WHERE e.deleted = 0 and s.deleted = 0 and i.deleted = 0
FROM entrust e
and s.entrust_id = e.id and i.entrust_sample_id = s.id
left join (
select s.company_id,s.entrust_id,max(s.name) "sample_name"
from entrust_sample s where s.deleted = 0
group by s.company_id, s.entrust_id
) s on s.entrust_id = e.id
WHERE e.deleted = 0 and s.entrust_id = e.id
<include
refid=
"basicCondition"
/>
<include
refid=
"basicCondition"
/>
<if
test=
"null!=vo.itemStatus"
>
<if
test=
"null!=vo.itemStatus"
>
and i.status = #{vo.itemStatus}
and exists (
select 1 from entrust_sample es,entrust_sample_item esi
where es.id = esi.entrust_sample_id
and es.deleted = 0 and esi.deleted = 0
and esi.status = #{vo.itemStatus}
)
</if>
</if>
<if
test=
"null!=vo.itemStatusEnumList"
>
<if
test=
"null!=vo.itemStatusEnumList"
>
AND i.status IN
and exists (
<foreach
collection=
"vo.itemStatusEnumList"
index=
"index"
item=
"status"
open=
"("
separator=
","
close=
")"
>
select 1 from entrust_sample es,entrust_sample_item esi
#{status}
where es.id = esi.entrust_sample_id
</foreach>
and es.deleted = 0 and esi.deleted = 0
and esi.status IN
<foreach
collection=
"vo.itemStatusEnumList"
index=
"index"
item=
"status"
open=
"("
separator=
","
close=
")"
>
#{status}
</foreach>
)
</if>
</if>
<if
test=
"null!=vo.testerId"
>
<if
test=
"null!=vo.testerId"
>
AND i.tester_id = #{vo.testerId}
and exists (
select 1 from entrust_sample es,entrust_sample_item esi
where es.id = esi.entrust_sample_id
and es.deleted = 0 and esi.deleted = 0
and esi.tester_id = #{vo.testerId}
)
</if>
</if>
order by e.entrust_time desc,e.code desc
order by e.entrust_time desc,e.code desc
</select>
</select>
...
@@ -177,5 +207,51 @@
...
@@ -177,5 +207,51 @@
order by e.entrust_time desc
order by e.entrust_time desc
</select>
</select>
<update
id=
"updateEntrustById"
>
update entrust
set
client = #{vo.client}
,ltime = #{vo.ltime}
,lid = #{vo.lid}
,client_address = #{vo.clientAddress}
,client_tel = #{vo.clientTel}
,assignor = #{vo.assignor}
,assignor_id = #{vo.assignorId}
,entrust_time = #{vo.entrustTime}
,report_get_way = #{vo.reportGetWay}
,sample_handle_advise = #{vo.sampleHandleAdvise}
,surplus_sample_limit = #{vo.surplusSampleLimit}
,test_side = #{vo.testSide}
,test_address = #{vo.testAddress}
,test_contact = #{vo.testContact}
,test_tel = #{vo.testTel}
,test_instructions = #{vo.testInstructions}
,test_ask = #{vo.testAsk}
,receiver = #{vo.receiver}
,receiver_id = #{vo.receiverId}
,receive_time = #{vo.receiveTime}
,status = #{vo.status}
,progress = #{vo.progress}
,special_ask = #{vo.specialAsk}
,type = #{vo.type}
,status_path = #{vo.statusPath}
,flow_status = #{vo.flowStatus}
,expect_send_time = #{vo.expectSendTime}
,live_witness = #{vo.liveWitness}
,sample_size = #{vo.sampleSize}
,priority = #{vo.priority}
,test_time_s = #{vo.testTimeS}
,test_time_e = #{vo.testTimeE}
,proposer_id = #{vo.proposerId}
,approver_id = #{vo.approverId}
,proposer = #{vo.proposer}
,approver = #{vo.approver}
,total_fee = #{vo.totalFee}
,approve_time = #{vo.approveTime}
,approve_status = #{vo.approveStatus}
,print_status = #{vo.printStatus}
where id = #{vo.id}
</update>
</mapper>
</mapper>
src/main/resources/mapper/hmhj/EntrustSampleItemMapper.xml
View file @
98f3001a
This diff is collapsed.
Click to expand it.
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
View file @
98f3001a
...
@@ -127,6 +127,7 @@
...
@@ -127,6 +127,7 @@
e.test_side,
e.test_side,
s.supplier,
s.supplier,
s.manufacturer,
s.manufacturer,
s.slot_no,
(case when cr.calc_result is null then null else (case when cr.calc_result > 0 then 1 else 0 end) end) "isQualified"
(case when cr.calc_result is null then null else (case when cr.calc_result > 0 then 1 else 0 end) end) "isQualified"
FROM entrust_sample s
FROM entrust_sample s
JOIN entrust e ON s.entrust_id = e.ID
JOIN entrust e ON s.entrust_id = e.ID
...
@@ -158,6 +159,10 @@
...
@@ -158,6 +159,10 @@
AND s.code LIKE CONCAT('%',#{vo.code},'%')
AND s.code LIKE CONCAT('%',#{vo.code},'%')
</if>
</if>
<if
test=
"null!=vo.slotNo"
>
AND s.slot_no LIKE CONCAT('%',#{vo.slotNo},'%')
</if>
ORDER BY e.code,s.code
ORDER BY e.code,s.code
</select>
</select>
...
@@ -389,4 +394,14 @@
...
@@ -389,4 +394,14 @@
group by pi.period
group by pi.period
</select>
</select>
<select
id=
"selectByReportIds"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustSampleVO"
>
select distinct s.* from entrust_sample s
join entrust_report_rel_sample rs on rs.sample_id = s.id
where s.deleted = 0 and rs.deleted = 0
and rs.report_id in
<foreach
collection=
"reportIds"
index=
"index"
item=
"reportId"
open=
"("
separator=
","
close=
")"
>
#{reportId}
</foreach>
</select>
</mapper>
</mapper>
src/main/resources/mapper/hmhj/OriginalTemplateConfigMapper.xml
View file @
98f3001a
...
@@ -2,4 +2,23 @@
...
@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.OriginalTemplateConfigMapper"
>
<mapper
namespace=
"com.patzn.cloud.service.lims.hmhj.mapper.OriginalTemplateConfigMapper"
>
<update
id=
"updateConfigById"
>
update original_template_config t
set
attribute_name = #{vo.attributeName}
,data_attribute = #{vo.dataAttribute}
,column_place = #{vo.columnPlace}
,template_id = #{vo.templateId}
,company_id = #{vo.companyId}
,lid = #{vo.lid}
,ltime = #{vo.ltime}
,merge_begin = #{vo.mergeBegin}
,merge_end = #{vo.mergeEnd}
,merge_row_num = #{vo.mergeRowNum}
,formula = #{vo.formula}
,itemed = #{vo.itemed}
,unit = #{vo.unit}
,round_num = #{vo.roundNum}
where id = #{vo.id}
</update>
</mapper>
</mapper>
src/main/resources/mapper/hmhj/OriginalTemplateMapper.xml
View file @
98f3001a
...
@@ -2,4 +2,31 @@
...
@@ -2,4 +2,31 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.OriginalTemplateMapper"
>
<mapper
namespace=
"com.patzn.cloud.service.lims.hmhj.mapper.OriginalTemplateMapper"
>
<update
id=
"updateTemplateById"
>
update original_template t
set
name = #{vo.name},
alias = #{vo.alias},
bucket_name = #{vo.bucketName},
object_key = #{vo.objectKey},
version_id = #{vo.versionId},
type = #{vo.type},
classify_id = #{vo.classifyId},
service = #{vo.service},
sort = #{vo.sort},
class_type = #{vo.classType},
remark = #{vo.remark},
sample_begin_row = #{vo.sampleBeginRow},
sample_begin_col = #{vo.sampleBeginCol},
sample_merger_num = #{vo.sampleMergerNum},
template_sample_num = #{vo.templateSampleNum},
more_sheet = #{vo.moreSheet},
template_type = #{vo.templateType},
more_item = #{vo.moreItem},
tail_num = #{vo.tailNum},
curve_begin_num = #{vo.curveBeginNum},
blank_begin_num = #{vo.blankBeginNum},
collection_type = #{vo.collectionType}
where id = #{vo.id}
</update>
</mapper>
</mapper>
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