This commit is contained in:
parent
00354bffed
commit
1fe09a7839
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.lease.domain;
|
||||
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.material.order.domain.OrderDetailDto;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -55,4 +56,7 @@ public class LeaseRecordDto {
|
|||
|
||||
@ApiModelProperty(value = "丢失列表")
|
||||
private List<LeaseRepairRecord> lossRecordList;
|
||||
|
||||
@ApiModelProperty(value = "附件信息")
|
||||
private List<BmFileInfo> fileInfoList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ public interface LeaseRepairRecordMapper {
|
|||
|
||||
/**
|
||||
* 查询列表
|
||||
* @param orderCode
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
int selectLeaseContent(String orderCode);
|
||||
int selectLeaseContent(String orderId);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
|
|
|
|||
|
|
@ -38,15 +38,6 @@ import java.util.stream.Collectors;
|
|||
@Slf4j
|
||||
public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
||||
|
||||
// 维修类型图片
|
||||
private final Integer MAIN_IMAGES_DICT_VALUE = 0;
|
||||
|
||||
// 报废类型图片
|
||||
private final Integer DETAILS_IMAGES_DICT_VALUE = 1;
|
||||
|
||||
// 丢失类型图片
|
||||
private final Integer EXAMINATION_PDF = 2;
|
||||
|
||||
@Resource
|
||||
private LeaseRepairRecordMapper mapper;
|
||||
|
||||
|
|
@ -66,8 +57,8 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
List<LeaseRepair> list = mapper.list(dto);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (LeaseRepair leaseRepairVo : list) {
|
||||
//根据订单编号去lease_repair_record表中查询是否已填写退租检修信息
|
||||
int count = mapper.selectLeaseContent(leaseRepairVo.getCode());
|
||||
//根据订单id去lease_repair_record表中查询是否已填写退租检修信息
|
||||
int count = mapper.selectLeaseContent(leaseRepairVo.getOrderId());
|
||||
if (count > 0) {
|
||||
leaseRepairVo.setIsLeaseContent(1);
|
||||
} else {
|
||||
|
|
@ -139,43 +130,26 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
bmFileInfo.setTaskType(MaterialConstants.LEASE_REPAIR_RECORD_TABLE_NAME);
|
||||
List<BmFileInfo> fileList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (CollectionUtils.isNotEmpty(fileList)) {
|
||||
fileList.forEach(item -> {
|
||||
if (item.getFileType().equals(Long.valueOf(MAIN_IMAGES_DICT_VALUE))) {
|
||||
// 确保 leaseRepairRecord.getFileInfoList() 不为 null
|
||||
if (leaseRepairRecord.getFileInfoList() == null) {
|
||||
leaseRepairRecord.setFileInfoList(new ArrayList<>());
|
||||
leaseRecordDto.setFileInfoList(fileList);
|
||||
}
|
||||
leaseRepairRecord.getFileInfoList().add(item);
|
||||
// 确保 leaseRecordDto.getRepairRecordList() 不为 null
|
||||
if (leaseRecordDto.getRepairRecordList() == null) {
|
||||
leaseRecordDto.setRepairRecordList(new ArrayList<>());
|
||||
}
|
||||
if (leaseRepairRecord.getRepairPrice() != null) {
|
||||
leaseRecordDto.getRepairRecordList().add(leaseRepairRecord);
|
||||
} else if (item.getFileType().equals(Long.valueOf(DETAILS_IMAGES_DICT_VALUE))) {
|
||||
// 确保 leaseRepairRecord.getFileInfoList() 不为 null
|
||||
if (leaseRepairRecord.getFileInfoList() == null) {
|
||||
leaseRepairRecord.setFileInfoList(new ArrayList<>());
|
||||
}
|
||||
leaseRepairRecord.getFileInfoList().add(item);
|
||||
// 确保 leaseRecordDto.getScrapRecordList() 不为 null
|
||||
if (leaseRecordDto.getScrapRecordList() == null) {
|
||||
leaseRecordDto.setScrapRecordList(new ArrayList<>());
|
||||
}
|
||||
if (leaseRepairRecord.getScrapPrice() != null) {
|
||||
leaseRecordDto.getScrapRecordList().add(leaseRepairRecord);
|
||||
} else if (item.getFileType().equals(Long.valueOf(EXAMINATION_PDF))) {
|
||||
// 确保 leaseRepairRecord.getFileInfoList() 不为 null
|
||||
if (leaseRepairRecord.getFileInfoList() == null) {
|
||||
leaseRepairRecord.setFileInfoList(new ArrayList<>());
|
||||
}
|
||||
leaseRepairRecord.getFileInfoList().add(item);
|
||||
// 确保 leaseRecordDto.getLossRecordList() 不为 null
|
||||
if (leaseRecordDto.getLossRecordList() == null) {
|
||||
leaseRecordDto.setLossRecordList(new ArrayList<>());
|
||||
}
|
||||
if (leaseRepairRecord.getLossPrice() != null) {
|
||||
leaseRecordDto.getLossRecordList().add(leaseRepairRecord);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
leaseRecordDto.setTotalCost(totalCost);
|
||||
|
|
@ -243,7 +217,8 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
return handleAllRecords(leaseRecordDto, maIdList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("新增退租检修异常: ", e.getMessage());
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), e.getMessage());
|
||||
}
|
||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg());
|
||||
}
|
||||
|
|
@ -319,7 +294,7 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult confirmPrice(LeaseRepairRecord leaseRepairRecord) {
|
||||
if (leaseRepairRecord.getOrderId() != null) {
|
||||
if (leaseRepairRecord.getOrderId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
leaseRepairRecord.setPriceConfirmUser(SecurityUtils.getUserId());
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
maLeaseDetails.setLeaseId(id);
|
||||
result += leaseInfoMapper.insertDetails(maLeaseDetails);
|
||||
if (result > 0 && maLeaseDetails.getId() != null) {
|
||||
insertFile(maLeaseDetails, maLeaseDetails.getId());
|
||||
insertFile(maLeaseDetails, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -137,27 +137,15 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
}
|
||||
int result = leaseInfoMapper.updateDevInfo(maLeaseInfo);
|
||||
//根据id查询删除详情信息
|
||||
List<MaLeaseDetails> leaseDetailsList = leaseInfoMapper.selectDetailsById(maLeaseInfo);
|
||||
result += leaseInfoMapper.deleteDetailsById(maLeaseInfo);
|
||||
//首先根据id查询文件信息是否存在
|
||||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(Long.valueOf(maLeaseInfo.getId()));
|
||||
bmFileInfo.setTaskType(MaterialConstants.LEASE_FILE_TYPE_CODE);
|
||||
bmFileInfo.setFileType(0L);
|
||||
List<BmFileInfo> bmFileInfoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (CollectionUtils.isNotEmpty(bmFileInfoList)) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByIds(bmFileInfoList.stream().map(BmFileInfo::getId).toArray(Long[]::new));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(leaseDetailsList)) {
|
||||
for (MaLeaseDetails maLeaseDetails : leaseDetailsList) {
|
||||
bmFileInfo.setModelId(Long.valueOf(maLeaseDetails.getId()));
|
||||
bmFileInfo.setFileType(1L);
|
||||
List<BmFileInfo> infoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (CollectionUtils.isNotEmpty(infoList)) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByIds(infoList.stream().map(BmFileInfo::getId).toArray(Long[]::new));
|
||||
}
|
||||
}
|
||||
}
|
||||
//插入文件信息
|
||||
insertFileInfo(maLeaseInfo, maLeaseInfo.getId());
|
||||
if (CollectionUtils.isNotEmpty(maLeaseInfo.getDetailsList())) {
|
||||
|
|
@ -172,7 +160,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
maLeaseDetails.setLeaseId(maLeaseInfo.getId());
|
||||
result += leaseInfoMapper.insertDetails(maLeaseDetails);
|
||||
if (result > 0 && maLeaseDetails.getId() != null) {
|
||||
insertFile(maLeaseDetails, maLeaseDetails.getId());
|
||||
insertFile(maLeaseDetails, maLeaseInfo.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -186,57 +174,86 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
*/
|
||||
@Override
|
||||
public AjaxResult getById(MaLeaseInfo maLeaseInfo) {
|
||||
// 1. 参数检查
|
||||
if (maLeaseInfo.getId() == null) {
|
||||
return AjaxResult.error(HttpCodeEnum.TO_PARAM_NULL.getCode(), HttpCodeEnum.TO_PARAM_NULL.getMsg());
|
||||
}
|
||||
|
||||
// 2. 查询租赁信息
|
||||
MaLeaseVo maLeaseVo = leaseInfoMapper.selectByName(maLeaseInfo);
|
||||
//根据id查询详情信息
|
||||
List<MaLeaseDetails> leaseDetailsList = leaseInfoMapper.selectDetailsById(maLeaseInfo);
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
if (maLeaseVo != null) {
|
||||
//查询文件信息
|
||||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(Long.valueOf(maLeaseVo.getId()));
|
||||
bmFileInfo.setTaskType(MaterialConstants.LEASE_FILE_TYPE_CODE);
|
||||
bmFileInfo.setFileType(0L);
|
||||
List<BmFileInfo> fileList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
|
||||
// 3. 文件信息初始化
|
||||
// 查询文件信息:FileType = 0
|
||||
List<BmFileInfo> fileList = getBmFileInfoList(maLeaseVo.getId(), 0L);
|
||||
if (CollectionUtil.isNotEmpty(fileList)) {
|
||||
maLeaseVo.setFileInfoList(fileList);
|
||||
}
|
||||
|
||||
// 4. 处理租赁详情信息
|
||||
if (CollectionUtil.isNotEmpty(leaseDetailsList)) {
|
||||
// 处理每个租赁详情
|
||||
processLeaseDetails(leaseDetailsList, maLeaseVo.getId());
|
||||
}
|
||||
|
||||
// 5. 更新浏览量(仅在待接单状态时)
|
||||
updateHotSearchIfNeeded(maLeaseVo, maLeaseInfo.getId());
|
||||
|
||||
// 6. 返回结果
|
||||
maLeaseVo.setDetailsList(leaseDetailsList);
|
||||
return AjaxResult.success(maLeaseVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件信息
|
||||
* @param modelId
|
||||
* @param fileType
|
||||
* @return
|
||||
*/
|
||||
private List<BmFileInfo> getBmFileInfoList(Integer modelId, Long fileType) {
|
||||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(Long.valueOf(modelId));
|
||||
bmFileInfo.setTaskType(MaterialConstants.LEASE_FILE_TYPE_CODE);
|
||||
bmFileInfo.setFileType(fileType);
|
||||
return bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理租赁详情
|
||||
* @param leaseDetailsList
|
||||
* @param modelId
|
||||
*/
|
||||
private void processLeaseDetails(List<MaLeaseDetails> leaseDetailsList, Integer modelId) {
|
||||
List<String> list = new ArrayList<>();
|
||||
for (MaLeaseDetails details : leaseDetailsList) {
|
||||
if (StringUtils.isNotBlank(details.getIds())) {
|
||||
// 使用 StringUtils.split() 按逗号分割 ids 字符串
|
||||
String[] idsArray = StringUtils.split(details.getIds(), ",");
|
||||
// 将分割后的元素添加到 list 中
|
||||
// 将分割出来的 id 添加到 list 中
|
||||
// 将所有 IDs 添加到 list 中
|
||||
list.addAll(Arrays.asList(idsArray));
|
||||
details.setTypeIds(list);
|
||||
}
|
||||
//查询文件信息
|
||||
BmFileInfo bmFileInfo1 = new BmFileInfo();
|
||||
bmFileInfo1.setModelId(Long.valueOf(details.getId()));
|
||||
bmFileInfo1.setTaskType(MaterialConstants.LEASE_FILE_TYPE_CODE);
|
||||
bmFileInfo1.setFileType(1L);
|
||||
List<BmFileInfo> fileList1 = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo1);
|
||||
if (CollectionUtil.isNotEmpty(fileList1)) {
|
||||
details.setFileInfoList(fileList1);
|
||||
// 查询文件信息:FileType = 1
|
||||
List<BmFileInfo> fileList = getBmFileInfoList(modelId, 1L);
|
||||
if (CollectionUtil.isNotEmpty(fileList)) {
|
||||
details.setFileInfoList(fileList);
|
||||
}
|
||||
}
|
||||
}
|
||||
maLeaseVo.setDetailsList(leaseDetailsList);
|
||||
//更新搜索量
|
||||
|
||||
/**
|
||||
* 更新浏览量(仅在待接单状态时)
|
||||
* @param maLeaseVo
|
||||
* @param leaseId
|
||||
*/
|
||||
private void updateHotSearchIfNeeded(MaLeaseVo maLeaseVo, Integer leaseId) {
|
||||
try {
|
||||
//只针对于待接单状态租赁需求更新浏览量
|
||||
if (maLeaseVo.getLeaseStatus() != null && maLeaseVo.getLeaseStatus().equals(LeaseInfoEnum.LEASE_PENDING_ORDER.getStatus())) {
|
||||
updateHotSearch(maLeaseInfo.getId());
|
||||
updateHotSearch(leaseId);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("更新租赁需求浏览量失败,不影响主业务流程");
|
||||
log.error("更新租赁需求浏览量失败, 不影响主业务流程", e);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success(maLeaseVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新浏览量
|
||||
|
|
@ -301,24 +318,12 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||
bmFileInfo.setModelId(Long.valueOf(maLeaseInfo.getId()));
|
||||
bmFileInfo.setTaskType(MaterialConstants.LEASE_FILE_TYPE_CODE);
|
||||
bmFileInfo.setFileType(0L);
|
||||
List<BmFileInfo> bmFileInfoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (result > 0 && CollectionUtils.isNotEmpty(bmFileInfoList)) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByIds(bmFileInfoList.stream().map(BmFileInfo::getId).toArray(Long[]::new));
|
||||
}
|
||||
//根据id查询删除详情信息
|
||||
List<MaLeaseDetails> leaseDetailsList = leaseInfoMapper.selectDetailsById(maLeaseInfo);
|
||||
result += leaseInfoMapper.deleteDetailsById(maLeaseInfo);
|
||||
if (CollectionUtils.isNotEmpty(leaseDetailsList)) {
|
||||
for (MaLeaseDetails maLeaseDetails : leaseDetailsList) {
|
||||
bmFileInfo.setModelId(Long.valueOf(maLeaseDetails.getId()));
|
||||
bmFileInfo.setFileType(1L);
|
||||
List<BmFileInfo> infoList = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||
if (result > 0 && CollectionUtils.isNotEmpty(infoList)) {
|
||||
bmFileInfoMapper.deleteBmFileInfoByIds(infoList.stream().map(BmFileInfo::getId).toArray(Long[]::new));
|
||||
}
|
||||
}
|
||||
}
|
||||
return result > 0 ? AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg()) : AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,4 +110,7 @@ public class OrderInfoDto {
|
|||
@ApiModelProperty(value = "true:出租方 false:承租方")
|
||||
private boolean flag;
|
||||
|
||||
@ApiModelProperty(value = "是否已填写退租检修内容(0 否,1 是)")
|
||||
private Integer isLeaseContent;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.order.service.impl;
|
|||
import com.bonus.common.biz.enums.MaStatusEnum;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import com.bonus.material.lease.mapper.LeaseRepairRecordMapper;
|
||||
import com.bonus.material.order.domain.OrderDetailDto;
|
||||
import com.bonus.material.order.domain.OrderInfoDto;
|
||||
import com.bonus.material.order.mapper.OrderMapper;
|
||||
|
|
@ -25,6 +26,9 @@ public class OrderServiceImpl implements OrderService {
|
|||
@Resource
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
@Resource
|
||||
private LeaseRepairRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Integer submitOrderInfo(List<OrderInfoDto> orderInfoDtos) {
|
||||
|
|
@ -101,6 +105,13 @@ public class OrderServiceImpl implements OrderService {
|
|||
}
|
||||
dto.setStartTime(list.get(0).getRentBeginTime());
|
||||
dto.setEndTime(list.get(0).getRentEndTime());
|
||||
//根据订单id去lease_repair_record表中查询是否已填写退租检修信息
|
||||
int count = mapper.selectLeaseContent(String.valueOf(dto.getOrderId()));
|
||||
if (count > 0) {
|
||||
dto.setIsLeaseContent(1);
|
||||
} else {
|
||||
dto.setIsLeaseContent(0);
|
||||
}
|
||||
}
|
||||
return orderInfoDtos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
d.person_phone as personPhone,
|
||||
d.create_time as createTime,
|
||||
d.update_time as updateTime,
|
||||
c.company_name as companyName,
|
||||
d.own_co as companyId,
|
||||
sd.dept_name as companyName,
|
||||
c.operate_address as operateAddress,
|
||||
mt3.type_id as thirdId,
|
||||
mt3.type_name as thirdName,
|
||||
|
|
@ -80,7 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt1.type_name as firstName
|
||||
FROM
|
||||
ma_dev_info d
|
||||
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
||||
LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id
|
||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = d.type_id and mt4.del_flag = '0'
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt3.parent_id and mt2.del_flag = '0'
|
||||
|
|
@ -182,8 +184,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt4.lease_price as dayLeasePrice,
|
||||
d.person as person,
|
||||
d.person_phone as personPhone,
|
||||
c.company_name as companyName,
|
||||
c.company_id as companyId,
|
||||
d.own_co as companyId,
|
||||
sd.dept_name as companyName,
|
||||
c.operate_address as operateAddress,
|
||||
d.create_time as createTime,
|
||||
mt3.type_id as thirdId,
|
||||
|
|
@ -194,7 +196,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt1.type_name as firstName
|
||||
FROM
|
||||
ma_dev_info d
|
||||
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
||||
LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id
|
||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = d.type_id and mt4.del_flag = '0'
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt3.parent_id and mt2.del_flag = '0'
|
||||
|
|
@ -228,8 +231,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt4.lease_price as dayLeasePrice,
|
||||
d.person as person,
|
||||
d.person_phone as personPhone,
|
||||
c.company_id as companyId,
|
||||
c.company_name as companyName,
|
||||
d.own_co as companyId,
|
||||
sd.dept_name as companyName,
|
||||
c.operate_address as operateAddress,
|
||||
mt3.type_id as thirdId,
|
||||
mt3.type_name as thirdName,
|
||||
mt2.type_id as secondId,
|
||||
|
|
@ -242,7 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
d.update_time as updateTime
|
||||
FROM
|
||||
ma_dev_info d
|
||||
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
||||
LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id
|
||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
||||
LEFT JOIN ma_hot_search h ON d.ma_id = h.ma_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = d.type_id and mt4.del_flag = '0'
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id and mt3.del_flag = '0'
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="maId != null ">ma_id,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="repairNum != null">repair_num,</if>
|
||||
<if test="repairPrice != null and repairPrice != ''">repair_price,</if>
|
||||
<if test="repairChangePrice != null and repairChangePrice != ''">repair_change_price,</if>
|
||||
<if test="repairPrice != null">repair_price,</if>
|
||||
<if test="repairChangePrice != null">repair_change_price,</if>
|
||||
<if test="scrapNum != null">scrap_num,</if>
|
||||
<if test="scrapPrice != null and scrapPrice != ''">scrap_price,</if>
|
||||
<if test="scrapChangePrice != null and scrapChangePrice != ''">scrap_change_price,</if>
|
||||
<if test="scrapPrice != null">scrap_price,</if>
|
||||
<if test="scrapChangePrice != null">scrap_change_price,</if>
|
||||
<if test="scrapReason != null and scrapReason != ''">scrap_reason,</if>
|
||||
<if test="lossNum != null">loss_num,</if>
|
||||
<if test="lossPrice != null">loss_price,</if>
|
||||
|
|
@ -32,11 +32,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="maId != null ">#{maId},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="repairNum != null">#{repairNum},</if>
|
||||
<if test="repairPrice != null and repairPrice != ''">#{repairPrice},</if>
|
||||
<if test="repairChangePrice != null and repairChangePrice != ''">#{repairChangePrice},</if>
|
||||
<if test="repairPrice != null">#{repairPrice},</if>
|
||||
<if test="repairChangePrice != null">#{repairChangePrice},</if>
|
||||
<if test="scrapNum != null">#{scrapNum},</if>
|
||||
<if test="scrapPrice != null and scrapPrice != ''">#{scrapPrice},</if>
|
||||
<if test="scrapChangePrice != null and scrapChangePrice != ''">#{scrapChangePrice},</if>
|
||||
<if test="scrapPrice != null">#{scrapPrice},</if>
|
||||
<if test="scrapChangePrice != null">#{scrapChangePrice},</if>
|
||||
<if test="scrapReason != null and scrapReason != ''">#{scrapReason},</if>
|
||||
<if test="lossNum != null">#{lossNum},</if>
|
||||
<if test="lossPrice != null">#{lossPrice},</if>
|
||||
|
|
@ -446,7 +446,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
lease_repair_record
|
||||
WHERE
|
||||
code = #{orderCode}
|
||||
order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<select id="getLeaseRepairRecordList" resultType="com.bonus.material.lease.domain.LeaseRepairRecord">
|
||||
|
|
|
|||
|
|
@ -182,7 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
b2.name as cityName,
|
||||
m.area_code as areaCode,
|
||||
b.name as areaName,
|
||||
m.address as address
|
||||
m.address as address,
|
||||
m.publish_user as publishUser,
|
||||
m.publish_company as publishCompany
|
||||
FROM
|
||||
ma_lease_info m
|
||||
LEFT JOIN base_address b ON b.code = m.area_code
|
||||
|
|
|
|||
Loading…
Reference in New Issue