This commit is contained in:
parent
e2fd903141
commit
1da5ba205f
|
|
@ -302,17 +302,21 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
*/
|
||||
@Override
|
||||
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();
|
||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||
List<Long> typeIdList = backApplyInfoMapper.selectTypeIdList(userId);
|
||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
backApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||
}
|
||||
List<BackApplyInfo> list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||
// 如果列表为空,直接返回空列表
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
list = backApplyInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||
for (BackApplyInfo applyInfo : list) {
|
||||
if (!CollectionUtils.isEmpty(typeIdList)) {
|
||||
list = list.stream()
|
||||
|
|
@ -323,6 +327,9 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
applyInfo.setBackSignUrl("data:image/png;base64," + applyInfo.getBackSignUrl());
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(infos)) {
|
||||
list.addAll(infos);
|
||||
}
|
||||
// 提取关键字
|
||||
String keyWord = backApplyInfo.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ public class LeaseApplyRequestVo extends BaseEntity {
|
|||
*/
|
||||
private List<LeaseOutSign> kgSignList;
|
||||
|
||||
/**
|
||||
* 领料出库签名集合
|
||||
*/
|
||||
private List<LeaseOutSign> outSignList;
|
||||
|
||||
private int statusFlag;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,4 +141,11 @@ public interface LeaseApplyInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
// 根据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;
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ public class LossAssessmentServiceImpl implements LossAssessmentService {
|
|||
// }
|
||||
// }
|
||||
//2、修改任务状态
|
||||
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_LOSS_ASSESSMENT_COMPLETE.getStatus());
|
||||
mapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());
|
||||
//将数据status状态都置为1
|
||||
mapper.updateStatus(task.getTaskId());
|
||||
//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="estimateLeaseTime != null "> and lai.estimate_lease_time = #{estimateLeaseTime}</if>
|
||||
<if test="costBearingParty != null and costBearingParty != ''"> and lai.cost_bearing_party = #{costBearingParty}</if>
|
||||
and tt.task_type = '2'
|
||||
GROUP BY lai.id
|
||||
ORDER BY tt.task_status,tt.create_time desc
|
||||
</select>
|
||||
|
|
@ -540,7 +539,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
lai.task_id AS taskId,
|
||||
tt.task_type AS taskType,
|
||||
bp.external_id AS externalId,
|
||||
bu.bzz_idcard AS idCard
|
||||
bu.bzz_idcard AS idCard,
|
||||
mt4.type_id AS firstId
|
||||
FROM
|
||||
lease_out_details lod
|
||||
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'
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
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
|
||||
lod.lease_sign_id is null
|
||||
<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}
|
||||
</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
|
||||
lease_out_details
|
||||
|
|
|
|||
|
|
@ -133,26 +133,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<select id="getRepairDetailsWhichNotSent" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||
select rad.id as id,
|
||||
rad.ma_id as maId,
|
||||
rad.type_id as typeId,
|
||||
rad.repair_num as repairNum,
|
||||
rad.this_repaired_num,rad.this_scrap_num,
|
||||
rad.repaired_num as repairedNum,
|
||||
rad.this_repaired_num as thisRepairedNum,
|
||||
rad.scrap_num as scrapNum,
|
||||
rad.this_scrap_num as thisScrapNum,
|
||||
rad.company_id as companyId,
|
||||
tt.task_id as taskId,
|
||||
tt.code as taskCode,
|
||||
rad.back_id as backId,
|
||||
rad.status as status,
|
||||
rad.level as level,
|
||||
tt.code as taskCode
|
||||
from repair_apply_details rad
|
||||
left join tm_task tt on rad.task_id = tt.task_id
|
||||
where rad.task_id = #{taskId}
|
||||
and rad.is_ds=0
|
||||
SELECT
|
||||
rad.id AS id,
|
||||
rad.ma_id AS maId,
|
||||
rad.type_id AS typeId,
|
||||
IFNULL( rad.repair_num, 0 ) AS repairNum,
|
||||
IFNULL( rad.repaired_num, 0 ) AS repairedNum,
|
||||
IFNULL( rad.this_repaired_num, 0 ) AS thisRepairedNum,
|
||||
IFNULL( rad.scrap_num, 0 ) AS scrapNum,
|
||||
IFNULL( rad.this_scrap_num, 0 ) AS thisScrapNum,
|
||||
rad.company_id AS companyId,
|
||||
tt.task_id AS taskId,
|
||||
tt.CODE AS taskCode,
|
||||
rad.back_id AS backId,
|
||||
rad.STATUS AS STATUS,
|
||||
rad.LEVEL AS LEVEL,
|
||||
tt.CODE AS taskCode
|
||||
FROM
|
||||
repair_apply_details rad
|
||||
LEFT JOIN tm_task tt ON rad.task_id = tt.task_id
|
||||
WHERE
|
||||
rad.task_id = #{taskId}
|
||||
AND rad.is_ds =0
|
||||
<!-- and rad.status = '0'-->
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@
|
|||
bai.CODE AS backCode,
|
||||
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
||||
rd.level as level,
|
||||
mt4.type_id as typeId
|
||||
mt4.type_id as firstId
|
||||
FROM
|
||||
repair_apply_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue