From 26e5fedf4bb7c15c49bdb366572ceec65b270029 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Thu, 10 Oct 2024 16:42:06 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=85=AC=E5=91=8A-?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/notice/controller/admin/DlBaseNoticeController.java | 2 +- .../cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java | 3 ++- yudao-server/src/main/resources/application.yaml | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/admin/DlBaseNoticeController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/admin/DlBaseNoticeController.java index 767afdef..ecaade36 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/admin/DlBaseNoticeController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/controller/admin/DlBaseNoticeController.java @@ -75,7 +75,7 @@ public class DlBaseNoticeController { return CommonResult.ok(); } - @GetMapping("get") + @GetMapping("/get") @Operation(summary = "平台通用信息公告 查询 按服务") public CommonResult getNoticeById(@RequestParam("id") String id) { return success(dlBaseNoticeService.getById(id)); diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java index 7afcb0c2..1d19eb53 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/notice/entity/DlBaseNotice.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.notice.entity; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; @@ -16,7 +17,7 @@ import lombok.EqualsAndHashCode; @TableName(value ="dl_base_notice") @Data @EqualsAndHashCode(callSuper = true) -public class DlBaseNotice extends TenantBaseDO { +public class DlBaseNotice extends BaseDO { /** * 公告ID */ diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 5abc9474..232d9df4 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -296,6 +296,7 @@ yudao: - /admin-api/rescue/driverLogin - /admin-api/rescuePayApi/payNotify - /admin-api/payApi/payNotify + - /admin-api/base/notice/** ignore-tables: - system_tenant @@ -342,6 +343,7 @@ yudao: - tmp_report_data_1 - tmp_report_data_income - system_users + - dl_base_notice ignore-caches: - permission_menu_ids - oauth_client From 3c3bef85b8a8fbc5571ef85072a5c1d59c1339e5 Mon Sep 17 00:00:00 2001 From: PQZ Date: Thu, 10 Oct 2024 19:42:48 +0800 Subject: [PATCH 02/11] 1 --- .../admin/RepairRecordsController.java | 51 +----------------- .../module/base/entity/RepairRecords.java | 4 +- .../module/base/entity/RepairRecordsItem.java | 52 +++++++++++++++++++ .../base/mapper/RepairRecordsItemMapper.java | 16 ++++++ .../base/mapper/RepairRecordsMapper.java | 8 --- .../service/RepairRecordsItemService.java | 17 ++++++ .../base/service/RepairRecordsService.java | 39 +------------- .../impl/RepairRecordsItemServiceImpl.java | 25 +++++++++ .../impl/RepairRecordsServiceImpl.java | 40 +------------- .../base/vo/RepairRecordsSaveReqVO.java | 6 +++ .../mapper/base/RepairRecordsItemMapper.xml | 12 +++++ .../mapper/base/RepairRecordsMapper.xml | 9 ---- 12 files changed, 135 insertions(+), 144 deletions(-) create mode 100644 dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecordsItem.java create mode 100644 dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsItemMapper.java create mode 100644 dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java create mode 100644 dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java create mode 100644 dl-module-repair/src/main/resources/mapper/base/RepairRecordsItemMapper.xml diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java index 51ad4323..755a6ab0 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/controller/admin/RepairRecordsController.java @@ -1,21 +1,12 @@ package cn.iocoder.yudao.module.base.controller.admin; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.base.service.RepairRecordsService; -import cn.iocoder.yudao.module.base.vo.RepairRecordsPageReqVO; -import cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO; -import cn.iocoder.yudao.module.base.vo.RepairRecordsSaveReqVO; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -import javax.validation.Valid; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * 维修记录 管理 API @@ -30,43 +21,5 @@ public class RepairRecordsController { @Resource private RepairRecordsService repairRecordsService; - @PostMapping("/create") - @Operation(summary = "创建维修记录") - public CommonResult createRepairRecords(@Valid @RequestBody RepairRecordsSaveReqVO createReqVO) { - return success(repairRecordsService.createRepairRecords(createReqVO)); - } - @PutMapping("/update") - @Operation(summary = "更新维修记录") - public CommonResult updateRepairRecords(@Valid @RequestBody RepairRecordsSaveReqVO updateReqVO) { - repairRecordsService.updateRepairRecords(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除维修记录") - @Parameter(name = "id", description = "编号", required = true) - public CommonResult deleteRepairRecords(@RequestParam("id") String id) { - repairRecordsService.deleteRepairRecords(id); - return success(true); - } - -// @GetMapping("/get") -// @Operation(summary = "获得维修记录") -// @Parameter(name = "id", description = "编号", required = true, example = "1024") -// public CommonResult getRecords(@RequestParam("id") String id) { -// RepairRecords records = repairRecordsService.getRepairRecords(id); -// return success(BeanUtils.toBean(records, RepairRecordsRespVO.class)); -// } - - /** - * 维修工查询维修记录 - * @param pageReqVO - * - */ - @GetMapping("/page") - @Operation(summary = "获得维修记录分页") - public List queryAllRepairRecords(@RequestBody RepairRecordsPageReqVO pageReqVO) { - return repairRecordsService.queryAllRepairRecords(pageReqVO); - } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java index b93f6961..29832c35 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java @@ -23,7 +23,7 @@ public class RepairRecords extends TenantBaseDO { /** * 主键标识 */ - @TableId(type = IdType.INPUT) + @TableId(type = IdType.ASSIGN_UUID) private String id; /** * 工单id @@ -32,7 +32,7 @@ public class RepairRecords extends TenantBaseDO { /** * 工单子表id */ - private String repairTitemId; + private String repairItemId; /** * 记录类型(repair_records_type) */ diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecordsItem.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecordsItem.java new file mode 100644 index 00000000..97f7ca71 --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecordsItem.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.base.entity; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * 维修记录附件 + * @author pqz + */ +@TableName("dl_repair_records_item") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class RepairRecordsItem extends TenantBaseDO { + + /** + * 主键标识 + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 记录id + */ + private String recordId; + /** + * 工单id + */ + private String ticketId; + /** + * 工单子表id + */ + private String repairItemId; + /** + * 记录描述 + */ + private String remark; + /** + * 图片附件 + */ + private String image; + /** + * 是否开放给用户(0否1是) + */ + private String isOpen; + +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsItemMapper.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsItemMapper.java new file mode 100644 index 00000000..fbce397a --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsItemMapper.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.base.mapper; + +import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 维修记录 Mapper + * + * @author pqz + */ +@Mapper +public interface RepairRecordsItemMapper extends BaseMapper { + + +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java index 72967e18..12cf61b8 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java @@ -18,13 +18,5 @@ import java.util.List; public interface RepairRecordsMapper extends BaseMapper { - /** - * 查询维修记录 - * @author lzt - * @param entity 查询条件 - * @return List - * @date 2024年10月9日 - */ - List queryAllRepairRecords(@Param("entity") RepairRecordsPageReqVO entity); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java new file mode 100644 index 00000000..57b2f2c2 --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.base.service; + +import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 维修记录 Service 接口 + * + * @author pqz + */ +public interface RepairRecordsItemService extends IService { + + + + + +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java index 3f308cbe..e1d42d02 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java @@ -19,44 +19,7 @@ import java.util.List; */ public interface RepairRecordsService extends IService { - /** - * 创建维修记录 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - String createRepairRecords(@Valid RepairRecordsSaveReqVO createReqVO); - - /** - * 更新维修记录 - * - * @param updateReqVO 更新信息 - */ - void updateRepairRecords(@Valid RepairRecordsSaveReqVO updateReqVO); - - /** - * 删除维修记录 - * - * @param id 编号 - */ - void deleteRepairRecords(String id); - -// /** -// * 获得维修记录 -// * -// * @param id 编号 -// * @return 维修记录 -// */ -// RepairRecords getRepairRecords(String id); - - /** - * 获得维修记录 - * - * @param pageReqVO 查询条件 - * @return queryAllRepairRecords 所有维修记录 - */ - List queryAllRepairRecords(RepairRecordsPageReqVO pageReqVO); - + void saveRepairRecord(RepairRecordsSaveReqVO saveReqVO); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java new file mode 100644 index 00000000..4aa60220 --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.base.service.impl; + +import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; +import cn.iocoder.yudao.module.base.mapper.RepairRecordsItemMapper; +import cn.iocoder.yudao.module.base.service.RepairRecordsItemService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; + +/** + * 维修记录 Service 实现类 + * + * @author pqz + */ +@Service +@Validated +public class RepairRecordsItemServiceImpl extends ServiceImpl implements RepairRecordsItemService { + + @Resource + private RepairRecordsItemMapper itemMapper; + + +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java index 99a13819..200a65cb 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java @@ -29,45 +29,9 @@ public class RepairRecordsServiceImpl extends ServiceImpl queryAllRepairRecords(RepairRecordsPageReqVO pageReqVO) { - return repairRecordsMapper.queryAllRepairRecords(pageReqVO); - } - - } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java index 6cbdda8d..d4eda512 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java @@ -1,12 +1,18 @@ package cn.iocoder.yudao.module.base.vo; import cn.iocoder.yudao.module.base.entity.RepairRecords; +import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + @Schema(description = "管理后台 - 维修记录新增/修改 Request VO") @Data public class RepairRecordsSaveReqVO extends RepairRecords { + /**维修记录附件表*/ + List itemList; + } diff --git a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsItemMapper.xml b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsItemMapper.xml new file mode 100644 index 00000000..5b0ca8e3 --- /dev/null +++ b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsItemMapper.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml index b205d10e..e5b4971d 100644 --- a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml @@ -9,15 +9,6 @@ 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> - From 8030ee5fe363b2902c7e8635b6b2f1dff64b9a04 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Fri, 11 Oct 2024 10:32:51 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E9=80=9A=E7=94=A8=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/iocoder/yudao/common/SystemEnum.java | 44 +++++++ .../app/wechat/service/WechatService.java | 14 +++ .../service/impl/WechatServiceImpl.java | 74 +++++++++++ .../java/cn/iocoder/yudao/util/AESUtil.java | 61 +++++++++ .../app/controller/LoginController.java | 117 ++++-------------- .../app/service/WechatLoginService.java | 20 --- .../yudao/module/app/vo/WxLoginBody.java | 2 +- .../service/auth/AdminAuthServiceImpl.java | 2 +- 8 files changed, 220 insertions(+), 114 deletions(-) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/common/SystemEnum.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/util/AESUtil.java delete mode 100644 dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/SystemEnum.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/SystemEnum.java new file mode 100644 index 00000000..40e75ac4 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/SystemEnum.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.common; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * Bpm 消息的枚举 + * + * @author 芋道源码 + */ +@AllArgsConstructor +@Getter +public enum SystemEnum { + /** + * 维修系统 + */ + REPAIR("weixiu","维修系统"), + /** + * 救援系统 + */ + RESCUE("jiuyuan","救援系统"), + /** + * 驾校系统 + */ + SCHOOL("jiaxiao","驾校系统"), + /** + * 检测系统 + */ + INSPECTION("jiance","检测系统"), + /** + * 保险系统 + */ + INSURE("baoxian","保险系统"); + + /** + * 系统标识 + */ + private String code; + /** + * 系统名称 + */ + private String name; + +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java index d08add78..29280b72 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/WechatService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.app.wechat.service; import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; /** * @author vinjor-m @@ -14,4 +15,17 @@ public interface WechatService { * @param map 参数 **/ CommonResult loginByOpenId(String code); + + /** + * 微信授权登录-未注册自动注册,已登录的返回用户信息- + * --目前维修系统使用,后续客户信息整合可以复用 + * @author vinjor-M + * @date 15:14 2024/10/9 + * @param sysCode 系统标识 + * @param decryptResult 微信授权解密密文 + * @param openId 微信openId + * @param inviteId 邀请者code + * @return cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO + **/ + AdminUserDO wechatLogin(String sysCode, String decryptResult, String openId, String inviteId); } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java index 3cc6460a..e683756a 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java @@ -1,15 +1,22 @@ package cn.iocoder.yudao.module.app.wechat.service.impl; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.common.SystemEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.app.wechat.service.WechatService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; +import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.util.WeChatLoginUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -31,6 +38,10 @@ public class WechatServiceImpl implements WechatService { private AdminUserApi adminUserApi; @Resource private AdminAuthService loginService; + @Resource + private AdminUserService userService; + @Resource + private PasswordEncoder passwordEncoder; /** * 微信自动登录 * @@ -88,4 +99,67 @@ public class WechatServiceImpl implements WechatService { throw new Exception(e.getMessage()); } } + + /** + * 微信授权登录-未注册自动注册,已登录的返回用户信息- + * --目前维修系统使用,后续客户信息整合可以复用 + * + * @param sysCode 系统标识 + * @param decryptResult 微信授权解密密文 + * @param openId 微信openId + * @param inviteId 邀请者code + * @return cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO + * @author vinjor-M + * @date 15:14 2024/10/9 + **/ + @Override + public AdminUserDO wechatLogin(String sysCode, String decryptResult, String openId, String inviteId) { + //字符串转json + JSONObject jsonObject = JSONUtil.parseObj(decryptResult); + String phoneNumber = jsonObject.getStr("phoneNumber"); + //根据手机号判断数据库中是否有该用户 + AdminUserDO wxUser = userService.getUserByMobileWithoutTenant(phoneNumber); + //如果查不到,则新增,查到了,则更新 + UserSaveReqVO user = new UserSaveReqVO(); + if (null == wxUser) { + // 直接新注册一个账号 + user.setUsername(phoneNumber); + user.setNickname(phoneNumber); + user.setMobile(phoneNumber); + user.setPassword(passwordEncoder.encode("123456")); + //TODO 客户后期没有租户ID + user.setTenantId(180L); + user.setDeptId(100L); + }else { + //更新 + user.setId(wxUser.getId()); + } + //设置微信openId + if(SystemEnum.REPAIR.getCode().equals(sysCode)){ + //维修业务系统 + user.setRepairOpenId(openId); + }else if(SystemEnum.INSPECTION.getCode().equals(sysCode)){ + //检测业务系统 + }else if(SystemEnum.SCHOOL.getCode().equals(sysCode)){ + //驾校业务系统 + }else if(SystemEnum.RESCUE.getCode().equals(sysCode)){ + //救援业务系统 + }else if(SystemEnum.INSURE.getCode().equals(sysCode)){ + //保险业务系统 + }else { + //默认维修业务 + user.setRepairOpenId(openId); + } + if(null!=user.getId()){ + //更新 + userService.updateUser(user); + }else{ + //插入 + Long uid = userService.createUser(user); + wxUser = new AdminUserDO(); + wxUser.setId(uid); + wxUser.setUsername(phoneNumber); + } + return wxUser; + } } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/util/AESUtil.java b/dl-module-base/src/main/java/cn/iocoder/yudao/util/AESUtil.java new file mode 100644 index 00000000..d5f236df --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/util/AESUtil.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.util; + +import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; +import org.springframework.stereotype.Component; + +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.security.spec.AlgorithmParameterSpec; +import java.util.Arrays; + +/** + * AES加解密util + * @author vinjor-M + * @date 17:41 2024/10/10 +**/ +@Component +public class AESUtil { + /** + * AES解密 + */ + public String decrypt(String sessionKey,String encryptedIv,String encryptedData) throws Exception{ + // 转化为字节数组 + byte[] key = Base64.decode(sessionKey); + byte[] iv = Base64.decode(encryptedIv); + byte[] encData = Base64.decode(encryptedData); + // 如果密钥不足16位,那么就补足 + int base =16; + if (key.length % base !=0) { + int groups = key.length / base +(key.length % base != 0 ? 1 : 0); + byte[] temp = new byte[groups * base]; + Arrays.fill(temp,(byte) 0); + System.arraycopy(key,0,temp,0,key.length); + key = temp; + } + // 如果初始向量不足16位,也补足 + if (iv.length % base !=0) { + int groups = iv.length / base +(iv.length % base != 0 ? 1 : 0); + byte[] temp = new byte[groups * base]; + Arrays.fill(temp,(byte) 0); + System.arraycopy(iv,0,temp,0,iv.length); + iv = temp; + } + + AlgorithmParameterSpec ivSpec = new IvParameterSpec(iv); + String resultStr = null; + + try { + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + SecretKeySpec keySpec = new SecretKeySpec(key,"AES"); + cipher.init(Cipher.DECRYPT_MODE,keySpec,ivSpec); + resultStr = new String(cipher.doFinal(encData),"UTF-8"); + } catch (Exception e){ +// logger.info("解析错误"); + e.printStackTrace(); + } + + // 解析加密后的字符串 + return resultStr; + } +} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java index c1ba316c..e3ed1641 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java @@ -1,62 +1,34 @@ package cn.iocoder.yudao.module.app.controller; -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.common.CommonErrorCodeConstants; +import cn.iocoder.yudao.common.SystemEnum; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.security.config.SecurityProperties; -import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; - import cn.iocoder.yudao.module.app.vo.WxLoginBody; -import cn.iocoder.yudao.module.custom.entity.CustomerMain; -import cn.iocoder.yudao.module.custom.service.CustomerMainService; -import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; -import cn.iocoder.yudao.module.system.api.dict.DictDataApi; -import cn.iocoder.yudao.module.system.api.permission.PermissionApi; -import cn.iocoder.yudao.module.system.api.permission.RoleApi; -import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO; -import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO; +import cn.iocoder.yudao.module.app.wechat.service.WechatService; import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginRespVO; -import cn.iocoder.yudao.module.system.controller.admin.user.LoginBody; -import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO; -import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; -import cn.iocoder.yudao.module.system.service.permission.MenuService; -import cn.iocoder.yudao.module.system.service.permission.RoleService; -import cn.iocoder.yudao.module.system.service.user.AdminUserService; +import cn.iocoder.yudao.util.AESUtil; import cn.iocoder.yudao.util.WechatPayConfig; import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; - import javax.annotation.Resource; -import javax.crypto.Cipher; -import javax.crypto.spec.IvParameterSpec; -import javax.crypto.spec.SecretKeySpec; import javax.servlet.http.HttpServletRequest; -import java.security.spec.AlgorithmParameterSpec; -import java.util.Arrays; import java.util.HashMap; -import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.stream.Collectors; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.*; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * 登录验证 @@ -76,11 +48,20 @@ public class LoginController { @Resource private SecurityProperties securityProperties; @Autowired - private CustomerMainService customerMainService; + private WechatService wechatService; + @Autowired + private AESUtil aesUtil; + /** + * 微信授权登录 + * @author vinjor-M + * @date 17:43 2024/10/10 + * @param wxLoginBody 请求体 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ @PostMapping("/wxLogin") @TenantIgnore - public CommonResult wxLogin(@RequestBody WxLoginBody wxLoginBody) { + public CommonResult wxLogin(@RequestBody WxLoginBody wxLoginBody) { String code = wxLoginBody.getCode(); //秘钥 String encryptedIv = wxLoginBody.getEncryptedIv(); @@ -97,29 +78,25 @@ public class LoginController { String decryptResult = ""; try { //如果没有绑定微信开放平台,解析结果是没有unionid的。 - decryptResult = decrypt(sessionKey, encryptedIv, encryptedData); + decryptResult = aesUtil.decrypt(sessionKey, encryptedIv, encryptedData); } catch (Exception e) { e.printStackTrace(); return error(500, "微信登录失败!"); } - if (StringUtils.hasText(decryptResult)) { //如果解析成功,获取token - AuthLoginRespVO loginVO = loginService.wxLoginRepair(decryptResult,openId,wxLoginBody.getInviteId()); + //查用户(未注册的话自动注册) + AdminUserDO adminUserDO = wechatService.wechatLogin(SystemEnum.REPAIR.getCode(),decryptResult,openId,wxLoginBody.getInviteId()); + //登录生成token + AuthLoginRespVO loginVO = loginService.wxLoginByUserId(adminUserDO.getId(),adminUserDO.getUsername()); Map map = new HashMap<>(); map.put("token", loginVO.getAccessToken()); - //查会员表里是否有数据 - CustomerMain customerMain = customerMainService.getCustomerByUserId(loginVO.getUserId()); - map.put("ifNeedFill", null==customerMain); return success(map); } else { return error(500, "微信登录失败!"); } } - - - @PostMapping("/logout") @Operation(summary = "登出系统") public CommonResult logout(HttpServletRequest request) { @@ -130,48 +107,4 @@ public class LoginController { } return success(true); } - - /** - * AES解密 - */ - private String decrypt(String sessionKey,String encryptedIv,String encryptedData) throws Exception{ - // 转化为字节数组 - byte[] key = Base64.decode(sessionKey); - byte[] iv = Base64.decode(encryptedIv); - byte[] encData = Base64.decode(encryptedData); - // 如果密钥不足16位,那么就补足 - int base =16; - if (key.length % base !=0) { - int groups = key.length / base +(key.length % base != 0 ? 1 : 0); - byte[] temp = new byte[groups * base]; - Arrays.fill(temp,(byte) 0); - System.arraycopy(key,0,temp,0,key.length); - key = temp; - } - // 如果初始向量不足16位,也补足 - if (iv.length % base !=0) { - int groups = iv.length / base +(iv.length % base != 0 ? 1 : 0); - byte[] temp = new byte[groups * base]; - Arrays.fill(temp,(byte) 0); - System.arraycopy(iv,0,temp,0,iv.length); - iv = temp; - } - - AlgorithmParameterSpec ivSpec = new IvParameterSpec(iv); - String resultStr = null; - - try { - Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); - SecretKeySpec keySpec = new SecretKeySpec(key,"AES"); - cipher.init(Cipher.DECRYPT_MODE,keySpec,ivSpec); - resultStr = new String(cipher.doFinal(encData),"UTF-8"); - } catch (Exception e){ -// logger.info("解析错误"); - e.printStackTrace(); - } - - // 解析加密后的字符串 - return resultStr; - } - } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java deleted file mode 100644 index 13fc339b..00000000 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.app.service; - -import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; - -/** - * @author vinjor-m - * @description 维修模块微信登录逻辑 - **/ -public interface WechatLoginService { - /** - * 维修系统-微信授权登录-未注册自动注册 - * @author vinjor-M - * @date 15:14 2024/10/9 - * @param decryptResult TODO - * @param openId TODO - * @param inviteId TODO - * @return cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO - **/ - AdminUserDO wechatLogin(String decryptResult,String openId,String inviteId); -} diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/vo/WxLoginBody.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/vo/WxLoginBody.java index 0d219ff4..d99b2c38 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/vo/WxLoginBody.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/vo/WxLoginBody.java @@ -20,5 +20,5 @@ public class WxLoginBody { private String encryptedData; //邀请码 - private Long inviteId; + private String inviteId; } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index cdd01132..5886d2eb 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -408,7 +408,7 @@ public class AdminAuthServiceImpl implements AdminAuthService { @Override public AuthLoginRespVO wxLoginByUserId(Long userId, String userName) { // 生成token - return createTokenAfterLoginSuccess(userId, userName, LoginLogTypeEnum.LOGIN_USERNAME); + return createTokenAfterLoginSuccess(userId, userName, LoginLogTypeEnum.LOGIN_SOCIAL); } /** From 1ed5310e227a36bc5161085493e9dd0555a96639 Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Fri, 11 Oct 2024 00:13:16 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit e1b00b5ac6d9606bfeace2db066f3983828e2cc8) --- .../InspectionEquInfoController.java | 15 ++++++----- .../controller/PartnerOwnController.java | 26 +++++++++---------- .../mapper/AppInspectionPartnerMapper.java | 4 +-- .../mapper/InspectionAppointmentMapper.java | 3 ++- .../mapper/InspectionEquInfoMapper.java | 5 +++- .../service/AppInspectionPartnerService.java | 6 ++--- .../IInspectionAppointmentService.java | 3 ++- .../service/IInspectionEquInfoService.java | 4 ++- .../impl/AppInspectionPartnerServiceImpl.java | 9 +++---- .../InspectionAppointmentServiceImpl.java | 3 ++- .../impl/InspectionEquInfoServiceImpl.java | 6 +++-- .../module/payment/entity/OrderInfo.java | 14 ++++------ .../service/impl/OrderInfoServiceImpl.java | 2 +- .../inspection/AppInspectionPartnerMapper.xml | 3 +-- .../inspection/InspectionEquInfoMapper.xml | 9 ++++--- yudao-dependencies/pom.xml | 2 +- .../service/auth/AdminAuthServiceImpl.java | 2 +- 17 files changed, 62 insertions(+), 54 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java index a7a5b03b..e3d691e3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/InspectionEquInfoController.java @@ -7,6 +7,8 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.inspection.service.AppInspectionPartnerService; import cn.iocoder.yudao.module.shop.entity.ShopMallPartners; import cn.iocoder.yudao.util.ExcelUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -39,11 +41,11 @@ public class InspectionEquInfoController extends BaseController * 查询equInfo列表 */ @GetMapping("/list") - public TableDataInfo list(InspectionEquInfo inspectionEquInfo) throws Exception { + public CommonResult list(Integer pageNum,Integer pageSize,InspectionEquInfo inspectionEquInfo) throws Exception { - startPage(); - List list = inspectionEquInfoService.selectInspectionEquInfoList(inspectionEquInfo); - return getDataTable(list); + Page page =new Page(pageNum,pageSize); + IPage list = inspectionEquInfoService.selectInspectionEquInfoList(page,inspectionEquInfo); + return success(list); } /** @@ -52,9 +54,10 @@ public class InspectionEquInfoController extends BaseController @PostMapping("/export") public void export(HttpServletResponse response, InspectionEquInfo inspectionEquInfo) { - List list = inspectionEquInfoService.selectInspectionEquInfoList(inspectionEquInfo); + Page page =new Page(1,100000); + IPage list = inspectionEquInfoService.selectInspectionEquInfoList(page,inspectionEquInfo); ExcelUtil util = new ExcelUtil(InspectionEquInfo.class); - util.exportExcel(response, list, "equInfo数据"); + util.exportExcel(response, list.getRecords(), "equInfo数据"); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java index 7f852a34..ec92bbe3 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/PartnerOwnController.java @@ -347,14 +347,14 @@ public class PartnerOwnController extends BaseController { //获取检测的数据 @GetMapping("/inspectionList") - public TableDataInfo inspectionList(Long partnerId,String status,String carNum,Integer pageSize,Integer pageNum) throws Exception { + public CommonResult inspectionList(Long partnerId,String status,String carNum,Integer pageSize,Integer pageNum) throws Exception { ShopMallPartners partners = partnerList.shopInfo(); if (!partnerId.equals(partners.getPartnerId())){ return null; } Page page = new Page<>(pageNum,pageSize); - List inspectionInfos = partnerList.inspectionList(page,partnerId, status, carNum); - return getDataTable(inspectionInfos); + IPage inspectionInfos = partnerList.inspectionList(page,partnerId, status, carNum); + return success(inspectionInfos); } //获取检测的详细信息 @@ -365,7 +365,7 @@ public class PartnerOwnController extends BaseController { //获取检测的数据 @GetMapping("/workerInspectionList") - public TableDataInfo workerInspectionList(Long partnerId,String status,String searchValue,Integer pageSize,Integer pageNum) { + public CommonResult workerInspectionList(Long partnerId,String status,String searchValue,Integer pageSize,Integer pageNum) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); queryWrapper.eq(PartnerWorker::getUserId,user.getId()).eq(PartnerWorker::getPartnerId,partnerId); @@ -374,8 +374,8 @@ public class PartnerOwnController extends BaseController { return null; } Page page = new Page<>(pageNum,pageSize); - List inspectionInfos = partnerList.inspectionList(page,partnerId, status, searchValue); - return getDataTable(inspectionInfos); + IPage inspectionInfos = partnerList.inspectionList(page,partnerId, status, searchValue); + return success(inspectionInfos); } //增加检测步骤信息 @PostMapping("/addStepInfo") @@ -397,28 +397,28 @@ public class PartnerOwnController extends BaseController { } //获取到店预约的数据 @GetMapping("/getAppointmentList") - public TableDataInfo getAppointmentList(Long partnerId,String phoneNum,Integer pageSize,Integer pageNum) { + public CommonResult getAppointmentList(Long partnerId,String phoneNum,Integer pageSize,Integer pageNum) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); ShopMallPartners partnersTmp = partnerList.getById(partnerId); if (!partnersTmp.getUserId().equals(user.getId())){ return null; } Page page = new Page<>(pageNum,pageSize); - List appointments = partnerList.getAppointmentList(page,partnerId,phoneNum); - return getDataTable(appointments); + IPage appointments = partnerList.getAppointmentList(page,partnerId,phoneNum); + return success(appointments); } //获取上门取车数据 @GetMapping("/getPickCarList") - public TableDataInfo getPickCarList(Long partnerId,String phoneNum,String pickStatus,Integer pageSize,Integer pageNum) { + public CommonResult getPickCarList(Long partnerId,String phoneNum,String pickStatus,Integer pageSize,Integer pageNum) { LoginUser user = SecurityFrameworkUtils.getLoginUser(); ShopMallPartners partnersTmp = partnerList.getById(partnerId); if (!partnersTmp.getUserId().equals(user.getId())){ return null; } - PageHelper.startPage(pageNum,pageSize); - List pickCarList = partnerList.getPickCarList(partnerId,phoneNum,pickStatus); - return getDataTable(pickCarList); + Page page = new Page<>(pageNum,pageSize); + IPage pickCarList = partnerList.getPickCarList(page,partnerId,phoneNum,pickStatus); + return success(pickCarList); } //获取上门取车详情页 diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java index b0e09768..61e2716d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/AppInspectionPartnerMapper.java @@ -36,10 +36,10 @@ public interface AppInspectionPartnerMapper extends BaseMapper List orderList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum,@Param("title") String title); List getWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum); IPage pageWorkList(@Param("partnerId")Long partnerId, @Param("postId") Long postId, @Param("workName") String workName, @Param("phoneNum")String phoneNum,Page page); - List inspectionList(Page page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum); + IPage inspectionList(Page page,@Param("partnerId")Long partnerId, @Param("status") String status, @Param("carNum")String carNum); List workerInspectionList(@Param("workerId")Long workerId,@Param("status") String status, @Param("searchValue")String searchValue); List validationList(@Param("partnerId") Long partnerId, @Param("searchValue") String searchValue); - List getPickCarList(@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum, @Param("pickStatus") String pickStatus); + IPage getPickCarList(Page page,@Param("partnerId") Long partnerId, @Param("phoneNum") String phoneNum, @Param("pickStatus") String pickStatus); List getPickCarListOfWorker(@Param("workerId") Long workerId, @Param("phoneNum") String phoneNum); List chartInfoAmount(@Param("startTime") String startTime,@Param("endTime")String endTime,@Param("partnerId")Long partnerId); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionAppointmentMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionAppointmentMapper.java index d5af610f..ca85cfa0 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionAppointmentMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionAppointmentMapper.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.inspection.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -64,7 +65,7 @@ public interface InspectionAppointmentMapper extends BaseMapper getAppointmentList(Page page,@Param("partnerId") Long partnerId, @Param("phoneNum")String phoneNum); + IPage getAppointmentList(Page page, @Param("partnerId") Long partnerId, @Param("phoneNum")String phoneNum); List getAppointmentOwn(@Param("userId") Long userId); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionEquInfoMapper.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionEquInfoMapper.java index ebfca915..ce5aac7b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionEquInfoMapper.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/mapper/InspectionEquInfoMapper.java @@ -4,7 +4,10 @@ import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.iocoder.yudao.module.inspection.entity.InspectionEquInfo; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * equInfoMapper接口 @@ -29,6 +32,6 @@ public interface InspectionEquInfoMapper extends BaseMapper * @param inspectionEquInfo equInfo * @return equInfo集合 */ - public List selectInspectionEquInfoList(InspectionEquInfo inspectionEquInfo); + public IPage selectInspectionEquInfoList(Page page, @Param("inspectionEquInfo") InspectionEquInfo inspectionEquInfo); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java index 1a607599..d6efc30b 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/AppInspectionPartnerService.java @@ -69,20 +69,20 @@ public interface AppInspectionPartnerService extends IService void delWorker(Long partnerId,Long workId); - List inspectionList(Page page,Long partnerId, String status, String carNum); + IPage inspectionList(Page page,Long partnerId, String status, String carNum); InspectionInfoVo inspectionDetail(Long inspectionInfoId); List workerInspectionList(Long partnerId,String status,String searchValue); void addStepInfo(InspectionStepInfo stepInfo); void stopInspection(InspectionInfo info) throws Exception; void makeCertOk(Long inspectionId); - List getAppointmentList(Page page,Long partnerId,String phoneNum); + IPage getAppointmentList(Page page,Long partnerId,String phoneNum); List validationList(Long partnerId,String searchValue); void sendCoupon(ShopCouponTemplate template) throws Exception; List listCoupon(Long partnerId,String searchValue); void delCoupon(Long partnerId,Long id); void designatePickCarWorker(Long pickCarId,Long workerId); - List getPickCarList(Long partnerId, String phoneNum,String pickStatus); + IPage getPickCarList(Page page,Long partnerId, String phoneNum,String pickStatus); InspectionPickCar getPickCarDetail(Long dataId); List getPickCarListOfWorker(Long workerId, String phoneNum); JSONObject vehicleLicenseOCR(String imagePath) throws Exception; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionAppointmentService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionAppointmentService.java index 3ad5e154..88f040c9 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionAppointmentService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionAppointmentService.java @@ -1,6 +1,7 @@ package cn.iocoder.yudao.module.inspection.service; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.InspectionAppointment; @@ -73,6 +74,6 @@ public interface IInspectionAppointmentService extends IService getAppointmentList(Page page,Long partnerId, String phoneNum); + public IPage getAppointmentList(Page page, Long partnerId, String phoneNum); List getAppointmentOwn(); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionEquInfoService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionEquInfoService.java index 971f1f6d..e8d157b7 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionEquInfoService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/IInspectionEquInfoService.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.inspection.service; import java.util.List; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import cn.iocoder.yudao.module.inspection.entity.InspectionEquInfo; @@ -27,7 +29,7 @@ public interface IInspectionEquInfoService extends IService * @param inspectionEquInfo equInfo * @return equInfo集合 */ - public List selectInspectionEquInfoList(InspectionEquInfo inspectionEquInfo); + public IPage selectInspectionEquInfoList(Page page,InspectionEquInfo inspectionEquInfo); /** * 新增equInfo diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java index f6721005..25f890c8 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/AppInspectionPartnerServiceImpl.java @@ -239,7 +239,6 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl inspectionList(Page page,Long partnerId, String status, String carNum) { + public IPage inspectionList(Page page,Long partnerId, String status, String carNum) { return baseMapper.inspectionList(page,partnerId,status,carNum); } @@ -1243,7 +1242,7 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl getAppointmentList(Page page,Long partnerId,String phoneNum) { + public IPage getAppointmentList(Page page,Long partnerId,String phoneNum) { return appointmentService.getAppointmentList(page,partnerId,phoneNum); } @@ -1311,9 +1310,9 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl getPickCarList(Long partnerId, String phoneNum,String pickStatus) { + public IPage getPickCarList(Page page,Long partnerId, String phoneNum,String pickStatus) { - return baseMapper.getPickCarList(partnerId,phoneNum,pickStatus); + return baseMapper.getPickCarList(page,partnerId,phoneNum,pickStatus); } @Override diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionAppointmentServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionAppointmentServiceImpl.java index aa52b592..eb41970f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionAppointmentServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionAppointmentServiceImpl.java @@ -13,6 +13,7 @@ import cn.iocoder.yudao.module.system.service.user.AdminUserService; import cn.iocoder.yudao.util.SendSmsUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.util.DateUtils; @@ -347,7 +348,7 @@ public class InspectionAppointmentServiceImpl extends ServiceImpl getAppointmentList(Page page,Long partnerId, String phoneNum) { + public IPage getAppointmentList(Page page, Long partnerId, String phoneNum) { return baseMapper.getAppointmentList(page,partnerId,phoneNum); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionEquInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionEquInfoServiceImpl.java index 54c7d741..664fc4d2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionEquInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionEquInfoServiceImpl.java @@ -7,6 +7,8 @@ import java.util.List; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.iocoder.yudao.util.DateUtils; import cn.iocoder.yudao.module.inspection.entity.WarnMessage; @@ -48,9 +50,9 @@ public class InspectionEquInfoServiceImpl extends ServiceImpl selectInspectionEquInfoList(InspectionEquInfo inspectionEquInfo) + public IPage selectInspectionEquInfoList(Page page,InspectionEquInfo inspectionEquInfo) { - return baseMapper.selectInspectionEquInfoList(inspectionEquInfo); + return baseMapper.selectInspectionEquInfoList(page,inspectionEquInfo); } /** diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/OrderInfo.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/OrderInfo.java index ddedb438..4392c762 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/OrderInfo.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/entity/OrderInfo.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.payment.entity; +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -14,7 +15,7 @@ import java.util.Date; * @since 2023-07-24 18:30:28 */ @Data -public class OrderInfo { +public class OrderInfo extends TenantBaseDO { //订单id private Long id; private String transactionId; @@ -63,16 +64,11 @@ public class OrderInfo { private Integer commentStar; //订单类型 private String orderType; - //创建时间 - private Date createTime; - //创建人id - private Long creator; + + //创建人所在部门 private Long deptId; - //更新时间 - private Date updateTime; - //更新人id - private Integer updater; + //积分充值的金额 @TableField(exist = false) private Long balanceCz; diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/OrderInfoServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/OrderInfoServiceImpl.java index 7133e0c3..c6c9208d 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/OrderInfoServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/payment/service/impl/OrderInfoServiceImpl.java @@ -278,7 +278,7 @@ public class OrderInfoServiceImpl extends ServiceImpl select * from inspection_equ_info - and equ_name like concat('%', #{equName}, '%') - and equ_model like concat('%', #{equModel}, '%') - and equ_number like concat('%', #{equNumber}, '%') - and next_check_time between #{params.beginNextCheckTime} and #{params.endNextCheckTime} + and equ_name like concat('%', #{inspectionEquInfo.equName}, '%') + and equ_model like concat('%', #{inspectionEquInfo.equModel}, '%') + and equ_number like concat('%', #{inspectionEquInfo.equNumber}, '%') + + and next_check_time between #{inspectionEquInfo.params.beginNextCheckTime} and #{inspectionEquInfo.params.endNextCheckTime} diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 4f823ba4..096bfa19 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -26,7 +26,7 @@ 1.2.23 3.5.16 3.5.7 - 2.1.0 + 1.4.6 4.9 3.5.7 4.3.1 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index 5886d2eb..bd91cbad 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -375,7 +375,7 @@ public class AdminAuthServiceImpl implements AdminAuthService { List jcyh = roleService.getRoleListByCodes(Collections.singletonList("jcyh")); Set ids = new HashSet<>(); ids.add(jcyh.get(0).getId()); - permissionService.assignUserRole(user.getId(),ids); + permissionService.assignUserRole(uid,ids); }else { //更新 user.setId(wxUser.getId()); From e55ff5d7f7608480eec493aad1030a662ec08fb5 Mon Sep 17 00:00:00 2001 From: PQZ Date: Fri, 11 Oct 2024 14:03:58 +0800 Subject: [PATCH 05/11] 1 --- .../iocoder/yudao/common/BaseConstants.java | 6 + .../controller/admin/UserCarController.java | 21 ++++ .../yudao/module/custom/entity/UserCar.java | 119 ++++++++++++++++++ .../module/custom/mapper/UserCarMapper.java | 16 +++ .../module/custom/service/UserCarService.java | 14 +++ .../service/impl/UserCarServiceImpl.java | 23 ++++ .../resources/mapper/custom/UserCarMapper.xml | 12 ++ .../service/RepairRecordsItemService.java | 12 +- .../base/service/RepairRecordsService.java | 7 +- .../impl/RepairRecordsItemServiceImpl.java | 33 +++++ .../impl/RepairRecordsServiceImpl.java | 14 +-- .../base/vo/RepairRecordsSaveReqVO.java | 2 + 12 files changed, 268 insertions(+), 11 deletions(-) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java create mode 100644 dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index f65c46be..670e7666 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -94,5 +94,11 @@ public class BaseConstants { public static final String ORDER_KKYL = "3"; /**订单店铺名称*/ public static final String ORDER_TENANT_NAME = "蓝安集团"; + /**工单*/ + public static final String REPAIR_RECORD_TYPE_TICKET = "ticket"; + /**工单附属项目*/ + public static final String REPAIR_RECORD_TYPE_REPAIR_ITEM = "repairItem"; + /**维修记录*/ + public static final String REPAIR_RECORD_TYPE_RECORD = "record"; } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java new file mode 100644 index 00000000..06d28ae7 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.custom.controller.admin; + +import cn.iocoder.yudao.module.custom.service.UserCarService; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Tag(name = "管理后台 - 用户车辆信息表--用户个人录入的") +@RestController +@RequestMapping("/base/user-car") +@Validated +public class UserCarController { + + @Resource + private UserCarService userCarService; + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java new file mode 100644 index 00000000..e5dbe0db --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java @@ -0,0 +1,119 @@ +package cn.iocoder.yudao.module.custom.entity; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * 用户车辆信息表--用户个人录入的 DO + * + * @author vinjor-M + */ +@TableName("base_user_car") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class UserCar extends BaseDO { + + /** + * 主键标识 + */ + @TableId(type = IdType.ASSIGN_UUID) + private String id; + /** + * 发动机号码 + */ + private String engineNumber; + /** + * 车架号 + */ + private String vin; + /** + * 车牌号 + */ + private String licenseNumber; + /** + * 车辆品牌 + */ + private String carBrand; + /** + * 车辆型号 + */ + private String carModel; + /** + * 车辆性质:营运 非营运等 + */ + private String carNature; + /** + * 车辆类别:私家车 货车 教练车 公务车 出租车 + */ + private String carCategory; + /** + * 行驶证图片 + */ + private String carLicenseImg; + /** + * 车辆注册日期 + */ + private LocalDateTime carRegisterDate; + /** + * 保养日期 + */ + private LocalDateTime maintenanceDate; + /** + * 保养里程 + */ + private Long maintenanceMileage; + /** + * 年检日期 + */ + private LocalDateTime inspectionDate; + /** + * 保险日期 + */ + private LocalDateTime insuranceDate; + /** + * 二级维护时间 + */ + private LocalDateTime checkDate; + /** + * 下次保养日期 + */ + private LocalDateTime nextMaintenanceDate; + /** + * 下次保养里程 + */ + private Long nextMaintenanceMileage; + /** + * 下次年检日期 + */ + private LocalDateTime nextInspectionDate; + /** + * 保险到期日期 + */ + private LocalDateTime insuranceExpiryDate; + /** + * 下次二级维护时间 + */ + private LocalDateTime nextCheckDate; + /** + * 是否车主 + */ + private String isOwner; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java new file mode 100644 index 00000000..6954e49e --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.custom.mapper; + +import cn.iocoder.yudao.module.custom.entity.UserCar; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户车辆信息表--用户个人录入的 Mapper + * + * @author vinjor-M + */ +@Mapper +public interface UserCarMapper extends BaseMapper { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java new file mode 100644 index 00000000..df877698 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.custom.service; + +import cn.iocoder.yudao.module.custom.entity.UserCar; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 用户车辆信息表--用户个人录入的 Service 接口 + * + * @author vinjor-M + */ +public interface UserCarService extends IService { + + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java new file mode 100644 index 00000000..ac74f5d9 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java @@ -0,0 +1,23 @@ +package cn.iocoder.yudao.module.custom.service.impl; + +import cn.iocoder.yudao.module.custom.entity.UserCar; +import cn.iocoder.yudao.module.custom.mapper.UserCarMapper; +import cn.iocoder.yudao.module.custom.service.UserCarService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; + +/** + * 用户车辆信息表--用户个人录入的 Service 实现类 + * + * @author vinjor-M + */ +@Service +@Validated +public class UserCarServiceImpl extends ServiceImpl implements UserCarService { + + @Resource + private UserCarMapper userCarMapper; +} \ No newline at end of file diff --git a/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml b/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml new file mode 100644 index 00000000..248fa658 --- /dev/null +++ b/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java index 57b2f2c2..56da29c6 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java @@ -10,8 +10,14 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface RepairRecordsItemService extends IService { - - - + /** + * 根据主表id删除附件 + * + * @param mainType ticket:工单;repairItem:工单附属项目;record:维修记录 + * @param mainId 主表id + * @author PQZ + * @date 11:43 2024/10/11 + **/ + void removeByMainId(String mainType, String mainId); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java index e1d42d02..99e4c745 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java @@ -19,7 +19,12 @@ import java.util.List; */ public interface RepairRecordsService extends IService { - + /** + * 创建维修记录 + * @author PQZ + * @date 11:41 2024/10/11 + * @param saveReqVO RepairRecordsSaveReqVO实体 + **/ void saveRepairRecord(RepairRecordsSaveReqVO saveReqVO); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java index 4aa60220..c8271100 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java @@ -1,14 +1,18 @@ package cn.iocoder.yudao.module.base.service.impl; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import cn.iocoder.yudao.module.base.mapper.RepairRecordsItemMapper; import cn.iocoder.yudao.module.base.service.RepairRecordsItemService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import static cn.iocoder.yudao.common.BaseConstants.*; + /** * 维修记录 Service 实现类 * @@ -22,4 +26,33 @@ public class RepairRecordsItemServiceImpl extends ServiceImpl lambdaQueryWrapper = new LambdaQueryWrapper<>(); + switch (mainType) { + //匹配根据工单表id删除条件 + case REPAIR_RECORD_TYPE_TICKET: + lambdaQueryWrapper.eq(RepairRecordsItem::getTicketId, mainId); + break; + //匹配根据工单子表id删除条件 + case REPAIR_RECORD_TYPE_REPAIR_ITEM: + lambdaQueryWrapper.eq(RepairRecordsItem::getRepairItemId,mainId); + break; + //匹配根据根据记录表id删除条件 + case REPAIR_RECORD_TYPE_RECORD: + lambdaQueryWrapper.eq(RepairRecordsItem::getRecordId,mainId); + break; + default: + break; + } + remove(lambdaQueryWrapper); + } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java index 200a65cb..68a630cb 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsServiceImpl.java @@ -1,21 +1,14 @@ package cn.iocoder.yudao.module.base.service.impl; -import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.module.base.entity.RepairRecords; import cn.iocoder.yudao.module.base.mapper.RepairRecordsMapper; import cn.iocoder.yudao.module.base.service.RepairRecordsService; -import cn.iocoder.yudao.module.base.vo.RepairRecordsPageReqVO; -import cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO; import cn.iocoder.yudao.module.base.vo.RepairRecordsSaveReqVO; -import cn.iocoder.yudao.module.base.vo.RepairWorkerPageReqVO; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.util.List; /** * 维修记录 Service 实现类 @@ -30,6 +23,13 @@ public class RepairRecordsServiceImpl extends ServiceImpl itemList; + /**当前维修记录中需要保存的附件信息*/ + String images; } From d8a2f4b3cbfc801494b5b67afe21a49ba48cd33a Mon Sep 17 00:00:00 2001 From: Vinjor Date: Fri, 11 Oct 2024 14:06:17 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E5=B9=B6=E7=99=BB=E5=BD=95=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WechatServiceImpl.java | 5 +- .../app/controller/LoginController.java | 1 + yudao-server/pom.xml | 6 + 数据库设计/蓝安集团一体化平台.pdma.json | 1944 ++++++++++++++++- 4 files changed, 1877 insertions(+), 79 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java index e683756a..5c52f685 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/wechat/service/impl/WechatServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.app.wechat.service.impl; -import cn.hutool.core.util.ObjectUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import cn.iocoder.yudao.common.SystemEnum; @@ -8,7 +7,6 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.app.wechat.service.WechatService; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; -import cn.iocoder.yudao.module.system.controller.admin.auth.vo.AuthLoginReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import cn.iocoder.yudao.module.system.service.auth.AdminAuthService; @@ -158,7 +156,8 @@ public class WechatServiceImpl implements WechatService { Long uid = userService.createUser(user); wxUser = new AdminUserDO(); wxUser.setId(uid); - wxUser.setUsername(phoneNumber); + wxUser.setUsername(user.getUsername()); + wxUser.setNickname(user.getNickname()); } return wxUser; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java index e3ed1641..bac8b0d1 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/controller/LoginController.java @@ -91,6 +91,7 @@ public class LoginController { AuthLoginRespVO loginVO = loginService.wxLoginByUserId(adminUserDO.getId(),adminUserDO.getUsername()); Map map = new HashMap<>(); map.put("token", loginVO.getAccessToken()); + map.put("userinfo", adminUserDO); return success(map); } else { return error(500, "微信登录失败!"); diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 750238e1..a451a29a 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -36,6 +36,12 @@ cn.iocoder.boot dl-module-base ${revision} + + + commons-fileupload + commons-fileupload + + diff --git a/数据库设计/蓝安集团一体化平台.pdma.json b/数据库设计/蓝安集团一体化平台.pdma.json index 6a65d220..44ec24f5 100644 --- a/数据库设计/蓝安集团一体化平台.pdma.json +++ b/数据库设计/蓝安集团一体化平台.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.9.2", "createdTime": "2024-10-9 10:34:15", - "updatedTime": "2024-10-10 10:48:48", + "updatedTime": "2024-10-11 13:52:26", "dbConns": [], "profile": { "default": { @@ -4392,15 +4392,15 @@ "sysProps": {} }, { - "id": "672A2E12-DFC6-4168-8722-F92BE2394498", + "id": "2533579C-DC43-418B-BA5B-ACA680FFE43B", "env": { "base": { "nameSpace": "", "codeRoot": "" } }, - "defKey": "dl_car_main", - "defName": "车辆信息表", + "defKey": "dl_user_car", + "defName": "用户车辆信息表--用户个人录入的", "comment": "", "properties": { "partitioned by": "(date string)", @@ -4550,11 +4550,30 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "extProps": {}, "domain": "16120F75-6AA7-4483-868D-F07F511BB081", - "id": "5CD491F7-7865-4E43-8104-9DDA572B8F27", - "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + "id": "28F36101-AEFC-453C-9269-66087B95FCA3", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "uiHint": null + }, + { + "defKey": "user_id", + "defName": "用户ID", + "comment": "", + "type": "VARCHAR", + "len": 50, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "domain": "", + "id": "C524273C-D333-45EF-97B7-6199F5E59A9C" }, { "defKey": "engine_number", @@ -4568,11 +4587,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "F4065C27-6639-46D3-930D-8392622581D5", - "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + "id": "21492027-C8C2-44DD-A0A0-A1700ADB2583", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "uiHint": null }, { "defKey": "vin", @@ -4586,11 +4606,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "A7320063-A151-4213-B963-E2B201DD9B47", - "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + "id": "A67FBEAD-8AE4-4BBE-940A-E62A8043A39A", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "uiHint": null }, { "defKey": "license_number", @@ -4604,11 +4625,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "DF1704E9-56A5-4CEA-AC48-0EE153BA2DFB", - "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" + "id": "A042006B-6C01-4531-A3FC-ABF1FB39DCEB", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "uiHint": null }, { "defKey": "car_model", @@ -4622,11 +4644,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "4459097C-6CA6-40E3-83F8-8C0B687AA82C" + "id": "B1C33B09-53B7-4434-9B99-0561EE278BB7", + "uiHint": null }, { "defKey": "maintenance_date", @@ -4640,11 +4663,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "2F228307-A85F-4E6D-B520-58BF92E95990" + "domain": null, + "id": "8B9BC4B0-CB73-4252-8A59-2BDAA0499673", + "uiHint": null }, { "defKey": "maintenance_mileage", @@ -4658,11 +4682,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", "extProps": {}, - "domain": "", - "id": "563BB12D-EDC8-4276-9F70-6AB5ACFE6CE8" + "domain": null, + "id": "F8855F6F-7BD6-43F9-A7CF-B8320DE8E201", + "uiHint": null }, { "defKey": "inspection_date", @@ -4676,11 +4701,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "CDBA2BDA-DDEA-44E7-8968-28D452D7A6A0" + "domain": null, + "id": "668C5D66-52F5-4173-AECC-15CFE12D9950", + "uiHint": null }, { "defKey": "insurance_date", @@ -4694,11 +4720,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "FA65B1B6-E92E-409A-84A8-523191590F39" + "domain": null, + "id": "6D722404-3BB1-467A-9F26-05574F668D50", + "uiHint": null }, { "defKey": "check_date", @@ -4712,11 +4739,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "8651550F-72E6-4AEB-AF77-34CCEEC31C74" + "domain": null, + "id": "4174627F-5310-45DF-843A-12CB5C40EC14", + "uiHint": null }, { "defKey": "next_maintenance_date", @@ -4730,11 +4758,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "F0BCA0D8-9DA7-4F54-808F-49007D8FF99D" + "domain": null, + "id": "4DD0D987-24F8-4722-8408-F8D787DA4757", + "uiHint": null }, { "defKey": "next_maintenance_mileage", @@ -4748,11 +4777,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", "extProps": {}, - "domain": "", - "id": "24C0D5F6-8B8D-4C9F-AC1F-78CE0CD22529" + "domain": null, + "id": "DBB774B0-B5BD-44EB-930B-B176E8E5B219", + "uiHint": null }, { "defKey": "next_inspection_date", @@ -4766,11 +4796,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "7B79E6B3-8272-4C4C-A352-85EFB9256B52" + "domain": null, + "id": "26E51722-2742-4A3B-9990-57F12307EDB8", + "uiHint": null }, { "defKey": "insurance_expiry_date", @@ -4784,11 +4815,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "A34B1DB4-66B9-4E6C-8D66-F5E9EBE381B2" + "domain": null, + "id": "9809F670-AE47-496F-85C6-1CB660A3CD15", + "uiHint": null }, { "defKey": "next_check_date", @@ -4802,11 +4834,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "8732690F-55C1-4A4F-A026-723FC1BAE59E" + "domain": null, + "id": "7956503F-2BF7-464F-9419-EAEF4362F59A", + "uiHint": null }, { "defKey": "car_brand", @@ -4820,11 +4853,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "31E45E99-2C45-4627-AC6E-8CDE8F0312BE" + "id": "17827450-9F97-4ACD-B817-5877452922EB", + "uiHint": null }, { "defKey": "car_nature", @@ -4842,7 +4876,8 @@ "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "E230657A-8C40-4F8B-95C0-0B824A1EE519" + "id": "2E13CED6-FDAB-432B-A1F1-117515DE8EBF", + "uiHint": null }, { "defKey": "car_register_date", @@ -4856,11 +4891,12 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", "extProps": {}, - "domain": "", - "id": "6D4D9E61-135A-4E1C-A77F-E466F9303836" + "domain": null, + "id": "76B5EA42-E05A-4526-8A17-75B45837B230", + "uiHint": null }, { "defKey": "car_license_img", @@ -4874,17 +4910,18 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": false, - "refDict": "", + "refDict": null, "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", "extProps": {}, "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", - "id": "0A7D4698-AD5C-4F1D-B3C7-6AEA643A13C4" + "id": "B264CB39-9C69-4ECD-A362-01A917912B9C", + "uiHint": null }, { "defKey": "deleted", "defName": "删除状态删除标志", "comment": "", - "domain": "", + "domain": null, "type": "BIT", "len": "1", "scale": "", @@ -4893,9 +4930,9 @@ "autoIncrement": false, "defaultValue": "0", "hideInGraph": true, - "refDict": "", - "uiHint": "", - "id": "89381BE4-5F56-49DE-BDF7-4A7B3FD763C6", + "refDict": null, + "uiHint": null, + "id": "03202707-9022-433E-9989-94D1A213AFE9", "baseType": "A33DC895-0EF9-49E1-BBFF-53273522C6D1" }, { @@ -4904,16 +4941,16 @@ "comment": "", "domain": "16120F75-6AA7-4483-868D-F07F511BB081", "type": "", - "len": 32, + "len": "", "scale": "", "primaryKey": false, "notNull": false, "autoIncrement": false, "defaultValue": "", "hideInGraph": true, - "refDict": "", - "uiHint": "", - "id": "8EDD6F2A-D860-4D64-A13C-0B66BBE1903C", + "refDict": null, + "uiHint": null, + "id": "815912A4-86BE-4262-A9AC-AC3E0F42768E", "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" }, { @@ -4929,9 +4966,9 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": true, - "refDict": "", - "uiHint": "", - "id": "07977F15-4FD1-4CAB-A7D4-FD9966557BD1", + "refDict": null, + "uiHint": null, + "id": "CEFA5C82-0877-4BE6-AB60-E925F26BCB03", "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" }, { @@ -4940,16 +4977,16 @@ "comment": "", "domain": "16120F75-6AA7-4483-868D-F07F511BB081", "type": "", - "len": 32, + "len": "", "scale": "", "primaryKey": false, "notNull": false, "autoIncrement": false, "defaultValue": "", "hideInGraph": true, - "refDict": "", - "uiHint": "", - "id": "8F89557B-4A46-441F-A638-799B7C4250A0", + "refDict": null, + "uiHint": null, + "id": "FE8392A3-36DC-44CD-8CCF-1B39C24BC26E", "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64" }, { @@ -4965,9 +5002,9 @@ "autoIncrement": false, "defaultValue": "", "hideInGraph": true, - "refDict": "", - "uiHint": "", - "id": "27B603FD-BBD1-4A2A-A8DF-858FC1EDA69E", + "refDict": null, + "uiHint": null, + "id": "5ECFECD6-F854-4981-AF02-33FFC9A94C75", "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" } ], @@ -27165,6 +27202,1759 @@ "correlations": [], "indexes": [], "type": "P" + }, + { + "id": "772EE938-76C1-4EEE-ACF8-DD0722761783", + "defKey": "base_car_main", + "defName": "车辆信息表", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "id", + "defName": "主键标识", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8B8EAE7C-9C89-42F6-960C-E5F517F2F253", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "engine_number", + "defName": "发动机号码", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A5775ED7-49C1-4A99-B628-8323BA25FC99", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "vin", + "defName": "车架号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "49A45A2A-776A-4417-B442-BA473B8750E4", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "license_number", + "defName": "车牌号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DD04B413-4A45-4FEB-A3A7-B219A84BE35F", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_model", + "defName": "车辆型号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "C8DDB464-0117-4843-82EB-35B1B97E7E74", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "maintenance_date", + "defName": "保养日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D628FE91-5BD8-47E7-81C1-E08631024012", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "maintenance_mileage", + "defName": "保养里程", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 10, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DAA056D5-07D4-41C9-87F3-AA7B3D1326AD", + "baseType": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "inspection_date", + "defName": "年检日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E528864F-8C8C-46EB-8A38-DAEEC7BE822E", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "insurance_date", + "defName": "保险日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "167ADAEE-261F-439F-9DD4-44F302A556C0", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "check_date", + "defName": "二级维护时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "61B03ED8-3DE5-43BF-B4C4-AA5B0CF29614", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_maintenance_date", + "defName": "下次保养日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "45194541-EE1B-4BEC-8F7A-F8D981919023", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_maintenance_mileage", + "defName": "下次保养里程", + "comment": "", + "domain": "", + "type": "DECIMAL", + "len": 10, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "AB51F7D8-FD57-4BCA-84CA-2ACB4561B765", + "baseType": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_inspection_date", + "defName": "下次年检日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "6C0352A9-DFFE-4D2A-9F04-80D4F50E7CF0", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "insurance_expiry_date", + "defName": "保险到期日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "349BF753-18FF-42CE-B8BF-CCAFBB2E4E6E", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_check_date", + "defName": "下次二级维护时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "13A9B0B2-6DF8-486D-9487-2D67E3459B3F", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_brand", + "defName": "车辆品牌", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "BC100EB7-E78F-4736-B6B0-C240FA417271", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_nature", + "defName": "车辆性质:营运 非营运等", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "9AD41820-7FE9-4D33-A87C-D8011CE544FB", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_category", + "defName": "车辆类别:私家车 货车 教练车 公务车 出租车", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "753530E7-71EF-4895-A89A-1C246E34756A", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B5325CB8-0051-48A5-8025-9B73949D5AFB", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_register_date", + "defName": "车辆注册日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "35AC9D59-E54E-4803-BBC8-2D75DFF926A2", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_license_img", + "defName": "行驶证图片", + "comment": "", + "domain": "AA4D5F74-732E-426C-A639-8842B4BC52B2", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "87682E41-4218-4715-B630-72A4C63029C1", + "baseType": "B17BDED3-085F-40E1-9019-3B79CF2BF075", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "recently_handled_business", + "defName": "最近办理业务", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "615269F6-ECFF-4AAD-B8E6-81C374E853F6", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "recently_handle_business_time", + "defName": "最近办理业务的时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DADD1EE0-937D-4343-A153-0B546B66CE84", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_brand_input", + "defName": "车辆品牌(输入框)", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DE7B4364-7D7A-4704-A99F-A58BA762816B", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_model_input", + "defName": "车辆型号(输入框)", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "353AA6C4-EE39-4F86-91C4-106DB0B7A377", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "deleted", + "defName": "删除状态删除标志", + "comment": "", + "domain": "F8C1B685-B82C-442F-BF3C-EF01A3884A07", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "b'0'", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8F600CCD-F791-4730-8DA5-B78BD8837682", + "baseType": "A33DC895-0EF9-49E1-BBFF-53273522C6D1", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "creator", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "C8BAF9A3-A0F3-4E2A-938D-A9E366D096FC", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B140F7B6-0C1E-49F2-991B-DCD4688071F8", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "updater", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F0A71CB6-F7E6-4405-AD32-877FF4F7FB1E", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "C95D0BEB-A6DB-4935-AA7F-561D3E45BC1A", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "tenant_id", + "defName": "租户号", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B7215C87-91A2-4028-8855-F905520C6798", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + } + ], + "indexes": [], + "sysProps": { + "nameTemplate": "{defKey}[{defName}]" + }, + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [], + "notes": {} + }, + { + "id": "210BCD3A-6DAF-49F8-BF88-7E65D2B2FEEF", + "defKey": "base_user_car", + "defName": "用户车辆信息表--用户个人录入的", + "comment": "", + "properties": {}, + "fields": [ + { + "defKey": "id", + "defName": "主键标识", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "CA92563B-805C-42C9-B5EF-DA4EEFAC24E3", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "engine_number", + "defName": "发动机号码", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "186DE97E-5CB5-4423-9927-397D36C9480F", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "vin", + "defName": "车架号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E1480D07-C19C-4616-80D8-381F72435C2E", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "license_number", + "defName": "车牌号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E4D35083-436F-4A66-A73B-6D6D11C54665", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_brand", + "defName": "车辆品牌", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "5DA90757-CAA5-42BB-90A2-669E7FE4C8A7", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_model", + "defName": "车辆型号", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "90B12816-BA4D-4B5A-BA33-7E2B4C7C0680", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_nature", + "defName": "车辆性质:营运 非营运等", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "47248DC7-67D0-40E6-9A8E-81F972380F78", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_category", + "defName": "车辆类别:私家车 货车 教练车 公务车 出租车", + "comment": "", + "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "844952D5-31B1-4EA1-AC65-FD69E3610AAB", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_license_img", + "defName": "行驶证图片", + "comment": "", + "domain": "AA4D5F74-732E-426C-A639-8842B4BC52B2", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "1B534D4B-045D-4130-8E83-FE3643E66E88", + "baseType": "B17BDED3-085F-40E1-9019-3B79CF2BF075", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "car_register_date", + "defName": "车辆注册日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A6532996-DAB2-4153-8D26-3E54E3597973", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "maintenance_date", + "defName": "保养日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8D78F636-7592-4AEC-B441-DB51CA6C44F0", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "maintenance_mileage", + "defName": "保养里程", + "comment": "", + "domain": null, + "type": "DECIMAL", + "len": 10, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "190183EF-45FE-4F55-9AA1-194A465AB17D", + "baseType": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "inspection_date", + "defName": "年检日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "22610152-A673-4C74-87A2-37AE8BBA76C8", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "insurance_date", + "defName": "保险日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "08C6BDAA-AAF6-4C60-916D-F5BED26DB2CC", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "check_date", + "defName": "二级维护时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "247CD9D3-0542-4D55-A8CA-CFEAC2CE267B", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_maintenance_date", + "defName": "下次保养日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A1E4FEBF-F37C-450C-B7F9-DA19D476A1A5", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_maintenance_mileage", + "defName": "下次保养里程", + "comment": "", + "domain": null, + "type": "DECIMAL", + "len": 10, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8D8B2A81-6559-4741-BB51-68C7BF04BA6A", + "baseType": "1A0BDC09-0792-4174-9E8E-80BE8DF44B8E", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_inspection_date", + "defName": "下次年检日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7605E699-BFF7-47C1-9CCD-4887F4ADA239", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "insurance_expiry_date", + "defName": "保险到期日期", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "7DBCC0E2-2B3C-4B69-B68A-B4FD2DB26C51", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "next_check_date", + "defName": "下次二级维护时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "EAE16FE6-BC69-4B69-BED0-CA61B2B5E413", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "is_owner", + "defName": "是否车主", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "domain": "6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF", + "id": "FF02F510-773A-4BA0-992A-F9C31A5F3316" + }, + { + "defKey": "deleted", + "defName": "删除状态删除标志", + "comment": "", + "domain": "F8C1B685-B82C-442F-BF3C-EF01A3884A07", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "b'0'", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "96D0C3C2-3722-46ED-B650-6810F548D26D", + "baseType": "A33DC895-0EF9-49E1-BBFF-53273522C6D1", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "creator", + "defName": "创建人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "9CCFC510-6E12-4FCB-950A-1229C44BD438", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "2F7C2A95-95FC-4322-AE2E-E0064978D483", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "updater", + "defName": "更新人", + "comment": "", + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "EA759528-D68C-4D13-93F7-39167613452F", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + }, + { + "defKey": "update_time", + "defName": "更新时间", + "comment": "", + "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": null, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A6912DE4-D76F-4E70-939E-2D7E116F125F", + "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", + "extProps": {}, + "uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE" + } + ], + "indexes": [], + "sysProps": { + "nameTemplate": "{defKey}[{defName}]" + }, + "headers": [ + { + "freeze": false, + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "freeze": true, + "refKey": "defKey", + "hideInGraph": false + }, + { + "freeze": true, + "refKey": "defName", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "primaryKey", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "notNull", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "autoIncrement", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "domain", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "type", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "len", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "scale", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "comment", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "refDict", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "defaultValue", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "isStandard", + "hideInGraph": false + }, + { + "freeze": false, + "refKey": "uiHint", + "hideInGraph": true + }, + { + "freeze": false, + "refKey": "extProps", + "hideInGraph": true + } + ], + "correlations": [], + "type": "P", + "notes": {} } ], "views": [], @@ -28726,7 +30516,7 @@ "defName": "业务基础库", "refEntities": [ "BE8A2278-6312-499D-BF94-8900981557ED", - "672A2E12-DFC6-4168-8722-F92BE2394498", + "2533579C-DC43-418B-BA5B-ACA680FFE43B", "842150A7-AD3C-457B-AA05-000C02C679EC", "3BC3BF5D-14E1-4BAB-9081-32B2EA230649", "9B2F50D3-8720-4A28-9814-2BCF5DBC3389", @@ -28735,7 +30525,9 @@ "13D6C572-46EA-4D3F-A37A-65875A23AB6B", "A1A0C1C6-B78D-47E0-AB05-F5A38DAA4D08", "D47FC836-3F02-4B09-A584-E66CD6AF2D7A", - "FC3A9B49-EF15-4D18-8F5E-8FA8688C6702" + "FC3A9B49-EF15-4D18-8F5E-8FA8688C6702", + "772EE938-76C1-4EEE-ACF8-DD0722761783", + "210BCD3A-6DAF-49F8-BF88-7E65D2B2FEEF" ], "refViews": [], "refDiagrams": [ From fb27a36be1d8601c9059b3ce3f7684f118e3bee5 Mon Sep 17 00:00:00 2001 From: PQZ Date: Fri, 11 Oct 2024 16:55:06 +0800 Subject: [PATCH 07/11] 1 --- .../iocoder/yudao/common/BaseConstants.java | 19 ++++ .../module/base/entity/RepairRecords.java | 6 +- .../base/mapper/RepairRecordsMapper.java | 9 ++ .../service/RepairRecordsItemService.java | 35 ++++++ .../base/service/RepairRecordsService.java | 27 +++-- .../impl/RepairRecordsItemServiceImpl.java | 104 +++++++++++++++++- .../impl/RepairRecordsServiceImpl.java | 64 ++++++++++- .../base/vo/RepairRecordsPageReqVO.java | 2 + .../module/base/vo/RepairRecordsRespVO.java | 7 ++ .../base/vo/RepairRecordsSaveReqVO.java | 7 -- .../mapper/base/RepairRecordsMapper.xml | 21 +++- 11 files changed, 270 insertions(+), 31 deletions(-) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 670e7666..bbb18eca 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -94,6 +94,8 @@ public class BaseConstants { public static final String ORDER_KKYL = "3"; /**订单店铺名称*/ public static final String ORDER_TENANT_NAME = "蓝安集团"; + /**------工单记录常量-----------*/ + /**工单*/ public static final String REPAIR_RECORD_TYPE_TICKET = "ticket"; /**工单附属项目*/ @@ -101,4 +103,21 @@ public class BaseConstants { /**维修记录*/ public static final String REPAIR_RECORD_TYPE_RECORD = "record"; + /**创建工单*/ + public static final String REPAIR_RECORD_TYPE_CJGD = "cjgd"; + /**指派施工*/ + public static final String REPAIR_RECORD_TYPE_ZPSG = "zpsg"; + /**领料*/ + public static final String REPAIR_RECORD_TYPE_LL = "ll"; + /**退料*/ + public static final String REPAIR_RECORD_TYPE_TL = "tl"; + /**施工完成(自检)*/ + public static final String REPAIR_RECORD_TYPE_SGWCZJ = "sgwczj"; + /**总检*/ + public static final String REPAIR_RECORD_TYPE_ZJ = "zj"; + /**结束工单*/ + public static final String REPAIR_RECORD_TYPE_JSGD = "jsgd"; + + + } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java index 29832c35..6b9e0de5 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/entity/RepairRecords.java @@ -41,10 +41,6 @@ public class RepairRecords extends TenantBaseDO { * 记录描述 */ private String remark; - /** - * 过程记录中的图片(多个,拼接) - */ - private String image; /** * 处理人 */ @@ -52,6 +48,6 @@ public class RepairRecords extends TenantBaseDO { /** * 处理人员工表id */ - private String dealUserId; + private Long dealUserId; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java index 12cf61b8..d37a3b0e 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/mapper/RepairRecordsMapper.java @@ -17,6 +17,15 @@ import java.util.List; @Mapper public interface RepairRecordsMapper extends BaseMapper { + /** + * 查询维修记录 + * @author lzt + * @param entity 查询条件 + * @return List + * @date 2024年10月9日 + */ + List queryRepairRecords(@Param("entity") RepairRecordsPageReqVO entity); + } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java index 56da29c6..c2bc36e5 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsItemService.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.base.service; import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + /** * 维修记录 Service 接口 * @@ -20,4 +22,37 @@ public interface RepairRecordsItemService extends IService { **/ void removeByMainId(String mainType, String mainId); + /** + * 通过主表id查询图片 + * + * @param mainType ticket:工单;repairItem:工单附属项目;record:维修记录 + * @param mainId 主表id + * @param isOpen 是否开放给用户(默认查询全部,如不为null则根据条件查询) + * @return 记录图片集合 + * @author PQZ + * @date 14:30 2024/10/11 + **/ + List getByMainId(String mainType, String mainId, String isOpen); + + /** + * 保存维修记录相关的图片 + * + * @param recordId 记录id + * @param ticketId 工单id + * @param repairItemId 工单子表id + * @param image 上传附件相对路径(多个用“,”分隔) + * @author PQZ + * @date 14:09 2024/10/11 + **/ + void saveItem(String recordId, String ticketId, String repairItemId, String image); + + /** + * 设置图片是否开放给用户 + * + * @param ids 前端选中图片id(多个用“,”分隔) + * @param isOpen 0否1是 + * @author PQZ + * @date 14:22 2024/10/11 + **/ + void setRepairOpen(String ids, String isOpen); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java index 99e4c745..4d418bc2 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/RepairRecordsService.java @@ -3,13 +3,8 @@ package cn.iocoder.yudao.module.base.service; import cn.iocoder.yudao.module.base.entity.RepairRecords; import cn.iocoder.yudao.module.base.vo.RepairRecordsPageReqVO; import cn.iocoder.yudao.module.base.vo.RepairRecordsRespVO; -import cn.iocoder.yudao.module.base.vo.RepairRecordsSaveReqVO; -import cn.iocoder.yudao.module.base.vo.RepairWorkerPageReqVO; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; -import javax.validation.Valid; import java.util.List; /** @@ -20,11 +15,25 @@ import java.util.List; public interface RepairRecordsService extends IService { /** - * 创建维修记录 + * 保存维修记录 + * + * @param ticketId 工单id + * @param repairItemId 工单子表id + * @param type 工作类型(数据字典:repair_records_type;后端已初始化常量,可直接引用base包中BaseConstants下106-119行) + * @param remark 备注 + * @param images 图片(相对路径按照“,”分隔) * @author PQZ - * @date 11:41 2024/10/11 - * @param saveReqVO RepairRecordsSaveReqVO实体 + * @date 14:51 2024/10/11 + **/ + void saveRepairRecord(String ticketId, String repairItemId, String type, String remark, String images); + + /** + * 根据条件查询维修记录 + * @author PQZ + * @date 15:14 2024/10/11 + * @param pageReqVO RepairRecordsPageReqVO实体 + * @return java.util.List **/ - void saveRepairRecord(RepairRecordsSaveReqVO saveReqVO); + List queryList(RepairRecordsPageReqVO pageReqVO); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java index c8271100..88e3dbb5 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/service/impl/RepairRecordsItemServiceImpl.java @@ -1,15 +1,20 @@ package cn.iocoder.yudao.module.base.service.impl; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import cn.iocoder.yudao.module.base.mapper.RepairRecordsItemMapper; import cn.iocoder.yudao.module.base.service.RepairRecordsItemService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; import static cn.iocoder.yudao.common.BaseConstants.*; @@ -36,6 +41,97 @@ public class RepairRecordsItemServiceImpl extends ServiceImpl lambdaQueryWrapper = queryType(mainType, mainId); + remove(lambdaQueryWrapper); + } + + /** + * 通过主表id查询图片 + * + * @param mainType ticket:工单;repairItem:工单附属项目;record:维修记录 + * @param mainId 主表id + * @param isOpen 是否开放给用户(默认查询全部,如不为null则根据条件查询) + * @return 记录图片集合 + * @author PQZ + * @date 14:30 2024/10/11 + **/ + @Override + public List getByMainId(String mainType, String mainId, String isOpen) { + //根据不同类型初始化不通过查询条件 + LambdaQueryWrapper lambdaQueryWrapper = queryType(mainType, mainId); + //默认查询全部,如不为null则根据条件查询 + if (StringUtils.isNotEmpty(isOpen)) { + lambdaQueryWrapper.eq(RepairRecordsItem::getIsOpen, isOpen); + } + return list(lambdaQueryWrapper); + } + + + /** + * 保存维修记录相关的图片 + * + * @param recordId 记录id + * @param ticketId 工单id + * @param repairItemId 工单子表id + * @param image 上传附件相对路径(多个用“,”分隔) + * @author PQZ + * @date 14:09 2024/10/11 + **/ + @Override + public void saveItem(String recordId, String ticketId, String repairItemId, String image) { + //根据记录id删除改记录中原有的图片 + removeByMainId(REPAIR_RECORD_TYPE_RECORD, recordId); + //组装维修记录图片集合 + List saveList = new ArrayList<>(); + if (StringUtils.isNotEmpty(image)) { + //字符串转换集合 + List imageList = Arrays.stream(image.split(",")) + .collect(Collectors.toList()); + imageList.forEach(item -> { + RepairRecordsItem saveItem = new RepairRecordsItem(); + saveItem.setRecordId(recordId); + saveItem.setTicketId(ticketId); + saveItem.setRepairItemId(repairItemId); + saveItem.setImage(item); + saveList.add(saveItem); + }); + saveBatch(saveList); + } + } + + /** + * 设置图片是否开放给用户 + * + * @param ids 前端选中图片id(多个用“,”分隔) + * @param isOpen 0否1是 + * @author PQZ + * @date 14:22 2024/10/11 + **/ + @Override + public void setRepairOpen(String ids, String isOpen) { + if (StringUtils.isNotEmpty(ids)) { + //id字符串转换集合 + List idList = Arrays.stream(ids.split(",")) + .collect(Collectors.toList()); + LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); + //设置更新条件 + lambdaUpdateWrapper.in(RepairRecordsItem::getId, idList).set(RepairRecordsItem::getIsOpen, isOpen); + //更新 + update(lambdaUpdateWrapper); + } + } + + /** + * 封装查询条件 + * + * @param mainType ticket:工单;repairItem:工单附属项目;record:维修记录 + * @param mainId 主表id + * @return com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper + * @author PQZ + * @date 14:36 2024/10/11 + **/ + private LambdaQueryWrapper queryType(String mainType, String mainId) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); switch (mainType) { //匹配根据工单表id删除条件 @@ -44,15 +140,15 @@ public class RepairRecordsItemServiceImpl extends ServiceImpl + * @author PQZ + * @date 15:14 2024/10/11 + **/ + @Override + public List queryList(RepairRecordsPageReqVO pageReqVO) { + //根据条件查询维修记录 + List list = repairRecordsMapper.queryRepairRecords(pageReqVO); + //为每一条维修记录设置查询附件 + list.forEach(item -> { + List itemList = itemService.getByMainId(REPAIR_RECORD_TYPE_RECORD, item.getId(), pageReqVO.getIsOpen()); + item.setItemList(itemList); + //相对路径按照“,”分隔 + item.setImages(itemList.stream().map(RepairRecordsItem::getImage).collect(Collectors.joining(","))); + }); + return list; } } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java index f9d55f49..638809e4 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsPageReqVO.java @@ -11,5 +11,7 @@ import lombok.ToString; @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class RepairRecordsPageReqVO extends RepairRecords { + /**是否开放给用户*/ + private String isOpen; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsRespVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsRespVO.java index 3228b872..76e0cb96 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsRespVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsRespVO.java @@ -1,13 +1,20 @@ package cn.iocoder.yudao.module.base.vo; import cn.iocoder.yudao.module.base.entity.RepairRecords; +import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + @Schema(description = "管理后台 - 维修记录 Response VO") @Data @ExcelIgnoreUnannotated public class RepairRecordsRespVO extends RepairRecords { + /**维修记录关联子表*/ + private List itemList; + /**维修记录关联附件信息*/ + private String images; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java index fc4d3090..4f30098c 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/base/vo/RepairRecordsSaveReqVO.java @@ -1,20 +1,13 @@ package cn.iocoder.yudao.module.base.vo; import cn.iocoder.yudao.module.base.entity.RepairRecords; -import cn.iocoder.yudao.module.base.entity.RepairRecordsItem; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import java.util.List; - @Schema(description = "管理后台 - 维修记录新增/修改 Request VO") @Data public class RepairRecordsSaveReqVO extends RepairRecords { - /**维修记录附件表*/ - List itemList; - /**当前维修记录中需要保存的附件信息*/ - String images; } diff --git a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml index e5b4971d..4885f903 100644 --- a/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/base/RepairRecordsMapper.xml @@ -9,6 +9,25 @@ 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> - + From 24b48a181f7692afec1254f036a57a33f75beb0a Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Fri, 11 Oct 2024 17:15:27 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=8E=E9=87=87=E8=B4=AD=E3=80=81=E9=A2=86?= =?UTF-8?q?=E6=96=99=E5=85=B3=E8=81=94=E9=85=8D=E4=BB=B6=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/RepairWaresController.java | 3 +- .../module/project/entity/RepairWares.java | 2 + .../project/mapper/RepairWaresMapper.java | 7 ++++ .../project/service/RepairWaresService.java | 7 ++++ .../service/impl/RepairWaresServiceImpl.java | 11 ++++++ .../service/impl/DlRepairSoServiceImpl.java | 38 ++++++++++++++++++- .../mapper/project/RepairWaresMapper.xml | 14 +++++++ 7 files changed, 78 insertions(+), 4 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java index 2e570198..3ceb96cf 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/controller/admin/RepairWaresController.java @@ -126,8 +126,7 @@ public class RepairWaresController { @GetMapping("/getByName") @Operation(summary = "根据名称获取最新的数据") public CommonResult getWaresByName(@RequestParam("name") String name) { - List list = waresService.list(new LambdaQueryWrapper().eq(RepairWares::getName, name)); - return success(list.stream().max(Comparator.comparing(RepairWares::getCreateTime)).orElse(null)); + return success(waresService.getWaresByName(name)); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/entity/RepairWares.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/entity/RepairWares.java index ea7586f1..9e05f076 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/entity/RepairWares.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/entity/RepairWares.java @@ -102,5 +102,7 @@ public class RepairWares extends TenantBaseDO { private String status; /**数据来源*/ private String dataForm; + /** 进价 */ + private String purPrice; } \ No newline at end of file diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/mapper/RepairWaresMapper.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/mapper/RepairWaresMapper.java index 1564de5e..9fd38886 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/mapper/RepairWaresMapper.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/mapper/RepairWaresMapper.java @@ -28,4 +28,11 @@ public interface RepairWaresMapper extends BaseMapper { **/ IPage queryListPage(@Param("entity") RepairWaresPageReqVO pageReqVO, Page page); + /** + * 根据名称获取最新的数据 + * + * @author 小李 + * @date 18:03 2024/9/25 + **/ + RepairWaresRespVO getWaresByName(@Param("name") String name); } \ No newline at end of file diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java index 2546d6dc..d2cc6dfd 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/RepairWaresService.java @@ -53,4 +53,11 @@ public interface RepairWaresService extends IService { **/ IPage getWaresPage(RepairWaresPageReqVO pageReqVO, Page page); + /** + * 根据名称获取最新的数据 + * + * @author 小李 + * @date 18:03 2024/9/25 + **/ + RepairWaresRespVO getWaresByName(String name); } \ No newline at end of file diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairWaresServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairWaresServiceImpl.java index 0c08ebac..cb60c93a 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairWaresServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/project/service/impl/RepairWaresServiceImpl.java @@ -89,4 +89,15 @@ public class RepairWaresServiceImpl extends ServiceImpl { item.setSoId(repairSoRespVO.getId()); - item.setSoiType(repairSoRespVO.getSoType()); +// item.setSoiType(repairSoRespVO.getSoType()); }); repairSoiService.saveBatch(repairSoRespVO.getGoodsList()); + + // 操作配件库存表 + // 获取所有需要操作的数据 + List goodsList = repairSoRespVO.getGoodsList(); + List ids = goodsList.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList()); + List repairWares = waresService.listByIds(ids); + // 更新库存和进价 + List newWares = repairWares.stream().map(item -> { + // 取数据 + DlRepairSoi repairSoi = goodsList.stream().filter(i -> i.getGoodsId().equals(item.getId())).collect(Collectors.toList()).get(0); + // 设置新值 + // 如果是采购入库,数量+,如果是领料出库,数量- + // 01, 03 是采购 02 是领料 + BigDecimal count = new BigDecimal(repairSoi.getGoodsCount()); + RepairWares wares = new RepairWares(); + wares.setId(item.getId()); + wares.setStock("02".equals(repairSoRespVO.getSoType()) ? item.getStock().subtract(count) : item.getStock().add(count)); + // 更新进价 + wares.setPurPrice(repairSoi.getGoodsPrice().toString()); + return wares; + }).collect(Collectors.toList()); + waresService.updateBatchById(newWares); } /** diff --git a/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml b/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml index 0bf2d999..15cb813f 100644 --- a/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/project/RepairWaresMapper.xml @@ -30,4 +30,18 @@ ORDER BY drw.create_time DESC + + \ No newline at end of file From 0c87ee6793faa096f0f8ebc09a5c472e86894b15 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Fri, 11 Oct 2024 20:45:13 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../car/controller/AppCarMainController.java | 2 - .../controller/admin/UserCarController.java | 21 ------ .../controller/app/UserCarController.java | 66 +++++++++++++++++++ .../yudao/module/custom/entity/UserCar.java | 42 ++++++------ .../module/custom/mapper/UserCarMapper.java | 12 ++++ .../module/custom/service/UserCarService.java | 29 ++++++++ .../service/impl/UserCarServiceImpl.java | 60 +++++++++++++++++ .../module/custom/vo/DrivelicenseVO.java | 36 ++++++++++ .../yudao/module/custom/vo/UserCarVO.java | 12 ++++ .../java/cn/iocoder/yudao/util/BaseUtil.java | 12 ++++ .../iocoder/yudao/util/VehicleLicenseOCR.java | 0 .../resources/mapper/custom/UserCarMapper.xml | 11 ++++ .../app/user/AppUserController.java | 39 +++++++++++ .../controller/app/user/UserInfoVO.java | 13 ++++ .../dal/mysql/user/AdminUserMapper.java | 3 + .../service/auth/AdminAuthServiceImpl.java | 14 +++- .../system/service/user/AdminUserService.java | 22 +++++-- .../service/user/AdminUserServiceImpl.java | 14 +++- .../main/resources/mapper/SysUserMapper.xml | 5 ++ .../src/main/resources/application.yaml | 3 +- 数据库设计/蓝安集团一体化平台.pdma.json | 20 +++++- 21 files changed, 380 insertions(+), 56 deletions(-) delete mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/app/UserCarController.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/DrivelicenseVO.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/UserCarVO.java create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/util/BaseUtil.java rename {dl-module-inspection => dl-module-base}/src/main/java/cn/iocoder/yudao/util/VehicleLicenseOCR.java (100%) create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/AppUserController.java create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/UserInfoVO.java diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java index fd37be12..7d125dd7 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/app/car/controller/AppCarMainController.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.app.car.vo.AppCarMainResVo; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; -import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -73,7 +72,6 @@ public class AppCarMainController { @Operation(summary = "获得车辆信息") // @PreAuthorize("@ss.hasPermission('base:car-main:query')") public CommonResult> getCarMain() { - List carMain = carMainService.getCarMain(); return CommonResult.success(carMain); } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java deleted file mode 100644 index 06d28ae7..00000000 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/UserCarController.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.custom.controller.admin; - -import cn.iocoder.yudao.module.custom.service.UserCarService; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; - -@Tag(name = "管理后台 - 用户车辆信息表--用户个人录入的") -@RestController -@RequestMapping("/base/user-car") -@Validated -public class UserCarController { - - @Resource - private UserCarService userCarService; - - -} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/app/UserCarController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/app/UserCarController.java new file mode 100644 index 00000000..466ae2da --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/app/UserCarController.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.custom.controller.app; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.custom.service.UserCarService; +import cn.iocoder.yudao.module.custom.vo.UserCarVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@Tag(name = "管理后台 - 用户车辆信息表--用户个人录入的") +@RestController +@RequestMapping("/base/user-car") +@Validated +public class UserCarController { + + @Resource + private UserCarService userCarService; + + /** + * 查询当前登录用户的所有车辆 + * @author vinjor-M + * @date 14:28 2024/10/11 + **/ + @GetMapping("/getMyCar") + @Operation(summary = "查询个人车辆列表") + public CommonResult getMyCar() { + return CommonResult.success(userCarService.getMyCar()); + } + + /** + * 创建或更新车辆信息 + * + * @param userCarVO 车辆信息 + */ + @PostMapping("/createOrUpdate") + @Operation(summary = "创建或更新车辆信息") + public CommonResult createOrUpdate(@RequestBody UserCarVO userCarVO) { + return userCarService.createOrUpdate(userCarVO); + } + + /** + * OCR识别 + * @author vinjor-M + * @date 16:58 2024/10/11 + * @param imagePath 公网图片地址 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @PostMapping("/vehicleLicenseOCR") + public CommonResult vehicleLicenseOCR(@RequestBody String imagePath) throws Exception { + return CommonResult.success(userCarService.vehicleLicenseOCR(imagePath)); + } + + /** + * 删除车辆 + * @author vinjor-M + * @date 14:28 2024/10/11 + **/ + @DeleteMapping("/delById") + @Operation(summary = "删除车辆") + public CommonResult delById(String id) { + return CommonResult.success(userCarService.removeById(id)); + } +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java index e5dbe0db..ab6d12d8 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/UserCar.java @@ -1,20 +1,12 @@ package cn.iocoder.yudao.module.custom.entity; -import lombok.*; -import java.util.*; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import com.baomidou.mybatisplus.annotation.*; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +import java.util.Date; /** * 用户车辆信息表--用户个人录入的 DO @@ -35,6 +27,10 @@ public class UserCar extends BaseDO { */ @TableId(type = IdType.ASSIGN_UUID) private String id; + /** + * 用户ID + */ + private Long userId; /** * 发动机号码 */ @@ -70,11 +66,11 @@ public class UserCar extends BaseDO { /** * 车辆注册日期 */ - private LocalDateTime carRegisterDate; + private Date carRegisterDate; /** * 保养日期 */ - private LocalDateTime maintenanceDate; + private Date maintenanceDate; /** * 保养里程 */ @@ -82,19 +78,19 @@ public class UserCar extends BaseDO { /** * 年检日期 */ - private LocalDateTime inspectionDate; + private Date inspectionDate; /** * 保险日期 */ - private LocalDateTime insuranceDate; + private Date insuranceDate; /** * 二级维护时间 */ - private LocalDateTime checkDate; + private Date checkDate; /** * 下次保养日期 */ - private LocalDateTime nextMaintenanceDate; + private Date nextMaintenanceDate; /** * 下次保养里程 */ @@ -102,15 +98,15 @@ public class UserCar extends BaseDO { /** * 下次年检日期 */ - private LocalDateTime nextInspectionDate; + private Date nextInspectionDate; /** * 保险到期日期 */ - private LocalDateTime insuranceExpiryDate; + private Date insuranceExpiryDate; /** * 下次二级维护时间 */ - private LocalDateTime nextCheckDate; + private Date nextCheckDate; /** * 是否车主 */ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java index 6954e49e..2f741ef0 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/mapper/UserCarMapper.java @@ -1,8 +1,12 @@ package cn.iocoder.yudao.module.custom.mapper; import cn.iocoder.yudao.module.custom.entity.UserCar; +import cn.iocoder.yudao.module.custom.vo.UserCarVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 用户车辆信息表--用户个人录入的 Mapper @@ -12,5 +16,13 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface UserCarMapper extends BaseMapper { + /** + * 查询用户的车辆 + * @author vinjor-M + * @date 18:53 2024/10/11 + * @param userId 用户id + * @return java.util.List + **/ + List selectByUserId(@Param("userId") Long userId); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java index df877698..9be61022 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/UserCarService.java @@ -1,7 +1,12 @@ package cn.iocoder.yudao.module.custom.service; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.custom.entity.UserCar; +import cn.iocoder.yudao.module.custom.vo.UserCarVO; import com.baomidou.mybatisplus.extension.service.IService; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; + +import java.util.List; /** * 用户车辆信息表--用户个人录入的 Service 接口 @@ -10,5 +15,29 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface UserCarService extends IService { + /** + * 创建或更新车辆信息 + * @author vinjor-M + * @date 14:11 2024/10/11 + * @param userCarVO 车辆信息 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + CommonResult createOrUpdate(UserCarVO userCarVO); + /** + * 查询当前登录用户的所有车辆 + * @author vinjor-M + * @date 14:28 2024/10/11 + * @return java.util.List + **/ + List getMyCar(); + + /** + * + * @author vinjor-M + * @date 16:59 2024/10/11 + * @param imagePath 公网图片地址 + * @return java.lang.Object + **/ + Object vehicleLicenseOCR(String imagePath) throws TencentCloudSDKException; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java index ac74f5d9..9d49512b 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/UserCarServiceImpl.java @@ -1,13 +1,24 @@ package cn.iocoder.yudao.module.custom.service.impl; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.security.core.LoginUser; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.custom.entity.UserCar; import cn.iocoder.yudao.module.custom.mapper.UserCarMapper; import cn.iocoder.yudao.module.custom.service.UserCarService; +import cn.iocoder.yudao.module.custom.vo.DrivelicenseVO; +import cn.iocoder.yudao.module.custom.vo.UserCarVO; +import cn.iocoder.yudao.util.VehicleLicenseOCR; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.util.List; /** * 用户车辆信息表--用户个人录入的 Service 实现类 @@ -20,4 +31,53 @@ public class UserCarServiceImpl extends ServiceImpl impl @Resource private UserCarMapper userCarMapper; + + /** + * 创建或更新车辆信息 + * + * @param userCarVO 车辆信息 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + * @author vinjor-M + * @date 14:11 2024/10/11 + **/ + @Override + public CommonResult createOrUpdate(UserCarVO userCarVO) { + //车牌号英文全部转大写 + userCarVO.setLicenseNumber(userCarVO.getLicenseNumber().toUpperCase()); + //设置所属者 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + userCarVO.setUserId(loginUser.getId()); + this.saveOrUpdate(userCarVO); + return CommonResult.ok(); + } + + /** + * 查询当前登录用户的所有车辆 + * + * @return java.util.List + * @author vinjor-M + * @date 14:28 2024/10/11 + **/ + @Override + public List getMyCar() { + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); + return userCarMapper.selectByUserId(loginUser.getId()); + } + + /** + * @param imagePath 公网图片地址 + * @return java.lang.Object + * @author vinjor-M + * @date 16:59 2024/10/11 + **/ + @Override + public Object vehicleLicenseOCR(String imagePath) throws TencentCloudSDKException { + String info = VehicleLicenseOCR.dealFunction(imagePath); + JSONObject infoJson = JSONUtil.parseObj(info); + DrivelicenseVO licenseVO = BeanUtil.toBean(infoJson.getJSONObject("FrontInfo"),DrivelicenseVO.class); + if(licenseVO.getModel().contains("牌")){ + licenseVO.setBrand(licenseVO.getModel().split("牌")[0]); + } + return licenseVO; + } } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/DrivelicenseVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/DrivelicenseVO.java new file mode 100644 index 00000000..14781c5c --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/DrivelicenseVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.custom.vo; + +import lombok.Data; + +/** + * 行驶证OCR识别结果 + * @author vinjor-M + * @date 17:17 2024/10/11 +**/ +@Data +public class DrivelicenseVO { + /**所有人*/ + private String Owner; + /**住址*/ + private String Address; + /**车辆类型*/ + private String VehicleType; + /**品牌型号*/ + private String Model; + /**品牌*/ + private String brand; + /**注册日期*/ + private String RegisterDate; + /**发证日期*/ + private String IssueDate; + /**车辆识别代号*/ + private String Vin; + /**所有人*/ + private String Seal; + /**车牌号*/ + private String PlateNo; + /**使用性质*/ + private String UseCharacter; + /**发动机号码*/ + private String EngineNo; +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/UserCarVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/UserCarVO.java new file mode 100644 index 00000000..6c510b1a --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/UserCarVO.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.module.custom.vo; + +import cn.iocoder.yudao.module.custom.entity.UserCar; +import lombok.Data; + +@Data +public class UserCarVO extends UserCar { + /**品牌名称*/ + private String brandName; + /**品牌logo*/ + private String logoImg; +} diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/util/BaseUtil.java b/dl-module-base/src/main/java/cn/iocoder/yudao/util/BaseUtil.java new file mode 100644 index 00000000..8432ab98 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/util/BaseUtil.java @@ -0,0 +1,12 @@ +package cn.iocoder.yudao.util; + +import org.springframework.stereotype.Component; + +/** + * 基础工具类 + * @author vinjor-M + * @date 14:15 2024/10/11 +**/ +@Component +public class BaseUtil { +} diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/util/VehicleLicenseOCR.java b/dl-module-base/src/main/java/cn/iocoder/yudao/util/VehicleLicenseOCR.java similarity index 100% rename from dl-module-inspection/src/main/java/cn/iocoder/yudao/util/VehicleLicenseOCR.java rename to dl-module-base/src/main/java/cn/iocoder/yudao/util/VehicleLicenseOCR.java diff --git a/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml b/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml index 248fa658..b9d4d5cb 100644 --- a/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/UserCarMapper.xml @@ -9,4 +9,15 @@ 文档可见:https://www.iocoder.cn/MyBatis/x-plugins/ --> + \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/AppUserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/AppUserController.java new file mode 100644 index 00000000..df95af5c --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/AppUserController.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.system.controller.app.user; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.system.service.user.AdminUserService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 用户") +@RestController +@RequestMapping("/system/user") +@Validated +public class AppUserController { + + @Resource + private AdminUserService userService; + + /** + * 微信小程序端修改个人信息 + * @author vinjor-M + * @date 20:14 2024/10/11 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @PutMapping("update") + @Operation(summary = "修改用户") + public CommonResult updateUser(@RequestBody UserInfoVO reqVO) { + userService.updateCusInfo(reqVO); + return success(true); + } + +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/UserInfoVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/UserInfoVO.java new file mode 100644 index 00000000..f5e4b47c --- /dev/null +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/app/user/UserInfoVO.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.system.controller.app.user; + +import lombok.Data; + +@Data +public class UserInfoVO { + /** 用户id **/ + private Long id; + /** 用户昵称 **/ + private String nickname; + /** 头像地址 **/ + private String avatar; +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java index 8108a7ed..cbcdbeba 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; +import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -59,4 +60,6 @@ public interface AdminUserMapper extends BaseMapperX { AdminUserDO getUserByMobileWithoutTenant(String phoneNumber); int updateSetOpenId(@Param("userId")Long userId,@Param("openId")String openId); + + int updateCusInfo(@Param("entity") UserInfoVO userInfoVO); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index bd91cbad..212c49ed 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -6,8 +6,6 @@ import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils; -import cn.iocoder.yudao.framework.security.core.LoginUser; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.module.system.api.logger.dto.LoginLogCreateReqDTO; import cn.iocoder.yudao.module.system.api.sms.SmsCodeApi; import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; @@ -217,6 +215,16 @@ public class AdminAuthServiceImpl implements AdminAuthService { return AuthConvert.INSTANCE.convert(accessTokenDO); } + private AuthLoginRespVO createTokenAfterLoginSuccessCustomer(Long userId, String username, LoginLogTypeEnum logType) { + // 插入登陆日志 + createLoginLog(userId, username, logType, LoginResultEnum.SUCCESS); + // 创建访问令牌 + OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(userId, UserTypeEnum.MEMBER.getValue(), + OAuth2ClientConstants.CLIENT_ID_DEFAULT, null); + // 构建返回结果 + return AuthConvert.INSTANCE.convert(accessTokenDO); + } + @Override public AuthLoginRespVO refreshToken(String refreshToken) { OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.refreshAccessToken(refreshToken, OAuth2ClientConstants.CLIENT_ID_DEFAULT); @@ -408,7 +416,7 @@ public class AdminAuthServiceImpl implements AdminAuthService { @Override public AuthLoginRespVO wxLoginByUserId(Long userId, String userName) { // 生成token - return createTokenAfterLoginSuccess(userId, userName, LoginLogTypeEnum.LOGIN_SOCIAL); + return createTokenAfterLoginSuccessCustomer(userId, userName, LoginLogTypeEnum.LOGIN_SOCIAL); } /** diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java index 73e370f8..a1c4b266 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java @@ -1,17 +1,23 @@ package cn.iocoder.yudao.module.system.service.user; import cn.hutool.core.collection.CollUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; -import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.*; -import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportExcelVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportRespVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; +import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; +import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; import javax.validation.Valid; import java.io.InputStream; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * 后台用户 Service 接口 @@ -35,6 +41,14 @@ public interface AdminUserService { */ void updateUser(@Valid UserSaveReqVO updateReqVO); + /** + * 微信小程序端修改用户个人信息 + * @author vinjor-M + * @date 20:11 2024/10/11 + * @param userInfoVO 用户对象 + **/ + void updateCusInfo(UserInfoVO userInfoVO); + /** * 更新用户的最后登陆信息 * diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java index 15ade9ba..cf55e617 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java @@ -12,13 +12,13 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils; import cn.iocoder.yudao.module.infra.api.config.ConfigApi; import cn.iocoder.yudao.module.infra.api.file.FileApi; -import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdatePasswordReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.profile.UserProfileUpdateReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportExcelVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserImportRespVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserPageReqVO; import cn.iocoder.yudao.module.system.controller.admin.user.vo.user.UserSaveReqVO; +import cn.iocoder.yudao.module.system.controller.app.user.UserInfoVO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO; import cn.iocoder.yudao.module.system.dal.dataobject.dept.UserPostDO; import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; @@ -142,6 +142,18 @@ public class AdminUserServiceImpl implements AdminUserService { LogRecordContext.putVariable("user", oldUser); } + /** + * 微信小程序端修改用户个人信息 + * + * @param userInfoVO 用户对象 + * @author vinjor-M + * @date 20:11 2024/10/11 + **/ + @Override + public void updateCusInfo(UserInfoVO userInfoVO) { + userMapper.updateCusInfo(userInfoVO); + } + private void updateUserPost(UserSaveReqVO reqVO, AdminUserDO updateObj) { Long userId = reqVO.getId(); Set dbPostIds = convertSet(userPostMapper.selectListByUserId(userId), UserPostDO::getPostId); diff --git a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml index 9bc0a9cb..40245dc2 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml +++ b/yudao-module-system/yudao-module-system-biz/src/main/resources/mapper/SysUserMapper.xml @@ -6,6 +6,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" UPDATE system_users SET open_id = #{openId} WHERE id = #{userId} + + UPDATE system_users + SET nickname = #{entity.nickname},avatar = #{entity.avatar} + WHERE id = #{entity.id} +