维修优化

This commit is contained in:
sxu 2024-11-26 14:13:02 +08:00
parent 5f9211b19c
commit b4721e58af
5 changed files with 65 additions and 1 deletions

View File

@ -185,10 +185,19 @@ public class RepairController extends BaseController {
@ApiOperation(value = "获取修试后入库列表") @ApiOperation(value = "获取修试后入库列表")
@GetMapping("getRepairedList") @GetMapping("getRepairedList")
@RequiresPermissions("warehousing:repair:list") //@RequiresPermissions("warehousing:repair:list")
public TableDataInfo getRepairedList(RepairInputDetailsVo dto){ public TableDataInfo getRepairedList(RepairInputDetailsVo dto){
startPage(); startPage();
List<RepairInputDetailsVo> list = service.getRepairedList(dto); List<RepairInputDetailsVo> list = service.getRepairedList(dto);
return getDataTable(list); return getDataTable(list);
} }
@ApiOperation(value = "获取修试后入库列表-详情")
@GetMapping("getRepairedDetailList")
//@RequiresPermissions("warehousing:repair:list")
public TableDataInfo getRepairedDetailList(RepairInputDetailsVo dto){
startPage();
List<RepairInputDetailsVo> list = service.getRepairedDetailList(dto);
return getDataTable(list);
}
} }

View File

@ -158,4 +158,6 @@ public interface RepairMapper {
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto); List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto);
} }

View File

@ -82,4 +82,6 @@ public interface RepairService {
List<RepairTask> exportRepairTaskList(RepairTask bean); List<RepairTask> exportRepairTaskList(RepairTask bean);
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto); List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto);
} }

View File

@ -847,4 +847,15 @@ public class RepairServiceImpl implements RepairService {
public List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto) { public List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto) {
return repairMapper.getRepairedList(dto); return repairMapper.getRepairedList(dto);
} }
@Override
public List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto) {
List<RepairInputDetailsVo> repairedDetailList = repairMapper.getRepairedDetailList(dto);
// for (RepairInputDetailsVo repairTestInputDetailVo : repairedDetailList) {
// List<String> userIds = repairMapper.selectKeepUser(repairTestInputDetailVo.getTypeId());
// userIds.add("1");
// repairTestInputDetailVo.setUserIds(userIds);
// }
return repairedDetailList;
}
} }

View File

@ -453,4 +453,44 @@
</if> </if>
</where> </where>
</select> </select>
<!--获取修试后入库-详情列表-->
<select id="getRepairedDetailList" resultType="com.bonus.material.repair.domain.vo.RepairInputDetailsVo">
SELECT rid.id,
rid.ma_id AS maId,
rid.type_id AS typeId,
a.typeName,
a.typeName2,
rid.repair_num AS repairNum,
a.manage_type AS manageType,
mm.ma_code AS maCode,
rid.update_by AS updateBy,
rid.update_time AS updateTime,
rid.remark,
CASE rid.`status` WHEN '0' THEN '进行中' WHEN '1' THEN '已入库' WHEN '2' THEN '驳回' ELSE '进行中' END AS `status`
FROM repair_input_details rid
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
LEFT JOIN (
SELECT mt.type_id AS typeId,mt2.type_id AS typeId2,mt.type_name AS typeName,mt2.type_name AS typeName2,mt.manage_type
FROM ma_type mt
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
WHERE mt.`level` = '4'
)a ON rid.type_id = a.typeId
WHERE rid.task_id = #{taskId}
<if test="keyWord!=null and keyWord!=''">
AND (
INSTR(rid.update_by,#{keyWord}) > 0 OR
INSTR(mm.ma_code,#{keyWord}) > 0
)
</if>
<if test="deviceTypeId!=null and deviceTypeId!=''">
AND a.typeId2 = #{deviceTypeId}
</if>
<if test="typeId!=null and typeId!=''">
AND a.typeId = #{typeId}
</if>
ORDER BY rid.create_time DESC
</select>
</mapper> </mapper>