维修单分拆
This commit is contained in:
parent
b462a2bbef
commit
5f4725250d
|
|
@ -2,6 +2,8 @@ package com.bonus.material.repair.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.material.repair.domain.RepairApplyDetails;
|
import com.bonus.material.repair.domain.RepairApplyDetails;
|
||||||
|
import com.bonus.material.repair.domain.RepairTaskDetails;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 维修详细Mapper接口
|
* 维修详细Mapper接口
|
||||||
|
|
@ -42,6 +44,12 @@ public interface RepairApplyDetailsMapper {
|
||||||
*/
|
*/
|
||||||
public int updateRepairApplyDetails(RepairApplyDetails repairApplyDetails);
|
public int updateRepairApplyDetails(RepairApplyDetails repairApplyDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据任务Id获取维修详细
|
||||||
|
* @param taskId 任务信息ID
|
||||||
|
*/
|
||||||
|
List<RepairTaskDetails> getDetailsListByTaskIdAndStatus(@Param("taskId") Long taskId, @Param("status") String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除维修详细
|
* 删除维修详细
|
||||||
*
|
*
|
||||||
|
|
@ -50,6 +58,8 @@ public interface RepairApplyDetailsMapper {
|
||||||
*/
|
*/
|
||||||
public int deleteRepairApplyDetailsById(Long id);
|
public int deleteRepairApplyDetailsById(Long id);
|
||||||
|
|
||||||
|
public int deleteRepairApplyDetailsByTaskIdAndStatus(@Param("taskId") Long taskId, @Param("status") String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除维修详细
|
* 批量删除维修详细
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -132,12 +132,6 @@ public interface RepairMapper {
|
||||||
*/
|
*/
|
||||||
int getUnFinish(RepairTask task);
|
int getUnFinish(RepairTask task);
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据任务Id获取维修详细
|
|
||||||
* @param taskId 任务信息ID
|
|
||||||
*/
|
|
||||||
List<RepairTaskDetails> getDetailsListByTaskIdAndStatus(@Param("taskId") Long taskId, @Param("status") String status);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增修饰审核审核数据
|
* 新增修饰审核审核数据
|
||||||
* @param details 数据详情
|
* @param details 数据详情
|
||||||
|
|
|
||||||
|
|
@ -862,12 +862,14 @@ public class RepairServiceImpl implements RepairService {
|
||||||
//repairAuditDetailsMapper.deleteRepairAuditDetailsByTaskId(task.getTaskId());
|
//repairAuditDetailsMapper.deleteRepairAuditDetailsByTaskId(task.getTaskId());
|
||||||
|
|
||||||
// 查询维修任务的详情表
|
// 查询维修任务的详情表
|
||||||
List<RepairTaskDetails> detailsList = repairMapper.getDetailsListByTaskIdAndStatus(wxTaskId, "1");
|
List<RepairTaskDetails> detailsList = repairApplyDetailsMapper.getDetailsListByTaskIdAndStatus(wxTaskId, "1");
|
||||||
for (RepairTaskDetails details : detailsList) {
|
for (RepairTaskDetails details : detailsList) {
|
||||||
details.setCreateBy(String.valueOf(loginUser.getUserid()));
|
details.setCreateBy(String.valueOf(loginUser.getUserid()));
|
||||||
details.setTaskId(task.getTaskId());
|
details.setTaskId(task.getTaskId());
|
||||||
repairMapper.addAuditDetails(details);
|
repairMapper.addAuditDetails(details);
|
||||||
}
|
}
|
||||||
|
repairApplyDetailsMapper.deleteRepairApplyDetailsByTaskIdAndStatus(wxTaskId, "1");
|
||||||
|
|
||||||
// 新增协议任务表--关联修饰任务与协议
|
// 新增协议任务表--关联修饰任务与协议
|
||||||
task.setAgreementId(agreementId);
|
task.setAgreementId(agreementId);
|
||||||
repairMapper.createAgreementTask(task);
|
repairMapper.createAgreementTask(task);
|
||||||
|
|
|
||||||
|
|
@ -107,10 +107,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getDetailsListByTaskIdAndStatus" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||||
|
select id,
|
||||||
|
ma_id as maId,
|
||||||
|
type_id as typeId,
|
||||||
|
repair_num as repairNum,
|
||||||
|
repaired_num as repairedNum,
|
||||||
|
scrap_num as scrapNum,
|
||||||
|
company_id as companyId
|
||||||
|
from repair_apply_details
|
||||||
|
where task_id = #{taskId} and status = #{status}
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="deleteRepairApplyDetailsById" parameterType="Long">
|
<delete id="deleteRepairApplyDetailsById" parameterType="Long">
|
||||||
delete from repair_apply_details where id = #{id}
|
delete from repair_apply_details where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteRepairApplyDetailsByTaskIdAndStatus">
|
||||||
|
delete from repair_apply_details where task_id = #{taskId} and status = #{status}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteRepairApplyDetailsByIds" parameterType="String">
|
<delete id="deleteRepairApplyDetailsByIds" parameterType="String">
|
||||||
delete from repair_apply_details where id in
|
delete from repair_apply_details where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
|
|
||||||
|
|
@ -399,18 +399,6 @@
|
||||||
where task_id = #{taskId} and status = '0'
|
where task_id = #{taskId} and status = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDetailsListByTaskIdAndStatus" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
|
||||||
select id,
|
|
||||||
ma_id as maId,
|
|
||||||
type_id as typeId,
|
|
||||||
repair_num as repairNum,
|
|
||||||
repaired_num as repairedNum,
|
|
||||||
scrap_num as scrapNum,
|
|
||||||
company_id as companyId
|
|
||||||
from repair_apply_details
|
|
||||||
where task_id = #{taskId} and status = #{status}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectPartPrice" resultType="java.math.BigDecimal">
|
<select id="selectPartPrice" resultType="java.math.BigDecimal">
|
||||||
select ifnull(buy_price,0) from ma_part_type where pa_id = #{partId}
|
select ifnull(buy_price,0) from ma_part_type where pa_id = #{partId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue