From 01dd8732d223391cc2d6eda0941cc6497010e0fc Mon Sep 17 00:00:00 2001 From: wang-hao-jie <1550036656@qq.com> Date: 星期三, 03 十一月 2021 15:20:37 +0800 Subject: [PATCH] 违章记录 --- /dev/null | 79 -------------------------- xboot-modules/pom.xml | 1 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java | 32 +++++++++- xboot-core/src/main/java/cn/exrick/xboot/core/entity/User.java | 4 - xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java | 2 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Fingerprint.java | 14 +++- xboot-admin/pom.xml | 5 - xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java | 41 +++++++++++++ 8 files changed, 80 insertions(+), 98 deletions(-) diff --git a/xboot-admin/pom.xml b/xboot-admin/pom.xml index c991556..7aea03e 100644 --- a/xboot-admin/pom.xml +++ b/xboot-admin/pom.xml @@ -40,11 +40,6 @@ </dependency> <dependency> <groupId>cn.exrick</groupId> - <artifactId>xboot-social</artifactId> - <version>1.0-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>cn.exrick</groupId> <artifactId>xboot-your</artifactId> <version>1.0-SNAPSHOT</version> </dependency> diff --git a/xboot-core/src/main/java/cn/exrick/xboot/core/entity/User.java b/xboot-core/src/main/java/cn/exrick/xboot/core/entity/User.java index 55077a0..eeddfdf 100644 --- a/xboot-core/src/main/java/cn/exrick/xboot/core/entity/User.java +++ b/xboot-core/src/main/java/cn/exrick/xboot/core/entity/User.java @@ -95,9 +95,6 @@ @ApiModelProperty(value = "鎵�灞為儴闂ㄥ悕绉�") private String departmentTitle; - @ApiModelProperty(value = "鎸囩汗鐧婚檰瀵嗙爜") - private String key; - @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") @ApiModelProperty(value = "鐢熸棩") @@ -117,4 +114,5 @@ @TableField(exist = false) @ApiModelProperty(value = "瀵煎叆鏁版嵁鏃朵娇鐢�") private Integer defaultRole; + } diff --git a/xboot-modules/pom.xml b/xboot-modules/pom.xml index 895cf49..ccb7b86 100644 --- a/xboot-modules/pom.xml +++ b/xboot-modules/pom.xml @@ -13,7 +13,6 @@ <packaging>pom</packaging> <modules> <module>xboot-base</module> - <module>xboot-social</module> <module>xboot-generator</module> <module>xboot-file</module> <module>xboot-quartz</module> diff --git a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java index 16e6c10..f0e75fe 100644 --- a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java +++ b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java @@ -315,7 +315,7 @@ // 鏍¢獙鏄惁宸插瓨鍦� checkUserInfo(u.getUsername(), u.getMobile(), u.getEmail()); - u.setKey(u.getPassword()); + u.setDescription(u.getPassword()); String encryptPass = new BCryptPasswordEncoder().encode(u.getPassword()); u.setPassword(encryptPass); if (StrUtil.isNotBlank(u.getDepartmentId())) { diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaController.java deleted file mode 100644 index 72d43ad..0000000 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaController.java +++ /dev/null @@ -1,79 +0,0 @@ -package cn.exrick.xboot.your.controller; - -import cn.exrick.xboot.core.common.utils.PageUtil; -import cn.exrick.xboot.core.common.utils.ResultUtil; -import cn.exrick.xboot.core.common.vo.PageVo; -import cn.exrick.xboot.core.common.vo.Result; -import cn.exrick.xboot.your.entity.Area; -import cn.exrick.xboot.your.service.IAreaService; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * @author zhangzeli - */ -@Slf4j -@RestController -@Api(tags = "閰嶉�佺墖鍖虹鐞嗘帴鍙�") -@RequestMapping("/xboot/area") -@Transactional -public class AreaController { - - @Autowired - private IAreaService iAreaService; - - @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) - @ApiOperation(value = "閫氳繃id鑾峰彇") - public Result<Area> get(@PathVariable String id) { - - Area area = iAreaService.getById(id); - return new ResultUtil<Area>().setData(area); - } - - @RequestMapping(value = "/getAll", method = RequestMethod.GET) - @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁") - public Result<List<Area>> getAll() { - - List<Area> list = iAreaService.list(); - return new ResultUtil<List<Area>>().setData(list); - } - - @RequestMapping(value = "/getByPage", method = RequestMethod.GET) - @ApiOperation(value = "鍒嗛〉鑾峰彇") - public Result<IPage<Area>> getByPage(String name,PageVo page) { - QueryWrapper<Area> wrapper = new QueryWrapper<>(); - if (!StrUtil.isEmpty(name)) - wrapper.like("name","%"+name+"%"); - IPage<Area> data = iAreaService.page2(PageUtil.initMpPage(page),wrapper); - return new ResultUtil<IPage<Area>>().setData(data); - } - - @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST) - @ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�") - public Result<Area> saveOrUpdate(Area area) { - - if (iAreaService.saveOrUpdate(area)) { - return new ResultUtil<Area>().setData(area); - } - return new ResultUtil<Area>().setErrorMsg("鎿嶄綔澶辫触"); - } - - @RequestMapping(value = "/delByIds", method = RequestMethod.POST) - @ApiOperation(value = "鎵归噺閫氳繃id鍒犻櫎") - public Result<Object> delAllByIds(@RequestParam String[] ids) { - - for (String id : ids) { - iAreaService.removeById(id); - } - return ResultUtil.success("鎵归噺閫氳繃id鍒犻櫎鏁版嵁鎴愬姛"); - } -} diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaSectionController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaSectionController.java deleted file mode 100644 index ccfb087..0000000 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AreaSectionController.java +++ /dev/null @@ -1,79 +0,0 @@ -package cn.exrick.xboot.your.controller; - -import cn.exrick.xboot.core.common.utils.PageUtil; -import cn.exrick.xboot.core.common.utils.ResultUtil; -import cn.exrick.xboot.core.common.vo.PageVo; -import cn.exrick.xboot.core.common.vo.Result; -import cn.exrick.xboot.your.entity.AreaSection; -import cn.exrick.xboot.your.service.IAreaSectionService; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * @author zhangzeli - */ -@Slf4j -@RestController -@Api(tags = "鐗囧尯娈电鐞嗘帴鍙�") -@RequestMapping("/xboot/areaSection") -@Transactional -public class AreaSectionController { - - @Autowired - private IAreaSectionService iAreaSectionService; - - @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) - @ApiOperation(value = "閫氳繃id鑾峰彇") - public Result<AreaSection> get(@PathVariable String id) { - - AreaSection areaSection = iAreaSectionService.getById(id); - return new ResultUtil<AreaSection>().setData(areaSection); - } - - @RequestMapping(value = "/getAll", method = RequestMethod.GET) - @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁") - public Result<List<AreaSection>> getAll() { - - List<AreaSection> list = iAreaSectionService.list(); - return new ResultUtil<List<AreaSection>>().setData(list); - } - - @RequestMapping(value = "/getByPage", method = RequestMethod.GET) - @ApiOperation(value = "鍒嗛〉鑾峰彇") - public Result<IPage<AreaSection>> getByPage(String areaId,PageVo page) { - QueryWrapper<AreaSection> wrapper = new QueryWrapper<>(); - if (!StrUtil.isEmpty(areaId)) - wrapper.eq("area_id",areaId); - IPage<AreaSection> data = iAreaSectionService.page(PageUtil.initMpPage(page),wrapper); - return new ResultUtil<IPage<AreaSection>>().setData(data); - } - - @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST) - @ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�") - public Result<AreaSection> saveOrUpdate(AreaSection areaSection) { - - if (iAreaSectionService.saveOrUpdate(areaSection)) { - return new ResultUtil<AreaSection>().setData(areaSection); - } - return new ResultUtil<AreaSection>().setErrorMsg("鎿嶄綔澶辫触"); - } - - @RequestMapping(value = "/delByIds", method = RequestMethod.POST) - @ApiOperation(value = "鎵归噺閫氳繃id鍒犻櫎") - public Result<Object> delAllByIds(@RequestParam String[] ids) { - - for (String id : ids) { - iAreaSectionService.removeById(id); - } - return ResultUtil.success("鎵归噺閫氳繃id鍒犻櫎鏁版嵁鎴愬姛"); - } -} diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java index 53b8cec..d9f2fea 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/FingerprintController.java @@ -1,9 +1,15 @@ package cn.exrick.xboot.your.controller; +import cn.exrick.xboot.core.common.constant.SettingConstant; +import cn.exrick.xboot.core.common.utils.CommonUtil; import cn.exrick.xboot.core.common.utils.PageUtil; import cn.exrick.xboot.core.common.utils.ResultUtil; import cn.exrick.xboot.core.common.vo.PageVo; import cn.exrick.xboot.core.common.vo.Result; +import cn.exrick.xboot.core.entity.Setting; +import cn.exrick.xboot.core.entity.User; +import cn.exrick.xboot.core.service.SettingService; +import cn.exrick.xboot.core.service.UserService; import cn.exrick.xboot.your.entity.Fingerprint; import cn.exrick.xboot.your.service.IFingerprintService; import cn.hutool.core.util.StrUtil; @@ -15,7 +21,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; +import java.io.InputStream; import java.util.List; /** @@ -31,6 +40,9 @@ @Autowired private IFingerprintService iFingerprintService; + @Autowired + private UserService userService; + @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) @ApiOperation(value = "閫氳繃id鑾峰彇") public Result<Fingerprint> get(@PathVariable String id) { @@ -42,9 +54,19 @@ @RequestMapping(value = "/getAll", method = RequestMethod.GET) @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁") public Result<List<Fingerprint>> getAll() { - - List<Fingerprint> list = iFingerprintService.list(); + QueryWrapper<Fingerprint> wrapper = new QueryWrapper<>(); + wrapper.isNotNull("user_id"); + List<Fingerprint> list = iFingerprintService.list(wrapper); return new ResultUtil<List<Fingerprint>>().setData(list); + } + + @RequestMapping(value = "/getCount", method = RequestMethod.GET) + @ApiOperation(value = "鑾峰彇鐢ㄦ埛鎸囩汗鏁�") + public Result<Integer> getCount() { + QueryWrapper<Fingerprint> wrapper = new QueryWrapper<>(); + wrapper.isNotNull("user_id"); + int a = iFingerprintService.count(wrapper); + return new ResultUtil<Integer>().setData(a); } @RequestMapping(value = "/getByPage", method = RequestMethod.GET) @@ -58,7 +80,11 @@ @RequestMapping(value = "/insertOrUpdate", method = RequestMethod.POST) @ApiOperation(value = "缂栬緫鎴栨洿鏂版暟鎹�") public Result<Fingerprint> saveOrUpdate(Fingerprint fingerprint) { - + if(StrUtil.isNotEmpty(fingerprint.getUserId())){ + User user = userService.get(fingerprint.getUserId()); + fingerprint.setUsername(user.getUsername()); + fingerprint.setPassword(user.getDescription()); + } if (iFingerprintService.saveOrUpdate(fingerprint)) { return new ResultUtil<Fingerprint>().setData(fingerprint); } diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java index 17e2cc1..430fd7a 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java @@ -50,6 +50,45 @@ private String trajectory; @ApiModelProperty(value = "琛岄┒閲岀▼") - private int mileage; + private Integer mileage=0; + + @ApiModelProperty(value = "璁㈠崟鏍稿 0锛氭湭鏍稿 1锛氬凡鏍稿") + private Integer OrderStatus=0; + + @ApiModelProperty(value = "涓夎瘉 0:姝e父 1锛氬紓甯�") + private Integer sanZheng=0; + + @ApiModelProperty(value = "涓夐噺 0:姝e父 1锛氬紓甯�") + private Integer sanLiang=0; + + @ApiModelProperty(value = "鍥涚伅 0:姝e父 1锛氬紓甯�") + private Integer siDeng=0; + + @ApiModelProperty(value = "鍠囧彮 0:姝e父 1锛氬紓甯�") + private Integer laBa=0; + + @ApiModelProperty(value = "鍚庤闀� 0:姝e父 1锛氬紓甯�") + private Integer houShiJing=0; + + @ApiModelProperty(value = "闆ㄥ埛鍣� 0:姝e父 1锛氬紓甯�") + private Integer yuShuaQi=0; + + @ApiModelProperty(value = "杞儙 0:姝e父 1锛氬紓甯�") + private Integer lunTai=0; + + @ApiModelProperty(value = "浠〃 0:姝e父 1锛氬紓甯�") + private Integer yiBiao=0; + + @ApiModelProperty(value = "鍒跺姩 0:姝e父 1锛氬紓甯�") + private Integer zhiDong=0; + + @ApiModelProperty(value = "瀹夊叏璁炬柦 0:姝e父 1锛氬紓甯�") + private Integer anQuan=0; + + @ApiModelProperty(value = "鍏跺畠 0:姝e父 1锛氬紓甯�") + private Integer qiTa=0; + + @ApiModelProperty(value = "澶勭悊鎰忚") + private String content; } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Fingerprint.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Fingerprint.java index 5d2e0f1..76f8f75 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Fingerprint.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Fingerprint.java @@ -35,12 +35,16 @@ @ApiModelProperty(value = "鍟嗘埛鎺ユ敹浜篿d") private String customerReceiveId; - @Column(length = 1000) - @ApiModelProperty(value = "鎸囩汗") - private String content; + @ApiModelProperty(value = "鎸囩汗缂栧彿") + private Integer code; - @ApiModelProperty(value = "鎸囧ご1-10") - private Integer num; + @ApiModelProperty(value = "鎸囩汗鏂囦欢") + private String fileId; + @ApiModelProperty(value = "鐧诲綍鍚�") + private String username; + + @ApiModelProperty(value = "瀵嗙爜") + private String password; } \ No newline at end of file -- Gitblit v1.9.1