20个文件已修改
3个文件已添加
1 文件已重命名
1个文件已删除
| | |
| | | import annotation.Excel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.system.entity.BaseEntity; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang.builder.ToStringBuilder; |
| | | import org.apache.commons.lang.builder.ToStringStyle; |
| | | |
| | |
| | | * @author ruoyi |
| | | * @date 2024-04-03 |
| | | */ |
| | | @Data |
| | | public class CalculateRecord extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | |
| | | /** æ»æå¡è´¹ */ |
| | | @Excel(name = "æ»æå¡è´¹") |
| | | private BigDecimal totalMount; |
| | | private BigDecimal totalAmount; |
| | | |
| | | /** æ£åæå¡è´¹ */ |
| | | @Excel(name = "æ£åæå¡è´¹") |
| | |
| | | @Excel(name = "èæ ¸åæ°") |
| | | private BigDecimal score; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setDate(Date date) |
| | | { |
| | | this.date = date; |
| | | } |
| | | |
| | | public Date getDate() |
| | | { |
| | | return date; |
| | | } |
| | | public void setRuleId(Long ruleId) |
| | | { |
| | | this.ruleId = ruleId; |
| | | } |
| | | |
| | | public Long getRuleId() |
| | | { |
| | | return ruleId; |
| | | } |
| | | public void setUnitId(Long unitId) |
| | | { |
| | | this.unitId = unitId; |
| | | } |
| | | |
| | | public Long getUnitId() |
| | | { |
| | | return unitId; |
| | | } |
| | | public void setTotalMount(BigDecimal totalMount) |
| | | { |
| | | this.totalMount = totalMount; |
| | | } |
| | | |
| | | public BigDecimal getTotalMount() |
| | | { |
| | | return totalMount; |
| | | } |
| | | public void setDeductAmount(BigDecimal deductAmount) |
| | | { |
| | | this.deductAmount = deductAmount; |
| | | } |
| | | |
| | | public BigDecimal getDeductAmount() |
| | | { |
| | | return deductAmount; |
| | | } |
| | | public void setScore(BigDecimal score) |
| | | { |
| | | this.score = score; |
| | | } |
| | | |
| | | public BigDecimal getScore() |
| | | { |
| | | return score; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("date", getDate()) |
| | | .append("ruleId", getRuleId()) |
| | | .append("unitId", getUnitId()) |
| | | .append("totalMount", getTotalMount()) |
| | | .append("deductAmount", getDeductAmount()) |
| | | .append("score", getScore()) |
| | | .toString(); |
| | | } |
| | | } |
| | |
| | | |
| | | /** è§åç»å */ |
| | | @Excel(name = "è§åç»å") |
| | | private String ruleDetail; |
| | | private String ruleIndex; |
| | | |
| | | /** è§åç±»å */ |
| | | @Excel(name = "è§åç±»å") |
| | |
| | | /** è§åæè¿° */ |
| | | @Excel(name = "è§åæè¿°") |
| | | private String ruleDescription; |
| | | |
| | | /** å®¡æ ¸ç¶æ */ |
| | | @Excel(name = "å®¡æ ¸ç¶æ") |
| | | private Long auditState; |
| | | |
| | | /** å¯ç¨ç¶æ */ |
| | | @Excel(name = "å¯ç¨ç¶æ") |
| | |
| | | { |
| | | return ruleName; |
| | | } |
| | | public void setRuleDetail(String ruleDetail) |
| | | public void setRuleIndex(String ruleIndex) |
| | | { |
| | | this.ruleDetail = ruleDetail; |
| | | this.ruleIndex = ruleIndex; |
| | | } |
| | | |
| | | public String getRuleDetail() |
| | | public String getRuleIndex() |
| | | { |
| | | return ruleDetail; |
| | | return ruleIndex; |
| | | } |
| | | public void setRuleCategory(Long ruleCategory) |
| | | { |
| | |
| | | { |
| | | return ruleDescription; |
| | | } |
| | | public void setAuditState(Long auditState) |
| | | { |
| | | this.auditState = auditState; |
| | | } |
| | | |
| | | public Long getAuditState() |
| | | { |
| | | return auditState; |
| | | } |
| | | public void setState(Long state) |
| | | { |
| | | this.state = state; |
| | |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("ruleName", getRuleName()) |
| | | .append("ruleDetail", getRuleDetail()) |
| | | .append("ruleIndex", getRuleIndex()) |
| | | .append("ruleCategory", getRuleCategory()) |
| | | .append("examineCategory", getExamineCategory()) |
| | | .append("ruleDescription", getRuleDescription()) |
| | | .append("auditState", getAuditState()) |
| | | .append("state", getState()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateTime", getUpdateTime()) |
New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import annotation.Excel; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * ä¸åå·¥åæ¥è¯¢ |
| | | * |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "èæ ¸è§å管ç", description = "èæ ¸è§å管ç") |
| | | public class CheckRuleQuery extends AbsQuery { |
| | | /** |
| | | * 模æ¿id |
| | | */ |
| | | private Integer templateId; |
| | | /** |
| | | * å®¡æ ¸ç¶æ |
| | | */ |
| | | private Integer auditState; |
| | | /** |
| | | * è§ååç§° |
| | | */ |
| | | private String ruleName; |
| | | /** |
| | | * è§åç±»å |
| | | */ |
| | | private Integer ruleCategory; |
| | | /** |
| | | * èæ ¸ç±»å |
| | | */ |
| | | private Integer examineCategory; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.platform.domain.query; |
| | | |
| | | import annotation.Excel; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ycl.platform.base.AbsQuery; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @ApiModel(value = "è§åæ¨¡æ¿æ¥è¯¢", description = "è§åæ¨¡æ¿æ¥è¯¢") |
| | | public class CheckTemplateQuery extends AbsQuery { |
| | | /** */ |
| | | private Long id; |
| | | |
| | | /** 模æ¿åç§° */ |
| | | @Excel(name = "模æ¿åç§°") |
| | | private String templateName; |
| | | |
| | | /** è°æ´ç³»æ° */ |
| | | @Excel(name = "è°æ´ç³»æ°") |
| | | private Long adjustCoefficient; |
| | | |
| | | /** è°æ´æ¹å¼ï¼ä¹é¤ */ |
| | | @Excel(name = "è°æ´æ¹å¼ï¼ä¹é¤") |
| | | private String adjustWay; |
| | | |
| | | /** èæ ¸ç±»å */ |
| | | @Excel(name = "èæ ¸ç±»å") |
| | | private Long examineCategory; |
| | | |
| | | /** å¯ç¨/åç¨ */ |
| | | @Excel(name = "å¯ç¨/åç¨") |
| | | private String status; |
| | | |
| | | /** åºå¿ */ |
| | | @Excel(name = "åºå¿") |
| | | private List deptId; |
| | | |
| | | /** å建人id */ |
| | | private Long createUser; |
| | | |
| | | /** å建人å§å */ |
| | | @Excel(name = "å建人å§å") |
| | | private String createUserName; |
| | | |
| | | /** */ |
| | | private Long updateUser; |
| | | |
| | | /** */ |
| | | @Excel(name = "") |
| | | private String updateUserName; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String deleted; |
| | | |
| | | |
| | | /** å建è
*/ |
| | | private String createBy; |
| | | |
| | | /** å建æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** æ´æ°è
*/ |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private String updateBy; |
| | | |
| | | /** æ´æ°æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField(fill = FieldFill.UPDATE) |
| | | private Date updateTime; |
| | | } |
New file |
| | |
| | | package com.ycl.platform.domain.vo; |
| | | |
| | | import annotation.Excel; |
| | | import com.ycl.platform.base.AbsVo; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * èæ ¸è§åå±ç¤º |
| | | * |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | public class CheckRuleVO extends AbsVo { |
| | | /** |
| | | * 模æ¿id |
| | | */ |
| | | private Integer templateId; |
| | | |
| | | /** 模æ¿å */ |
| | | private String templateName; |
| | | /** |
| | | * å®¡æ ¸ç¶æ |
| | | */ |
| | | private Integer auditState; |
| | | /** |
| | | * è§ååç§° |
| | | */ |
| | | private String ruleName; |
| | | /** |
| | | * è§åç±»å |
| | | */ |
| | | private String ruleCategory; |
| | | |
| | | /** è§åç»å */ |
| | | private String ruleIndex; |
| | | |
| | | /** èæ ¸ç±»å */ |
| | | private Long examineCategory; |
| | | |
| | | /** è§åæè¿° */ |
| | | private String ruleDescription; |
| | | |
| | | /** è§åæé */ |
| | | private BigDecimal weight; |
| | | |
| | | /** å¯ç¨ç¶æ */ |
| | | private Long state; |
| | | |
| | | /** é»è¾å é¤ */ |
| | | private String deleted; |
| | | |
| | | } |
| | |
| | | /** é¨é¨åç§° */ |
| | | private String deptName; |
| | | |
| | | /** åºååç§° */ |
| | | private String area; |
| | | /** æ¾ç¤ºé¡ºåº */ |
| | | private Integer orderNum; |
| | | |
| | |
| | | |
| | | /** åé¨é¨ */ |
| | | private List<SysDept> children = new ArrayList<SysDept>(); |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | |
| | | public Long getDeptId() |
| | | { |
| | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("deptId", getDeptId()) |
| | | .append("parentId", getParentId()) |
| | | .append("ancestors", getAncestors()) |
| | | .append("deptName", getDeptName()) |
| | | .append("orderNum", getOrderNum()) |
| | | .append("leader", getLeader()) |
| | | .append("phone", getPhone()) |
| | | .append("email", getEmail()) |
| | | .append("status", getStatus()) |
| | | .append("delFlag", getDelFlag()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .toString(); |
| | | return "SysDept{" + |
| | | "deptId=" + deptId + |
| | | ", parentId=" + parentId + |
| | | ", ancestors='" + ancestors + '\'' + |
| | | ", deptName='" + deptName + '\'' + |
| | | ", area='" + area + '\'' + |
| | | ", orderNum=" + orderNum + |
| | | ", leader='" + leader + '\'' + |
| | | ", phone='" + phone + '\'' + |
| | | ", email='" + email + '\'' + |
| | | ", status='" + status + '\'' + |
| | | ", delFlag='" + delFlag + '\'' + |
| | | ", parentName='" + parentName + '\'' + |
| | | ", children=" + children + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.query.CheckRuleQuery; |
| | | import com.ycl.platform.domain.vo.CheckRuleVO; |
| | | import com.ycl.platform.service.ICheckRuleService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | |
| | | * æ¥è¯¢èæ ¸è§åå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:rule:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(CheckRule checkRule) |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody CheckRuleQuery checkRuleQuery) |
| | | { |
| | | startPage(); |
| | | List<CheckRule> list = checkRuleService.selectCheckRuleList(checkRule); |
| | | List<CheckRuleVO> list = checkRuleService.selectCheckRuleList(checkRuleQuery); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:rule:export')") |
| | | @Log(title = "èæ ¸è§å", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, CheckRule checkRule) |
| | | public void export(HttpServletResponse response, CheckRuleQuery checkRuleQuery) |
| | | { |
| | | List<CheckRule> list = checkRuleService.selectCheckRuleList(checkRule); |
| | | ExcelUtil<CheckRule> util = new ExcelUtil<CheckRule>(CheckRule.class); |
| | | List<CheckRuleVO> list = checkRuleService.selectCheckRuleList(checkRuleQuery); |
| | | ExcelUtil<CheckRuleVO> util = new ExcelUtil<CheckRuleVO>(CheckRuleVO.class); |
| | | util.exportExcel(response, list, "èæ ¸è§åæ°æ®"); |
| | | } |
| | | |
| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | import com.ycl.platform.service.ICheckTemplateService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:template:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(CheckTemplate checkTemplate) |
| | | public TableDataInfo list(CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | startPage(); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplate); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplateDTO); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:template:export')") |
| | | @Log(title = "èæ ¸æ¨¡æ¿", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, CheckTemplate checkTemplate) |
| | | public void export(HttpServletResponse response, CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplate); |
| | | List<CheckTemplate> list = checkTemplateService.selectCheckTemplateList(checkTemplateDTO); |
| | | ExcelUtil<CheckTemplate> util = new ExcelUtil<CheckTemplate>(CheckTemplate.class); |
| | | util.exportExcel(response, list, "èæ ¸æ¨¡æ¿æ°æ®"); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:template:add')") |
| | | @Log(title = "èæ ¸æ¨¡æ¿", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody CheckTemplate checkTemplate) |
| | | public AjaxResult add(@RequestBody CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | return toAjax(checkTemplateService.insertCheckTemplate(checkTemplate)); |
| | | return toAjax(checkTemplateService.insertCheckTemplate(checkTemplateDTO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | return toAjax(checkTemplateService.deleteCheckTemplateByIds(ids)); |
| | | } |
| | | |
| | | @GetMapping("/pullList") |
| | | @ApiOperation(value = "å表", notes = "å表") |
| | | public Result pullList() { |
| | | return checkTemplateService.pullList(); |
| | | } |
| | | } |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.query.CheckRuleQuery; |
| | | import com.ycl.platform.domain.vo.CheckRuleVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param id èæ ¸è§åä¸»é® |
| | | * @return èæ ¸è§å |
| | | */ |
| | | public CheckRule selectCheckRuleById(Long id); |
| | | public CheckRuleVO selectCheckRuleById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ ¸è§åå表 |
| | | * |
| | | * @param checkRule èæ ¸è§å |
| | | * @param checkRuleQuery èæ ¸è§å |
| | | * @return èæ ¸è§åéå |
| | | */ |
| | | public List<CheckRule> selectCheckRuleList(CheckRule checkRule); |
| | | public List<CheckRuleVO> selectCheckRuleList(CheckRuleQuery checkRuleQuery); |
| | | |
| | | /** |
| | | * æ°å¢èæ ¸è§å |
| | |
| | | package com.ycl.platform.mapper; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * æ¥è¯¢èæ ¸æ¨¡æ¿å表 |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * @param checkTemplateDTO èæ ¸æ¨¡æ¿ |
| | | * @return èæ ¸æ¨¡æ¿éå |
| | | */ |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplate checkTemplate); |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplateQuery checkTemplateDTO); |
| | | |
| | | /** |
| | | * æ°å¢èæ ¸æ¨¡æ¿ |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.query.CheckRuleQuery; |
| | | import com.ycl.platform.domain.vo.CheckRuleVO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param id èæ ¸è§åä¸»é® |
| | | * @return èæ ¸è§å |
| | | */ |
| | | public CheckRule selectCheckRuleById(Long id); |
| | | public CheckRuleVO selectCheckRuleById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ ¸è§åå表 |
| | | * |
| | | * @param checkRule èæ ¸è§å |
| | | * @param checkRuleQuery èæ ¸è§å |
| | | * @return èæ ¸è§åéå |
| | | */ |
| | | public List<CheckRule> selectCheckRuleList(CheckRule checkRule); |
| | | public List<CheckRuleVO> selectCheckRuleList(CheckRuleQuery checkRuleQuery); |
| | | |
| | | /** |
| | | * æ°å¢èæ ¸è§å |
| | |
| | | package com.ycl.platform.service; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | import com.ycl.system.Result; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @param id èæ ¸æ¨¡æ¿ä¸»é® |
| | | * @return èæ ¸æ¨¡æ¿ |
| | | */ |
| | | public CheckTemplate selectCheckTemplateById(Long id); |
| | | public CheckTemplateQuery selectCheckTemplateById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ ¸æ¨¡æ¿å表 |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * @param checkTemplateDTO èæ ¸æ¨¡æ¿ |
| | | * @return èæ ¸æ¨¡æ¿éå |
| | | */ |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplate checkTemplate); |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplateQuery checkTemplateDTO); |
| | | |
| | | /** |
| | | * æ°å¢èæ ¸æ¨¡æ¿ |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * @param checkTemplateDTO èæ ¸æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertCheckTemplate(CheckTemplate checkTemplate); |
| | | public int insertCheckTemplate(CheckTemplateQuery checkTemplateDTO); |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ ¸æ¨¡æ¿ |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteCheckTemplateById(Long id); |
| | | |
| | | Result pullList(); |
| | | |
| | | } |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.domain.entity.CheckRule; |
| | | import com.ycl.platform.domain.query.CheckRuleQuery; |
| | | import com.ycl.platform.domain.vo.CheckRuleVO; |
| | | import com.ycl.platform.mapper.CheckRuleMapper; |
| | | import com.ycl.platform.service.ICheckRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @return èæ ¸è§å |
| | | */ |
| | | @Override |
| | | public CheckRule selectCheckRuleById(Long id) |
| | | public CheckRuleVO selectCheckRuleById(Long id) |
| | | { |
| | | return checkRuleMapper.selectCheckRuleById(id); |
| | | } |
| | |
| | | /** |
| | | * æ¥è¯¢èæ ¸è§åå表 |
| | | * |
| | | * @param checkRule èæ ¸è§å |
| | | * @param checkRuleQuery èæ ¸è§å |
| | | * @return èæ ¸è§å |
| | | */ |
| | | @Override |
| | | public List<CheckRule> selectCheckRuleList(CheckRule checkRule) |
| | | public List<CheckRuleVO> selectCheckRuleList(CheckRuleQuery checkRuleQuery) |
| | | { |
| | | return checkRuleMapper.selectCheckRuleList(checkRule); |
| | | return checkRuleMapper.selectCheckRuleList(checkRuleQuery); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ycl.platform.service.impl; |
| | | |
| | | import com.ycl.platform.base.BaseSelect; |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | import com.ycl.platform.mapper.CheckTemplateMapper; |
| | | import com.ycl.platform.service.ICheckTemplateService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.entity.SysDept; |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import io.jsonwebtoken.lang.Collections; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.stereotype.Service; |
| | | import utils.DateUtils; |
| | | import utils.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * èæ ¸æ¨¡æ¿Serviceä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-04-01 |
| | | */ |
| | | @Service |
| | | public class CheckTemplateServiceImpl implements ICheckTemplateService |
| | | { |
| | | public class CheckTemplateServiceImpl implements ICheckTemplateService { |
| | | @Autowired |
| | | private CheckTemplateMapper checkTemplateMapper; |
| | | @Autowired |
| | | private ISysDeptService deptService; |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ ¸æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param id èæ ¸æ¨¡æ¿ä¸»é® |
| | | * @return èæ ¸æ¨¡æ¿ |
| | | */ |
| | | @Override |
| | | public CheckTemplate selectCheckTemplateById(Long id) |
| | | { |
| | | return checkTemplateMapper.selectCheckTemplateById(id); |
| | | public CheckTemplateQuery selectCheckTemplateById(Long id) { |
| | | CheckTemplate checkTemplate = checkTemplateMapper.selectCheckTemplateById(id); |
| | | CheckTemplateQuery checkTemplateQuery = new CheckTemplateQuery(); |
| | | BeanUtils.copyProperties(checkTemplate,checkTemplateQuery); |
| | | String deptId = checkTemplate.getDeptId(); |
| | | String deptIdStr = deptId.substring(1, deptId.length() - 1); |
| | | List<Integer> deptIds = Arrays.stream(deptIdStr.split(",")) |
| | | .mapToInt(Integer::parseInt) |
| | | .boxed().collect(Collectors.toList()); |
| | | checkTemplateQuery.setDeptId(deptIds); |
| | | return checkTemplateQuery; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢èæ ¸æ¨¡æ¿å表 |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * |
| | | * @param checkTemplateDTO èæ ¸æ¨¡æ¿ |
| | | * @return èæ ¸æ¨¡æ¿ |
| | | */ |
| | | @Override |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplate checkTemplate) |
| | | { |
| | | return checkTemplateMapper.selectCheckTemplateList(checkTemplate); |
| | | public List<CheckTemplate> selectCheckTemplateList(CheckTemplateQuery checkTemplateDTO) { |
| | | List<CheckTemplate> checkTemplates = checkTemplateMapper.selectCheckTemplateList(checkTemplateDTO); |
| | | //é¨é¨åºå䏿å表 |
| | | Result all = deptService.pullList(); |
| | | List<BaseSelect> data = (List<BaseSelect>) all.get("data"); |
| | | //ç¿»è¯é¨é¨id |
| | | for (CheckTemplate template : checkTemplates) { |
| | | if(template.getDeptId() == null)continue; |
| | | String[] deptIds = template.getDeptId().replace("[", "").replace("]", "").split(","); |
| | | List<String> deptName = new ArrayList<>(); |
| | | for (String deptId : deptIds) { |
| | | List<String> deptStr = data.stream() |
| | | .filter(baseSelect -> baseSelect.getId().equals(Integer.parseInt(deptId))) |
| | | .map(BaseSelect::getValue) |
| | | .collect(Collectors.toList()); |
| | | deptName.addAll(deptStr); |
| | | } |
| | | template.setDeptId(StringUtils.join(deptName,",")); |
| | | } |
| | | |
| | | return checkTemplates; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢èæ ¸æ¨¡æ¿ |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * |
| | | * @param checkTemplateDTO èæ ¸æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertCheckTemplate(CheckTemplate checkTemplate) |
| | | { |
| | | checkTemplate.setCreateTime(DateUtils.getNowDate()); |
| | | public int insertCheckTemplate(CheckTemplateQuery checkTemplateDTO) { |
| | | checkTemplateDTO.setCreateTime(DateUtils.getNowDate()); |
| | | CheckTemplate checkTemplate = new CheckTemplate(); |
| | | BeanUtils.copyProperties(checkTemplateDTO,checkTemplate); |
| | | checkTemplate.setDeptId(checkTemplateDTO.getDeptId().toString().replaceAll(" ","")); |
| | | return checkTemplateMapper.insertCheckTemplate(checkTemplate); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹èæ ¸æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param checkTemplate èæ ¸æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateCheckTemplate(CheckTemplate checkTemplate) |
| | | { |
| | | public int updateCheckTemplate(CheckTemplate checkTemplate) { |
| | | checkTemplate.setUpdateTime(DateUtils.getNowDate()); |
| | | return checkTemplateMapper.updateCheckTemplate(checkTemplate); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤èæ ¸æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param ids éè¦å é¤çèæ ¸æ¨¡æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteCheckTemplateByIds(Long[] ids) |
| | | { |
| | | public int deleteCheckTemplateByIds(Long[] ids) { |
| | | return checkTemplateMapper.deleteCheckTemplateByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤èæ ¸æ¨¡æ¿ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param id èæ ¸æ¨¡æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteCheckTemplateById(Long id) |
| | | { |
| | | public int deleteCheckTemplateById(Long id) { |
| | | return checkTemplateMapper.deleteCheckTemplateById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Result pullList() { |
| | | List<CheckTemplate> checkTemplates = checkTemplateMapper.selectCheckTemplateList(new CheckTemplateQuery()); |
| | | |
| | | return Result.ok().data(checkTemplates); |
| | | } |
| | | } |
| | |
| | | public Result all() { |
| | | return deptService.all(); |
| | | } |
| | | |
| | | @GetMapping("/pullList") |
| | | @ApiOperation(value = "åºå䏿å表", notes = "åºå䏿å表") |
| | | public Result pullList() { |
| | | return deptService.pullList(); |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | /** |
| | | * åºåå表 |
| | | * @return |
| | | */ |
| | | Result pullList(); |
| | | } |
| | |
| | | return deptMapper.deleteDeptById(deptId); |
| | | } |
| | | |
| | | /** |
| | | * é¨é¨ä¸æå表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<BaseSelect> vos = deptMapper.selectDeptList(new SysDept()).stream().map(sysDept -> { |
| | |
| | | ).collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | /** |
| | | * åºå䏿å表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result pullList() { |
| | | List<BaseSelect> vos = deptMapper.selectDeptList(new SysDept()).stream().filter(sysDept -> sysDept.getArea()!=null).map(sysDept -> { |
| | | BaseSelect baseSelect = new BaseSelect(); |
| | | baseSelect.setId(Integer.parseInt(sysDept.getDeptId() + "")); |
| | | baseSelect.setValue(sysDept.getArea()); |
| | | return baseSelect; |
| | | } |
| | | ).collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | /** |
| | | * éå½å表 |
| | |
| | | datasource: |
| | | url: jdbc:mysql://101.35.247.188:3306/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username: root |
| | | password: 123456 |
| | | password: ycl@202466 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | |
| | | datasource: |
| | | url: jdbc:mysql://101.35.247.188:3306/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false |
| | | username: root |
| | | password: 123456 |
| | | password: ycl@202466 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | |
| | |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="ancestors" column="ancestors" /> |
| | | <result property="deptName" column="dept_name" /> |
| | | <result property="area" column="area" /> |
| | | <result property="orderNum" column="order_num" /> |
| | | <result property="leader" column="leader" /> |
| | | <result property="phone" column="phone" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectDeptVo"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.area |
| | | from sys_dept d |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, |
| | | select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.area, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | |
| | | <set> |
| | | <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> |
| | | <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> |
| | | <if test="area != null and area != ''">area = #{area},</if> |
| | | <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if> |
| | | <if test="orderNum != null">order_num = #{orderNum},</if> |
| | | <if test="leader != null">leader = #{leader},</if> |
| | |
| | | <result property="date" column="date" /> |
| | | <result property="ruleId" column="rule_id" /> |
| | | <result property="unitId" column="unit_id" /> |
| | | <result property="totalMount" column="totalMount" /> |
| | | <result property="totalAmount" column="total_amount" /> |
| | | <result property="deductAmount" column="deduct_amount" /> |
| | | <result property="score" column="score" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectCalculateRecordVo"> |
| | | select id, date, rule_id, unit_id, totalMount, deduct_amount, score from t_calculate_record |
| | | select id, date, rule_id, unit_id, total_amount, deduct_amount, score from t_calculate_record |
| | | </sql> |
| | | |
| | | <select id="selectCalculateRecordList" resultMap="CalculateRecordResult"> |
| | |
| | | <if test="date != null "> and date = #{date}</if> |
| | | <if test="ruleId != null "> and rule_id = #{ruleId}</if> |
| | | <if test="unitId != null "> and unit_id = #{unitId}</if> |
| | | <if test="totalMount != null "> and totalMount = #{totalMount}</if> |
| | | <if test="totalAmount != null "> and total_amount = #{totalAmount}</if> |
| | | <if test="deductAmount != null "> and deduct_amount = #{deductAmount}</if> |
| | | <if test="score != null "> and score = #{score}</if> |
| | | </where> |
| | |
| | | <if test="date != null">date,</if> |
| | | <if test="ruleId != null">rule_id,</if> |
| | | <if test="unitId != null">unit_id,</if> |
| | | <if test="totalMount != null">totalMount,</if> |
| | | <if test="totalAmount != null">total_amount,</if> |
| | | <if test="deductAmount != null">deduct_amount,</if> |
| | | <if test="score != null">score,</if> |
| | | </trim> |
| | |
| | | <if test="date != null">#{date},</if> |
| | | <if test="ruleId != null">#{ruleId},</if> |
| | | <if test="unitId != null">#{unitId},</if> |
| | | <if test="totalMount != null">#{totalMount},</if> |
| | | <if test="totalAmount != null">#{totalAmount},</if> |
| | | <if test="deductAmount != null">#{deductAmount},</if> |
| | | <if test="score != null">#{score},</if> |
| | | </trim> |
| | |
| | | <if test="date != null">date = #{date},</if> |
| | | <if test="ruleId != null">rule_id = #{ruleId},</if> |
| | | <if test="unitId != null">unit_id = #{unitId},</if> |
| | | <if test="totalMount != null">totalMount = #{totalMount},</if> |
| | | <if test="totalAmount != null">total_amount = #{totalAmount},</if> |
| | | <if test="deductAmount != null">deduct_amount = #{deductAmount},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | </trim> |
| | |
| | | <resultMap type="com.ycl.platform.domain.entity.CheckRule" id="CheckRuleResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="ruleName" column="rule_name" /> |
| | | <result property="ruleDetail" column="rule_detail" /> |
| | | <result property="ruleIndex" column="rule_index" /> |
| | | <result property="ruleCategory" column="rule_category" /> |
| | | <result property="examineCategory" column="examine_category" /> |
| | | <result property="ruleDescription" column="rule_description" /> |
| | | <result property="auditState" column="audit_state" /> |
| | | <result property="state" column="state" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectCheckRuleVo"> |
| | | select id, rule_name, rule_detail, rule_category, examine_category, rule_description, audit_state, state, create_time, update_time, deleted from t_check_rule |
| | | select id, rule_name, rule_index, rule_category, examine_category, rule_description, state, create_time, update_time, deleted from t_check_rule |
| | | </sql> |
| | | |
| | | <select id="selectCheckRuleList" resultMap="CheckRuleResult"> |
| | | <include refid="selectCheckRuleVo"/> |
| | | <where> |
| | | <if test="ruleName != null and ruleName != ''"> and rule_name like concat('%', #{ruleName}, '%')</if> |
| | | <if test="ruleCategory != null "> and rule_category = #{ruleCategory}</if> |
| | | <if test="examineCategory != null "> and examine_category = #{examineCategory}</if> |
| | | <if test="ruleDescription != null and ruleDescription != ''"> and rule_description = #{ruleDescription}</if> |
| | | <if test="auditState != null "> and audit_state = #{auditState}</if> |
| | | <if test="state != null "> and state = #{state}</if> |
| | | <select id="selectCheckRuleList" resultType="com.ycl.platform.domain.vo.CheckRuleVO"> |
| | | select tcr.id, tcr.rule_name, tcr.rule_index, tcr.rule_category, tcr.examine_category, tcr.rule_description, |
| | | tctr.weight, tctr.audit_state,tctr.check_template_id as templateId,tct.template_name |
| | | from t_check_template_rule tctr inner join t_check_rule tcr on tcr.id = tctr.check_rule_id |
| | | inner join t_check_template tct on tctr.check_template_id = tct.id |
| | | <where> |
| | | state = 0 |
| | | <if test="ruleName != null and ruleName != ''"> and tcr.rule_name like concat(#{ruleName}, '%')</if> |
| | | <if test="ruleCategory != null "> and tcr.rule_category = #{ruleCategory}</if> |
| | | <if test="examineCategory != null "> and tcr.examine_category = #{examineCategory}</if> |
| | | <if test="auditState != null "> and tctr.audit_state = #{auditState}</if> |
| | | <if test="templateId != null "> and tctr.check_template_id = #{templateId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectCheckRuleById" resultMap="CheckRuleResult"> |
| | | <include refid="selectCheckRuleVo"/> |
| | | where id = #{id} |
| | | <select id="selectCheckRuleById" resultType="com.ycl.platform.domain.vo.CheckRuleVO"> |
| | | select tcr.id, tcr.rule_name, tcr.rule_index, tcr.rule_category, tcr.examine_category, tcr.rule_description, tctr.weight, tctr.audit_state,tctr.check_template_id as templateId |
| | | from t_check_rule tcr inner join t_check_template_rule tctr on tcr.id = tctr.check_rule_id |
| | | where tcr.id = #{id} and tcr.state = 0 |
| | | </select> |
| | | |
| | | <insert id="insertCheckRule" useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="ruleCategory != null">rule_category,</if> |
| | | <if test="examineCategory != null">examine_category,</if> |
| | | <if test="ruleDescription != null">rule_description,</if> |
| | | <if test="auditState != null">audit_state,</if> |
| | | <if test="state != null">state,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="ruleName != null and ruleName != ''">#{ruleName},</if> |
| | | <if test="ruleDetail != null">#{ruleDetail},</if> |
| | | <if test="ruleIndex != null">#{ruleIndex},</if> |
| | | <if test="ruleCategory != null">#{ruleCategory},</if> |
| | | <if test="examineCategory != null">#{examineCategory},</if> |
| | | <if test="ruleDescription != null">#{ruleDescription},</if> |
| | | <if test="auditState != null">#{auditState},</if> |
| | | <if test="state != null">#{state},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | |
| | | update t_check_rule |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="ruleName != null and ruleName != ''">rule_name = #{ruleName},</if> |
| | | <if test="ruleDetail != null">rule_detail = #{ruleDetail},</if> |
| | | <if test="ruleIndex != null">rule_index = #{ruleIndex},</if> |
| | | <if test="ruleCategory != null">rule_category = #{ruleCategory},</if> |
| | | <if test="examineCategory != null">examine_category = #{examineCategory},</if> |
| | | <if test="ruleDescription != null">rule_description = #{ruleDescription},</if> |
| | | <if test="auditState != null">audit_state = #{auditState},</if> |
| | | <if test="state != null">state = #{state},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | |
| | | <include refid="selectCheckTemplateVo"/> |
| | | <where> |
| | | <if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if> |
| | | <if test="adjustCoefficient != null "> and adjust_coefficient = #{adjustCoefficient}</if> |
| | | <if test="adjustWay != null and adjustWay != ''"> and adjust_way = #{adjustWay}</if> |
| | | <if test="examineCategory != null "> and examine_category = #{examineCategory}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | <if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if> |
| | | </where> |
| | | </select> |
| | | |