no message
parent
57182b423e
commit
effa3d223c
|
|
@ -0,0 +1 @@
|
||||||
|
target/
|
||||||
|
|
@ -7567,16 +7567,48 @@ void createQKCusFee(Order order){
|
||||||
}
|
}
|
||||||
|
|
||||||
void createhlyjxcqFee(Order order){
|
void createhlyjxcqFee(Order order){
|
||||||
String province="";
|
|
||||||
if(order.getToCityCountiy()!=null){
|
if (order.getFromCityCountiy() == null || order.getToCityCountiy() == null) {
|
||||||
if(order.getToCityCountiy().getZone()!=null){
|
throw new BusinessException("城市信息为空!");
|
||||||
province=order.getToCityCountiy().getZone().getName();
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
throw new BusinessException("送货城市信息为空!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(province.equals("江西省")){
|
String lineName = order.getFromCityCountiy().getName() + "-" + order.getToCityCountiy().getName();
|
||||||
|
|
||||||
|
|
||||||
|
List<Contract> contracts = commonDao.findByQuery(" from Contract co where co.balance.id=:id ",
|
||||||
|
new String[] { "id"},new Object[] {order.getConsignor().getId()});
|
||||||
|
|
||||||
|
Contract con = (contracts != null && !contracts.isEmpty()) ? contracts.get(0) : null;
|
||||||
|
|
||||||
|
if (con != null) {
|
||||||
|
List<ContractRate> contractRates = commonDao.findByQuery(" from ContractRate cr where cr.contract.id=:id and cr.routeFee.name=:name ",
|
||||||
|
new String[] {"id", "name"},new Object[] {con.getId(),lineName});
|
||||||
|
|
||||||
|
ContractRate cr = (contractRates != null && !contractRates.isEmpty()) ? contractRates.get(0) : null;
|
||||||
|
|
||||||
|
if(cr!=null){
|
||||||
|
double price = cr.getPrice1(); // 单价
|
||||||
|
double volume = Math.max(order.getVolume(), 0.1);
|
||||||
|
double ysf = volume * price;
|
||||||
|
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "运输费", ysf);
|
||||||
|
|
||||||
|
String province = order.getToCityCountiy().getZone().getName();//省
|
||||||
|
double additionalFee = 0;
|
||||||
|
|
||||||
|
if ("江西省".equals(province) && order.getVolume() < 2) {
|
||||||
|
additionalFee = 20;
|
||||||
|
} else if ("襄阳市".equals(order.getToCityCountiy().getName()) && order.getVolume() < 2) {
|
||||||
|
additionalFee = 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (additionalFee > 0) {
|
||||||
|
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "送货费", additionalFee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*if(province.equals("江西省")){
|
||||||
if(order.getVolume()<=0.5){
|
if(order.getVolume()<=0.5){
|
||||||
double ysf=0.5*155;
|
double ysf=0.5*155;
|
||||||
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "运输费", ysf);
|
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "运输费", ysf);
|
||||||
|
|
@ -7602,7 +7634,7 @@ void createQKCusFee(Order order){
|
||||||
double ysf=order.getVolume()*55;
|
double ysf=order.getVolume()*55;
|
||||||
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "运输费", ysf);
|
feeManager.saveInputFee(order.getId(), BillObjectType.ORDER, null, "运输费", ysf);
|
||||||
|
|
||||||
}
|
} */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue