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
4de59f48
Commit
4de59f48
authored
Apr 18, 2023
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单显示对应的科室的样品编码;
parent
6c290ab6
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
362 additions
and
130 deletions
+362
-130
CollectKit.java
.../java/com/patzn/cloud/service/lims/common/CollectKit.java
+23
-0
EntrustSampleController.java
...service/lims/hmhj/controller/EntrustSampleController.java
+19
-7
IEntrustSampleService.java
...loud/service/lims/hmhj/service/IEntrustSampleService.java
+12
-2
IUserInfoService.java
...tzn/cloud/service/lims/hmhj/service/IUserInfoService.java
+176
-0
EntrustSampleServiceImpl.java
...vice/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
+70
-52
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+23
-49
UserInfoServiceImpl.java
...d/service/lims/hmhj/service/impl/UserInfoServiceImpl.java
+32
-19
EntrustSampleMapper.xml
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
+7
-1
No files found.
src/main/java/com/patzn/cloud/service/lims/common/CollectKit.java
0 → 100644
View file @
4de59f48
package
com
.
patzn
.
cloud
.
service
.
lims
.
common
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.function.Consumer
;
/**
* 集合工具类
*
* @author meazty
* @since 2023/4/18 16:41
**/
public
class
CollectKit
{
public
static
<
T
>
void
forEach
(
Collection
<
T
>
elements
,
Consumer
<
T
>
action
)
{
if
(
null
==
elements
||
elements
.
isEmpty
())
{
elements
=
Collections
.
emptyList
();
}
for
(
T
element
:
elements
)
{
action
.
accept
(
element
);
}
}
}
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustSampleController.java
View file @
4de59f48
...
@@ -70,7 +70,19 @@ public class EntrustSampleController extends ServiceController {
...
@@ -70,7 +70,19 @@ public class EntrustSampleController extends ServiceController {
})
})
@PostMapping
(
"/pageVO"
)
@PostMapping
(
"/pageVO"
)
public
RestResult
<
Page
<
EntrustSampleVO
>>
getPageVO
(
EntrustSampleVO
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSampleVO
>>
getPageVO
(
EntrustSampleVO
entrustSample
)
{
return
success
(
entrustSampleService
.
pageVO
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
pageVO
(
getPage
(),
entrustSample
,
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_of_entrust"
)
public
RestResult
<
Page
<
EntrustSampleVO
>>
pageOfEntrust
(
EntrustSampleVO
entrustSample
)
{
return
success
(
entrustSampleService
.
pageOfEntrust
(
getPage
(),
entrustSample
,
getAccount
()));
}
}
@ApiOperation
(
"制备样品分页列表"
)
@ApiOperation
(
"制备样品分页列表"
)
...
@@ -97,7 +109,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -97,7 +109,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_make_his"
)
@PostMapping
(
"/page_make_his"
)
public
RestResult
<
Page
<
EntrustSampleVO
>>
getPageMake
(
EntrustSampleVO
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSampleVO
>>
getPageMake
(
EntrustSampleVO
entrustSample
)
{
entrustSample
.
setNotStatus
(
EntrustSampleStatusEnum
.
DRAFT
);
entrustSample
.
setNotStatus
(
EntrustSampleStatusEnum
.
DRAFT
);
return
success
(
entrustSampleService
.
pageVO
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
pageVO
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
...
@@ -113,7 +125,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -113,7 +125,7 @@ public class EntrustSampleController extends ServiceController {
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_MAKE
);
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_MAKE
);
// 只显示试样
// 只显示试样
entrustSample
.
setType
(
0
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
pageVOForMake
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
pageVOForMake
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
@ApiOperation
(
"报告编制样品历史分页列表"
)
@ApiOperation
(
"报告编制样品历史分页列表"
)
...
@@ -146,7 +158,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -146,7 +158,7 @@ public class EntrustSampleController extends ServiceController {
@PostMapping
(
"/page_report_check"
)
@PostMapping
(
"/page_report_check"
)
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportCheck
(
EntrustSample
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportCheck
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_CHECK
);
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_CHECK
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
page
OfReportCheck
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
@ApiOperation
(
"报告签发样品分页列表"
)
@ApiOperation
(
"报告签发样品分页列表"
)
...
@@ -160,7 +172,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -160,7 +172,7 @@ public class EntrustSampleController extends ServiceController {
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportIssue
(
EntrustSample
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportIssue
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_ISSUE
);
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_ISSUE
);
entrustSample
.
setType
(
0
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
page
OfReportIssue
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
@ApiOperation
(
"报告批准样品分页列表"
)
@ApiOperation
(
"报告批准样品分页列表"
)
...
@@ -188,7 +200,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -188,7 +200,7 @@ public class EntrustSampleController extends ServiceController {
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportSend
(
EntrustSample
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSample
>>
getPageReportSend
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_SEND
);
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
REPORT_SEND
);
entrustSample
.
setType
(
0
);
entrustSample
.
setType
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
page
OfReportSend
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
@ApiOperation
(
"质检审核-样品分页列表"
)
@ApiOperation
(
"质检审核-样品分页列表"
)
...
@@ -392,7 +404,7 @@ public class EntrustSampleController extends ServiceController {
...
@@ -392,7 +404,7 @@ public class EntrustSampleController extends ServiceController {
public
RestResult
<
Page
<
EntrustSample
>>
getPageSampleMake
(
EntrustSample
entrustSample
)
{
public
RestResult
<
Page
<
EntrustSample
>>
getPageSampleMake
(
EntrustSample
entrustSample
)
{
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
END
);
entrustSample
.
setStatus
(
EntrustSampleStatusEnum
.
END
);
entrustSample
.
setJudgeStatus
(
0
);
entrustSample
.
setJudgeStatus
(
0
);
return
success
(
entrustSampleService
.
page
(
getPage
(),
entrustSample
));
return
success
(
entrustSampleService
.
page
OfQualityJudge
(
getPage
(),
entrustSample
,
getAccount
()
));
}
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IEntrustSampleService.java
View file @
4de59f48
...
@@ -28,6 +28,14 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
...
@@ -28,6 +28,14 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
Page
<
EntrustSample
>
page
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
);
Page
<
EntrustSample
>
page
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
);
Page
<
EntrustSample
>
pageOfReportCheck
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
);
Page
<
EntrustSample
>
pageOfReportIssue
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
);
Page
<
EntrustSample
>
pageOfReportSend
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
);
Page
<
EntrustSample
>
pageOfQualityJudge
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
);
Page
<
EntrustSample
>
pageByWrapper
(
Page
<
EntrustSample
>
page
,
Wrapper
wrapper
);
Page
<
EntrustSample
>
pageByWrapper
(
Page
<
EntrustSample
>
page
,
Wrapper
wrapper
);
boolean
removeByIds
(
List
<
Long
>
ids
);
boolean
removeByIds
(
List
<
Long
>
ids
);
...
@@ -54,9 +62,11 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
...
@@ -54,9 +62,11 @@ public interface IEntrustSampleService extends IBaseService<EntrustSample> {
Page
<
EntrustSampleVO
>
pageBySampleLeftHis
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
sampleVO
);
Page
<
EntrustSampleVO
>
pageBySampleLeftHis
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
sampleVO
);
Page
<
EntrustSampleVO
>
pageVO
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
);
Page
<
EntrustSampleVO
>
pageVO
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
);
Page
<
EntrustSampleVO
>
pageOfEntrust
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
);
Page
<
EntrustSampleVO
>
pageVOForMake
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
);
Page
<
EntrustSampleVO
>
pageVOForMake
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
);
boolean
submitToAcceptanceResultInput
(
Long
[]
ids
,
Account
account
);
boolean
submitToAcceptanceResultInput
(
Long
[]
ids
,
Account
account
);
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/IUserInfoService.java
0 → 100644
View file @
4de59f48
package
com
.
patzn
.
cloud
.
service
.
lims
.
hmhj
.
service
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.service.base.entity.SysOrg
;
import
com.patzn.cloud.service.base.entity.SysUser
;
import
com.patzn.cloud.service.lims.base.entity.LmsUserGroup
;
import
java.util.List
;
/**
* The interface User info service.
*
* @author Meazty
*/
public
interface
IUserInfoService
{
/**
* Gets cur group names.
*
* @return the cur group names
*/
String
getCurGroupNames
();
/**
* Gets period.
*
* @param sysOrg the sys org
* @return the period
*/
String
getPeriod
(
SysOrg
sysOrg
);
/**
* Gets user period.
*
* @param userId the user id
* @return the user period
*/
String
getUserPeriod
(
Long
userId
);
/**
* Gets sys org name.
*
* @param sysOrg the sys org
* @return the sys org name
*/
String
getSysOrgName
(
SysOrg
sysOrg
);
/**
* Gets user period.
*
* @param account the account
* @return the user period
*/
String
getUserPeriod
(
Account
account
);
/**
* Gets org name by user period.
*
* @param account the account
* @param periods the periods
* @return the org name by user period
*/
String
getOrgNameByUserPeriod
(
Account
account
,
String
...
periods
);
/**
* Gets user org id.
*
* @param account the account
* @return the user org id
*/
Long
getUserOrgId
(
Account
account
);
/**
* Gets cur user.
*
* @return the cur user
*/
SysUser
getCurUser
();
/**
* Gets user by id.
*
* @param userId the user id
* @return the user by id
*/
SysUser
getUserById
(
Long
userId
);
/**
* Gets user org.
*
* @param account the account
* @return the user org
*/
SysOrg
getUserOrg
(
Account
account
);
/**
* Gets cur group name list.
*
* @return the cur group name list
*/
List
<
String
>
getCurGroupNameList
();
/**
* Gets group user ids.
*
* @param userId the user id
* @return the group user ids
*/
List
<
Long
>
getGroupUserIds
(
Long
userId
);
/**
* Gets users by org.
*
* @param orgId the org id
* @return the users by org
*/
List
<
SysUser
>
getUsersByOrg
(
Long
orgId
);
/**
* Gets group name list.
*
* @param userId the user id
* @return the group name list
*/
List
<
String
>
getGroupNameList
(
Long
userId
);
/**
* Gets user org names.
*
* @param account the account
* @return the user org names
*/
List
<
String
>
getUserOrgNames
(
Account
account
);
/**
* Gets group list.
*
* @param userId the user id
* @return the group list
*/
List
<
LmsUserGroup
>
getGroupList
(
Long
userId
);
/**
* Gets user org list.
*
* @param account the account
* @return the user org list
*/
List
<
SysOrg
>
getUserOrgList
(
Account
account
);
/**
* Gets user ids by group name.
*
* @param groupName the group name
* @return the user ids by group name
*/
List
<
Long
>
getUserIdsByGroupName
(
String
groupName
);
/**
* Gets users by role name.
*
* @param roleName the role name
* @return the users by role name
*/
List
<
SysUser
>
getUsersByRoleName
(
String
roleName
);
/**
* Is group leader boolean.
*
* @param entrustId the entrust id
* @param account the account
* @return the boolean
*/
boolean
isGroupLeader
(
Long
entrustId
,
Account
account
);
}
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleServiceImpl.java
View file @
4de59f48
...
@@ -24,6 +24,7 @@ import com.patzn.cloud.service.hmhj.enums.*;
...
@@ -24,6 +24,7 @@ import com.patzn.cloud.service.hmhj.enums.*;
import
com.patzn.cloud.service.hmhj.model.WmsRespResult
;
import
com.patzn.cloud.service.hmhj.model.WmsRespResult
;
import
com.patzn.cloud.service.hmhj.vo.*
;
import
com.patzn.cloud.service.hmhj.vo.*
;
import
com.patzn.cloud.service.lims.common.BeanUtils
;
import
com.patzn.cloud.service.lims.common.BeanUtils
;
import
com.patzn.cloud.service.lims.common.CollectKit
;
import
com.patzn.cloud.service.lims.common.StringHandleUtils
;
import
com.patzn.cloud.service.lims.common.StringHandleUtils
;
import
com.patzn.cloud.service.lims.config.ServiceProperties
;
import
com.patzn.cloud.service.lims.config.ServiceProperties
;
import
com.patzn.cloud.service.lims.hmhj.common.HSSFWorkbookUtil
;
import
com.patzn.cloud.service.lims.hmhj.common.HSSFWorkbookUtil
;
...
@@ -102,6 +103,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -102,6 +103,9 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
@Resource
@Resource
private
ServiceProperties
serviceProperties
;
private
ServiceProperties
serviceProperties
;
@Resource
private
IUserInfoService
userInfoService
;
@Override
@Override
public
Page
<
EntrustSample
>
page
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
)
{
public
Page
<
EntrustSample
>
page
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
)
{
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrustSample
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrustSample
);
...
@@ -109,69 +113,79 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -109,69 +113,79 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
return
this
.
page
(
page
,
wrapper
);
return
this
.
page
(
page
,
wrapper
);
}
}
/**
* 质量室填充code
*
* @param list
*/
private
void
fillQualityCode
(
List
<?
extends
EntrustSample
>
list
)
{
CollectKit
.
forEach
(
list
,
d
->
{
d
.
setCode
(
d
.
getFirstCode
());
});
}
/**
* 化验室填充code
*
* @param list
*/
private
void
fillAssayCode
(
List
<?
extends
EntrustSample
>
list
)
{
CollectKit
.
forEach
(
list
,
d
->
{
d
.
setCode
(
com
.
patzn
.
cloud
.
commons
.
toolkit
.
StringHandleUtils
.
nvl
(
d
.
getThirdCode
(),
d
.
getFirstCode
()));
});
}
@Override
@Override
public
Page
<
EntrustSample
>
pageByWrapper
(
Page
<
EntrustSample
>
page
,
Wrapper
wrapper
)
{
public
Page
<
EntrustSample
>
pageOfReportCheck
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
)
{
page
=
this
.
page
(
page
,
entrustSample
);
fillQualityCode
(
page
.
getRecords
());
return
page
;
}
return
this
.
page
(
page
,
wrapper
);
@Override
public
Page
<
EntrustSample
>
pageOfReportIssue
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
)
{
page
=
this
.
page
(
page
,
entrustSample
);
fillAssayCode
(
page
.
getRecords
());
return
page
;
}
}
@Override
@Override
public
Page
<
EntrustSampleVO
>
pageVO
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
)
{
public
Page
<
EntrustSample
>
pageOfReportSend
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
)
{
page
=
this
.
page
(
page
,
entrustSample
);
fillAssayCode
(
page
.
getRecords
());
return
page
;
}
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrustSample
));
@Override
public
Page
<
EntrustSample
>
pageOfQualityJudge
(
Page
<
EntrustSample
>
page
,
EntrustSample
entrustSample
,
Account
account
)
{
page
=
this
.
page
(
page
,
entrustSample
);
fillQualityCode
(
page
.
getRecords
());
return
page
;
}
}
@Override
@Override
public
Page
<
EntrustSampleVO
>
pageVOForMake
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
)
{
public
Page
<
EntrustSample
>
pageByWrapper
(
Page
<
EntrustSample
>
page
,
Wrapper
wrapper
)
{
return
this
.
page
(
page
,
wrapper
);
// List<EntrustSampleVO> sampleVOList = baseMapper.selectVOList(page, entrustSample);
}
//
// if (CollectionUtils.isEmpty(sampleVOList)) return page;
@Override
//
public
Page
<
EntrustSampleVO
>
pageVO
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
)
{
// List<Long> sampleIdsList = sampleVOList.stream().map(s -> {
// return s.getId();
// }).collect(Collectors.toList());
// List<EntrustSampleItem> itemList = entrustSampleItemService.list(Condition.create().setSqlSelect("id", "entrust_sample_id", "name").isNotNull("name").in("entrust_sample_id", sampleIdsList));
// Map<Long, List<String>> itemMap = new HashMap<>();
// Map<Long, Set<String>> itemSetMap = new HashMap<>();
// for (EntrustSampleItem item : itemList) {
// if (itemMap.containsKey(item.getEntrustSampleId())) {
// List<String> list = itemMap.get(item.getEntrustSampleId());
// list.add(item.getName());
// itemMap.put(item.getEntrustSampleId(), list);
//
//
// Set<String> set = itemSetMap.get(item.getEntrustSampleId());
// set.add(item.getName());
// itemSetMap.put(item.getEntrustSampleId(), set);
// } else {
// List<String> list = new ArrayList<>();
// list.add(item.getName());
// itemMap.put(item.getEntrustSampleId(), list);
//
// Set<String> set = new HashSet<>();
// set.add(item.getName());
// itemSetMap.put(item.getEntrustSampleId(), set);
// }
// }
// for (EntrustSampleVO vo : sampleVOList) {
//
// List<String> nameList = itemMap.get(vo.getId());
// if (CollectionUtils.isEmpty(nameList)) {
// vo.setItemRepeat(false);
// } else {
// String itemNames = StringHandleUtils.join(nameList);
// vo.setItemNames(itemNames);
// if (nameList.size() != itemSetMap.get(vo.getId()).size()) {
// vo.setItemRepeat(true);
// } else {
// vo.setItemRepeat(false);
// }
// }
// }
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrustSample
));
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrustSample
));
}
}
@Override
public
Page
<
EntrustSampleVO
>
pageOfEntrust
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
)
{
List
<
EntrustSampleVO
>
list
=
baseMapper
.
selectVOList
(
page
,
entrustSample
);
fillQualityCode
(
list
);
return
page
.
setRecords
(
list
);
}
@Override
public
Page
<
EntrustSampleVO
>
pageVOForMake
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
,
Account
account
)
{
List
<
EntrustSampleVO
>
records
=
baseMapper
.
selectVOList
(
page
,
entrustSample
);
fillAssayCode
(
records
);
return
page
.
setRecords
(
records
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
...
@@ -1876,7 +1890,11 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
...
@@ -1876,7 +1890,11 @@ public class EntrustSampleServiceImpl extends BaseServiceImpl<EntrustSampleMappe
@Override
@Override
public
Page
<
EntrustSampleVO
>
pageVOForMakeHis
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
)
{
public
Page
<
EntrustSampleVO
>
pageVOForMakeHis
(
Page
<
EntrustSampleVO
>
page
,
EntrustSampleVO
entrustSample
)
{
return
page
.
setRecords
(
baseMapper
.
selectVOList
(
page
,
entrustSample
));
List
<
EntrustSampleVO
>
records
=
baseMapper
.
selectVOList
(
page
,
entrustSample
);
CollectKit
.
forEach
(
records
,
d
->
{
d
.
setCode
(
com
.
patzn
.
cloud
.
commons
.
toolkit
.
StringHandleUtils
.
nvl
(
d
.
getThirdCode
(),
d
.
getFirstCode
()));
});
return
page
.
setRecords
(
records
);
}
}
@Override
@Override
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
4de59f48
...
@@ -35,10 +35,10 @@ import com.patzn.poibox.xwpf.XWPFTemplate;
...
@@ -35,10 +35,10 @@ import com.patzn.poibox.xwpf.XWPFTemplate;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -57,66 +57,45 @@ import java.util.stream.Collectors;
...
@@ -57,66 +57,45 @@ import java.util.stream.Collectors;
@Service
@Service
public
class
EntrustServiceImpl
extends
BaseServiceImpl
<
EntrustMapper
,
Entrust
>
implements
IEntrustService
{
public
class
EntrustServiceImpl
extends
BaseServiceImpl
<
EntrustMapper
,
Entrust
>
implements
IEntrustService
{
@
Autowired
@
Resource
private
ICodeRuleService
codeRuleService
;
private
ICodeRuleService
codeRuleService
;
@Resource
@Autowired
private
IEntrustSampleItemService
entrustSampleItemService
;
private
IEntrustSampleItemService
entrustSampleItemService
;
@Resource
@Autowired
private
IEntrustSampleService
entrustSampleService
;
private
IEntrustSampleService
entrustSampleService
;
@Resource
@Autowired
private
IEntrustReportService
entrustReportService
;
private
IEntrustReportService
entrustReportService
;
@Resource
@Autowired
private
IEntrustSampleBackupService
entrustSampleBackupService
;
private
IEntrustSampleBackupService
entrustSampleBackupService
;
@Resource
@Autowired
private
IEntrustSamplePrepareService
entrustSamplePrepareService
;
private
IEntrustSamplePrepareService
entrustSamplePrepareService
;
@Resource
@Autowired
private
IEntrustRecordService
entrustRecordService
;
private
IEntrustRecordService
entrustRecordService
;
@Resource
@Autowired
private
IUserInspectionCodeService
userInspectionCodeService
;
private
IUserInspectionCodeService
userInspectionCodeService
;
@Resource
@Autowired
private
ILmsMsgService
lmsMsgService
;
private
ILmsMsgService
lmsMsgService
;
@Resource
@Autowired
private
SysOrgClient
sysOrgClient
;
private
SysOrgClient
sysOrgClient
;
@Resource
@Autowired
private
IUserInfoService
userInfoService
;
private
UserInfoServiceImpl
userInfoService
;
@Resource
@Autowired
private
Executor
executor1
;
private
Executor
executor1
;
@Resource
@Autowired
private
SysUserClient
sysUserClient
;
private
SysUserClient
sysUserClient
;
@Resource
@Autowired
private
LmsChemicalCategoryClient
lmsChemicalCategoryClient
;
private
LmsChemicalCategoryClient
lmsChemicalCategoryClient
;
@Resource
@Autowired
private
IEntrustAnnexService
entrustAnnexService
;
private
IEntrustAnnexService
entrustAnnexService
;
@Resource
@Autowired
private
OssClient
ossClient
;
private
OssClient
ossClient
;
@Resource
@Autowired
private
IMaterialService
materialService
;
private
IMaterialService
materialService
;
@Resource
@Autowired
private
IContractSamplingService
contractSamplingService
;
private
IContractSamplingService
contractSamplingService
;
@Resource
@Autowired
private
IOriginalRecordService
originalRecordService
;
private
IOriginalRecordService
originalRecordService
;
@Resource
@Autowired
private
IEntrustReportRelSampleService
entrustReportRelSampleService
;
private
IEntrustReportRelSampleService
entrustReportRelSampleService
;
...
@@ -886,16 +865,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -886,16 +865,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
// 只查询正常样品,不查询标样
// 只查询正常样品,不查询标样
List
<
EntrustSampleDTO
>
sampleList
=
listSampleDTOByType
(
id
,
0
);
List
<
EntrustSampleDTO
>
sampleList
=
listSampleDTOByType
(
id
,
0
);
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
List
<
Long
>
sampleIdList
=
sampleList
.
stream
().
map
(
s
->
{
List
<
Long
>
sampleIdList
=
sampleList
.
stream
().
map
(
EntrustSampleDTO:
:
getId
).
collect
(
Collectors
.
toList
());
return
s
.
getId
();
}).
collect
(
Collectors
.
toList
());
List
<
EntrustSampleItem
>
experimentList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIdList
));
List
<
EntrustSampleItem
>
experimentList
=
entrustSampleItemService
.
list
(
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIdList
));
Map
<
Long
,
Set
<
String
>>
itemSetMap
=
new
HashMap
<>();
Map
<
Long
,
Set
<
String
>>
itemSetMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
EntrustSampleItem
>>
itemEntitySetMap
=
new
HashMap
<>();
Map
<
Long
,
List
<
EntrustSampleItem
>>
itemEntitySetMap
=
new
HashMap
<>();
for
(
EntrustSampleItem
experiment
:
experimentList
)
{
for
(
EntrustSampleItem
experiment
:
experimentList
)
{
if
(!
itemSetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
if
(!
itemSetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
Set
<
String
>
set
=
new
TreeSet
<>();
Set
<
String
>
set
=
new
TreeSet
<>();
set
.
add
(
experiment
.
getName
());
set
.
add
(
experiment
.
getName
());
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
...
@@ -905,7 +880,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
...
@@ -905,7 +880,6 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
itemSetMap
.
put
(
experiment
.
getEntrustSampleId
(),
set
);
}
}
if
(!
itemEntitySetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
if
(!
itemEntitySetMap
.
containsKey
(
experiment
.
getEntrustSampleId
()))
{
List
<
EntrustSampleItem
>
list
=
new
ArrayList
<>();
List
<
EntrustSampleItem
>
list
=
new
ArrayList
<>();
list
.
add
(
experiment
);
list
.
add
(
experiment
);
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/UserInfoServiceImpl.java
View file @
4de59f48
...
@@ -5,7 +5,6 @@ import com.patzn.cloud.commons.api.RestAssert;
...
@@ -5,7 +5,6 @@ import com.patzn.cloud.commons.api.RestAssert;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.controller.Account
;
import
com.patzn.cloud.commons.controller.LoginHelper
;
import
com.patzn.cloud.commons.controller.LoginHelper
;
import
com.patzn.cloud.feign.base.client.SysOrgClient
;
import
com.patzn.cloud.feign.base.client.SysOrgClient
;
import
com.patzn.cloud.feign.base.client.SysRoleClient
;
import
com.patzn.cloud.feign.base.client.SysUserClient
;
import
com.patzn.cloud.feign.base.client.SysUserClient
;
import
com.patzn.cloud.feign.lims.base.client.LmsUserGroupClient
;
import
com.patzn.cloud.feign.lims.base.client.LmsUserGroupClient
;
import
com.patzn.cloud.service.base.entity.SysOrg
;
import
com.patzn.cloud.service.base.entity.SysOrg
;
...
@@ -14,19 +13,22 @@ import com.patzn.cloud.service.hmhj.entity.Entrust;
...
@@ -14,19 +13,22 @@ import com.patzn.cloud.service.hmhj.entity.Entrust;
import
com.patzn.cloud.service.lims.base.entity.LmsUserGroup
;
import
com.patzn.cloud.service.lims.base.entity.LmsUserGroup
;
import
com.patzn.cloud.service.lims.base.vo.GroupUserVO
;
import
com.patzn.cloud.service.lims.base.vo.GroupUserVO
;
import
com.patzn.cloud.service.lims.common.consts.Symbol
;
import
com.patzn.cloud.service.lims.common.consts.Symbol
;
import
com.patzn.cloud.service.lims.common.service.ILmsMsgService
;
import
com.patzn.cloud.service.lims.hmhj.common.consts.HmConst
;
import
com.patzn.cloud.service.lims.hmhj.common.consts.HmConst
;
import
com.patzn.cloud.service.lims.hmhj.service.IEntrustService
;
import
com.patzn.cloud.service.lims.hmhj.service.IEntrustService
;
import
com.patzn.cloud.service.lims.hmhj.service.IUserInfoService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
/**
* @author Meazty
*/
@Service
@Service
public
class
UserInfoServiceImpl
{
public
class
UserInfoServiceImpl
implements
IUserInfoService
{
private
static
final
List
<
LmsUserGroup
>
OTHER_GROUP_LIST
=
new
ArrayList
<>();
private
static
final
List
<
LmsUserGroup
>
OTHER_GROUP_LIST
=
new
ArrayList
<>();
private
static
final
List
<
String
>
OTHER_GROUP_NAME_LIST
=
new
ArrayList
<>();
private
static
final
List
<
String
>
OTHER_GROUP_NAME_LIST
=
new
ArrayList
<>();
...
@@ -36,24 +38,16 @@ public class UserInfoServiceImpl {
...
@@ -36,24 +38,16 @@ public class UserInfoServiceImpl {
OTHER_GROUP_NAME_LIST
.
add
(
OTHER_GROUP_LIST
.
get
(
0
).
getName
());
OTHER_GROUP_NAME_LIST
.
add
(
OTHER_GROUP_LIST
.
get
(
0
).
getName
());
}
}
@Autowired
@Resource
private
IEntrustService
entrustService
;
@Autowired
private
LmsUserGroupClient
lmsUserGroupClient
;
@Autowired
private
SysOrgClient
sysOrgClient
;
private
SysOrgClient
sysOrgClient
;
@Resource
@Autowired
private
SysUserClient
sysUserClient
;
private
SysUserClient
sysUserClient
;
@Resource
private
IEntrustService
entrustService
;
@Resource
private
LmsUserGroupClient
lmsUserGroupClient
;
@Autowired
@Override
private
SysRoleClient
sysRoleClient
;
@Autowired
private
ILmsMsgService
lmsMsgService
;
public
List
<
LmsUserGroup
>
getGroupList
(
Long
userId
)
{
public
List
<
LmsUserGroup
>
getGroupList
(
Long
userId
)
{
if
(
null
==
userId
)
{
if
(
null
==
userId
)
{
return
OTHER_GROUP_LIST
;
return
OTHER_GROUP_LIST
;
...
@@ -62,6 +56,7 @@ public class UserInfoServiceImpl {
...
@@ -62,6 +56,7 @@ public class UserInfoServiceImpl {
return
lmsUserGroupClient
.
getByUserId
(
userId
).
getData
();
return
lmsUserGroupClient
.
getByUserId
(
userId
).
getData
();
}
}
@Override
public
List
<
String
>
getGroupNameList
(
Long
userId
)
{
public
List
<
String
>
getGroupNameList
(
Long
userId
)
{
List
<
LmsUserGroup
>
userGroups
=
getGroupList
(
userId
);
List
<
LmsUserGroup
>
userGroups
=
getGroupList
(
userId
);
if
(
CollectionUtils
.
isEmpty
(
userGroups
))
{
if
(
CollectionUtils
.
isEmpty
(
userGroups
))
{
...
@@ -70,10 +65,12 @@ public class UserInfoServiceImpl {
...
@@ -70,10 +65,12 @@ public class UserInfoServiceImpl {
return
getGroupList
(
userId
).
stream
().
map
(
t
->
t
.
getName
()).
filter
(
t
->
StringUtils
.
isNotBlank
(
t
)).
collect
(
Collectors
.
toList
());
return
getGroupList
(
userId
).
stream
().
map
(
t
->
t
.
getName
()).
filter
(
t
->
StringUtils
.
isNotBlank
(
t
)).
collect
(
Collectors
.
toList
());
}
}
@Override
public
List
<
String
>
getCurGroupNameList
()
{
public
List
<
String
>
getCurGroupNameList
()
{
return
getGroupNameList
(
LoginHelper
.
getAccount
().
getUserId
());
return
getGroupNameList
(
LoginHelper
.
getAccount
().
getUserId
());
}
}
@Override
public
String
getCurGroupNames
()
{
public
String
getCurGroupNames
()
{
List
<
String
>
curGroupNameList
=
getCurGroupNameList
();
List
<
String
>
curGroupNameList
=
getCurGroupNameList
();
if
(
CollectionUtils
.
isEmpty
(
curGroupNameList
))
{
if
(
CollectionUtils
.
isEmpty
(
curGroupNameList
))
{
...
@@ -82,6 +79,7 @@ public class UserInfoServiceImpl {
...
@@ -82,6 +79,7 @@ public class UserInfoServiceImpl {
return
StringUtils
.
join
(
curGroupNameList
,
"-"
);
return
StringUtils
.
join
(
curGroupNameList
,
"-"
);
}
}
@Override
public
List
<
Long
>
getGroupUserIds
(
Long
userId
)
{
public
List
<
Long
>
getGroupUserIds
(
Long
userId
)
{
// 为空默认获取当前用户所有组
// 为空默认获取当前用户所有组
Account
account
=
LoginHelper
.
getAccount
();
Account
account
=
LoginHelper
.
getAccount
();
...
@@ -100,6 +98,7 @@ public class UserInfoServiceImpl {
...
@@ -100,6 +98,7 @@ public class UserInfoServiceImpl {
return
Stream
.
of
(
userIdStr
.
split
(
Symbol
.
COMMA
)).
map
(
Long:
:
valueOf
).
distinct
().
collect
(
Collectors
.
toList
());
return
Stream
.
of
(
userIdStr
.
split
(
Symbol
.
COMMA
)).
map
(
Long:
:
valueOf
).
distinct
().
collect
(
Collectors
.
toList
());
}
}
@Override
public
List
<
Long
>
getUserIdsByGroupName
(
String
groupName
)
{
public
List
<
Long
>
getUserIdsByGroupName
(
String
groupName
)
{
if
(
StringUtils
.
isBlank
(
groupName
))
{
if
(
StringUtils
.
isBlank
(
groupName
))
{
return
null
;
return
null
;
...
@@ -113,6 +112,7 @@ public class UserInfoServiceImpl {
...
@@ -113,6 +112,7 @@ public class UserInfoServiceImpl {
return
Stream
.
of
(
userIdStr
.
split
(
Symbol
.
COMMA
)).
map
(
Long:
:
valueOf
).
distinct
().
collect
(
Collectors
.
toList
());
return
Stream
.
of
(
userIdStr
.
split
(
Symbol
.
COMMA
)).
map
(
Long:
:
valueOf
).
distinct
().
collect
(
Collectors
.
toList
());
}
}
@Override
public
boolean
isGroupLeader
(
Long
entrustId
,
Account
account
)
{
public
boolean
isGroupLeader
(
Long
entrustId
,
Account
account
)
{
if
(
null
==
entrustId
)
{
if
(
null
==
entrustId
)
{
return
false
;
return
false
;
...
@@ -128,39 +128,47 @@ public class UserInfoServiceImpl {
...
@@ -128,39 +128,47 @@ public class UserInfoServiceImpl {
return
userGroups
.
stream
().
anyMatch
(
t
->
entrust
.
getTestSide
().
equals
(
t
.
getName
()));
return
userGroups
.
stream
().
anyMatch
(
t
->
entrust
.
getTestSide
().
equals
(
t
.
getName
()));
}
}
@Override
public
List
<
SysOrg
>
getUserOrgList
(
Account
account
)
{
public
List
<
SysOrg
>
getUserOrgList
(
Account
account
)
{
return
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
return
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
}
}
@Override
public
SysOrg
getUserOrg
(
Account
account
)
{
public
SysOrg
getUserOrg
(
Account
account
)
{
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
return
CollectionUtils
.
isNotEmpty
(
orgList
)
?
orgList
.
get
(
0
)
:
null
;
return
CollectionUtils
.
isNotEmpty
(
orgList
)
?
orgList
.
get
(
0
)
:
null
;
}
}
@Override
public
Long
getUserOrgId
(
Account
account
)
{
public
Long
getUserOrgId
(
Account
account
)
{
SysOrg
sysOrg
=
getUserOrg
(
account
);
SysOrg
sysOrg
=
getUserOrg
(
account
);
return
null
==
sysOrg
?
null
:
sysOrg
.
getId
();
return
null
==
sysOrg
?
null
:
sysOrg
.
getId
();
}
}
@Override
public
List
<
SysUser
>
getUsersByOrg
(
Long
orgId
)
{
public
List
<
SysUser
>
getUsersByOrg
(
Long
orgId
)
{
RestAssert
.
fail
(
null
==
orgId
,
"组织ID为空"
);
RestAssert
.
fail
(
null
==
orgId
,
"组织ID为空"
);
return
sysUserClient
.
getListByOrgId
(
orgId
,
""
).
getData
();
return
sysUserClient
.
getListByOrgId
(
orgId
,
""
).
getData
();
}
}
@Override
public
List
<
SysUser
>
getUsersByRoleName
(
String
roleName
)
{
public
List
<
SysUser
>
getUsersByRoleName
(
String
roleName
)
{
RestAssert
.
fail
(
StringUtils
.
isBlank
(
roleName
),
"角色为空"
);
RestAssert
.
fail
(
StringUtils
.
isBlank
(
roleName
),
"角色为空"
);
return
sysUserClient
.
getListByRoleName
(
roleName
).
serviceData
();
return
sysUserClient
.
getListByRoleName
(
roleName
).
serviceData
();
}
}
@Override
public
SysUser
getUserById
(
Long
userId
)
{
public
SysUser
getUserById
(
Long
userId
)
{
return
sysUserClient
.
get
(
userId
).
serviceData
();
return
sysUserClient
.
get
(
userId
).
serviceData
();
}
}
@Override
public
SysUser
getCurUser
()
{
public
SysUser
getCurUser
()
{
return
getUserById
(
LoginHelper
.
getAccount
().
getUserId
());
return
getUserById
(
LoginHelper
.
getAccount
().
getUserId
());
}
}
@Override
public
String
getPeriod
(
SysOrg
sysOrg
)
{
public
String
getPeriod
(
SysOrg
sysOrg
)
{
if
(
null
==
sysOrg
)
{
if
(
null
==
sysOrg
)
{
return
null
;
return
null
;
...
@@ -179,6 +187,7 @@ public class UserInfoServiceImpl {
...
@@ -179,6 +187,7 @@ public class UserInfoServiceImpl {
return
null
;
return
null
;
}
}
@Override
public
String
getSysOrgName
(
SysOrg
sysOrg
)
{
public
String
getSysOrgName
(
SysOrg
sysOrg
)
{
if
(
null
==
sysOrg
)
{
if
(
null
==
sysOrg
)
{
return
""
;
return
""
;
...
@@ -189,6 +198,7 @@ public class UserInfoServiceImpl {
...
@@ -189,6 +198,7 @@ public class UserInfoServiceImpl {
return
""
;
return
""
;
}
}
@Override
public
List
<
String
>
getUserOrgNames
(
Account
account
)
{
public
List
<
String
>
getUserOrgNames
(
Account
account
)
{
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListRecursiveByUserId
(
account
.
getUserId
()).
getData
();
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListRecursiveByUserId
(
account
.
getUserId
()).
getData
();
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
...
@@ -205,6 +215,7 @@ public class UserInfoServiceImpl {
...
@@ -205,6 +215,7 @@ public class UserInfoServiceImpl {
return
new
ArrayList
<>(
nameSet
);
return
new
ArrayList
<>(
nameSet
);
}
}
@Override
public
String
getUserPeriod
(
Long
userId
)
{
public
String
getUserPeriod
(
Long
userId
)
{
if
(
null
==
userId
)
{
if
(
null
==
userId
)
{
return
null
;
return
null
;
...
@@ -212,6 +223,7 @@ public class UserInfoServiceImpl {
...
@@ -212,6 +223,7 @@ public class UserInfoServiceImpl {
return
getUserPeriod
(
new
Account
().
setUserId
(
userId
));
return
getUserPeriod
(
new
Account
().
setUserId
(
userId
));
}
}
@Override
public
String
getUserPeriod
(
Account
account
)
{
public
String
getUserPeriod
(
Account
account
)
{
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
List
<
SysOrg
>
orgList
=
sysOrgClient
.
getListByUserId
(
account
.
getUserId
()).
getData
();
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
if
(
CollectionUtils
.
isEmpty
(
orgList
))
{
...
@@ -226,6 +238,7 @@ public class UserInfoServiceImpl {
...
@@ -226,6 +238,7 @@ public class UserInfoServiceImpl {
return
null
;
return
null
;
}
}
@Override
public
String
getOrgNameByUserPeriod
(
Account
account
,
String
...
periods
)
{
public
String
getOrgNameByUserPeriod
(
Account
account
,
String
...
periods
)
{
List
<
String
>
userOrgNameList
=
getUserOrgNames
(
account
);
List
<
String
>
userOrgNameList
=
getUserOrgNames
(
account
);
if
(
CollectionUtils
.
isEmpty
(
userOrgNameList
))
{
if
(
CollectionUtils
.
isEmpty
(
userOrgNameList
))
{
...
...
src/main/resources/mapper/hmhj/EntrustSampleMapper.xml
View file @
4de59f48
...
@@ -54,7 +54,13 @@
...
@@ -54,7 +54,13 @@
</if>
</if>
<if
test=
"null != vo.code"
>
<if
test=
"null != vo.code"
>
AND s.code LIKE CONCAT('%',#{vo.code},'%')
AND (
s.code LIKE CONCAT('%',#{vo.code},'%')
or
s.first_code like CONCAT('%',#{vo.code},'%')
or
s.third_code like CONCAT('%',#{vo.code},'%')
)
</if>
</if>
<if
test=
"null != vo.name"
>
<if
test=
"null != vo.name"
>
...
...
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