diff --git a/bweb/src/main/java/com/bweb/config/AuthConfig.java b/bweb/src/main/java/com/bweb/config/AuthConfig.java index 27fb01f..d25848d 100644 --- a/bweb/src/main/java/com/bweb/config/AuthConfig.java +++ b/bweb/src/main/java/com/bweb/config/AuthConfig.java @@ -87,7 +87,9 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/client/*") .excludePathPatterns("/sms/*") - .excludePathPatterns("/login/*") + .excludePathPatterns("/common/*") + .excludePathPatterns("/secUser/login") + .excludePathPatterns("/secUser/loginOut") ; } diff --git a/bweb/src/main/java/com/bweb/controller/BsGasClassGroupController.java b/bweb/src/main/java/com/bweb/controller/BsGasClassGroupController.java new file mode 100644 index 0000000..df0c3d8 --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsGasClassGroupController.java @@ -0,0 +1,189 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsGasClassGroup; +import com.hfkj.entity.BsGasClassGroupTask; +import com.hfkj.entity.BsGasStaff; +import com.hfkj.entity.BsMerchant; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.BsMerchantService; +import com.hfkj.service.gas.BsGasClassGroupService; +import com.hfkj.service.gas.BsGasClassGroupTaskService; +import com.hfkj.service.gas.BsGasStaffService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import com.hfkj.sysenum.gas.GasClassGroupTaskStatus; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 加油站班组 + * @author hurui + */ +@Controller +@RequestMapping(value = "/gasClassGroup") +@Api(value = "加油站班组") +public class BsGasClassGroupController { + + private static Logger log = LoggerFactory.getLogger(BsGasClassGroupController.class); + + @Resource + private BsGasClassGroupService gasClassGroupService; + + @Resource + private BsGasClassGroupTaskService gasClassGroupTaskService; + @Resource + private BsGasStaffService gasStaffService; + @Resource + private BsMerchantService merchantService; + + @Resource + private UserCenter userCenter; + + @RequestMapping(value = "/editClassGroup", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "编辑班组") + public ResponseData editClassGroup(@RequestBody JSONObject body) { + try { + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); + if (userInfoModel == null + || userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR); + } + if (body == null + || StringUtils.isBlank(body.getString("name")) + || StringUtils.isBlank(body.getString("principalName")) + || StringUtils.isBlank(body.getString("principalPhone"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + BsGasClassGroup gasClassGroup; + + if (body.getLong("id") != null) { + // 查询班组 + gasClassGroup = gasClassGroupService.getDetailById(body.getLong("id")); + if (gasClassGroup == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + } else { + gasClassGroup = new BsGasClassGroup(); + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(userInfoModel.getAccount().getObjectId()); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + gasClassGroup.setMerId(merchant.getId()); + gasClassGroup.setMerName(merchant.getMerName()); + } + + gasClassGroup.setName(body.getString("name")); + gasClassGroup.setPrincipalName(body.getString("principalName")); + gasClassGroup.setPrincipalPhone(body.getString("principalPhone")); + gasClassGroupService.editGroup(gasClassGroup); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupController --> editClassGroup() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/delClassGroup", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "删除班组") + public ResponseData delClassGroup(@RequestBody JSONObject body) { + try { + if (body == null || body.getLong("id") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + Map param = new HashMap<>(); + param.put("gasClassGroupId", body.getLong("id")); + param.put("status", GasClassGroupTaskStatus.status1.getStatus()); + List groupTaskList = gasClassGroupTaskService.getGroupTaskList(param); + if (groupTaskList.size() > 0) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "班组有任务进行中,暂时无法删除"); + } + + gasClassGroupService.delGroup(body.getLong("id")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupController --> delClassGroup() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getClassGroupById", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询班组详情") + public ResponseData getClassGroupById(@RequestParam(name = "groupId", required = true) Long groupId) { + try { + + return ResponseMsgUtil.success(gasClassGroupService.getDetailById(groupId)); + + } catch (Exception e) { + log.error("HighGasClassGroupController --> getClassGroupById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getClassGroupList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询班组列表") + public ResponseData getClassGroupList(@RequestParam(name = "name", required = false) String name, + @RequestParam(name = "principalName", required = false) String principalName, + @RequestParam(name = "principalPhone", required = false) String principalPhone, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + Map param = new HashMap<>(); + if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + param.put("merchantStoreId", userInfoModel.getAccount().getObjectId()); + + } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type3.getCode())) { + // 查询油站工作人员 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(userInfoModel.getAccount().getObjectId()); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + param.put("merchantStoreId", gasStaff.getMerId()); + } + param.put("name", name); + param.put("principalName", principalName); + param.put("principalPhone", principalPhone); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(gasClassGroupService.getGroupList(param))); + + } catch (Exception e) { + log.error("HighGasClassGroupController --> getClassGroupList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsGasClassGroupTaskController.java b/bweb/src/main/java/com/bweb/controller/BsGasClassGroupTaskController.java new file mode 100644 index 0000000..6454c3e --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsGasClassGroupTaskController.java @@ -0,0 +1,246 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.config.SpPrinterConfig; +import com.hfkj.config.SpPrinterTemplate; +import com.hfkj.entity.BsDevice; +import com.hfkj.entity.BsGasClassGroupTask; +import com.hfkj.entity.BsGasStaff; +import com.hfkj.model.GasClassGroupTaskDataCount; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.BsDeviceService; +import com.hfkj.service.gas.BsGasClassGroupTaskService; +import com.hfkj.service.gas.BsGasStaffService; +import com.hfkj.sysenum.DeviceTypeEnum; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import com.hfkj.sysenum.gas.GasClassGroupTaskStatus; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 加油站班组任务 + * @author hurui + */ +@Controller +@RequestMapping(value = "/gasClassGroupTask") +@Api(value = "加油站班组任务") +public class BsGasClassGroupTaskController { + + private static Logger log = LoggerFactory.getLogger(BsGasClassGroupTaskController.class); + + @Resource + private BsGasClassGroupTaskService gasClassGroupTaskService; + @Resource + private BsDeviceService deviceService; + @Resource + private BsGasStaffService gasStaffService; +/* @Resource + private MqttProviderConfig mqttProviderConfig;*/ + @Resource + private UserCenter userCenter; + + @RequestMapping(value = "/startGroupTask", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "开启班组任务") + public ResponseData startGroupTask(@RequestBody JSONObject body) { + try { + if (body == null || body.getLong("gasId") == null || body.getLong("gasClassGroupId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasClassGroupTaskService.startGroupTask(body.getLong("gasId"), body.getLong("gasClassGroupId")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> startGroupTask() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/endGroupTask", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "结束班组任务") + public ResponseData endGroupTask(@RequestBody JSONObject body) { + try { + if (body == null || body.getLong("gasId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasClassGroupTaskService.endGroupTask(body.getLong("gasId")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> endGroupTask() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/swapGroupTask", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "交换班组任务") + public ResponseData swapGroupTask(@RequestBody JSONObject body) { + try { + if (body == null || body.getLong("gasId") == null || body.getLong("gasClassGroupId") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + gasClassGroupTaskService.swapGroupTask(body.getLong("gasId"), body.getLong("gasClassGroupId")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> swapGroupTask() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getCurrentClassGroupTask", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询当前班次") + public ResponseData getCurrentClassGroupTask(@RequestParam(name = "gasId", required = true) Long gasId) { + try { + GasClassGroupTaskDataCount dataCount; + + Map param = new HashMap<>(); + param.put("merchantStoreId", gasId); + param.put("status", GasClassGroupTaskStatus.status1.getStatus()); + List list = gasClassGroupTaskService.getGroupTaskList(param); + if (list.size() > 0) { + dataCount = gasClassGroupTaskService.countGroupTaskData(gasId, + list.get(0).getClassNum(), + list.get(0).getId(), + 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) + @ResponseBody + @ApiOperation(value = "查询班组任务记录") + public ResponseData getClassGroupTaskById(@RequestParam(name = "gasClassGroupTaskId", required = true) Long gasClassGroupTaskId) { + try { + + return ResponseMsgUtil.success(gasClassGroupTaskService.getDetailById(gasClassGroupTaskId)); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> getClassGroupTaskById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getClassGroupTaskList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询班组任务记录") + public ResponseData getClassGroupTaskList(@RequestParam(name = "gasClassGroupId", required = false) Long gasClassGroupId, + @RequestParam(name = "merchantStoreId", required = false) Long merchantStoreId, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + Map param = new HashMap<>(); + + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } + + if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + param.put("merchantStoreId", userInfoModel.getAccount().getObjectId()); + } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type3.getCode())) { + // 查询油站工作人员 + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(userInfoModel.getAccount().getObjectId()); + if (gasStaff == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + param.put("merchantStoreId", gasStaff.getMerId()); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + param.put("gasClassGroupId", gasClassGroupId); + param.put("status", status); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(gasClassGroupTaskService.getGroupTaskList(param))); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> getClassGroupTaskList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/print", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "打印小票") + public ResponseData print(@RequestParam(name = "gasClassGroupTaskId", required = true) Long gasClassGroupTaskId) { + try { + BsGasClassGroupTask groupTask = gasClassGroupTaskService.getDetailById(gasClassGroupTaskId); + if (groupTask == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到班次"); + } + GasClassGroupTaskDataCount dataCount = JSONObject.parseObject(groupTask.getDataCount(), GasClassGroupTaskDataCount.class); + + // 查询加油站打印机 + List deviceList = deviceService.getDeviceByMer(groupTask.getMerId()); + for (BsDevice device : deviceList) { + if (device.getType().equals(DeviceTypeEnum.type1.getType())) { + new Thread(() -> { + try { + // 推送打印机 + SpPrinterConfig spPrinterConfig = new SpPrinterConfig(); + spPrinterConfig.print(device.getDeviceSn(), SpPrinterTemplate.classGroupCountTemp(dataCount, true), 1); + } catch (Exception e) { + e.printStackTrace(); + } + }).start(); + } + } + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighGasClassGroupTaskController --> getClassGroupTaskById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java b/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java index 23c8b85..b9b75ac 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasStaffController.java @@ -27,6 +27,7 @@ import com.hfkj.sysenum.gas.GasStaffStatus; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.annotations.Param; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; @@ -122,27 +123,18 @@ public class BsGasStaffController { } } - @RequestMapping(value="/queryQrCode",method = RequestMethod.POST) + @RequestMapping(value="/queryQrCode",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询二维码") - public ResponseData queryQrCode(@RequestBody JSONObject body) { + public ResponseData queryQrCode(@RequestParam(name = "staffId", required = true) Long staffId) { try { - if (body.getLong("gasStaffId") == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); - } - // 查询员工信息 - BsGasStaff gasStaff = gasStaffService.getStaffDetailById(body.getLong("gasStaffId")); + BsGasStaff gasStaff = gasStaffService.getStaffDetailById(staffId); if (gasStaff == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到员工信息"); } if (StringUtils.isBlank(gasStaff.getQrCodeImgUrl())) { - // 查询加油站 - BsMerchant merchantStore = merchantService.getMerchant(gasStaff.getMerId()); - if (merchantStore == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到加油站信息"); - } // 员工ID签名 String signId = AESEncodeUtil.aesEncrypt(gasStaff.getId().toString()); diff --git a/bweb/src/main/java/com/bweb/controller/CommonController.java b/bweb/src/main/java/com/bweb/controller/CommonController.java index 6997384..9d26ff3 100644 --- a/bweb/src/main/java/com/bweb/controller/CommonController.java +++ b/bweb/src/main/java/com/bweb/controller/CommonController.java @@ -2,6 +2,7 @@ package com.bweb.controller; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.model.ResponseData; +import com.hfkj.service.CommonService; import com.hfkj.service.sec.SecDictionaryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -23,6 +24,22 @@ public class CommonController { Logger log = LoggerFactory.getLogger(CommonController.class); @Resource private SecDictionaryService secDictionaryService; + @Resource + private CommonService commonService; + + @RequestMapping(value="/getRegion",method= RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "分级查询区域信息") + public ResponseData getRegion(@RequestParam(name = "regionId", required = false) Long regionId){ + try { + if (regionId == null){ + return ResponseMsgUtil.success(commonService.getCities()); + } + return ResponseMsgUtil.success(commonService.getRegionsByParentId(regionId)); + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } @RequestMapping(value="/queryDictionary",method = RequestMethod.GET) @ResponseBody diff --git a/bweb/src/main/java/com/bweb/controller/LoginController.java b/bweb/src/main/java/com/bweb/controller/LoginController.java index 0d27d1d..d5ae7b7 100644 --- a/bweb/src/main/java/com/bweb/controller/LoginController.java +++ b/bweb/src/main/java/com/bweb/controller/LoginController.java @@ -25,7 +25,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @Controller -@RequestMapping(value = "/login") +@RequestMapping(value = "/secUser") @Api(value = "登录") public class LoginController { @@ -56,7 +56,7 @@ public class LoginController { } } - @RequestMapping(value="/queryUser",method = RequestMethod.POST) + @RequestMapping(value="/queryUser",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询账户") public ResponseData queryUser() { diff --git a/bweb/src/main/java/com/bweb/controller/SecUserController.java b/bweb/src/main/java/com/bweb/controller/SecUserController.java index 703005f..bfc7ac3 100644 --- a/bweb/src/main/java/com/bweb/controller/SecUserController.java +++ b/bweb/src/main/java/com/bweb/controller/SecUserController.java @@ -153,6 +153,37 @@ public class SecUserController { } } + @RequestMapping(value="/updatePwd",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "修改密码") + public ResponseData updatePwd(@RequestBody JSONObject body) { + try { + if (body == null + || body.getLong("userId") == null + || StringUtils.isBlank(body.getString("oldPassword")) + || StringUtils.isBlank(body.getString("newPassword")) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 查询用户 + SecUser secUser = secUserService.getDetail(body.getLong("userId")); + if (secUser == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的用户"); + } + if (!secUser.getPassword().equals(MD5Util.encode(body.getString("oldPassword").getBytes()))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "旧密码错误"); + } + secUser.setPassword(MD5Util.encode(body.getString("newPassword").getBytes())); + secUserService.editUser(secUser); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("error!",e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value="/disable",method = RequestMethod.POST) @ResponseBody diff --git a/service/src/main/java/com/hfkj/config/SpPrinterTemplate.java b/service/src/main/java/com/hfkj/config/SpPrinterTemplate.java index 3cc2b7c..f5c3f88 100644 --- a/service/src/main/java/com/hfkj/config/SpPrinterTemplate.java +++ b/service/src/main/java/com/hfkj/config/SpPrinterTemplate.java @@ -1,28 +1,23 @@ -/* package com.hfkj.config; -import com.hai.common.utils.DateUtil; -import com.hai.model.GasClassGroupTaskDataCount; -import com.hai.model.GasClassGroupTaskOilCount; +import com.hfkj.common.utils.DateUtil; +import com.hfkj.model.GasClassGroupTaskDataCount; +import com.hfkj.model.GasClassGroupTaskOilCount; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import java.util.Date; import java.util.Map; -*/ /** * 商鹏打印机模板 * @author hurui - *//* - + */ public class SpPrinterTemplate { - */ -/** + /** * 加油站收银员存根模板 - *//* - + */ public static String classGroupCountTemp(GasClassGroupTaskDataCount dataCount, boolean makeUp) throws Exception { String str = "" + dataCount.getClassNum() + "班结流水" + (makeUp?"(补打)":"") + "
" + "===============================
" + @@ -50,8 +45,7 @@ public class SpPrinterTemplate { return str; } - */ -/** + /** * 加油站收银员存根模板 * @param gasName 油站名称 * @param orderNo 订单号 @@ -63,8 +57,7 @@ public class SpPrinterTemplate { * @param receiptMap 小票配置 * @param makeUp 重复打印 * @return - *//* - + */ public static String oilCashierStubTemp(String gasName, String orderNo, String payTime, @@ -98,8 +91,7 @@ public class SpPrinterTemplate { return str; } - */ -/** + /** * 加油站客户存根模板 * @param gasName 油站名称 * @param orderNo 订单号 @@ -111,8 +103,7 @@ public class SpPrinterTemplate { * @param receiptMap 小票配置 * @param makeUp 重复打印 * @return - *//* - + */ public static String oilClientStubTemp(String gasName, String orderNo, String payTime, @@ -146,4 +137,3 @@ public class SpPrinterTemplate { } } -*/ diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapper.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapper.java new file mode 100644 index 0000000..a98c189 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapper.java @@ -0,0 +1,125 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasClassGroup; +import com.hfkj.entity.BsGasClassGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface BsGasClassGroupMapper extends BsGasClassGroupMapperExt { + @SelectProvider(type=BsGasClassGroupSqlProvider.class, method="countByExample") + long countByExample(BsGasClassGroupExample example); + + @DeleteProvider(type=BsGasClassGroupSqlProvider.class, method="deleteByExample") + int deleteByExample(BsGasClassGroupExample example); + + @Delete({ + "delete from bs_gas_class_group", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_gas_class_group (mer_id, mer_name, ", + "`name`, principal_name, ", + "principal_phone, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, ", + "#{name,jdbcType=VARCHAR}, #{principalName,jdbcType=VARCHAR}, ", + "#{principalPhone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsGasClassGroup record); + + @InsertProvider(type=BsGasClassGroupSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsGasClassGroup record); + + @SelectProvider(type=BsGasClassGroupSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="principal_name", property="principalName", jdbcType=JdbcType.VARCHAR), + @Result(column="principal_phone", property="principalPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsGasClassGroupExample example); + + @Select({ + "select", + "id, mer_id, mer_name, `name`, principal_name, principal_phone, `status`, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from bs_gas_class_group", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="principal_name", property="principalName", jdbcType=JdbcType.VARCHAR), + @Result(column="principal_phone", property="principalPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsGasClassGroup selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsGasClassGroupSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsGasClassGroup record, @Param("example") BsGasClassGroupExample example); + + @UpdateProvider(type=BsGasClassGroupSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsGasClassGroup record, @Param("example") BsGasClassGroupExample example); + + @UpdateProvider(type=BsGasClassGroupSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsGasClassGroup record); + + @Update({ + "update bs_gas_class_group", + "set mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "`name` = #{name,jdbcType=VARCHAR},", + "principal_name = #{principalName,jdbcType=VARCHAR},", + "principal_phone = #{principalPhone,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsGasClassGroup record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapperExt.java new file mode 100644 index 0000000..bc6ef7a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsGasClassGroupMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupSqlProvider.java new file mode 100644 index 0000000..2a8854a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupSqlProvider.java @@ -0,0 +1,332 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasClassGroup; +import com.hfkj.entity.BsGasClassGroupExample.Criteria; +import com.hfkj.entity.BsGasClassGroupExample.Criterion; +import com.hfkj.entity.BsGasClassGroupExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsGasClassGroupSqlProvider { + + public String countByExample(BsGasClassGroupExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_gas_class_group"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsGasClassGroupExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_gas_class_group"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsGasClassGroup record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_gas_class_group"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalName() != null) { + sql.VALUES("principal_name", "#{principalName,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalPhone() != null) { + sql.VALUES("principal_phone", "#{principalPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsGasClassGroupExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("`name`"); + sql.SELECT("principal_name"); + sql.SELECT("principal_phone"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_gas_class_group"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsGasClassGroup record = (BsGasClassGroup) parameter.get("record"); + BsGasClassGroupExample example = (BsGasClassGroupExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalName() != null) { + sql.SET("principal_name = #{record.principalName,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalPhone() != null) { + sql.SET("principal_phone = #{record.principalPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + sql.SET("principal_name = #{record.principalName,jdbcType=VARCHAR}"); + sql.SET("principal_phone = #{record.principalPhone,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsGasClassGroupExample example = (BsGasClassGroupExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsGasClassGroup record) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalName() != null) { + sql.SET("principal_name = #{principalName,jdbcType=VARCHAR}"); + } + + if (record.getPrincipalPhone() != null) { + sql.SET("principal_phone = #{principalPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsGasClassGroupExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapper.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapper.java new file mode 100644 index 0000000..f35cf5e --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapper.java @@ -0,0 +1,136 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasClassGroupTask; +import com.hfkj.entity.BsGasClassGroupTaskExample; +import java.util.List; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.DeleteProvider; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.InsertProvider; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Result; +import org.apache.ibatis.annotations.Results; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.SelectProvider; +import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface BsGasClassGroupTaskMapper extends BsGasClassGroupTaskMapperExt { + @SelectProvider(type=BsGasClassGroupTaskSqlProvider.class, method="countByExample") + long countByExample(BsGasClassGroupTaskExample example); + + @DeleteProvider(type=BsGasClassGroupTaskSqlProvider.class, method="deleteByExample") + int deleteByExample(BsGasClassGroupTaskExample example); + + @Delete({ + "delete from bs_gas_class_group_task", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_gas_class_group_task (gas_class_group_id, gas_class_group_name, ", + "mer_id, mer_name, class_num, ", + "start_time, end_time, ", + "data_count, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{gasClassGroupId,jdbcType=BIGINT}, #{gasClassGroupName,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{classNum,jdbcType=INTEGER}, ", + "#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, ", + "#{dataCount,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsGasClassGroupTask record); + + @InsertProvider(type=BsGasClassGroupTaskSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsGasClassGroupTask record); + + @SelectProvider(type=BsGasClassGroupTaskSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT), + @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER), + @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsGasClassGroupTaskExample example); + + @Select({ + "select", + "id, gas_class_group_id, gas_class_group_name, mer_id, mer_name, class_num, start_time, ", + "end_time, data_count, `status`, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_gas_class_group_task", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="gas_class_group_id", property="gasClassGroupId", jdbcType=JdbcType.BIGINT), + @Result(column="gas_class_group_name", property="gasClassGroupName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="class_num", property="classNum", jdbcType=JdbcType.INTEGER), + @Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="data_count", property="dataCount", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsGasClassGroupTask selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsGasClassGroupTaskSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsGasClassGroupTask record, @Param("example") BsGasClassGroupTaskExample example); + + @UpdateProvider(type=BsGasClassGroupTaskSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsGasClassGroupTask record, @Param("example") BsGasClassGroupTaskExample example); + + @UpdateProvider(type=BsGasClassGroupTaskSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsGasClassGroupTask record); + + @Update({ + "update bs_gas_class_group_task", + "set gas_class_group_id = #{gasClassGroupId,jdbcType=BIGINT},", + "gas_class_group_name = #{gasClassGroupName,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "class_num = #{classNum,jdbcType=INTEGER},", + "start_time = #{startTime,jdbcType=TIMESTAMP},", + "end_time = #{endTime,jdbcType=TIMESTAMP},", + "data_count = #{dataCount,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsGasClassGroupTask record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapperExt.java new file mode 100644 index 0000000..0b5b52e --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskMapperExt.java @@ -0,0 +1,59 @@ +package com.hfkj.dao; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; + +/** + * mapper扩展类 + */ +public interface BsGasClassGroupTaskMapperExt { + + + @Select("") + Map countRefuelData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); + + @Select("") + Map countRefundData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); + + @Select("") + List> countOilData(@Param("gasId") Long gasId, @Param("gasClassGroupTaskId") Long gasClassGroupTaskId); + + @Select("select count(1) from bs_gas_class_group_task where merchant_store_id = #{gasId} and `status` <> 0") + int getLatestClassNum(@Param("gasId") Long gasId); + +} diff --git a/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskSqlProvider.java new file mode 100644 index 0000000..4539ea8 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasClassGroupTaskSqlProvider.java @@ -0,0 +1,374 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasClassGroupTask; +import com.hfkj.entity.BsGasClassGroupTaskExample.Criteria; +import com.hfkj.entity.BsGasClassGroupTaskExample.Criterion; +import com.hfkj.entity.BsGasClassGroupTaskExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsGasClassGroupTaskSqlProvider { + + public String countByExample(BsGasClassGroupTaskExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_gas_class_group_task"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsGasClassGroupTaskExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_gas_class_group_task"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsGasClassGroupTask record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_gas_class_group_task"); + + 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.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getClassNum() != null) { + sql.VALUES("class_num", "#{classNum,jdbcType=INTEGER}"); + } + + if (record.getStartTime() != null) { + sql.VALUES("start_time", "#{startTime,jdbcType=TIMESTAMP}"); + } + + if (record.getEndTime() != null) { + sql.VALUES("end_time", "#{endTime,jdbcType=TIMESTAMP}"); + } + + if (record.getDataCount() != null) { + sql.VALUES("data_count", "#{dataCount,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(BsGasClassGroupTaskExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("gas_class_group_id"); + sql.SELECT("gas_class_group_name"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("class_num"); + sql.SELECT("start_time"); + sql.SELECT("end_time"); + sql.SELECT("data_count"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_gas_class_group_task"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsGasClassGroupTask record = (BsGasClassGroupTask) parameter.get("record"); + BsGasClassGroupTaskExample example = (BsGasClassGroupTaskExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group_task"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + 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.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getClassNum() != null) { + sql.SET("class_num = #{record.classNum,jdbcType=INTEGER}"); + } + + if (record.getStartTime() != null) { + sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}"); + } + + if (record.getEndTime() != null) { + sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}"); + } + + if (record.getDataCount() != null) { + sql.SET("data_count = #{record.dataCount,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group_task"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("gas_class_group_id = #{record.gasClassGroupId,jdbcType=BIGINT}"); + sql.SET("gas_class_group_name = #{record.gasClassGroupName,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("class_num = #{record.classNum,jdbcType=INTEGER}"); + sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}"); + sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}"); + sql.SET("data_count = #{record.dataCount,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsGasClassGroupTaskExample example = (BsGasClassGroupTaskExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsGasClassGroupTask record) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_class_group_task"); + + 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.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getClassNum() != null) { + sql.SET("class_num = #{classNum,jdbcType=INTEGER}"); + } + + if (record.getStartTime() != null) { + sql.SET("start_time = #{startTime,jdbcType=TIMESTAMP}"); + } + + if (record.getEndTime() != null) { + sql.SET("end_time = #{endTime,jdbcType=TIMESTAMP}"); + } + + if (record.getDataCount() != null) { + sql.SET("data_count = #{dataCount,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsGasClassGroupTaskExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasClassGroup.java b/service/src/main/java/com/hfkj/entity/BsGasClassGroup.java new file mode 100644 index 0000000..dcd1b71 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasClassGroup.java @@ -0,0 +1,232 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_gas_class_group + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsGasClassGroup implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 加油站id + */ + private Long merId; + + /** + * 加油站名称 + */ + private String merName; + + /** + * 班组名称 + */ + private String name; + + /** + * 负责人名称 + */ + private String principalName; + + /** + * 负责人电话 + */ + private String principalPhone; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public String getPrincipalPhone() { + return principalPhone; + } + + public void setPrincipalPhone(String principalPhone) { + this.principalPhone = principalPhone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsGasClassGroup other = (BsGasClassGroup) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getPrincipalName() == null ? other.getPrincipalName() == null : this.getPrincipalName().equals(other.getPrincipalName())) + && (this.getPrincipalPhone() == null ? other.getPrincipalPhone() == null : this.getPrincipalPhone().equals(other.getPrincipalPhone())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getPrincipalName() == null) ? 0 : getPrincipalName().hashCode()); + result = prime * result + ((getPrincipalPhone() == null) ? 0 : getPrincipalPhone().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", name=").append(name); + sb.append(", principalName=").append(principalName); + sb.append(", principalPhone=").append(principalPhone); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasClassGroupExample.java b/service/src/main/java/com/hfkj/entity/BsGasClassGroupExample.java new file mode 100644 index 0000000..111f1b9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasClassGroupExample.java @@ -0,0 +1,1013 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsGasClassGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsGasClassGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPrincipalNameIsNull() { + addCriterion("principal_name is null"); + return (Criteria) this; + } + + public Criteria andPrincipalNameIsNotNull() { + addCriterion("principal_name is not null"); + return (Criteria) this; + } + + public Criteria andPrincipalNameEqualTo(String value) { + addCriterion("principal_name =", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameNotEqualTo(String value) { + addCriterion("principal_name <>", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameGreaterThan(String value) { + addCriterion("principal_name >", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameGreaterThanOrEqualTo(String value) { + addCriterion("principal_name >=", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameLessThan(String value) { + addCriterion("principal_name <", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameLessThanOrEqualTo(String value) { + addCriterion("principal_name <=", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameLike(String value) { + addCriterion("principal_name like", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameNotLike(String value) { + addCriterion("principal_name not like", value, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameIn(List values) { + addCriterion("principal_name in", values, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameNotIn(List values) { + addCriterion("principal_name not in", values, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameBetween(String value1, String value2) { + addCriterion("principal_name between", value1, value2, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalNameNotBetween(String value1, String value2) { + addCriterion("principal_name not between", value1, value2, "principalName"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneIsNull() { + addCriterion("principal_phone is null"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneIsNotNull() { + addCriterion("principal_phone is not null"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneEqualTo(String value) { + addCriterion("principal_phone =", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneNotEqualTo(String value) { + addCriterion("principal_phone <>", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneGreaterThan(String value) { + addCriterion("principal_phone >", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneGreaterThanOrEqualTo(String value) { + addCriterion("principal_phone >=", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneLessThan(String value) { + addCriterion("principal_phone <", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneLessThanOrEqualTo(String value) { + addCriterion("principal_phone <=", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneLike(String value) { + addCriterion("principal_phone like", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneNotLike(String value) { + addCriterion("principal_phone not like", value, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneIn(List values) { + addCriterion("principal_phone in", values, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneNotIn(List values) { + addCriterion("principal_phone not in", values, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneBetween(String value1, String value2) { + addCriterion("principal_phone between", value1, value2, "principalPhone"); + return (Criteria) this; + } + + public Criteria andPrincipalPhoneNotBetween(String value1, String value2) { + addCriterion("principal_phone not between", value1, value2, "principalPhone"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasClassGroupTask.java b/service/src/main/java/com/hfkj/entity/BsGasClassGroupTask.java new file mode 100644 index 0000000..4e167e8 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasClassGroupTask.java @@ -0,0 +1,280 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_gas_class_group_task + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsGasClassGroupTask implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 班组id + */ + private Long gasClassGroupId; + + /** + * 班组名称 + */ + private String gasClassGroupName; + + /** + * 加油站id + */ + private Long merId; + + /** + * 加油站名称 + */ + private String merName; + + /** + * 班次 + */ + private Integer classNum; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 数据统计 + */ + private String dataCount; + + /** + * 状态 0:删除 1:进行中 2:已结束 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + 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 getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Integer getClassNum() { + return classNum; + } + + public void setClassNum(Integer classNum) { + this.classNum = classNum; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public String getDataCount() { + return dataCount; + } + + public void setDataCount(String dataCount) { + this.dataCount = dataCount; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsGasClassGroupTask other = (BsGasClassGroupTask) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getGasClassGroupId() == null ? other.getGasClassGroupId() == null : this.getGasClassGroupId().equals(other.getGasClassGroupId())) + && (this.getGasClassGroupName() == null ? other.getGasClassGroupName() == null : this.getGasClassGroupName().equals(other.getGasClassGroupName())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getClassNum() == null ? other.getClassNum() == null : this.getClassNum().equals(other.getClassNum())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getDataCount() == null ? other.getDataCount() == null : this.getDataCount().equals(other.getDataCount())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getGasClassGroupId() == null) ? 0 : getGasClassGroupId().hashCode()); + result = prime * result + ((getGasClassGroupName() == null) ? 0 : getGasClassGroupName().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getClassNum() == null) ? 0 : getClassNum().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getDataCount() == null) ? 0 : getDataCount().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", gasClassGroupId=").append(gasClassGroupId); + sb.append(", gasClassGroupName=").append(gasClassGroupName); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", classNum=").append(classNum); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", dataCount=").append(dataCount); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsGasClassGroupTaskExample.java b/service/src/main/java/com/hfkj/entity/BsGasClassGroupTaskExample.java new file mode 100644 index 0000000..233e938 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasClassGroupTaskExample.java @@ -0,0 +1,1183 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsGasClassGroupTaskExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsGasClassGroupTaskExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + 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 values) { + addCriterion("gas_class_group_id in", values, "gasClassGroupId"); + return (Criteria) this; + } + + public Criteria andGasClassGroupIdNotIn(List 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 values) { + addCriterion("gas_class_group_name in", values, "gasClassGroupName"); + return (Criteria) this; + } + + public Criteria andGasClassGroupNameNotIn(List 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 andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + 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 values) { + addCriterion("class_num in", values, "classNum"); + return (Criteria) this; + } + + public Criteria andClassNumNotIn(List 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() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Date value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Date value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Date value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Date value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Date value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Date value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Date value1, Date value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Date value1, Date value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Date value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Date value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Date value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Date value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Date value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Date value1, Date value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Date value1, Date value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andDataCountIsNull() { + addCriterion("data_count is null"); + return (Criteria) this; + } + + public Criteria andDataCountIsNotNull() { + addCriterion("data_count is not null"); + return (Criteria) this; + } + + public Criteria andDataCountEqualTo(String value) { + addCriterion("data_count =", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountNotEqualTo(String value) { + addCriterion("data_count <>", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountGreaterThan(String value) { + addCriterion("data_count >", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountGreaterThanOrEqualTo(String value) { + addCriterion("data_count >=", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountLessThan(String value) { + addCriterion("data_count <", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountLessThanOrEqualTo(String value) { + addCriterion("data_count <=", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountLike(String value) { + addCriterion("data_count like", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountNotLike(String value) { + addCriterion("data_count not like", value, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountIn(List values) { + addCriterion("data_count in", values, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountNotIn(List values) { + addCriterion("data_count not in", values, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountBetween(String value1, String value2) { + addCriterion("data_count between", value1, value2, "dataCount"); + return (Criteria) this; + } + + public Criteria andDataCountNotBetween(String value1, String value2) { + addCriterion("data_count not between", value1, value2, "dataCount"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/model/GasClassGroupTaskDataCount.java b/service/src/main/java/com/hfkj/model/GasClassGroupTaskDataCount.java new file mode 100644 index 0000000..6ec691e --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasClassGroupTaskDataCount.java @@ -0,0 +1,155 @@ +package com.hfkj.model; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * 加油站 班组任务数据统计模型 + * @author hurui + */ +public class GasClassGroupTaskDataCount { + + /** + * 班次 + */ + private Integer classNum; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 班次状态 + */ + private Integer status; + + /** + * 加油总金额 + */ + private BigDecimal refuelPrice; + + /** + * 加油总笔数 + */ + private Integer refuelNum; + + /** + * 加油总升数 + */ + private BigDecimal refuelLiters; + + /** + * 退款总金额 + */ + private BigDecimal refundPrice; + + /** + * 退款总笔数 + */ + private Integer refundNum; + + /** + * 退款总升数 + */ + private BigDecimal refundLiters; + + /** + * 班组油品数据统计 + */ + List 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() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public BigDecimal getRefuelPrice() { + return refuelPrice; + } + + public void setRefuelPrice(BigDecimal refuelPrice) { + this.refuelPrice = refuelPrice; + } + + public Integer getRefuelNum() { + return refuelNum; + } + + public void setRefuelNum(Integer refuelNum) { + this.refuelNum = refuelNum; + } + + public BigDecimal getRefuelLiters() { + return refuelLiters; + } + + public void setRefuelLiters(BigDecimal refuelLiters) { + this.refuelLiters = refuelLiters; + } + + public BigDecimal getRefundPrice() { + return refundPrice; + } + + public void setRefundPrice(BigDecimal refundPrice) { + this.refundPrice = refundPrice; + } + + public Integer getRefundNum() { + return refundNum; + } + + public void setRefundNum(Integer refundNum) { + this.refundNum = refundNum; + } + + public BigDecimal getRefundLiters() { + return refundLiters; + } + + public void setRefundLiters(BigDecimal refundLiters) { + this.refundLiters = refundLiters; + } + + public List getGroupTaskOilCountList() { + return groupTaskOilCountList; + } + + public void setGroupTaskOilCountList(List groupTaskOilCountList) { + this.groupTaskOilCountList = groupTaskOilCountList; + } +} diff --git a/service/src/main/java/com/hfkj/model/GasClassGroupTaskOilCount.java b/service/src/main/java/com/hfkj/model/GasClassGroupTaskOilCount.java new file mode 100644 index 0000000..a72adff --- /dev/null +++ b/service/src/main/java/com/hfkj/model/GasClassGroupTaskOilCount.java @@ -0,0 +1,62 @@ +package com.hfkj.model; + +import java.math.BigDecimal; + +/** + * 加油站 班组任务,加油统计 + * @author hurui + */ +public class GasClassGroupTaskOilCount { + + /** + * 油号 + */ + private Integer oilNo; + + /** + * 加油总金额 + */ + private BigDecimal refuelPrice; + + /** + * 加油总数量 + */ + private Integer refuelNum; + + /** + * 加油总升数 + */ + private BigDecimal refuelLiters; + + public Integer getOilNo() { + return oilNo; + } + + public void setOilNo(Integer oilNo) { + this.oilNo = oilNo; + } + + public BigDecimal getRefuelPrice() { + return refuelPrice; + } + + public void setRefuelPrice(BigDecimal refuelPrice) { + this.refuelPrice = refuelPrice; + } + + public Integer getRefuelNum() { + return refuelNum; + } + + public void setRefuelNum(Integer refuelNum) { + this.refuelNum = refuelNum; + } + + public BigDecimal getRefuelLiters() { + return refuelLiters; + } + + public void setRefuelLiters(BigDecimal refuelLiters) { + this.refuelLiters = refuelLiters; + } +} diff --git a/service/src/main/java/com/hfkj/service/BsDeviceService.java b/service/src/main/java/com/hfkj/service/BsDeviceService.java index 69c0a18..8d0f3ca 100644 --- a/service/src/main/java/com/hfkj/service/BsDeviceService.java +++ b/service/src/main/java/com/hfkj/service/BsDeviceService.java @@ -25,6 +25,13 @@ public interface BsDeviceService { */ BsDevice getDetailById(Long deviceId); + /** + * 查询商户设备 + * @param merId + * @return + */ + List getDeviceByMer(Long merId); + /** * 查询设备列表 * @param param diff --git a/service/src/main/java/com/hfkj/service/CommonService.java b/service/src/main/java/com/hfkj/service/CommonService.java index ee5041f..f98473a 100644 --- a/service/src/main/java/com/hfkj/service/CommonService.java +++ b/service/src/main/java/com/hfkj/service/CommonService.java @@ -1,12 +1,4 @@ package com.hfkj.service; -/** - * @ClassName: CommonService - * @Description:TODO(共用接口) - * @author: 杜江 - * @date: 2020年07月07日 15:35:43 - * @Copyright: 2018 www.shinwoten.com Inc. All rights reserved. - */ - import com.alibaba.fastjson.JSONObject; import com.hfkj.entity.SecDictionary; import com.hfkj.entity.SecRegion; @@ -14,13 +6,7 @@ import com.hfkj.entity.SecRegion; import java.util.List; import java.util.Map; -/** - *@ClassName CommonService - *@Description 共用接口 - *@Author 杜江 - *@Date 2020/7/7 15:35 - *@Version 1.0 - */ + public interface CommonService { /** @@ -32,7 +18,7 @@ public interface CommonService { * @return: List * @throws */ - Map> getDictionaries(); + Map> getDictionaries(); /** * @Title: getDictionary @@ -68,18 +54,7 @@ public interface CommonService { * @createTime 14:53 2021/6/23 **/ Boolean findValue(String codeType, String codeValue); - - /** - * - * @Title: mappingSysName - * @Description: 根据codetype,codeName获取系统字典数据 - * @author: 杜江 - * @Date: 2020/8/21 14:13 - * @param: [codeType, codeName] - * @return: com.shinwoten.train.entity.SecDictionary - * @throws - */ - SecDictionary mappingSysName(String codeType, String codeName); + /** * @ClassName CommonService.java @@ -117,12 +92,6 @@ public interface CommonService { */ List getCities(); - /** - * 查询省级列表 - * @return - */ - List getProvinceList(); - /** * * @Title: getCities @@ -171,23 +140,4 @@ public interface CommonService { */ String getRegionName(Long regionId); - - /** - * - * @Title: findByName - * @Description: 通过区域名称查询 - * @author: 杜江 - * @Date: 2020/7/10 15:43 - * @param: [name] - * @return: java.util.List - * @throws - */ - List findByName(String name); - - SecRegion getParentByRegion(Long regionId); - - void updateDictionary(SecDictionary secDictionary); - - SecRegion getRegionsByName(String regionName); - } diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupService.java b/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupService.java new file mode 100644 index 0000000..21ec521 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupService.java @@ -0,0 +1,40 @@ +package com.hfkj.service.gas; + +import com.hfkj.entity.BsGasClassGroup; + +import java.util.List; +import java.util.Map; + +/** + * 加油站班组服务 + * @author hurui + */ +public interface BsGasClassGroupService { + + /** + * 编辑班组 + * @param gasClassGroup + */ + void editGroup(BsGasClassGroup gasClassGroup); + + /** + * 删除班组 + * @param groupId + */ + void delGroup(Long groupId); + + /** + * 根据id查询详情 + * @param groupId + * @return + */ + BsGasClassGroup getDetailById(Long groupId); + + /** + * 查询班组列表 + * @param param + * @return + */ + List getGroupList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupTaskService.java b/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupTaskService.java new file mode 100644 index 0000000..ce665b4 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasClassGroupTaskService.java @@ -0,0 +1,70 @@ +package com.hfkj.service.gas; + +import com.hfkj.entity.BsGasClassGroupTask; +import com.hfkj.model.GasClassGroupTaskDataCount; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 加油站班组任务 + * @author hurui + */ +public interface BsGasClassGroupTaskService { + + /** + * 开始班组 + * @param gasId 油站id + * @param gasClassGroupId 班组id + */ + void startGroupTask(Long gasId, Long gasClassGroupId); + + /** + * 结束班组任务 + * @param gasId 油站id + */ + void endGroupTask(Long gasId); + + /** + * 交接班组任务 + * @param gasId 油站id + * @param gasClassGroupId 班组id + */ + void swapGroupTask(Long gasId, Long gasClassGroupId); + + /** + * 统计班组任务数据 + * @param groupTaskId + * @return + */ + GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Integer classNum, Long groupTaskId, Integer status, Date startTime, Date endTime); + + /** + * 编辑班组任务 + * @param gasClassGroupTask + */ + void editGroupTask(BsGasClassGroupTask gasClassGroupTask); + + /** + * 根据id查询详情 + * @param groupTaskId + * @return + */ + BsGasClassGroupTask getDetailById(Long groupTaskId); + + /** + * 查询班组任务列表 + * @param param + * @return + */ + List getGroupTaskList(Map param); + + /** + * 跟油站 获取当前班组任务 + * @param merId + * @return + */ + BsGasClassGroupTask getCurrentTaskByMerId(Long merId); + +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupServiceImpl.java new file mode 100644 index 0000000..ac4fa35 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupServiceImpl.java @@ -0,0 +1,81 @@ +package com.hfkj.service.gas.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.dao.BsGasClassGroupMapper; +import com.hfkj.entity.BsGasClassGroup; +import com.hfkj.entity.BsGasClassGroupExample; +import com.hfkj.service.gas.BsGasClassGroupService; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Service("gasClassGroupService") +public class BsGasClassGroupServiceImpl implements BsGasClassGroupService { + + @Resource + private BsGasClassGroupMapper gasClassGroupMapper; + + @Override + public void editGroup(BsGasClassGroup gasClassGroup) { + if (gasClassGroup.getId() == null) { + gasClassGroup.setStatus(1); + gasClassGroup.setCreateTime(new Date()); + gasClassGroup.setUpdateTime(new Date()); + gasClassGroupMapper.insert(gasClassGroup); + } else { + gasClassGroup.setUpdateTime(new Date()); + gasClassGroupMapper.updateByPrimaryKey(gasClassGroup); + } + } + + @Override + public void delGroup(Long groupId) { + BsGasClassGroup classGroup = getDetailById(groupId); + if (classGroup == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到班组"); + } + classGroup.setStatus(0); + editGroup(classGroup); + } + + @Override + public BsGasClassGroup getDetailById(Long groupId) { + return gasClassGroupMapper.selectByPrimaryKey(groupId); + } + + @Override + public List getGroupList(Map param) { + BsGasClassGroupExample example = new BsGasClassGroupExample(); + BsGasClassGroupExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "merId") != null) { + criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "merName"))) { + criteria.andMerNameLike("%" + MapUtils.getString(param, "merName") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "name"))) { + criteria.andNameLike("%" + MapUtils.getString(param, "name") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "principalName"))) { + criteria.andPrincipalNameLike("%" + MapUtils.getString(param, "principalName") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "principalPhone"))) { + criteria.andPrincipalPhoneLike("%" + MapUtils.getString(param, "principalPhone") + "%"); + } + + example.setOrderByClause("create_time desc"); + return gasClassGroupMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupTaskServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupTaskServiceImpl.java new file mode 100644 index 0000000..e2eca93 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasClassGroupTaskServiceImpl.java @@ -0,0 +1,223 @@ +package com.hfkj.service.gas.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.config.SpPrinterConfig; +import com.hfkj.config.SpPrinterTemplate; +import com.hfkj.dao.BsGasClassGroupTaskMapper; +import com.hfkj.entity.*; +import com.hfkj.model.GasClassGroupTaskDataCount; +import com.hfkj.model.GasClassGroupTaskOilCount; +import com.hfkj.service.BsDeviceService; +import com.hfkj.service.BsMerchantService; +import com.hfkj.service.gas.BsGasClassGroupService; +import com.hfkj.service.gas.BsGasClassGroupTaskService; +import com.hfkj.sysenum.DeviceTypeEnum; +import com.hfkj.sysenum.gas.GasClassGroupTaskStatus; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.*; + +@Service("gasClassGroupTask") +public class BsGasClassGroupTaskServiceImpl implements BsGasClassGroupTaskService { + + @Resource + private BsGasClassGroupTaskMapper gasClassGroupTaskMapper; + + @Resource + private BsGasClassGroupService gasClassGroupService; + + @Resource + private BsMerchantService merchantService; + + @Resource + private BsDeviceService deviceService; + + /* @Resource + private MqttProviderConfig mqttProviderConfig;*/ + + @Override + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) + public void startGroupTask(Long gasId, Long gasClassGroupId) { + // 查询加油站 + BsMerchant merchant = merchantService.getMerchant(gasId); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到加油站信息"); + } + + // 查询进行中的任务 + Map param = new HashMap<>(); + param.put("merchantStoreId", merchant.getId()); + param.put("status", GasClassGroupTaskStatus.status1.getStatus()); + List list = getGroupTaskList(param); + if (!list.isEmpty()) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "已有班组正在进行中,请结束班组或交换班组"); + } + // 查询班组信息 + BsGasClassGroup group = gasClassGroupService.getDetailById(gasClassGroupId); + if (group == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到班组信息"); + } + + BsGasClassGroupTask groupTask = new BsGasClassGroupTask(); + groupTask.setGasClassGroupId(group.getId()); + groupTask.setGasClassGroupName(group.getName()); + groupTask.setMerId(merchant.getId()); + groupTask.setMerName(merchant.getMerName()); + groupTask.setStartTime(new Date()); + groupTask.setClassNum(gasClassGroupTaskMapper.getLatestClassNum(merchant.getId()) + 1); + editGroupTask(groupTask); + } + + @Override + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) + public void endGroupTask(Long gasId) { + // 查询进行中的任务 + Map param = new HashMap<>(); + param.put("merchantStoreId", gasId); + param.put("status", GasClassGroupTaskStatus.status1.getStatus()); + List list = getGroupTaskList(param); + if (!list.isEmpty()) { + BsGasClassGroupTask groupTask = list.get(0); + groupTask.setEndTime(new Date()); + groupTask.setStatus(GasClassGroupTaskStatus.status2.getStatus()); + // 统计 + GasClassGroupTaskDataCount dataCount = countGroupTaskData(gasId, groupTask.getClassNum(), groupTask.getId(), groupTask.getStatus(), groupTask.getStartTime(), groupTask.getEndTime()); + groupTask.setDataCount(JSONObject.toJSONString(dataCount)); + editGroupTask(groupTask); + + // 查询加油站打印机 + List deviceList = deviceService.getDeviceByMer(gasId); + for (BsDevice device : deviceList) { + if (device.getType().equals(DeviceTypeEnum.type1.getType())) { + new Thread(() -> { + try { + // 推送打印机 + SpPrinterConfig spPrinterConfig = new SpPrinterConfig(); + spPrinterConfig.print(device.getDeviceSn(), SpPrinterTemplate.classGroupCountTemp(dataCount, false), 1); + } catch (Exception e) { + e.printStackTrace(); + } + }).start(); + } + } + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) + public void swapGroupTask(Long gasId, Long gasClassGroupId) { + // 任务结束 + endGroupTask(gasId); + + // 开启新的任务 + startGroupTask(gasId, gasClassGroupId); + } + + @Override + public GasClassGroupTaskDataCount countGroupTaskData(Long gasId, Integer classNum, Long groupTaskId, Integer status, Date startTime, Date endTime) { + GasClassGroupTaskDataCount dataCount = new GasClassGroupTaskDataCount(); + dataCount.setClassNum(classNum); + dataCount.setStatus(status); + dataCount.setStartTime(startTime); + dataCount.setEndTime(endTime); + + // 加油汇总 + Map refuelData = gasClassGroupTaskMapper.countRefuelData(groupTaskId); + dataCount.setRefuelPrice(new BigDecimal(MapUtils.getString(refuelData, "refuelPrice"))); + dataCount.setRefuelNum(MapUtils.getInteger(refuelData, "refuelNum")); + dataCount.setRefuelLiters(new BigDecimal(MapUtils.getString(refuelData, "refuelLiters"))); + + // 退款汇总 + Map refundData = gasClassGroupTaskMapper.countRefundData(groupTaskId); + dataCount.setRefundPrice(new BigDecimal(MapUtils.getString(refundData, "refundPrice"))); + dataCount.setRefundNum(MapUtils.getInteger(refundData, "refundNum")); + dataCount.setRefundLiters(new BigDecimal(MapUtils.getString(refundData, "refundLiters"))); + + + // 油品汇总 + List> oilDataList = gasClassGroupTaskMapper.countOilData(gasId, groupTaskId); + + List oilCountList = new ArrayList<>(); + for (Map oilData : oilDataList) { + GasClassGroupTaskOilCount oilCount = new GasClassGroupTaskOilCount(); + oilCount.setOilNo(MapUtils.getInteger(oilData, "oilNo")); + oilCount.setRefuelPrice(new BigDecimal(MapUtils.getString(oilData, "refuelPrice"))); + oilCount.setRefuelNum(MapUtils.getInteger(oilData, "refuelNum")); + oilCount.setRefuelLiters(new BigDecimal(MapUtils.getString(oilData, "refuelLiters"))); + oilCountList.add(oilCount); + } + dataCount.setGroupTaskOilCountList(oilCountList); + + return dataCount; + } + + @Override + public void editGroupTask(BsGasClassGroupTask gasClassGroupTask) { + if (gasClassGroupTask.getId() == null) { + gasClassGroupTask.setStatus(GasClassGroupTaskStatus.status1.getStatus()); + gasClassGroupTask.setCreateTime(new Date()); + gasClassGroupTask.setUpdateTime(new Date()); + gasClassGroupTaskMapper.insert(gasClassGroupTask); + } else { + gasClassGroupTask.setUpdateTime(new Date()); + gasClassGroupTaskMapper.updateByPrimaryKey(gasClassGroupTask); + } + } + + @Override + public BsGasClassGroupTask getDetailById(Long groupTaskId) { + return gasClassGroupTaskMapper.selectByPrimaryKey(groupTaskId); + } + + @Override + public List getGroupTaskList(Map param) { + BsGasClassGroupTaskExample example = new BsGasClassGroupTaskExample(); + BsGasClassGroupTaskExample.Criteria criteria = example.createCriteria() + .andStatusNotEqualTo(GasClassGroupTaskStatus.status0.getStatus()); + + if (MapUtils.getLong(param, "gasClassGroupId") != null) { + criteria.andGasClassGroupIdEqualTo(MapUtils.getLong(param, "gasClassGroupId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "gasClassGroupName"))) { + criteria.andGasClassGroupNameLike("%" + MapUtils.getString(param, "gasClassGroupName") + "%"); + } + + if (MapUtils.getLong(param, "merId") != null) { + criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "gasClassGroupName"))) { + criteria.andGasClassGroupNameLike("%" + MapUtils.getString(param, "gasClassGroupName") + "%"); + } + + if (MapUtils.getInteger(param, "status") != null) { + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); + } + + example.setOrderByClause("create_time desc"); + return gasClassGroupTaskMapper.selectByExample(example); + } + + @Override + public BsGasClassGroupTask getCurrentTaskByMerId(Long merId) { + BsGasClassGroupTaskExample example = new BsGasClassGroupTaskExample(); + example.createCriteria() + .andMerIdEqualTo(merId) + .andStatusEqualTo(GasClassGroupTaskStatus.status1.getStatus()); + List list = gasClassGroupTaskMapper.selectByExample(example); + if (!list.isEmpty()) { + return list.get(0); + } + return null; + } +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java index d0ac99c..053a8f2 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceOfficialServiceImpl.java @@ -95,7 +95,7 @@ public class BsGasOilPriceOfficialServiceImpl implements BsGasOilPriceOfficialSe heardParam.put("Authorization", "APPCODE d7fb8449b8424fdbb60f01f53a04ce90"); JSONObject dataObject = HttpsUtils.doGet("http://ali-todayoil.showapi.com/todayoil", new HashMap<>(), heardParam); - if (dataObject.getInteger("showapi_res_code").equals(0)) { +/* if (dataObject.getInteger("showapi_res_code").equals(0)) { JSONObject resBody = dataObject.getJSONObject("showapi_res_body"); JSONArray oilArray = resBody.getJSONArray("list"); @@ -126,7 +126,7 @@ public class BsGasOilPriceOfficialServiceImpl implements BsGasOilPriceOfficialSe } } - } + }*/ } @Override diff --git a/service/src/main/java/com/hfkj/service/impl/BsDeviceServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsDeviceServiceImpl.java index abf1e1d..93edec0 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsDeviceServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsDeviceServiceImpl.java @@ -37,6 +37,14 @@ public class BsDeviceServiceImpl implements BsDeviceService { return deviceMapper.selectByPrimaryKey(deviceId); } + @Override + public List getDeviceByMer(Long merId) { + BsDeviceExample example = new BsDeviceExample(); + example.createCriteria().andMerIdEqualTo(merId).andStatusNotEqualTo(0); + example.setOrderByClause("create_time desc"); + return deviceMapper.selectByExample(example); + } + @Override public List getDeviceList(Map param) { BsDeviceExample example = new BsDeviceExample(); diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java index a3a7444..ae5ca77 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerchantServiceImpl.java @@ -71,6 +71,7 @@ public class BsMerchantServiceImpl implements BsMerchantService { secUser.setPassword(MD5Util.encode("123456".getBytes())); secUser.setObjectType(SecUserObjectTypeEnum.type2.getCode()); secUser.setObjectId(merchant.getId()); + secUser.setRoleId(3L); secUser.setStatus(1); secUser.setCreateTime(new Date()); secUser.setUpdateTime(new Date()); diff --git a/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java index 01595cf..7a2a0bc 100644 --- a/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java @@ -8,6 +8,8 @@ import com.alicp.jetcache.anno.CreateCache; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.HttpsUtils; +import com.hfkj.common.utils.RedisUtil; import com.hfkj.dao.SecDictionaryMapper; import com.hfkj.dao.SecRegionMapper; import com.hfkj.entity.SecDictionary; @@ -38,11 +40,15 @@ public class CommonServiceImpl implements CommonService { @Resource private SecRegionMapper regionMapper; + + @Resource + private RedisUtil redisUtil; @Resource private SecDictionaryMapper dicMapper; - + private Map> dicCache = new HashMap>(); + @CreateCache(name = "cities:", cacheType = CacheType.REMOTE) private Cache citiesCache; @CreateCache(name = "region:", cacheType = CacheType.REMOTE) @@ -53,11 +59,30 @@ public class CommonServiceImpl implements CommonService { private Cache> communityCache; @CreateCache(name = "regionSingle:", cacheType = CacheType.REMOTE) private Cache singleRegionCache; - + @Override - public Map> getDictionaries() { - refreshDic(); - return dicCache; + public Map> getDictionaries() { + Object dictionary = redisUtil.get("SEC_DICTIONARY"); + if (dictionary == null) { + Map> secDictionaryCache = new HashMap<>(); + SecDictionaryExample example = new SecDictionaryExample(); + example.createCriteria().andStatusEqualTo(1); + example.setOrderByClause(" sort_id asc "); + List dicList = dicMapper.selectByExample(example); + for(SecDictionary dic : dicList) { + List dictionaries = secDictionaryCache.get(dic.getCodeType()); + if(dictionaries != null) { + List list = secDictionaryCache.get(dic.getCodeType()); + list.add(dic); + } else { + List list = new ArrayList<>(); + list.add(dic); + secDictionaryCache.put(dic.getCodeType(), list); + } + } + return secDictionaryCache; + } + return (Map>)dictionary; } /** @@ -117,26 +142,6 @@ public class CommonServiceImpl implements CommonService { return sd; } - @Override - public SecDictionary mappingSysName(String codeType, String codeName) { - refreshDic(); - if(StringUtils.isBlank(codeType)){ - throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); - } - Map m = dicCache.get(codeType); - if (null == m) { - return null; - } - for(Map.Entry entry : m.entrySet()){ - String mapKey = entry.getKey(); - SecDictionary mapValue = entry.getValue(); - if (mapValue.getCodeName().equals(codeName)) { - return mapValue; - } - } - return null; - } - /** * 根据codeType获取该类的所有字典数据 * @@ -253,15 +258,16 @@ public class CommonServiceImpl implements CommonService { example.createCriteria().andStatusEqualTo(1).andParentIdIsNull(); return regionMapper.selectByExample(example); } - private void refreshRegion(){ - if (System.currentTimeMillis() - regionLastReadTime < READ_STEP) { - return; - } - if (regionLock.isLocked()) { //说明有线程已经在刷数据了 - if (null != dicCache && dicCache.size() > 0) { //如果有数据说明已经初始化过了,直接返回老数据 + + private void refreshRegion() { + if (regionsCache.get(500000L) != null) { + return; + } + if (regionLock.isLocked()) { // 说明有线程已经在刷数据了 + if (null != regionsCache) { //如果有数据说明已经初始化过了,直接返回老数据 return; } - while (null == dicCache || dicCache.size()<1) { //说明初始化刷数据 等待10毫秒 + while (null == regionsCache) { //说明初始化刷数据 等待10毫秒 try { Thread.sleep(10); //此处是否需要添加一个超时机制? @@ -283,7 +289,6 @@ public class CommonServiceImpl implements CommonService { } } } - private void getRegionFromDB(){ SecRegionExample example = new SecRegionExample(); example.createCriteria().andStatusEqualTo(1).andParentIdIsNull(); @@ -309,37 +314,6 @@ public class CommonServiceImpl implements CommonService { } regionLastReadTime = System.currentTimeMillis(); } -/* private void getRegionFromDB(){ - SecRegionExample example = new SecRegionExample(); - example.createCriteria().andStatusEqualTo(1).andParentIdIsNull(); - citiesCache = regionMapper.selectByExample(example); - for(SecRegion city : citiesCache){//市 - singleRegionCache.put(city.getRegionId(), city); - List regions = getRegions(city.getRegionId()); - regionsCache.put(city.getRegionId(),regions); - for(SecRegion region : regions){//区 - singleRegionCache.put(region.getRegionId(), region); - List streets = getRegions(region.getRegionId()); - streetCache.put(region.getRegionId(), streets); - for(SecRegion street : streets){ - singleRegionCache.put(street.getRegionId(), street); - List communities = getRegions(street.getRegionId()); - communityCache.put(street.getRegionId(),communities); - for (SecRegion community : communities){ - singleRegionCache.put(community.getRegionId(),community); - } - } - } - } - regionLastReadTime = System.currentTimeMillis(); - }*/ - - @Override - public List getProvinceList() { - SecRegionExample example = new SecRegionExample(); - example.createCriteria().andParentIdIsNull().andStatusEqualTo(1); - return regionMapper.selectByExample(example); - } private List getRegions(Long parentId) { SecRegionExample example = new SecRegionExample(); @@ -422,28 +396,6 @@ public class CommonServiceImpl implements CommonService { return regionMapper.selectByPrimaryKey(regionId); } - - @Override - public List findByName(String name) { - SecRegionExample example = new SecRegionExample(); - example.createCriteria().andStatusEqualTo(1).andRegionNameEqualTo(name); - return regionMapper.selectByExample(example); - } - - @Override - public SecRegion getParentByRegion(Long regionId) { - SecRegion secRegion = getRegionsById(regionId); - if (secRegion != null && secRegion.getParentId() != null) { - while (true) { - secRegion = getRegionsById(secRegion.getParentId()); - if (secRegion.getParentId() == null) { - return secRegion; - } - } - } - return secRegion; - } - @Override public Boolean findValue(String codeType, String codeValue) { SecDictionaryExample example = new SecDictionaryExample(); @@ -460,22 +412,4 @@ public class CommonServiceImpl implements CommonService { example.createCriteria().andCodeTypeEqualTo(codeType); return dicMapper.selectByExample(example); } - - @Override - public void updateDictionary(SecDictionary secDictionary) { - dicMapper.updateByPrimaryKeySelective(secDictionary); - } - - @Override - public SecRegion getRegionsByName(String regionName) { - SecRegionExample example = new SecRegionExample(); - example.createCriteria().andRegionNameLike("%" + regionName + "%"); - List list = regionMapper.selectByExample(example); - if (list.size() > 0) { - return list.get(0); - } - return null; - } - - } diff --git a/service/src/main/java/com/hfkj/sysenum/gas/GasClassGroupTaskStatus.java b/service/src/main/java/com/hfkj/sysenum/gas/GasClassGroupTaskStatus.java new file mode 100644 index 0000000..ead233f --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/gas/GasClassGroupTaskStatus.java @@ -0,0 +1,36 @@ +package com.hfkj.sysenum.gas; + +/** + * 加油站员工状态 + * @author hurui + */ +public enum GasClassGroupTaskStatus { + status0(0 , "删除"), + status1(1 , "进行中"), + status2(2 , "已结束"), + ; + + private Integer status; + private String name; + + GasClassGroupTaskStatus(int status , String name) { + this.status = status; + this.name = name; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +}