功能需求优化
This commit is contained in:
parent
e45a54511d
commit
50b984ba3b
|
|
@ -28,7 +28,7 @@ public interface BmFileInfoMapper {
|
|||
* @return 附件集合
|
||||
*/
|
||||
List<BmFileInfo> selectBmFileInfoList(BmFileInfo bmFileInfo);
|
||||
BmFileInfo selectBmFileInfo(BmFileInfo bmFileInfo);
|
||||
List<BmFileInfo> selectBmFileInfo(BmFileInfo bmFileInfo);
|
||||
|
||||
/**
|
||||
* 新增附件
|
||||
|
|
@ -85,5 +85,5 @@ public interface BmFileInfoMapper {
|
|||
|
||||
Integer deleteBmFileInfoByFileId(@Param("fileId") Integer fileId, @Param("fileType") Integer fileType);
|
||||
|
||||
BmFileInfo getInfoByMaIdAndTaskId(MaDevQc qc);
|
||||
List<BmFileInfo> getInfoByMaIdAndTaskId(MaDevQc qc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
table.setId(qc.getId());
|
||||
table.setCheckDate(qc.getQcTime());
|
||||
table.setNextCheckDate(qc.getNextCheckTime());
|
||||
devInfoVo.getExaminationPdf().add(bmFileInfoMapper.getInfoByMaIdAndTaskId(qc));
|
||||
List<BmFileInfo> info = bmFileInfoMapper.getInfoByMaIdAndTaskId(qc);
|
||||
devInfoVo.getExaminationPdf().addAll(info);
|
||||
}
|
||||
tableList.add(table);
|
||||
devInfoVo.setTableList(tableList);
|
||||
|
|
@ -148,7 +149,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
int companyVisitNum = devInfoMapper.getCompanyUpNum(devInfoVo.getCompanyId());
|
||||
DevInfoVo infoVo = devInfoMapper.selectCompanyById(devInfoVo.getCompanyId());
|
||||
devInfoVo.setCompanyVisitNum(companyVisitNum);
|
||||
devInfoVo.setCompanyCreateTime(infoVo.getCompanyCreateTime());
|
||||
devInfoVo.setCompanyCreateTime(devInfoVo.getCreateTime());
|
||||
devInfoVo.setDevUapNum(devNum);
|
||||
}
|
||||
//根据设备id及用户id去预约表中查询是否已经加入预约车
|
||||
|
|
@ -175,8 +176,8 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
fileInfo.setModelId(Long.valueOf(maDevQc.getMaId()));
|
||||
fileInfo.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
|
||||
fileInfo.setFileType(4L);
|
||||
BmFileInfo bmFileInfos = bmFileInfoMapper.selectBmFileInfo(fileInfo);
|
||||
maDevQc.setFileInfo(bmFileInfos);
|
||||
List<BmFileInfo> bmFileInfos = bmFileInfoMapper.selectBmFileInfo(fileInfo);
|
||||
maDevQc.setFileInfoList(bmFileInfos);
|
||||
}
|
||||
devInfoVo.setQcList(qcList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ public class MaLeaseDetails {
|
|||
@ApiModelProperty(value = "所属三级类目合集")
|
||||
private String groupName;
|
||||
|
||||
@ApiModelProperty(value = "所属总类目")
|
||||
private String firstGroupName;
|
||||
|
||||
@ApiModelProperty(value = "装备一级类目Id")
|
||||
private String firstId;
|
||||
|
||||
|
|
|
|||
|
|
@ -362,6 +362,35 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
if (result > 0) {
|
||||
list = leaseInfoMapper.leaseList(maLease);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (MaLeaseVo maLeaseVo : list) {
|
||||
MaLeaseInfo maLeaseInfo = new MaLeaseInfo();
|
||||
maLeaseInfo.setId(maLeaseVo.getId());
|
||||
List<MaLeaseDetails> leaseDetailsList = leaseInfoMapper.selectDetailsById(maLeaseInfo);
|
||||
if (CollectionUtils.isNotEmpty(leaseDetailsList)) {
|
||||
// 使用 StringBuilder 来拼接 firstGroupName,避免最后一个逗号
|
||||
StringBuilder firstGroupNameBuilder = new StringBuilder();
|
||||
for (MaLeaseDetails maLeaseDetails : leaseDetailsList) {
|
||||
if (StringUtils.isNotBlank(maLeaseDetails.getGroupName())) {
|
||||
// 截取 groupName 中第一个 / 之前的数据
|
||||
String[] split = maLeaseDetails.getGroupName().split("/");
|
||||
if (split.length > 0) {
|
||||
maLeaseDetails.setFirstGroupName(split[0]);
|
||||
}
|
||||
}
|
||||
// 拼接 firstGroupName,避免最后一个逗号
|
||||
if (StringUtils.isNotBlank(maLeaseDetails.getFirstGroupName())) {
|
||||
if (firstGroupNameBuilder.length() > 0) {
|
||||
firstGroupNameBuilder.append("、");
|
||||
}
|
||||
firstGroupNameBuilder.append(maLeaseDetails.getFirstGroupName());
|
||||
}
|
||||
}
|
||||
// 设置拼接后的 firstGroupName
|
||||
maLeaseVo.setGroupName(firstGroupNameBuilder.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ public class OrderController extends BaseController {
|
|||
@ApiOperation(value = "获取订单详情")
|
||||
@GetMapping("/getOrderDetails")
|
||||
public AjaxResult getOrderDetails(OrderInfoDto orderInfoDto) throws Exception {
|
||||
/*startPage();
|
||||
return getDataTable(orderService.getOrderDetails(orderInfoDto));*/
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
List<OrderInfoDto> list = orderService.getOrderDetails(orderInfoDto);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
moi.order_time,
|
||||
mdi.own_co as sellerCompany,
|
||||
up.dept_name AS czcompanyName,
|
||||
mdi.person AS person,
|
||||
mdi.person_phone AS personPhone,
|
||||
su.phonenumber AS phoneNumber,
|
||||
su.nick_name as buyerName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue