Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6bb4dd33e1
@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -111,7 +112,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
List<ActiveConsumptionChild> activeConsumptionChildList = activeConsumptionChildService.list(queryWrappers);
|
||||
|
||||
BeanUtils.copyProperties(s,activeConsumptionVO);
|
||||
activeConsumptionVO.setAdaptOil(s.getAdaptOil().split(","));
|
||||
activeConsumptionVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeConsumptionVO.setActiveGift(s.getActiveGift().split(","));
|
||||
activeConsumptionVO.setDieselUserLevel(s.getDieselUserLevel().split(","));
|
||||
activeConsumptionVO.setGasolineUserLevel(s.getGasolineUserLevel().split(","));
|
||||
@ -146,7 +149,9 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
||||
activeConsumptionVO.setDieselUserLevel(consumption.getDieselUserLevel().split(","));
|
||||
activeConsumptionVO.setGasolineUserLevel(consumption.getGasolineUserLevel().split(","));
|
||||
activeConsumptionVO.setNaturalUserLevel(consumption.getNaturalUserLevel().split(","));
|
||||
activeConsumptionVO.setAdaptOil(consumption.getAdaptOil().split(","));
|
||||
activeConsumptionVO.setAdaptOil(Arrays.stream(consumption.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeConsumptionVO.setActiveGift(consumption.getActiveGift().split(","));
|
||||
activeConsumptionVO.setActiveConsumptionChildList(activeConsumptionChildList);
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ public class ActiveConsumptionVO extends Model<ActiveConsumptionVO> {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date activeEndTime;
|
||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||
private String[] adaptOil;
|
||||
private String[] adaptOils;
|
||||
private Integer[] adaptOil;
|
||||
//适用会员类型 0:全部用户 1:全部会员 2:等级会员
|
||||
private String adaptUserType;
|
||||
//会员类型 0:汽油会员 1:柴油会员 2:天然气会员
|
||||
@ -155,11 +156,19 @@ public class ActiveConsumptionVO extends Model<ActiveConsumptionVO> {
|
||||
this.activeEndTime = activeEndTime;
|
||||
}
|
||||
|
||||
public String[] getAdaptOil() {
|
||||
public String[] getAdaptOils() {
|
||||
return adaptOils;
|
||||
}
|
||||
|
||||
public void setAdaptOils(String[] adaptOils) {
|
||||
this.adaptOils = adaptOils;
|
||||
}
|
||||
|
||||
public Integer[] getAdaptOil() {
|
||||
return adaptOil;
|
||||
}
|
||||
|
||||
public void setAdaptOil(String[] adaptOil) {
|
||||
public void setAdaptOil(Integer[] adaptOil) {
|
||||
this.adaptOil = adaptOil;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -112,7 +113,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
||||
List<ActiveDiscountChild> activeDiscountChildList = activeDiscountChildService.list(queryWrappers);
|
||||
|
||||
BeanUtils.copyProperties(s,activeDiscountVO);
|
||||
activeDiscountVO.setAdaptOil(s.getAdaptOil().split(","));
|
||||
activeDiscountVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeDiscountVO.setDieselUserLevel(s.getDieselUserLevel().split(","));
|
||||
activeDiscountVO.setGasolineUserLevel(s.getGasolineUserLevel().split(","));
|
||||
activeDiscountVO.setNaturalUserLevel(s.getNaturalUserLevel().split(","));
|
||||
@ -145,7 +148,9 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
||||
activeDiscountVO.setDieselUserLevel(activeDiscount.getDieselUserLevel().split(","));
|
||||
activeDiscountVO.setGasolineUserLevel(activeDiscount.getGasolineUserLevel().split(","));
|
||||
activeDiscountVO.setNaturalUserLevel(activeDiscount.getNaturalUserLevel().split(","));
|
||||
activeDiscountVO.setAdaptOil(activeDiscount.getAdaptOil().split(","));
|
||||
activeDiscountVO.setAdaptOil(Arrays.stream(activeDiscount.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeDiscountVO.setActiveDiscountChildList(activeDiscountChildList);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ public class ActiveDiscountVO implements Serializable{
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date activeEndTime;
|
||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||
private String[] adaptOil;
|
||||
private String[] adaptOils;
|
||||
private Integer[] adaptOil;
|
||||
//适用会员类型 0:全部用户 1:全部会员 2:等级会员
|
||||
private String adaptUserType;
|
||||
//会员类型 0:汽油会员 1:柴油会员 2:天然气会员
|
||||
@ -110,11 +111,19 @@ public class ActiveDiscountVO implements Serializable{
|
||||
this.activeEndTime = activeEndTime;
|
||||
}
|
||||
|
||||
public String[] getAdaptOil() {
|
||||
public String[] getAdaptOils() {
|
||||
return adaptOils;
|
||||
}
|
||||
|
||||
public void setAdaptOils(String[] adaptOils) {
|
||||
this.adaptOils = adaptOils;
|
||||
}
|
||||
|
||||
public Integer[] getAdaptOil() {
|
||||
return adaptOil;
|
||||
}
|
||||
|
||||
public void setAdaptOil(String[] adaptOil) {
|
||||
public void setAdaptOil(Integer[] adaptOil) {
|
||||
this.adaptOil = adaptOil;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -109,7 +110,9 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
||||
List<ActiveDiscountChild> activeDiscountChildList = activeDiscountChildService.list(queryWrappers);
|
||||
|
||||
BeanUtils.copyProperties(s,activeFullminusVO);
|
||||
activeFullminusVO.setAdaptOil(s.getAdaptOil().split(","));
|
||||
activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeFullminusVO.setDieselUserLevel(s.getDieselUserLevel().split(","));
|
||||
activeFullminusVO.setGasolineUserLevel(s.getGasolineUserLevel().split(","));
|
||||
activeFullminusVO.setNaturalUserLevel(s.getNaturalUserLevel().split(","));
|
||||
@ -142,7 +145,9 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
||||
activeFullminusVO.setDieselUserLevel(activeFullminus.getDieselUserLevel().split(","));
|
||||
activeFullminusVO.setGasolineUserLevel(activeFullminus.getGasolineUserLevel().split(","));
|
||||
activeFullminusVO.setNaturalUserLevel(activeFullminus.getNaturalUserLevel().split(","));
|
||||
activeFullminusVO.setAdaptOil(activeFullminus.getAdaptOil().split(","));
|
||||
activeFullminusVO.setAdaptOil(Arrays.stream(activeFullminus.getAdaptOil().split(","))
|
||||
.map(Integer::valueOf)
|
||||
.toArray(Integer[]::new));
|
||||
activeFullminusVO.setActiveDiscountChildList(activeDiscountChildList);
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ public class ActiveFullminusVO implements Serializable {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date activeEndTime;
|
||||
//适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#
|
||||
private String[] adaptOil;
|
||||
private String[] adaptOils;
|
||||
private Integer[] adaptOil;
|
||||
//适用会员类型 0:全部用户 1:全部会员 2:等级会员
|
||||
private String adaptUserType;
|
||||
//会员类型 0:汽油会员 1:柴油会员 2:天然气会员
|
||||
@ -110,11 +111,19 @@ public class ActiveFullminusVO implements Serializable {
|
||||
this.activeEndTime = activeEndTime;
|
||||
}
|
||||
|
||||
public String[] getAdaptOil() {
|
||||
public String[] getAdaptOils() {
|
||||
return adaptOils;
|
||||
}
|
||||
|
||||
public void setAdaptOils(String[] adaptOils) {
|
||||
this.adaptOils = adaptOils;
|
||||
}
|
||||
|
||||
public Integer[] getAdaptOil() {
|
||||
return adaptOil;
|
||||
}
|
||||
|
||||
public void setAdaptOil(String[] adaptOil) {
|
||||
public void setAdaptOil(Integer[] adaptOil) {
|
||||
this.adaptOil = adaptOil;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardFule.entity.CardFuelDiesel;
|
||||
import com.fuint.business.marketingActivity.cardFule.service.CardFuelDieselService;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.service.OilNameService;
|
||||
import com.fuint.business.store.service.StoreService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
@ -16,6 +18,7 @@ import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -39,6 +42,8 @@ public class CardFuelDieselController extends BaseController {
|
||||
private CardFuelDieselService cardFuelDieselService;
|
||||
@Resource
|
||||
private StoreService storeService;
|
||||
@Autowired
|
||||
private OilNameService oilNameService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
@ -68,6 +73,7 @@ public class CardFuelDieselController extends BaseController {
|
||||
List<CardFuelDiesel> records = page1.getRecords();
|
||||
//返回囤油卡状态
|
||||
for (CardFuelDiesel record : records) {
|
||||
record.setOilType(oilNameService.selectOilNameById(Integer.parseInt(record.getOilType())).getOilName());
|
||||
record.setStatus(record.getStatus().equals("1") ? "true" : "false");
|
||||
if(ObjectUtils.isNotEmpty(record.getActiveTime()) && "1".equals(record.getActiveTime())){
|
||||
record.setActivityProgress("1");
|
||||
|
@ -48,6 +48,7 @@ public class OilGun extends BaseEntity {
|
||||
* 油罐名称
|
||||
*/
|
||||
private String tankName;
|
||||
private String oilNumber;
|
||||
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||
<result property="numberId" column="number_id" jdbcType="INTEGER"/>
|
||||
<result property="tankName" column="tank_name" jdbcType="VARCHAR"/>
|
||||
<result property="oilNumber" column="oil_number" jdbcType="VARCHAR"/>
|
||||
<result property="oilMachineGunNumber" column="oil_machine_gun_number" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
@ -28,35 +29,14 @@
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="OilGunMap">
|
||||
select
|
||||
id, gun_name, tank_id, status, store_id, create_time, update_time, create_by, update_by
|
||||
from oil_gun
|
||||
og.id, og.gun_name, og.tank_id, og.status, og.store_id, og.create_time,og.update_time, og.create_by, og.update_by, ot.oil_number, ot.number_id
|
||||
from oil_gun og
|
||||
left join oil_tank ot on og.tank_id = ot.id
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="gunName != null and gunName != ''">
|
||||
and gun_name = #{gunName}
|
||||
</if>
|
||||
<if test="tankId != null">
|
||||
and tank_id = #{tankId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="storeId != null">
|
||||
and store_id = #{storeId}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
and update_by = #{updateBy}
|
||||
og.store_id = #{oilGun.storeId}
|
||||
|
||||
<if test="oilGun.numberId != null">
|
||||
and ot.number_id = #{oilGun.numberId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user