refactor(sip): 优化订单相关功能
- 修改服务等级设置错误:将产品值改为产品代码 - 调整订单列表排序方式:按项目编号是否为空及项目编号排序 - 修正折扣计算:保留三位小数- 添加订单处理方式字段master
parent
76801aca85
commit
543dfc25f8
|
@ -162,6 +162,10 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private String partnerUserName;
|
private String partnerUserName;
|
||||||
private String partnerPhone;
|
private String partnerPhone;
|
||||||
private String level;
|
private String level;
|
||||||
|
/**
|
||||||
|
* 订单处理方式
|
||||||
|
*/
|
||||||
|
private String processType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -244,7 +244,7 @@ public class DeliveryListServiceImpl implements IDeliveryListService {
|
||||||
private static Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) {
|
private static Date updateStartTimeAndAddList(DeliveryInfoVo deliveryInfoVo, ProductInfo productInfo, Date startTime, List<DeliveryInfoVo.ServiceInfo> serviceInfoList) {
|
||||||
int year = productInfo.getValue() == null ? 0 : Integer.parseInt(productInfo.getValue());
|
int year = productInfo.getValue() == null ? 0 : Integer.parseInt(productInfo.getValue());
|
||||||
DeliveryInfoVo.ServiceInfo serviceInfo = deliveryInfoVo.new ServiceInfo();
|
DeliveryInfoVo.ServiceInfo serviceInfo = deliveryInfoVo.new ServiceInfo();
|
||||||
serviceInfo.setServiceLevel(productInfo.getValue());
|
serviceInfo.setServiceLevel(productInfo.getProductCode());
|
||||||
serviceInfo.setServiceDescribe(productInfo.getDescription());
|
serviceInfo.setServiceDescribe(productInfo.getDescription());
|
||||||
serviceInfo.setServiceStartTime(startTime);
|
serviceInfo.setServiceStartTime(startTime);
|
||||||
serviceInfo.setServiceEndTime(DateUtils.addYears(startTime, year));
|
serviceInfo.setServiceEndTime(DateUtils.addYears(startTime, year));
|
||||||
|
|
|
@ -363,6 +363,7 @@ public class OrderInfoServiceImpl implements IOrderInfoService
|
||||||
if (orderList.getDiscount()!=null){
|
if (orderList.getDiscount()!=null){
|
||||||
amount = amount.multiply(orderList.getDiscount()).setScale(2, RoundingMode.HALF_UP);
|
amount = amount.multiply(orderList.getDiscount()).setScale(2, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
|
orderList.setDiscount(orderList.getDiscount().setScale(3, RoundingMode.HALF_UP));
|
||||||
orderList.setAmount(amount);
|
orderList.setAmount(amount);
|
||||||
}
|
}
|
||||||
return orderListList;
|
return orderListList;
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
select delivery_id from delivery_list where serial_number=#{serialNumber}))
|
select delivery_id from delivery_list where serial_number=#{serialNumber}))
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by t1.created_at desc
|
order by ISNULL(t1.project_code)||t1.project_code='' ,t1.project_code
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectOrderInfoById" parameterType="Long" resultMap="OrderInfoOrderListResult">
|
<select id="selectOrderInfoById" parameterType="Long" resultMap="OrderInfoOrderListResult">
|
||||||
|
|
Loading…
Reference in New Issue