New file |
| | |
| | | package com.project.admin.controller.enforce; |
| | | |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.annotation.RepeatSubmit; |
| | | import com.project.common.core.controller.BaseController; |
| | | import com.project.common.core.domain.AjaxResult; |
| | | import com.project.common.enums.BusinessType; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateBo; |
| | | import com.project.enforce.service.IEnforceEvaluateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | * @date 2024年06月18日 |
| | | */ |
| | | |
| | | @Api(value = "执法评价控制器", tags = {"执法评价管理"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RestController |
| | | @RequestMapping("/enforce/evaluate/") |
| | | public class EnforceEvaluateController extends BaseController |
| | | { |
| | | |
| | | private final IEnforceEvaluateService enforceEvaluateService; |
| | | |
| | | @ApiOperation("获取执法评价详细信息") |
| | | @GetMapping("/detail") |
| | | public AjaxResult getInfo() |
| | | { |
| | | return AjaxResult.success(enforceEvaluateService.getInfo()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("保存执法评价") |
| | | //@PreAuthorize("@ss.hasPermi('enforce:log:add')") |
| | | @Log(title = "执法评价", businessType = BusinessType.INSERT) |
| | | @PostMapping("/save") |
| | | @RepeatSubmit |
| | | public AjaxResult save(@RequestBody EnforceEvaluateBo bo) |
| | | { |
| | | return toAjax(enforceEvaluateService.save(bo) ? 1 : 0); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.project.admin.controller.enforce; |
| | | |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | import com.project.common.annotation.RepeatSubmit; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.annotation.RepeatSubmit; |
| | | import com.project.common.core.controller.BaseController; |
| | | import com.project.common.core.domain.AjaxResult; |
| | | import com.project.common.core.page.TableDataInfo; |
| | | import com.project.common.enums.BusinessType; |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | import com.project.common.utils.poi.ExcelUtil; |
| | | import com.project.enforce.domain.bo.editBo.EnforceOrderBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceOrderQueryBo; |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | import com.project.enforce.service.IEnforceOrderService; |
| | | import com.project.common.utils.poi.ExcelUtil; |
| | | import com.project.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 执法单Controller |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询执法单待审核列表") |
| | | @GetMapping("/checkList") |
| | | public TableDataInfo checkList(EnforceOrderQueryBo bo) |
| | | { |
| | | startPage(); |
| | | List<EnforceOrderVo> list = iEnforceOrderService.queryCheckList(bo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("导出执法单列表") |
| | | //@PreAuthorize("@ss.hasPermi('enforce:order:export')") |
| | |
| | | public AjaxResult export(EnforceOrderQueryBo bo) |
| | | { |
| | | List<EnforceOrderVo> list = iEnforceOrderService.queryList(bo); |
| | | ExcelUtil<EnforceOrderVo> util = new ExcelUtil<EnforceOrderVo>(EnforceOrderVo.class); |
| | | ExcelUtil<EnforceOrderVo> util = new ExcelUtil<>(EnforceOrderVo.class); |
| | | return util.exportExcel(list, "执法单"); |
| | | } |
| | | |
| | |
| | | package com.project.admin.controller.system; |
| | | |
| | | import java.util.List; |
| | | import java.util.Arrays; |
| | | |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.annotation.RepeatSubmit; |
| | | import com.project.common.core.controller.BaseController; |
| | | import com.project.common.core.domain.AjaxResult; |
| | | import com.project.common.core.page.TableDataInfo; |
| | | import com.project.common.enums.BusinessType; |
| | | import com.project.common.utils.poi.ExcelUtil; |
| | | import com.project.system.domain.bo.editBo.SysCompanyBo; |
| | | import com.project.system.domain.bo.queryBo.SysCompanyQueryBo; |
| | | import com.project.system.domain.vo.SysCompanyVo; |
| | | import com.project.system.service.ISysCompanyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.core.controller.BaseController; |
| | | import com.project.common.core.domain.AjaxResult; |
| | | import com.project.common.enums.BusinessType; |
| | | import com.project.system.domain.vo.SysCompanyVo; |
| | | import com.project.system.domain.bo.editBo.SysCompanyBo; |
| | | import com.project.system.domain.bo.queryBo.SysCompanyQueryBo; |
| | | import com.project.system.service.ISysCompanyService; |
| | | import com.project.common.utils.poi.ExcelUtil; |
| | | import com.project.common.core.page.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 企业信息Controller |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "导入活动指标") |
| | | @ApiImplicitParam(value = "上传文件", name = "file", dataType = "file", dataTypeClass = MultipartFile.class) |
| | | @PostMapping("/import") |
| | | public AjaxResult importList(@RequestParam MultipartFile file) throws Exception |
| | | { |
| | |
| | | package com.project.admin.controller.system; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.project.common.annotation.Log; |
| | | import com.project.common.constant.UserConstants; |
| | | import com.project.common.core.controller.BaseController; |
| | |
| | | import com.project.system.service.ISysPostService; |
| | | import com.project.system.service.ISysRoleService; |
| | | import com.project.system.service.ISysUserService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户信息 |
| | |
| | | private final ISysUserService userService; |
| | | private final ISysRoleService roleService; |
| | | private final ISysDeptService deptService; |
| | | private final ISysPostService postService; |
| | | private final ISysPostService postService; |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |
| | | if (sysDept.getAncestors().contains("101") || sysDept.getDeptId().equals(101L)){ |
| | | user.setUserType("01"); |
| | | user.setRecommendPhone(deptService.getCheckDeptIdByLoginDeptId(user.getDeptId()).toString()); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.project.core.config; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import com.project.common.config.ProjectConfig; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.models.auth.In; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.service.ApiKey; |
| | | import springfox.documentation.service.AuthorizationScope; |
| | | import springfox.documentation.service.Contact; |
| | | import springfox.documentation.service.SecurityReference; |
| | | import springfox.documentation.service.SecurityScheme; |
| | | import springfox.documentation.service.*; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spi.service.contexts.SecurityContext; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Swagger2的接口配置 |
| | |
| | | } |
| | | |
| | | @Bean |
| | | public Docket toolApi() |
| | | { |
| | | return new Docket(DocumentationType.OAS_30) |
| | | .groupName("工具中心") |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.any()) |
| | | .paths(PathSelectors.regex("/tool/.*")) |
| | | .build() |
| | | /* 设置安全模式,swagger可以设置访问token */ |
| | | .securitySchemes(securitySchemes()) |
| | | .securityContexts(securityContexts()) |
| | | .pathMapping(pathMapping); |
| | | } |
| | | |
| | | @Bean |
| | | public Docket enforceApi() |
| | | { |
| | | return new Docket(DocumentationType.OAS_30) |
| | |
| | | - /system/dict/** |
| | | - /getVerifyCode |
| | | - /login/phone |
| | | - /system/company/** #临时白名单 |
| | | - /tool/** #临时白名单 |
New file |
| | |
| | | package com.project.common.constant; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | * @date 2024年06月18日 |
| | | */ |
| | | public class CheckLevelCodeConstants |
| | | { |
| | | |
| | | /** |
| | | * 执法单一级审批 |
| | | */ |
| | | public static final String CHECK_LEVEL_ONE = "check_enforce_1"; |
| | | |
| | | /** |
| | | * 执法单二级审批 |
| | | */ |
| | | public static final String CHECK_LEVEL_TWO = "check_enforce_2"; |
| | | } |
| | |
| | | package com.project.common.core.domain.entity; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | import javax.validation.constraints.Size; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.project.common.annotation.Excel; |
| | | import com.project.common.annotation.Excel.ColumnType; |
| | | import com.project.common.core.domain.BaseEntity; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Pattern; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | /** |
| | | * 字典类型表 sys_dict_type |
| | |
| | | @Excel(name = "状态", readConverterExp = "0=正常,1=停用") |
| | | private String status; |
| | | |
| | | /** 状态(0正常 1停用) */ |
| | | @Excel(name = "是否系统内置", readConverterExp = "0=自定义,1=系统内置") |
| | | private Integer isSystem; |
| | | |
| | | public Integer getIsSystem() { |
| | | return isSystem; |
| | | } |
| | | |
| | | public void setIsSystem(Integer isSystem) { |
| | | this.isSystem = isSystem; |
| | | } |
| | | |
| | | public Long getDictId() |
| | | { |
| | | return dictId; |
| | |
| | | package com.project.common.core.domain.entity; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.validation.constraints.*; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.project.common.annotation.Excel; |
| | | import com.project.common.annotation.Excel.Type; |
| | | import com.project.common.annotation.Excels; |
| | | import com.project.common.xss.Xss; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | import javax.validation.constraints.Size; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 用户对象 sys_user |
| | |
| | | /** 备注 */ |
| | | private String remark; |
| | | |
| | | |
| | | /** 备注 */ |
| | | private String recommendUser; |
| | | |
| | | /** 所属执法机构 */ |
| | | private String recommendPhone; |
| | | |
| | | |
| | | /** 生日 */ |
| | | private String birthday; |
| | |
| | | package com.project.enforce.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.project.common.core.domain.BaseDomain; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | import java.io.Serializable; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 执法评价题目对象 enforce_evaluate_question |
| | | * |
| | | * @author manton |
| | | */ |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | @NoArgsConstructor |
| | | @Accessors(chain = true) |
| | |
| | | @ApiModelProperty("ID") |
| | | private Long questionId; |
| | | |
| | | |
| | | @ApiModelProperty("题目") |
| | | private String questionName; |
| | | |
| | | |
| | | @ApiModelProperty("分值") |
| | | private BigDecimal questionScore; |
| | | |
| | | @ApiModelProperty("类型:1选择,2打分") |
| | | private Integer questionType; |
| | | |
| | | @ApiModelProperty("使用状态:0正常,1禁用") |
| | | private Integer questionStatus; |
| | | |
| | | |
| | | @ApiModelProperty("题目答案") |
| | | @ApiModelProperty("题目答案ids") |
| | | private String answerIds; |
| | | |
| | | @ApiModelProperty("题目答案列表") |
| | | private List<EnforceEvaluateAnswer> answerList; |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.project.enforce.domain.bo.editBo; |
| | | |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | */ |
| | | |
| | | @Data |
| | | public class EnforceEvaluateBo |
| | | { |
| | | |
| | | private List<EnforceEvaluateQuestion> questionList; |
| | | |
| | | } |
| | |
| | | package com.project.enforce.domain.bo.queryBo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.project.common.core.domain.BaseQuery; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | /** |
| | | * 执法单分页查询对象 enforce_order |
| | |
| | | private Long applyId; |
| | | /** 申请人 */ |
| | | @ApiModelProperty("申请人") |
| | | private Long applyUser; |
| | | private String applyUser; |
| | | /** 申请人电话 */ |
| | | @ApiModelProperty("申请人电话") |
| | | private Long applyPhone; |
| | | private String applyPhone; |
| | | /** 申请人单位 */ |
| | | @ApiModelProperty("申请人单位") |
| | | private Long applyDeptId; |
| | | /** 申请人单位 */ |
| | | @ApiModelProperty("申请人单位") |
| | | private Long applyDeptName; |
| | | private String applyDeptName; |
| | | /** 申请时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("申请时间") |
| | | private Date applyTime; |
| | | /** 执法队员数量 */ |
| | | @ApiModelProperty("执法队员数量") |
| | | /** 执法队员人数 */ |
| | | @ApiModelProperty("执法队员人数") |
| | | private Integer userNum; |
| | | /** 预警状态:0正常,1预警 */ |
| | | @ApiModelProperty("预警状态:0正常,1预警") |
| | |
| | | /** 订单状态:-1撤回,0待提交,1已提交,2待执行,3已执行,4已评价 */ |
| | | @ApiModelProperty("订单状态:-1撤回,0待提交,1已提交,2待执行,3已执行,4已评价") |
| | | private Integer orderStatus; |
| | | /** 审批人id */ |
| | | @ApiModelProperty("审批人id") |
| | | private Long checkId; |
| | | /** 审批人 */ |
| | | @ApiModelProperty("审批人") |
| | | private Long checkUser; |
| | | /** 审批人电话 */ |
| | | @ApiModelProperty("审批人电话") |
| | | private Long checkPhone; |
| | | /** 审批人单位 */ |
| | | @ApiModelProperty("审批人单位") |
| | | private Long checkDeptId; |
| | | /** 审批人单位 */ |
| | | @ApiModelProperty("审批人单位") |
| | | private Long checkDeptName; |
| | | /** 审批时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("审批时间") |
| | | private Date checkTime; |
| | | private String checkDeptName; |
| | | /** 订单状态:-1拒绝,0待审批,1审批中,2通过 */ |
| | | @ApiModelProperty("订单状态:-1拒绝,0待审批,1审批中,2通过") |
| | | private Integer checkStatus; |
| | | /** 审批原因 */ |
| | | @ApiModelProperty("审批原因") |
| | | private String checkReason; |
| | | /** 当前审批层级: */ |
| | | @ApiModelProperty("当前审批层级:") |
| | | private Integer checkLevel; |
| | | /** 执行人id */ |
| | | @ApiModelProperty("执行人id") |
| | | private Long executeId; |
| | | /** 执行人 */ |
| | | @ApiModelProperty("执行人") |
| | | private Long executeUser; |
| | | private String executeUser; |
| | | /** 执行人电话 */ |
| | | @ApiModelProperty("执行人电话") |
| | | private Long executePhone; |
| | | private String executePhone; |
| | | /** 执行人单位 */ |
| | | @ApiModelProperty("执行人单位") |
| | | private Long executeDeptId; |
| | | /** 执行人单位 */ |
| | | @ApiModelProperty("执行人单位") |
| | | private Long executeDeptName; |
| | | private String executeDeptName; |
| | | /** 执行时间 */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("执行时间") |
| | |
| | | package com.project.enforce.domain.vo; |
| | | |
| | | import com.project.common.annotation.Excel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.math.BigDecimal; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Excel(name = "题目") |
| | | @ApiModelProperty("题目") |
| | | private String questionName; |
| | | |
| | | @Excel(name = "分值") |
| | | @ApiModelProperty("分值") |
| | | private BigDecimal questionScore; |
| | | |
| | | @Excel(name = "类型:1选择,2打分") |
| | | @ApiModelProperty("类型:1选择,2打分") |
| | | private Integer questionType; |
| | | |
| | | @Excel(name = "使用状态:0正常,1禁用") |
| | | @ApiModelProperty("使用状态:0正常,1禁用") |
| | | private Integer questionStatus; |
| | | |
| | | @Excel(name = "题目答案") |
| | | @ApiModelProperty("题目答案") |
| | | private String answerIds; |
| | | |
| | | @Excel(name = "备注") |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("答案") |
| | | private List<EnforceEvaluateAnswerVo> answerList; |
| | | |
| | | } |
New file |
| | |
| | | package com.project.enforce.domain.vo; |
| | | |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | */ |
| | | |
| | | @Data |
| | | public class EnforceEvaluateVo |
| | | { |
| | | private List<EnforceEvaluateQuestion> questionList; |
| | | } |
| | |
| | | |
| | | import com.project.enforce.domain.EnforceOrder; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceOrderQueryBo; |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 执法单Mapper接口 |
| | | * |
| | | * @author manton |
| | | */ |
| | | public interface EnforceOrderMapper extends BaseMapper<EnforceOrder> { |
| | | public interface EnforceOrderMapper extends BaseMapper<EnforceOrder> |
| | | { |
| | | |
| | | List<EnforceOrderVo> selectCheckList(EnforceOrderQueryBo bo); |
| | | |
| | | } |
| | |
| | | package com.project.enforce.service; |
| | | |
| | | import com.project.enforce.domain.EnforceEvaluateAnswer; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateAnswerVo; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateAnswerBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceEvaluateAnswerQueryBo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.project.common.mybatis.IBaseService; |
| | | import cn.hutool.core.convert.Convert; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import com.project.enforce.domain.EnforceEvaluateAnswer; |
| | | |
| | | /** |
| | | * 执法评价答案Service接口 |
| | |
| | | */ |
| | | public interface IEnforceEvaluateAnswerService extends IBaseService<EnforceEvaluateAnswer> { |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | List<EnforceEvaluateAnswerVo> queryList(EnforceEvaluateAnswerQueryBo bo); |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @return EnforceEvaluateAnswerVo |
| | | */ |
| | | EnforceEvaluateAnswerVo queryById(Long answerId); |
| | | |
| | | |
| | | /** |
| | | * 根据新增业务对象插入执法评价答案 |
| | | * @param bo 执法评价答案新增业务对象 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean insertByBo(EnforceEvaluateAnswerBo bo); |
| | | |
| | | /** |
| | | * 根据编辑业务对象修改执法评价答案 |
| | | * @param bo 执法评价答案编辑业务对象 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean updateByBo(EnforceEvaluateAnswerBo bo); |
| | | |
| | | /** |
| | | * 校验并删除数据 |
| | | * @param ids 主键集合 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean deleteByIds(Collection<Long> ids); |
| | | } |
| | |
| | | package com.project.enforce.service; |
| | | |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateQuestionVo; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateQuestionBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceEvaluateQuestionQueryBo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.project.common.mybatis.IBaseService; |
| | | import cn.hutool.core.convert.Convert; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | |
| | | /** |
| | | * 执法评价题目Service接口 |
| | |
| | | */ |
| | | public interface IEnforceEvaluateQuestionService extends IBaseService<EnforceEvaluateQuestion> { |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | List<EnforceEvaluateQuestionVo> queryList(EnforceEvaluateQuestionQueryBo bo); |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @return EnforceEvaluateQuestionVo |
| | | */ |
| | | EnforceEvaluateQuestionVo queryById(Long questionId); |
| | | |
| | | |
| | | /** |
| | | * 根据新增业务对象插入执法评价题目 |
| | | * @param bo 执法评价题目新增业务对象 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean insertByBo(EnforceEvaluateQuestionBo bo); |
| | | |
| | | /** |
| | | * 根据编辑业务对象修改执法评价题目 |
| | | * @param bo 执法评价题目编辑业务对象 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean updateByBo(EnforceEvaluateQuestionBo bo); |
| | | |
| | | /** |
| | | * 校验并删除数据 |
| | | * @param ids 主键集合 |
| | | * @return true成功 false失败 |
| | | */ |
| | | Boolean deleteByIds(Collection<Long> ids); |
| | | } |
New file |
| | |
| | | package com.project.enforce.service; |
| | | |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateBo; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateVo; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | * @date 2024年06月18日 |
| | | */ |
| | | public interface IEnforceEvaluateService |
| | | { |
| | | |
| | | /** |
| | | * 保存评价 |
| | | * @param bo 参数 |
| | | * @return 结果 |
| | | */ |
| | | Boolean save(EnforceEvaluateBo bo); |
| | | |
| | | EnforceEvaluateVo getInfo(); |
| | | |
| | | |
| | | } |
| | |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | import com.project.enforce.domain.bo.editBo.EnforceOrderBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceOrderQueryBo; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.project.common.mybatis.IBaseService; |
| | | import cn.hutool.core.convert.Convert; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | */ |
| | | List<EnforceOrderVo> queryList(EnforceOrderQueryBo bo); |
| | | |
| | | /** |
| | | * 查询待审核列表 |
| | | */ |
| | | List<EnforceOrderVo> queryCheckList(EnforceOrderQueryBo bo); |
| | | |
| | | /** |
| | | * 查询单个 |
| | | * @return EnforceOrderVo |
| | |
| | | package com.project.enforce.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.project.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateAnswerVo; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateAnswerBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceEvaluateAnswerQueryBo; |
| | | import com.project.enforce.domain.EnforceEvaluateAnswer; |
| | | import com.project.enforce.mapper.EnforceEvaluateAnswerMapper; |
| | | import com.project.enforce.service.IEnforceEvaluateAnswerService; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 执法评价答案Service业务层处理 |
| | |
| | | |
| | | |
| | | |
| | | @Override//列表查询 |
| | | public List<EnforceEvaluateAnswerVo> queryList(EnforceEvaluateAnswerQueryBo bo) |
| | | { |
| | | QueryWrapper<EnforceEvaluateAnswer> qw = getQw(bo); |
| | | List<EnforceEvaluateAnswer> list = this.list(qw); |
| | | return Convert.toList(EnforceEvaluateAnswerVo.class , list); |
| | | } |
| | | |
| | | @Override//id查询 |
| | | public EnforceEvaluateAnswerVo queryById(Long answerId) |
| | | { |
| | | EnforceEvaluateAnswer db = this.baseMapper.selectById(answerId); |
| | | return Convert.convert(EnforceEvaluateAnswerVo.class , db); |
| | | } |
| | | |
| | | |
| | | @Override//添加 |
| | | @Transactional |
| | | public Boolean insertByBo(EnforceEvaluateAnswerBo bo) |
| | | { |
| | | EnforceEvaluateAnswer add = Convert.convert(EnforceEvaluateAnswer.class, bo); |
| | | validEntityBeforeSave(add); |
| | | return this.save(add); |
| | | } |
| | | |
| | | @Override//修改 |
| | | @Transactional |
| | | public Boolean updateByBo(EnforceEvaluateAnswerBo bo) |
| | | { |
| | | EnforceEvaluateAnswer update = Convert.convert(EnforceEvaluateAnswer.class, bo); |
| | | validEntityBeforeSave(update); |
| | | return this.updateById(update); |
| | | } |
| | | |
| | | @Override//删除 |
| | | @Transactional |
| | | public Boolean deleteByIds(Collection<Long> ids) |
| | | { |
| | | |
| | | //做一些业务上的校验,判断是否需要校验 |
| | | |
| | | return this.removeByIds(ids); |
| | | } |
| | | |
| | | |
| | | //------------------------------------------------------------------------------------- |
| | | |
| | | //保存前校验 |
| | | private void validEntityBeforeSave(EnforceEvaluateAnswer entity) |
| | | { |
| | | //做一些数据校验,如唯一约束 |
| | | } |
| | | |
| | | //获取查询参数 |
| | | private QueryWrapper<EnforceEvaluateAnswer> getQw(EnforceEvaluateAnswerQueryBo bo) |
| | | { |
| | | QueryWrapper<EnforceEvaluateAnswer> qw = Wrappers.query(); |
| | | |
| | | qw.like(StringUtils.isNotEmpty(bo.getAnswerName()), "answer_name", bo.getAnswerName()); |
| | | qw.eq(bo.getQuestionId() != null, "question_id", bo.getQuestionId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getQuestionName()), "question_name", bo.getQuestionName()); |
| | | qw.eq(bo.getIsScore() != null, "is_score", bo.getIsScore()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getAnswerRemark()), "answer_remark", bo.getAnswerRemark()); |
| | | qw.eq(bo.getAnswerStatus() != null, "answer_status", bo.getAnswerStatus()); |
| | | if (StringUtils.isNotEmpty(bo.getIsAsc()) && StringUtils.isNotEmpty(bo.getOrderByColumn())){ |
| | | if ("acs".equals(bo.getIsAsc())) { |
| | | qw.orderByAsc(bo.getOrderByColumn()); |
| | | } else if ("desc".equals(bo.getIsAsc())) { |
| | | qw.orderByDesc(bo.getOrderByColumn()); |
| | | } |
| | | } |
| | | return qw; |
| | | } |
| | | } |
| | |
| | | package com.project.enforce.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.project.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateQuestionVo; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateQuestionBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceEvaluateQuestionQueryBo; |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | import com.project.enforce.mapper.EnforceEvaluateQuestionMapper; |
| | | import com.project.enforce.service.IEnforceEvaluateQuestionService; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 执法评价题目Service业务层处理 |
| | |
| | | |
| | | |
| | | |
| | | @Override//列表查询 |
| | | public List<EnforceEvaluateQuestionVo> queryList(EnforceEvaluateQuestionQueryBo bo) |
| | | { |
| | | QueryWrapper<EnforceEvaluateQuestion> qw = getQw(bo); |
| | | List<EnforceEvaluateQuestion> list = this.list(qw); |
| | | return Convert.toList(EnforceEvaluateQuestionVo.class , list); |
| | | } |
| | | |
| | | @Override//id查询 |
| | | public EnforceEvaluateQuestionVo queryById(Long questionId) |
| | | { |
| | | EnforceEvaluateQuestion db = this.baseMapper.selectById(questionId); |
| | | return Convert.convert(EnforceEvaluateQuestionVo.class , db); |
| | | } |
| | | |
| | | |
| | | @Override//添加 |
| | | @Transactional |
| | | public Boolean insertByBo(EnforceEvaluateQuestionBo bo) |
| | | { |
| | | EnforceEvaluateQuestion add = Convert.convert(EnforceEvaluateQuestion.class, bo); |
| | | validEntityBeforeSave(add); |
| | | return this.save(add); |
| | | } |
| | | |
| | | @Override//修改 |
| | | @Transactional |
| | | public Boolean updateByBo(EnforceEvaluateQuestionBo bo) |
| | | { |
| | | EnforceEvaluateQuestion update = Convert.convert(EnforceEvaluateQuestion.class, bo); |
| | | validEntityBeforeSave(update); |
| | | return this.updateById(update); |
| | | } |
| | | |
| | | @Override//删除 |
| | | @Transactional |
| | | public Boolean deleteByIds(Collection<Long> ids) |
| | | { |
| | | |
| | | //做一些业务上的校验,判断是否需要校验 |
| | | |
| | | return this.removeByIds(ids); |
| | | } |
| | | |
| | | |
| | | //------------------------------------------------------------------------------------- |
| | | |
| | | //保存前校验 |
| | | private void validEntityBeforeSave(EnforceEvaluateQuestion entity) |
| | | { |
| | | //做一些数据校验,如唯一约束 |
| | | } |
| | | |
| | | //获取查询参数 |
| | | private QueryWrapper<EnforceEvaluateQuestion> getQw(EnforceEvaluateQuestionQueryBo bo) |
| | | { |
| | | QueryWrapper<EnforceEvaluateQuestion> qw = Wrappers.query(); |
| | | |
| | | qw.like(StringUtils.isNotEmpty(bo.getQuestionName()), "question_name", bo.getQuestionName()); |
| | | qw.eq(bo.getQuestionScore() != null, "question_score", bo.getQuestionScore()); |
| | | qw.eq(bo.getQuestionStatus() != null, "question_status", bo.getQuestionStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getAnswerIds()), "answer_ids", bo.getAnswerIds()); |
| | | if (StringUtils.isNotEmpty(bo.getIsAsc()) && StringUtils.isNotEmpty(bo.getOrderByColumn())){ |
| | | if ("acs".equals(bo.getIsAsc())) { |
| | | qw.orderByAsc(bo.getOrderByColumn()); |
| | | } else if ("desc".equals(bo.getIsAsc())) { |
| | | qw.orderByDesc(bo.getOrderByColumn()); |
| | | } |
| | | } |
| | | return qw; |
| | | } |
| | | } |
New file |
| | |
| | | package com.project.enforce.service.impl; |
| | | |
| | | import com.project.common.exception.base.BaseException; |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.enforce.domain.EnforceEvaluateAnswer; |
| | | import com.project.enforce.domain.EnforceEvaluateQuestion; |
| | | import com.project.enforce.domain.bo.editBo.EnforceEvaluateBo; |
| | | import com.project.enforce.domain.vo.EnforceEvaluateVo; |
| | | import com.project.enforce.service.IEnforceEvaluateAnswerService; |
| | | import com.project.enforce.service.IEnforceEvaluateQuestionService; |
| | | import com.project.enforce.service.IEnforceEvaluateService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 功能描述: |
| | | * |
| | | * @author ZQN |
| | | * @version 1.0 |
| | | */ |
| | | |
| | | @Service |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | public class EnforceEvaluateServiceImpl implements IEnforceEvaluateService |
| | | { |
| | | |
| | | private final IEnforceEvaluateQuestionService questionService; |
| | | private final IEnforceEvaluateAnswerService answerService; |
| | | |
| | | |
| | | @Override//保存 |
| | | @Transactional |
| | | public Boolean save(EnforceEvaluateBo bo) |
| | | { |
| | | List<EnforceEvaluateQuestion> questionList = bo.getQuestionList(); |
| | | if (StringUtils.isEmpty(questionList)){ |
| | | throw new BaseException("题目不可为空!"); |
| | | } |
| | | for (EnforceEvaluateQuestion question : bo.getQuestionList()) { |
| | | if (question.getQuestionType()==1 && StringUtils.isEmpty(question.getAnswerList())){ |
| | | throw new BaseException("选择类型答案不可为空!"); |
| | | } |
| | | if (question.getQuestionId()==null){ |
| | | int count = questionService.count(questionService.lq() |
| | | .eq(EnforceEvaluateQuestion::getQuestionName, question.getQuestionId())); |
| | | if (count>0) { |
| | | throw new BaseException(StringUtils.format("{},题目重复,请重试!", question.getQuestionName())); |
| | | } |
| | | if (StringUtils.isNotEmpty(question.getAnswerList())){ |
| | | EnforceEvaluateQuestion one = questionService.getOne(questionService.lq().eq(EnforceEvaluateQuestion::getQuestionName, question.getQuestionName())); |
| | | question.getAnswerList().forEach(enforceEvaluateAnswer -> { |
| | | enforceEvaluateAnswer.setQuestionId(one.getQuestionId()); |
| | | enforceEvaluateAnswer.setQuestionName(one.getQuestionName()); |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | int count = questionService.count(questionService.lq(). |
| | | eq(EnforceEvaluateQuestion::getQuestionName, question.getQuestionId()) |
| | | .ne(EnforceEvaluateQuestion::getQuestionId,question.getQuestionId())); |
| | | if (count>0) { |
| | | throw new BaseException(StringUtils.format("{},题目重复,请重试!", question.getQuestionName())); |
| | | } |
| | | } |
| | | questionService.saveOrUpdate(question); |
| | | if (StringUtils.isNotEmpty(question.getAnswerList())){ |
| | | answerService.saveOrUpdateBatch(question.getAnswerList()); |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public EnforceEvaluateVo getInfo() |
| | | { |
| | | EnforceEvaluateVo vo = new EnforceEvaluateVo(); |
| | | List<EnforceEvaluateQuestion> questionList = questionService.list(); |
| | | for (EnforceEvaluateQuestion question : questionList) { |
| | | if (question.getQuestionType()==1){ |
| | | List<EnforceEvaluateAnswer> answerList = answerService.list(answerService.lq().eq(EnforceEvaluateAnswer::getQuestionId, question.getQuestionId())); |
| | | question.setAnswerList(answerList); |
| | | } |
| | | } |
| | | vo.setQuestionList(questionList); |
| | | return vo; |
| | | } |
| | | } |
| | |
| | | package com.project.enforce.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.project.common.utils.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.project.common.annotation.DataScope; |
| | | import com.project.common.constant.CheckLevelCodeConstants; |
| | | import com.project.common.core.domain.entity.SysRole; |
| | | import com.project.common.core.domain.entity.SysUser; |
| | | import com.project.common.exception.base.BaseException; |
| | | import com.project.common.utils.SecurityUtils; |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.enforce.domain.EnforceOrder; |
| | | import com.project.enforce.domain.bo.editBo.EnforceOrderBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceOrderQueryBo; |
| | | import com.project.enforce.domain.EnforceOrder; |
| | | import com.project.enforce.domain.vo.EnforceOrderVo; |
| | | import com.project.enforce.mapper.EnforceOrderMapper; |
| | | import com.project.enforce.service.IEnforceOrderService; |
| | | import com.project.system.service.ISysDeptService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 执法单Service业务层处理 |
| | |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | public class EnforceOrderServiceImpl extends ServiceImpl<EnforceOrderMapper, EnforceOrder> implements IEnforceOrderService { |
| | | |
| | | private final ISysDeptService deptService; |
| | | |
| | | |
| | | @Override//列表查询 |
| | | @DataScope(deptAlias = "apply_dept_id", userAlias = "apply_user_id") |
| | | public List<EnforceOrderVo> queryList(EnforceOrderQueryBo bo) |
| | | { |
| | | QueryWrapper<EnforceOrder> qw = getQw(bo); |
| | | qw.apply(bo.getParams().get("dataScope") != null, bo.getParams().get("dataScope").toString());//数据权限控制 |
| | | List<EnforceOrder> list = this.list(qw); |
| | | return Convert.toList(EnforceOrderVo.class , list); |
| | | } |
| | | |
| | | @Override//待审核列表 |
| | | public List<EnforceOrderVo> queryCheckList(EnforceOrderQueryBo bo) |
| | | { |
| | | SysUser loginUser = SecurityUtils.getLoginUser().getUser(); |
| | | if (!"01".equals(loginUser.getUserType())) { |
| | | throw new BaseException("您没有审批权限,请重试!"); |
| | | } |
| | | List<String> roleKeys = loginUser.getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.toList()); |
| | | if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE) && roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)){ |
| | | bo.setCheckLevel(null); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_ONE)){ |
| | | bo.setCheckLevel(0); |
| | | } else if (roleKeys.contains(CheckLevelCodeConstants.CHECK_LEVEL_TWO)) { |
| | | bo.setCheckLevel(1); |
| | | } else { |
| | | throw new BaseException("您没有审批权限,请重试!"); |
| | | } |
| | | bo.setCheckDeptId(deptService.getCheckDeptIdByLoginDeptId(loginUser.getDeptId())); |
| | | |
| | | return this.baseMapper.selectCheckList(bo); |
| | | } |
| | | |
| | | @Override//id查询 |
| | |
| | | //保存前校验 |
| | | private void validEntityBeforeSave(EnforceOrder entity) |
| | | { |
| | | //做一些数据校验,如唯一约束 |
| | | if (entity.getOrderId()==null){ |
| | | entity.setCheckDeptId(deptService.getCheckDeptIdByLoginDeptId(entity.getApplyDeptId())); |
| | | } |
| | | } |
| | | |
| | | //获取查询参数 |
| | |
| | | { |
| | | QueryWrapper<EnforceOrder> qw = Wrappers.query(); |
| | | |
| | | qw.eq(StringUtils.isNotEmpty(bo.getOrderNo()), "order_no", bo.getOrderNo()); |
| | | qw.eq(bo.getCompanyId() != null, "company_id", bo.getCompanyId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getCompanyName()), "company_name", bo.getCompanyName()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyCode()), "company_code", bo.getCompanyCode()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyUser()), "company_user", bo.getCompanyUser()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyPhone()), "company_phone", bo.getCompanyPhone()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyAddress()), "company_address", bo.getCompanyAddress()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionCode()), "region_code", bo.getRegionCode()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getRegionName()), "region_name", bo.getRegionName()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getEnforceReason()), "enforce_reason", bo.getEnforceReason()); |
| | | qw.eq(bo.getApplyId() != null, "apply_id", bo.getApplyId()); |
| | | qw.eq(bo.getApplyUser() != null, "apply_user", bo.getApplyUser()); |
| | | qw.eq(bo.getApplyPhone() != null, "apply_phone", bo.getApplyPhone()); |
| | | qw.eq(bo.getApplyDeptId() != null, "apply_dept_id", bo.getApplyDeptId()); |
| | | qw.like(bo.getApplyDeptName() != null, "apply_dept_name", bo.getApplyDeptName()); |
| | | qw.eq(bo.getApplyTime() != null, "apply_time", bo.getApplyTime()); |
| | | qw.eq(bo.getWarnStatus() != null, "warn_status", bo.getWarnStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getWarnReason()), "warn_reason", bo.getWarnReason()); |
| | | qw.eq(bo.getOrderStatus() != null, "order_status", bo.getOrderStatus()); |
| | | qw.eq(bo.getCheckId() != null, "check_id", bo.getCheckId()); |
| | | qw.eq(bo.getCheckUser() != null, "check_user", bo.getCheckUser()); |
| | | qw.eq(bo.getCheckPhone() != null, "check_phone", bo.getCheckPhone()); |
| | | qw.eq(bo.getCheckDeptId() != null, "check_dept_id", bo.getCheckDeptId()); |
| | | qw.like(bo.getCheckDeptName() != null, "check_dept_name", bo.getCheckDeptName()); |
| | | qw.eq(bo.getCheckTime() != null, "check_time", bo.getCheckTime()); |
| | | qw.eq(bo.getCheckStatus() != null, "check_status", bo.getCheckStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCheckReason()), "check_reason", bo.getCheckReason()); |
| | | qw.eq(bo.getExecuteId() != null, "execute_id", bo.getExecuteId()); |
| | | qw.eq(bo.getExecuteUser() != null, "execute_user", bo.getExecuteUser()); |
| | | qw.eq(bo.getExecutePhone() != null, "execute_phone", bo.getExecutePhone()); |
| | | qw.eq(bo.getExecuteDeptId() != null, "execute_dept_id", bo.getExecuteDeptId()); |
| | | qw.like(bo.getExecuteDeptName() != null, "execute_dept_name", bo.getExecuteDeptName()); |
| | | qw.eq(bo.getExecuteTime() != null, "execute_time", bo.getExecuteTime()); |
| | | qw.eq(bo.getRegionStatus() != null, "region_status", bo.getRegionStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionReason()), "region_reason", bo.getRegionReason()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionImgs()), "region_imgs", bo.getRegionImgs()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionVideos()), "region_videos", bo.getRegionVideos()); |
| | | qw.eq(bo.getIsNoticeCompany() != null, "is_notice_company", bo.getIsNoticeCompany()); |
| | | qw.eq(bo.getIsShow() != null, "is_show", bo.getIsShow()); |
| | | qw.eq(bo.getIsEva() != null, "is_eva", bo.getIsEva()); |
| | | qw.eq(bo.getTotalScore() != null, "total_score", bo.getTotalScore()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getOrderNo()), "order_no", bo.getOrderNo()); |
| | | qw.eq(bo.getCompanyId() != null, "company_id", bo.getCompanyId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getCompanyName()), "company_name", bo.getCompanyName()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyCode()), "company_code", bo.getCompanyCode()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyUser()), "company_user", bo.getCompanyUser()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyPhone()), "company_phone", bo.getCompanyPhone()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyAddress()), "company_address", bo.getCompanyAddress()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionCode()), "region_code", bo.getRegionCode()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getRegionName()), "region_name", bo.getRegionName()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getEnforceReason()), "enforce_reason", bo.getEnforceReason()); |
| | | qw.eq(bo.getApplyId() != null, "apply_id", bo.getApplyId()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getApplyUser()), "apply_user", bo.getApplyUser()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getApplyPhone()), "apply_phone", bo.getApplyPhone()); |
| | | qw.eq(bo.getApplyDeptId() != null, "apply_dept_id", bo.getApplyDeptId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getApplyDeptName()), "apply_dept_name", bo.getApplyDeptName()); |
| | | qw.eq(bo.getApplyTime() != null, "apply_time", bo.getApplyTime()); |
| | | qw.eq(bo.getUserNum() != null, "user_num", bo.getUserNum()); |
| | | qw.eq(bo.getWarnStatus() != null, "warn_status", bo.getWarnStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getWarnReason()), "warn_reason", bo.getWarnReason()); |
| | | qw.eq(bo.getOrderStatus() != null, "order_status", bo.getOrderStatus()); |
| | | qw.eq(bo.getCheckDeptId() != null, "check_dept_id", bo.getCheckDeptId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getCheckDeptName()), "check_dept_name", bo.getCheckDeptName()); |
| | | qw.eq(bo.getCheckStatus() != null, "check_status", bo.getCheckStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCheckReason()), "check_reason", bo.getCheckReason()); |
| | | qw.eq(bo.getCheckLevel() != null, "check_level", bo.getCheckLevel()); |
| | | qw.eq(bo.getExecuteId() != null, "execute_id", bo.getExecuteId()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getExecuteUser()), "execute_user", bo.getExecuteUser()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getExecutePhone()), "execute_phone", bo.getExecutePhone()); |
| | | qw.eq(bo.getExecuteDeptId() != null, "execute_dept_id", bo.getExecuteDeptId()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getExecuteDeptName()), "execute_dept_name", bo.getExecuteDeptName()); |
| | | qw.eq(bo.getExecuteTime() != null, "execute_time", bo.getExecuteTime()); |
| | | qw.eq(bo.getRegionStatus() != null, "region_status", bo.getRegionStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionReason()), "region_reason", bo.getRegionReason()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionImgs()), "region_imgs", bo.getRegionImgs()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionVideos()), "region_videos", bo.getRegionVideos()); |
| | | qw.eq(bo.getIsNoticeCompany() != null, "is_notice_company", bo.getIsNoticeCompany()); |
| | | qw.eq(bo.getIsShow() != null, "is_show", bo.getIsShow()); |
| | | qw.eq(bo.getIsEva() != null, "is_eva", bo.getIsEva()); |
| | | qw.eq(bo.getTotalScore() != null, "total_score", bo.getTotalScore()); |
| | | if (StringUtils.isNotEmpty(bo.getIsAsc()) && StringUtils.isNotEmpty(bo.getOrderByColumn())){ |
| | | if ("acs".equals(bo.getIsAsc())) { |
| | | qw.orderByAsc(bo.getOrderByColumn()); |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.project.enforce.mapper.EnforceOrderMapper"> |
| | | |
| | | |
| | | <resultMap type="EnforceOrder" id="EnforceOrderResult"> |
| | | <result property="orderId" column="order_id" /> |
| | | <result property="orderNo" column="order_no" /> |
| | |
| | | <result property="applyDeptId" column="apply_dept_id" /> |
| | | <result property="applyDeptName" column="apply_dept_name" /> |
| | | <result property="applyTime" column="apply_time" /> |
| | | <result property="userNum" column="user_num" /> |
| | | <result property="warnStatus" column="warn_status" /> |
| | | <result property="warnReason" column="warn_reason" /> |
| | | <result property="orderStatus" column="order_status" /> |
| | | <result property="checkId" column="check_id" /> |
| | | <result property="checkUser" column="check_user" /> |
| | | <result property="checkPhone" column="check_phone" /> |
| | | <result property="checkDeptId" column="check_dept_id" /> |
| | | <result property="checkDeptName" column="check_dept_name" /> |
| | | <result property="checkTime" column="check_time" /> |
| | | <result property="checkStatus" column="check_status" /> |
| | | <result property="checkReason" column="check_reason" /> |
| | | <result property="checkLevel" column="check_level" /> |
| | | <result property="executeId" column="execute_id" /> |
| | | <result property="executeUser" column="execute_user" /> |
| | | <result property="executePhone" column="execute_phone" /> |
| | |
| | | <result property="delFlag" column="del_flag" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectEnforceOrderVo"> |
| | | select order_id, order_no, company_id, company_name, company_code, company_user, company_phone, company_address, |
| | | region_code,region_name,enforce_reason,user_num, |
| | | apply_id,apply_user,apply_phone,apply_dept_id,apply_dept_name,apply_time, |
| | | warn_status,warn_reason,order_status, |
| | | check_dept_id,check_dept_name,check_status,check_reason,check_level, |
| | | execute_id,execute_user,execute_phone,execute_dept_id,execute_dept_name,execute_time, |
| | | region_status,region_reason,region_imgs,region_videos,is_notice_company,is_show,is_eva,total_score |
| | | from sys_job_log |
| | | </sql> |
| | | |
| | | <select id="selectCheckList" parameterType="EnforceOrderQueryBo" resultMap="EnforceOrderResult"> |
| | | <include refid="selectEnforceOrderVo"/> |
| | | <where> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | AND order_no like concat('%', #{orderNo}, '%') |
| | | </if> |
| | | <if test="companyName != null and companyName != ''"> |
| | | AND company_name like concat('%', #{companyName}, '%') |
| | | </if> |
| | | |
| | | </mapper> |
| | | <if test="orderStatus != null and orderStatus != ''"> |
| | | AND order_status = #{orderStatus} |
| | | </if> |
| | | |
| | | <if test="checkDeptId != null "> |
| | | AND check_dept_id = #{checkDeptId} |
| | | </if> |
| | | |
| | | <if test="checkLevel != null "> |
| | | AND check_level = #{checkLevel} |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package com.project.framework.aspectj; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.springframework.stereotype.Component; |
| | | import com.project.common.annotation.DataScope; |
| | | import com.project.common.core.domain.BaseEntity; |
| | | import com.project.common.core.domain.entity.SysRole; |
| | |
| | | import com.project.common.utils.SecurityUtils; |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.framework.security.context.PermissionContextHolder; |
| | | import org.aspectj.lang.JoinPoint; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 数据过滤处理 |
| | |
| | | * 仅本人数据权限 |
| | | */ |
| | | public static final String DATA_SCOPE_SELF = "5"; |
| | | |
| | | /** |
| | | * 本机构数据权限 |
| | | */ |
| | | public static final String DATA_SCOPE_ORG = "6"; |
| | | |
| | | /** |
| | | * 数据权限过滤关键字 |
| | |
| | | else if (DATA_SCOPE_CUSTOM.equals(dataScope)) |
| | | { |
| | | sqlString.append(StringUtils.format( |
| | | " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, |
| | | " OR {} IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, |
| | | role.getRoleId())); |
| | | } |
| | | else if (DATA_SCOPE_DEPT.equals(dataScope)) |
| | |
| | | else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) |
| | | { |
| | | sqlString.append(StringUtils.format( |
| | | " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", |
| | | " OR {} IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", |
| | | deptAlias, user.getDeptId(), user.getDeptId())); |
| | | } |
| | | else if (DATA_SCOPE_ORG.equals(dataScope)) |
| | | { |
| | | sqlString.append(StringUtils.format( |
| | | " OR {} IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", |
| | | deptAlias, user.getRecommendUser(), user.getRecommendUser())); |
| | | } |
| | | else if (DATA_SCOPE_SELF.equals(dataScope)) |
| | | { |
| | | if (StringUtils.isNotBlank(userAlias)) |
| | | { |
| | | sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId())); |
| | | sqlString.append(StringUtils.format(" OR {} = {} ", userAlias, user.getUserId())); |
| | | } |
| | | else |
| | | { |
| | | // 数据权限为仅本人且没有userAlias别名不查询任何数据 |
| | | sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias)); |
| | | sqlString.append(StringUtils.format(" OR {}= = 0 ", deptAlias)); |
| | | } |
| | | } |
| | | conditions.add(dataScope); |
| | |
| | | package com.project.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.project.common.core.domain.BaseDomain; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.experimental.Accessors; |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | /** |
| | | * 企业信息对象 sys_company |
| | | * |
| | |
| | | @ApiModelProperty("企业状态:0正常,1禁用") |
| | | private Integer companyStatus; |
| | | |
| | | @ApiModelProperty("企业类型") |
| | | private String companyType; |
| | | |
| | | @ApiModelProperty("企业来源:0注册,1导入") |
| | | private Integer isImport; |
| | | |
| | | |
| | | @ApiModelProperty("所属区域编码") |
| | | private String regionCode; |
| | |
| | | package com.project.system.domain.bo.editBo; |
| | | |
| | | import com.project.common.core.domain.BaseDomain; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | @ApiModelProperty("企业状态:0正常,1禁用") |
| | | private Integer companyStatus; |
| | | |
| | | @ApiModelProperty("企业类型") |
| | | private String companyType; |
| | | |
| | | @ApiModelProperty("企业来源:0注册,1导入") |
| | | private Integer isImport; |
| | | |
| | | /** 所属区域编码 */ |
| | | @ApiModelProperty("所属区域编码") |
| | | private String regionCode; |
| | |
| | | /** 企业状态:0正常,1禁用 */ |
| | | @ApiModelProperty("企业状态:0正常,1禁用") |
| | | private Integer companyStatus; |
| | | |
| | | @ApiModelProperty("企业类型") |
| | | private String companyType; |
| | | |
| | | @ApiModelProperty("企业来源:0注册,1导入") |
| | | private Integer isImport; |
| | | |
| | | /** 所属区域编码 */ |
| | | @ApiModelProperty("所属区域编码") |
| | | private String regionCode; |
| | |
| | | package com.project.system.domain.vo; |
| | | |
| | | import com.project.common.annotation.Excel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.project.common.annotation.Excel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty("订单状态:-1拒绝,0待审批,1审批中,2通过") |
| | | private Integer checkStatus; |
| | | |
| | | @ApiModelProperty("企业类型") |
| | | private String companyType; |
| | | |
| | | @ApiModelProperty("企业来源:0注册,1导入") |
| | | private Integer isImport; |
| | | |
| | | @ApiModelProperty("审批说明") |
| | | private String checkReason; |
| | | |
| | |
| | | @ApiModelProperty("自定义排序") |
| | | private Integer sortNum; |
| | | |
| | | /** 创建人 */ |
| | | @Excel(name = "创建人") |
| | | @ApiModelProperty("创建人") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** 更新人 */ |
| | | @Excel(name = "更新人") |
| | | @ApiModelProperty("更新人") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | /** 备注 */ |
| | | @Excel(name = "备注") |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | |
| | | package com.project.system.service; |
| | | |
| | | import java.util.List; |
| | | import com.project.common.core.domain.TreeSelect; |
| | | import com.project.common.core.domain.entity.SysDept; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 部门管理 服务层 |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteDeptById(Long deptId); |
| | | |
| | | |
| | | |
| | | public Long getCheckDeptIdByLoginDeptId(Long deptId); |
| | | } |
| | |
| | | */ |
| | | private void validEntityBeforeSave(SysCompany entity, int isImport) |
| | | { |
| | | entity.setIsImport(isImport); |
| | | if (isImport!=1){ |
| | | if (StringUtils.isEmpty(entity.getCompanyImg())){ |
| | | throw new BaseException(String.format("%1$s,请上传营业执照", entity.getCompanyName())); |
| | |
| | | SysCompany one = this.getOne(lq().eq(SysCompany::getCompanyCode, entity.getCompanyCode())); |
| | | String phone = entity.getCompanyPhone(); |
| | | user.setPhonenumber(phone); |
| | | user.setUserName(entity.getCompanyUser()); |
| | | user.setUserName(phone); |
| | | user.setNickName(entity.getCompanyUser()); |
| | | user.setPassword(phone); |
| | | user.setDeptId(one.getCompanyId()); |
| | | user.setUserType("02"); |
| | |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyPhone()), "company_phone", bo.getCompanyPhone()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyAddress()), "company_address", bo.getCompanyAddress()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyImg()), "company_img", bo.getCompanyImg()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getCompanyType()), "company_type", bo.getCompanyType()); |
| | | qw.eq(bo.getIsImport() != null, "is_import", bo.getIsImport()); |
| | | qw.eq(bo.getCompanyStatus() != null, "company_status", bo.getCompanyStatus()); |
| | | qw.eq(StringUtils.isNotEmpty(bo.getRegionCode()), "region_code", bo.getRegionCode()); |
| | | qw.like(StringUtils.isNotEmpty(bo.getRegionName()), "region_name", bo.getRegionName()); |
| | |
| | | package com.project.system.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.project.common.annotation.DataScope; |
| | | import com.project.common.constant.UserConstants; |
| | | import com.project.common.core.domain.TreeSelect; |
| | |
| | | import com.project.system.mapper.SysDeptMapper; |
| | | import com.project.system.mapper.SysRoleMapper; |
| | | import com.project.system.service.ISysDeptService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 部门管理 服务实现 |
| | |
| | | return deptMapper.deleteDeptById(deptId); |
| | | } |
| | | |
| | | @Override |
| | | public Long getCheckDeptIdByLoginDeptId(Long deptId) |
| | | { |
| | | SysDept loginDept = selectDeptById(deptId); |
| | | if (loginDept.getParentId()==101){ |
| | | return loginDept.getDeptId(); |
| | | } else { |
| | | return getCheckDeptIdByLoginDeptId(loginDept.getParentId()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 递归列表 |
| | | */ |
| | |
| | | <id property="dictId" column="dict_id" /> |
| | | <result property="dictName" column="dict_name" /> |
| | | <result property="dictType" column="dict_type" /> |
| | | <result property="isSystem" column="is_system" /> |
| | | <result property="status" column="status" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDictTypeVo"> |
| | | select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
| | | select dict_id, dict_name, dict_type,is_system, status, create_by, create_time, remark |
| | | from sys_dict_type |
| | | </sql> |
| | | |
| | |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="isSystem != null"> |
| | | AND is_system = #{isSystem} |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | |
| | | <set> |
| | | <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> |
| | | <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> |
| | | <if test="isSystem != null ">is_system = #{isSystem},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | |
| | | insert into sys_dict_type( |
| | | <if test="dictName != null and dictName != ''">dict_name,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |
| | | <if test="isSystem != null ">is_system,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | |
| | | )values( |
| | | <if test="dictName != null and dictName != ''">#{dictName},</if> |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="isSystem != null ">#{isSystem},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |