维修模块优化
This commit is contained in:
parent
b347771ae3
commit
52cf44a64f
|
|
@ -74,14 +74,14 @@ public class RepairController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 获取维修任务物资设备列表--不分页
|
* 获取维修任务物资设备列表--不分页
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "获取维修物资设备列表---分页")
|
// @ApiOperation(value = "获取维修物资设备列表---分页")
|
||||||
@GetMapping("/getRepairMaTypeList")
|
// @GetMapping("/getRepairMaTypeList")
|
||||||
// @RequiresPermissions("repair:manage:preview")
|
//// @RequiresPermissions("repair:manage:preview")
|
||||||
public TableDataInfo getRepairMaTypeList(RepairTaskDetails bean) {
|
// public TableDataInfo getRepairMaTypeList(RepairTaskDetails bean) {
|
||||||
startPage();
|
// startPage();
|
||||||
List<RepairDeviceListVo> list = service.getRepairMaTypeList(bean);
|
// List<RepairDeviceListVo> list = service.getRepairMaTypeList(bean);
|
||||||
return getDataTable(list);
|
// return getDataTable(list);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取维修任务机具列表--Ⅱ级页面详情列表
|
* 获取维修任务机具列表--Ⅱ级页面详情列表
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ public class RepairDeviceSummaryVo extends BaseVO {
|
||||||
@ApiModelProperty(value = "规格型号")
|
@ApiModelProperty(value = "规格型号")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
@ApiModelProperty(value = "管理模式")
|
@ApiModelProperty(value = "管理模式")
|
||||||
private Integer manageType;
|
private Integer manageType;
|
||||||
|
|
||||||
|
|
@ -55,7 +58,7 @@ public class RepairDeviceSummaryVo extends BaseVO {
|
||||||
// private Integer typeCostRecords;
|
// private Integer typeCostRecords;
|
||||||
|
|
||||||
@ApiModelProperty(value = "维修费用合计")
|
@ApiModelProperty(value = "维修费用合计")
|
||||||
private BigDecimal typeCostSum;
|
private BigDecimal typeCost;
|
||||||
|
|
||||||
@ApiModelProperty(value = "内层物资类型集合")
|
@ApiModelProperty(value = "内层物资类型集合")
|
||||||
private List<RepairDeviceVO> repairDeviceList = new ArrayList<>();
|
private List<RepairDeviceVO> repairDeviceList = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,12 @@ public class RepairDeviceVO {
|
||||||
@ApiModelProperty(value = "设备编码")
|
@ApiModelProperty(value = "设备编码")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "设备单位")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "管理模式")
|
||||||
|
private Integer manageType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "状态")
|
@ApiModelProperty(value = "状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
@ -52,9 +58,6 @@ public class RepairDeviceVO {
|
||||||
@ApiModelProperty(value = "维修人员")
|
@ApiModelProperty(value = "维修人员")
|
||||||
private String repairer;
|
private String repairer;
|
||||||
|
|
||||||
@ApiModelProperty(value = "管理模式")
|
|
||||||
private Integer manageType;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "附件")
|
@ApiModelProperty(value = "附件")
|
||||||
private String fileUrl;
|
private String fileUrl;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,16 +81,18 @@ public class RepairServiceImpl implements RepairService {
|
||||||
Long[] ids = tempList.stream().map(RepairDeviceVO::getId).toArray(Long[]::new);
|
Long[] ids = tempList.stream().map(RepairDeviceVO::getId).toArray(Long[]::new);
|
||||||
int repairNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairNum).sum();
|
int repairNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairNum).sum();
|
||||||
int repairedNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairedNum).sum();
|
int repairedNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairedNum).sum();
|
||||||
//BigDecimal typeCostSum = tempList.stream().map(RepairDeviceVO::getRepairedNum).reduce(BigDecimal.ZERO, BigDecimal::add);
|
BigDecimal typeCostSum = tempList.stream().map(RepairDeviceVO::getTotalCost).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
vo.setRepairDeviceList(tempList);
|
vo.setRepairDeviceList(tempList);
|
||||||
vo.setIds(ids);
|
vo.setIds(ids);
|
||||||
vo.setTypeRepairNum(repairNumSum);
|
vo.setTypeRepairNum(repairNumSum);
|
||||||
vo.setTypeRepairedNum(repairedNumSum);
|
vo.setTypeRepairedNum(repairedNumSum);
|
||||||
|
vo.setTypeCost(typeCostSum);
|
||||||
vo.setTaskId(tempList.get(0).getTaskId());
|
vo.setTaskId(tempList.get(0).getTaskId());
|
||||||
vo.setCode(tempList.get(0).getCode());
|
vo.setCode(tempList.get(0).getCode());
|
||||||
vo.setTypeName(tempList.get(0).getTypeName());
|
vo.setTypeName(tempList.get(0).getTypeName());
|
||||||
vo.setTypeId(tempList.get(0).getTypeId());
|
vo.setTypeId(tempList.get(0).getTypeId());
|
||||||
vo.setType(tempList.get(0).getType());
|
vo.setType(tempList.get(0).getType());
|
||||||
|
vo.setUnitName(tempList.get(0).getUnitName());
|
||||||
vo.setManageType(tempList.get(0).getManageType());
|
vo.setManageType(tempList.get(0).getManageType());
|
||||||
repairDeviceSummaryVoList.add(vo);
|
repairDeviceSummaryVoList.add(vo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue