This commit is contained in:
parent
1da5ba205f
commit
16e8fe193a
|
|
@ -321,6 +321,6 @@ public class LeaseApplyInfo extends BaseEntity{
|
||||||
|
|
||||||
private List<Long> typeIdList;
|
private List<Long> typeIdList;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id结果集")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -275,5 +275,5 @@ public class LeasePublishInfo extends BaseEntity{
|
||||||
private List<Long> typeIdList;
|
private List<Long> typeIdList;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,6 @@ public class RepairInputDetails extends BaseEntity {
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,6 @@ public class BackApplyInfo implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer isSign;
|
private Integer isSign;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id集合")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -319,8 +319,23 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||||
for (BackApplyInfo applyInfo : list) {
|
for (BackApplyInfo applyInfo : list) {
|
||||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||||
|
// 使用流过滤符合条件的元素
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> typeIdList.contains(item.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(applyInfo.getBackSignUrl())) {
|
if (StringUtils.isNotBlank(applyInfo.getBackSignUrl())) {
|
||||||
|
|
|
||||||
|
|
@ -147,5 +147,5 @@ public interface LeaseApplyInfoMapper {
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<LeaseOutSign> selectOutList(Long id);
|
List<LeaseOutSign> selectOutList(@Param("id") Long id, @Param("leaseSignId") String leaseSignId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据id查询领料出库情况,查询出库人电子签名详情
|
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||||
List<LeaseOutSign> signList = leaseApplyInfoMapper.selectOutList(id);
|
List<LeaseOutSign> signList = leaseApplyInfoMapper.selectOutList(id, null);
|
||||||
if (!CollectionUtils.isEmpty(signList)) {
|
if (!CollectionUtils.isEmpty(signList)) {
|
||||||
for (LeaseOutSign applyInfo : signList) {
|
for (LeaseOutSign applyInfo : signList) {
|
||||||
if (StringUtils.isNotBlank(applyInfo.getOutSignUrl())) {
|
if (StringUtils.isNotBlank(applyInfo.getOutSignUrl())) {
|
||||||
|
|
@ -276,6 +276,17 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||||
|
List<LeaseOutSign> signList = leaseApplyInfoMapper.selectOutList(bean.getId(), bean.getLeaseSignId());
|
||||||
|
if (!CollectionUtils.isEmpty(signList)) {
|
||||||
|
for (LeaseOutSign applyInfo : signList) {
|
||||||
|
if (StringUtils.isNotBlank(applyInfo.getOutSignUrl())) {
|
||||||
|
applyInfo.setOutSignUrl("data:image/png;base64," + applyInfo.getOutSignUrl());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
leaseApplyRequestVo.setOutSignList(signList);
|
||||||
|
}
|
||||||
|
|
||||||
return leaseApplyRequestVo;
|
return leaseApplyRequestVo;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 记录异常日志
|
// 记录异常日志
|
||||||
|
|
@ -319,8 +330,23 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (!CollectionUtils.isEmpty(sortedList)) {
|
if (!CollectionUtils.isEmpty(sortedList)) {
|
||||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||||
|
// 使用流过滤符合条件的元素
|
||||||
sortedList = sortedList.stream()
|
sortedList = sortedList.stream()
|
||||||
.filter(item -> typeIdList.contains(item.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
String keyWord = leaseApplyInfo.getKeyWord();
|
String keyWord = leaseApplyInfo.getKeyWord();
|
||||||
|
|
|
||||||
|
|
@ -760,8 +760,23 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
List<LeasePublishInfo> list = mapper.getPublishList(leaseApplyInfo);
|
List<LeasePublishInfo> list = mapper.getPublishList(leaseApplyInfo);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||||
|
// 使用流过滤符合条件的元素
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> typeIdList.contains(item.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
String keyWord = leaseApplyInfo.getKeyWord();
|
String keyWord = leaseApplyInfo.getKeyWord();
|
||||||
|
|
|
||||||
|
|
@ -188,5 +188,5 @@ public class RepairTask {
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,5 +138,5 @@ public class ScrapApplyDetailsVO {
|
||||||
private String dispositionFileName;
|
private String dispositionFileName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "一级类型id")
|
@ApiModelProperty(value = "一级类型id")
|
||||||
private Long firstId;
|
private String firstId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,23 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
||||||
List<ScrapApplyDetailsVO> repairQuestList = repairAuditDetailsMapper.selectRepairQuestList(repairAuditDetails);
|
List<ScrapApplyDetailsVO> repairQuestList = repairAuditDetailsMapper.selectRepairQuestList(repairAuditDetails);
|
||||||
if (!CollectionUtil.isNotEmpty(repairQuestList)) {
|
if (!CollectionUtil.isNotEmpty(repairQuestList)) {
|
||||||
if (CollectionUtil.isNotEmpty(typeIdList)) {
|
if (CollectionUtil.isNotEmpty(typeIdList)) {
|
||||||
|
// 使用流过滤符合条件的元素
|
||||||
repairQuestList = repairQuestList.stream()
|
repairQuestList = repairQuestList.stream()
|
||||||
.filter(item -> item.getFirstId() != null && typeIdList.contains(item.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@ package com.bonus.material.repair.service.impl;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
|
@ -134,7 +136,21 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
if (CollectionUtils.isNotEmpty(typeIdList)) {
|
if (CollectionUtils.isNotEmpty(typeIdList)) {
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(inputDetails -> typeIdList.contains(inputDetails.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,23 @@ public class RepairServiceImpl implements RepairService {
|
||||||
List<RepairTask> list = repairMapper.getRepairTaskList(bean);
|
List<RepairTask> list = repairMapper.getRepairTaskList(bean);
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
if (CollectionUtil.isNotEmpty(typeIdList)) {
|
if (CollectionUtil.isNotEmpty(typeIdList)) {
|
||||||
|
// 使用流过滤符合条件的元素
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
.filter(item -> typeIdList.contains(item.getFirstId()))
|
.filter(item -> {
|
||||||
|
String firstIdStr = item.getFirstId();
|
||||||
|
if (firstIdStr == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 将逗号分隔的字符串转为集合
|
||||||
|
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(s -> !s.isEmpty())
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
|
// 判断两个集合是否有交集
|
||||||
|
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||||
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
String keyWord = bean.getKeyWord();
|
String keyWord = bean.getKeyWord();
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) AS typeName,
|
GROUP_CONCAT(DISTINCT mt2.type_name) AS typeName,
|
||||||
bai.`status` AS status,
|
bai.`status` AS status,
|
||||||
bai.print_status as printStatus,
|
bai.print_status as printStatus,
|
||||||
mt4.type_id as firstId
|
GROUP_CONCAT(DISTINCT mt4.type_id) as firstId
|
||||||
FROM
|
FROM
|
||||||
back_apply_info bai
|
back_apply_info bai
|
||||||
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bp.contract_part as contractPart,
|
bp.contract_part as contractPart,
|
||||||
sd.dept_name as impUnitName,
|
sd.dept_name as impUnitName,
|
||||||
tt.task_type as taskType,
|
tt.task_type as taskType,
|
||||||
mt3.type_id as firstId
|
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
||||||
from
|
from
|
||||||
lease_apply_info lai
|
lease_apply_info lai
|
||||||
left join tm_task tt on lai.task_id = tt.task_id
|
left join tm_task tt on lai.task_id = tt.task_id
|
||||||
|
|
@ -446,7 +446,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join ma_type mt1 on lod.type_id = mt1.type_id
|
left join ma_type mt1 on lod.type_id = mt1.type_id
|
||||||
left join ma_type mt2 on mt1.parent_id = mt2.type_id
|
left join ma_type mt2 on mt1.parent_id = mt2.type_id
|
||||||
left join sys_user su on lod.confirm_person = su.user_id
|
left join sys_user su on lod.confirm_person = su.user_id
|
||||||
where lod.parent_id = 353
|
where lod.parent_id = #{id}
|
||||||
and lod.out_num > 0
|
and lod.out_num > 0
|
||||||
and lod.lease_sign_id is not null
|
and lod.lease_sign_id is not null
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
|
@ -510,7 +510,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where lod.parent_id = #{id}
|
where lod.parent_id = #{id}
|
||||||
and lod.out_num > 0
|
and lod.out_num > 0
|
||||||
and lod.lease_sign_id = #{leaseSignId}
|
and lod.lease_sign_id = #{leaseSignId}
|
||||||
|
ORDER BY lod.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getLeaseConfirmSign" resultType="com.bonus.common.biz.domain.lease.LeaseConfirmSign">
|
<select id="getLeaseConfirmSign" resultType="com.bonus.common.biz.domain.lease.LeaseConfirmSign">
|
||||||
select
|
select
|
||||||
|
|
@ -585,6 +585,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
lsi.lease_sign_url IS NOT NULL
|
lsi.lease_sign_url IS NOT NULL
|
||||||
and lod.parent_id = #{id}
|
and lod.parent_id = #{id}
|
||||||
|
and lsi.id = #{leaseSignId}
|
||||||
GROUP BY
|
GROUP BY
|
||||||
lod.lease_sign_id
|
lod.lease_sign_id
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -799,7 +799,7 @@
|
||||||
GROUP_CONCAT(DISTINCT mt1.type_name) AS maTypeNames,
|
GROUP_CONCAT(DISTINCT mt1.type_name) AS maTypeNames,
|
||||||
bp.contract_part as contractPart,
|
bp.contract_part as contractPart,
|
||||||
sd.dept_name as impUnitName,
|
sd.dept_name as impUnitName,
|
||||||
mt3.type_id as firstId
|
GROUP_CONCAT(DISTINCT mt3.type_id) as firstId
|
||||||
from
|
from
|
||||||
lease_apply_info lai
|
lease_apply_info lai
|
||||||
left join tm_task tt on lai.task_id = tt.task_id
|
left join tm_task tt on lai.task_id = tt.task_id
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
tk.create_time createTime,
|
tk.create_time createTime,
|
||||||
tk.remark,
|
tk.remark,
|
||||||
tk.CODE repairNum,
|
tk.CODE repairNum,
|
||||||
mt4.type_id as firstId
|
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId
|
||||||
FROM
|
FROM
|
||||||
tm_task tk
|
tm_task tk
|
||||||
LEFT JOIN tm_task tt ON tk.pre_task_id = tt.task_id
|
LEFT JOIN tm_task tt ON tk.pre_task_id = tt.task_id
|
||||||
|
|
@ -371,6 +371,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="appTaskStatus != null and appTaskStatus == 11">
|
<if test="appTaskStatus != null and appTaskStatus == 11">
|
||||||
and (tk.task_status = 11 or tk.task_status = 12)
|
and (tk.task_status = 11 or tk.task_status = 12)
|
||||||
</if>
|
</if>
|
||||||
|
GROUP BY tk.CODE
|
||||||
order by tk.create_time desc
|
order by tk.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
tt.CODE AS inputCode,
|
tt.CODE AS inputCode,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
|
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
|
||||||
tta.agreement_id as agreementId,
|
tta.agreement_id as agreementId,
|
||||||
mt4.type_id as firstId
|
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId
|
||||||
FROM
|
FROM
|
||||||
repair_input_details rd
|
repair_input_details rd
|
||||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@
|
||||||
bai.CODE AS backCode,
|
bai.CODE AS backCode,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
||||||
rd.level as level,
|
rd.level as level,
|
||||||
mt4.type_id as firstId
|
GROUP_CONCAT(DISTINCT mt4.type_id) as firstId
|
||||||
FROM
|
FROM
|
||||||
repair_apply_details rd
|
repair_apply_details rd
|
||||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue