本次提交 经济类型
This commit is contained in:
parent
8fa2407e59
commit
0d5510acee
10
pom.xml
10
pom.xml
|
|
@ -215,6 +215,14 @@
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 平台配置 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>province-platform</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|
@ -225,6 +233,8 @@
|
||||||
<module>ruoyi-quartz</module>
|
<module>ruoyi-quartz</module>
|
||||||
<module>ruoyi-generator</module>
|
<module>ruoyi-generator</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
|
<module>province-platform</module>
|
||||||
|
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>4.5.1</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>province-platform</artifactId>
|
||||||
|
|
||||||
|
|
||||||
|
<description>
|
||||||
|
平台模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.province.platform.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经济类型对象 platf_econ_type
|
||||||
|
*
|
||||||
|
* @author dalin
|
||||||
|
* @date 2020-12-08
|
||||||
|
*/
|
||||||
|
public class EconType extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Integer econId;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
@Excel(name = "名称")
|
||||||
|
private String econName;
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
@Excel(name = "单据号")
|
||||||
|
private String docNum;
|
||||||
|
|
||||||
|
/** 资料状态 0有效 1无效 */
|
||||||
|
@Excel(name = "资料状态 0有效 1无效")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 删除标志 删除标志(0代表存在 2代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
public void setEconId(Integer econId)
|
||||||
|
{
|
||||||
|
this.econId = econId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getEconId()
|
||||||
|
{
|
||||||
|
return econId;
|
||||||
|
}
|
||||||
|
public void setEconName(String econName)
|
||||||
|
{
|
||||||
|
this.econName = econName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEconName()
|
||||||
|
{
|
||||||
|
return econName;
|
||||||
|
}
|
||||||
|
public void setDocNum(String docNum)
|
||||||
|
{
|
||||||
|
this.docNum = docNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocNum()
|
||||||
|
{
|
||||||
|
return docNum;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("econId", getEconId())
|
||||||
|
.append("econName", getEconName())
|
||||||
|
.append("docNum", getDocNum())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.province.platform.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.province.platform.domain.EconType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经济类型Mapper接口
|
||||||
|
*
|
||||||
|
* @author dalin
|
||||||
|
* @date 2020-12-08
|
||||||
|
*/
|
||||||
|
public interface EconTypeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询经济类型
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 经济类型
|
||||||
|
*/
|
||||||
|
public EconType selectEconTypeById(Integer econId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询经济类型列表
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 经济类型集合
|
||||||
|
*/
|
||||||
|
public List<EconType> selectEconTypeList(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertEconType(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateEconType(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除经济类型
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEconTypeById(Integer econId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除经济类型
|
||||||
|
*
|
||||||
|
* @param econIds 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEconTypeByIds(String[] econIds);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.province.platform.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.province.platform.domain.EconType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经济类型Service接口
|
||||||
|
*
|
||||||
|
* @author dalin
|
||||||
|
* @date 2020-12-08
|
||||||
|
*/
|
||||||
|
public interface IEconTypeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询经济类型
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 经济类型
|
||||||
|
*/
|
||||||
|
public EconType selectEconTypeById(Integer econId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询经济类型列表
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 经济类型集合
|
||||||
|
*/
|
||||||
|
public List<EconType> selectEconTypeList(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertEconType(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateEconType(EconType econType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除经济类型
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEconTypeByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除经济类型信息
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteEconTypeById(Integer econId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.ruoyi.province.platform.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.province.platform.mapper.EconTypeMapper;
|
||||||
|
import com.ruoyi.province.platform.domain.EconType;
|
||||||
|
import com.ruoyi.province.platform.service.IEconTypeService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经济类型Service业务层处理
|
||||||
|
*
|
||||||
|
* @author dalin
|
||||||
|
* @date 2020-12-08
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class EconTypeServiceImpl implements IEconTypeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private EconTypeMapper econTypeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询经济类型
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 经济类型
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EconType selectEconTypeById(Integer econId)
|
||||||
|
{
|
||||||
|
return econTypeMapper.selectEconTypeById(econId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询经济类型列表
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 经济类型
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<EconType> selectEconTypeList(EconType econType)
|
||||||
|
{
|
||||||
|
return econTypeMapper.selectEconTypeList(econType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertEconType(EconType econType)
|
||||||
|
{
|
||||||
|
econType.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return econTypeMapper.insertEconType(econType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改经济类型
|
||||||
|
*
|
||||||
|
* @param econType 经济类型
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateEconType(EconType econType)
|
||||||
|
{
|
||||||
|
econType.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return econTypeMapper.updateEconType(econType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除经济类型对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteEconTypeByIds(String ids)
|
||||||
|
{
|
||||||
|
return econTypeMapper.deleteEconTypeByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除经济类型信息
|
||||||
|
*
|
||||||
|
* @param econId 经济类型ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteEconTypeById(Integer econId)
|
||||||
|
{
|
||||||
|
return econTypeMapper.deleteEconTypeById(econId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?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.province.platform.mapper.EconTypeMapper">
|
||||||
|
|
||||||
|
<resultMap type="EconType" id="EconTypeResult">
|
||||||
|
<result property="econId" column="econ_id" />
|
||||||
|
<result property="econName" column="econ_name" />
|
||||||
|
<result property="docNum" column="doc_num" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<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="selectEconTypeVo">
|
||||||
|
select econ_id, econ_name, doc_num, status, remark, del_flag, create_by, create_time, update_by, update_time from platf_econ_type
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectEconTypeList" parameterType="EconType" resultMap="EconTypeResult">
|
||||||
|
<include refid="selectEconTypeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="econName != null and econName != ''"> and econ_name like concat('%', #{econName}, '%')</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectEconTypeById" parameterType="Integer" resultMap="EconTypeResult">
|
||||||
|
<include refid="selectEconTypeVo"/>
|
||||||
|
where econ_id = #{econId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertEconType" parameterType="EconType" useGeneratedKeys="true" keyProperty="econId">
|
||||||
|
insert into platf_econ_type
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="econName != null and econName != ''">econ_name,</if>
|
||||||
|
<if test="docNum != null">doc_num,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">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="econName != null and econName != ''">#{econName},</if>
|
||||||
|
<if test="docNum != null">#{docNum},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateEconType" parameterType="EconType">
|
||||||
|
update platf_econ_type
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="econName != null and econName != ''">econ_name = #{econName},</if>
|
||||||
|
<if test="docNum != null">doc_num = #{docNum},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">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 econ_id = #{econId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteEconTypeById" parameterType="Integer">
|
||||||
|
delete from platf_econ_type where econ_id = #{econId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteEconTypeByIds" parameterType="String">
|
||||||
|
delete from platf_econ_type where econ_id in
|
||||||
|
<foreach item="econId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{econId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -79,6 +79,13 @@
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 平台配置 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>province-platform</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
package com.ruoyi.web.controller.platform;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.province.platform.domain.EconType;
|
||||||
|
import com.ruoyi.province.platform.service.IEconTypeService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经济类型Controller
|
||||||
|
*
|
||||||
|
* @author dalin
|
||||||
|
* @date 2020-12-08
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/platform/econtype")
|
||||||
|
public class EconTypeController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "platform/econtype";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEconTypeService econTypeService;
|
||||||
|
|
||||||
|
@RequiresPermissions("platform:econtype:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String econtype()
|
||||||
|
{
|
||||||
|
return prefix + "/econtype";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询经济类型列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("platform:econtype:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(EconType econType)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<EconType> list = econTypeService.selectEconTypeList(econType);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出经济类型列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("platform:econtype:export")
|
||||||
|
@Log(title = "经济类型", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(EconType econType)
|
||||||
|
{
|
||||||
|
List<EconType> list = econTypeService.selectEconTypeList(econType);
|
||||||
|
ExcelUtil<EconType> util = new ExcelUtil<EconType>(EconType.class);
|
||||||
|
return util.exportExcel(list, "econtype");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增经济类型
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存经济类型
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("platform:econtype:add")
|
||||||
|
@Log(title = "经济类型", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(EconType econType)
|
||||||
|
{
|
||||||
|
return toAjax(econTypeService.insertEconType(econType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改经济类型
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{econId}")
|
||||||
|
public String edit(@PathVariable("econId") Integer econId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
EconType econType = econTypeService.selectEconTypeById(econId);
|
||||||
|
mmap.put("econType", econType);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存经济类型
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("platform:econtype:edit")
|
||||||
|
@Log(title = "经济类型", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(EconType econType)
|
||||||
|
{
|
||||||
|
return toAjax(econTypeService.updateEconType(econType));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除经济类型
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("platform:econtype:remove")
|
||||||
|
@Log(title = "经济类型", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(econTypeService.deleteEconTypeByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,9 +6,9 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/province?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: password
|
password: gx123
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ ruoyi:
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为80
|
# 服务器的HTTP端口,默认为80
|
||||||
port: 80
|
port: 8088
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增经济类型')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-econtype-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="econName" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">单据号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="docNum" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">资料状态 0有效 1无效:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}" required>
|
||||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="remark" class="form-control"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">删除标志 删除标志:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="delFlag" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "platform/econtype"
|
||||||
|
$("#form-econtype-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-econtype-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('经济类型列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>名称:</label>
|
||||||
|
<input type="text" name="econName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>资料状态 0有效 1无效:</label>
|
||||||
|
<select name="status" th:with="type=${@dict.getType('platf_doc_statu')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="platform:econtype:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="platform:econtype:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="platform:econtype:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="platform:econtype:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('platform:econtype:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('platform:econtype:remove')}]];
|
||||||
|
var statusDatas = [[${@dict.getType('platf_doc_statu')}]];
|
||||||
|
var prefix = ctx + "platform/econtype";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "经济类型",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'econId',
|
||||||
|
title: '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'econName',
|
||||||
|
title: '名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'docNum',
|
||||||
|
title: '单据号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '资料状态 0有效 1无效',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(statusDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.econId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.econId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改经济类型')" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-econtype-edit" th:object="${econType}">
|
||||||
|
<input name="econId" th:field="*{econId}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="econName" th:field="*{econName}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label is-required">资料状态 0有效 1无效:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('platf_doc_statu')}">
|
||||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}" required>
|
||||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">备注:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "platform/econtype";
|
||||||
|
$("#form-econtype-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-econtype-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
# 代码生成
|
# 代码生成
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: dalin
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.system
|
packageName: com.ruoyi.province.platform
|
||||||
# 自动去除表前缀,默认是false
|
# 自动去除表前缀,默认是false
|
||||||
autoRemovePre: false
|
autoRemovePre: true
|
||||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||||
tablePrefix: sys_
|
tablePrefix: sys_,platf_
|
||||||
Loading…
Reference in New Issue