提交代码

dev-discount
胡锐 2 years ago
parent c0e5e35f03
commit 890989902b
  1. 46
      hai-bweb/src/main/java/com/bweb/controller/HighGasClassGroupTaskController.java
  2. 16
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  3. 46
      hai-service/src/main/java/com/hai/dao/HighChildOrderMapper.java
  4. 42
      hai-service/src/main/java/com/hai/dao/HighChildOrderSqlProvider.java
  5. 25
      hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapper.java
  6. 5
      hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java
  7. 14
      hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskSqlProvider.java
  8. 48
      hai-service/src/main/java/com/hai/entity/HighChildOrder.java
  9. 190
      hai-service/src/main/java/com/hai/entity/HighChildOrderExample.java
  10. 16
      hai-service/src/main/java/com/hai/entity/HighGasClassGroupTask.java
  11. 60
      hai-service/src/main/java/com/hai/entity/HighGasClassGroupTaskExample.java
  12. 30
      hai-service/src/main/java/com/hai/model/GasClassGroupTaskDataCount.java
  13. 2
      hai-service/src/main/java/com/hai/service/HighGasClassGroupTaskService.java
  14. 16
      hai-service/src/main/java/com/hai/service/impl/HighGasClassGroupTaskServiceImpl.java

@ -8,6 +8,9 @@ import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighGasClassGroupTask;
import com.hai.enum_type.GasClassGroupTaskStatus;
import com.hai.model.GasClassGroupTaskDataCount;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.service.HighGasClassGroupTaskService; import com.hai.service.HighGasClassGroupTaskService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -18,7 +21,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
@ -95,6 +101,46 @@ public class HighGasClassGroupTaskController {
} }
} }
@RequestMapping(value = "/getCurrentClassGroupTask", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询当前班次")
public ResponseData getCurrentClassGroupTask(@RequestParam(name = "gasId", required = true) Long gasId) {
try {
GasClassGroupTaskDataCount dataCount;
Map<String,Object> param = new HashMap<>();
param.put("merchantStoreId", gasId);
param.put("status", GasClassGroupTaskStatus.status1.getStatus());
List<HighGasClassGroupTask> list = gasClassGroupTaskService.getGroupTaskList(param);
if (list.size() > 0) {
dataCount = gasClassGroupTaskService.countGroupTaskData(gasId,
list.get(0).getClassNum(),
list.get(0).getGasClassGroupId(),
list.get(0).getStatus(),
list.get(0).getStartTime(),
null
);
return ResponseMsgUtil.success(dataCount);
}
dataCount = new GasClassGroupTaskDataCount();
dataCount.setStatus(0);
dataCount.setRefuelPrice(new BigDecimal("0"));
dataCount.setRefuelNum(0);
dataCount.setRefuelLiters(new BigDecimal("0"));
dataCount.setRefundPrice(new BigDecimal("0"));
dataCount.setRefundNum(0);
dataCount.setRefundLiters(new BigDecimal("0"));
return ResponseMsgUtil.success(dataCount);
} catch (Exception e) {
log.error("HighGasClassGroupTaskController --> getCurrentClassGroupTask() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getClassGroupTaskById", method = RequestMethod.GET) @RequestMapping(value = "/getClassGroupTaskById", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询班组任务记录") @ApiOperation(value = "查询班组任务记录")

@ -19,6 +19,7 @@ import com.hai.config.CommonSysConst;
import com.hai.config.TuanYouConfig; import com.hai.config.TuanYouConfig;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.enum_type.DiscountUseScope; import com.hai.enum_type.DiscountUseScope;
import com.hai.enum_type.GasClassGroupTaskStatus;
import com.hai.model.GasPayPriceModel; import com.hai.model.GasPayPriceModel;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
@ -99,6 +100,9 @@ public class HighOrderController {
@Resource @Resource
private HighGasStaffService gasStaffService; private HighGasStaffService gasStaffService;
@Resource
private HighGasClassGroupTaskService gasClassGroupTaskService;
@RequestMapping(value="/addOrder",method = RequestMethod.POST) @RequestMapping(value="/addOrder",method = RequestMethod.POST)
@ResponseBody @ResponseBody
@ApiOperation(value = "增加订单") @ApiOperation(value = "增加订单")
@ -271,6 +275,18 @@ public class HighOrderController {
} }
} }
// 查询加油站是否开启班组
Map<String, Object> classGroup = new HashMap<>();
classGroup.put("merchantStoreId", childOrder.getGoodsId());
classGroup.put("status", GasClassGroupTaskStatus.status1.getStatus());
List<HighGasClassGroupTask> groupTaskList = gasClassGroupTaskService.getGroupTaskList(classGroup);
if (groupTaskList.size() > 0) {
HighGasClassGroupTask groupTask = groupTaskList.get(0);
childOrder.setGasClassGroupId(groupTask.getGasClassGroupId());
childOrder.setGasClassGroupName(groupTask.getGasClassGroupName());
childOrder.setGasClassGroupTaskId(groupTask.getId());
}
// 查询门店 // 查询门店
HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(childOrder.getGoodsId()); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreById(childOrder.getGoodsId());
if (store == null) { if (store == null) {

@ -54,13 +54,14 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_price_vip, gas_price_official, ", "gas_price_vip, gas_price_official, ",
"gas_oil_liters, gas_discount, ", "gas_oil_liters, gas_discount, ",
"gas_oil_subsidy, gas_liters_preferences, ", "gas_oil_subsidy, gas_liters_preferences, ",
"gas_price_preferences, gas_staff_id, ", "gas_price_preferences, gas_class_group_id, ",
"gas_staff_name, gas_salesman_id, ", "gas_class_group_name, gas_class_group_task_id, ",
"gas_salesman_name, gas_agent_id, ", "gas_staff_id, gas_staff_name, ",
"gas_agent_name, gas_org_id, ", "gas_salesman_id, gas_salesman_name, ",
"gas_org_name, ext_1, ", "gas_agent_id, gas_agent_name, ",
"ext_2, ext_3, ext_4, ", "gas_org_id, gas_org_name, ",
"ext_5, ext_6)", "ext_1, ext_2, ext_3, ",
"ext_4, ext_5, ext_6)",
"values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ", "values (#{orderId,jdbcType=BIGINT}, #{memId,jdbcType=BIGINT}, ",
"#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ",
"#{storeAddress,jdbcType=VARCHAR}, #{goodsType,jdbcType=INTEGER}, ", "#{storeAddress,jdbcType=VARCHAR}, #{goodsType,jdbcType=INTEGER}, ",
@ -76,13 +77,14 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ", "#{gasPriceVip,jdbcType=DECIMAL}, #{gasPriceOfficial,jdbcType=DECIMAL}, ",
"#{gasOilLiters,jdbcType=DECIMAL}, #{gasDiscount,jdbcType=DECIMAL}, ", "#{gasOilLiters,jdbcType=DECIMAL}, #{gasDiscount,jdbcType=DECIMAL}, ",
"#{gasOilSubsidy,jdbcType=DECIMAL}, #{gasLitersPreferences,jdbcType=DECIMAL}, ", "#{gasOilSubsidy,jdbcType=DECIMAL}, #{gasLitersPreferences,jdbcType=DECIMAL}, ",
"#{gasPricePreferences,jdbcType=DECIMAL}, #{gasStaffId,jdbcType=BIGINT}, ", "#{gasPricePreferences,jdbcType=DECIMAL}, #{gasClassGroupId,jdbcType=BIGINT}, ",
"#{gasStaffName,jdbcType=VARCHAR}, #{gasSalesmanId,jdbcType=BIGINT}, ", "#{gasClassGroupName,jdbcType=VARCHAR}, #{gasClassGroupTaskId,jdbcType=BIGINT}, ",
"#{gasSalesmanName,jdbcType=VARCHAR}, #{gasAgentId,jdbcType=BIGINT}, ", "#{gasStaffId,jdbcType=BIGINT}, #{gasStaffName,jdbcType=VARCHAR}, ",
"#{gasAgentName,jdbcType=VARCHAR}, #{gasOrgId,jdbcType=BIGINT}, ", "#{gasSalesmanId,jdbcType=BIGINT}, #{gasSalesmanName,jdbcType=VARCHAR}, ",
"#{gasOrgName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", "#{gasAgentId,jdbcType=BIGINT}, #{gasAgentName,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ", "#{gasOrgId,jdbcType=BIGINT}, #{gasOrgName,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighChildOrder record); int insert(HighChildOrder record);
@ -125,6 +127,9 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL), @Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT), @Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT), @Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
@ -149,9 +154,10 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ", "sale_count, total_price, giveaway_type, child_orde_status, praise_status, gas_oil_no, ",
"gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ", "gas_gun_no, gas_oil_type, gas_order_no, gas_price_platform, gas_price_gun, gas_price_vip, ",
"gas_price_official, gas_oil_liters, gas_discount, gas_oil_subsidy, gas_liters_preferences, ", "gas_price_official, gas_oil_liters, gas_discount, gas_oil_subsidy, gas_liters_preferences, ",
"gas_price_preferences, gas_staff_id, gas_staff_name, gas_salesman_id, gas_salesman_name, ", "gas_price_preferences, gas_class_group_id, gas_class_group_name, gas_class_group_task_id, ",
"gas_agent_id, gas_agent_name, gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ", "gas_staff_id, gas_staff_name, gas_salesman_id, gas_salesman_name, gas_agent_id, ",
"ext_4, ext_5, ext_6", "gas_agent_name, gas_org_id, gas_org_name, ext_1, ext_2, ext_3, ext_4, ext_5, ",
"ext_6",
"from high_child_order", "from high_child_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -188,6 +194,9 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
@Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL), @Result(column="gas_oil_subsidy", property="gasOilSubsidy", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL), @Result(column="gas_liters_preferences", property="gasLitersPreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL), @Result(column="gas_price_preferences", property="gasPricePreferences", jdbcType=JdbcType.DECIMAL),
@Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_class_group_task_id", property="gasClassGroupTaskId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT), @Result(column="gas_staff_id", property="gasStaffId", jdbcType=JdbcType.BIGINT),
@Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_staff_name", property="gasStaffName", jdbcType=JdbcType.VARCHAR),
@Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT), @Result(column="gas_salesman_id", property="gasSalesmanId", jdbcType=JdbcType.BIGINT),
@ -247,6 +256,9 @@ public interface HighChildOrderMapper extends HighChildOrderMapperExt {
"gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},", "gas_oil_subsidy = #{gasOilSubsidy,jdbcType=DECIMAL},",
"gas_liters_preferences = #{gasLitersPreferences,jdbcType=DECIMAL},", "gas_liters_preferences = #{gasLitersPreferences,jdbcType=DECIMAL},",
"gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL},", "gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL},",
"gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT},",
"gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},",
"gas_class_group_task_id = #{gasClassGroupTaskId,jdbcType=BIGINT},",
"gas_staff_id = #{gasStaffId,jdbcType=BIGINT},", "gas_staff_id = #{gasStaffId,jdbcType=BIGINT},",
"gas_staff_name = #{gasStaffName,jdbcType=VARCHAR},", "gas_staff_name = #{gasStaffName,jdbcType=VARCHAR},",
"gas_salesman_id = #{gasSalesmanId,jdbcType=BIGINT},", "gas_salesman_id = #{gasSalesmanId,jdbcType=BIGINT},",

@ -152,6 +152,18 @@ public class HighChildOrderSqlProvider {
sql.VALUES("gas_price_preferences", "#{gasPricePreferences,jdbcType=DECIMAL}"); sql.VALUES("gas_price_preferences", "#{gasPricePreferences,jdbcType=DECIMAL}");
} }
if (record.getGasClassGroupId() != null) {
sql.VALUES("gas_class_group_id", "#{gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.VALUES("gas_class_group_name", "#{gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.VALUES("gas_class_group_task_id", "#{gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) { if (record.getGasStaffId() != null) {
sql.VALUES("gas_staff_id", "#{gasStaffId,jdbcType=BIGINT}"); sql.VALUES("gas_staff_id", "#{gasStaffId,jdbcType=BIGINT}");
} }
@ -249,6 +261,9 @@ public class HighChildOrderSqlProvider {
sql.SELECT("gas_oil_subsidy"); sql.SELECT("gas_oil_subsidy");
sql.SELECT("gas_liters_preferences"); sql.SELECT("gas_liters_preferences");
sql.SELECT("gas_price_preferences"); sql.SELECT("gas_price_preferences");
sql.SELECT("gas_class_group_id");
sql.SELECT("gas_class_group_name");
sql.SELECT("gas_class_group_task_id");
sql.SELECT("gas_staff_id"); sql.SELECT("gas_staff_id");
sql.SELECT("gas_staff_name"); sql.SELECT("gas_staff_name");
sql.SELECT("gas_salesman_id"); sql.SELECT("gas_salesman_id");
@ -408,6 +423,18 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}"); sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}");
} }
if (record.getGasClassGroupId() != null) {
sql.SET("gas_class_group_id = #{record.gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.SET("gas_class_group_task_id = #{record.gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) { if (record.getGasStaffId() != null) {
sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}"); sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}");
} }
@ -504,6 +531,9 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}"); sql.SET("gas_oil_subsidy = #{record.gasOilSubsidy,jdbcType=DECIMAL}");
sql.SET("gas_liters_preferences = #{record.gasLitersPreferences,jdbcType=DECIMAL}"); sql.SET("gas_liters_preferences = #{record.gasLitersPreferences,jdbcType=DECIMAL}");
sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}"); sql.SET("gas_price_preferences = #{record.gasPricePreferences,jdbcType=DECIMAL}");
sql.SET("gas_class_group_id = #{record.gasClassGroupId,jdbcType=BIGINT}");
sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}");
sql.SET("gas_class_group_task_id = #{record.gasClassGroupTaskId,jdbcType=BIGINT}");
sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}"); sql.SET("gas_staff_id = #{record.gasStaffId,jdbcType=BIGINT}");
sql.SET("gas_staff_name = #{record.gasStaffName,jdbcType=VARCHAR}"); sql.SET("gas_staff_name = #{record.gasStaffName,jdbcType=VARCHAR}");
sql.SET("gas_salesman_id = #{record.gasSalesmanId,jdbcType=BIGINT}"); sql.SET("gas_salesman_id = #{record.gasSalesmanId,jdbcType=BIGINT}");
@ -652,6 +682,18 @@ public class HighChildOrderSqlProvider {
sql.SET("gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL}"); sql.SET("gas_price_preferences = #{gasPricePreferences,jdbcType=DECIMAL}");
} }
if (record.getGasClassGroupId() != null) {
sql.SET("gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT}");
}
if (record.getGasClassGroupName() != null) {
sql.SET("gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR}");
}
if (record.getGasClassGroupTaskId() != null) {
sql.SET("gas_class_group_task_id = #{gasClassGroupTaskId,jdbcType=BIGINT}");
}
if (record.getGasStaffId() != null) { if (record.getGasStaffId() != null) {
sql.SET("gas_staff_id = #{gasStaffId,jdbcType=BIGINT}"); sql.SET("gas_staff_id = #{gasStaffId,jdbcType=BIGINT}");
} }

@ -41,16 +41,18 @@ public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapper
@Insert({ @Insert({
"insert into high_gas_class_group_task (gas_class_group_id, gas_class_group_name, ", "insert into high_gas_class_group_task (gas_class_group_id, gas_class_group_name, ",
"merchant_store_id, merchant_store_name, ", "merchant_store_id, merchant_store_name, ",
"start_time, end_time, ", "class_num, start_time, ",
"data_count, `status`, ", "end_time, data_count, ",
"create_time, update_time, ", "`status`, create_time, ",
"ext_1, ext_2, ext_3)", "update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ", "values (#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ",
"#{merchantStoreId,jdbcType=BIGINT}, #{merchantStoreName,jdbcType=VARCHAR}, ", "#{merchantStoreId,jdbcType=BIGINT}, #{merchantStoreName,jdbcType=VARCHAR}, ",
"#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, ", "#{classNum,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ",
"#{dataCount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{endTime,jdbcType=TIMESTAMP}, #{dataCount,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighGasClassGroupTask record); int insert(HighGasClassGroupTask record);
@ -66,6 +68,7 @@ public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapper
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT),
@Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR), @Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR),
@Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR), @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR),
@ -81,8 +84,8 @@ public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapper
@Select({ @Select({
"select", "select",
"id, gas_class_group_id, gas_class_group_name, merchant_store_id, merchant_store_name, ", "id, gas_class_group_id, gas_class_group_name, merchant_store_id, merchant_store_name, ",
"start_time, end_time, data_count, `status`, create_time, update_time, ext_1, ", "class_num, start_time, end_time, data_count, `status`, create_time, update_time, ",
"ext_2, ext_3", "ext_1, ext_2, ext_3",
"from high_gas_class_group_task", "from high_gas_class_group_task",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -92,6 +95,7 @@ public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapper
@Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR), @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR),
@Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT),
@Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR), @Result(column="merchant_store_name", property="merchantStoreName", jdbcType=JdbcType.VARCHAR),
@Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR), @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR),
@ -119,6 +123,7 @@ public interface HighGasClassGroupTaskMapper extends HighGasClassGroupTaskMapper
"gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},", "gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},",
"merchant_store_id = #{merchantStoreId,jdbcType=BIGINT},", "merchant_store_id = #{merchantStoreId,jdbcType=BIGINT},",
"merchant_store_name = #{merchantStoreName,jdbcType=VARCHAR},", "merchant_store_name = #{merchantStoreName,jdbcType=VARCHAR},",
"class_num = #{classNum,jdbcType=INTEGER},",
"start_time = #{startTime,jdbcType=TIMESTAMP},", "start_time = #{startTime,jdbcType=TIMESTAMP},",
"end_time = #{endTime,jdbcType=TIMESTAMP},", "end_time = #{endTime,jdbcType=TIMESTAMP},",
"data_count = #{dataCount,jdbcType=VARCHAR},", "data_count = #{dataCount,jdbcType=VARCHAR},",

@ -37,7 +37,7 @@ public interface HighGasClassGroupTaskMapperExt {
@Select("<script>" + @Select("<script>" +
" SELECT" + " SELECT" +
" a.oil_no," + " a.oil_no oilNo," +
" case when b.refuelPrice is not null then b.refuelPrice else 0 end refuelPrice," + " case when b.refuelPrice is not null then b.refuelPrice else 0 end refuelPrice," +
" case when b.refuelNum is not null then b.refuelNum else 0 end refuelNum," + " case when b.refuelNum is not null then b.refuelNum else 0 end refuelNum," +
" case when b.refuelLiters is not null then b.refuelLiters else 0 end refuelLiters" + " case when b.refuelLiters is not null then b.refuelLiters else 0 end refuelLiters" +
@ -53,4 +53,7 @@ public interface HighGasClassGroupTaskMapperExt {
" WHERE a.merchant_store_id = #{gasId} and <![CDATA[ `status` <> 0 ]]> " + " WHERE a.merchant_store_id = #{gasId} and <![CDATA[ `status` <> 0 ]]> " +
"</script>") "</script>")
List<Map<String, Object>> countOilData(@Param("gasId") Long gasId, @Param("gasClassGroupTaskId") Long gasClassGroupTaskId); List<Map<String, Object>> countOilData(@Param("gasId") Long gasId, @Param("gasClassGroupTaskId") Long gasClassGroupTaskId);
@Select("select count(1) from high_gas_class_group_task where merchant_store_id = #{gasId} and `status` <> 0")
int getLatestClassNum(@Param("gasId") Long gasId);
} }

@ -44,6 +44,10 @@ public class HighGasClassGroupTaskSqlProvider {
sql.VALUES("merchant_store_name", "#{merchantStoreName,jdbcType=VARCHAR}"); sql.VALUES("merchant_store_name", "#{merchantStoreName,jdbcType=VARCHAR}");
} }
if (record.getClassNum() != null) {
sql.VALUES("class_num", "#{classNum,jdbcType=INTEGER}");
}
if (record.getStartTime() != null) { if (record.getStartTime() != null) {
sql.VALUES("start_time", "#{startTime,jdbcType=TIMESTAMP}"); sql.VALUES("start_time", "#{startTime,jdbcType=TIMESTAMP}");
} }
@ -94,6 +98,7 @@ public class HighGasClassGroupTaskSqlProvider {
sql.SELECT("gas_class_group_name"); sql.SELECT("gas_class_group_name");
sql.SELECT("merchant_store_id"); sql.SELECT("merchant_store_id");
sql.SELECT("merchant_store_name"); sql.SELECT("merchant_store_name");
sql.SELECT("class_num");
sql.SELECT("start_time"); sql.SELECT("start_time");
sql.SELECT("end_time"); sql.SELECT("end_time");
sql.SELECT("data_count"); sql.SELECT("data_count");
@ -140,6 +145,10 @@ public class HighGasClassGroupTaskSqlProvider {
sql.SET("merchant_store_name = #{record.merchantStoreName,jdbcType=VARCHAR}"); sql.SET("merchant_store_name = #{record.merchantStoreName,jdbcType=VARCHAR}");
} }
if (record.getClassNum() != null) {
sql.SET("class_num = #{record.classNum,jdbcType=INTEGER}");
}
if (record.getStartTime() != null) { if (record.getStartTime() != null) {
sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}"); sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}");
} }
@ -189,6 +198,7 @@ public class HighGasClassGroupTaskSqlProvider {
sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}"); sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}");
sql.SET("merchant_store_id = #{record.merchantStoreId,jdbcType=BIGINT}"); sql.SET("merchant_store_id = #{record.merchantStoreId,jdbcType=BIGINT}");
sql.SET("merchant_store_name = #{record.merchantStoreName,jdbcType=VARCHAR}"); sql.SET("merchant_store_name = #{record.merchantStoreName,jdbcType=VARCHAR}");
sql.SET("class_num = #{record.classNum,jdbcType=INTEGER}");
sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}"); sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}");
sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}"); sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}");
sql.SET("data_count = #{record.dataCount,jdbcType=VARCHAR}"); sql.SET("data_count = #{record.dataCount,jdbcType=VARCHAR}");
@ -224,6 +234,10 @@ public class HighGasClassGroupTaskSqlProvider {
sql.SET("merchant_store_name = #{merchantStoreName,jdbcType=VARCHAR}"); sql.SET("merchant_store_name = #{merchantStoreName,jdbcType=VARCHAR}");
} }
if (record.getClassNum() != null) {
sql.SET("class_num = #{classNum,jdbcType=INTEGER}");
}
if (record.getStartTime() != null) { if (record.getStartTime() != null) {
sql.SET("start_time = #{startTime,jdbcType=TIMESTAMP}"); sql.SET("start_time = #{startTime,jdbcType=TIMESTAMP}");
} }

@ -173,6 +173,21 @@ public class HighChildOrder implements Serializable {
*/ */
private BigDecimal gasPricePreferences; private BigDecimal gasPricePreferences;
/**
* 加油站班组id
*/
private Long gasClassGroupId;
/**
* 加油站班组名称
*/
private String gasClassGroupName;
/**
* 加油站班组任务id
*/
private Long gasClassGroupTaskId;
/** /**
* 加油站加油员id * 加油站加油员id
*/ */
@ -483,6 +498,30 @@ public class HighChildOrder implements Serializable {
this.gasPricePreferences = gasPricePreferences; this.gasPricePreferences = gasPricePreferences;
} }
public Long getGasClassGroupId() {
return gasClassGroupId;
}
public void setGasClassGroupId(Long gasClassGroupId) {
this.gasClassGroupId = gasClassGroupId;
}
public String getGasClassGroupName() {
return gasClassGroupName;
}
public void setGasClassGroupName(String gasClassGroupName) {
this.gasClassGroupName = gasClassGroupName;
}
public Long getGasClassGroupTaskId() {
return gasClassGroupTaskId;
}
public void setGasClassGroupTaskId(Long gasClassGroupTaskId) {
this.gasClassGroupTaskId = gasClassGroupTaskId;
}
public Long getGasStaffId() { public Long getGasStaffId() {
return gasStaffId; return gasStaffId;
} }
@ -639,6 +678,9 @@ public class HighChildOrder implements Serializable {
&& (this.getGasOilSubsidy() == null ? other.getGasOilSubsidy() == null : this.getGasOilSubsidy().equals(other.getGasOilSubsidy())) && (this.getGasOilSubsidy() == null ? other.getGasOilSubsidy() == null : this.getGasOilSubsidy().equals(other.getGasOilSubsidy()))
&& (this.getGasLitersPreferences() == null ? other.getGasLitersPreferences() == null : this.getGasLitersPreferences().equals(other.getGasLitersPreferences())) && (this.getGasLitersPreferences() == null ? other.getGasLitersPreferences() == null : this.getGasLitersPreferences().equals(other.getGasLitersPreferences()))
&& (this.getGasPricePreferences() == null ? other.getGasPricePreferences() == null : this.getGasPricePreferences().equals(other.getGasPricePreferences())) && (this.getGasPricePreferences() == null ? other.getGasPricePreferences() == null : this.getGasPricePreferences().equals(other.getGasPricePreferences()))
&& (this.getGasClassGroupId() == null ? other.getGasClassGroupId() == null : this.getGasClassGroupId().equals(other.getGasClassGroupId()))
&& (this.getGasClassGroupName() == null ? other.getGasClassGroupName() == null : this.getGasClassGroupName().equals(other.getGasClassGroupName()))
&& (this.getGasClassGroupTaskId() == null ? other.getGasClassGroupTaskId() == null : this.getGasClassGroupTaskId().equals(other.getGasClassGroupTaskId()))
&& (this.getGasStaffId() == null ? other.getGasStaffId() == null : this.getGasStaffId().equals(other.getGasStaffId())) && (this.getGasStaffId() == null ? other.getGasStaffId() == null : this.getGasStaffId().equals(other.getGasStaffId()))
&& (this.getGasStaffName() == null ? other.getGasStaffName() == null : this.getGasStaffName().equals(other.getGasStaffName())) && (this.getGasStaffName() == null ? other.getGasStaffName() == null : this.getGasStaffName().equals(other.getGasStaffName()))
&& (this.getGasSalesmanId() == null ? other.getGasSalesmanId() == null : this.getGasSalesmanId().equals(other.getGasSalesmanId())) && (this.getGasSalesmanId() == null ? other.getGasSalesmanId() == null : this.getGasSalesmanId().equals(other.getGasSalesmanId()))
@ -691,6 +733,9 @@ public class HighChildOrder implements Serializable {
result = prime * result + ((getGasOilSubsidy() == null) ? 0 : getGasOilSubsidy().hashCode()); result = prime * result + ((getGasOilSubsidy() == null) ? 0 : getGasOilSubsidy().hashCode());
result = prime * result + ((getGasLitersPreferences() == null) ? 0 : getGasLitersPreferences().hashCode()); result = prime * result + ((getGasLitersPreferences() == null) ? 0 : getGasLitersPreferences().hashCode());
result = prime * result + ((getGasPricePreferences() == null) ? 0 : getGasPricePreferences().hashCode()); result = prime * result + ((getGasPricePreferences() == null) ? 0 : getGasPricePreferences().hashCode());
result = prime * result + ((getGasClassGroupId() == null) ? 0 : getGasClassGroupId().hashCode());
result = prime * result + ((getGasClassGroupName() == null) ? 0 : getGasClassGroupName().hashCode());
result = prime * result + ((getGasClassGroupTaskId() == null) ? 0 : getGasClassGroupTaskId().hashCode());
result = prime * result + ((getGasStaffId() == null) ? 0 : getGasStaffId().hashCode()); result = prime * result + ((getGasStaffId() == null) ? 0 : getGasStaffId().hashCode());
result = prime * result + ((getGasStaffName() == null) ? 0 : getGasStaffName().hashCode()); result = prime * result + ((getGasStaffName() == null) ? 0 : getGasStaffName().hashCode());
result = prime * result + ((getGasSalesmanId() == null) ? 0 : getGasSalesmanId().hashCode()); result = prime * result + ((getGasSalesmanId() == null) ? 0 : getGasSalesmanId().hashCode());
@ -746,6 +791,9 @@ public class HighChildOrder implements Serializable {
sb.append(", gasOilSubsidy=").append(gasOilSubsidy); sb.append(", gasOilSubsidy=").append(gasOilSubsidy);
sb.append(", gasLitersPreferences=").append(gasLitersPreferences); sb.append(", gasLitersPreferences=").append(gasLitersPreferences);
sb.append(", gasPricePreferences=").append(gasPricePreferences); sb.append(", gasPricePreferences=").append(gasPricePreferences);
sb.append(", gasClassGroupId=").append(gasClassGroupId);
sb.append(", gasClassGroupName=").append(gasClassGroupName);
sb.append(", gasClassGroupTaskId=").append(gasClassGroupTaskId);
sb.append(", gasStaffId=").append(gasStaffId); sb.append(", gasStaffId=").append(gasStaffId);
sb.append(", gasStaffName=").append(gasStaffName); sb.append(", gasStaffName=").append(gasStaffName);
sb.append(", gasSalesmanId=").append(gasSalesmanId); sb.append(", gasSalesmanId=").append(gasSalesmanId);

@ -2135,6 +2135,196 @@ public class HighChildOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andGasClassGroupIdIsNull() {
addCriterion("gas_class_group_id is null");
return (Criteria) this;
}
public Criteria andGasClassGroupIdIsNotNull() {
addCriterion("gas_class_group_id is not null");
return (Criteria) this;
}
public Criteria andGasClassGroupIdEqualTo(Long value) {
addCriterion("gas_class_group_id =", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdNotEqualTo(Long value) {
addCriterion("gas_class_group_id <>", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdGreaterThan(Long value) {
addCriterion("gas_class_group_id >", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdGreaterThanOrEqualTo(Long value) {
addCriterion("gas_class_group_id >=", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdLessThan(Long value) {
addCriterion("gas_class_group_id <", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdLessThanOrEqualTo(Long value) {
addCriterion("gas_class_group_id <=", value, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdIn(List<Long> values) {
addCriterion("gas_class_group_id in", values, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdNotIn(List<Long> values) {
addCriterion("gas_class_group_id not in", values, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdBetween(Long value1, Long value2) {
addCriterion("gas_class_group_id between", value1, value2, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupIdNotBetween(Long value1, Long value2) {
addCriterion("gas_class_group_id not between", value1, value2, "gasClassGroupId");
return (Criteria) this;
}
public Criteria andGasClassGroupNameIsNull() {
addCriterion("gas_class_group_name is null");
return (Criteria) this;
}
public Criteria andGasClassGroupNameIsNotNull() {
addCriterion("gas_class_group_name is not null");
return (Criteria) this;
}
public Criteria andGasClassGroupNameEqualTo(String value) {
addCriterion("gas_class_group_name =", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameNotEqualTo(String value) {
addCriterion("gas_class_group_name <>", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameGreaterThan(String value) {
addCriterion("gas_class_group_name >", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameGreaterThanOrEqualTo(String value) {
addCriterion("gas_class_group_name >=", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameLessThan(String value) {
addCriterion("gas_class_group_name <", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameLessThanOrEqualTo(String value) {
addCriterion("gas_class_group_name <=", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameLike(String value) {
addCriterion("gas_class_group_name like", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameNotLike(String value) {
addCriterion("gas_class_group_name not like", value, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameIn(List<String> values) {
addCriterion("gas_class_group_name in", values, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameNotIn(List<String> values) {
addCriterion("gas_class_group_name not in", values, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameBetween(String value1, String value2) {
addCriterion("gas_class_group_name between", value1, value2, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupNameNotBetween(String value1, String value2) {
addCriterion("gas_class_group_name not between", value1, value2, "gasClassGroupName");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdIsNull() {
addCriterion("gas_class_group_task_id is null");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdIsNotNull() {
addCriterion("gas_class_group_task_id is not null");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdEqualTo(Long value) {
addCriterion("gas_class_group_task_id =", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdNotEqualTo(Long value) {
addCriterion("gas_class_group_task_id <>", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdGreaterThan(Long value) {
addCriterion("gas_class_group_task_id >", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdGreaterThanOrEqualTo(Long value) {
addCriterion("gas_class_group_task_id >=", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdLessThan(Long value) {
addCriterion("gas_class_group_task_id <", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdLessThanOrEqualTo(Long value) {
addCriterion("gas_class_group_task_id <=", value, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdIn(List<Long> values) {
addCriterion("gas_class_group_task_id in", values, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdNotIn(List<Long> values) {
addCriterion("gas_class_group_task_id not in", values, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdBetween(Long value1, Long value2) {
addCriterion("gas_class_group_task_id between", value1, value2, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasClassGroupTaskIdNotBetween(Long value1, Long value2) {
addCriterion("gas_class_group_task_id not between", value1, value2, "gasClassGroupTaskId");
return (Criteria) this;
}
public Criteria andGasStaffIdIsNull() { public Criteria andGasStaffIdIsNull() {
addCriterion("gas_staff_id is null"); addCriterion("gas_staff_id is null");
return (Criteria) this; return (Criteria) this;

@ -38,6 +38,11 @@ public class HighGasClassGroupTask implements Serializable {
*/ */
private String merchantStoreName; private String merchantStoreName;
/**
* 班次
*/
private Integer classNum;
/** /**
* 开始时间 * 开始时间
*/ */
@ -116,6 +121,14 @@ public class HighGasClassGroupTask implements Serializable {
this.merchantStoreName = merchantStoreName; this.merchantStoreName = merchantStoreName;
} }
public Integer getClassNum() {
return classNum;
}
public void setClassNum(Integer classNum) {
this.classNum = classNum;
}
public Date getStartTime() { public Date getStartTime() {
return startTime; return startTime;
} }
@ -205,6 +218,7 @@ public class HighGasClassGroupTask implements Serializable {
&& (this.getGasClassGroupName() == null ? other.getGasClassGroupName() == null : this.getGasClassGroupName().equals(other.getGasClassGroupName())) && (this.getGasClassGroupName() == null ? other.getGasClassGroupName() == null : this.getGasClassGroupName().equals(other.getGasClassGroupName()))
&& (this.getMerchantStoreId() == null ? other.getMerchantStoreId() == null : this.getMerchantStoreId().equals(other.getMerchantStoreId())) && (this.getMerchantStoreId() == null ? other.getMerchantStoreId() == null : this.getMerchantStoreId().equals(other.getMerchantStoreId()))
&& (this.getMerchantStoreName() == null ? other.getMerchantStoreName() == null : this.getMerchantStoreName().equals(other.getMerchantStoreName())) && (this.getMerchantStoreName() == null ? other.getMerchantStoreName() == null : this.getMerchantStoreName().equals(other.getMerchantStoreName()))
&& (this.getClassNum() == null ? other.getClassNum() == null : this.getClassNum().equals(other.getClassNum()))
&& (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
&& (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
&& (this.getDataCount() == null ? other.getDataCount() == null : this.getDataCount().equals(other.getDataCount())) && (this.getDataCount() == null ? other.getDataCount() == null : this.getDataCount().equals(other.getDataCount()))
@ -225,6 +239,7 @@ public class HighGasClassGroupTask implements Serializable {
result = prime * result + ((getGasClassGroupName() == null) ? 0 : getGasClassGroupName().hashCode()); result = prime * result + ((getGasClassGroupName() == null) ? 0 : getGasClassGroupName().hashCode());
result = prime * result + ((getMerchantStoreId() == null) ? 0 : getMerchantStoreId().hashCode()); result = prime * result + ((getMerchantStoreId() == null) ? 0 : getMerchantStoreId().hashCode());
result = prime * result + ((getMerchantStoreName() == null) ? 0 : getMerchantStoreName().hashCode()); result = prime * result + ((getMerchantStoreName() == null) ? 0 : getMerchantStoreName().hashCode());
result = prime * result + ((getClassNum() == null) ? 0 : getClassNum().hashCode());
result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
result = prime * result + ((getDataCount() == null) ? 0 : getDataCount().hashCode()); result = prime * result + ((getDataCount() == null) ? 0 : getDataCount().hashCode());
@ -248,6 +263,7 @@ public class HighGasClassGroupTask implements Serializable {
sb.append(", gasClassGroupName=").append(gasClassGroupName); sb.append(", gasClassGroupName=").append(gasClassGroupName);
sb.append(", merchantStoreId=").append(merchantStoreId); sb.append(", merchantStoreId=").append(merchantStoreId);
sb.append(", merchantStoreName=").append(merchantStoreName); sb.append(", merchantStoreName=").append(merchantStoreName);
sb.append(", classNum=").append(classNum);
sb.append(", startTime=").append(startTime); sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime); sb.append(", endTime=").append(endTime);
sb.append(", dataCount=").append(dataCount); sb.append(", dataCount=").append(dataCount);

@ -445,6 +445,66 @@ public class HighGasClassGroupTaskExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andClassNumIsNull() {
addCriterion("class_num is null");
return (Criteria) this;
}
public Criteria andClassNumIsNotNull() {
addCriterion("class_num is not null");
return (Criteria) this;
}
public Criteria andClassNumEqualTo(Integer value) {
addCriterion("class_num =", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumNotEqualTo(Integer value) {
addCriterion("class_num <>", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumGreaterThan(Integer value) {
addCriterion("class_num >", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumGreaterThanOrEqualTo(Integer value) {
addCriterion("class_num >=", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumLessThan(Integer value) {
addCriterion("class_num <", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumLessThanOrEqualTo(Integer value) {
addCriterion("class_num <=", value, "classNum");
return (Criteria) this;
}
public Criteria andClassNumIn(List<Integer> values) {
addCriterion("class_num in", values, "classNum");
return (Criteria) this;
}
public Criteria andClassNumNotIn(List<Integer> values) {
addCriterion("class_num not in", values, "classNum");
return (Criteria) this;
}
public Criteria andClassNumBetween(Integer value1, Integer value2) {
addCriterion("class_num between", value1, value2, "classNum");
return (Criteria) this;
}
public Criteria andClassNumNotBetween(Integer value1, Integer value2) {
addCriterion("class_num not between", value1, value2, "classNum");
return (Criteria) this;
}
public Criteria andStartTimeIsNull() { public Criteria andStartTimeIsNull() {
addCriterion("start_time is null"); addCriterion("start_time is null");
return (Criteria) this; return (Criteria) this;

@ -10,6 +10,11 @@ import java.util.List;
*/ */
public class GasClassGroupTaskDataCount { public class GasClassGroupTaskDataCount {
/**
* 班次
*/
private Integer classNum;
/** /**
* 开始时间 * 开始时间
*/ */
@ -20,13 +25,18 @@ public class GasClassGroupTaskDataCount {
*/ */
private Date endTime; private Date endTime;
/**
* 班次状态
*/
private Integer status;
/** /**
* 加油总金额 * 加油总金额
*/ */
private BigDecimal refuelPrice; private BigDecimal refuelPrice;
/** /**
* 加油总数 * 加油总
*/ */
private Integer refuelNum; private Integer refuelNum;
@ -41,7 +51,7 @@ public class GasClassGroupTaskDataCount {
private BigDecimal refundPrice; private BigDecimal refundPrice;
/** /**
* 退款总数 * 退款总
*/ */
private Integer refundNum; private Integer refundNum;
@ -55,6 +65,22 @@ public class GasClassGroupTaskDataCount {
*/ */
List<GasClassGroupTaskOilCount> groupTaskOilCountList; List<GasClassGroupTaskOilCount> groupTaskOilCountList;
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getClassNum() {
return classNum;
}
public void setClassNum(Integer classNum) {
this.classNum = classNum;
}
public Date getStartTime() { public Date getStartTime() {
return startTime; return startTime;
} }

@ -39,7 +39,7 @@ public interface HighGasClassGroupTaskService {
* @param groupTaskId * @param groupTaskId
* @return * @return
*/ */
GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Long groupTaskId, Date startTime, Date endTime); GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Integer classNum, Long groupTaskId, Integer status, Date startTime, Date endTime);
/** /**
* 编辑班组任务 * 编辑班组任务

@ -66,6 +66,7 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
groupTask.setMerchantStoreId(merchantStore.getId()); groupTask.setMerchantStoreId(merchantStore.getId());
groupTask.setMerchantStoreName(merchantStore.getStoreName()); groupTask.setMerchantStoreName(merchantStore.getStoreName());
groupTask.setStartTime(new Date()); groupTask.setStartTime(new Date());
groupTask.setClassNum(gasClassGroupTaskMapper.getLatestClassNum(merchantStore.getId()) + 1);
editGroupTask(groupTask); editGroupTask(groupTask);
} }
@ -81,7 +82,7 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
HighGasClassGroupTask groupTask = list.get(0); HighGasClassGroupTask groupTask = list.get(0);
groupTask.setEndTime(new Date()); groupTask.setEndTime(new Date());
groupTask.setStatus(GasClassGroupTaskStatus.status2.getStatus()); groupTask.setStatus(GasClassGroupTaskStatus.status2.getStatus());
groupTask.setDataCount(JSONObject.toJSONString(countGroupTaskData(gasId, groupTask.getId(), groupTask.getStartTime(), groupTask.getEndTime()))); groupTask.setDataCount(JSONObject.toJSONString(countGroupTaskData(gasId, groupTask.getClassNum(), groupTask.getId(), groupTask.getStatus(), groupTask.getStartTime(), groupTask.getEndTime())));
editGroupTask(groupTask); editGroupTask(groupTask);
} }
} }
@ -97,8 +98,10 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
} }
@Override @Override
public GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Long groupTaskId, Date startTime, Date endTime) { public GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Integer classNum, Long groupTaskId, Integer status, Date startTime, Date endTime) {
GasClassGroupTaskDataCount dataCount = new GasClassGroupTaskDataCount(); GasClassGroupTaskDataCount dataCount = new GasClassGroupTaskDataCount();
dataCount.setClassNum(classNum);
dataCount.setStatus(status);
dataCount.setStartTime(startTime); dataCount.setStartTime(startTime);
dataCount.setEndTime(endTime); dataCount.setEndTime(endTime);
@ -111,7 +114,7 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
// 退款汇总 // 退款汇总
Map<String, Object> refundData = gasClassGroupTaskMapper.countRefundData(groupTaskId); Map<String, Object> refundData = gasClassGroupTaskMapper.countRefundData(groupTaskId);
dataCount.setRefundPrice(new BigDecimal(MapUtils.getString(refundData, "refundPrice"))); dataCount.setRefundPrice(new BigDecimal(MapUtils.getString(refundData, "refundPrice")));
dataCount.setRefundNum(MapUtils.getInteger(refundData, "refuelNum")); dataCount.setRefundNum(MapUtils.getInteger(refundData, "refundNum"));
dataCount.setRefundLiters(new BigDecimal(MapUtils.getString(refundData, "refundLiters"))); dataCount.setRefundLiters(new BigDecimal(MapUtils.getString(refundData, "refundLiters")));
@ -121,9 +124,10 @@ public class HighGasClassGroupTaskServiceImpl implements HighGasClassGroupTaskSe
List<GasClassGroupTaskOilCount> oilCountList = new ArrayList<>(); List<GasClassGroupTaskOilCount> oilCountList = new ArrayList<>();
for (Map<String, Object> oilData : oilDataList) { for (Map<String, Object> oilData : oilDataList) {
GasClassGroupTaskOilCount oilCount = new GasClassGroupTaskOilCount(); GasClassGroupTaskOilCount oilCount = new GasClassGroupTaskOilCount();
oilCount.setRefuelPrice(new BigDecimal(MapUtils.getString(refuelData, "refuelPrice"))); oilCount.setOilNo(MapUtils.getInteger(oilData, "oilNo"));
oilCount.setRefuelNum(MapUtils.getInteger(refuelData, "refuelNum")); oilCount.setRefuelPrice(new BigDecimal(MapUtils.getString(oilData, "refuelPrice")));
oilCount.setRefuelLiters(new BigDecimal(MapUtils.getString(refuelData, "refuelLiters"))); oilCount.setRefuelNum(MapUtils.getInteger(oilData, "refuelNum"));
oilCount.setRefuelLiters(new BigDecimal(MapUtils.getString(oilData, "refuelLiters")));
oilCountList.add(oilCount); oilCountList.add(oilCount);
} }
dataCount.setGroupTaskOilCountList(oilCountList); dataCount.setGroupTaskOilCountList(oilCountList);

Loading…
Cancel
Save