Merge branch 'master' of https://git.njzscloud.com/lzq/njzscloud-dispose
commit
d529c924a3
|
|
@ -61,7 +61,7 @@ public class ${controllerClass} {
|
||||||
* 详情
|
* 详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public R<${entityClass}> detail(@RequestParam Long id) {
|
public R<${entityClass}> detail(@RequestParam("id") Long id) {
|
||||||
return R.success(${serviceInstance}.detail(id));
|
return R.success(${serviceInstance}.detail(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ var baseUrl = isBlank(prefix) ? table.name : subAfter(table.name, prefix);
|
||||||
%>
|
%>
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="${basePackage}.${moduleName}.pojo.entity.${entityClass}">
|
<mapper namespace="${basePackage}.${moduleName}.mapper.${mapperClass}">
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,25 @@ import lombok.experimental.Accessors;
|
||||||
@ToString
|
@ToString
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class Code2SessionParam {
|
public class Code2SessionParam {
|
||||||
|
/**
|
||||||
|
* 小程序 Id
|
||||||
|
*/
|
||||||
private String appid;
|
private String appid;
|
||||||
|
/**
|
||||||
|
* 小程序秘钥
|
||||||
|
*/
|
||||||
private String secret;
|
private String secret;
|
||||||
|
/**
|
||||||
|
* 授权码
|
||||||
|
*/
|
||||||
private String js_code;
|
private String js_code;
|
||||||
|
/**
|
||||||
|
* 访问令牌
|
||||||
|
*/
|
||||||
private String access_token;
|
private String access_token;
|
||||||
|
/**
|
||||||
|
* 授权方式
|
||||||
|
*/
|
||||||
private String grant_type = "authorization_code";
|
private String grant_type = "authorization_code";
|
||||||
|
|
||||||
public Code2SessionParam() {
|
public Code2SessionParam() {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
package com.njzscloud.dispose.cst.customer.controller;
|
package com.njzscloud.dispose.cst.customer.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.njzscloud.common.core.utils.R;
|
import com.njzscloud.common.core.utils.R;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.common.security.util.SecurityUtil;
|
||||||
import com.njzscloud.dispose.cst.customer.pojo.entity.CustomerEntity;
|
import com.njzscloud.dispose.cst.customer.pojo.entity.CustomerEntity;
|
||||||
|
import com.njzscloud.dispose.cst.customer.pojo.param.AddCustomerParam;
|
||||||
import com.njzscloud.dispose.cst.customer.service.CustomerService;
|
import com.njzscloud.dispose.cst.customer.service.CustomerService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -25,11 +28,20 @@ public class CustomerController {
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public R<?> add(@RequestBody CustomerEntity customerEntity) {
|
public R<?> add(@RequestBody AddCustomerParam addCustomerParam) {
|
||||||
customerService.add(customerEntity);
|
customerService.add(addCustomerParam);
|
||||||
return R.success();
|
return R.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前用户已有的身份
|
||||||
|
*/
|
||||||
|
@GetMapping("/get_user_identity")
|
||||||
|
public R<?> getUserIdentity() {
|
||||||
|
Long userId = SecurityUtil.currentUserId();
|
||||||
|
return R.success(customerService.list(Wrappers.lambdaQuery(CustomerEntity.class).eq(CustomerEntity::getUserId, userId)));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.njzscloud.dispose.cst.customer.pojo.param;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
||||||
|
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.AddOrgParam;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户信息
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class AddCustomerParam {
|
||||||
|
/**
|
||||||
|
* 用户 Id;一个用户可以有多个身份
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份类型;多个身份多条数据,PingTai-->平台、ChanFei-->产废方、QingYun-->清运方、XiaoNa-->消纳方、CaiGou-->采购方
|
||||||
|
*/
|
||||||
|
private IdentityCategory identityCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户姓名
|
||||||
|
*/
|
||||||
|
private String customerName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户联系电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结算方式,YueJie-->月结、YuE-->余额、XianFu-->现付
|
||||||
|
*/
|
||||||
|
private SettlementWay settlementWay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否管理员;是否为当前的组织管理员,0-->否、1-->是
|
||||||
|
*/
|
||||||
|
private Boolean manager;
|
||||||
|
|
||||||
|
private AddOrgParam addOrgParam;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,19 @@
|
||||||
package com.njzscloud.dispose.cst.customer.service;
|
package com.njzscloud.dispose.cst.customer.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
||||||
import com.njzscloud.dispose.cst.customer.mapper.CustomerMapper;
|
import com.njzscloud.dispose.cst.customer.mapper.CustomerMapper;
|
||||||
import com.njzscloud.dispose.cst.customer.pojo.entity.CustomerEntity;
|
import com.njzscloud.dispose.cst.customer.pojo.entity.CustomerEntity;
|
||||||
|
import com.njzscloud.dispose.cst.customer.pojo.param.AddCustomerParam;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.AddOrgParam;
|
||||||
|
import com.njzscloud.dispose.cst.org.service.OrgService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -21,12 +28,39 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class CustomerService extends ServiceImpl<CustomerMapper, CustomerEntity> implements IService<CustomerEntity> {
|
public class CustomerService extends ServiceImpl<CustomerMapper, CustomerEntity> implements IService<CustomerEntity> {
|
||||||
|
private final OrgService orgService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
public void add(CustomerEntity customerEntity) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
this.save(customerEntity);
|
public void add(AddCustomerParam addCustomerParam) {
|
||||||
|
Boolean manager = addCustomerParam.getManager();
|
||||||
|
Long orgId = null;
|
||||||
|
AddOrgParam addOrgParam = addCustomerParam.getAddOrgParam();
|
||||||
|
if (manager) {
|
||||||
|
Assert.notNull(addOrgParam, () -> Exceptions.exception("组织信息不能为空"));
|
||||||
|
orgId = orgService.add(addOrgParam);
|
||||||
|
}
|
||||||
|
IdentityCategory identityCategory = addCustomerParam.getIdentityCategory();
|
||||||
|
boolean exists = this.exists(Wrappers.lambdaQuery(CustomerEntity.class)
|
||||||
|
.eq(CustomerEntity::getUserId, addCustomerParam.getUserId())
|
||||||
|
.eq(CustomerEntity::getIdentityCategory, identityCategory)
|
||||||
|
);
|
||||||
|
Assert.isFalse(exists, () -> Exceptions.exception("当前用户已拥有身份:{}", identityCategory.getVal()));
|
||||||
|
|
||||||
|
CustomerEntity entity = BeanUtil
|
||||||
|
.copyProperties(addCustomerParam, CustomerEntity.class)
|
||||||
|
.setOrgId(orgId);
|
||||||
|
|
||||||
|
if (!manager && addOrgParam != null) {
|
||||||
|
orgId = addOrgParam.getOrgId();
|
||||||
|
if (orgId != null) {
|
||||||
|
orgService.apply(entity.getId(), orgId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.save(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.constant;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.ienum.DictStr;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典代码:apply_status
|
||||||
|
* 字典名称:状态
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public enum ApplyStatus implements DictStr {
|
||||||
|
ShenQingZhong("ShenQingZhong", "申请中"),
|
||||||
|
|
||||||
|
JuJue("JuJue", "拒绝"),
|
||||||
|
|
||||||
|
TongYi("TongYi", "同意"),
|
||||||
|
|
||||||
|
;
|
||||||
|
private final String val;
|
||||||
|
|
||||||
|
private final String txt;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.controller;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.utils.R;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgApplyEntity;
|
||||||
|
import com.njzscloud.dispose.cst.org.service.OrgApplyService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入组织申请
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/org_apply")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class OrgApplyController {
|
||||||
|
private final OrgApplyService orgApplyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> add(@RequestBody OrgApplyEntity orgApplyEntity) {
|
||||||
|
orgApplyService.add(orgApplyEntity);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/modify")
|
||||||
|
public R<?> modify(@RequestBody OrgApplyEntity orgApplyEntity) {
|
||||||
|
orgApplyService.modify(orgApplyEntity);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/del")
|
||||||
|
public R<?> del(@RequestBody List<Long> ids) {
|
||||||
|
orgApplyService.del(ids);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public R<OrgApplyEntity> detail(@RequestParam Long id) {
|
||||||
|
return R.success(orgApplyService.detail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public R<PageResult<OrgApplyEntity>> paging(PageParam pageParam, OrgApplyEntity orgApplyEntity) {
|
||||||
|
return R.success(orgApplyService.paging(pageParam, orgApplyEntity));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,8 @@ import com.njzscloud.common.core.utils.R;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.AddOrgParam;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.OrgPagingParam;
|
||||||
import com.njzscloud.dispose.cst.org.service.OrgService;
|
import com.njzscloud.dispose.cst.org.service.OrgService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -25,8 +27,8 @@ public class OrgController {
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public R<?> add(@RequestBody OrgEntity orgEntity) {
|
public R<?> add(@RequestBody AddOrgParam addOrgParam) {
|
||||||
orgService.add(orgEntity);
|
orgService.add(addOrgParam);
|
||||||
return R.success();
|
return R.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,15 +54,45 @@ public class OrgController {
|
||||||
* 详情
|
* 详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public R<OrgEntity> detail(@RequestParam Long id) {
|
public R<OrgEntity> detail(@RequestParam("id") Long id) {
|
||||||
return R.success(orgService.detail(id));
|
return R.success(orgService.detail(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请加入企业
|
||||||
|
*/
|
||||||
|
@GetMapping("/apply")
|
||||||
|
public R<?> apply(@RequestParam("customerId") Long customerId,
|
||||||
|
@RequestParam("orgId") Long orgId) {
|
||||||
|
orgService.apply(customerId, orgId);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退出企业
|
||||||
|
*/
|
||||||
|
@GetMapping("/quit")
|
||||||
|
public R<?> quit(@RequestParam("id") Long customerId) {
|
||||||
|
orgService.quit(customerId);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同意/拒绝申请
|
||||||
|
*/
|
||||||
|
@GetMapping("/agree")
|
||||||
|
public R<?> agree(@RequestParam("id") Long id,
|
||||||
|
@RequestParam("isAgree") Boolean isAgree,
|
||||||
|
@RequestParam("cause") String cause) {
|
||||||
|
orgService.agree(id, isAgree, cause);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
@GetMapping("/paging")
|
@GetMapping("/paging")
|
||||||
public R<PageResult<OrgEntity>> paging(PageParam pageParam, OrgEntity orgEntity) {
|
public R<PageResult<OrgEntity>> paging(PageParam pageParam, OrgPagingParam orgPagingParam) {
|
||||||
return R.success(orgService.paging(pageParam, orgEntity));
|
return R.success(orgService.paging(pageParam, orgPagingParam));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgApplyEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入组织申请
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OrgApplyMapper extends BaseMapper<OrgApplyEntity> {
|
||||||
|
}
|
||||||
|
|
@ -3,10 +3,14 @@ package com.njzscloud.dispose.cst.org.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织信息
|
* 组织信息
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface OrgMapper extends BaseMapper<OrgEntity> {
|
public interface OrgMapper extends BaseMapper<OrgEntity> {
|
||||||
|
boolean admitCustomer(@Param("orgId") Long orgId, @Param("customerId") Long customerId);
|
||||||
|
|
||||||
|
boolean quitOrg(@Param("customerId") Long customerId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.pojo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.njzscloud.dispose.cst.org.constant.ApplyStatus;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入组织申请
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("cst_org_apply")
|
||||||
|
public class OrgApplyEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请人 Id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入的组织 Id
|
||||||
|
*/
|
||||||
|
private Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime applyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,ShenQingZhong-->申请中、JuJue-->拒绝、TongYi-->同意
|
||||||
|
*/
|
||||||
|
private ApplyStatus applyStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒绝原因
|
||||||
|
*/
|
||||||
|
private String cause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.pojo.param;
|
||||||
|
|
||||||
|
import com.njzscloud.dispose.cst.org.constant.OrgCategory;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织信息
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class AddOrgParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织 Id,加入企业时必填
|
||||||
|
*/
|
||||||
|
Long orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主体类型,GeTiHu-->个体户、QiYe-->企业
|
||||||
|
*/
|
||||||
|
private OrgCategory orgCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码
|
||||||
|
*/
|
||||||
|
private String uscc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织名称
|
||||||
|
*/
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照
|
||||||
|
*/
|
||||||
|
private String businessLicense;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照有效期
|
||||||
|
*/
|
||||||
|
private LocalDateTime licenseStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照有效期
|
||||||
|
*/
|
||||||
|
private LocalDateTime licenseEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人名称
|
||||||
|
*/
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人身份证号
|
||||||
|
*/
|
||||||
|
private String idcard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人身份证有效期
|
||||||
|
*/
|
||||||
|
private LocalDateTime idcardStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人身份证有效期
|
||||||
|
*/
|
||||||
|
private LocalDateTime idcardEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人身份证正面
|
||||||
|
*/
|
||||||
|
private String idcardFront;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法人身份证反面
|
||||||
|
*/
|
||||||
|
private String idcardBack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;代码
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;代码
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;代码
|
||||||
|
*/
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;代码
|
||||||
|
*/
|
||||||
|
private String town;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省;名称
|
||||||
|
*/
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市;名称
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区县;名称
|
||||||
|
*/
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡镇街道;名称
|
||||||
|
*/
|
||||||
|
private String townName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private Double lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private Double lat;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class OrgPagingParam {
|
||||||
|
/**
|
||||||
|
* 统一社会信用代码/组织名称/法人名称
|
||||||
|
*/
|
||||||
|
private String keywords;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.njzscloud.dispose.cst.org.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.dispose.cst.org.mapper.OrgApplyMapper;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgApplyEntity;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入组织申请
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class OrgApplyService extends ServiceImpl<OrgApplyMapper, OrgApplyEntity> implements IService<OrgApplyEntity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
public void add(OrgApplyEntity orgApplyEntity) {
|
||||||
|
this.save(orgApplyEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
public void modify(OrgApplyEntity orgApplyEntity) {
|
||||||
|
this.updateById(orgApplyEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void del(List<Long> ids) {
|
||||||
|
this.removeBatchByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
public OrgApplyEntity detail(Long id) {
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
public PageResult<OrgApplyEntity> paging(PageParam pageParam, OrgApplyEntity orgApplyEntity) {
|
||||||
|
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OrgApplyEntity>query(orgApplyEntity)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,17 +1,26 @@
|
||||||
package com.njzscloud.dispose.cst.org.service;
|
package com.njzscloud.dispose.cst.org.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.dispose.cst.org.constant.ApplyStatus;
|
||||||
import com.njzscloud.dispose.cst.org.mapper.OrgMapper;
|
import com.njzscloud.dispose.cst.org.mapper.OrgMapper;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgApplyEntity;
|
||||||
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
import com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.AddOrgParam;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.OrgPagingParam;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -21,12 +30,23 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class OrgService extends ServiceImpl<OrgMapper, OrgEntity> implements IService<OrgEntity> {
|
public class OrgService extends ServiceImpl<OrgMapper, OrgEntity> implements IService<OrgEntity> {
|
||||||
|
private final OrgApplyService orgApplyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*/
|
*/
|
||||||
public void add(OrgEntity orgEntity) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
this.save(orgEntity);
|
public Long add(AddOrgParam addOrgParam) {
|
||||||
|
String uscc = addOrgParam.getUscc();
|
||||||
|
String orgName = addOrgParam.getOrgName();
|
||||||
|
boolean exists = this.exists(Wrappers.lambdaQuery(OrgEntity.class)
|
||||||
|
.eq(OrgEntity::getUscc, uscc)
|
||||||
|
.eq(OrgEntity::getOrgName, orgName)
|
||||||
|
);
|
||||||
|
Assert.isFalse(exists, () -> Exceptions.exception("当前组织已存在,组织名称:{},统一社会信用代码:{}", orgName, uscc));
|
||||||
|
OrgEntity entity = BeanUtil.copyProperties(addOrgParam, OrgEntity.class);
|
||||||
|
this.save(entity);
|
||||||
|
return entity.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,7 +74,59 @@ public class OrgService extends ServiceImpl<OrgMapper, OrgEntity> implements ISe
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
*/
|
*/
|
||||||
public PageResult<OrgEntity> paging(PageParam pageParam, OrgEntity orgEntity) {
|
public PageResult<OrgEntity> paging(PageParam pageParam, OrgPagingParam orgPagingParam) {
|
||||||
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OrgEntity>query(orgEntity)));
|
String keywords = orgPagingParam.getKeywords();
|
||||||
|
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OrgEntity>lambdaQuery()
|
||||||
|
.and(StrUtil.isNotBlank(keywords), it ->
|
||||||
|
it.like(OrgEntity::getUscc, keywords)
|
||||||
|
.or().like(OrgEntity::getOrgName, keywords)
|
||||||
|
.or().like(OrgEntity::getLegalRepresentative, keywords)
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void apply(Long customerId, Long orgId) {
|
||||||
|
boolean exists = orgApplyService.exists(Wrappers.lambdaQuery(OrgApplyEntity.class)
|
||||||
|
.in(OrgApplyEntity::getApplyStatus, ApplyStatus.ShenQingZhong, ApplyStatus.TongYi)
|
||||||
|
.eq(OrgApplyEntity::getCustomerId, customerId)
|
||||||
|
.eq(OrgApplyEntity::getOrgId, orgId)
|
||||||
|
);
|
||||||
|
Assert.isFalse(exists, () -> Exceptions.exception("已向组织发起申请,无需重复提交"));
|
||||||
|
orgApplyService.add(new OrgApplyEntity()
|
||||||
|
.setApplyStatus(ApplyStatus.ShenQingZhong)
|
||||||
|
.setApplyTime(LocalDateTime.now())
|
||||||
|
.setCustomerId(customerId)
|
||||||
|
.setOrgId(orgId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void quit(Long customerId) {
|
||||||
|
boolean result = baseMapper.quitOrg(customerId);
|
||||||
|
Assert.isTrue(result, () -> Exceptions.exception("未加入企业,无需操作"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void agree(Long id, boolean isAgree, String cause) {
|
||||||
|
OrgApplyEntity applyInfo = orgApplyService.getById(id);
|
||||||
|
Assert.notNull(applyInfo, () -> Exceptions.exception("未查询到申请信息"));
|
||||||
|
ApplyStatus oldApplyStatus = applyInfo.getApplyStatus();
|
||||||
|
Assert.isTrue(oldApplyStatus == ApplyStatus.ShenQingZhong, () -> Exceptions.exception("{}的申请,无需操作", oldApplyStatus.getTxt()));
|
||||||
|
ApplyStatus applyStatus;
|
||||||
|
if (isAgree) {
|
||||||
|
Long customerId = applyInfo.getCustomerId();
|
||||||
|
Long orgId = applyInfo.getOrgId();
|
||||||
|
boolean result = baseMapper.admitCustomer(orgId, customerId);
|
||||||
|
Assert.isTrue(result, () -> Exceptions.exception("当前客户未退出原有的组织"));
|
||||||
|
applyStatus = ApplyStatus.TongYi;
|
||||||
|
} else {
|
||||||
|
applyStatus = ApplyStatus.JuJue;
|
||||||
|
}
|
||||||
|
orgApplyService.updateById(new OrgApplyEntity()
|
||||||
|
.setId(id)
|
||||||
|
.setApplyStatus(applyStatus)
|
||||||
|
.setCause(cause)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.njzscloud.common.security.support.UserDetail;
|
import com.njzscloud.common.security.support.UserDetail;
|
||||||
|
import com.njzscloud.dispose.sys.role.pojo.entity.RoleEntity;
|
||||||
import com.njzscloud.dispose.sys.user.pojo.entity.UserEntity;
|
import com.njzscloud.dispose.sys.user.pojo.entity.UserEntity;
|
||||||
import com.njzscloud.dispose.sys.user.pojo.result.UserDetailResult;
|
import com.njzscloud.dispose.sys.user.pojo.result.UserDetailResult;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -26,4 +27,6 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
||||||
IPage<UserDetailResult> paging(IPage<UserDetailResult> page, @Param(Constants.WRAPPER) Wrapper<UserDetailResult> ew);
|
IPage<UserDetailResult> paging(IPage<UserDetailResult> page, @Param(Constants.WRAPPER) Wrapper<UserDetailResult> ew);
|
||||||
|
|
||||||
UserDetail selectUser(@Param("userId") Long userId);
|
UserDetail selectUser(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
RoleEntity getRole(@Param("roleCode") String roleCode);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.njzscloud.common.mvc.validator.Constrained;
|
||||||
import com.njzscloud.common.mvc.validator.Constraint;
|
import com.njzscloud.common.mvc.validator.Constraint;
|
||||||
import com.njzscloud.common.mvc.validator.ValidRule;
|
import com.njzscloud.common.mvc.validator.ValidRule;
|
||||||
import com.njzscloud.common.security.contant.AuthWay;
|
import com.njzscloud.common.security.contant.AuthWay;
|
||||||
|
import com.njzscloud.common.security.contant.ClientCode;
|
||||||
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
import com.njzscloud.dispose.cst.customer.constant.IdentityCategory;
|
||||||
import com.njzscloud.dispose.cst.org.constant.OrgCategory;
|
import com.njzscloud.dispose.cst.org.constant.OrgCategory;
|
||||||
import com.njzscloud.dispose.sys.user.constant.Gender;
|
import com.njzscloud.dispose.sys.user.constant.Gender;
|
||||||
|
|
@ -55,13 +56,12 @@ public class UserRegisterParam implements Constrained {
|
||||||
/**
|
/**
|
||||||
* 客户信息
|
* 客户信息
|
||||||
*/
|
*/
|
||||||
@Valid
|
@NotNull(message = "客户信息不能为空")
|
||||||
private Customer customer;
|
private Customer customer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组织信息
|
* 组织信息
|
||||||
*/
|
*/
|
||||||
@Valid
|
|
||||||
private Org org;
|
private Org org;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -74,6 +74,7 @@ public class UserRegisterParam implements Constrained {
|
||||||
return new ValidRule[]{
|
return new ValidRule[]{
|
||||||
ValidRule.of(() -> StrUtil.isNotBlank(nickname), "用户昵称不能为空"),
|
ValidRule.of(() -> StrUtil.isNotBlank(nickname), "用户昵称不能为空"),
|
||||||
ValidRule.of(() -> account != null, "账号信息不能为空"),
|
ValidRule.of(() -> account != null, "账号信息不能为空"),
|
||||||
|
ValidRule.of(() -> !customer.getManager() || org != null, "组织信息不能为空"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,27 +102,19 @@ public class UserRegisterParam implements Constrained {
|
||||||
/**
|
/**
|
||||||
* 微信 openid
|
* 微信 openid
|
||||||
*/
|
*/
|
||||||
private String wechatOpenid;
|
private String wechatCode;
|
||||||
/**
|
|
||||||
* 微信 unionid
|
|
||||||
*/
|
|
||||||
private String wechatUnionid;
|
|
||||||
/**
|
/**
|
||||||
* 允许登录的客户端; 字典代码:client_code
|
* 允许登录的客户端; 字典代码:client_code
|
||||||
*/
|
*/
|
||||||
private Integer clientCode;
|
private ClientCode clientCode;
|
||||||
/**
|
|
||||||
* 是否禁用; 0-->启用、1-->禁用
|
|
||||||
*/
|
|
||||||
private Boolean disabled;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValidRule[] rules() {
|
public ValidRule[] rules() {
|
||||||
return new ValidRule[]{
|
return new ValidRule[]{
|
||||||
ValidRule.of(() -> (StrUtil.isNotBlank(username) && StrUtil.isNotBlank(secret))
|
ValidRule.of(() -> (StrUtil.isNotBlank(username) && StrUtil.isNotBlank(secret))
|
||||||
|| (StrUtil.isNotBlank(phone) && StrUtil.isNotBlank(secret))
|
|| (StrUtil.isNotBlank(phone) && StrUtil.isNotBlank(secret))
|
||||||
|| StrUtil.isNotBlank(wechatOpenid), "账号信息不能为空"),
|
|| StrUtil.isNotBlank(wechatCode), "账号信息不能为空"),
|
||||||
|
ValidRule.of(() -> clientCode != null, "客户端信息不能为空"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,6 +125,7 @@ public class UserRegisterParam implements Constrained {
|
||||||
@Constraint
|
@Constraint
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public static class Customer {
|
public static class Customer {
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 身份类型;多个身份多条数据,ChanFei-->产废方、YunShu-->运输方、CaiGou-->采购方、SiJi-->司机
|
* 身份类型;多个身份多条数据,ChanFei-->产废方、YunShu-->运输方、CaiGou-->采购方、SiJi-->司机
|
||||||
|
|
@ -169,6 +163,11 @@ public class UserRegisterParam implements Constrained {
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public static class Org {
|
public static class Org {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织 Id,加入企业时必填
|
||||||
|
*/
|
||||||
|
Long orgId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主体类型,GeTiHu-->个体户、QiYe-->企业
|
* 主体类型,GeTiHu-->个体户、QiYe-->企业
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,14 @@ import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.common.security.support.UserDetail;
|
import com.njzscloud.common.security.support.UserDetail;
|
||||||
import com.njzscloud.common.security.util.EncryptUtil;
|
import com.njzscloud.common.security.util.EncryptUtil;
|
||||||
import com.njzscloud.common.security.util.SecurityUtil;
|
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.dispose.cst.customer.constant.IdentityCategory;
|
||||||
|
import com.njzscloud.dispose.cst.customer.pojo.param.AddCustomerParam;
|
||||||
|
import com.njzscloud.dispose.cst.customer.service.CustomerService;
|
||||||
|
import com.njzscloud.dispose.cst.org.pojo.param.AddOrgParam;
|
||||||
|
import com.njzscloud.dispose.sys.role.pojo.entity.RoleEntity;
|
||||||
import com.njzscloud.dispose.sys.role.pojo.result.RoleDetailResult;
|
import com.njzscloud.dispose.sys.role.pojo.result.RoleDetailResult;
|
||||||
import com.njzscloud.dispose.sys.user.constant.Gender;
|
import com.njzscloud.dispose.sys.user.constant.Gender;
|
||||||
import com.njzscloud.dispose.sys.user.mapper.UserMapper;
|
import com.njzscloud.dispose.sys.user.mapper.UserMapper;
|
||||||
|
|
@ -27,6 +35,7 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -42,6 +51,7 @@ import static com.njzscloud.dispose.event.SysMittEvent.COERCE_LOGOUT;
|
||||||
public class UserService extends ServiceImpl<UserMapper, UserEntity> implements IService<UserEntity> {
|
public class UserService extends ServiceImpl<UserMapper, UserEntity> implements IService<UserEntity> {
|
||||||
private final UserAccountService userAccountService;
|
private final UserAccountService userAccountService;
|
||||||
private final UserRoleService userRoleService;
|
private final UserRoleService userRoleService;
|
||||||
|
private final CustomerService customerService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
|
@ -133,9 +143,37 @@ public class UserService extends ServiceImpl<UserMapper, UserEntity> implements
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public UserDetail register(UserRegisterParam userRegisterParam) {
|
public UserDetail register(UserRegisterParam userRegisterParam) {
|
||||||
AddUserParam addUserParam = BeanUtil.copyProperties(userRegisterParam, AddUserParam.class);
|
UserRegisterParam.Account account = userRegisterParam.getAccount();
|
||||||
addUserParam.setAccount(BeanUtil.copyProperties(userRegisterParam.getAccount(), AddUserAccountParam.class));
|
AddUserAccountParam addUserAccountParam = BeanUtil.copyProperties(account, AddUserAccountParam.class);
|
||||||
|
String wechatCode = account.getWechatCode();
|
||||||
|
if (StrUtil.isNotBlank(wechatCode)) {
|
||||||
|
Code2SessionResult code2SessionResult = WechatUtil.code2Session(new Code2SessionParam().setJs_code(wechatCode));
|
||||||
|
Assert.isTrue(code2SessionResult.isSucc(), () -> Exceptions.exception("微信校验失败"));
|
||||||
|
addUserAccountParam.setWechatOpenid(code2SessionResult.getOpenid())
|
||||||
|
.setWechatUnionid(code2SessionResult.getUnionid())
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddUserParam addUserParam = BeanUtil
|
||||||
|
.copyProperties(userRegisterParam, AddUserParam.class)
|
||||||
|
.setAccount(addUserAccountParam);
|
||||||
|
|
||||||
|
UserRegisterParam.Customer customer = userRegisterParam.getCustomer();
|
||||||
|
IdentityCategory identityCategory = customer.getIdentityCategory();
|
||||||
|
|
||||||
|
RoleEntity role = baseMapper.getRole("ROLE_" + identityCategory.getVal());
|
||||||
|
if (role != null) {
|
||||||
|
HashSet<Long> roles = new HashSet<>();
|
||||||
|
roles.add(role.getId());
|
||||||
|
addUserParam.setRoles(roles);
|
||||||
|
}
|
||||||
|
|
||||||
Long userId = this.add(addUserParam);
|
Long userId = this.add(addUserParam);
|
||||||
|
|
||||||
|
customer.setUserId(userId);
|
||||||
|
UserRegisterParam.Org org = userRegisterParam.getOrg();
|
||||||
|
customerService.add(BeanUtil.copyProperties(customer, AddCustomerParam.class)
|
||||||
|
.setAddOrgParam(BeanUtil.copyProperties(org, AddOrgParam.class)));
|
||||||
List<RoleDetailResult> roleDetailResults = userRoleService.listRole(userId);
|
List<RoleDetailResult> roleDetailResults = userRoleService.listRole(userId);
|
||||||
UserDetail userDetail = baseMapper.selectUser(userId)
|
UserDetail userDetail = baseMapper.selectUser(userId)
|
||||||
.setAuthWay(userRegisterParam.getAuthWay())
|
.setAuthWay(userRegisterParam.getAuthWay())
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njzscloud.dispose.cst.org.mapper.OrgApplyMapper">
|
||||||
|
</mapper>
|
||||||
|
|
@ -1,4 +1,18 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.njzscloud.dispose.cst.org.pojo.entity.OrgEntity">
|
<mapper namespace="com.njzscloud.dispose.cst.org.mapper.OrgMapper">
|
||||||
|
<update id="admitCustomer">
|
||||||
|
UPDATE cst_customer
|
||||||
|
SET org_id = #{orgId}
|
||||||
|
WHERE id = #{customerId}
|
||||||
|
AND org_id IS NULL
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="quitOrg">
|
||||||
|
UPDATE cst_customer
|
||||||
|
SET org_id = NULL
|
||||||
|
WHERE id = #{customerId}
|
||||||
|
AND org_id IS NOT NULL
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.auth.mapper.AuthMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.auth.mapper.AuthMapper">
|
||||||
<resultMap id="selectUserMap" autoMapping="true" type="com.njzscloud.dispose.sys.auth.pojo.result.MyResult">
|
<resultMap id="selectUserMap" autoMapping="true" type="com.njzscloud.dispose.sys.auth.pojo.result.MyResult">
|
||||||
<result property="accountId" column="account_id"/>
|
<result property="accountId" column="account_id"/>
|
||||||
<result property="userId" column="user_id"/>
|
<result property="userId" column="user_id"/>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.endpoint.mapper.EndpointMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.endpoint.mapper.EndpointMapper">
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.menu.mapper.MenuMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.menu.mapper.MenuMapper">
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.resource.mapper.ResourceMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.resource.mapper.ResourceMapper">
|
||||||
<select id="occupied" resultType="java.lang.String">
|
<select id="occupied" resultType="java.lang.String">
|
||||||
SELECT DISTINCT c.role_name
|
SELECT DISTINCT c.role_name
|
||||||
FROM sys_resource a
|
FROM sys_resource a
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.role.mapper.RoleMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.role.mapper.RoleMapper">
|
||||||
|
|
||||||
<select id="paging" resultType="com.njzscloud.dispose.sys.role.pojo.entity.RoleEntity">
|
<select id="paging" resultType="com.njzscloud.dispose.sys.role.pojo.entity.RoleEntity">
|
||||||
SELECT id,
|
SELECT id,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.task.mapper.TaskMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.task.mapper.TaskMapper">
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.user.mapper.SysUserRoleMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.user.mapper.SysUserRoleMapper">
|
||||||
|
|
||||||
<select id="listRole" resultType="com.njzscloud.dispose.sys.role.pojo.result.RoleDetailResult">
|
<select id="listRole" resultType="com.njzscloud.dispose.sys.role.pojo.result.RoleDetailResult">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
<mapper namespace="com.njzscloud.supervisory.sys.user.mapper.UserMapper">
|
<mapper namespace="com.njzscloud.dispose.sys.user.mapper.UserMapper">
|
||||||
|
|
||||||
<resultMap id="pagingResultMap" autoMapping="true" type="com.njzscloud.dispose.sys.user.pojo.result.UserDetailResult">
|
<resultMap id="pagingResultMap" autoMapping="true" type="com.njzscloud.dispose.sys.user.pojo.result.UserDetailResult">
|
||||||
<id column="id" property="id"/>
|
<id column="id" property="id"/>
|
||||||
|
|
@ -45,4 +45,9 @@
|
||||||
INNER JOIN sys_user b ON a.user_id = b.id AND b.id = #{userId} AND b.deleted = 0
|
INNER JOIN sys_user b ON a.user_id = b.id AND b.id = #{userId} AND b.deleted = 0
|
||||||
WHERE a.deleted = 0
|
WHERE a.deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getRole" resultType="com.njzscloud.dispose.sys.role.pojo.entity.RoleEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_role
|
||||||
|
WHERE role_code = #{roleCode}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"driverFiles": "mysql-connector-j-8.3.0.jar",
|
"driverFiles": "mysql-connector-j-8.3.0.jar",
|
||||||
"jdbcReferDriver": "com.mysql.cj.jdbc.Driver",
|
"jdbcReferDriver": "com.mysql.cj.jdbc.Driver",
|
||||||
"jdbcReferUrl": "jdbc:mysql://[ip]:[port]/[dbname]?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC",
|
"jdbcReferUrl": "jdbc:mysql://[ip]:[port]/[dbname]?characterEncoding=UTF-8&useSSL=false&useUnicode=true&serverTimezone=UTC",
|
||||||
"tableCreate": "{{\r\n function getDict(dictItems) {\r\n if(dictItems == null || dictItems.length <= 0) {\r\n return '';\r\n }\r\n return ',' + dictItems.map(it => it.itemKey + '-->' + it.itemName).join('、');\r\n }\r\n \r\n let tableComment = (it.intro != null && it.intro.length > 0)? (it.defName + ';' + it.intro) : it.defName;\r\n}}\r\nDROP TABLE IF EXISTS {{=it.defKey}};\r\nCREATE TABLE {{=it.defKey}}\r\n(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{=field.dbDataType}}{{?field.dataLen>0}}{{='('}}{{=field.dataLen}}{{?field.numScale>0}}{{=','}}{{=field.numScale}}{{?}}{{=')'}}{{?}} {{= field.defaultValue ? 'DEFAULT' + ' ' + field.defaultValue : '' }} {{= field.notNull ? 'NOT NULL' : 'NULL' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} COMMENT '{{=field.intro ? field.defName + ';' + field.intro : field.defName}}{{=getDict(field.dictItems)}}'{{= index < it.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}{{~}}\r\n{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci \r\n COMMENT = '{{=tableComment}}';\r\n$blankline",
|
"tableCreate": "{{\r\n function getDict(dictItems) {\r\n if(dictItems == null || dictItems.length <= 0) {\r\n return '';\r\n }\r\n return ',' + dictItems.map(it => it.itemKey + '-->' + it.itemName).join('、');\r\n }\r\n \r\n let tableComment = (it.intro != null && it.intro.length > 0)? (it.defName + ';' + it.intro) : it.defName;\r\n}}DROP TABLE IF EXISTS {{=it.defKey}};\r\nCREATE TABLE {{=it.defKey}}\r\n(\r\n{{ pkList = [] ; }}\r\n{{~it.fields:field:index}}\r\n {{? field.primaryKey }}{{ pkList.push(field.defKey) }}{{?}}\r\n {{=field.defKey}} {{=field.dbDataType}}{{?field.dataLen>0}}{{='('}}{{=field.dataLen}}{{?field.numScale>0}}{{=','}}{{=field.numScale}}{{?}}{{=')'}}{{?}} {{= field.defaultValue ? 'DEFAULT' + ' ' + field.defaultValue : '' }} {{= field.notNull ? 'NOT NULL' : 'NULL' }} {{= field.autoIncrement ? 'AUTO_INCREMENT' : '' }} COMMENT '{{=field.intro ? field.defName + ';' + field.intro : field.defName}}{{=getDict(field.dictItems)}}'{{= index < it.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}{{~}}\r\n{{? pkList.length >0 }}\r\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i<pkList.length-1 ? ',' : '' }}{{~}})\r\n{{?}}\r\n) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci \r\n COMMENT = '{{=tableComment}}';\r\n$blankline",
|
||||||
"tableUpdate": "{{\n let defKey = it.baseUpdate.next.defKey||'';\n let defName = it.baseUpdate.next.defName||'';\n let intro = it.baseUpdate.next.intro;\n let indexFields = it.indexFields;\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\n}}\n{{? isPrimaryKeyModified }}\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\n{{? indexFields && indexFields.length > 0}}\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}`{{= field.defKey }}`{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\n{{?}}\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}ALTER TABLE {{= tableKey }} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= schemaName }}{{=it.defKey}} RENAME TO {{= schemaName }}{{=defKey}};{{?}}\n",
|
"tableUpdate": "{{\n let defKey = it.baseUpdate.next.defKey||'';\n let defName = it.baseUpdate.next.defName||'';\n let intro = it.baseUpdate.next.intro;\n let indexFields = it.indexFields;\n let isPrimaryKeyModified = it.isPrimaryKeyModified;\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n const updateKeys = it?.baseUpdate?.updateKeys?.split(\",\") || [];\n}}\n{{? isPrimaryKeyModified }}\nALTER TABLE {{= tableKey }} DROP PRIMARY KEY;\n{{? indexFields && indexFields.length > 0}}\nALTER TABLE {{= tableKey }} ADD PRIMARY KEY ({{~indexFields:field:i}}`{{= field.defKey }}`{{= i < indexFields.length-1 ? ',' : '' }}{{~}});\n{{?}}\n{{?}}\n{{? updateKeys.some((item) => item === 'defName' || item === 'intro') }}ALTER TABLE {{= tableKey }} COMMENT '{{=it.func.strJoin(defName, intro, \";\", true)}}'; {{?}}\n{{? updateKeys.some((item) => item === 'defKey') }}ALTER TABLE {{= schemaName }}{{=it.defKey}} RENAME TO {{= schemaName }}{{=defKey}};{{?}}\n",
|
||||||
"tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};",
|
"tableDelete": "{{\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\n const tableKey = `${schemaName}${it.defKey}`;\n}}\nDROP TABLE IF EXISTS {{= tableKey }};",
|
||||||
"columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, dbDataType, primaryKey } = field;\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return ` DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return ` DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN `{{=field.defKey}}` {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{= computeDefaultValue(field)}} {{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{~}}\r\n",
|
"columnCreate": "{{\r\n let fieldsUpdate = it.fieldsUpdate;\r\n const computeLenAndNum = (dataLen, numScale, maxDataLen, maxNumScale) => {\r\n if(!dataLen || dataLen <= 0) {\r\n return '';\r\n }\r\n let currentDataLen = dataLen, currentNumScale = numScale;\r\n if(dataLen >= maxDataLen) {\r\n currentDataLen = maxDataLen;\r\n }\r\n if(!numScale || numScale <= 0) {\r\n return `(${currentDataLen},0)`;\r\n }\r\n if(currentNumScale > maxNumScale) {\r\n currentNumScale = maxNumScale\r\n }\r\n if(currentNumScale > currentDataLen && currentDataLen <= maxNumScale) {\r\n currentNumScale = currentDataLen;\r\n }\r\n return `(${currentDataLen},${currentNumScale})`;\r\n };\r\n const computeDefaultValue = (field) => {\r\n const { defaultValue, dbDataType, primaryKey } = field;\r\n if(!defaultValue) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase().endsWith('BLOB') || \r\n dbDataType.toUpperCase().endsWith('GEOMETRY') || \r\n dbDataType.toUpperCase().endsWith('TEXT') || \r\n dbDataType.toUpperCase().endsWith('JSON')) {\r\n return '';\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET') {\r\n return ` DEFAULT \"${defaultValue}\"`;\r\n } else {\r\n return ` DEFAULT ${defaultValue}`;\r\n }\r\n };\r\n const computeDatatype = (field) => {\r\n const { dbDataType, dataLen, numScale, defaultValue } = field;\r\n if(!dbDataType) {\r\n return '';\r\n }\r\n if(dbDataType.toUpperCase() === 'VARCHAR' ||\r\n dbDataType.toUpperCase() === 'NVARCHAR' ||\r\n dbDataType.toUpperCase() === 'VARBINARY') {\r\n return `${dbDataType}(${dataLen ? dataLen : 128})`;\r\n } else if(dbDataType.toUpperCase() === 'DATE' ||\r\n dbDataType.toUpperCase() === 'YEAR' ||\r\n dbDataType.toUpperCase() === 'TINYTEXT' ||\r\n dbDataType.toUpperCase() === 'MEDIUMTEXT' ||\r\n dbDataType.toUpperCase() === 'LONGTEXT' ||\r\n dbDataType.toUpperCase() === 'TINYBLOB' ||\r\n dbDataType.toUpperCase() === 'MEDIUMBLOB' ||\r\n dbDataType.toUpperCase() === 'LONGBLOB' ||\r\n dbDataType.toUpperCase() === 'BOOLEAN' ||\r\n dbDataType.toUpperCase() === 'FLOAT' ||\r\n dbDataType.toUpperCase() === 'INT' ||\r\n dbDataType.toUpperCase() === 'JSON' ) {\r\n return dbDataType;\r\n } else if(dbDataType.toUpperCase() === 'ENUM' ||\r\n dbDataType.toUpperCase() === 'SET' ) {\r\n return `${dbDataType}(${defaultValue})`;\r\n } else if(dbDataType.toUpperCase() === 'TIME' ||\r\n dbDataType.toUpperCase() === 'DATETIME' ||\r\n dbDataType.toUpperCase() === 'TIMESTAMP') {\r\n return `${dbDataType}${(dataLen && dataLen >= 0 && dataLen <= 6) ? `(${dataLen})` : ''}`;\r\n } else if(dbDataType.toUpperCase() === 'DOUBLE') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 255, 30)}`;\r\n } else if(dbDataType.toUpperCase() === 'DECIMAL') {\r\n return `${dbDataType}${computeLenAndNum(dataLen, numScale, 65, 30)}`;\r\n } else if(dataLen && dataLen > 0) {\r\n return `${dbDataType}(${dataLen})`;\r\n }\r\n return `${dbDataType}`;\r\n };\r\n let schemaName = it.schemaName ? `${it.schemaName}.` : '';\r\n const tableKey = `${schemaName}${it.defKey}`;\r\n}}\r\n{{~fieldsUpdate:field:index}}\r\nALTER TABLE {{= tableKey }} ADD COLUMN `{{=field.defKey}}` {{=computeDatatype(field)}} {{= field.notNull ? 'NOT NULL' : '' }}{{= field.autoIncrement ? ' AUTO_INCREMENT ' : '' }}{{= computeDefaultValue(field)}} {{? field.defName || field.intro }} COMMENT '{{=it.func.strJoin(field.defName, field.intro, \";\", true)}}'{{?}};\r\n{{~}}\r\n",
|
||||||
|
|
@ -3314,54 +3314,59 @@
|
||||||
"orderValue": 1
|
"orderValue": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "DECB0762-9BE3-429A-81F7-891B7C960B04",
|
"refObjectId": "1DF0083F-E75C-45CA-BCCF-62018CC23FC3",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 2
|
"orderValue": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "167D299F-EC34-4B05-97F9-C2A0F2CD034E",
|
"refObjectId": "DECB0762-9BE3-429A-81F7-891B7C960B04",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 3
|
"orderValue": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "DF643AC9-1A78-408B-9F20-9C659BC475FA",
|
"refObjectId": "167D299F-EC34-4B05-97F9-C2A0F2CD034E",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 4
|
"orderValue": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "718C57B0-4799-48E1-8651-57527A3BFF8B",
|
"refObjectId": "DF643AC9-1A78-408B-9F20-9C659BC475FA",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 5
|
"orderValue": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "3A0C2179-8576-40CB-8A4D-647318E432BC",
|
"refObjectId": "718C57B0-4799-48E1-8651-57527A3BFF8B",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 6
|
"orderValue": 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "F13139EC-3554-4C1E-8C09-1A6C238C539A",
|
"refObjectId": "3A0C2179-8576-40CB-8A4D-647318E432BC",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 7
|
"orderValue": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "F573B178-BE6E-48AB-8AF0-6121E7320EB9",
|
"refObjectId": "F13139EC-3554-4C1E-8C09-1A6C238C539A",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 8
|
"orderValue": 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "14DAB3C1-5814-401B-AC62-E15036FE31F6",
|
"refObjectId": "F573B178-BE6E-48AB-8AF0-6121E7320EB9",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 9
|
"orderValue": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "38B910DC-4D79-448E-9EA4-CED1E92B03DE",
|
"refObjectId": "14DAB3C1-5814-401B-AC62-E15036FE31F6",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 10
|
"orderValue": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"refObjectId": "6817DD07-3355-4E35-924A-F383FEF78E86",
|
"refObjectId": "38B910DC-4D79-448E-9EA4-CED1E92B03DE",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 11
|
"orderValue": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refObjectId": "6817DD07-3355-4E35-924A-F383FEF78E86",
|
||||||
|
"refObjectType": "P",
|
||||||
|
"orderValue": 12
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"diagramRefs": [],
|
"diagramRefs": [],
|
||||||
|
|
@ -3694,6 +3699,11 @@
|
||||||
"refObjectId": "3A0C2179-8576-40CB-8A4D-647318E432BC",
|
"refObjectId": "3A0C2179-8576-40CB-8A4D-647318E432BC",
|
||||||
"refObjectType": "P",
|
"refObjectType": "P",
|
||||||
"orderValue": 65
|
"orderValue": 65
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"refObjectId": "1DF0083F-E75C-45CA-BCCF-62018CC23FC3",
|
||||||
|
"refObjectType": "P",
|
||||||
|
"orderValue": 66
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"diagramRefs": []
|
"diagramRefs": []
|
||||||
|
|
@ -18494,7 +18504,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "E61D92DE-71AB-4AD8-8BAE-A4CD9EDCB917",
|
"id": "E61D92DE-71AB-4AD8-8BAE-A4CD9EDCB917",
|
||||||
"defKey": "beforeBalance",
|
"defKey": "before_balance",
|
||||||
"defName": "变动前余额",
|
"defName": "变动前余额",
|
||||||
"intro": null,
|
"intro": null,
|
||||||
"orderValue": null,
|
"orderValue": null,
|
||||||
|
|
@ -31772,7 +31782,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "61B7A18F-5AD1-414D-8E34-9D34503A0DF4",
|
"id": "61B7A18F-5AD1-414D-8E34-9D34503A0DF4",
|
||||||
"defKey": "cargo_place_province",
|
"defKey": "province",
|
||||||
"defName": "省",
|
"defName": "省",
|
||||||
"intro": "代码",
|
"intro": "代码",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -31818,7 +31828,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "5256F03E-53D4-4019-A20C-939A7BB691F6",
|
"id": "5256F03E-53D4-4019-A20C-939A7BB691F6",
|
||||||
"defKey": "cargo_place_city",
|
"defKey": "city",
|
||||||
"defName": "市",
|
"defName": "市",
|
||||||
"intro": "代码",
|
"intro": "代码",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -31864,7 +31874,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "A5D3F59B-B9B6-4335-85D4-C4EBFAC88A70",
|
"id": "A5D3F59B-B9B6-4335-85D4-C4EBFAC88A70",
|
||||||
"defKey": "cargo_place_area",
|
"defKey": "area",
|
||||||
"defName": "区县",
|
"defName": "区县",
|
||||||
"intro": "代码",
|
"intro": "代码",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -31910,7 +31920,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "5D928A0B-AA15-4005-B092-03724DF617F1",
|
"id": "5D928A0B-AA15-4005-B092-03724DF617F1",
|
||||||
"defKey": "cargo_place_town",
|
"defKey": "town",
|
||||||
"defName": "乡镇街道",
|
"defName": "乡镇街道",
|
||||||
"intro": "代码",
|
"intro": "代码",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -31956,7 +31966,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "320C531F-A8DB-4B91-B669-CA8BF52576D8",
|
"id": "320C531F-A8DB-4B91-B669-CA8BF52576D8",
|
||||||
"defKey": "cargo_place_province_name",
|
"defKey": "province_name",
|
||||||
"defName": "省",
|
"defName": "省",
|
||||||
"intro": "名称",
|
"intro": "名称",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -32002,7 +32012,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "DA6DC128-FF3C-4C58-89BE-4B13B33B3BC1",
|
"id": "DA6DC128-FF3C-4C58-89BE-4B13B33B3BC1",
|
||||||
"defKey": "cargo_place_city_name",
|
"defKey": "city_name",
|
||||||
"defName": "市",
|
"defName": "市",
|
||||||
"intro": "名称",
|
"intro": "名称",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -32048,7 +32058,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "CDF36A20-F352-4271-9AED-2F5C83ADCAF0",
|
"id": "CDF36A20-F352-4271-9AED-2F5C83ADCAF0",
|
||||||
"defKey": "cargo_place_area_name",
|
"defKey": "area_name",
|
||||||
"defName": "区县",
|
"defName": "区县",
|
||||||
"intro": "名称",
|
"intro": "名称",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -32094,7 +32104,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "2FE5A3B5-08B1-4D09-8DDD-E833C4A22D8F",
|
"id": "2FE5A3B5-08B1-4D09-8DDD-E833C4A22D8F",
|
||||||
"defKey": "cargo_place_town_name",
|
"defKey": "town_name",
|
||||||
"defName": "乡镇街道",
|
"defName": "乡镇街道",
|
||||||
"intro": "名称",
|
"intro": "名称",
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -32140,7 +32150,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "596B23D3-BA21-4EB5-8067-D29343E32BBA",
|
"id": "596B23D3-BA21-4EB5-8067-D29343E32BBA",
|
||||||
"defKey": "cargo_place_address",
|
"defKey": "address",
|
||||||
"defName": "详细地址",
|
"defName": "详细地址",
|
||||||
"intro": null,
|
"intro": null,
|
||||||
"baseDataType": "VARCHAR",
|
"baseDataType": "VARCHAR",
|
||||||
|
|
@ -32186,7 +32196,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "3FCA6F55-1030-42C9-A1FF-8BAF2103FE6B",
|
"id": "3FCA6F55-1030-42C9-A1FF-8BAF2103FE6B",
|
||||||
"defKey": "cargo_place_lng",
|
"defKey": "lng",
|
||||||
"defName": "经度",
|
"defName": "经度",
|
||||||
"intro": null,
|
"intro": null,
|
||||||
"baseDataType": "DOUBLE",
|
"baseDataType": "DOUBLE",
|
||||||
|
|
@ -32232,7 +32242,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "71ABDAB0-20D2-43BE-B7D2-5501761CC5BA",
|
"id": "71ABDAB0-20D2-43BE-B7D2-5501761CC5BA",
|
||||||
"defKey": "cargo_place_lat",
|
"defKey": "lat",
|
||||||
"defName": "纬度",
|
"defName": "纬度",
|
||||||
"intro": null,
|
"intro": null,
|
||||||
"baseDataType": "DOUBLE",
|
"baseDataType": "DOUBLE",
|
||||||
|
|
@ -42413,13 +42423,552 @@
|
||||||
],
|
],
|
||||||
"correlations": null,
|
"correlations": null,
|
||||||
"indexes": []
|
"indexes": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "1DF0083F-E75C-45CA-BCCF-62018CC23FC3",
|
||||||
|
"schemaName": null,
|
||||||
|
"defKey": "cst_org_apply",
|
||||||
|
"defName": "加入组织申请",
|
||||||
|
"intro": "",
|
||||||
|
"type": "P",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"id": "4945A6AF-1AD9-4E97-B303-F500F6879014",
|
||||||
|
"defKey": "id",
|
||||||
|
"defName": "Id",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "BIGINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "BIGINT",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 1,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": [],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "79929872-B111-40E0-ADD0-3C5A3D4EA940",
|
||||||
|
"defKey": "customer_id",
|
||||||
|
"defName": "申请人 Id",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "BIGINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "BIGINT",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": null,
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "780D6601-0074-4652-B97F-381AB3324473",
|
||||||
|
"defKey": "org_id",
|
||||||
|
"defName": "加入的组织 Id",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "BIGINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "BIGINT",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": null,
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ED8809B1-AF70-433F-8833-D770CD5D29D9",
|
||||||
|
"defKey": "apply_time",
|
||||||
|
"defName": "申请时间",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "DATETIME",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "DATETIME",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": null,
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "4376B37E-D16A-49FE-97FF-EE3A5D541010",
|
||||||
|
"defKey": "apply_status",
|
||||||
|
"defName": "状态",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "VARCHAR",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "VARCHAR",
|
||||||
|
"dataLen": 16,
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "apply_status",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "apply_status",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "Manual",
|
||||||
|
"dictItems": [
|
||||||
|
{
|
||||||
|
"itemKey": "ShenQingZhong",
|
||||||
|
"itemName": "申请中",
|
||||||
|
"parentKey": "",
|
||||||
|
"intro": "",
|
||||||
|
"id": "68F68505-D67B-43A1-81B4-600F00AD7E46"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"itemKey": "JuJue",
|
||||||
|
"itemName": "拒绝",
|
||||||
|
"parentKey": "",
|
||||||
|
"intro": "",
|
||||||
|
"id": "668C27A8-20C5-4845-B401-3256B189EA45"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"itemKey": "TongYi",
|
||||||
|
"itemName": "同意",
|
||||||
|
"parentKey": "",
|
||||||
|
"intro": "",
|
||||||
|
"id": "7FC50C33-416B-4629-ABB5-723CC5E08BE6"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "EDA3055A-7E79-4C69-845A-91536EFEC167",
|
||||||
|
"defKey": "cause",
|
||||||
|
"defName": "拒绝原因",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "VARCHAR",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "VARCHAR",
|
||||||
|
"dataLen": 512,
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "''",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": null,
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "UI"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "445D46C8-5B41-44C6-8CF6-FC4CE511E15C",
|
||||||
|
"defKey": "creator_id",
|
||||||
|
"defName": "创建人 Id",
|
||||||
|
"intro": " sys_user.id",
|
||||||
|
"baseDataType": "BIGINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "BIGINT",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": null,
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "6A935CA0-4E04-4A77-85AE-939F36901E69",
|
||||||
|
"defKey": "modifier_id",
|
||||||
|
"defName": "修改人 Id",
|
||||||
|
"intro": " sys_user.id",
|
||||||
|
"baseDataType": "BIGINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "BIGINT",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": [],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "0280767C-5CD5-4C53-BF39-FC05640C329B",
|
||||||
|
"defKey": "create_time",
|
||||||
|
"defName": "创建时间",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "DATETIME",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "DATETIME",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": [],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "656B13D9-3615-46F6-9A93-18357EE3E3D4",
|
||||||
|
"defKey": "modify_time",
|
||||||
|
"defName": "修改时间",
|
||||||
|
"intro": "",
|
||||||
|
"baseDataType": "DATETIME",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "DATETIME",
|
||||||
|
"dataLen": "",
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": [],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "293E0D32-6E33-4ED0-97AE-A9C61A2CCA93",
|
||||||
|
"defKey": "deleted",
|
||||||
|
"defName": "是否删除",
|
||||||
|
"intro": " 0-->未删除、1-->已删除",
|
||||||
|
"baseDataType": "TINYINT",
|
||||||
|
"bizDomainType": "",
|
||||||
|
"dbDataType": "TINYINT",
|
||||||
|
"dataLen": 1,
|
||||||
|
"numScale": "",
|
||||||
|
"primaryKey": 0,
|
||||||
|
"notNull": 1,
|
||||||
|
"autoIncrement": 0,
|
||||||
|
"defaultValue": "0",
|
||||||
|
"stndDictId": "",
|
||||||
|
"stndFieldId": "",
|
||||||
|
"stndDictKey": "",
|
||||||
|
"stndFieldKey": "",
|
||||||
|
"stndComplianceLevel": "",
|
||||||
|
"stndComplianceType": "",
|
||||||
|
"dictFrom": "",
|
||||||
|
"dictItems": [],
|
||||||
|
"fieldTier": "",
|
||||||
|
"mark": null,
|
||||||
|
"attr1": "",
|
||||||
|
"attr2": "",
|
||||||
|
"attr3": "",
|
||||||
|
"attr4": "",
|
||||||
|
"attr5": "",
|
||||||
|
"attr6": "",
|
||||||
|
"attr7": "",
|
||||||
|
"attr8": "",
|
||||||
|
"attr9": "",
|
||||||
|
"attr10": "",
|
||||||
|
"attr11": "",
|
||||||
|
"attr12": "",
|
||||||
|
"attr13": "",
|
||||||
|
"attr14": "",
|
||||||
|
"attr15": "",
|
||||||
|
"attr16": "",
|
||||||
|
"attr17": "",
|
||||||
|
"attr18": "PDManer",
|
||||||
|
"attr19": "",
|
||||||
|
"attr20": "",
|
||||||
|
"origin": "PASTE"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"indexes": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"diagrams": [],
|
"diagrams": [],
|
||||||
"readonly": false,
|
"readonly": false,
|
||||||
"allowWs": false
|
"allowWs": false
|
||||||
},
|
},
|
||||||
"updateTime": 1765330978291,
|
"updateTime": 1765359635412,
|
||||||
"signature": "c215676b06842c6791a3ca576a7c548a",
|
"signature": "e1b11ecff62865e7eb000c6c88e1e638",
|
||||||
"branchId": "1111"
|
"branchId": "1111"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue