企业管理页面优化

cert
schry 2 years ago
parent b06ffd90f9
commit 850c830f09

@ -11,6 +11,8 @@ import com.glxp.api.entity.monitor.SysLogininfor;
import com.glxp.api.req.monitor.FilterLoginLogRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.monitor.ISysLogininforService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -22,6 +24,7 @@ import java.util.List;
/**
* 访
*/
@Api(tags = "系统访问记录相关接口")
@ApiIgnore
@Validated
@RequiredArgsConstructor
@ -34,6 +37,7 @@ public class SysLogininforController extends BaseController {
/**
* 访
*/
@ApiOperation(value = "获取系统访问记录列表",response = SysLogininfor.class)
@SaCheckPermission("monitor:logininfor:list")
@GetMapping("/list")
public BaseResponse list(FilterLoginLogRequest filterLoginLogRequest) {
@ -53,6 +57,7 @@ public class SysLogininforController extends BaseController {
*
* @param infoIds ids
*/
@ApiOperation(value = "批量删除登录日志",response = BaseResponse.class)
@SaCheckPermission("monitor:logininfor:remove")
@Log(title = "登录日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{infoIds}")

@ -16,6 +16,8 @@ import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.auth.registComPerResponse;
import com.glxp.api.service.sup.UserCertService;
import com.glxp.api.service.sup.UserCertSetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
@ -36,6 +38,7 @@ import java.util.List;
* @date : 2023/5/18 9:38
* @modyified By :
*/
@Api(tags = "供应商资质相关接口")
@ApiIgnore
@RestController
public class SupCertController {
@ -47,7 +50,7 @@ public class SupCertController {
private UserCertSetService userCertSetService;
@ApiOperation(value = "获取供应商资质信息",response = UserCertEntity.class)
@GetMapping("/sup/company/cert/filterList")
public BaseResponse filterCompanyCert(certRequest certRequest , BindingResult bindingResult){
if (bindingResult.hasErrors()) {
@ -64,6 +67,7 @@ public class SupCertController {
//资质证书添加
@ApiOperation(value = "资质证书添加",response = BaseResponse.class)
@PostMapping("/sup/company/cert/isertCert")
public BaseResponse isertCert(@RequestBody UserCertEntity userCert){
userCert.setCreateTime(new Date());
@ -76,6 +80,7 @@ public class SupCertController {
}
//删除
@ApiOperation(value = "删除资质证书",response = BaseResponse.class)
@PostMapping("/sup/company/cert/deleteCert")
public BaseResponse deleteCert(@RequestBody DeleteCompanyFileRequest deleteCompanyFileRequest){
boolean b = userCertService.deleteById(deleteCompanyFileRequest.getId());
@ -88,6 +93,7 @@ public class SupCertController {
}
//修改
@ApiOperation(value = "修改资质证书",response = BaseResponse.class)
@PostMapping("/sup/info/updateCert")
public BaseResponse updateCert(@RequestBody UserCertEntity userCert){
@ -112,6 +118,7 @@ public class SupCertController {
return ResultVOUtils.success("修改成功");
}
@ApiOperation(value = "上传注册人文件",response = BaseResponse.class)
@PostMapping("/udiwms/image/register/file")
public BaseResponse uploadRegisterFile(@RequestBody FilterImageRequest filterImageRequest) {
List<String> urlList = Arrays.asList(filterImageRequest.getImageUrl().split(","));

@ -21,6 +21,8 @@ import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.sup.UserCertService;
import com.glxp.api.service.sup.UserCertSetService;
import com.glxp.api.service.sup.UserPersonService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
@ -41,14 +43,13 @@ import java.util.List;
* @date : 2023/5/18 9:38
* @modyified By :
*/
@Api(tags = "用户个人相关接口")
@RestController
public class userPersonController {
@Resource
private UserPersonService userPersonService;
@ApiOperation(value = "获取用户个人信息",response = UserPersonEntity.class)
@PostMapping("/sup/company/person/filterList")
public BaseResponse filterCompanyCert(@RequestBody UserPersonFilterRequest userPersonFilterRequest , BindingResult bindingResult){
if (bindingResult.hasErrors()) {
@ -69,7 +70,7 @@ public class userPersonController {
return ResultVOUtils.success(pageSimpleResponse);
}
@ApiOperation(value = "跟新企业负责人信息",response = BaseResponse.class)
@PostMapping("/sup/company/person/updatePerSon")
public BaseResponse updatePerSon(@RequestBody UserPersonFilterRequest userPersonFilterRequest ,BindingResult bindingResult ){
if (bindingResult.hasErrors()) {
@ -84,7 +85,7 @@ public class userPersonController {
return ResultVOUtils.success();
}
@ApiOperation(value = "删除企业负责人信息",response = BaseResponse.class)
@PostMapping("/sup/company/person/daletePerSon")
public BaseResponse daletePerSon(@RequestBody UserPersonFilterRequest userPersonFilterRequest ,BindingResult bindingResult ){
if (bindingResult.hasErrors()) {

@ -3,6 +3,7 @@ package com.glxp.api.controller.sup;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
@ -53,7 +54,19 @@ public class UserComanyController extends BaseController {
if (filterUserComapanyRequest.getSearchKey() == null) {
filterUserComapanyRequest.setSearchKey("");
}
List<UserCompanyEntity> userCompanyEntities = userCompanyService.list(new QueryWrapper<UserCompanyEntity>().like("companyName", filterUserComapanyRequest.getSearchKey()).eq("checkStatus", 1));
QueryWrapper<UserCompanyEntity> queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotBlank(filterUserComapanyRequest.getCompanyName()) && !"null".equals(filterUserComapanyRequest.getCompanyName())){
queryWrapper.like("companyName", filterUserComapanyRequest.getSearchKey());
}
if (StringUtils.isNotBlank(filterUserComapanyRequest.getCreditNum()) && !"null".equals(filterUserComapanyRequest.getCreditNum())){
queryWrapper.eq("creditNum",filterUserComapanyRequest.getCreditNum());
}
if (StringUtils.isNotBlank(filterUserComapanyRequest.getBussinessStatus()) && !"null".equals(filterUserComapanyRequest.getBussinessStatus())){
queryWrapper.eq("bussinessStatus",filterUserComapanyRequest.getBussinessStatus());
}
List<UserCompanyEntity> userCompanyEntities = userCompanyService.list(
queryWrapper.eq("checkStatus", 1)
);
PageInfo<UserCompanyEntity> pageInfo;
pageInfo = new PageInfo<>(userCompanyEntities);

@ -1,5 +1,7 @@
package com.glxp.api.entity.monitor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ -9,58 +11,68 @@ import java.util.Map;
/**
* 访 sys_logininfor
*/
@ApiModel("系统访问记录实体")
@Data
public class SysLogininfor {
/**
* ID
*/
@ApiModelProperty(value = "ID")
private Long infoId;
/**
*
*/
@ApiModelProperty(value = "用户账号")
private String userName;
/**
* 0 1
*/
@ApiModelProperty(value = "登录状态 0成功 1失败")
private String status;
/**
* IP
*/
@ApiModelProperty(value = "登录IP地址")
private String ipaddr;
/**
*
*/
@ApiModelProperty(value = "登录地点")
private String loginLocation;
/**
*
*/
@ApiModelProperty(value = "浏览器类型")
private String browser;
/**
*
*/
@ApiModelProperty(value = "操作系统")
private String os;
/**
*
*/
@ApiModelProperty(value = "提示消息")
private String msg;
/**
* 访
*/
@ApiModelProperty(value = "访问时间")
private Date loginTime;
/**
*
*/
@ApiModelProperty(value = "请求参数")
private Map<String, Object> params = new HashMap<>();
}

@ -8,41 +8,51 @@ import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@ApiModel("资质证书信息与路径表")
@Data
@TableName(value = "user_cert")
public class UserCertEntity implements Serializable {
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
* ID
*/
@ApiModelProperty(value = "业ID外键")
@TableField(value = "businessId")
private Long businessId;
/**
*
*/
@ApiModelProperty(value = "证书名称")
@TableField(value = "`name`")
private String name;
/**
*
*/
@ApiModelProperty(value = "证书编号")
@TableField(value = "code")
private String code;
@ApiModelProperty(value = "文件")
@TableField(value = "filePath")
private String filePath;
/**
*
*/
@ApiModelProperty(value = "有效期")
@TableField(value = "validDate")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date validDate;
@ -50,6 +60,7 @@ public class UserCertEntity implements Serializable {
/**
*
*/
@ApiModelProperty(value = "失效期")
@TableField(value = "expireDate")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expireDate;
@ -57,36 +68,42 @@ public class UserCertEntity implements Serializable {
/**
*
*/
@ApiModelProperty(value = "审核状态")
@TableField(value = "checkStatus")
private String checkStatus;
/**
*
*/
@ApiModelProperty(value = "审核说明")
@TableField(value = "checkComment")
private String checkComment;
/**
* 01:
*/
@ApiModelProperty(value = "0启用1:禁用")
@TableField(value = "`status`")
private String status;
/**
*
*/
@ApiModelProperty(value = "备注")
@TableField(value = "remark")
private String remark;
/**
*
*/
@ApiModelProperty(value = "创建人")
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@TableField(value = "createTime")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
@ -94,16 +111,19 @@ public class UserCertEntity implements Serializable {
/**
*
*/
@ApiModelProperty(value = "更新人")
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@ApiModelProperty(value = "更新时间")
@TableField(value = "updateTime")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date updateTime;
@ApiModelProperty(value = "键")
@TableField(exist = false)
private String key;

@ -6,77 +6,94 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@ApiModel("企业负责人实体")
@Data
@TableName(value = "user_person")
public class UserPersonEntity implements Serializable {
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
* id
*/
@ApiModelProperty(value = "注册表id")
@TableField(value = "registerId")
private Long registerId;
/**
* id
*/
@ApiModelProperty(value = "企业id")
@TableField(value = "companyId")
private Long companyId;
/**
*
*/
@ApiModelProperty(value = "用户名")
@TableField(value = "userName")
private String userName;
/**
*
*/
@ApiModelProperty(value = "密码")
@TableField(value = "`password`")
private String password;
/**
*
*/
@ApiModelProperty(value = "姓名")
@TableField(value = "`name`")
private String name;
/**
*
*/
@ApiModelProperty(value = "电话")
@TableField(value = "tel")
private String tel;
/**
*
*/
@ApiModelProperty(value = "手机")
@TableField(value = "mobile")
private String mobile;
/**
* qq
*/
@ApiModelProperty(value = "qq")
@TableField(value = "qq")
private String qq;
/**
*
*/
@ApiModelProperty(value = "微信")
@TableField(value = "weChat")
private String weChat;
/**
*
*/
@ApiModelProperty(value = "邮箱")
@TableField(value = "email")
private String email;
@ApiModelProperty(value = "创建时间")
@TableField(value = "createTime")
private Date createTime;

@ -15,4 +15,10 @@ public class FilterUserComapanyRequest extends ListPageRequest {
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "统一社会信用号")
private String creditNum;
@ApiModelProperty(value = "企业类型")
private String bussinessStatus;
}

@ -2,22 +2,48 @@ package com.glxp.api.req.auth;
import com.glxp.api.util.page.ListPageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("企业负责人请求类")
@Data
public class UserPersonFilterRequest extends ListPageRequest {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "注册表id")
private String registerId;
@ApiModelProperty(value = "企业ID")
private String companyId;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "密码")
private String password;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "电话号码")
private String tel;
@ApiModelProperty(value = "qq")
private String qq;
@ApiModelProperty(value = "微信")
private String weChat;
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "邮箱")
private String email;
@ApiModelProperty(value = "校验密码")
private String checkPassword;

@ -45,4 +45,11 @@ public class UserRegisterFilterRequest extends ListPageRequest {
@ApiModelProperty(value = "创建时间")
private String createTime;
@ApiModelProperty(value = "统一社会信用号")
private String creditNum;
//企业类型
@ApiModelProperty(value = "企业类型")
private String bussinessStatus;
}

@ -1,19 +1,27 @@
package com.glxp.api.req.monitor;
import com.glxp.api.util.page.ListPageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("登入日志请求类")
public class FilterLoginLogRequest extends ListPageRequest {
@ApiModelProperty(value = "信息id")
private Long infoId;
@ApiModelProperty(value = "用户名")
private String userName;
@ApiModelProperty(value = "状态")
private String status;
@ApiModelProperty(value = "IP地址")
private String ipaddr;
@ApiModelProperty(value = "登入位置")
private String loginLocation;
}

@ -1,12 +1,17 @@
package com.glxp.api.req.purchase;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("图片请求类")
@Data
public class FilterImageRequest {
@ApiModelProperty(value = "图片url")
private String imageUrl;
@ApiModelProperty(value = "资质文件url")
private String certFileUrl;
}

@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@ -14,89 +16,105 @@ import java.util.Date;
* @modyified By :
*/
@Data
@ApiModel("资质请求类")
public class certRequest extends ListPageRequest {
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT)
private Long id;
/**
* ID
*/
@ApiModelProperty(value = "业ID外键")
@TableField(value = "businessId")
private Long businessId;
/**
*
*/
@ApiModelProperty(value = "证书名称")
@TableField(value = "`name`")
private String name;
/**
*
*/
@ApiModelProperty(value = "证书编号")
@TableField(value = "code")
private String code;
@ApiModelProperty(value = "文件路径")
@TableField(value = "filePath")
private String filePath;
/**
*
*/
@ApiModelProperty(value = "有效期")
@TableField(value = "validDate")
private Date validDate;
/**
*
*/
@ApiModelProperty(value = "失效期")
@TableField(value = "expireDate")
private Date expireDate;
/**
*
*/
@ApiModelProperty(value = "审核状态")
@TableField(value = "checkStatus")
private String checkStatus;
/**
*
*/
@ApiModelProperty(value = "审核说明")
@TableField(value = "checkComment")
private String checkComment;
/**
* 01:
*/
@ApiModelProperty(value = "0启用1:禁用")
@TableField(value = "`status`")
private String status;
/**
*
*/
@ApiModelProperty(value = "备注")
@TableField(value = "remark")
private String remark;
/**
*
*/
@ApiModelProperty(value = "创建人")
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@ApiModelProperty(value = "更新人")
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@ApiModelProperty(value = "更新时间")
@TableField(value = "updateTime")
private Date updateTime;

@ -9,6 +9,12 @@
<if test="companyName != '' and companyName != null">
AND companyName LIKE concat('%', #{companyName}, '%')
</if>
<if test="creditNum != '' and creditNum != null">
and creditNum = #{creditNum}
</if>
<if test="bussinessStatus != '' and bussinessStatus != null">
and bussinessStatus = #{bussinessStatus}
</if>
</where>
GROUP BY companyName
</select>

@ -73,8 +73,12 @@
<if test="checkStatus !=null and checkStatus != ''">
and user_register.checkStatus =#{checkStatus}
</if>
<if test="creditNum !=null and creditNum != ''">
and user_company.creditNum =#{creditNum}
</if>
<if test="bussinessStatus !=null and bussinessStatus != ''">
and user_company.bussinessStatus =#{bussinessStatus}
</if>
</where>
</select>

Loading…
Cancel
Save