dev-discount
胡锐 3 years ago
parent 4bc5510b67
commit 6548741982
  1. 10
      hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java
  2. 2
      hai-bweb/src/main/resources/pre/application.yml
  3. 2
      hai-cweb/src/main/resources/pre/application.yml
  4. 9
      hai-service/src/main/java/com/hai/model/TyOrderModel.java
  5. 8
      hai-service/src/main/java/com/hai/service/impl/HighOilCardRecordServiceImpl.java

@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.File; import java.io.File;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
@Controller @Controller
@ -385,7 +386,12 @@ public class HighTyAgentOilStationController {
} }
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highTyAgentOilStationService.getOrderList(param)));
PageInfo<TyOrderModel> pageInfo = new PageInfo<>(highTyAgentOilStationService.getOrderList(param));
for (TyOrderModel orderModel : pageInfo.getList()) {
orderModel.setOilLiters(orderModel.getTotalPrice().divide(orderModel.getGasPriceGun(), 2, BigDecimal.ROUND_HALF_DOWN));
}
return ResponseMsgUtil.success(pageInfo);
} catch (Exception e) { } catch (Exception e) {
log.error("HighTyAgentController --> getAgentList() error!", e); log.error("HighTyAgentController --> getAgentList() error!", e);
@ -471,6 +477,7 @@ public class HighTyAgentOilStationController {
headList.add("团油订单号"); headList.add("团油订单号");
headList.add("支付类型"); headList.add("支付类型");
headList.add("加油金额"); headList.add("加油金额");
headList.add("加油升数");
headList.add("优惠金额"); headList.add("优惠金额");
headList.add("实付金额"); headList.add("实付金额");
headList.add("油号"); headList.add("油号");
@ -502,6 +509,7 @@ public class HighTyAgentOilStationController {
data.add(orderModel.getGasOrderNo()); data.add(orderModel.getGasOrderNo());
data.add(orderModel.getPayType()); data.add(orderModel.getPayType());
data.add(orderModel.getTotalPrice()); data.add(orderModel.getTotalPrice());
data.add(orderModel.getTotalPrice().divide(orderModel.getGasPriceGun(), 2, BigDecimal.ROUND_HALF_DOWN));
data.add(orderModel.getDeductionPrice()); data.add(orderModel.getDeductionPrice());
data.add(orderModel.getPayRealPrice()); data.add(orderModel.getPayRealPrice());
data.add(orderModel.getGasOilNo()); data.add(orderModel.getGasOilNo());

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -10,6 +10,7 @@ public class TyOrderModel {
private String gasOrderNo; private String gasOrderNo;
private String payType; private String payType;
private BigDecimal totalPrice; private BigDecimal totalPrice;
private BigDecimal oilLiters;
private BigDecimal deductionPrice; private BigDecimal deductionPrice;
private BigDecimal payRealPrice; private BigDecimal payRealPrice;
private String goodsName; private String goodsName;
@ -24,6 +25,14 @@ public class TyOrderModel {
private String agentName; private String agentName;
private String salesmanName; private String salesmanName;
public BigDecimal getOilLiters() {
return oilLiters;
}
public void setOilLiters(BigDecimal oilLiters) {
this.oilLiters = oilLiters;
}
public String getMemPhone() { public String getMemPhone() {
return memPhone; return memPhone;
} }

@ -27,12 +27,16 @@ public class HighOilCardRecordServiceImpl implements HighOilCardRecordService {
@Override @Override
public void insertRecord(HighOilCardRecord oilCardRecord) { public void insertRecord(HighOilCardRecord oilCardRecord) {
oilCardRecord.setOpUserId(0L);
oilCardRecord.setOpUserName("无");
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel != null) { if (userInfoModel != null) {
oilCardRecord.setOpUserId(userInfoModel.getSecUser().getId()); oilCardRecord.setOpUserId(userInfoModel.getSecUser().getId());
oilCardRecord.setOpUserName(userInfoModel.getSecUser().getUserName()); oilCardRecord.setOpUserName(userInfoModel.getSecUser().getUserName());
} else { }
HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class); HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class);
if (userModel == null) {
oilCardRecord.setOpUserId(userModel.getHighUser().getId()); oilCardRecord.setOpUserId(userModel.getHighUser().getId());
oilCardRecord.setOpUserName(userModel.getHighUser().getName()); oilCardRecord.setOpUserName(userModel.getHighUser().getName());
} }

Loading…
Cancel
Save