This commit is contained in:
parent
aaf3000c70
commit
e564497ad4
|
|
@ -205,6 +205,11 @@ public class PartLeaseServiceImpl implements PartLeaseService {
|
|||
return AjaxResult.error("配件领用审核信息不能为空");
|
||||
}
|
||||
String userId = SecurityUtils.getUserId().toString();
|
||||
String createBy = null;
|
||||
PartLeaseInfo info = partLeaseMapper.selectPartLeaseInfoById(partLeaseInfo.getTaskId());
|
||||
if (info != null) {
|
||||
createBy = info.getCreator();
|
||||
}
|
||||
try {
|
||||
// 审核通过
|
||||
if (partLeaseInfo.getTaskStatus() == 1) {
|
||||
|
|
@ -222,7 +227,7 @@ public class PartLeaseServiceImpl implements PartLeaseService {
|
|||
}
|
||||
// 增加个人库存
|
||||
// 现根据人员以及配件id去查询,存在则更新,不存在则新增
|
||||
partLeaseDetails.setCreateBy(userId);
|
||||
partLeaseDetails.setCreateBy(StringUtils.isBlank(createBy) ? null : createBy);
|
||||
partLeaseDetails.setCreateTime(DateUtils.getNowDate());
|
||||
List<PartLeaseDetails> list = partLeaseMapper.selectPerson(partLeaseDetails);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,15 @@
|
|||
<mapper namespace="com.bonus.material.part.mapper.PartLeaseMapper">
|
||||
|
||||
<select id="selectPartLeaseInfoById" resultType="com.bonus.material.part.domain.PartLeaseInfo">
|
||||
SELECT
|
||||
task_id as taskId,
|
||||
code as code,
|
||||
month_order as monthOrder,
|
||||
creator as creator
|
||||
FROM
|
||||
pa_collar_apply
|
||||
WHERE
|
||||
task_id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectPartLeaseInfoList" resultType="com.bonus.material.part.domain.PartLeaseInfo">
|
||||
|
|
@ -30,7 +39,6 @@
|
|||
LEFT JOIN ma_part_type mp ON p2.part_id = mp.pa_id and mp.del_flag = '0'
|
||||
LEFT JOIN sys_user su on p2.auditor = su.user_id
|
||||
LEFT JOIN sys_user su1 on p1.creator = su1.user_id
|
||||
AND mp.del_flag = '0'
|
||||
<where>
|
||||
<if test="taskStatus != null">
|
||||
and p1.task_status = #{taskStatus}
|
||||
|
|
@ -270,7 +278,9 @@
|
|||
part_num = part_num + #{preNum}
|
||||
where
|
||||
part_id = #{partId}
|
||||
and creator = #{createBy}
|
||||
<if test="createBy != null">
|
||||
and creator = #{createBy}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<update id="updateTaskStatus">
|
||||
|
|
|
|||
Loading…
Reference in New Issue