This commit is contained in:
parent
e2fd903141
commit
1da5ba205f
|
|
@ -302,17 +302,21 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<BackApplyInfo> selectBackApplyInfoList(BackApplyInfo backApplyInfo) {
|
public List<BackApplyInfo> selectBackApplyInfoList(BackApplyInfo backApplyInfo) {
|
||||||
|
List<BackApplyInfo> list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||||
|
// 如果列表为空,直接返回空列表
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
// 将list集合中typeName为空的数据过滤出来
|
||||||
|
List<BackApplyInfo> infos = list.stream().filter(item -> StringUtils.isBlank(item.getTypeName()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||||
List<Long> typeIdList = backApplyInfoMapper.selectTypeIdList(userId);
|
List<Long> typeIdList = backApplyInfoMapper.selectTypeIdList(userId);
|
||||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||||
backApplyInfo.setUserId(userId == 0 ? null : userId);
|
backApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||||
}
|
}
|
||||||
List<BackApplyInfo> list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||||
// 如果列表为空,直接返回空列表
|
|
||||||
if (CollectionUtils.isEmpty(list)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
for (BackApplyInfo applyInfo : list) {
|
for (BackApplyInfo applyInfo : list) {
|
||||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||||
list = list.stream()
|
list = list.stream()
|
||||||
|
|
@ -323,6 +327,9 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
||||||
applyInfo.setBackSignUrl("data:image/png;base64," + applyInfo.getBackSignUrl());
|
applyInfo.setBackSignUrl("data:image/png;base64," + applyInfo.getBackSignUrl());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(infos)) {
|
||||||
|
list.addAll(infos);
|
||||||
|
}
|
||||||
// 提取关键字
|
// 提取关键字
|
||||||
String keyWord = backApplyInfo.getKeyWord();
|
String keyWord = backApplyInfo.getKeyWord();
|
||||||
// 如果关键字不为空,进行过滤
|
// 如果关键字不为空,进行过滤
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@ public class LeaseApplyRequestVo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private List<LeaseOutSign> kgSignList;
|
private List<LeaseOutSign> kgSignList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领料出库签名集合
|
||||||
|
*/
|
||||||
|
private List<LeaseOutSign> outSignList;
|
||||||
|
|
||||||
private int statusFlag;
|
private int statusFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -141,4 +141,11 @@ public interface LeaseApplyInfoMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Long> selectTypeIdList(Long userId);
|
List<Long> selectTypeIdList(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询领用单的领用单出库签名
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LeaseOutSign> selectOutList(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,17 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
||||||
leaseApplyRequestVo.setKgSignList(outSignList);
|
leaseApplyRequestVo.setKgSignList(outSignList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据id查询领料出库情况,查询出库人电子签名详情
|
||||||
|
List<LeaseOutSign> signList = leaseApplyInfoMapper.selectOutList(id);
|
||||||
|
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;
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//2、修改任务状态
|
//2、修改任务状态
|
||||||
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());
|
||||||
//将数据status状态都置为1
|
//将数据status状态都置为1
|
||||||
mapper.updateStatus(task.getTaskId());
|
mapper.updateStatus(task.getTaskId());
|
||||||
//3、重新生成维修数据
|
//3、重新生成维修数据
|
||||||
|
|
|
||||||
|
|
@ -420,7 +420,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
<if test="leaseType != null and leaseType != ''"> and lai.lease_type = #{leaseType}</if>
|
||||||
<if test="estimateLeaseTime != null "> and lai.estimate_lease_time = #{estimateLeaseTime}</if>
|
<if test="estimateLeaseTime != null "> and lai.estimate_lease_time = #{estimateLeaseTime}</if>
|
||||||
<if test="costBearingParty != null and costBearingParty != ''"> and lai.cost_bearing_party = #{costBearingParty}</if>
|
<if test="costBearingParty != null and costBearingParty != ''"> and lai.cost_bearing_party = #{costBearingParty}</if>
|
||||||
and tt.task_type = '2'
|
|
||||||
GROUP BY lai.id
|
GROUP BY lai.id
|
||||||
ORDER BY tt.task_status,tt.create_time desc
|
ORDER BY tt.task_status,tt.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -540,7 +539,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
lai.task_id AS taskId,
|
lai.task_id AS taskId,
|
||||||
tt.task_type AS taskType,
|
tt.task_type AS taskType,
|
||||||
bp.external_id AS externalId,
|
bp.external_id AS externalId,
|
||||||
bu.bzz_idcard AS idCard
|
bu.bzz_idcard AS idCard,
|
||||||
|
mt4.type_id AS firstId
|
||||||
FROM
|
FROM
|
||||||
lease_out_details lod
|
lease_out_details lod
|
||||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
||||||
|
|
@ -553,6 +553,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND mt.del_flag = '0'
|
AND mt.del_flag = '0'
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
AND mt1.del_flag = '0'
|
AND mt1.del_flag = '0'
|
||||||
|
LEFT JOIN ma_type mt3 ON mt1.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||||
|
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||||
WHERE
|
WHERE
|
||||||
lod.lease_sign_id is null
|
lod.lease_sign_id is null
|
||||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
|
|
@ -573,6 +575,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
user_id = #{userId}
|
user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOutList" resultType="com.bonus.common.biz.domain.lease.LeaseOutSign">
|
||||||
|
SELECT
|
||||||
|
lsi.lease_sign_type as outSignType,
|
||||||
|
lsi.lease_sign_url as outSignUrl
|
||||||
|
FROM
|
||||||
|
lease_out_details lod
|
||||||
|
LEFT JOIN lease_sign_info lsi ON lod.lease_sign_id = lsi.id
|
||||||
|
WHERE
|
||||||
|
lsi.lease_sign_url IS NOT NULL
|
||||||
|
and lod.parent_id = #{id}
|
||||||
|
GROUP BY
|
||||||
|
lod.lease_sign_id
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="confirmLeaseTask">
|
<update id="confirmLeaseTask">
|
||||||
update
|
update
|
||||||
lease_out_details
|
lease_out_details
|
||||||
|
|
|
||||||
|
|
@ -133,26 +133,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="getRepairDetailsWhichNotSent" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
<select id="getRepairDetailsWhichNotSent" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||||
select rad.id as id,
|
SELECT
|
||||||
rad.ma_id as maId,
|
rad.id AS id,
|
||||||
rad.type_id as typeId,
|
rad.ma_id AS maId,
|
||||||
rad.repair_num as repairNum,
|
rad.type_id AS typeId,
|
||||||
rad.this_repaired_num,rad.this_scrap_num,
|
IFNULL( rad.repair_num, 0 ) AS repairNum,
|
||||||
rad.repaired_num as repairedNum,
|
IFNULL( rad.repaired_num, 0 ) AS repairedNum,
|
||||||
rad.this_repaired_num as thisRepairedNum,
|
IFNULL( rad.this_repaired_num, 0 ) AS thisRepairedNum,
|
||||||
rad.scrap_num as scrapNum,
|
IFNULL( rad.scrap_num, 0 ) AS scrapNum,
|
||||||
rad.this_scrap_num as thisScrapNum,
|
IFNULL( rad.this_scrap_num, 0 ) AS thisScrapNum,
|
||||||
rad.company_id as companyId,
|
rad.company_id AS companyId,
|
||||||
tt.task_id as taskId,
|
tt.task_id AS taskId,
|
||||||
tt.code as taskCode,
|
tt.CODE AS taskCode,
|
||||||
rad.back_id as backId,
|
rad.back_id AS backId,
|
||||||
rad.status as status,
|
rad.STATUS AS STATUS,
|
||||||
rad.level as level,
|
rad.LEVEL AS LEVEL,
|
||||||
tt.code as taskCode
|
tt.CODE AS taskCode
|
||||||
from repair_apply_details rad
|
FROM
|
||||||
left join tm_task tt on rad.task_id = tt.task_id
|
repair_apply_details rad
|
||||||
where rad.task_id = #{taskId}
|
LEFT JOIN tm_task tt ON rad.task_id = tt.task_id
|
||||||
and rad.is_ds=0
|
WHERE
|
||||||
|
rad.task_id = #{taskId}
|
||||||
|
AND rad.is_ds =0
|
||||||
<!-- and rad.status = '0'-->
|
<!-- and rad.status = '0'-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 typeId
|
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