维修驳回优化
This commit is contained in:
parent
0467712248
commit
af7f799433
|
|
@ -85,4 +85,7 @@ public class RepairApplyDetails extends BaseEntity {
|
|||
@Excel(name = "维修人")
|
||||
@ApiModelProperty(value = "维修人")
|
||||
private String repairer;
|
||||
|
||||
@ApiModelProperty(value = "前任务ID")
|
||||
private Long preTaskId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,4 +137,7 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
|
||||
@ApiModelProperty(value = "app维修审核状态,10 进行中 11已审核(包含通过和驳回)")
|
||||
private Integer appTaskStatus;
|
||||
|
||||
@ApiModelProperty(value = "维修拆分层级")
|
||||
private String level;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -546,8 +546,10 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
TmTask preTmTaskInfo = taskMapper.selectTmTaskByTaskId(auditDetails.getTaskId());
|
||||
List<RepairTaskDetails> detailsList = repairApplyDetailsMapper.getRepairDetailsWhichNotSent(preTmTaskInfo.getPreTaskId());
|
||||
Long backId = null;
|
||||
String level = null;
|
||||
if (!CollectionUtils.isEmpty(detailsList)) {
|
||||
backId = detailsList.get(0).getBackId();
|
||||
level = detailsList.get(0).getLevel();
|
||||
}
|
||||
/*if (Objects.nonNull(preTmTaskInfo) && Objects.nonNull(preTmTaskInfo.getPreTaskId())) {
|
||||
taskMapper.updateTaskStatus(String.valueOf(preTmTaskInfo.getPreTaskId()), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());
|
||||
|
|
@ -570,7 +572,10 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
repairTaskDetails.setTypeId(repairAuditDetail.getTypeId().toString());
|
||||
repairTaskDetails.setRepairNum(repairAuditDetail.getRepairNum());
|
||||
repairTaskDetails.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName());
|
||||
repairTaskDetails.setBackId(backId == null ? null : backId);
|
||||
repairTaskDetails.setBackId(backId);
|
||||
if(StringUtils.isNotBlank( level)) {
|
||||
repairTaskDetails.setLevel(String.valueOf(Integer.parseInt(level) + 1));
|
||||
}
|
||||
repairMapper.insertRepaired(repairTaskDetails);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import com.bonus.system.api.domain.SysUser;
|
|||
import com.bonus.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.hibernate.validator.internal.util.StringHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -1244,11 +1243,13 @@ public class RepairServiceImpl implements RepairService {
|
|||
throw new ServiceException("维修驳回失败,请联系管理员");
|
||||
}
|
||||
// 更新结算信息表
|
||||
result = sltAgreementInfoMapper.backInUseNum(repairApplyDetails);
|
||||
if (result < 1) {
|
||||
throw new ServiceException("维修驳回失败,请联系管理员");
|
||||
}
|
||||
if (repairApplyDetails != null) {
|
||||
TmTask tmTask = taskMapper.selectTmTaskByTaskId(repairApplyDetails.getTaskId());
|
||||
repairApplyDetails.setPreTaskId(tmTask.getPreTaskId());
|
||||
result = sltAgreementInfoMapper.backInUseNum(repairApplyDetails);
|
||||
if (result < 1) {
|
||||
throw new ServiceException("维修驳回失败,请联系管理员");
|
||||
}
|
||||
extractedByDetails(repairApplyDetails);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectById" resultType="com.bonus.material.repair.domain.RepairAuditDetails">
|
||||
select task_id as taskId,
|
||||
type_id as typeId,
|
||||
ma_id as maId
|
||||
ma_id as maId,
|
||||
level as level
|
||||
from repair_apply_details
|
||||
where id = #{repairId}
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
set
|
||||
sai.end_time = null, sai.back_id = null, sai.status = '0', sai.update_time = CURRENT_TIMESTAMP
|
||||
where
|
||||
bai.task_id = #{taskId} and sai.status = '1'
|
||||
bai.task_id = #{preTaskId} and sai.status = '1'
|
||||
<if test="typeId != null">
|
||||
and sai.type_id = #{typeId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue