parent
1922e5da0a
commit
2023a7da1a
@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.szxc.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.szxc.domain.SzxcXyAuditRecard;
|
||||||
|
import com.ruoyi.szxc.service.ISzxcXyAuditRecardService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心愿审核记录Controller
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-04-13
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/szxc/xyrecard")
|
||||||
|
public class SzxcXyAuditRecardController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISzxcXyAuditRecardService szxcXyAuditRecardService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SzxcXyAuditRecard> list = szxcXyAuditRecardService.selectSzxcXyAuditRecardList(szxcXyAuditRecard);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出心愿审核记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:export')")
|
||||||
|
@Log(title = "心愿审核记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
List<SzxcXyAuditRecard> list = szxcXyAuditRecardService.selectSzxcXyAuditRecardList(szxcXyAuditRecard);
|
||||||
|
ExcelUtil<SzxcXyAuditRecard> util = new ExcelUtil<SzxcXyAuditRecard>(SzxcXyAuditRecard.class);
|
||||||
|
util.exportExcel(response, list, "心愿审核记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取心愿审核记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(szxcXyAuditRecardService.selectSzxcXyAuditRecardById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增心愿审核记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:add')")
|
||||||
|
@Log(title = "心愿审核记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
return toAjax(szxcXyAuditRecardService.insertSzxcXyAuditRecard(szxcXyAuditRecard));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改心愿审核记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:edit')")
|
||||||
|
@Log(title = "心愿审核记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
return toAjax(szxcXyAuditRecardService.updateSzxcXyAuditRecard(szxcXyAuditRecard));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除心愿审核记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('szxc:xyrecard:remove')")
|
||||||
|
@Log(title = "心愿审核记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(szxcXyAuditRecardService.deleteSzxcXyAuditRecardByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.szxc.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心愿审核记录对象 szxc_xy_audit_recard
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-04-13
|
||||||
|
*/
|
||||||
|
public class SzxcXyAuditRecard extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 心愿id */
|
||||||
|
@Excel(name = "心愿id")
|
||||||
|
private Long xyId;
|
||||||
|
|
||||||
|
/** 审核结果 */
|
||||||
|
@Excel(name = "审核结果")
|
||||||
|
private String auditResult;
|
||||||
|
|
||||||
|
/** 审核原因 */
|
||||||
|
@Excel(name = "审核原因")
|
||||||
|
private String auditReason;
|
||||||
|
|
||||||
|
/** 审核人 */
|
||||||
|
@Excel(name = "审核人")
|
||||||
|
private String auditName;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setXyId(Long xyId)
|
||||||
|
{
|
||||||
|
this.xyId = xyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getXyId()
|
||||||
|
{
|
||||||
|
return xyId;
|
||||||
|
}
|
||||||
|
public void setAuditResult(String auditResult)
|
||||||
|
{
|
||||||
|
this.auditResult = auditResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuditResult()
|
||||||
|
{
|
||||||
|
return auditResult;
|
||||||
|
}
|
||||||
|
public void setAuditReason(String auditReason)
|
||||||
|
{
|
||||||
|
this.auditReason = auditReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuditReason()
|
||||||
|
{
|
||||||
|
return auditReason;
|
||||||
|
}
|
||||||
|
public void setAuditName(String auditName)
|
||||||
|
{
|
||||||
|
this.auditName = auditName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuditName()
|
||||||
|
{
|
||||||
|
return auditName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("xyId", getXyId())
|
||||||
|
.append("auditResult", getAuditResult())
|
||||||
|
.append("auditReason", getAuditReason())
|
||||||
|
.append("auditName", getAuditName())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.szxc.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.szxc.domain.SzxcXyAuditRecard;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心愿审核记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-04-13
|
||||||
|
*/
|
||||||
|
public interface SzxcXyAuditRecardMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 心愿审核记录
|
||||||
|
*/
|
||||||
|
public SzxcXyAuditRecard selectSzxcXyAuditRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录列表
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 心愿审核记录集合
|
||||||
|
*/
|
||||||
|
public List<SzxcXyAuditRecard> selectSzxcXyAuditRecardList(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除心愿审核记录
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSzxcXyAuditRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除心愿审核记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSzxcXyAuditRecardByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.szxc.service;
|
||||||
|
|
||||||
|
import com.ruoyi.szxc.domain.SzxcXyAuditRecard;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心愿审核记录Service接口
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-04-13
|
||||||
|
*/
|
||||||
|
public interface ISzxcXyAuditRecardService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 心愿审核记录
|
||||||
|
*/
|
||||||
|
public SzxcXyAuditRecard selectSzxcXyAuditRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录列表
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 心愿审核记录集合
|
||||||
|
*/
|
||||||
|
public List<SzxcXyAuditRecard> selectSzxcXyAuditRecardList(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除心愿审核记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的心愿审核记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSzxcXyAuditRecardByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除心愿审核记录信息
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSzxcXyAuditRecardById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package com.ruoyi.szxc.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.szxc.domain.SzxcXyAuditRecard;
|
||||||
|
import com.ruoyi.szxc.mapper.SzxcXyAuditRecardMapper;
|
||||||
|
import com.ruoyi.szxc.service.ISzxcXyAuditRecardService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心愿审核记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2024-04-13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SzxcXyAuditRecardServiceImpl implements ISzxcXyAuditRecardService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SzxcXyAuditRecardMapper szxcXyAuditRecardMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 心愿审核记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SzxcXyAuditRecard selectSzxcXyAuditRecardById(Long id)
|
||||||
|
{
|
||||||
|
return szxcXyAuditRecardMapper.selectSzxcXyAuditRecardById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询心愿审核记录列表
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 心愿审核记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SzxcXyAuditRecard> selectSzxcXyAuditRecardList(SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
return szxcXyAuditRecardMapper.selectSzxcXyAuditRecardList(szxcXyAuditRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
szxcXyAuditRecard.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return szxcXyAuditRecardMapper.insertSzxcXyAuditRecard(szxcXyAuditRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改心愿审核记录
|
||||||
|
*
|
||||||
|
* @param szxcXyAuditRecard 心愿审核记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSzxcXyAuditRecard(SzxcXyAuditRecard szxcXyAuditRecard)
|
||||||
|
{
|
||||||
|
szxcXyAuditRecard.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return szxcXyAuditRecardMapper.updateSzxcXyAuditRecard(szxcXyAuditRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除心愿审核记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的心愿审核记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSzxcXyAuditRecardByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return szxcXyAuditRecardMapper.deleteSzxcXyAuditRecardByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除心愿审核记录信息
|
||||||
|
*
|
||||||
|
* @param id 心愿审核记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSzxcXyAuditRecardById(Long id)
|
||||||
|
{
|
||||||
|
return szxcXyAuditRecardMapper.deleteSzxcXyAuditRecardById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
<?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.ruoyi.szxc.mapper.SzxcXyAuditRecardMapper">
|
||||||
|
|
||||||
|
<resultMap type="SzxcXyAuditRecard" id="SzxcXyAuditRecardResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="xyId" column="xy_id" />
|
||||||
|
<result property="auditResult" column="audit_result" />
|
||||||
|
<result property="auditReason" column="audit_reason" />
|
||||||
|
<result property="auditName" column="audit_name" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSzxcXyAuditRecardVo">
|
||||||
|
select id, xy_id, audit_result, audit_reason, audit_name, remark, create_by, create_time, update_by, update_time from szxc_xy_audit_recard
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSzxcXyAuditRecardList" parameterType="SzxcXyAuditRecard" resultMap="SzxcXyAuditRecardResult">
|
||||||
|
<include refid="selectSzxcXyAuditRecardVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="xyId != null "> and xy_id = #{xyId}</if>
|
||||||
|
<if test="auditResult != null and auditResult != ''"> and audit_result = #{auditResult}</if>
|
||||||
|
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
|
||||||
|
<if test="auditName != null and auditName != ''"> and audit_name like concat('%', #{auditName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSzxcXyAuditRecardById" parameterType="Long" resultMap="SzxcXyAuditRecardResult">
|
||||||
|
<include refid="selectSzxcXyAuditRecardVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSzxcXyAuditRecard" parameterType="SzxcXyAuditRecard" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into szxc_xy_audit_recard
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="xyId != null">xy_id,</if>
|
||||||
|
<if test="auditResult != null">audit_result,</if>
|
||||||
|
<if test="auditReason != null">audit_reason,</if>
|
||||||
|
<if test="auditName != null">audit_name,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="xyId != null">#{xyId},</if>
|
||||||
|
<if test="auditResult != null">#{auditResult},</if>
|
||||||
|
<if test="auditReason != null">#{auditReason},</if>
|
||||||
|
<if test="auditName != null">#{auditName},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSzxcXyAuditRecard" parameterType="SzxcXyAuditRecard">
|
||||||
|
update szxc_xy_audit_recard
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="xyId != null">xy_id = #{xyId},</if>
|
||||||
|
<if test="auditResult != null">audit_result = #{auditResult},</if>
|
||||||
|
<if test="auditReason != null">audit_reason = #{auditReason},</if>
|
||||||
|
<if test="auditName != null">audit_name = #{auditName},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</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>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcXyAuditRecardById" parameterType="Long">
|
||||||
|
delete from szxc_xy_audit_recard where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSzxcXyAuditRecardByIds" parameterType="String">
|
||||||
|
delete from szxc_xy_audit_recard where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -1,8 +1,8 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 若依管理系统
|
VUE_APP_TITLE = 数字乡村管理系统
|
||||||
|
|
||||||
# 生产环境配置
|
# 生产环境配置
|
||||||
ENV = 'production'
|
ENV = 'production'
|
||||||
|
|
||||||
# 若依管理系统/生产环境
|
# 数字乡村管理系统/生产环境
|
||||||
VUE_APP_BASE_API = '/prod-api'
|
VUE_APP_BASE_API = '/prod-api'
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
# 页面标题
|
# 页面标题
|
||||||
VUE_APP_TITLE = 若依管理系统
|
VUE_APP_TITLE = 数字乡村管理系统
|
||||||
|
|
||||||
NODE_ENV = production
|
NODE_ENV = production
|
||||||
|
|
||||||
# 测试环境配置
|
# 测试环境配置
|
||||||
ENV = 'staging'
|
ENV = 'staging'
|
||||||
|
|
||||||
# 若依管理系统/测试环境
|
# 数字乡村管理系统/测试环境
|
||||||
VUE_APP_BASE_API = '/stage-api'
|
VUE_APP_BASE_API = '/stage-api'
|
||||||
|
|||||||
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询心愿审核记录列表
|
||||||
|
export function listXyrecard(query) {
|
||||||
|
return request({
|
||||||
|
url: '/szxc/xyrecard/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询心愿审核记录详细
|
||||||
|
export function getXyrecard(id) {
|
||||||
|
return request({
|
||||||
|
url: '/szxc/xyrecard/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增心愿审核记录
|
||||||
|
export function addXyrecard(data) {
|
||||||
|
return request({
|
||||||
|
url: '/szxc/xyrecard',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改心愿审核记录
|
||||||
|
export function updateXyrecard(data) {
|
||||||
|
return request({
|
||||||
|
url: '/szxc/xyrecard',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除心愿审核记录
|
||||||
|
export function delXyrecard(id) {
|
||||||
|
return request({
|
||||||
|
url: '/szxc/xyrecard/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,296 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="心愿id" prop="xyId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.xyId"
|
||||||
|
placeholder="请输入心愿id"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核结果" prop="auditResult">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.auditResult"
|
||||||
|
placeholder="请输入审核结果"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核原因" prop="auditReason">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.auditReason"
|
||||||
|
placeholder="请输入审核原因"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核人" prop="auditName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.auditName"
|
||||||
|
placeholder="请输入审核人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['szxc:xyrecard:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['szxc:xyrecard:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['szxc:xyrecard:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['szxc:xyrecard:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="xyrecardList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label=" " align="center" prop="id" />
|
||||||
|
<el-table-column label="心愿id" align="center" prop="xyId" />
|
||||||
|
<el-table-column label="审核结果" align="center" prop="auditResult" />
|
||||||
|
<el-table-column label="审核原因" align="center" prop="auditReason" />
|
||||||
|
<el-table-column label="审核人" align="center" prop="auditName" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['szxc:xyrecard:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['szxc:xyrecard:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改心愿审核记录对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="心愿id" prop="xyId">
|
||||||
|
<el-input v-model="form.xyId" placeholder="请输入心愿id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核结果" prop="auditResult">
|
||||||
|
<el-input v-model="form.auditResult" placeholder="请输入审核结果" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核原因" prop="auditReason">
|
||||||
|
<el-input v-model="form.auditReason" placeholder="请输入审核原因" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核人" prop="auditName">
|
||||||
|
<el-input v-model="form.auditName" placeholder="请输入审核人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listXyrecard, getXyrecard, delXyrecard, addXyrecard, updateXyrecard } from "@/api/szxc/xyrecard";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Xyrecard",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 心愿审核记录表格数据
|
||||||
|
xyrecardList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
xyId: null,
|
||||||
|
auditResult: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditName: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询心愿审核记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listXyrecard(this.queryParams).then(response => {
|
||||||
|
this.xyrecardList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
xyId: null,
|
||||||
|
auditResult: null,
|
||||||
|
auditReason: null,
|
||||||
|
auditName: null,
|
||||||
|
remark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加心愿审核记录";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getXyrecard(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改心愿审核记录";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateXyrecard(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addXyrecard(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除心愿审核记录编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delXyrecard(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('szxc/xyrecard/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `xyrecard_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in new issue