bug修复
This commit is contained in:
parent
0ba74afdd8
commit
219db99369
|
|
@ -95,4 +95,7 @@ public class RepairPart {
|
|||
private Long repairer;
|
||||
@ApiModelProperty(value = "维修数量")
|
||||
private int repairNum;
|
||||
|
||||
@ApiModelProperty(value = "维修方式(1内部2返厂3报废)")
|
||||
private String repairType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,4 +147,6 @@ public interface RepairAuditDetailsMapper
|
|||
int updateRepairCost(@Param("inputDetails")RepairAuditDetails inputDetails, @Param("status") String status);
|
||||
|
||||
List<RepairRecord> getPartDetailsList(RepairAuditDetails bean);
|
||||
|
||||
List<RepairPart> getRepartList(RepairAuditDetails bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,15 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
public List<RepairPart> getPartRecord(RepairAuditDetails repairAuditDetails) {
|
||||
RepairAuditDetails bean = repairAuditDetailsMapper.getRepairId(repairAuditDetails);
|
||||
List<RepairPart> list = repairAuditDetailsMapper.getPartRecord(bean);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
List<RepairPart> repartList = repairAuditDetailsMapper.getRepartList(bean);
|
||||
if (CollectionUtils.isNotEmpty(repartList)) {
|
||||
String repairType = repartList.get(0).getRepairType();
|
||||
if ("2".equals(repairType) || "3".equals(repairType)) {
|
||||
return repartList;
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -490,5 +490,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and rad.ma_id = #{maId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getRepartList" resultType="com.bonus.sgzb.material.domain.RepairPart">
|
||||
select
|
||||
part_num as partNum,
|
||||
part_price as partCost,
|
||||
part_type as partType,
|
||||
part_name as partName,
|
||||
remark as remark,
|
||||
repair_type as repairType
|
||||
from repair_apply_record rar
|
||||
where 1=1
|
||||
<if test="taskId != null and taskId != ''">
|
||||
and rar.task_id = #{taskId}
|
||||
</if>
|
||||
<if test="maId != null and maId != ''">
|
||||
and rar.ma_id = #{maId}
|
||||
</if>
|
||||
<if test="typeId != null and typeId != ''">
|
||||
and rar.type_id = #{typeId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue