| | |
| | | import com.gkhy.exam.framework.web.service.SysLoginService; |
| | | import com.gkhy.exam.framework.web.service.SysPermissionService; |
| | | import com.gkhy.exam.framework.web.service.TokenService; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.service.ISysMenuService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | @ApiOperation(value = "用户登录") |
| | | @PostMapping("/login") |
| | | public CommonResult login(@RequestBody LoginBody loginBody){ |
| | |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | |
| | | SysUser user = loginUser.getUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(user.getCompanyId()); |
| | | if (sysCompany!=null){ |
| | | user.setCompanyName(sysCompany.getName()); |
| | | } |
| | | // 角色集合 |
| | | Set<String> roles = permissionService.getRolePermission(user); |
| | | // 权限集合 |
对比新文件 |
| | |
| | | package com.gkhy.exam.admin.controller.web; |
| | | |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanyBasic; |
| | | import com.gkhy.exam.system.domain.CompanyCertificate; |
| | | import com.gkhy.exam.system.domain.CompanyQualityPolicy; |
| | | import com.gkhy.exam.system.domain.CompanySummary; |
| | | import com.gkhy.exam.system.service.CompanyBasicService; |
| | | import com.gkhy.exam.system.service.CompanyCertificateService; |
| | | import com.gkhy.exam.system.service.CompanyQualityPolicyService; |
| | | import com.gkhy.exam.system.service.CompanySummaryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "企业基础信息管理") |
| | | @RestController |
| | | @RequestMapping("/company") |
| | | public class CompanyBasicController { |
| | | |
| | | @Autowired |
| | | private CompanyBasicService companyBasicService; |
| | | @Autowired |
| | | private CompanyCertificateService companyCertificateService; |
| | | @Autowired |
| | | private CompanySummaryService companySummaryService; |
| | | @Autowired |
| | | private CompanyQualityPolicyService companyQualityPolicyService; |
| | | |
| | | /** |
| | | * 企业基础信息列表 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业基础信息列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/basic/list") |
| | | public CommonResult listCompanyBasic(Integer companyId){ |
| | | return CommonResult.success(companyBasicService.selectCompanyBasicList(companyId)); |
| | | } |
| | | |
| | | /** |
| | | * 企业基础信息新增 |
| | | * @param companyBasic |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业基础信息新增") |
| | | @PostMapping("/basic/insert") |
| | | public CommonResult insertCompanyBasic(@RequestBody CompanyBasic companyBasic){ |
| | | return companyBasicService.insertCompanyBasic(companyBasic); |
| | | } |
| | | |
| | | /** |
| | | * 企业基础信息修改 |
| | | * @param companyBasic |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业基础信息修改") |
| | | @PostMapping("/basic/update") |
| | | public CommonResult updateCompanyBasic(@RequestBody CompanyBasic companyBasic){ |
| | | return companyBasicService.updateCompanyBasic(companyBasic); |
| | | } |
| | | |
| | | /** |
| | | * 企业基础信息删除 |
| | | * @param companyBasicId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业基础信息删除") |
| | | @GetMapping("/basic/deleted") |
| | | public CommonResult deletedCompanyBasic(@RequestParam("companyBasicId") Integer companyBasicId){ |
| | | return companyBasicService.deletedCompanyBasic(companyBasicId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 企业概况列表 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业概括列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/summary/list") |
| | | public CommonResult listCompanySummary(Integer companyId){ |
| | | return CommonResult.success(companySummaryService.selectCompanySummaryList(companyId)); |
| | | } |
| | | |
| | | /** |
| | | * 企业概况新增 |
| | | * @param companySummary |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业概况新增") |
| | | @PostMapping("/summary/insert") |
| | | public CommonResult insertCompanySummary(@RequestBody CompanySummary companySummary){ |
| | | return companySummaryService.insertCompanySummary(companySummary); |
| | | } |
| | | |
| | | /** |
| | | * 企业概况修改 |
| | | * @param companySummary |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业概况修改") |
| | | @PostMapping("/summary/update") |
| | | public CommonResult updateCompanySummary(@RequestBody CompanySummary companySummary){ |
| | | return companySummaryService.updateCompanySummary(companySummary); |
| | | } |
| | | |
| | | /** |
| | | * 企业概况删除 |
| | | * @param companySummaryId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业概况删除") |
| | | @GetMapping("/summary/deleted") |
| | | public CommonResult deletedCompanySummary(@RequestParam("companySummaryId") Integer companySummaryId){ |
| | | return companySummaryService.deletedCompanySummary(companySummaryId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 企业资质列表 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业资质列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/certificate/list") |
| | | public CommonResult listCompanyCertificate(Integer companyId){ |
| | | return CommonResult.success(companyCertificateService.selectCompanyCertificateList(companyId)); |
| | | } |
| | | |
| | | /** |
| | | * 企业资质新增 |
| | | * @param companyCertificate |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业资质新增") |
| | | @PostMapping("/certificate/insert") |
| | | public CommonResult insertCompanyCertificate(@RequestBody CompanyCertificate companyCertificate){ |
| | | return companyCertificateService.insertCompanyCertificate(companyCertificate); |
| | | } |
| | | |
| | | /** |
| | | * 企业资质修改 |
| | | * @param companyCertificate |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业资质修改") |
| | | @PostMapping("/certificate/update") |
| | | public CommonResult updateCompanyCertificate(@RequestBody CompanyCertificate companyCertificate){ |
| | | return companyCertificateService.updateCompanyCertificate(companyCertificate); |
| | | } |
| | | |
| | | /** |
| | | * 企业资质删除 |
| | | * @param companyCertificateId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业资质删除") |
| | | @GetMapping("/certificate/deleted") |
| | | public CommonResult deletedCompanyCertificate(@RequestParam("companyCertificateId") Integer companyCertificateId){ |
| | | return companyCertificateService.deletedCompanyCertificate(companyCertificateId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 企业质量方针列表 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业质量方针列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/policy/list") |
| | | public CommonResult listCompanyQualityPolicy(Integer companyId){ |
| | | return CommonResult.success(companyQualityPolicyService.selectCompanyQualityPolicyList(companyId)); |
| | | } |
| | | |
| | | /** |
| | | * 企业质量方针新增 |
| | | * @param companyQualityPolicy |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业质量方针新增") |
| | | @PostMapping("/policy/insert") |
| | | public CommonResult insertCompanyQualityPolicy(@RequestBody CompanyQualityPolicy companyQualityPolicy){ |
| | | return companyQualityPolicyService.insertCompanyQualityPolicy(companyQualityPolicy); |
| | | } |
| | | |
| | | /** |
| | | * 企业质量方针修改 |
| | | * @param companyQualityPolicy |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业质量方针修改") |
| | | @PostMapping("/policy/update") |
| | | public CommonResult updateCompanyQualityPolicy(@RequestBody CompanyQualityPolicy companyQualityPolicy){ |
| | | return companyQualityPolicyService.updateCompanyQualityPolicy(companyQualityPolicy); |
| | | } |
| | | |
| | | /** |
| | | * 企业质量方针删除 |
| | | * @param qualityPolicyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "企业质量方针删除") |
| | | @GetMapping("/policy/deleted") |
| | | public CommonResult deletedCompanyQualityPolicy(@RequestParam("qualityPolicyId") Integer qualityPolicyId){ |
| | | return companyQualityPolicyService.deletedCompanyQualityPolicy(qualityPolicyId); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.admin.controller.web; |
| | | |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanyQualityPolicy; |
| | | import com.gkhy.exam.system.domain.Quality; |
| | | import com.gkhy.exam.system.domain.QualityAccomplish; |
| | | import com.gkhy.exam.system.domain.QualityDecompose; |
| | | import com.gkhy.exam.system.domain.req.DecomposeTargetReq; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | import com.gkhy.exam.system.domain.req.QualityTargetReq; |
| | | import com.gkhy.exam.system.service.QualityAccomplishService; |
| | | import com.gkhy.exam.system.service.QualityDecomposeService; |
| | | import com.gkhy.exam.system.service.QualityService; |
| | | import com.gkhy.exam.system.service.QualityTargetService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @Api(tags = "企业质量目标管理") |
| | | @RestController |
| | | @RequestMapping("/quality-target") |
| | | public class QualityController { |
| | | |
| | | @Autowired |
| | | private QualityService qualityService; |
| | | |
| | | @Autowired |
| | | private QualityTargetService qualityTargetService; |
| | | |
| | | @Autowired |
| | | private QualityAccomplishService qualityAccomplishService; |
| | | |
| | | @Autowired |
| | | private QualityDecomposeService qualityDecomposeService; |
| | | |
| | | |
| | | /** |
| | | * 质量目标列表 |
| | | * @param quality |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/policy/list") |
| | | public CommonResult listQuality(Quality quality){ |
| | | return CommonResult.success(qualityService.selectQualityList(quality)); |
| | | } |
| | | |
| | | @GetMapping("/policy/listAll") |
| | | public CommonResult listQualityAll(Quality quality){ |
| | | return CommonResult.success(qualityService.selectQualityListAll(quality)); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标新增 |
| | | * @param qualityTargetReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标新增") |
| | | @PostMapping("/policy/insert") |
| | | public CommonResult insertQuality(@RequestBody QualityTargetReq qualityTargetReq){ |
| | | return qualityService.insertQuality(qualityTargetReq); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标修改 |
| | | * @param qualityTargetReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标修改") |
| | | @PostMapping("/policy/update") |
| | | public CommonResult updateQuality(@RequestBody QualityTargetReq qualityTargetReq){ |
| | | return qualityService.updateQuality(qualityTargetReq); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标删除 |
| | | * @param qualityId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标删除") |
| | | @GetMapping("/policy/deleted") |
| | | public CommonResult deletedQuality(@RequestParam("qualityId") Integer qualityId){ |
| | | return qualityService.deletedQuality(qualityId); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标分解列表 |
| | | * @param qualityReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标分解列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/decompose/list") |
| | | public CommonResult listQualityDecompose(QualityReq qualityReq){ |
| | | return CommonResult.success(qualityDecomposeService.selectQualityDecomposeList(qualityReq)); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标分解新增 |
| | | * @param decomposeTargetReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标分解新增") |
| | | @PostMapping("/decompose/insert") |
| | | public CommonResult insertQualityDecompose(@RequestBody DecomposeTargetReq decomposeTargetReq){ |
| | | return qualityDecomposeService.insertQualityDecompose(decomposeTargetReq); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标分解修改 |
| | | * @param decomposeTargetReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标分解修改") |
| | | @PostMapping("/decompose/update") |
| | | public CommonResult updateQualityDecompose(@RequestBody DecomposeTargetReq decomposeTargetReq){ |
| | | return qualityDecomposeService.updateQualityDecompose(decomposeTargetReq); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标分解删除 |
| | | * @param decomposeId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标分解删除") |
| | | @GetMapping("/decompose/deleted") |
| | | public CommonResult deletedQualityDecompose(@RequestParam("qualityDecomposeId") Integer decomposeId){ |
| | | return qualityDecomposeService.deletedQualityDecompose(decomposeId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 质量目标完成情况列表 |
| | | * @param qualityReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标完成情况列表(分页)") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), |
| | | }) |
| | | @GetMapping("/accomplish/list") |
| | | public CommonResult listQualityAccomplish(QualityReq qualityReq){ |
| | | return CommonResult.success(qualityAccomplishService.selectQualityAccomplishList(qualityReq)); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标完成情况新增 |
| | | * @param qualityAccomplish |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标完成情况新增") |
| | | @PostMapping("/accomplish/insert") |
| | | public CommonResult insertQualityAccomplish(@RequestBody QualityAccomplish qualityAccomplish){ |
| | | return qualityAccomplishService.insertQualityAccomplish(qualityAccomplish); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标完成情况修改 |
| | | * @param qualityAccomplish |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标完成情况修改") |
| | | @PostMapping("/accomplish/update") |
| | | public CommonResult updateQualityAccomplish(@RequestBody QualityAccomplish qualityAccomplish){ |
| | | return qualityAccomplishService.updateQualityAccomplish(qualityAccomplish); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标完成情况删除 |
| | | * @param qualityAccomplishId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标完成情况删除") |
| | | @GetMapping("/accomplish/deleted") |
| | | public CommonResult deletedQualityAccomplish(@RequestParam("qualityAccomplishId") Integer qualityAccomplishId){ |
| | | return qualityAccomplishService.deletedQualityAccomplish(qualityAccomplishId); |
| | | } |
| | | |
| | | /** |
| | | * 质量目标对应数据 |
| | | * @param qualityId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量目标对应数据") |
| | | @GetMapping("/target/list") |
| | | public CommonResult selectTargetList(@RequestParam("qualityId") Integer qualityId){ |
| | | return qualityTargetService.selectTargetList(qualityId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:mysql://192.168.2.27:7006/train_exam?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | url: jdbc:mysql://192.168.2.2:7006/train_exam?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&allowMultiQueries=true |
| | | username: root |
| | | password: 2farwL3yPXfbH2AP |
| | | # 从库数据源 |
| | |
| | | #redis 配置 |
| | | redis: |
| | | database: 0 |
| | | host: 192.168.2.27 |
| | | host: 192.168.2.2 |
| | | port: 6379 |
| | | password: |
| | | |
| | |
| | | enabled: true |
| | | |
| | | minio: |
| | | endpoint: http://192.168.2.27:9000/ #Minio服务所在地址 |
| | | endpoint: http://192.168.2.2:9000/ #Minio服务所在地址 |
| | | bucketName: trainexam #存储桶名称 |
| | | accessKey: JuHGtYXvgJdeaPHcu5AI #访问的key |
| | | secretKey: mQhUsIYnD696ZFI2sJ6eQ77tmmoe9TTUavFg9Ien #访问的秘钥 |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("company_basic") |
| | | @ApiModel(value = "CompanyBasic对象", description = "企业基本信息") |
| | | public class CompanyBasic implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @NotNull(message = "企业ID不可为空") |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("company_name") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "企业基础信息") |
| | | @TableField("basic") |
| | | private String basic; |
| | | |
| | | @ApiModelProperty(value = "简介") |
| | | @TableField("introduce") |
| | | private String introduce; |
| | | |
| | | @ApiModelProperty(value = "目标及措施") |
| | | @TableField("target") |
| | | private String target; |
| | | |
| | | @ApiModelProperty(value = "质量及收益") |
| | | @TableField("quality") |
| | | private String quality; |
| | | |
| | | @ApiModelProperty(value = "结果及改良") |
| | | @TableField("activity") |
| | | private String activity; |
| | | |
| | | @ApiModelProperty(value = "内审项目及评审") |
| | | @TableField("audit") |
| | | private String audit; |
| | | |
| | | @ApiModelProperty(value = "公司外包") |
| | | @TableField("epiboly") |
| | | private String epiboly; |
| | | |
| | | @ApiModelProperty(value = "上次投入资源") |
| | | @TableField("resource") |
| | | private String resource; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("company_certificate") |
| | | @ApiModel(value = "company_certificate",description = "企业资质") |
| | | public class CompanyCertificate implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("company_name") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "企业资质证书名称") |
| | | @TableField("certificate_name") |
| | | private String certificateName; |
| | | |
| | | @ApiModelProperty(value = "企业资质证书编号") |
| | | @TableField("certificate_num") |
| | | private String certificateNum; |
| | | |
| | | @ApiModelProperty(value = "企业证书有效期") |
| | | @TableField("effective_time") |
| | | private LocalDateTime effectiveTime; |
| | | |
| | | @ApiModelProperty(value = "证书名称") |
| | | @TableField("file_name") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty(value = "企业证书路径") |
| | | @TableField("file_path") |
| | | private String filePath; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("company_quality_policy") |
| | | @ApiModel(value = "company_quality_policy",description = "企业质量方针") |
| | | public class CompanyQualityPolicy implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("company_name") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "质量方针") |
| | | @TableField("policy") |
| | | private String policy; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("company_summary") |
| | | @ApiModel(value = "company_summary",description = "企业概况") |
| | | public class CompanySummary implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @NotNull(message = "企业Id不可为空") |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("company_name") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "企业概况") |
| | | @TableField("company_summary") |
| | | private String companySummary; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | @Setter |
| | | @Getter |
| | | @TableName("quality") |
| | | @ApiModel(value = "quality",description = "质量目标") |
| | | public class Quality implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | @TableField("company_name") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | @TableField("year") |
| | | private String year; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | @TableField("num") |
| | | private String num; |
| | | |
| | | @ApiModelProperty(value = "质量目标级别 1公司级 2部门级") |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | @TableField("depart_id") |
| | | private Integer departId; |
| | | |
| | | @ApiModelProperty(value = "部门名称") |
| | | @TableField("depart_name") |
| | | private String departName; |
| | | |
| | | @ApiModelProperty(value = "目标测量方法") |
| | | @TableField("method") |
| | | private String method; |
| | | |
| | | @ApiModelProperty(value = "编制人id") |
| | | @TableField("compilation_id") |
| | | private Integer compilationId; |
| | | |
| | | @ApiModelProperty(value = "编制人") |
| | | @TableField("compilation_name") |
| | | private String compilationName; |
| | | |
| | | @ApiModelProperty(value = "编制人时间") |
| | | @TableField("compilation_time") |
| | | private LocalDateTime compilationTime; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门id") |
| | | @TableField("quality_id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门名称") |
| | | @TableField("quality_name") |
| | | private String qualityName; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门时间") |
| | | @TableField("quality_time") |
| | | private LocalDateTime qualityTime; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导id") |
| | | @TableField("lead_id") |
| | | private Integer leadId; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导名称") |
| | | @TableField("lead_name") |
| | | private String leadName; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导时间") |
| | | @TableField("lead_time") |
| | | private LocalDateTime leadTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_accomplish") |
| | | @ApiModel(value = "quality_accomplish",description = "质量目标完成情况表") |
| | | public class QualityAccomplish implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "质量目标ID") |
| | | @TableField("quality_id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | @TableField("serial") |
| | | private String serial; |
| | | |
| | | @ApiModelProperty(value = "考核时机") |
| | | @TableField("frequency") |
| | | private String frequency; |
| | | |
| | | @ApiModelProperty(value = "质量目标完成情况") |
| | | @TableField("accomplish") |
| | | private String accomplish; |
| | | |
| | | @ApiModelProperty(value = "未完成原因及措施") |
| | | @TableField("measure") |
| | | private String measure; |
| | | |
| | | @ApiModelProperty(value = "改进意见") |
| | | @TableField("opinion") |
| | | private String opinion; |
| | | |
| | | @ApiModelProperty(value = "负责人id") |
| | | @TableField("charge_id") |
| | | private Integer chargeId; |
| | | |
| | | @ApiModelProperty(value = "负责人名称") |
| | | @TableField("charge_name") |
| | | private String chargeName; |
| | | |
| | | @ApiModelProperty(value = "负责人时间") |
| | | @TableField("charge_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDateTime chargeTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_decompose") |
| | | @ApiModel(value = "quality_decompose",description = "质量目标分解表") |
| | | public class QualityDecompose implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "质量目标id") |
| | | @TableField("quality_id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "编号") |
| | | @TableField("number") |
| | | private String number; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | @TableField("serial") |
| | | private String serial; |
| | | |
| | | @ApiModelProperty(value = "拟制人id") |
| | | @TableField("fiction_id") |
| | | private Integer fictionId; |
| | | |
| | | @ApiModelProperty(value = "拟制人名称") |
| | | @TableField("fiction_name") |
| | | private String fictionName; |
| | | |
| | | @ApiModelProperty(value = "拟制人时间") |
| | | @TableField("fiction_time") |
| | | private LocalDateTime fictionTime; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | @TableField("check_id") |
| | | private Integer checkId; |
| | | |
| | | @ApiModelProperty(value = "审核热名称") |
| | | @TableField("check_name") |
| | | private String checkName; |
| | | |
| | | @ApiModelProperty(value = "审核人时间") |
| | | @TableField("check_time") |
| | | private LocalDateTime checkTime; |
| | | |
| | | @ApiModelProperty(value = "批准人id") |
| | | @TableField("ratify_id") |
| | | private Integer ratifyId; |
| | | |
| | | @ApiModelProperty(value = "批准人名称") |
| | | @TableField("ratify_name") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty(value = "批准人时间") |
| | | @TableField("ratify_time") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_target") |
| | | @ApiModel(value = "quality_target",description = "质量目标对应目标") |
| | | public class QualityTarget implements Serializable { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业id") |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "质量目标ID") |
| | | @TableField("quality_id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "质量目标") |
| | | @TableField("message") |
| | | private String message; |
| | | |
| | | @ApiModelProperty(value = "目标值") |
| | | @TableField("num") |
| | | private String num; |
| | | |
| | | @ApiModelProperty(value = "实时措施") |
| | | @TableField("method") |
| | | private String method; |
| | | |
| | | @ApiModelProperty(value = "计算方法") |
| | | @TableField("calculate") |
| | | private String calculate; |
| | | |
| | | @ApiModelProperty(value = "数据源") |
| | | @TableField("data_source") |
| | | private String dataSource; |
| | | |
| | | @ApiModelProperty(value = "部门名称") |
| | | @TableField("depart_name") |
| | | private String departName; |
| | | |
| | | @ApiModelProperty(value = "考核时机") |
| | | @TableField("frequency") |
| | | private String frequency; |
| | | |
| | | @ApiModelProperty(value = "负责人") |
| | | @TableField("duty_name") |
| | | private String dutyName; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @TableField("del_flag") |
| | | private Integer delFlag; |
| | | |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.req; |
| | | |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class DecomposeTargetReq { |
| | | @ApiModelProperty("主键") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "质量目标id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "编号") |
| | | private String number; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private String serial; |
| | | |
| | | @ApiModelProperty(value = "拟制人id") |
| | | private Integer fictionId; |
| | | |
| | | @ApiModelProperty(value = "拟制人名称") |
| | | private String fictionName; |
| | | |
| | | @ApiModelProperty(value = "拟制人时间") |
| | | private LocalDateTime fictionTime; |
| | | |
| | | @ApiModelProperty(value = "审核人id") |
| | | private Integer checkId; |
| | | |
| | | @ApiModelProperty(value = "审核热名称") |
| | | private String checkName; |
| | | |
| | | @ApiModelProperty(value = "审核人时间") |
| | | private LocalDateTime checkTime; |
| | | |
| | | @ApiModelProperty(value = "批准人id") |
| | | private Integer ratifyId; |
| | | |
| | | @ApiModelProperty(value = "批准人名称") |
| | | private String ratifyName; |
| | | |
| | | @ApiModelProperty(value = "批准人时间") |
| | | private LocalDateTime ratifyTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer delFlag; |
| | | |
| | | |
| | | private String createBy; |
| | | |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | private String updateBy; |
| | | |
| | | private LocalDateTime updateTime; |
| | | |
| | | private List<QualityTarget> qualityTargets; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.req; |
| | | |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class QualityReq { |
| | | |
| | | private String companyId; |
| | | private String year; |
| | | private String type; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.req; |
| | | |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class QualityTargetReq { |
| | | @ApiModelProperty("主键") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | private String year; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private String num; |
| | | |
| | | @ApiModelProperty(value = "质量目标级别 1公司级 2部门级") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | private Integer departId; |
| | | |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String departName; |
| | | |
| | | @ApiModelProperty(value = "目标测量方法") |
| | | private String method; |
| | | |
| | | @ApiModelProperty(value = "编制人id") |
| | | private Integer compilationId; |
| | | |
| | | @ApiModelProperty(value = "编制人") |
| | | private String compilationName; |
| | | |
| | | @ApiModelProperty(value = "编制人时间") |
| | | private LocalDateTime compilationTime; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门名称") |
| | | private String qualityName; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门时间") |
| | | private LocalDateTime qualityTime; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导id") |
| | | private Integer leadId; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导名称") |
| | | private String leadName; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导时间") |
| | | private LocalDateTime leadTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer delFlag; |
| | | |
| | | private String createBy; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private LocalDateTime updateTime; |
| | | |
| | | private List<QualityTarget> qualityTargets; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.vo; |
| | | |
| | | import com.gkhy.exam.system.domain.QualityAccomplish; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class QualityAccomplishVo extends QualityAccomplish { |
| | | private String companyName; |
| | | private String year; |
| | | private String type; |
| | | private String departName; |
| | | private List<QualityTarget> qualityTargets; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class QualityDecomposeVo { |
| | | |
| | | private Integer id; |
| | | private Integer companyId; |
| | | private String companyName; |
| | | private String year; |
| | | private Integer type; |
| | | private String departName; |
| | | private Integer qualityId; |
| | | private String number; |
| | | private String serial; |
| | | private Integer fictionId; |
| | | private String fictionName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date fictionTime; |
| | | private Integer checkId; |
| | | private String checkName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date checkTime; |
| | | private Integer ratifyId; |
| | | private String ratifyName; |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date ratifyTime; |
| | | private Integer delFlag; |
| | | private String createBy; |
| | | private LocalDateTime createTime; |
| | | private String updateBy; |
| | | private LocalDateTime updateTime; |
| | | private List<QualityTarget> qualityTargets; |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Getter |
| | | @Setter |
| | | public class QualityTargetVo { |
| | | |
| | | @ApiModelProperty("主键") |
| | | private Integer id; |
| | | |
| | | |
| | | @ApiModelProperty(value = "企业ID") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "企业名称") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | private String year; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private String num; |
| | | |
| | | @ApiModelProperty(value = "质量目标级别 1公司级 2部门级") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "部门id") |
| | | private Integer departId; |
| | | |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String departName; |
| | | |
| | | @ApiModelProperty(value = "目标测量方法") |
| | | private String method; |
| | | |
| | | @ApiModelProperty(value = "编制人id") |
| | | private Integer compilationId; |
| | | |
| | | @ApiModelProperty(value = "编制人") |
| | | private String compilationName; |
| | | |
| | | @ApiModelProperty(value = "编制人时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date compilationTime; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门id") |
| | | private Integer qualityId; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门名称") |
| | | private String qualityName; |
| | | |
| | | @ApiModelProperty(value = "质量管理部门时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date qualityTime; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导id") |
| | | private Integer leadId; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导名称") |
| | | private String leadName; |
| | | |
| | | @ApiModelProperty(value = "公司分管领导时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date leadTime; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer delFlag; |
| | | |
| | | private String createBy; |
| | | |
| | | private LocalDateTime createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private LocalDateTime updateTime; |
| | | |
| | | private List<QualityTarget> qualityTargets; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.CompanyBasic; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CompanyBasicMapper extends BaseMapper<CompanyBasic> { |
| | | List<CompanyBasic> selectCompanyBasicList(Integer companyId); |
| | | |
| | | int updateBasicById(CompanyBasic companyBasic); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.CompanyCertificate; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CompanyCertificateMapper extends BaseMapper<CompanyCertificate> { |
| | | List<CompanyCertificate> selectCompanyCertificateList(Integer companyId); |
| | | |
| | | int updateCertificateById(CompanyCertificate companyCertificate); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.CompanyQualityPolicy; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CompanyQualityPolicyMapper extends BaseMapper<CompanyQualityPolicy> { |
| | | List<CompanyQualityPolicy> selectCompanyQualityPolicyList(Integer companyId); |
| | | |
| | | int updateQualityPolicyById(CompanyQualityPolicy companyQualityPolicy); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.CompanySummary; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface CompanySummaryMapper extends BaseMapper<CompanySummary> { |
| | | List<CompanySummary> selectCompanySummaryList(Integer companyId); |
| | | |
| | | int updateSummaryById(CompanySummary companySummary); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.QualityAccomplish; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityAccomplishVo; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface QualityAccomplishMapper extends BaseMapper<QualityAccomplish> { |
| | | List<QualityAccomplishVo> selectQualityAccomplishList(QualityReq qualityReq); |
| | | |
| | | List<QualityAccomplish> selectByQualityId(Integer qualityId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.QualityDecompose; |
| | | import com.gkhy.exam.system.domain.req.DecomposeTargetReq; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityDecomposeVo; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface QualityDecomposeMapper extends BaseMapper<QualityDecompose> { |
| | | List<QualityDecomposeVo> selectDecomposeList(QualityReq qualityReq); |
| | | |
| | | List<QualityDecompose> selectByCompanyId(Integer qualityId); |
| | | |
| | | int insertDecompose(DecomposeTargetReq decomposeTargetReq); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.Quality; |
| | | import com.gkhy.exam.system.domain.req.QualityTargetReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityTargetVo; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface QualityMapper extends BaseMapper<Quality> { |
| | | List<QualityTargetVo> selectQualityTarget(Quality quality); |
| | | |
| | | int insertQuality(Quality quality); |
| | | |
| | | List<Quality> selectQualityByType(QualityTargetReq qualityTargetReq); |
| | | |
| | | int updateQualityById(Quality quality); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface QualityTargetMapper extends BaseMapper<QualityTarget> { |
| | | int insertQualityTargets(@Param("qualityTargets") List<QualityTarget> qualityTargets); |
| | | |
| | | int updateQualityTargetById(@Param("qualityTargets") List<QualityTarget> qualityTargets); |
| | | |
| | | List<QualityTarget> selectByQualityId(Integer qualityId); |
| | | |
| | | void deleteByQualityIds(@Param("collect") List<Integer> collect); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanyBasic; |
| | | |
| | | public interface CompanyBasicService extends IService<CompanyBasic> { |
| | | CommonPage selectCompanyBasicList(Integer companyId); |
| | | |
| | | CommonResult insertCompanyBasic(CompanyBasic companyBasic); |
| | | |
| | | CommonResult updateCompanyBasic(CompanyBasic companyBasic); |
| | | |
| | | CommonResult deletedCompanyBasic(Integer companyBasicId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanyCertificate; |
| | | |
| | | public interface CompanyCertificateService extends IService<CompanyCertificate> { |
| | | CommonPage selectCompanyCertificateList(Integer companyId); |
| | | |
| | | CommonResult insertCompanyCertificate(CompanyCertificate companyCertificate); |
| | | |
| | | CommonResult updateCompanyCertificate(CompanyCertificate companyCertificate); |
| | | |
| | | CommonResult deletedCompanyCertificate(Integer companyCertificateId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanyQualityPolicy; |
| | | |
| | | public interface CompanyQualityPolicyService extends IService<CompanyQualityPolicy> { |
| | | CommonPage selectCompanyQualityPolicyList(Integer companyId); |
| | | |
| | | CommonResult insertCompanyQualityPolicy(CompanyQualityPolicy companyQualityPolicy); |
| | | |
| | | CommonResult updateCompanyQualityPolicy(CompanyQualityPolicy companyQualityPolicy); |
| | | |
| | | CommonResult deletedCompanyQualityPolicy(Integer qualityPolicyId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.CompanySummary; |
| | | |
| | | public interface CompanySummaryService extends IService<CompanySummary> { |
| | | CommonPage selectCompanySummaryList(Integer companyId); |
| | | |
| | | CommonResult insertCompanySummary(CompanySummary companySummary); |
| | | |
| | | CommonResult updateCompanySummary(CompanySummary companySummary); |
| | | |
| | | CommonResult deletedCompanySummary(Integer companySummaryId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.QualityAccomplish; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | |
| | | public interface QualityAccomplishService extends IService<QualityAccomplish> { |
| | | CommonPage selectQualityAccomplishList(QualityReq qualityReq); |
| | | |
| | | CommonResult insertQualityAccomplish(QualityAccomplish qualityAccomplish); |
| | | |
| | | CommonResult updateQualityAccomplish(QualityAccomplish qualityAccomplish); |
| | | |
| | | CommonResult deletedQualityAccomplish(Integer qualityAccomplishId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.QualityDecompose; |
| | | import com.gkhy.exam.system.domain.req.DecomposeTargetReq; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | |
| | | public interface QualityDecomposeService extends IService<QualityDecompose> { |
| | | CommonPage selectQualityDecomposeList(QualityReq qualityReq); |
| | | |
| | | CommonResult insertQualityDecompose(DecomposeTargetReq decomposeTargetReq); |
| | | |
| | | CommonResult updateQualityDecompose(DecomposeTargetReq decomposeTargetReq); |
| | | |
| | | CommonResult deletedQualityDecompose(Integer decomposeId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.Quality; |
| | | import com.gkhy.exam.system.domain.req.QualityTargetReq; |
| | | |
| | | public interface QualityService extends IService<Quality> { |
| | | CommonPage selectQualityList(Quality quality); |
| | | |
| | | CommonResult insertQuality(QualityTargetReq qualityTargetReq); |
| | | |
| | | CommonResult updateQuality(QualityTargetReq qualityTargetReq); |
| | | |
| | | CommonResult deletedQuality(Integer qualityId); |
| | | |
| | | CommonResult selectQualityListAll(Quality quality); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | |
| | | public interface QualityTargetService extends IService<QualityTarget> { |
| | | CommonResult selectTargetList(Integer qualityId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.CompanyBasic; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.mapper.CompanyBasicMapper; |
| | | import com.gkhy.exam.system.service.CompanyBasicService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CompanyBasicServiceImpl extends ServiceImpl<CompanyBasicMapper, CompanyBasic> implements CompanyBasicService { |
| | | |
| | | @Autowired |
| | | private CompanyBasicMapper companyBasicMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CommonPage selectCompanyBasicList(Integer companyId) { |
| | | |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | throw new ApiException("非管理员操作,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<CompanyBasic> companyBasics = companyBasicMapper.selectCompanyBasicList(companyId); |
| | | return CommonPage.restPage(companyBasics); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertCompanyBasic(CompanyBasic companyBasic) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | List<CompanyBasic> companyBasics = companyBasicMapper.selectCompanyBasicList(companyBasic.getCompanyId()); |
| | | if (companyBasics.size()>0){ |
| | | throw new ApiException("当前企业已有相关数据,请删除原有数据后重试"); |
| | | } |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyBasic.getCompanyId())); |
| | | companyBasic.setCompanyName(sysCompany.getName()); |
| | | companyBasic.setCreateBy(loginUser.getUsername()); |
| | | companyBasic.setCreateTime(LocalDateTime.now()); |
| | | int insert = companyBasicMapper.insert(companyBasic); |
| | | if (insert>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateCompanyBasic(CompanyBasic companyBasic) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyBasic.getCompanyId())); |
| | | companyBasic.setCompanyName(sysCompany.getName()); |
| | | companyBasic.setUpdateBy(loginUser.getUsername()); |
| | | companyBasic.setUpdateTime(LocalDateTime.now()); |
| | | int update = companyBasicMapper.updateBasicById(companyBasic); |
| | | if (update>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedCompanyBasic(Integer companyBasicId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | CompanyBasic companyBasic = new CompanyBasic(); |
| | | companyBasic.setId(companyBasicId); |
| | | companyBasic.setDelFlag(2); |
| | | companyBasic.setUpdateBy(loginUser.getUsername()); |
| | | companyBasic.setUpdateTime(LocalDateTime.now()); |
| | | int deleted = companyBasicMapper.updateById(companyBasic); |
| | | if (deleted>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.CompanyCertificate; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.mapper.CompanyCertificateMapper; |
| | | import com.gkhy.exam.system.service.CompanyCertificateService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CompanyCertificateServiceImpl extends ServiceImpl<CompanyCertificateMapper, CompanyCertificate> implements CompanyCertificateService { |
| | | |
| | | @Autowired |
| | | private CompanyCertificateMapper companyCertificateMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | @Override |
| | | public CommonPage selectCompanyCertificateList(Integer companyId) { |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | throw new ApiException("非管理员操作,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<CompanyCertificate> companyCertificates = companyCertificateMapper.selectCompanyCertificateList(companyId); |
| | | return CommonPage.restPage(companyCertificates); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertCompanyCertificate(CompanyCertificate companyCertificate) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyCertificate.getCompanyId())); |
| | | companyCertificate.setCompanyName(sysCompany.getName()); |
| | | companyCertificate.setCreateBy(loginUser.getUsername()); |
| | | companyCertificate.setCreateTime(LocalDateTime.now()); |
| | | int insert = companyCertificateMapper.insert(companyCertificate); |
| | | if (insert>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateCompanyCertificate(CompanyCertificate companyCertificate) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyCertificate.getCompanyId())); |
| | | companyCertificate.setCompanyName(sysCompany.getName()); |
| | | companyCertificate.setUpdateBy(loginUser.getUsername()); |
| | | companyCertificate.setUpdateTime(LocalDateTime.now()); |
| | | int i = companyCertificateMapper.updateCertificateById(companyCertificate); |
| | | if (i>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedCompanyCertificate(Integer companyCertificateId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | CompanyCertificate companyCertificate = new CompanyCertificate(); |
| | | companyCertificate.setId(companyCertificateId); |
| | | companyCertificate.setUpdateBy(loginUser.getUsername()); |
| | | companyCertificate.setUpdateTime(LocalDateTime.now()); |
| | | companyCertificate.setDelFlag(2); |
| | | int i = companyCertificateMapper.updateById(companyCertificate); |
| | | if (i>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.CompanyCertificate; |
| | | import com.gkhy.exam.system.domain.CompanyQualityPolicy; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.mapper.CompanyQualityPolicyMapper; |
| | | import com.gkhy.exam.system.service.CompanyQualityPolicyService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CompanyQualityPolicyServiceImpl extends ServiceImpl<CompanyQualityPolicyMapper, CompanyQualityPolicy> implements CompanyQualityPolicyService { |
| | | |
| | | @Autowired |
| | | private CompanyQualityPolicyMapper companyQualityPolicyMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | @Override |
| | | public CommonPage selectCompanyQualityPolicyList(Integer companyId) { |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | throw new ApiException("非管理员操作,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<CompanyQualityPolicy> companyQualityPolicies = companyQualityPolicyMapper.selectCompanyQualityPolicyList(companyId); |
| | | return CommonPage.restPage(companyQualityPolicies); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertCompanyQualityPolicy(CompanyQualityPolicy companyQualityPolicy) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | List<CompanyQualityPolicy> companyQualityPolicies = companyQualityPolicyMapper.selectCompanyQualityPolicyList(companyQualityPolicy.getCompanyId()); |
| | | if (companyQualityPolicies.size()>0){ |
| | | throw new ApiException("当前企业已有相关数据,请删除原有数据后重试"); |
| | | } |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyQualityPolicy.getCompanyId())); |
| | | companyQualityPolicy.setCompanyName(sysCompany.getName()); |
| | | companyQualityPolicy.setCreateBy(loginUser.getUsername()); |
| | | companyQualityPolicy.setCreateTime(LocalDateTime.now()); |
| | | int insert = companyQualityPolicyMapper.insert(companyQualityPolicy); |
| | | if (insert>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateCompanyQualityPolicy(CompanyQualityPolicy companyQualityPolicy) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companyQualityPolicy.getCompanyId())); |
| | | companyQualityPolicy.setCompanyName(sysCompany.getName()); |
| | | companyQualityPolicy.setUpdateBy(loginUser.getUsername()); |
| | | companyQualityPolicy.setUpdateTime(LocalDateTime.now()); |
| | | int i = companyQualityPolicyMapper.updateQualityPolicyById(companyQualityPolicy); |
| | | if (i>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedCompanyQualityPolicy(Integer qualityPolicyId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | CompanyQualityPolicy companyQualityPolicy = new CompanyQualityPolicy(); |
| | | companyQualityPolicy.setId(qualityPolicyId); |
| | | companyQualityPolicy.setUpdateBy(loginUser.getUsername()); |
| | | companyQualityPolicy.setUpdateTime(LocalDateTime.now()); |
| | | companyQualityPolicy.setDelFlag(2); |
| | | int i = companyQualityPolicyMapper.updateById(companyQualityPolicy); |
| | | if (i>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.CompanySummary; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.mapper.CompanySummaryMapper; |
| | | import com.gkhy.exam.system.service.CompanySummaryService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class CompanySummaryServiceImpl extends ServiceImpl<CompanySummaryMapper, CompanySummary> implements CompanySummaryService { |
| | | |
| | | @Autowired |
| | | private CompanySummaryMapper companySummaryMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CommonPage selectCompanySummaryList(Integer companyId) { |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | throw new ApiException("非管理员操作,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<CompanySummary> companySummaries = companySummaryMapper.selectCompanySummaryList(companyId); |
| | | return CommonPage.restPage(companySummaries); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertCompanySummary(CompanySummary companySummary) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | List<CompanySummary> companySummaries = companySummaryMapper.selectCompanySummaryList(companySummary.getCompanyId()); |
| | | if (companySummaries.size()>0){ |
| | | throw new ApiException("当前企业已有相关数据,请删除原有数据后重试"); |
| | | } |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companySummary.getCompanyId())); |
| | | companySummary.setCompanyName(sysCompany.getName()); |
| | | companySummary.setCreateBy(loginUser.getUsername()); |
| | | companySummary.setCreateTime(LocalDateTime.now()); |
| | | int insert = companySummaryMapper.insert(companySummary); |
| | | if (insert>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateCompanySummary(CompanySummary companySummary) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(companySummary.getCompanyId())); |
| | | companySummary.setCompanyName(sysCompany.getName()); |
| | | companySummary.setUpdateBy(loginUser.getUsername()); |
| | | companySummary.setUpdateTime(LocalDateTime.now()); |
| | | int update = companySummaryMapper.updateSummaryById(companySummary); |
| | | if (update>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedCompanySummary(Integer companySummaryId) { |
| | | CompanySummary companySummary = new CompanySummary(); |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | companySummary.setUpdateBy(loginUser.getUsername()); |
| | | companySummary.setUpdateTime(LocalDateTime.now()); |
| | | companySummary.setDelFlag(2); |
| | | companySummary.setId(companySummaryId); |
| | | int i = companySummaryMapper.updateById(companySummary); |
| | | if (i>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.QualityAccomplish; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityAccomplishVo; |
| | | import com.gkhy.exam.system.mapper.QualityAccomplishMapper; |
| | | import com.gkhy.exam.system.mapper.QualityMapper; |
| | | import com.gkhy.exam.system.mapper.QualityTargetMapper; |
| | | import com.gkhy.exam.system.service.QualityAccomplishService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class QualityAccomplishServiceImpl extends ServiceImpl<QualityAccomplishMapper, QualityAccomplish> implements QualityAccomplishService { |
| | | |
| | | |
| | | @Autowired |
| | | private QualityAccomplishMapper qualityAccomplishMapper; |
| | | |
| | | @Autowired |
| | | private QualityTargetMapper qualityTargetMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | @Override |
| | | public CommonPage selectQualityAccomplishList(QualityReq qualityReq) { |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (qualityReq.getCompanyId()==null){ |
| | | throw new ApiException("非管理员,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<QualityAccomplishVo> qualityAccomplishVos = qualityAccomplishMapper.selectQualityAccomplishList(qualityReq); |
| | | for (QualityAccomplishVo qualityAccomplishVo : qualityAccomplishVos) { |
| | | List<QualityTarget> qualityTargets = qualityTargetMapper.selectByQualityId(qualityAccomplishVo.getQualityId()); |
| | | qualityAccomplishVo.setQualityTargets(qualityTargets); |
| | | } |
| | | return CommonPage.restPage(qualityAccomplishVos); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertQualityAccomplish(QualityAccomplish qualityAccomplish) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | |
| | | List<QualityAccomplish> qualityAccomplishes = qualityAccomplishMapper.selectByQualityId(qualityAccomplish.getQualityId()); |
| | | if (qualityAccomplishes.size()>0){ |
| | | throw new ApiException("当前质量目标完成情况已存在"); |
| | | } |
| | | qualityAccomplish.setCreateTime(LocalDateTime.now()); |
| | | qualityAccomplish.setCreateBy(loginUser.getUsername()); |
| | | qualityAccomplishMapper.insert(qualityAccomplish); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateQualityAccomplish(QualityAccomplish qualityAccomplish) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | qualityAccomplish.setUpdateTime(LocalDateTime.now()); |
| | | qualityAccomplish.setUpdateBy(loginUser.getUsername()); |
| | | qualityAccomplishMapper.updateById(qualityAccomplish); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedQualityAccomplish(Integer qualityAccomplishId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | QualityAccomplish qualityAccomplish = new QualityAccomplish(); |
| | | qualityAccomplish.setUpdateBy(loginUser.getUsername()); |
| | | qualityAccomplish.setUpdateTime(LocalDateTime.now()); |
| | | qualityAccomplish.setDelFlag(2); |
| | | qualityAccomplish.setId(qualityAccomplishId); |
| | | qualityAccomplishMapper.updateById(qualityAccomplish); |
| | | return CommonResult.success(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.Quality; |
| | | import com.gkhy.exam.system.domain.QualityDecompose; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import com.gkhy.exam.system.domain.req.DecomposeTargetReq; |
| | | import com.gkhy.exam.system.domain.req.QualityReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityDecomposeVo; |
| | | import com.gkhy.exam.system.mapper.QualityDecomposeMapper; |
| | | import com.gkhy.exam.system.mapper.QualityMapper; |
| | | import com.gkhy.exam.system.mapper.QualityTargetMapper; |
| | | import com.gkhy.exam.system.service.QualityDecomposeService; |
| | | import com.gkhy.exam.system.service.QualityService; |
| | | import com.gkhy.exam.system.service.QualityTargetService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class QualityDecomposeServiceImpl extends ServiceImpl<QualityDecomposeMapper, QualityDecompose> implements QualityDecomposeService { |
| | | |
| | | @Autowired |
| | | private QualityDecomposeMapper qualityDecomposeMapper; |
| | | |
| | | @Autowired |
| | | private QualityTargetMapper qualityTargetMapper; |
| | | |
| | | @Autowired |
| | | private QualityMapper qualityMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public CommonPage selectQualityDecomposeList(QualityReq qualityReq) { |
| | | if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | if (qualityReq.getCompanyId()==null){ |
| | | throw new ApiException("非管理员,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<QualityDecomposeVo> qualityDecomposeVos = qualityDecomposeMapper.selectDecomposeList(qualityReq); |
| | | for (QualityDecomposeVo qualityDecomposeVo : qualityDecomposeVos) { |
| | | List<QualityTarget> qualityTargets = qualityTargetMapper.selectByQualityId(qualityDecomposeVo.getQualityId()); |
| | | qualityDecomposeVo.setQualityTargets(qualityTargets); |
| | | } |
| | | return CommonPage.restPage(qualityDecomposeVos); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertQualityDecompose(DecomposeTargetReq decomposeTargetReq) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | decomposeTargetReq.setCreateBy(loginUser.getUsername()); |
| | | decomposeTargetReq.setCreateTime(LocalDateTime.now()); |
| | | |
| | | List<QualityDecompose> qualityDecomposes = qualityDecomposeMapper.selectByCompanyId(decomposeTargetReq.getQualityId()); |
| | | if (qualityDecomposes.size()>0){ |
| | | throw new ApiException("当前企业已有数据,请删除后重试"); |
| | | } |
| | | int i = qualityDecomposeMapper.insertDecompose(decomposeTargetReq); |
| | | List<QualityTarget> qualityTargets = decomposeTargetReq.getQualityTargets(); |
| | | for (QualityTarget qualityTarget : qualityTargets) { |
| | | qualityTarget.setCreateTime(LocalDateTime.now()); |
| | | qualityTarget.setCreateBy(loginUser.getUsername()); |
| | | } |
| | | qualityTargetMapper.updateQualityTargetById(qualityTargets); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateQualityDecompose(DecomposeTargetReq decomposeTargetReq) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | decomposeTargetReq.setUpdateBy(loginUser.getUsername()); |
| | | decomposeTargetReq.setCreateTime(LocalDateTime.now()); |
| | | QualityDecompose qualityDecompose = new QualityDecompose(); |
| | | BeanUtils.copyProperties(decomposeTargetReq,qualityDecompose); |
| | | qualityDecomposeMapper.updateById(qualityDecompose); |
| | | List<QualityTarget> qualityTargets = decomposeTargetReq.getQualityTargets(); |
| | | qualityTargetMapper.updateQualityTargetById(qualityTargets); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedQualityDecompose(Integer decomposeId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | QualityDecompose qualityDecompose = new QualityDecompose(); |
| | | qualityDecompose.setId(decomposeId); |
| | | qualityDecompose.setDelFlag(2); |
| | | qualityDecompose.setUpdateBy(loginUser.getUsername()); |
| | | qualityDecompose.setUpdateTime(LocalDateTime.now()); |
| | | qualityDecomposeMapper.updateById(qualityDecompose); |
| | | return CommonResult.success(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.common.domain.entity.SysDept; |
| | | import com.gkhy.exam.common.domain.model.LoginUserDetails; |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.system.domain.CompanyBasic; |
| | | import com.gkhy.exam.system.domain.Quality; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import com.gkhy.exam.system.domain.SysCompany; |
| | | import com.gkhy.exam.system.domain.req.QualityTargetReq; |
| | | import com.gkhy.exam.system.domain.vo.QualityTargetVo; |
| | | import com.gkhy.exam.system.mapper.QualityMapper; |
| | | import com.gkhy.exam.system.mapper.QualityTargetMapper; |
| | | import com.gkhy.exam.system.mapper.SysDeptMapper; |
| | | import com.gkhy.exam.system.service.QualityService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class QualityServiceImpl extends ServiceImpl<QualityMapper, Quality> implements QualityService { |
| | | |
| | | @Autowired |
| | | private QualityMapper qualityMapper; |
| | | @Autowired |
| | | private QualityTargetMapper qualityTargetMapper; |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService; |
| | | @Autowired |
| | | private SysDeptMapper sysDeptMapper; |
| | | |
| | | @Override |
| | | public CommonPage selectQualityList(Quality quality) { |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin){ |
| | | if (quality.getCompanyId()==null){ |
| | | throw new RuntimeException("非管理员操作,查询条件不可为空"); |
| | | } |
| | | } |
| | | PageUtils.startPage(); |
| | | List<QualityTargetVo> qualityTargetVos = qualityMapper.selectQualityTarget(quality); |
| | | for (QualityTargetVo qualityTargetVo : qualityTargetVos) { |
| | | List<QualityTarget> qualityTargets = qualityTargetMapper.selectByQualityId(qualityTargetVo.getId()); |
| | | qualityTargetVo.setQualityTargets(qualityTargets); |
| | | } |
| | | return CommonPage.restPage(qualityTargetVos); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult insertQuality(QualityTargetReq qualityTargetReq) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | List<QualityTarget> qualityTargets = qualityTargetReq.getQualityTargets(); |
| | | |
| | | List<Quality> qualities = qualityMapper.selectQualityByType(qualityTargetReq); |
| | | if (qualities.size()>0){ |
| | | throw new ApiException("企业下已有相关数据,请删除后重试,或进行修改"); |
| | | } |
| | | Quality quality = new Quality(); |
| | | BeanUtils.copyProperties(qualityTargetReq,quality); |
| | | quality.setCreateBy(loginUser.getUsername()); |
| | | quality.setCreateTime(LocalDateTime.now()); |
| | | //获取对应企业 |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(qualityTargetReq.getCompanyId())); |
| | | quality.setCompanyName(sysCompany.getName()); |
| | | if (qualityTargetReq.getType()==2){ |
| | | SysDept sysDept = sysDeptMapper.selectDeptById(Long.valueOf(qualityTargetReq.getDepartId())); |
| | | quality.setDepartName(sysDept.getDeptName()); |
| | | } |
| | | //质量目标新增 |
| | | int insert = qualityMapper.insertQuality(quality); |
| | | for (QualityTarget qualityTarget : qualityTargets) { |
| | | qualityTarget.setQualityId(quality.getId()); |
| | | qualityTarget.setCompanyId(qualityTargetReq.getCompanyId()); |
| | | qualityTarget.setCreateBy(loginUser.getUsername()); |
| | | qualityTarget.setCreateTime(LocalDateTime.now()); |
| | | } |
| | | //新增对应质量目标 |
| | | int i = qualityTargetMapper.insertQualityTargets(qualityTargets); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateQuality(QualityTargetReq qualityTargetReq) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | List<QualityTarget> qualityTargets = qualityTargetReq.getQualityTargets(); |
| | | List<Integer> collect = qualityTargets.stream().map(QualityTarget::getQualityId).collect(Collectors.toList()); |
| | | Quality quality = new Quality(); |
| | | BeanUtils.copyProperties(qualityTargetReq,quality); |
| | | //获取对应企业 |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(Long.valueOf(qualityTargetReq.getCompanyId())); |
| | | quality.setCompanyName(sysCompany.getName()); |
| | | quality.setUpdateBy(loginUser.getUsername()); |
| | | quality.setUpdateTime(LocalDateTime.now()); |
| | | int insert = qualityMapper.updateQualityById(quality); |
| | | qualityTargetMapper.deleteByQualityIds(collect); |
| | | for (QualityTarget qualityTarget : qualityTargets) { |
| | | qualityTarget.setQualityId(quality.getId()); |
| | | qualityTarget.setCompanyId(qualityTargetReq.getCompanyId()); |
| | | qualityTarget.setUpdateBy(loginUser.getUsername()); |
| | | qualityTarget.setUpdateTime(LocalDateTime.now()); |
| | | } |
| | | int i = qualityTargetMapper.insertQualityTargets(qualityTargets); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult deletedQuality(Integer qualityId) { |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | Quality quality = new Quality(); |
| | | quality.setId(qualityId); |
| | | quality.setDelFlag(2); |
| | | quality.setUpdateBy(loginUser.getUsername()); |
| | | quality.setUpdateTime(LocalDateTime.now()); |
| | | int deleted = qualityMapper.updateById(quality); |
| | | if (deleted>0){ |
| | | return CommonResult.success(); |
| | | } |
| | | return CommonResult.failed(); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult selectQualityListAll(Quality quality) { |
| | | List<QualityTargetVo> qualityTargetVos = qualityMapper.selectQualityTarget(quality); |
| | | for (QualityTargetVo qualityTargetVo : qualityTargetVos) { |
| | | List<QualityTarget> qualityTargets = qualityTargetMapper.selectByQualityId(qualityTargetVo.getId()); |
| | | qualityTargetVo.setQualityTargets(qualityTargets); |
| | | } |
| | | return CommonResult.success(qualityTargetVos); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.QualityTarget; |
| | | import com.gkhy.exam.system.mapper.QualityTargetMapper; |
| | | import com.gkhy.exam.system.service.QualityTargetService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class QualityTargetServiceImpl extends ServiceImpl<QualityTargetMapper, QualityTarget> implements QualityTargetService { |
| | | |
| | | @Autowired |
| | | private QualityTargetMapper qualityTargetMapper; |
| | | |
| | | @Override |
| | | public CommonResult selectTargetList(Integer qualityId) { |
| | | return CommonResult.success(qualityTargetMapper.selectByQualityId(qualityId)); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.CompanyBasicMapper"> |
| | | <update id="updateBasicById"> |
| | | UPDATE company_basic |
| | | <set> |
| | | <if test="companyId != null and companyId != ''" > |
| | | company_id = #{companyId}, |
| | | </if> |
| | | <if test="companyName != null and companyName != ''" > |
| | | company_name = #{companyName}, |
| | | </if> |
| | | <if test="basic != null and basic !=''" > |
| | | basic = #{basic}, |
| | | </if> |
| | | <if test="introduce != null and introduce != ''" > |
| | | introduce = #{introduce}, |
| | | </if> |
| | | <if test="target != null and target != ''" > |
| | | target = #{target}, |
| | | </if> |
| | | <if test="quality != null and quality != ''" > |
| | | quality = #{quality}, |
| | | </if> |
| | | <if test="activity != null and activity!=''" > |
| | | activity = #{activity}, |
| | | </if> |
| | | <if test="audit != null and audit != ''" > |
| | | audit = #{audit}, |
| | | </if> |
| | | <if test="epiboly != null and epiboly != ''" > |
| | | epiboly = #{epiboly}, |
| | | </if> |
| | | <if test="resource != null and resource != ''" > |
| | | resource = #{resource}, |
| | | </if> |
| | | <if test="delFlag != null and delFlag != ''" > |
| | | del_flag = #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null" > |
| | | create_by = #{createBy}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null" > |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="selectCompanyBasicList" resultType="com.gkhy.exam.system.domain.CompanyBasic"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `company_name`, |
| | | `basic`, |
| | | `introduce`, |
| | | `target`, |
| | | `quality`, |
| | | `activity`, |
| | | `audit`, |
| | | `epiboly`, |
| | | `resource`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM |
| | | company_basic |
| | | WHERE |
| | | del_flag = 1 |
| | | <if test="companyId!=null and companyId != ''"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | ORDER BY |
| | | create_time DESC |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.CompanyCertificateMapper"> |
| | | <update id="updateCertificateById"> |
| | | UPDATE company_certificate |
| | | <set> |
| | | <if test="companyId != null and companyId != ''" > |
| | | company_id = #{companyId}, |
| | | </if> |
| | | <if test="companyName != null and companyName != ''" > |
| | | company_name = #{companyName}, |
| | | </if> |
| | | <if test="certificateName != null and certificateName !=''" > |
| | | certificate_name = #{certificateName}, |
| | | </if> |
| | | <if test="certificateNum != null and certificateNum != ''" > |
| | | certificate_num = #{certificateNum}, |
| | | </if> |
| | | <if test="effectiveTime != null" > |
| | | effective_time = #{effectiveTime}, |
| | | </if> |
| | | <if test="fileName != null and fileName != ''" > |
| | | file_name = #{fileName}, |
| | | </if> |
| | | <if test="filePath != null and filePath!=''" > |
| | | file_path = #{filePath}, |
| | | </if> |
| | | <if test="delFlag != null and delFlag != ''" > |
| | | del_flag = #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null" > |
| | | create_by = #{createBy}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null" > |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectCompanyCertificateList" resultType="com.gkhy.exam.system.domain.CompanyCertificate"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `company_name`, |
| | | `certificate_name`, |
| | | `certificate_num`, |
| | | `effective_time`, |
| | | `file_name`, |
| | | `file_path`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM |
| | | company_certificate |
| | | WHERE |
| | | del_flag = 1 |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | ORDER BY |
| | | create_time DESC |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.CompanyQualityPolicyMapper"> |
| | | <update id="updateQualityPolicyById"> |
| | | |
| | | UPDATE company_quality_policy |
| | | <set> |
| | | <if test="companyId != null and companyId != ''" > |
| | | company_id = #{companyId}, |
| | | </if> |
| | | <if test="companyName != null and companyName != ''" > |
| | | company_name = #{companyName}, |
| | | </if> |
| | | <if test="policy != null and policy !=''" > |
| | | policy = #{policy}, |
| | | </if> |
| | | <if test="delFlag != null and delFlag != ''" > |
| | | del_flag = #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null" > |
| | | create_by = #{createBy}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null" > |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectCompanyQualityPolicyList" resultType="com.gkhy.exam.system.domain.CompanyQualityPolicy"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | company_name, |
| | | `policy`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM |
| | | company_quality_policy |
| | | WHERE |
| | | del_flag = 1 |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | ORDER BY |
| | | create_time DESC |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.CompanySummaryMapper"> |
| | | <update id="updateSummaryById"> |
| | | UPDATE company_summary |
| | | <set> |
| | | <if test="companyId != null and companyId != ''" > |
| | | company_id = #{companyId}, |
| | | </if> |
| | | <if test="companyName != null and companyName != ''" > |
| | | company_name = #{companyName}, |
| | | </if> |
| | | <if test="companySummary != null and companySummary !=''" > |
| | | company_summary = #{companySummary}, |
| | | </if> |
| | | <if test="delFlag != null and delFlag != ''" > |
| | | del_flag = #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null" > |
| | | create_by = #{createBy}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null" > |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="selectCompanySummaryList" resultType="com.gkhy.exam.system.domain.CompanySummary"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `company_name`, |
| | | `company_summary`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM |
| | | company_summary |
| | | WHERE |
| | | del_flag = 1 |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | ORDER BY |
| | | create_time DESC |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.QualityAccomplishMapper"> |
| | | |
| | | <select id="selectQualityAccomplishList" resultType="com.gkhy.exam.system.domain.vo.QualityAccomplishVo"> |
| | | SELECT |
| | | qa.`id`, |
| | | qa.`company_id`, |
| | | q.company_name, |
| | | q.year, |
| | | q.type, |
| | | q.depart_name, |
| | | qa.`quality_id`, |
| | | qa.`serial`, |
| | | qa.`frequency`, |
| | | qa.`accomplish`, |
| | | qa.`measure`, |
| | | qa.`opinion`, |
| | | qa.`charge_id`, |
| | | qa.`charge_name`, |
| | | qa.`charge_time`, |
| | | qa.`del_flag`, |
| | | qa.`create_by`, |
| | | qa.`create_time`, |
| | | qa.`update_by`, |
| | | qa.`update_time` |
| | | FROM |
| | | quality_accomplish qa |
| | | LEFT JOIN quality q ON qa.quality_id = q.id |
| | | WHERE |
| | | qa.del_flag = 1 |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and qa.company_id = #{companyId} |
| | | </if> |
| | | <if test="year!=null and year!=''"> |
| | | and q.`year` = #{year} |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and q.`type` = #{type} |
| | | </if> |
| | | ORDER BY qa.create_time DESC |
| | | </select> |
| | | <select id="selectByQualityId" resultType="com.gkhy.exam.system.domain.QualityAccomplish"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `quality_id`, |
| | | `serial`, |
| | | `frequency`, |
| | | `accomplish`, |
| | | `measure`, |
| | | `opinion`, |
| | | `charge_id`, |
| | | `charge_name`, |
| | | `charge_time`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM |
| | | quality_accomplish |
| | | where del_flag =1 and quality_id = #{qualityId} |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.QualityDecomposeMapper"> |
| | | <insert id="insertDecompose" useGeneratedKeys="true" keyProperty="id"> |
| | | INSERT INTO |
| | | `train_exam`.`quality_decompose` |
| | | ( `company_id`, `quality_id`, `number`, `serial`, `fiction_id`, `fiction_name`, `fiction_time`, `check_id`,`check_name`, |
| | | `check_time`, `ratify_id`, `ratify_name`, `ratify_time`, `create_by`, `create_time`) |
| | | VALUES |
| | | ( #{companyId}, #{qualityId}, #{number}, #{serial}, #{fictionId}, #{fictionName}, #{fictionTime}, #{checkId}, #{checkName}, |
| | | #{checkTime}, #{ratifyId}, #{ratifyName}, #{ratifyTime}, #{createBy}, #{createTime}) |
| | | |
| | | </insert> |
| | | |
| | | <select id="selectDecomposeList" resultType="com.gkhy.exam.system.domain.vo.QualityDecomposeVo"> |
| | | SELECT |
| | | qd.`id`, |
| | | qd.`company_id`, |
| | | q.company_name, |
| | | q.`year`, |
| | | q.type, |
| | | q.depart_name, |
| | | qd.`quality_id`, |
| | | qd.`number`, |
| | | qd.`serial`, |
| | | qd.`fiction_id`, |
| | | qd.`fiction_name`, |
| | | qd.`fiction_time`, |
| | | qd.`check_id`, |
| | | qd.`check_name`, |
| | | qd.`check_time`, |
| | | qd.`ratify_id`, |
| | | qd.`ratify_name`, |
| | | qd.`ratify_time`, |
| | | qd.`del_flag`, |
| | | qd.`create_by`, |
| | | qd.`create_time`, |
| | | qd.`update_by`, |
| | | qd.`update_time` |
| | | FROM quality_decompose qd |
| | | LEFT JOIN quality q on qd.quality_id = q.id |
| | | WHERE qd.del_flag = 1 |
| | | <if test="companyId !=null and companyId!=''"> |
| | | and q.company_id =#{companyId} |
| | | </if> |
| | | <if test="year!=null and year!=''"> |
| | | and q.`year` = #{year} |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and q.type = #{type} |
| | | </if> |
| | | </select> |
| | | <select id="selectByCompanyId" resultType="com.gkhy.exam.system.domain.QualityDecompose"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `quality_id`, |
| | | `number`, |
| | | `serial`, |
| | | `fiction_id`, |
| | | `fiction_name`, |
| | | `fiction_time`, |
| | | `check_id`, |
| | | `check_name`, |
| | | `check_time`, |
| | | `ratify_id`, |
| | | `ratify_name`, |
| | | `ratify_time`, |
| | | `del_flag`, |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | FROM quality_decompose |
| | | where del_flag = 1 |
| | | and quality_id=#{qualityId} |
| | | </select> |
| | | |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.QualityMapper"> |
| | | |
| | | <insert id="insertQuality" useGeneratedKeys="true" keyProperty="id"> |
| | | INSERT INTO `train_exam`.`quality` ( |
| | | `company_id`,`company_name`,`year`,`num`,`type`, `depart_id`,`depart_name`,`method`,`compilation_id`, `compilation_name`,`compilation_time`,`quality_id`,`quality_name`, |
| | | `quality_time`,`lead_id`,`lead_name`,`lead_time`,`create_by`,`create_time` |
| | | ) |
| | | VALUES |
| | | ( |
| | | #{companyId},#{companyName},#{year},#{num},#{type},#{departId},#{departName},#{method},#{compilationId},#{compilationName},#{compilationTime},#{qualityId},#{qualityName}, |
| | | #{qualityTime},#{leadId},#{leadName},#{leadTime},#{createBy},#{createTime} |
| | | ); |
| | | </insert> |
| | | <update id="updateQualityById"> |
| | | UPDATE quality |
| | | <set> |
| | | <if test="companyId != null and companyId != ''" > |
| | | company_id = #{companyId}, |
| | | </if> |
| | | <if test="companyName != null and companyName != ''" > |
| | | company_name = #{companyName}, |
| | | </if> |
| | | <if test="year != null and year !=''" > |
| | | `year` = #{year}, |
| | | </if> |
| | | <if test="num != null and num !=''" > |
| | | num = #{num}, |
| | | </if> |
| | | <if test="type != null and type !=''" > |
| | | `type` = #{type}, |
| | | </if> |
| | | <if test="departId != null and departId !=''" > |
| | | depart_id = #{departId}, |
| | | </if> |
| | | <if test="departName != null and departName !=''" > |
| | | depart_name = #{departName}, |
| | | </if> |
| | | <if test="method != null and method !=''" > |
| | | `method` = #{method}, |
| | | </if> |
| | | <if test="compilationId != null and compilationId !=''" > |
| | | compilation_id = #{compilationId}, |
| | | </if> |
| | | <if test="compilationName != null and compilationName !=''" > |
| | | compilation_name = #{compilationName}, |
| | | </if> |
| | | <if test="compilationTime != null" > |
| | | compilation_time = #{compilationTime}, |
| | | </if> |
| | | <if test="qualityId != null and qualityId !=''" > |
| | | quality_id = #{qualityId}, |
| | | </if> |
| | | <if test="qualityName != null and qualityName !=''" > |
| | | quality_name = #{qualityName}, |
| | | </if> |
| | | <if test="qualityTime != null" > |
| | | quality_time = #{qualityTime}, |
| | | </if> |
| | | <if test="leadId != null and leadId !=''" > |
| | | lead_id = #{leadId}, |
| | | </if> |
| | | <if test="leadName != null and leadName !=''" > |
| | | lead_name = #{leadName}, |
| | | </if> |
| | | <if test="leadTime != null" > |
| | | lead_time = #{leadTime}, |
| | | </if> |
| | | <if test="delFlag != null and delFlag != ''" > |
| | | del_flag = #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null" > |
| | | create_by = #{createBy}, |
| | | </if> |
| | | <if test="createTime != null" > |
| | | create_time = #{createTime}, |
| | | </if> |
| | | <if test="updateBy != null" > |
| | | update_by = #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null" > |
| | | update_time = #{updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | |
| | | <select id="selectQualityTarget" resultType="com.gkhy.exam.system.domain.vo.QualityTargetVo"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `company_name`, |
| | | `year`, |
| | | `num`, |
| | | `type`, |
| | | `depart_id`, |
| | | `depart_name`, |
| | | `method`, |
| | | `compilation_id`, |
| | | `compilation_name`, |
| | | `compilation_time`, |
| | | `quality_id`, |
| | | `quality_name`, |
| | | `quality_time`, |
| | | `lead_id`, |
| | | `lead_name`, |
| | | `lead_time` |
| | | FROM quality |
| | | WHERE |
| | | del_flag=1 |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | <if test="year!=null and year!=''"> |
| | | and `year` = #{year} |
| | | </if> |
| | | <if test="type!=null and type!=''"> |
| | | and `type` = #{type} |
| | | </if> |
| | | ORDER BY |
| | | create_time DESC |
| | | </select> |
| | | <select id="selectQualityByType" resultType="com.gkhy.exam.system.domain.Quality"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `company_name`, |
| | | `year`, |
| | | `num`, |
| | | `type`, |
| | | `depart_id`, |
| | | `depart_name`, |
| | | `method`, |
| | | `compilation_id`, |
| | | `compilation_name`, |
| | | `compilation_time`, |
| | | `quality_id`, |
| | | `quality_name`, |
| | | `quality_time`, |
| | | `lead_id`, |
| | | `lead_name`, |
| | | `lead_time` |
| | | FROM quality |
| | | WHERE |
| | | del_flag=1 and `type` = #{type} and `year` = #{year} |
| | | <if test="type == 1"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | <if test="type == 2"> |
| | | and depart_id = #{departId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
对比新文件 |
| | |
| | | <?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.gkhy.exam.system.mapper.QualityTargetMapper"> |
| | | |
| | | <insert id="insertQualityTargets"> |
| | | INSERT INTO `train_exam`.`quality_target` ( |
| | | `company_id`,`quality_id`,`message`,`num`,`method`,`calculate`,`data_source`,`depart_name`, |
| | | `frequency`,`duty_name`,`remark`,`create_by`,`create_time` |
| | | ) |
| | | VALUES |
| | | <foreach collection="qualityTargets" separator="," item="item"> |
| | | (#{item.companyId},#{item.qualityId},#{item.message},#{item.num},#{item.method},#{item.calculate}, |
| | | #{item.dataSource},#{item.departName},#{item.frequency},#{item.dutyName},#{item.remark}, |
| | | #{item.createBy},#{item.createTime}) |
| | | </foreach> |
| | | </insert> |
| | | <update id="updateQualityTargetById"> |
| | | <foreach collection="qualityTargets" item="item" index="index" separator=";"> |
| | | UPDATE quality_target |
| | | <set> |
| | | <if test="item.companyId != null and item.companyId != ''" > |
| | | company_id = #{item.companyId}, |
| | | </if> |
| | | <if test="item.qualityId != null and item.qualityId != ''" > |
| | | quality_id = #{item.qualityId}, |
| | | </if> |
| | | <if test="item.message != null and item.message!=''" > |
| | | message = #{item.message}, |
| | | </if> |
| | | <if test="item.num != null and item.num != ''" > |
| | | num = #{item.num}, |
| | | </if> |
| | | <if test="item.method != null and item.method != ''" > |
| | | `method` = #{item.method}, |
| | | </if> |
| | | <if test="item.calculate != null and item.calculate != ''" > |
| | | calculate = #{item.calculate}, |
| | | </if> |
| | | <if test="item.dataSource != null and item.dataSource!=''" > |
| | | data_source = #{item.dataSource}, |
| | | </if> |
| | | <if test="item.departName != null and item.departName != ''" > |
| | | depart_name = #{item.departName}, |
| | | </if> |
| | | <if test="item.frequency != null and item.frequency != ''" > |
| | | frequency = #{item.frequency}, |
| | | </if> |
| | | <if test="item.dutyName != null and item.dutyName != ''" > |
| | | duty_name = #{item.dutyName}, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != ''" > |
| | | remark = #{item.remark}, |
| | | </if> |
| | | <if test="item.delFlag != null and item.delFlag != ''" > |
| | | del_flag = #{item.delFlag}, |
| | | </if> |
| | | <if test="item.createBy != null" > |
| | | create_by = #{item.createBy}, |
| | | </if> |
| | | <if test="item.createTime != null" > |
| | | create_time = #{item.createTime}, |
| | | </if> |
| | | <if test="item.updateBy != null" > |
| | | update_by = #{item.updateBy}, |
| | | </if> |
| | | <if test="item.updateTime != null" > |
| | | update_time = #{item.updateTime} |
| | | </if> |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | <delete id="deleteByQualityIds"> |
| | | UPDATE quality_target set del_flag =2 where quality_id in ( |
| | | <foreach collection="collect" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | ) |
| | | </delete> |
| | | <select id="selectByQualityId" resultType="com.gkhy.exam.system.domain.QualityTarget"> |
| | | select `id`,`company_id`,`quality_id`,`message`,`num`,`method`,`calculate`,`data_source`,`depart_name`, |
| | | `frequency`,`duty_name`,`remark`,`del_flag`,`create_by`,`create_time`,`update_by`,`update_time` |
| | | from quality_target |
| | | where del_flag = 1 |
| | | <if test="qualityId!=null and qualityId!=''"> |
| | | and quality_id = #{qualityId} |
| | | </if> |
| | | </select> |
| | | </mapper> |