优化问题
This commit is contained in:
parent
3827dad74a
commit
21f8103961
|
|
@ -2,6 +2,8 @@ package com.bonus.common.biz.enums;
|
|||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author bonus
|
||||
*/
|
||||
|
|
@ -41,7 +43,7 @@ public enum MaStatusEnum {
|
|||
public static Integer getCodeByName(String msg) {
|
||||
MaStatusEnum[] maStatusEnums = values();
|
||||
for (MaStatusEnum maStatusEnum : maStatusEnums) {
|
||||
if (maStatusEnum.getName() == msg) {
|
||||
if (Objects.equals(maStatusEnum.getName(), msg)) {
|
||||
return maStatusEnum.getCode();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.material.basic.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
|
|
@ -10,8 +12,6 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
@ -100,7 +100,10 @@ public class BmCompanyAddressController extends BaseController {
|
|||
//@RequiresPermissions("basic:address:edit")
|
||||
@SysLog(title = "企业信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改企业信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody BmCompanyAddress bmCompanyAddress) {
|
||||
public AjaxResult edit(@NotNull @RequestBody BmCompanyAddress bmCompanyAddress) {
|
||||
if (bmCompanyAddress == null || bmCompanyAddress.getId() == null) {
|
||||
return error("ID不能为空");
|
||||
}
|
||||
try {
|
||||
bmCompanyAddress.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
return toAjax(bmCompanyAddressService.updateBmCompanyAddress(bmCompanyAddress));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.bonus.material.basic.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -15,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.basic.domain.BmMessage;
|
||||
import com.bonus.material.basic.service.IBmMessageService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.basic.domain.BmSlideShow;
|
||||
import com.bonus.material.basic.service.IBmSlideShowService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import com.bonus.common.core.utils.DateUtils;
|
|||
import com.bonus.common.core.utils.SpringUtils;
|
||||
import com.bonus.common.redis.service.RedisService;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.basic.mapper.BmMessageMapper;
|
||||
import com.bonus.material.basic.domain.BmMessage;
|
||||
|
|
@ -94,6 +93,7 @@ public class BmMessageServiceImpl implements IBmMessageService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BmMessage> selectBmMessageListFromCacheOne(BmMessage bmMessage) {
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
Long toCompany = bmMessage.getToCompany();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.bonus.material.book.service.impl;
|
|||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.book.domain.BookCarInfoDto;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ package com.bonus.material.device.controller;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.domain.BmCompanyInfo;
|
||||
import com.bonus.common.core.constant.Constants;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -17,8 +15,6 @@ import com.bonus.material.device.domain.vo.DevInfoVo;
|
|||
import com.bonus.material.device.service.DevInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.java.Log;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
|
@ -27,7 +23,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.material.device.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.*;
|
||||
import com.bonus.common.biz.enums.MaStatusEnum;
|
||||
|
|
@ -119,14 +118,14 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
} /*else if (item.getFileType().equals(Long.valueOf(EXAMINATION_PDF))) {
|
||||
devInfoVo.getExaminationPdf().add(item);
|
||||
}*/ else if (item.getFileType().equals(Long.valueOf(INSURANCE_PDF))) {
|
||||
devInfoVo.getInsurancePdf().add(item);
|
||||
// devInfoVo.getInsurancePdf().add(item);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
Table table = new Table();
|
||||
table.setExaminationPdf(devInfoVo.getExaminationPdf());
|
||||
table.setInsurancePdf(devInfoVo.getInsurancePdf());
|
||||
// table.setInsurancePdf(devInfoVo.getInsurancePdf());
|
||||
table.setIdentifyCode(devInfoVo.getIdentifyCode());
|
||||
MaDevQc qc = maDevQcMapper.getQcListByOne(maId);
|
||||
if (Objects.nonNull(qc)) {
|
||||
|
|
@ -408,6 +407,12 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
});
|
||||
fileInfoList.addAll(devInfo.getDetailsFileList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 合格证与检测证明合二为一
|
||||
* 修改人:syruan
|
||||
* 修改时间:2025/02/20
|
||||
* 描述:经沟通,田聪聪提出需求,检测证明与合格证合二为一
|
||||
if (CollectionUtil.isNotEmpty(devInfo.getTableList().get(i).getInsurancePdf())) {
|
||||
devInfo.getTableList().get(i).getInsurancePdf().removeIf(Objects::isNull);
|
||||
devInfo.getTableList().get(i).getInsurancePdf().forEach(item -> {
|
||||
|
|
@ -415,7 +420,7 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
item.setFileType(Long.valueOf(INSURANCE_PDF));
|
||||
});
|
||||
fileInfoList.addAll(devInfo.getTableList().get(i).getInsurancePdf());
|
||||
}
|
||||
} */
|
||||
if (CollectionUtil.isNotEmpty(devInfo.getTableList().get(i).getExaminationPdf())) {
|
||||
devInfo.getTableList().get(i).getExaminationPdf().removeIf(Objects::isNull);
|
||||
devInfo.getTableList().get(i).getExaminationPdf().forEach(item -> {
|
||||
|
|
@ -479,14 +484,18 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
});
|
||||
fileInfoList.addAll(devInfo.getDetailsFileList());
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(table.getInsurancePdf())) {
|
||||
table.getInsurancePdf().removeIf(Objects::isNull);
|
||||
table.getInsurancePdf().forEach(item -> {
|
||||
item.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
|
||||
item.setFileType(Long.valueOf(INSURANCE_PDF));
|
||||
});
|
||||
fileInfoList.addAll(table.getInsurancePdf());
|
||||
}
|
||||
// 合格证与检测证明合二为一
|
||||
// 修改人:syruan
|
||||
// 修改时间:2025/02/20
|
||||
// 描述:经沟通,田聪聪提出需求,检测证明与合格证合二为一
|
||||
// if (CollectionUtil.isNotEmpty(table.getInsurancePdf())) {
|
||||
// table.getInsurancePdf().removeIf(Objects::isNull);
|
||||
// table.getInsurancePdf().forEach(item -> {
|
||||
// item.setTaskType(MaterialConstants.MATERIAL_FILE_TYPE_CODE);
|
||||
// item.setFileType(Long.valueOf(INSURANCE_PDF));
|
||||
// });
|
||||
// fileInfoList.addAll(table.getInsurancePdf());
|
||||
// }
|
||||
if (CollectionUtil.isNotEmpty(table.getExaminationPdf())) {
|
||||
table.getExaminationPdf().removeIf(Objects::isNull);
|
||||
table.getExaminationPdf().forEach(item -> {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import com.bonus.common.core.web.domain.AjaxResult;
|
|||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.device.domain.MaDevRm;
|
||||
import com.bonus.material.device.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.device.mapper.DevInfoMapper;
|
||||
import com.bonus.material.device.mapper.MaDevRmMapper;
|
||||
import com.bonus.material.device.service.MaDevRmService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ public class LeaseRepairRecordServiceImpl implements LeaseRepairRecordService {
|
|||
}
|
||||
}
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
result += orderMapper.updateOrderStatus(leasePriceRecord.getOrderId(), null, String.valueOf(OrderStatusEnum.ORDER_TERMINATED.getStatus()), userName);
|
||||
result += orderMapper.updateOrderStatus(leasePriceRecord.getOrderId(), null, String.valueOf(OrderStatusEnum.ORDER_TERMINATED.getStatus()), userName, null);
|
||||
if (result > 0) {
|
||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import javax.annotation.Resource;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 租赁需求大厅实现层
|
||||
|
|
@ -344,7 +343,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
*/
|
||||
@Override
|
||||
public List<MaLeaseVo> leaseList(MaLease maLease) {
|
||||
List<MaLeaseVo> list = new ArrayList<>();
|
||||
List<MaLeaseVo> list;
|
||||
list = leaseInfoMapper.leaseList(maLease);
|
||||
int result = 0;
|
||||
//查询列表中数据,如果需求截止日期超过当前,则修改状态为已过期
|
||||
|
|
@ -366,6 +365,7 @@ public class MaLeaseInfoServiceImpl implements MaLeaseInfoService {
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MaLeaseInfo> getLeaseStatusCount(MaLeaseInfo info) {
|
||||
//true:出租方 false:承租方
|
||||
if (info.isFlag()) {
|
||||
|
|
|
|||
|
|
@ -289,9 +289,9 @@ public class OrderController extends BaseController {
|
|||
XWPFDocument document = new XWPFDocument(inputStream);
|
||||
SimpleDateFormat inputFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.ENGLISH);
|
||||
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date1 = inputFormat.parse(orderInfoDto.getStartTime().toString());
|
||||
Date date1 = inputFormat.parse(String.valueOf(orderInfoDto.getDetailsList().get(0).getRentBeginTime()));
|
||||
String startTime = outputFormat.format(date1);
|
||||
Date date2 = inputFormat.parse(orderInfoDto.getEndTime().toString());
|
||||
Date date2 = inputFormat.parse(String.valueOf(orderInfoDto.getDetailsList().get(0).getRentEndTime()));
|
||||
String endTime = outputFormat.format(date2);
|
||||
Map<String, String> replacements = new HashMap<>();
|
||||
//订单日期
|
||||
|
|
@ -365,8 +365,11 @@ public class OrderController extends BaseController {
|
|||
String text = run.getText(0);
|
||||
if (text != null) {
|
||||
for (Map.Entry<String, String> entry : replacements.entrySet()) {
|
||||
// 检查 entry.getValue() 是否为 null
|
||||
if (entry.getValue() != null) {
|
||||
text = text.replace(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
run.setText(text, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -487,7 +490,7 @@ public class OrderController extends BaseController {
|
|||
|
||||
// 遍历订单详情并动态插入数据行
|
||||
SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
int num = 1;
|
||||
int num = orderDetails.size();
|
||||
for (OrderDetailDto detail : orderDetails) {
|
||||
XWPFTableRow newRow = table.insertNewTableRow(headerRowIndex + 1);
|
||||
|
||||
|
|
@ -498,7 +501,7 @@ public class OrderController extends BaseController {
|
|||
int cellIndex = 0;
|
||||
// 序号
|
||||
newRow.getCell(cellIndex++).setText(String.valueOf(num));
|
||||
num++;
|
||||
num--;
|
||||
|
||||
// 机具名称
|
||||
newRow.getCell(cellIndex++).setText(detail.getDeviceName());
|
||||
|
|
@ -522,7 +525,7 @@ public class OrderController extends BaseController {
|
|||
newRow.getCell(cellIndex++).setText(detail.getCosts() + "元");
|
||||
|
||||
// 备注
|
||||
newRow.getCell(cellIndex).setText("这是备注");
|
||||
newRow.getCell(cellIndex).setText("");
|
||||
// 填充最后一行(合计行)
|
||||
XWPFTableRow footerRow = table.getRow(footerRowIndex);
|
||||
int footerCellIndex = 0;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ public class OrderDetailDto {
|
|||
@ApiModelProperty(value = "订单code")
|
||||
private String orderCode;
|
||||
|
||||
@ApiModelProperty(value = "订单备注")
|
||||
private String orderRemark;
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Integer maId;
|
||||
|
||||
|
|
@ -164,6 +167,7 @@ public class OrderDetailDto {
|
|||
|
||||
@ApiModelProperty(value = "卖方出租方公司名称")
|
||||
private String sellerCompanyName;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unitName;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public interface OrderMapper {
|
|||
|
||||
void updateMaStatus(OrderDetailDto orderDetailDto);
|
||||
|
||||
Integer updateOrderStatus(@Param("orderId") Integer orderId, @Param("maIds") List<Integer> maIds, @Param("orderStatus") String orderStatus,@Param("userName") String userName);
|
||||
Integer updateOrderStatus(@Param("orderId") Integer orderId, @Param("maIds") List<Integer> maIds, @Param("orderStatus") String orderStatus,@Param("userName") String userName, @Param("remark") String remark);
|
||||
|
||||
Integer updateDevCount(OrderDetailDto orderDetailDto);
|
||||
Integer updateAddDevCount(OrderDetailDto orderDetailDto);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import com.bonus.material.basic.domain.BmMessage;
|
|||
import com.bonus.material.basic.mapper.BmMessageMapper;
|
||||
import com.bonus.material.common.config.RemoteConfig;
|
||||
import com.bonus.material.comprehensive.entity.RentDetailDto;
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||
import com.bonus.material.device.mapper.DevInfoMapper;
|
||||
import com.bonus.material.largeScreen.entity.OrderData;
|
||||
|
|
@ -57,7 +58,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
private BmMessageMapper bmMessageMapper;
|
||||
|
||||
@Resource
|
||||
DevInfoMapper devInfoMapper;
|
||||
private DevInfoMapper devInfoMapper;
|
||||
|
||||
@Resource
|
||||
private LeaseRepairRecordMapper leaseRepairRecordMapper;
|
||||
|
|
@ -74,27 +75,26 @@ public class OrderServiceImpl implements OrderService {
|
|||
for (OrderInfoDto orderInfoDto : orderInfoDtos) {
|
||||
// 首先判断库存是否足够
|
||||
List<OrderDetailDto> orderDetailDtos = orderInfoDto.getDetailsList();
|
||||
for (OrderDetailDto orderDetailDto : orderDetailDtos) {
|
||||
// 如果是数量设备 ,改库存
|
||||
/* if ("1".equals(orderDetailDto.getManageType())) {
|
||||
// 再查询库存是否足够
|
||||
DevInfo devInfo = orderMapper.getdeviceCount(orderDetailDto);
|
||||
if (devInfo.getDeviceCount() == 0) {
|
||||
// 查询库存是否为0,是的话让它下架
|
||||
orderDetailDto.setMaStatus(MaStatusEnum.ON_HIRE.getCode().toString());
|
||||
orderMapper.updateDeviceStatus(orderDetailDto);
|
||||
throw new RuntimeException(devInfo.getDeviceName() + "已下架,无法下单");
|
||||
} else if (devInfo.getDeviceCount() < orderDetailDto.getNum()) {
|
||||
throw new RuntimeException(devInfo.getDeviceName() + "库存不足,无法下单");
|
||||
} else {
|
||||
// 改库存
|
||||
orderMapper.updateDevCount(orderDetailDto);
|
||||
orderDetailDtos.removeIf(Objects::isNull);
|
||||
if (orderDetailDtos.isEmpty()) {
|
||||
throw new RuntimeException("请正确添加设备");
|
||||
}
|
||||
} else {*/
|
||||
for (OrderDetailDto orderDetailDto : orderDetailDtos) {
|
||||
// 先判断要租赁的设备状态是否正常
|
||||
DevInfo maInfo = devInfoMapper.getMaStatusByMaId(Long.valueOf(orderDetailDto.getMaId()));
|
||||
if (maInfo == null || maInfo.getMaStatus() == null) {
|
||||
throw new RuntimeException("设备信息异常");
|
||||
}
|
||||
if (!maInfo.getMaStatus().equals(MaStatusEnum.LISTING.getCode())) {
|
||||
throw new RuntimeException("设备非上架状态,无法下单!");
|
||||
}
|
||||
|
||||
//如果是编码设备,改设备状态为在租
|
||||
orderDetailDto.setMaStatus(MaStatusEnum.UNDER_RENT.getCode().toString());
|
||||
orderMapper.updateDeviceStatus(orderDetailDto);
|
||||
// }
|
||||
Integer updateDeviceStatus = orderMapper.updateDeviceStatus(orderDetailDto);
|
||||
if (updateDeviceStatus < 1) {
|
||||
throw new RuntimeException("设备状态修改失败");
|
||||
}
|
||||
// 更改购物车状态为已下单
|
||||
orderMapper.updateMaStatus(orderDetailDto);
|
||||
}
|
||||
|
|
@ -288,7 +288,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
}
|
||||
}
|
||||
String userName = SecurityUtils.getLoginUser().getUsername();
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getOrderId(), orderInfoDto.getMaIds(), orderInfoDto.getOrderStatus(), userName);
|
||||
Integer i = orderMapper.updateOrderStatus(orderInfoDto.getOrderId(), orderInfoDto.getMaIds(), orderInfoDto.getOrderStatus(), userName, orderInfoDto.getOrderRemark());
|
||||
if (!CollectionUtils.isEmpty(dtos)) {
|
||||
OptionalInt minOrderStatus = dtos.stream().mapToInt(o -> Integer.parseInt(o.getOrderStatus())).min();
|
||||
if (minOrderStatus.isPresent()) {
|
||||
|
|
@ -309,7 +309,7 @@ public class OrderServiceImpl implements OrderService {
|
|||
}
|
||||
}
|
||||
try {
|
||||
if (dtos.size() > 0 && CollectionUtil.isNotEmpty(dtos)) {
|
||||
if (!dtos.isEmpty() && CollectionUtil.isNotEmpty(dtos)) {
|
||||
for (OrderDetailDto dto : dtos) {
|
||||
BmMessage bmMessage = new BmMessage();
|
||||
bmMessage.setCreateTime(DateUtils.getNowDate());
|
||||
|
|
@ -325,12 +325,10 @@ public class OrderServiceImpl implements OrderService {
|
|||
if (OrderStatusEnum.TO_ORDER_PLACED.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_AWAITING_RECEIPT.getStatus().toString().equals(orderInfoDto.getOrderStatus())
|
||||
|| OrderStatusEnum.ORDER_UNDER_LEASE.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_FINISHED.getStatus().toString().equals(orderInfoDto.getOrderStatus())
|
||||
|| OrderStatusEnum.ORDER_CANCEL.getStatus().toString().equals(orderInfoDto.getOrderStatus())) {
|
||||
//bmMessage.setToUser(Long.parseLong(dto.geuser()));
|
||||
bmMessage.setToCompany(Long.valueOf(dto.getSellerCompany()));
|
||||
} else if (OrderStatusEnum.ORDER_RECEIVE.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_PENDING_SHIPMENT.getStatus().toString().equals(orderInfoDto.getOrderStatus())
|
||||
|| OrderStatusEnum.ORDER_REPAIRED.getStatus().toString().equals(orderInfoDto.getOrderStatus()) || OrderStatusEnum.ORDER_TERMINATED.getStatus().toString().equals(orderInfoDto.getOrderStatus())) {
|
||||
// 已接单、已出库、已检修、已结算 通知承租方
|
||||
//bmMessage.setToUser(Long.parseLong(dto.geuse()));
|
||||
bmMessage.setToCompany(Long.valueOf(dto.getBuyerCompany()));
|
||||
}
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + bmMessage.getFromCompany() + ":" + bmMessage.getToCompany();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
|
|
|
|||
|
|
@ -273,6 +273,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE m.lease_status = '0'
|
||||
<if test="companyId != null and companyId != ''"> and m.publish_company = #{companyId}</if>
|
||||
<if test="cityCode != null"> and m.city_code = #{cityCode}</if>
|
||||
<if test="typeId != null and typeId != ''">
|
||||
and FIND_IN_SET(#{typeId}, type_ids) > 0
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (
|
||||
locate(#{keyWord},m.lease_name) > 0
|
||||
|
|
|
|||
|
|
@ -44,28 +44,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="orderStatus == 2">
|
||||
,receiving_user = #{userName}
|
||||
,receiving_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
<if test="orderStatus == 3">
|
||||
,pre_outbound_user = #{userName}
|
||||
,pre_outbound_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
<if test="orderStatus == 4">
|
||||
,take_over_user = #{userName}
|
||||
,take_over_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
<if test="orderStatus == 5">
|
||||
,rent_over_user = #{userName}
|
||||
,rent_over_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
-- ah-simple 临时改动 START
|
||||
<if test="orderStatus == 20">
|
||||
,rent_over_user = #{userName}
|
||||
,rent_over_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
-- ah-simple 临时改动 END
|
||||
<if test="orderStatus == 99">
|
||||
,refuse_user = #{userName}
|
||||
,refuse_time = now()
|
||||
,order_remark = #{remark}
|
||||
</if>
|
||||
where order_id = #{orderId}
|
||||
<if test="maIds != null and maIds.size() > 0">
|
||||
|
|
|
|||
Loading…
Reference in New Issue