预报废驳回维修页面查看
This commit is contained in:
parent
2b201f35b5
commit
9fc5adaec3
|
|
@ -85,4 +85,10 @@ public class RepairTaskDetails {
|
||||||
@ApiModelProperty(value = "任务创建人")
|
@ApiModelProperty(value = "任务创建人")
|
||||||
private Long createBy;
|
private Long createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -161,4 +161,6 @@ public interface RepairMapper {
|
||||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||||
|
|
||||||
int addRepairCost(@Param("bean") RepairApplyRecord bean, @Param("costs") BigDecimal costs,@Param("partType") String partType);
|
int addRepairCost(@Param("bean") RepairApplyRecord bean, @Param("costs") BigDecimal costs,@Param("partType") String partType);
|
||||||
|
|
||||||
|
List<RepairTask> getRepairTaskListByOne(RepairTask bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,15 @@ public class RepairServiceImpl implements RepairService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
||||||
List<RepairTask> repairTaskList = mapper.getRepairTaskList(bean);
|
List<RepairTask> repairTaskList = new ArrayList<>();
|
||||||
|
//判断是查询预报废驳回的维修数据还是退料过来的维修数据
|
||||||
|
if(bean.getBackSource().equals(BigDecimal.ROUND_DOWN)){
|
||||||
|
repairTaskList = mapper.getRepairTaskListByOne(bean);
|
||||||
|
}else {
|
||||||
|
repairTaskList = mapper.getRepairTaskList(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (SecurityUtils.getLoginUser().getRoles().contains("admin")){
|
if (SecurityUtils.getLoginUser().getRoles().contains("admin")){
|
||||||
return repairTaskList;
|
return repairTaskList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,8 @@
|
||||||
rad.status as status,
|
rad.status as status,
|
||||||
su.nick_name as repairer,
|
su.nick_name as repairer,
|
||||||
rad.update_time as updateTime,
|
rad.update_time as updateTime,
|
||||||
rad.type_id as typeId
|
rad.type_id as typeId,
|
||||||
|
rad.remark as remark
|
||||||
from repair_apply_details rad
|
from repair_apply_details rad
|
||||||
left join ma_type mt on rad.type_id = mt.type_id
|
left join ma_type mt on rad.type_id = mt.type_id
|
||||||
left join ma_machine mm on mm.ma_id = rad.ma_id
|
left join ma_machine mm on mm.ma_id = rad.ma_id
|
||||||
|
|
@ -280,6 +281,63 @@
|
||||||
from repair_apply_details
|
from repair_apply_details
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getRepairTaskListByOne" resultType="com.bonus.sgzb.base.domain.RepairTask">
|
||||||
|
SELECT
|
||||||
|
rd.task_id,
|
||||||
|
rd.remark,
|
||||||
|
tt.CODE AS repairCode,
|
||||||
|
bui.unit_name AS backUnit,
|
||||||
|
bpi.lot_name AS backPro,
|
||||||
|
su.nick_name AS createName,
|
||||||
|
tt.create_time AS createTime,
|
||||||
|
sd.name AS repairStatus,
|
||||||
|
tt.task_status AS repairStatusCode,
|
||||||
|
tt.company_id AS companyId,
|
||||||
|
tt1.code AS forecastWasteCode,
|
||||||
|
GROUP_CONCAT(DISTINCT rd.company_id) as companyIds,
|
||||||
|
GROUP_CONCAT(DISTINCT mt2.type_name) as type
|
||||||
|
FROM
|
||||||
|
repair_apply_details rd
|
||||||
|
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
|
LEFT JOIN tm_task tt on rd.task_id = tt.task_id
|
||||||
|
LEFT JOIN scrap_apply_details sad ON rd.back_id = sad.id
|
||||||
|
LEFT JOIN tm_task_agreement tta ON sad.task_id = tta.task_id
|
||||||
|
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||||
|
LEFT JOIN bm_unit_info bui ON bai2.unit_id = bui.unit_id
|
||||||
|
LEFT JOIN bm_project_lot bpi ON bai2.project_id = bpi.lot_id and bpi.status = '0' and bpi.del_flag = '0'
|
||||||
|
left join sys_user su on rd.create_by = su.user_id
|
||||||
|
left join sys_dic sd on sd.id = tt.task_status
|
||||||
|
LEFT JOIN tm_task tt1 ON tt1.task_id = sad.task_id
|
||||||
|
where 1=1
|
||||||
|
<if test="keyword != null and keyword != ''">
|
||||||
|
AND (locate(#{keyword}, su.nick_name) > 0
|
||||||
|
or locate(#{keyword}, tt.CODE) > 0)
|
||||||
|
</if>
|
||||||
|
<if test="backUnit != null and backUnit != ''">
|
||||||
|
AND bui.unit_id = #{backUnit}
|
||||||
|
</if>
|
||||||
|
<if test="backPro != null and backPro != ''">
|
||||||
|
AND bpi.lot_id = #{backPro}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and type != ''">
|
||||||
|
AND mt2.type_id = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="backCode != null and backCode != ''">
|
||||||
|
AND locate(#{backCode}, bai.CODE) > 0
|
||||||
|
</if>
|
||||||
|
<if test="repairStatus != null and repairStatus != ''">
|
||||||
|
AND tt.task_status = #{repairStatus}
|
||||||
|
</if>
|
||||||
|
<if test="backSource != null and backSource != ''">
|
||||||
|
AND rd.back_source = #{backSource}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||||
|
AND tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||||
|
</if>
|
||||||
|
GROUP BY rd.task_id,bui.unit_name,bpi.lot_name,su.nick_name
|
||||||
|
order by tt.create_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue