维修单分拆
This commit is contained in:
parent
ee9155b386
commit
29ce4f6aeb
|
|
@ -72,5 +72,7 @@ public class RepairApplyDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "维修人")
|
||||
private String repairer;
|
||||
|
||||
@ApiModelProperty(value = "发送到下一个阶段")
|
||||
private String sentToNextPhase;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public interface RepairApplyDetailsMapper {
|
|||
* 根据任务Id获取维修详细
|
||||
* @param taskId 任务信息ID
|
||||
*/
|
||||
List<RepairTaskDetails> getDetailsListByTaskIdAndStatus(@Param("taskId") Long taskId, @Param("status") String status);
|
||||
List<RepairTaskDetails> getRepairDetailsWhichNotSent(@Param("taskId") Long taskId);
|
||||
|
||||
/**
|
||||
* 删除维修详细
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.material.repair.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.bonus.common.biz.domain.R;
|
||||
import com.bonus.common.biz.enums.MaTypeManageTypeEnum;
|
||||
import com.bonus.common.biz.enums.RepairTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.RepairTypeEnum;
|
||||
|
|
@ -852,7 +853,7 @@ public class RepairServiceImpl implements RepairService {
|
|||
for (RepairTask task : taskList) {
|
||||
// 查询维修任务的详情表
|
||||
Long wxTaskId = task.getTaskId();
|
||||
List<RepairTaskDetails> detailsList = repairApplyDetailsMapper.getDetailsListByTaskIdAndStatus(wxTaskId, "1");
|
||||
List<RepairTaskDetails> detailsList = repairApplyDetailsMapper.getRepairDetailsWhichNotSent(wxTaskId);
|
||||
if (!CollectionUtils.isEmpty(detailsList)) {
|
||||
task.setCreateBy(loginUser.getUserid());
|
||||
Long agreementId = repairMapper.getAgreementId(task);
|
||||
|
|
@ -865,6 +866,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
repairMapper.createAgreementTask(task);
|
||||
// 新增审计记录
|
||||
for (RepairTaskDetails details : detailsList) {
|
||||
RepairApplyDetails repairApplyDetails = new RepairApplyDetails();
|
||||
repairApplyDetails.setId(details.getId());
|
||||
repairApplyDetails.setSentToNextPhase("1");
|
||||
repairApplyDetailsMapper.updateRepairApplyDetails(repairApplyDetails);
|
||||
details.setCreateBy(String.valueOf(loginUser.getUserid()));
|
||||
details.setTaskId(task.getTaskId());
|
||||
repairMapper.addAuditDetails(details);
|
||||
|
|
|
|||
|
|
@ -103,11 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="backId != null">back_id = #{backId},</if>
|
||||
<if test="repairer != null">repairer = #{repairer},</if>
|
||||
<if test="sentToNextPhase != null">sent_to_next_phase = #{sentToNextPhase},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getDetailsListByTaskIdAndStatus" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||
<select id="getRepairDetailsWhichNotSent" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||
select id,
|
||||
ma_id as maId,
|
||||
type_id as typeId,
|
||||
|
|
@ -116,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
scrap_num as scrapNum,
|
||||
company_id as companyId
|
||||
from repair_apply_details
|
||||
where task_id = #{taskId} and status = #{status} and sent_to_next_phase = '0'
|
||||
where task_id = #{taskId} and status = '1' and sent_to_next_phase = '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteRepairApplyDetailsById" parameterType="Long">
|
||||
|
|
|
|||
Loading…
Reference in New Issue