From 44e0c71ce56f242a4f3df36d7f02363d570f474c Mon Sep 17 00:00:00 2001 From: lzq Date: Thu, 25 Sep 2025 18:12:00 +0800 Subject: [PATCH] 1 --- .../njzscloud-common-security/pom.xml | 6 +- .../config/WebSecurityAutoConfiguration.java | 30 +- .../code/CodeAuthenticationProvider.java | 5 +- .../PasswordAuthenticationProvider.java | 12 +- .../password/PasswordLoginPreparer.java | 6 +- .../WechatMiniAuthenticationProvider.java | 20 +- .../wechat/mini/WechatMiniLoginForm.java | 7 +- .../wechat/mini/WechatMiniLoginPreparer.java | 23 +- .../common/security/support/IUserService.java | 8 +- .../common/security/support/LoginForm.java | 6 +- .../common/security/support/UserDetail.java | 15 +- .../common/security/util/SecurityUtil.java | 37 +- .../supervisory/biz/constant/BizObj.java | 18 +- .../biz/service/BizCompanyService.java | 10 +- .../biz/service/BizDriverService.java | 18 +- .../biz/service/BizProjectService.java | 11 +- .../biz/service/BizTruckService.java | 10 +- .../expense/contant/ExpenseItemCategory.java | 21 + .../ExpenseItemsConfigController.java | 68 + .../mapper/ExpenseItemsConfigMapper.java | 13 + .../pojo/entity/ExpenseItemsConfigEntity.java | 103 ++ .../supervisory/expense/pojo/param/.gitkeep | 0 .../supervisory/expense/pojo/result/.gitkeep | 0 .../service/ExpenseItemsConfigService.java | 59 + .../order/pojo/entity/OrderGoodsEntity.java | 12 +- .../order/pojo/entity/OrderInfoEntity.java | 105 +- .../order/service/OrderInfoService.java | 60 +- .../sys/auth/controller/AuthController.java | 4 +- .../sys/auth/mapper/AuthMapper.java | 4 +- .../sys/auth/pojo/result/MyResult.java | 18 +- .../sys/auth/service/AuthService.java | 59 +- .../sys/auth/service/TokenService.java | 2 +- .../sys/user/controller/UserController.java | 9 +- .../sys/user/pojo/param/AddUserParam.java | 5 +- .../user/pojo/param/UserRegisterParam.java | 72 +- .../sys/user/service/UserAccountService.java | 37 +- .../sys/user/service/UserService.java | 76 +- .../resources/mapper/sys/auth/AuthMapper.xml | 15 +- z-doc/db-model/njzscloud.pdma.json | 1345 +++++++++++++++-- 39 files changed, 1880 insertions(+), 449 deletions(-) create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/contant/ExpenseItemCategory.java create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/controller/ExpenseItemsConfigController.java create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/mapper/ExpenseItemsConfigMapper.java create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/entity/ExpenseItemsConfigEntity.java create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/param/.gitkeep create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/result/.gitkeep create mode 100644 njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/service/ExpenseItemsConfigService.java diff --git a/njzscloud-common/njzscloud-common-security/pom.xml b/njzscloud-common/njzscloud-common-security/pom.xml index fe672e1..fc2fb5d 100644 --- a/njzscloud-common/njzscloud-common-security/pom.xml +++ b/njzscloud-common/njzscloud-common-security/pom.xml @@ -23,7 +23,11 @@ njzscloud-common-core provided - + + com.njzscloud + njzscloud-common-wechat + provided + 否、1-->是 + */ + private Boolean canuse; + + /** + * 适用范围; json + */ + private String scope; + + /** + * 税率 + */ + private BigDecimal taxRate; + + /** + * 创建人 Id; sys_user.id + */ + @TableField(fill = FieldFill.INSERT) + private Long creatorId; + + /** + * 修改人 Id; sys_user.id + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long modifierId; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + private LocalDateTime createTime; + + /** + * 修改时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + private LocalDateTime modifyTime; + + /** + * 是否删除; 0-->未删除、1-->已删除 + */ + @TableLogic + private Boolean deleted; + +} diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/param/.gitkeep b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/param/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/result/.gitkeep b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/pojo/result/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/service/ExpenseItemsConfigService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/service/ExpenseItemsConfigService.java new file mode 100644 index 0000000..9224ff2 --- /dev/null +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/expense/service/ExpenseItemsConfigService.java @@ -0,0 +1,59 @@ +package com.njzscloud.supervisory.expense.service; + +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.njzscloud.common.mp.support.PageParam; +import com.njzscloud.common.mp.support.PageResult; +import com.njzscloud.supervisory.expense.mapper.ExpenseItemsConfigMapper; +import com.njzscloud.supervisory.expense.pojo.entity.ExpenseItemsConfigEntity; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 付费项配置 + */ +@Slf4j +@Service +public class ExpenseItemsConfigService extends ServiceImpl implements IService { + + /** + * 新增 + */ + public void add(ExpenseItemsConfigEntity expenseItemsConfigEntity) { + this.save(expenseItemsConfigEntity); + } + + /** + * 修改 + */ + public void modify(ExpenseItemsConfigEntity expenseItemsConfigEntity) { + this.updateById(expenseItemsConfigEntity); + } + + /** + * 删除 + */ + @Transactional(rollbackFor = Exception.class) + public void del(List ids) { + this.removeBatchByIds(ids); + } + + /** + * 详情 + */ + public ExpenseItemsConfigEntity detail(Long id) { + return this.getById(id); + } + + /** + * 分页查询 + */ + public PageResult paging(PageParam pageParam, ExpenseItemsConfigEntity expenseItemsConfigEntity) { + return PageResult.of(this.page(pageParam.toPage(), Wrappers.query(expenseItemsConfigEntity))); + } + +} diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderGoodsEntity.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderGoodsEntity.java index 8ce4fbc..e1e361b 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderGoodsEntity.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderGoodsEntity.java @@ -18,7 +18,7 @@ import java.math.BigDecimal; @Setter @ToString @Accessors(chain = true) -@TableName("order_goods") +@TableName(value = "order_goods", autoResultMap = true) public class OrderGoodsEntity { /** @@ -72,14 +72,4 @@ public class OrderGoodsEntity { */ private BigDecimal taxRate; - /** - * 数量 - */ - private Integer quantity; - - /** - * 总金额; 单位:元 - */ - private BigDecimal totalMoney; - } diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderInfoEntity.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderInfoEntity.java index cba05a9..1bea773 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderInfoEntity.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/pojo/entity/OrderInfoEntity.java @@ -3,7 +3,10 @@ package com.njzscloud.supervisory.order.pojo.entity; import com.baomidou.mybatisplus.annotation.*; import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler; import com.njzscloud.supervisory.biz.constant.AuditStatus; -import com.njzscloud.supervisory.order.contant.*; +import com.njzscloud.supervisory.order.contant.CheckStatus; +import com.njzscloud.supervisory.order.contant.OrderCategory; +import com.njzscloud.supervisory.order.contant.OrderStatus; +import com.njzscloud.supervisory.order.contant.PaymentStatus; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -28,18 +31,6 @@ public class OrderInfoEntity { */ @TableId(type = IdType.ASSIGN_ID) private Long id; - /** - * 联系人 - */ - private String contacts; - /** - * 自动标识; 0-->全手动、1-->进自动、2-->出自动、3-->全自动 - */ - private Integer autoOrder; - /** - * 联系方式 - */ - private String phone; /** * 订单编号 @@ -50,6 +41,27 @@ public class OrderInfoEntity { * 准运证编号 */ private String certificateSn; + + /** + * 自动标识; 0-->全手动、1-->进自动、2-->出自动、3-->全自动 + */ + private Integer autoOrder; + + /** + * 站点 Id + */ + private Long stationId; + + /** + * 车道 + */ + private String lane; + + /** + * 项目 Id + */ + private Long projectId; + /** * 装货地址 Id */ @@ -64,33 +76,37 @@ public class OrderInfoEntity { * 开始清运时间 */ private LocalDateTime transTime; - /** - * 站点 Id - */ - private Long stationId; - - /** - * 车道 - */ - private String lane; /** * 下单人 Id; sys_user.id */ private Long userId; + /** + * 联系人 + */ + private String contacts; + + /** + * 联系方式 + */ + private String phone; + /** * 审核状态; 字典代码:audit_status */ private AuditStatus auditStatus; - /** - * 审核时间 - */ - private LocalDateTime auditTime; + /** * 审核备注 */ private String auditMemo; + + /** + * 审核时间 + */ + private LocalDateTime auditTime; + /** * 区审核人 */ @@ -100,15 +116,17 @@ public class OrderInfoEntity { * 市审核人 */ private Long shiAuditUserId; + /** - * 目标站点 Id + * 对方站点 Id; 短驳单有值 */ private Long targetStationId; /** - * 短驳入订单 Id + * 对方订单 Id; 短驳单有值 */ private Long targetOrderId; + /** * 订单类型; 字典代码:order_category */ @@ -160,14 +178,9 @@ public class OrderInfoEntity { private BigDecimal settleMoney; /** - * 付款方资金账户 Id + * 总金额; 单位:元 */ - private Long payer; - - /** - * 支付方类型; 字典代码:payer_category - */ - private PayerCategory payerCategory; + private BigDecimal totalMoney; /** * 支付状态; 字典代码:payment_status @@ -175,9 +188,9 @@ public class OrderInfoEntity { private PaymentStatus paymentStatus; /** - * 支付时间 + * 完结时间 */ - private LocalDateTime paymentTime; + private LocalDateTime finishTime; /** * 客户备注 @@ -200,15 +213,18 @@ public class OrderInfoEntity { */ @TableField(typeHandler = JsonTypeHandler.class) private List checkPhoto; + + /** + * 进出场信息 + */ + private Long carInOutId; + /** * 现场照片 */ @TableField(typeHandler = JsonTypeHandler.class) private List sitePhotos; - /** - * 进出场信息 - */ - private Long carInOutId; + /** * 期望运输时间 */ @@ -218,6 +234,7 @@ public class OrderInfoEntity { * 预估量 */ private String estimatedQuantity; + /** * 创建人 Id; sys_user.id */ @@ -248,10 +265,4 @@ public class OrderInfoEntity { @TableLogic private Boolean deleted; - /** - * 项目 Id - */ - private Long projectId; - - } diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/service/OrderInfoService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/service/OrderInfoService.java index 8ef1025..7282a83 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/service/OrderInfoService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/order/service/OrderInfoService.java @@ -14,7 +14,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njzscloud.common.core.ex.Exceptions; -import com.njzscloud.common.core.ienum.Dict; import com.njzscloud.common.mp.support.PageParam; import com.njzscloud.common.mp.support.PageResult; import com.njzscloud.common.security.support.UserDetail; @@ -37,6 +36,7 @@ import com.njzscloud.supervisory.order.pojo.param.*; import com.njzscloud.supervisory.order.pojo.result.OrderCertificateResult; import com.njzscloud.supervisory.order.pojo.result.OrderPagingResult; import com.njzscloud.supervisory.order.pojo.result.TrainBillResult; +import com.njzscloud.supervisory.sys.auth.pojo.result.MyResult; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -174,16 +174,16 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); + MyResult userDetail = SecurityUtil.loginUser(); Long userId = SecurityUtil.currentUserId(); - String bizObjStr = userDetail.getBizObj(); - if (BizObj.isTrans(bizObjStr)) { + BizObj bizObj = userDetail.getBizObj(); + if (BizObj.isTrans(bizObj)) { ew .in("a.order_status", OrderStatus.DaiPaiDan, OrderStatus.DaiJieDan) .eq("g.user_id", userId); return; } - if (BizObj.isDriver(bizObjStr)) { + if (BizObj.isDriver(bizObj)) { ew .eq("a.order_status", OrderStatus.DaiJieDan) .eq("f.user_id", userId); @@ -203,11 +203,11 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); + MyResult userDetail = SecurityUtil.loginUser(); Long userId = SecurityUtil.currentUserId(); - String bizObjStr = userDetail.getBizObj(); + BizObj bizObj = userDetail.getBizObj(); - if (BizObj.isWaste(bizObjStr)) { + if (BizObj.isWaste(bizObj)) { ew .in("a.order_status", OrderStatus.YiYuYue, OrderStatus.DaiPaiDan, OrderStatus.DaiJieDan, OrderStatus.YiJieDan) .eq("a.user_id", userId) @@ -228,25 +228,25 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); + MyResult userDetail = SecurityUtil.loginUser(); Long userId = SecurityUtil.currentUserId(); - String bizObjStr = userDetail.getBizObj(); + BizObj bizObj = userDetail.getBizObj(); - if (BizObj.isWaste(bizObjStr)) { + if (BizObj.isWaste(bizObj)) { ew .in("a.order_status", OrderStatus.QingYunZhong, OrderStatus.YiJinChang, OrderStatus.YiChuChang) .eq("a.user_id", userId) ; return; } - if (BizObj.isTrans(bizObjStr)) { + if (BizObj.isTrans(bizObj)) { ew .in("a.order_status", OrderStatus.YiJieDan, OrderStatus.QingYunZhong, OrderStatus.YiJinChang, OrderStatus.YiChuChang) .eq("g.user_id", userId) ; return; } - if (BizObj.isDriver(bizObjStr)) { + if (BizObj.isDriver(bizObj)) { ew .eq("f.user_id", userId) .in("a.order_status", OrderStatus.YiJieDan, OrderStatus.QingYunZhong, OrderStatus.YiJinChang, OrderStatus.YiChuChang) @@ -267,18 +267,18 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); + MyResult userDetail = SecurityUtil.loginUser(); Long userId = SecurityUtil.currentUserId(); - String bizObjStr = userDetail.getBizObj(); + BizObj bizObj = userDetail.getBizObj(); - if (BizObj.isWaste(bizObjStr)) { + if (BizObj.isWaste(bizObj)) { ew .eq("a.order_status", OrderStatus.YiWanCheng) .eq("a.user_id", userId) ; return; } - if (BizObj.isTrans(bizObjStr)) { + if (BizObj.isTrans(bizObj)) { ew .eq("a.order_status", OrderStatus.YiWanCheng) .eq("g.user_id", userId) @@ -286,7 +286,7 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); + MyResult userDetail = SecurityUtil.loginUser(); Long userId = SecurityUtil.currentUserId(); - String bizObjStr = userDetail.getBizObj(); + BizObj bizObj = userDetail.getBizObj(); - if (BizObj.isWaste(bizObjStr)) { + if (BizObj.isWaste(bizObj)) { ew .eq("a.order_status", OrderStatus.YiQuXiao) .eq("a.user_id", userId) @@ -346,9 +346,9 @@ public class OrderInfoService extends ServiceImpl ew) { - UserDetail userDetail = SecurityUtil.loginUser(); - String bizObjStr = userDetail.getBizObj(); - if (BizObj.isSiBang(bizObjStr)) { + MyResult userDetail = SecurityUtil.loginUser(); + BizObj bizObj = userDetail.getBizObj(); + if (BizObj.isSiBang(bizObj)) { CheckStatus checkStatus = orderPagingSearchParam.getCheckStatus(); if (checkStatus == CheckStatus.YiKanLiao) { ew @@ -679,14 +679,14 @@ public class OrderInfoService extends ServiceImpl my() { + public R my() { return R.success(authService.my()); } } diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/mapper/AuthMapper.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/mapper/AuthMapper.java index 4779793..df906bc 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/mapper/AuthMapper.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/mapper/AuthMapper.java @@ -3,8 +3,8 @@ package com.njzscloud.supervisory.sys.auth.mapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.njzscloud.common.security.support.EndpointResource; import com.njzscloud.common.security.support.MenuResource; -import com.njzscloud.common.security.support.UserDetail; import com.njzscloud.supervisory.biz.pojo.result.SearchCompanyResult; +import com.njzscloud.supervisory.sys.auth.pojo.result.MyResult; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -19,7 +19,7 @@ public interface AuthMapper { Set selectRoleByUserId(@Param("userId") Long userId); - UserDetail selectUser(@Param("ew") QueryWrapper ew); + MyResult selectUser(@Param("ew") QueryWrapper ew); SearchCompanyResult selectCompanyInfo(@Param("userId") Long userId); } diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/pojo/result/MyResult.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/pojo/result/MyResult.java index 0574d78..6ee2091 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/pojo/result/MyResult.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/pojo/result/MyResult.java @@ -2,12 +2,11 @@ package com.njzscloud.supervisory.sys.auth.pojo.result; import com.njzscloud.common.security.support.EndpointResource; import com.njzscloud.common.security.support.MenuResource; +import com.njzscloud.common.security.support.UserDetail; import com.njzscloud.supervisory.biz.constant.BizObj; import com.njzscloud.supervisory.biz.pojo.result.SearchCompanyResult; -import com.njzscloud.supervisory.sys.user.contant.Gender; import lombok.Getter; import lombok.Setter; -import lombok.ToString; import lombok.experimental.Accessors; import java.util.List; @@ -16,9 +15,8 @@ import java.util.Set; @Getter @Setter -@ToString @Accessors(chain = true) -public class MyResult { +public class MyResult extends UserDetail { private List menus; private Set roles; @@ -32,22 +30,10 @@ public class MyResult { * Id */ private Long id; - /** - * 昵称 - */ - private String nickname; /** * 头像 */ private String avatar; - /** - * 性别; 字典代码:gender - */ - private Gender gender; - /** - * 邮箱 - */ - private String email; /** * 手机号 */ diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/AuthService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/AuthService.java index df2a388..ea1a684 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/AuthService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/AuthService.java @@ -2,8 +2,8 @@ package com.njzscloud.supervisory.sys.auth.service; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.njzscloud.common.security.contant.AuthWay; import com.njzscloud.common.security.module.password.PasswordLoginForm; import com.njzscloud.common.security.module.wechat.mini.WechatMiniLoginForm; import com.njzscloud.common.security.support.*; @@ -12,10 +12,12 @@ import com.njzscloud.supervisory.biz.pojo.result.SearchCompanyResult; import com.njzscloud.supervisory.sys.auth.mapper.AuthMapper; import com.njzscloud.supervisory.sys.auth.pojo.result.MyResult; import com.njzscloud.supervisory.sys.user.pojo.entity.UserEntity; +import com.njzscloud.supervisory.sys.user.pojo.param.UserRegisterParam; import com.njzscloud.supervisory.sys.user.service.UserService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Set; @@ -23,50 +25,49 @@ import java.util.Set; @Slf4j @Service @RequiredArgsConstructor -public class AuthService implements IUserService, IResourceService, IRoleService { +public class AuthService implements IUserService, IRoleService { private final AuthMapper authMapper; private final UserService userService; @Override - public UserDetail selectUser(String account, AuthWay authWay) { - switch (authWay) { - case PASSWORD: - return authMapper.selectUser(Wrappers.query().eq("a.username", account).eq("a.deleted", 0)); - case PHONE: - return authMapper.selectUser(Wrappers.query().eq("a.phone", account).eq("a.deleted", 0)); - case WECHAT_MINI: - return authMapper.selectUser(Wrappers.query().eq("a.wechat_openid", account).eq("a.deleted", 0)); - case WECHAT: - default: - return null; - } - } - - @Override + @Transactional(rollbackFor = Exception.class) public UserDetail selectUser(PasswordLoginForm form) { - String account = form.getAccount(); - return authMapper.selectUser(Wrappers.query().eq("a.username", account).eq("a.deleted", 0)); + JSONObject registerData = form.getRegisterData(); + if (registerData != null) { + UserRegisterParam userRegisterParam = registerData.toJavaObject(UserRegisterParam.class); + UserRegisterParam.Account account = userRegisterParam.getAccount(); + if (StrUtil.isBlank(userRegisterParam.getPhone())) { + userRegisterParam.setPhone(account.getPhone()); + account.setPhone(null); + } + userService.register(userRegisterParam); + } + + return authMapper.selectUser(Wrappers.query().eq("a.username", form.getAccount()).eq("a.deleted", 0)); } @Override + @Transactional(rollbackFor = Exception.class) public UserDetail selectUser(WechatMiniLoginForm form) { String openid = form.getOpenid(); String unionid = form.getUnionid(); + JSONObject registerData = form.getRegisterData(); + if (registerData != null) { + UserRegisterParam userRegisterParam = registerData.toJavaObject(UserRegisterParam.class); + UserRegisterParam.Account account = userRegisterParam.getAccount(); + account.setWechatOpenid(openid) + .setWechatUnionid(unionid); + if (StrUtil.isBlank(userRegisterParam.getPhone())) { + userRegisterParam.setPhone(account.getPhone()); + } + userService.register(userRegisterParam); + } return authMapper.selectUser(Wrappers.query().eq("a.wechat_openid", openid) .eq(StrUtil.isNotBlank(unionid), "a.wechat_unionid", unionid) .eq("a.deleted", 0)); } - @Override - public Resource selectResourceByUserId(Long userId) { - List menuResources = authMapper.selectUserMenu(userId); - List endpointResource = authMapper.selectUserEndpoint(userId); - return new Resource() - .setMenu(menuResources) - .setEndpoint(endpointResource); - } - @Override public Set selectRoleByUserId(Long userId) { return authMapper.selectRoleByUserId(userId); @@ -75,7 +76,7 @@ public class AuthService implements IUserService, IResourceService, IRoleService /** * 获取当前登录人信息 */ - public MyResult my() { + public UserDetail my() { Long userId = SecurityUtil.currentUserId(); UserEntity userEntity = userService.getById(userId); List menuResources = authMapper.selectUserMenu(userId); diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/TokenService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/TokenService.java index 2334f23..70d8dbc 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/TokenService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/auth/service/TokenService.java @@ -43,7 +43,7 @@ public class TokenService implements ITokenService { .setTid(tid) .setTkey(key) .setTval(token.toString()) - .setUserDetail(userDetail.toString()) + .setUserDetail(Fastjson.toJsonStr(userDetail)) ); TOKEN_CACHE.put(key, userDetail); } finally { diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/controller/UserController.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/controller/UserController.java index 7cd318e..1dc33c8 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/controller/UserController.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/controller/UserController.java @@ -7,7 +7,10 @@ import com.njzscloud.common.mp.support.PageParam; import com.njzscloud.common.mp.support.PageResult; import com.njzscloud.common.security.util.SecurityUtil; import com.njzscloud.supervisory.sys.user.pojo.entity.UserEntity; -import com.njzscloud.supervisory.sys.user.pojo.param.*; +import com.njzscloud.supervisory.sys.user.pojo.param.AddUserParam; +import com.njzscloud.supervisory.sys.user.pojo.param.ModifyPasswdParam; +import com.njzscloud.supervisory.sys.user.pojo.param.UserModifyParam; +import com.njzscloud.supervisory.sys.user.pojo.param.UserQueryParam; import com.njzscloud.supervisory.sys.user.pojo.result.UserDetailResult; import com.njzscloud.supervisory.sys.user.service.UserService; import lombok.RequiredArgsConstructor; @@ -88,11 +91,11 @@ public class UserController { * * @param userRegisterParam 参数 */ - @PostMapping("/register") + /* @PostMapping("/register") public R register(@RequestBody @Validated UserRegisterParam userRegisterParam) { String token = userService.register(userRegisterParam); return R.success(token); - } + } */ /** * 修改密码 diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/AddUserParam.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/AddUserParam.java index 29f19ee..223c2e6 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/AddUserParam.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/AddUserParam.java @@ -27,7 +27,10 @@ public class AddUserParam implements Constrained { * 昵称 */ private String nickname; - + /** + * 手机号 + */ + private String phone; /** * 头像 */ diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/UserRegisterParam.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/UserRegisterParam.java index 3141563..13bed28 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/UserRegisterParam.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/pojo/param/UserRegisterParam.java @@ -1,10 +1,6 @@ package com.njzscloud.supervisory.sys.user.pojo.param; -import cn.hutool.core.util.StrUtil; -import com.njzscloud.common.mvc.validator.Constrained; -import com.njzscloud.common.mvc.validator.ValidRule; import com.njzscloud.supervisory.biz.constant.BizObj; -import com.njzscloud.supervisory.sys.user.contant.Gender; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -16,7 +12,7 @@ import java.time.LocalDate; @Setter @ToString @Accessors(chain = true) -public class UserRegisterParam implements Constrained { +public class UserRegisterParam { /** * 业务对象; 字典代码:biz_obj @@ -29,15 +25,9 @@ public class UserRegisterParam implements Constrained { private String nickname; /** - * 头像 + * 手机号 */ - private String avatar; - - /** - * 性别; 字典代码:gender - */ - private Gender gender; - + private String phone; /** * 账号信息 */ @@ -48,42 +38,11 @@ public class UserRegisterParam implements Constrained { */ private Company company; - - @Override - public ValidRule[] rules() { - return new ValidRule[]{ - ValidRule.of(() -> StrUtil.isNotBlank(nickname), "用户昵称不能为空"), - ValidRule.of(() -> account != null, "账号信息不能为空"), - ValidRule.of(() -> { - switch (bizObj) { - case GeRen: - return StrUtil.isNotBlank(account.getPhone()) && StrUtil.isNotBlank(account.getCode()) && StrUtil.isNotBlank(account.getCodeId()); - case QingYunGongSi: - case WuYe: - return StrUtil.isNotBlank(account.getUsername()) && StrUtil.isNotBlank(account.getSecret()); - default: - return false; - } - }, "账号信息错误"), - ValidRule.of(() -> { - switch (bizObj) { - case GeRen: - return true; - case QingYunGongSi: - case WuYe: - return company != null; - default: - return false; - } - }, "公司信息不能为空"), - }; - } - @Getter @Setter @ToString @Accessors(chain = true) - public static class Account implements Constrained { + public static class Account { /** * 邮箱 */ @@ -104,6 +63,15 @@ public class UserRegisterParam implements Constrained { */ private String secret; + /** + * 微信openid + */ + private String wechatOpenid; + /** + * 微信unionid + */ + private String wechatUnionid; + /** * 验证码 */ @@ -113,18 +81,13 @@ public class UserRegisterParam implements Constrained { * 获取验证码时使用的 uid */ private String codeId; - - @Override - public ValidRule[] rules() { - return new ValidRule[]{}; - } } @Getter @Setter @ToString @Accessors(chain = true) - public static class Company implements Constrained { + public static class Company { /** * 企业名称 */ @@ -144,6 +107,7 @@ public class UserRegisterParam implements Constrained { * 营业执照有效期; [开始日期,结束日期] */ private LocalDate licenseStartTime; + private LocalDate licenseEndTime; /** @@ -215,11 +179,5 @@ public class UserRegisterParam implements Constrained { * 联系电话 */ private String phone; - - - @Override - public ValidRule[] rules() { - return new ValidRule[]{}; - } } } diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserAccountService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserAccountService.java index aa84d63..88ee2a0 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserAccountService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserAccountService.java @@ -34,17 +34,38 @@ public class UserAccountService extends ServiceImpl Exceptions.exception("用户名、邮箱、手机号、微信账号不能全部为空")); + List oldSysUserList = this.list(Wrappers.lambdaQuery() .eq(StrUtil.isNotBlank(username), UserAccountEntity::getUsername, username) - // .or().eq(StrUtil.isNotBlank(email), UserAccountEntity::getEmail, email) - // .or().eq(StrUtil.isNotBlank(phone), UserAccountEntity::getPhone, phone) - .or(StrUtil.isNotBlank(wechatOpenid) /* && StrUtil.isNotBlank(wechatUnionid) */, it -> it.eq(UserAccountEntity::getWechatOpenid, wechatOpenid)) + .or().eq(StrUtil.isNotBlank(email), UserAccountEntity::getEmail, email) + .or().eq(StrUtil.isNotBlank(phone), UserAccountEntity::getPhone, phone) + .or(StrUtil.isNotBlank(wechatOpenid), it -> it + .eq(UserAccountEntity::getWechatOpenid, wechatOpenid) + .eq(StrUtil.isNotBlank(wechatUnionid), UserAccountEntity::getWechatUnionid, wechatUnionid) + ) ); - Assert.isTrue(oldSysUserList.stream().noneMatch(it -> username.equals(it.getUsername())), () -> Exceptions.exception("用户名【{}】已被使用", username)); - Assert.isTrue(StrUtil.isBlank(email) || oldSysUserList.stream().noneMatch(it -> email.equals(it.getEmail())), () -> Exceptions.exception("邮箱【{}】已被使用", email)); - Assert.isTrue(StrUtil.isBlank(phone) || oldSysUserList.stream().noneMatch(it -> phone.equals(it.getPhone())), () -> Exceptions.exception("手机号【{}】已被使用", phone)); - Assert.isTrue(StrUtil.isBlank(wechatOpenid) /* || StrUtil.isBlank(wechatUnionid) */ || oldSysUserList.stream().noneMatch(it -> wechatOpenid.equals(it.getWechatOpenid())), () -> Exceptions.exception("该微信账号已被使用")); + + if (StrUtil.isNotBlank(username)) { + Assert.isTrue(oldSysUserList.stream().noneMatch(it -> username.equals(it.getUsername())), () -> Exceptions.exception("用户名【{}】已被使用", username)); + } + if (StrUtil.isNotBlank(email)) { + Assert.isTrue(oldSysUserList.stream().noneMatch(it -> email.equals(it.getEmail())), () -> Exceptions.exception("邮箱【{}】已被使用", email)); + } + if (StrUtil.isNotBlank(phone)) { + Assert.isTrue(oldSysUserList.stream().noneMatch(it -> phone.equals(it.getPhone())), () -> Exceptions.exception("手机号【{}】已被使用", phone)); + } + if (StrUtil.isNotBlank(wechatOpenid)) { + Assert.isTrue(oldSysUserList.stream().noneMatch(it -> { + String unionid = it.getWechatUnionid(); + return wechatOpenid.equals(it.getWechatOpenid()) && (StrUtil.isBlank(wechatUnionid) || wechatUnionid.equals(unionid)); + }), () -> Exceptions.exception("该微信账号已被使用")); + } UserAccountEntity userAccountEntity = BeanUtil.copyProperties(addUserAccountParam, UserAccountEntity.class) .setSecret(EncryptUtil.encrypt(addUserAccountParam.getSecret())) diff --git a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserService.java b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserService.java index 9bc2afd..8550957 100644 --- a/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserService.java +++ b/njzscloud-svr/src/main/java/com/njzscloud/supervisory/sys/user/service/UserService.java @@ -11,11 +11,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.njzscloud.common.core.ex.Exceptions; import com.njzscloud.common.mp.support.PageResult; -import com.njzscloud.common.security.contant.AuthWay; import com.njzscloud.common.security.util.SecurityUtil; -import com.njzscloud.common.wechat.WechatUtil; -import com.njzscloud.common.wechat.param.Code2SessionParam; -import com.njzscloud.common.wechat.result.Code2SessionResult; import com.njzscloud.supervisory.biz.constant.BizObj; import com.njzscloud.supervisory.biz.pojo.param.AddBizCompanyParam; import com.njzscloud.supervisory.biz.service.BizCompanyService; @@ -53,13 +49,13 @@ public class UserService extends ServiceImpl implements */ @Transactional(rollbackFor = Exception.class) public Long add(AddUserParam addUserParam) { + String phone = addUserParam.getPhone(); + String nickname = addUserParam.getNickname(); + Assert.notBlank(phone, () -> Exceptions.clierr("手机号不能为空")); + Assert.notBlank(nickname, () -> Exceptions.clierr("用户姓名不能为空")); AddUserAccountParam addUserAccountParam = addUserParam.getAccount(); - String email = addUserAccountParam.getEmail(); - String phone = addUserAccountParam.getPhone(); UserEntity userEntity = BeanUtil.copyProperties(addUserParam, UserEntity.class); - if (StrUtil.isNotBlank(email)) userEntity.setEmail(email); - if (StrUtil.isNotBlank(phone)) userEntity.setPhone(phone); this.save(userEntity); Long userEntityId = userEntity.getId(); @@ -148,41 +144,46 @@ public class UserService extends ServiceImpl implements * @param userRegisterParam 参数 */ @Transactional(rollbackFor = Exception.class) - public String register(UserRegisterParam userRegisterParam) { - BizObj bizObj = userRegisterParam.getBizObj(); + public void register(UserRegisterParam userRegisterParam) { + UserRegisterParam.Account account = userRegisterParam.getAccount(); + Assert.notNull(account, () -> Exceptions.clierr("账号信息不能为空")); + BizObj bizObj = userRegisterParam.getBizObj(); if (bizObj == BizObj.GeRen) { - String code = userRegisterParam.getAccount().getCode(); - String phone = userRegisterParam.getAccount().getPhone(); - Code2SessionResult code2SessionResult = WechatUtil.code2Session(new Code2SessionParam().setJs_code(code)); - String openid = code2SessionResult.getOpenid(); - Assert.notBlank(openid, () -> Exceptions.error("微信登录失败")); - // String unionid = code2SessionResult.getUnionid(); - UserAccountEntity one = userAccountService.getOne(Wrappers.lambdaQuery() - // .eq(UserAccountEntity::getPhone, phone) - // .eq(UserAccountEntity::getWechatUnionid, unionid) - .eq(UserAccountEntity::getWechatOpenid, openid) - ); - if (one != null) { - String phone1 = one.getPhone(); - if (phone.equals(phone1)) { - return SecurityUtil.registrationToken(openid, AuthWay.WECHAT_MINI); - } else { - throw Exceptions.clierr("手机号错误"); - } - } else { - AddUserParam addUserParam = BeanUtil.copyProperties(userRegisterParam, AddUserParam.class); - addUserParam.setAccount(BeanUtil.copyProperties(userRegisterParam.getAccount(), AddUserAccountParam.class) - .setWechatOpenid(openid) - // .setWechatUnionid(unionid) - ); - this.add(addUserParam); - return SecurityUtil.registrationToken(openid, AuthWay.WECHAT_MINI); + Assert.notBlank(account.getPhone(), () -> Exceptions.clierr("手机号不能为空")); + Assert.notBlank(account.getWechatOpenid(), () -> Exceptions.clierr("微信号不能为空")); + } else if (bizObj == BizObj.ShiGongDanWei + || bizObj == BizObj.WuYe + || bizObj == BizObj.ChaiQian + || bizObj == BizObj.SheQu + || bizObj == BizObj.QiYe + || bizObj == BizObj.GeTi + ) { + Assert.notBlank(account.getUsername(), () -> Exceptions.clierr("用户名不能为空")); + Assert.notBlank(account.getSecret(), () -> Exceptions.clierr("密码不能为空")); + } else { + throw Exceptions.clierr("业务对象错误"); + } + + String nickname = userRegisterParam.getNickname(); + Assert.notBlank(nickname, () -> Exceptions.clierr("用户姓名不能为空")); + + if (bizObj.isWastePersonal()) { + String wechatOpenid = account.getWechatOpenid(); + String wechatUnionid = account.getWechatUnionid(); + UserAccountEntity oldAccount = userAccountService.getOne(Wrappers.lambdaQuery() + .eq(StrUtil.isNotBlank(wechatUnionid), UserAccountEntity::getWechatUnionid, wechatUnionid) + .eq(UserAccountEntity::getWechatOpenid, wechatOpenid)); + + if (oldAccount != null) { + String oldUserPhone = oldAccount.getPhone(); + Assert.isTrue(oldUserPhone.equals(account.getPhone()), () -> Exceptions.clierr("手机号错误")); + return; } } AddUserParam addUserParam = BeanUtil.copyProperties(userRegisterParam, AddUserParam.class); - addUserParam.setAccount(BeanUtil.copyProperties(userRegisterParam.getAccount(), AddUserAccountParam.class)); + addUserParam.setAccount(BeanUtil.copyProperties(account, AddUserAccountParam.class)); Long userId = this.add(addUserParam); UserRegisterParam.Company company = userRegisterParam.getCompany(); @@ -192,7 +193,6 @@ public class UserService extends ServiceImpl implements .copyProperties(company, AddBizCompanyParam.class) .setUserId(userId); bizCompanyService.add(addBizCompanyParam); - return SecurityUtil.registrationToken(userRegisterParam.getAccount().getUsername(), AuthWay.PASSWORD); } /** diff --git a/njzscloud-svr/src/main/resources/mapper/sys/auth/AuthMapper.xml b/njzscloud-svr/src/main/resources/mapper/sys/auth/AuthMapper.xml index 9b5aafb..787997b 100644 --- a/njzscloud-svr/src/main/resources/mapper/sys/auth/AuthMapper.xml +++ b/njzscloud-svr/src/main/resources/mapper/sys/auth/AuthMapper.xml @@ -2,11 +2,24 @@ - SELECT a.id account_id, a.user_id, + a.user_id id, a.secret, b.nickname, + b.avatar, + b.phone, b.tenant_id, b.biz_obj, c.tenant_name, diff --git a/z-doc/db-model/njzscloud.pdma.json b/z-doc/db-model/njzscloud.pdma.json index 9a1f9c3..a89e61a 100644 --- a/z-doc/db-model/njzscloud.pdma.json +++ b/z-doc/db-model/njzscloud.pdma.json @@ -4,7 +4,7 @@ "avatar": "data:image/png;base64,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", "version": "4.9.4", "createdTime": "2023-4-13 11:53:52", - "updatedTime": "2025-9-22 14:22:41", + "updatedTime": "2025-9-25 18:09:39", "dbConns": [], "profile": { "default": { @@ -10359,7 +10359,7 @@ "len": 128, "scale": "", "primaryKey": false, - "notNull": true, + "notNull": false, "autoIncrement": false, "defaultValue": "", "hideInGraph": false, @@ -10505,38 +10505,31 @@ "id": "2B4142FC-C458-4C7D-8704-497C591AFE91" }, { - "defKey": "payer", - "defName": "付款方资金账户 Id", - "comment": "", - "type": "BIGINT", - "len": "", - "scale": "", + "defKey": "total_money", + "defName": "总金额", + "comment": "单位:元", + "type": "DECIMAL", + "len": 14, + "scale": 2, "primaryKey": false, - "notNull": true, + "notNull": false, "autoIncrement": false, "defaultValue": "", "hideInGraph": false, "refDict": "", - "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0", "extProps": {}, - "id": "1D94AD21-2FDF-44B8-ADAE-D9B08A3C8990" - }, - { - "defKey": "payer_category", - "defName": "支付方类型", - "comment": "字典代码:payer_category", - "type": "VARCHAR", - "len": 32, - "scale": "", - "primaryKey": false, - "notNull": true, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "0B7C7010-E933-4DAC-8407-A1DA19488998", - "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231", - "extProps": {}, - "id": "50FC6DF8-8549-4ECC-B791-E24A0F753EF3" + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E43EF213-DD6D-4210-A72C-049E84E2E0D5", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" }, { "defKey": "payment_status", @@ -10556,8 +10549,8 @@ "id": "49BB76EF-95DC-43AB-A4D5-2341DE769A85" }, { - "defKey": "payment_time", - "defName": "支付时间", + "defKey": "finish_time", + "defName": "完结时间", "comment": "", "type": "DATETIME", "len": "", @@ -10802,6 +10795,709 @@ "indexes": [], "type": "P" }, + { + "id": "90A74032-0ADF-46D4-962D-BFAB739EF34E", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "order_expense_items", + "defName": "订单付费项", + "comment": "", + "properties": {}, + "sysProps": { + "nameTemplate": "{defKey}[{defName}]" + }, + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "id", + "defName": "Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "BBF35AC4-7D57-4E39-AB3F-0BA22E5B37C5", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "expense_item_category", + "defName": "付费项类型", + "comment": "字典代码:expense_item_category", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "C324ACC1-1C37-4417-80DE-D4966E9C9620", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "0038BF45-8DBA-41F2-B146-9915027BB57C", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "order_id", + "defName": "订单 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0", + "extProps": {}, + "id": "0AA422F6-4682-431A-9508-D323B40A3AD1" + }, + { + "defKey": "origin_expense_item_id", + "defName": "源付费项 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A034CBF8-EB78-4576-AD5C-9FB4DBCB2AF8", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "expense_item_name", + "defName": "付费项名称", + "comment": "", + "type": "VARCHAR", + "len": 255, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "CD41FA1E-A846-41C0-A983-363128577C57", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "unit_price", + "defName": "单价", + "comment": "单位:元", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E308E0D6-9901-4235-A1AB-CBE23612695C", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "unit", + "defName": "单位", + "comment": "字典代码:unit", + "type": "VARCHAR", + "len": 64, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "F9EF11FC-9A6B-4012-9D50-2812E746B774", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "money_strategy", + "defName": "计费策略", + "comment": "字典代码:money_strategy", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "BB7C150B-FA08-4943-81F5-F111371C55BC", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "B0436DC9-637A-4F78-B544-0CBD1E509CA4", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "money_config_id", + "defName": "计费配置 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "151AD478-73F4-47F5-AACA-117651BED575", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "scope", + "defName": "适用范围", + "comment": "json", + "type": "TEXT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "59868C97-1752-4C33-B031-D37D421B167C", + "baseType": "B1BC2E92-6A75-44C0-A254-76E066047F53" + }, + { + "defKey": "tax_rate", + "defName": "税率", + "comment": "", + "type": "DECIMAL", + "len": 6, + "scale": 3, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "E7B78E7C-4E70-4EC9-899B-4F66473A7362", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "quantity", + "defName": "数量", + "comment": "", + "type": "INT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8B23FEE2-B0D6-489E-B6E9-BCD3BF014A7F", + "baseType": "FC7774E2-C9E5-4B87-9E83-D5F4DF9B004F" + }, + { + "defKey": "discount_money", + "defName": "优惠金额", + "comment": "有正负", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "007B971A-4797-4C7D-BE2F-AD26379592B3", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "revise_money", + "defName": "手动修正金额", + "comment": "有正负", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "9EB613A8-41F9-499A-BFBA-661B812BED20", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "settle_money", + "defName": "结算金额", + "comment": "正", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "378FD592-AB51-4867-9808-C04CA84B93B5", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "total_money", + "defName": "总金额", + "comment": "单位:元", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "A221CF98-6F89-413A-B5B8-C9FCD84F57F0", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "payer_category", + "defName": "付款方类型", + "comment": "字典代码:payer_category", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "0B7C7010-E933-4DAC-8407-A1DA19488998", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "076FC4E2-5487-4E8B-8E08-86386B07772C", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "payment_category", + "defName": "支付方式", + "comment": "字典代码:payment_category", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "3D821540-C228-46F6-AF13-B7818366B942", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231", + "extProps": {}, + "id": "38710EB8-3E1E-4B0B-A6BF-706398BF0944" + }, + { + "defKey": "payment_status", + "defName": "支付状态", + "comment": "字典代码:payment_status", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "C0DD9BCD-057A-46BC-AB29-F70B54060F42", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "8494075A-7120-47DE-A8C1-9FA642DAE3BD", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "payer_id", + "defName": "付款人 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0", + "extProps": {}, + "id": "7C7AEC87-688D-469B-9559-471B17EC3620" + }, + { + "defKey": "payer_money_account", + "defName": "付款方资金账户 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "4FB5A6E8-13E4-418B-B342-543DB08CE179", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "payment_time", + "defName": "支付时间", + "comment": "", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "921EB977-9943-4C50-B70C-775EAEF116E2", + "baseType": "A098BA98-4957-43EE-9F06-1CDC26D370E0" + } + ], + "correlations": [], + "indexes": [], + "type": "P" + }, { "id": "E24A8C8D-A81D-4BC7-B046-09E4E0FAC2A0", "env": { @@ -11699,60 +12395,6 @@ "attr9": "", "id": "5A5B4ABC-276F-4C8E-8FBD-8F270C040788", "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" - }, - { - "defKey": "quantity", - "defName": "数量", - "comment": "", - "type": "INT", - "len": "", - "scale": "", - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "notes": {}, - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "7976D54D-9DF6-42E3-956D-950C803098F5", - "baseType": "FC7774E2-C9E5-4B87-9E83-D5F4DF9B004F" - }, - { - "defKey": "total_money", - "defName": "总金额", - "comment": "单位:元", - "type": "DECIMAL", - "len": 14, - "scale": 2, - "primaryKey": false, - "notNull": false, - "autoIncrement": false, - "defaultValue": "", - "hideInGraph": false, - "refDict": "", - "extProps": {}, - "notes": {}, - "attr1": "", - "attr2": "", - "attr3": "", - "attr4": "", - "attr5": "", - "attr6": "", - "attr7": "", - "attr8": "", - "attr9": "", - "id": "C66101C8-1503-4723-B29C-FB6045C05B09", - "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" } ], "correlations": [], @@ -17041,6 +17683,464 @@ "correlations": [], "indexes": [], "type": "P" + }, + { + "id": "88A30B92-7472-485F-B03D-B44A56148679", + "env": { + "base": { + "nameSpace": "", + "codeRoot": "" + } + }, + "defKey": "expense_items_config", + "defName": "付费项配置", + "comment": "", + "properties": {}, + "sysProps": { + "nameTemplate": "{defKey}[{defName}]" + }, + "notes": {}, + "headers": [ + { + "refKey": "hideInGraph", + "hideInGraph": true + }, + { + "refKey": "defKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "type", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "len", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "scale", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defaultValue", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "defName", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "comment", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "notNull", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "primaryKey", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "autoIncrement", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "refDict", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "domain", + "freeze": false, + "hideInGraph": false + }, + { + "refKey": "isStandard", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "uiHint", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "extProps", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr1", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr2", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr3", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr4", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr5", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr6", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr7", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr8", + "freeze": false, + "hideInGraph": true + }, + { + "refKey": "attr9", + "freeze": false, + "hideInGraph": true + } + ], + "fields": [ + { + "defKey": "id", + "defName": "Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "C82B0237-CAAD-4C41-B055-4546CE7FFFCC", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "expense_item_category", + "defName": "付费项类型", + "comment": "字典代码:expense_item_category", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "C324ACC1-1C37-4417-80DE-D4966E9C9620", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231", + "extProps": {}, + "id": "5F12E77B-437A-4FA9-AD8B-344042CFE867" + }, + { + "defKey": "expense_item_name", + "defName": "付费项名称", + "comment": "expense_item_category", + "type": "VARCHAR", + "len": 255, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231", + "extProps": {}, + "id": "6F42BA48-23BB-4CC2-8CB4-CD5FAC5EBAB7" + }, + { + "defKey": "unit_price", + "defName": "单价", + "comment": "单位:元", + "type": "DECIMAL", + "len": 14, + "scale": 2, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "6B7AF037-6C79-426C-A039-74AFCC13F4EF", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "unit", + "defName": "单位", + "comment": "字典代码:unit", + "type": "VARCHAR", + "len": 64, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "BDF77943-F05E-4A19-9A9B-05383BD111E8", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "money_strategy", + "defName": "计费策略", + "comment": "字典代码:money_strategy", + "type": "VARCHAR", + "len": 32, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "BB7C150B-FA08-4943-81F5-F111371C55BC", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "DA669BFF-C15D-4843-8B03-B66257A6BA1D", + "baseType": "AA07828C-4FCB-4EDA-9B51-53A3F264F231" + }, + { + "defKey": "money_config_id", + "defName": "计费配置 Id", + "comment": "", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "3F000171-0A1E-4FA1-A9A5-D4B90C3AADD1", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "canuse", + "defName": "是否可用", + "comment": "0-->否、1-->是", + "type": "TINYINT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "1", + "hideInGraph": false, + "refDict": "", + "baseType": "9C056E28-859C-4498-9E07-63480343AFEB", + "extProps": {}, + "id": "9F1AFD62-5D02-4356-A931-6427FDB3251D" + }, + { + "defKey": "scope", + "defName": "适用范围", + "comment": "json", + "type": "TEXT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "B1BC2E92-6A75-44C0-A254-76E066047F53", + "extProps": {}, + "id": "CD18450F-AEDD-4B90-9972-573B3FC3802F" + }, + { + "defKey": "tax_rate", + "defName": "税率", + "comment": "", + "type": "DECIMAL", + "len": 6, + "scale": 3, + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0.0", + "hideInGraph": false, + "refDict": "", + "extProps": {}, + "notes": {}, + "attr1": "", + "attr2": "", + "attr3": "", + "attr4": "", + "attr5": "", + "attr6": "", + "attr7": "", + "attr8": "", + "attr9": "", + "id": "D0476DDC-4E39-4E74-823C-F507F2E06A0F", + "baseType": "9D62AB1C-F174-4A9B-83EE-B6C43AF6132A" + }, + { + "defKey": "creator_id", + "defName": "创建人 Id", + "comment": "sys_user.id", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "9CDD1D74-B95A-4E3A-B23A-7B976C09D924", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "modifier_id", + "defName": "修改人 Id", + "comment": "sys_user.id", + "type": "BIGINT", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "7AA2D9B6-54F2-4F0E-93A9-F770E4E0AF36", + "baseType": "9B6B9E10-DB11-4409-878B-5868A19CD9B0" + }, + { + "defKey": "create_time", + "defName": "创建时间", + "comment": "", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "E2C9E89F-8CEC-4561-A595-C642B155F0B5", + "baseType": "A098BA98-4957-43EE-9F06-1CDC26D370E0" + }, + { + "defKey": "modify_time", + "defName": "修改时间", + "comment": "", + "type": "DATETIME", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": true, + "refDict": "", + "extProps": {}, + "domain": "", + "id": "7FD7FFF5-133B-4E65-A805-E632127ABFA9", + "baseType": "A098BA98-4957-43EE-9F06-1CDC26D370E0" + }, + { + "defKey": "deleted", + "defName": "是否删除", + "comment": "0-->未删除、1-->已删除", + "type": "TINYINT", + "len": 1, + "scale": "", + "primaryKey": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "0", + "hideInGraph": true, + "refDict": "", + "extProps": {}, + "id": "207D522D-B379-4C84-89E9-D3FA1A342B17", + "baseType": "9C056E28-859C-4498-9E07-63480343AFEB" + } + ], + "correlations": [], + "indexes": [], + "type": "P" } ], "views": [], @@ -18062,15 +19162,15 @@ ] }, { - "defKey": "payer_category", - "defName": "支付方类型", + "defKey": "payee_payer_category", + "defName": "收、付款方类型", "sort": "", "intro": "28", "id": "0B7C7010-E933-4DAC-8407-A1DA19488998", "items": [ { - "defKey": "GeRen", - "defName": "个人", + "defKey": "ChanFei", + "defName": "产废方", "sort": "1", "parentKey": "", "intro": "", @@ -18081,8 +19181,8 @@ "id": "D37749C5-136E-45AD-84C8-A9625E1DD2D8" }, { - "defKey": "QiYe", - "defName": "企业", + "defKey": "QingYun", + "defName": "清运方", "sort": "2", "parentKey": "", "intro": "", @@ -18515,6 +19615,71 @@ "id": "2282197F-088E-44AE-B538-959878ABC17C" } ] + }, + { + "defKey": "expense_item_category", + "defName": "付费项类型", + "sort": "", + "intro": "37", + "id": "C324ACC1-1C37-4417-80DE-D4966E9C9620", + "items": [ + { + "defKey": "QiTa", + "defName": "其他", + "sort": "1", + "parentKey": "", + "intro": "", + "enabled": true, + "attr1": "", + "attr2": "", + "attr3": "", + "id": "C5D71A1B-6A12-4106-AC0D-8012858A5AA6" + }, + { + "defKey": "ChanPin", + "defName": "产品", + "sort": "2", + "parentKey": "", + "intro": "", + "enabled": true, + "attr1": "", + "attr2": "", + "attr3": "", + "id": "1ABAC54A-57BA-4518-9F92-41D8586C9509" + }, + { + "defKey": "QingYunFuWuFei", + "defName": "清运服务费", + "sort": "3", + "parentKey": "", + "intro": "", + "enabled": true, + "attr1": "", + "attr2": "", + "attr3": "", + "id": "41F2D06F-9C43-4D02-A22C-7A9A68424C0C" + }, + { + "defKey": "YunFei", + "defName": "运费", + "sort": "4", + "parentKey": "", + "intro": "", + "enabled": true, + "attr1": "", + "attr2": "", + "attr3": "", + "id": "2B1A1E95-A071-4EF7-A6F5-A994B4A0D9FA" + } + ] + }, + { + "defKey": "payment_category", + "defName": "支付方式", + "sort": "", + "intro": "", + "id": "3D821540-C228-46F6-AF13-B7818366B942", + "items": [] } ], "viewGroups": [],