9/6 优化

workplace
wangwei 10 months ago
parent 06bd085c0c
commit 7e698fc720

@ -106,6 +106,14 @@ public class SysWorkplaceController extends BaseController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/udiwms/sysWorkplace/page/filterOptimize") @GetMapping("/udiwms/sysWorkplace/page/filterOptimize")
public BaseResponse filterOptimize(SysWorkplaceRequest request) { public BaseResponse filterOptimize(SysWorkplaceRequest request) {
if(request != null && request.getUserIdFlag()){
Long userId = getUserId();
List<UserWorkResponse> userWorkPlaceList = basicCollectUserService.getUserWorkPlaceList(userId);
List<Long> collect = userWorkPlaceList.stream().map(UserWorkResponse::getWorkplaceId).collect(Collectors.toList());
if (CollUtil.isNotEmpty(collect)){
request.setWorkPlaceIds(collect);
}
}
List<SysWorkplaceResponse> page = sysWorkplaceService.filterList(request); List<SysWorkplaceResponse> page = sysWorkplaceService.filterList(request);
List<DictDto> reList = page.stream().map(s -> { List<DictDto> reList = page.stream().map(s -> {
DictDto dictDto = new DictDto(s.getWorkplaceId() + "", s.getWorkplaceName()); DictDto dictDto = new DictDto(s.getWorkplaceId() + "", s.getWorkplaceName());

@ -24,8 +24,11 @@ public class SysWorkplaceRequest extends ListPageRequest {
private List<Long> ids; private List<Long> ids;
private List<Long> workPlaceIds;
private String chargeUser; private String chargeUser;
private Boolean userIdFlag;
} }

@ -288,8 +288,8 @@ public class UdiContrastService {
BeanUtils.copyProperties(thrProductsEntity, udiProductEntity); BeanUtils.copyProperties(thrProductsEntity, udiProductEntity);
udiProductEntity.setId(IdUtil.getSnowflakeNextId()); udiProductEntity.setId(IdUtil.getSnowflakeNextId());
udiProductEntity.setNameCode(basicInsDrug.getTradeName()); udiProductEntity.setNameCode(basicInsDrug.getTradeName());
udiProductEntity.setBzgg(basicInsDrug.getPackagingSpec() != null ? basicInsDrug.getPackagingSpec() :basicInsDrugEntity.getPackagingSpec()); udiProductEntity.setPrepnSpec(basicInsDrug.getPackagingSpec() != null ? basicInsDrug.getPackagingSpec() :basicInsDrugEntity.getPackagingSpec());
udiProductEntity.setPrepnSpec(basicInsDrug.getPrepnSpec() != null ? basicInsDrug.getPrepnSpec() :basicInsDrugEntity.getPrepnSpec()); // udiProductEntity.setPrepnSpec(basicInsDrug.getPrepnSpec() != null ? basicInsDrug.getPrepnSpec() :basicInsDrugEntity.getPrepnSpec());
udiProductEntity.setZczbhhzbapzbh(basicInsDrug.getApprovalNum() != null ? basicInsDrug.getApprovalNum() :basicInsDrugEntity.getApprovalNum()); udiProductEntity.setZczbhhzbapzbh(basicInsDrug.getApprovalNum() != null ? basicInsDrug.getApprovalNum() :basicInsDrugEntity.getApprovalNum());
udiProductEntity.setCpmctymc(thrProductsEntity.getName()); udiProductEntity.setCpmctymc(thrProductsEntity.getName());
if (basicInsDrugEntity.getInsuranceDrugClass() != null){ if (basicInsDrugEntity.getInsuranceDrugClass() != null){

@ -36,6 +36,12 @@
<if test=" request.code != null and request.code != ''"> <if test=" request.code != null and request.code != ''">
AND scps.code = #{request.code} AND scps.code = #{request.code}
</if> </if>
<if test=" request.workPlaceIds != null and request.workPlaceIds.size > 0">
AND sw.workplaceId IN
<foreach collection="request.workPlaceIds" item="workplaceId" index="index" open="(" close=")" separator=",">
#{workplaceId}
</foreach>
</if>
</where> </where>
ORDER BY sw.workplaceId ORDER BY sw.workplaceId
</select> </select>

@ -124,8 +124,15 @@
<if test="manufactory != '' and manufactory != null"> <if test="manufactory != '' and manufactory != null">
AND manufactory LIKE concat('%', #{manufactory}, '%') AND manufactory LIKE concat('%', #{manufactory}, '%')
</if> </if>
<!-- <if test="spec != '' and spec != null">-->
<!-- AND spec LIKE concat('%', #{spec}, '%')-->
<!-- </if>-->
<if test="spec != '' and spec != null"> <if test="spec != '' and spec != null">
AND spec LIKE concat('%', #{spec}, '%') AND (
spec like concat('%', #{spec}, '%')
or prepnSpec like concat('%', #{spec}, '%')
or prepnUnit like concat('%', #{spec}, '%')
)
</if> </if>
<if test="unionCode != '' and unionCode != null"> <if test="unionCode != '' and unionCode != null">
or code LIKE concat('%', #{unionCode}, '%') or code LIKE concat('%', #{unionCode}, '%')

Loading…
Cancel
Save