Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
8dbb9f56f5
|
|
@ -30,6 +30,7 @@ import javax.validation.Valid;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -58,6 +59,13 @@ public class DevInfoController extends BaseController {
|
|||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "统计公司上架数")
|
||||
@PostMapping("/getCompanyCount")
|
||||
public AjaxResult getCompanyCount(@RequestBody DevInfoVo devInfo) {
|
||||
Map<String, Long> map = devInfoService.getCompanyCount(devInfo);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司列表(供装备新增及首页所属公司筛选使用)
|
||||
* @param obj
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public interface DevInfoService {
|
|||
*/
|
||||
List<DevInfoVo> selectDevInfoList(DevInfoVo devInfo);
|
||||
|
||||
Map<String, Long> getCompanyCount(DevInfoVo devInfo);
|
||||
|
||||
List<DevInfoVo> selectUserCollectList(DevInfoVo devInfo);
|
||||
|
||||
AjaxResult selectDevInfoHotList(DevInfoVo devInfo);
|
||||
|
|
|
|||
|
|
@ -171,6 +171,13 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return voList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> getCompanyCount(DevInfoVo devInfo) {
|
||||
List<DevInfoVo> voList = devInfoMapper.selectDevInfoList(devInfo);
|
||||
Map<String, Long> map = voList.stream().collect(Collectors.groupingBy(DevInfoVo::getCompanyId, Collectors.counting()));
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备收藏列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
// 根据订单id查询订单详情
|
||||
List<LeaseRepairRecord> list = mapper.getLeaseRepairRecordList(dto);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
List<BmFileInfo> fileList = new ArrayList<>();
|
||||
for (LeaseRepairRecord leaseRepairRecord : list) {
|
||||
if (leaseRepairRecord.getRepairChangePrice() != null || leaseRepairRecord.getScrapChangePrice() != null
|
||||
|| leaseRepairRecord.getLossChangePrice() != null) {
|
||||
|
|
@ -148,10 +149,7 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(Long.valueOf(leaseRepairRecord.getMaId()));
|
||||
bmFileInfo.setTaskType(MaterialConstants.LEASE_REPAIR_RECORD_TABLE_NAME);
|
||||
List<BmFileInfo> fileList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (CollectionUtils.isNotEmpty(fileList)) {
|
||||
leaseRecordDto.setFileInfoList(fileList);
|
||||
}
|
||||
fileList.addAll(bmFileInfoMapper.selectBmFileInfoList(bmFileInfo));
|
||||
if (leaseRecordDto.getRepairRecordList() == null) {
|
||||
leaseRecordDto.setRepairRecordList(new ArrayList<>());
|
||||
}
|
||||
|
|
@ -171,6 +169,9 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
leaseRecordDto.getLossRecordList().add(leaseRepairRecord);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(fileList)) {
|
||||
leaseRecordDto.setFileInfoList(fileList);
|
||||
}
|
||||
}
|
||||
leaseRecordDto.setTotalCost(totalCost);
|
||||
return leaseRecordDto;
|
||||
|
|
@ -195,10 +196,10 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
maIds_repair = leaseRecordDto.getRepairRecordList().stream().map(LeaseRepairRecord::getMaId).collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(leaseRecordDto.getScrapRecordList())) {
|
||||
maIds_scrap = leaseRecordDto.getRepairRecordList().stream().map(LeaseRepairRecord::getMaId).collect(Collectors.toList());
|
||||
maIds_scrap = leaseRecordDto.getScrapRecordList().stream().map(LeaseRepairRecord::getMaId).collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(leaseRecordDto.getLossRecordList())) {
|
||||
maIds_loss = leaseRecordDto.getRepairRecordList().stream().map(LeaseRepairRecord::getMaId).collect(Collectors.toList());
|
||||
maIds_loss = leaseRecordDto.getLossRecordList().stream().map(LeaseRepairRecord::getMaId).collect(Collectors.toList());
|
||||
}
|
||||
maIdSet.addAll(maIds_repair);
|
||||
maIdSet.addAll(maIds_scrap);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.order.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -33,6 +34,16 @@ public class OrderDetailDto {
|
|||
@ApiModelProperty(value = "设备ids")
|
||||
private List<Integer> maIds;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
private String code;
|
||||
|
||||
/** 设备唯一标识符,用户输入,比如车架号 */
|
||||
@Excel(name = "设备唯一标识符")
|
||||
@ApiModelProperty(value = "设备唯一标识符")
|
||||
private String identifyCode;
|
||||
|
||||
@ApiModelProperty(value = "设备类型id")
|
||||
private Integer typeId;
|
||||
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectOrderDetailsById" resultType="com.bonus.material.order.domain.OrderDetailDto">
|
||||
SELECT
|
||||
mdi.device_name,
|
||||
mdi.code,
|
||||
mdi.identify_code,
|
||||
mt.lease_price as dayLeasePrice,
|
||||
hh.order_status,
|
||||
hh.days,
|
||||
|
|
|
|||
Loading…
Reference in New Issue