Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/LedgerProject.java +7 −8 Original line number Diff line number Diff line Loading @@ -20,35 +20,33 @@ public class LedgerProject extends BaseEntityClean private Long id; /** 项目名称 */ @Excel(name = "项目名称") @Excel(name = "项目名称",sort = 1) private String name; /** 项目类型 */ @Excel(name = "项目类型") @Excel(name = "项目类型",sort = 2) private String type; /** 项目业态 */ @Excel(name = "项目业态") @Excel(name = "项目业态",sort = 3) private String business; /** 组织机构id */ @Excel(name = "组织机构id") private Long deptId; /** 所在城市 */ @Excel(name = "所在城市") @Excel(name = "所在城市",sort = 5) private String city; /** 详细地址 */ @Excel(name = "详细地址") @Excel(name = "详细地址",sort = 6) private String address; /** 0-关联 1-自建 */ @Excel(name = "0-关联 1-自建") private String source; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", dictType = "sys_normal_disable",sort = 7) private String status; /** 删除标志(0代表存在 1代表删除) */ Loading @@ -57,6 +55,7 @@ public class LedgerProject extends BaseEntityClean * 部门名称名称 */ @TableField(exist = false) @Excel(name = "所属区域",sort = 4) private String deptName; /** Loading censoft-rongtong/src/main/resources/mapper/system/LedgerProjectMapper.xml +28 −8 Original line number Diff line number Diff line Loading @@ -26,21 +26,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </sql> <select id="selectLedgerProjectList" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" resultMap="LedgerProjectResult"> SELECT p.id, p.NAME, p.type,p.business, p.dept_id, d.dept_name, p.city, p.address, p.source, p.STATUS, p.del_flag, p.create_by, p.create_time, p.update_by, p.update_time FROM ledger_project p LEFT JOIN sys_dept d ON p.dept_id = d.dept_id SELECT p.id, p.NAME, p.type, p.business, p.dept_id, d.dept_name, p.city, p.address, p.source, p.STATUS, p.del_flag, p.create_by, p.create_time, p.update_by, p.update_time FROM ledger_project p LEFT JOIN sys_dept d ON p.dept_id = d.dept_id <where> <if test="name != null and name != ''"> and p.name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''"> and p.type = #{type}</if> <if test="deptId != null "> and p.dept_id = #{deptId}</if> <if test="city != null and city != ''"> and p.city = #{city}</if> <if test="address != null and address != ''"> and p.address = #{address}</if> <if test="type != null and type != ''"> and p.type like concat('%', #{type}, '%')</if> <if test="business != null and business != ''"> and p.business = #{business}</if> <if test="deptId != null "> and ( d.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors) )</if> <if test="city != null and city != ''"> and p.city like concat('%', #{city}, '%')</if> <if test="address != null and address != ''"> and p.address like concat('%', #{address}, '%')</if> <if test="source != null and source != ''"> and p.source = #{source}</if> <if test="status != null and status != ''"> and p.status = #{status}</if> AND p.del_flag = '0' </where> </select> <select id="selectLedgerProjectById" parameterType="Long" resultMap="LedgerProjectResult"> <include refid="selectLedgerProjectVo"/> where id = #{id} where id = #{id} AND del_flag = '0' </select> <select id="getProjectListByDeptId" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" resultMap="LedgerProjectResult"> SELECT Loading Loading @@ -121,11 +141,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </update> <delete id="deleteLedgerProjectById" parameterType="Long"> delete from ledger_project where id = #{id} update ledger_project set del_flag = '1' where id = #{id} </delete> <delete id="deleteLedgerProjectByIds" parameterType="String"> delete from ledger_project where id in update ledger_project set del_flag = '1' where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> Loading Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/LedgerProject.java +7 −8 Original line number Diff line number Diff line Loading @@ -20,35 +20,33 @@ public class LedgerProject extends BaseEntityClean private Long id; /** 项目名称 */ @Excel(name = "项目名称") @Excel(name = "项目名称",sort = 1) private String name; /** 项目类型 */ @Excel(name = "项目类型") @Excel(name = "项目类型",sort = 2) private String type; /** 项目业态 */ @Excel(name = "项目业态") @Excel(name = "项目业态",sort = 3) private String business; /** 组织机构id */ @Excel(name = "组织机构id") private Long deptId; /** 所在城市 */ @Excel(name = "所在城市") @Excel(name = "所在城市",sort = 5) private String city; /** 详细地址 */ @Excel(name = "详细地址") @Excel(name = "详细地址",sort = 6) private String address; /** 0-关联 1-自建 */ @Excel(name = "0-关联 1-自建") private String source; /** 状态(0正常 1停用) */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", dictType = "sys_normal_disable",sort = 7) private String status; /** 删除标志(0代表存在 1代表删除) */ Loading @@ -57,6 +55,7 @@ public class LedgerProject extends BaseEntityClean * 部门名称名称 */ @TableField(exist = false) @Excel(name = "所属区域",sort = 4) private String deptName; /** Loading
censoft-rongtong/src/main/resources/mapper/system/LedgerProjectMapper.xml +28 −8 Original line number Diff line number Diff line Loading @@ -26,21 +26,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </sql> <select id="selectLedgerProjectList" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" resultMap="LedgerProjectResult"> SELECT p.id, p.NAME, p.type,p.business, p.dept_id, d.dept_name, p.city, p.address, p.source, p.STATUS, p.del_flag, p.create_by, p.create_time, p.update_by, p.update_time FROM ledger_project p LEFT JOIN sys_dept d ON p.dept_id = d.dept_id SELECT p.id, p.NAME, p.type, p.business, p.dept_id, d.dept_name, p.city, p.address, p.source, p.STATUS, p.del_flag, p.create_by, p.create_time, p.update_by, p.update_time FROM ledger_project p LEFT JOIN sys_dept d ON p.dept_id = d.dept_id <where> <if test="name != null and name != ''"> and p.name like concat('%', #{name}, '%')</if> <if test="type != null and type != ''"> and p.type = #{type}</if> <if test="deptId != null "> and p.dept_id = #{deptId}</if> <if test="city != null and city != ''"> and p.city = #{city}</if> <if test="address != null and address != ''"> and p.address = #{address}</if> <if test="type != null and type != ''"> and p.type like concat('%', #{type}, '%')</if> <if test="business != null and business != ''"> and p.business = #{business}</if> <if test="deptId != null "> and ( d.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors) )</if> <if test="city != null and city != ''"> and p.city like concat('%', #{city}, '%')</if> <if test="address != null and address != ''"> and p.address like concat('%', #{address}, '%')</if> <if test="source != null and source != ''"> and p.source = #{source}</if> <if test="status != null and status != ''"> and p.status = #{status}</if> AND p.del_flag = '0' </where> </select> <select id="selectLedgerProjectById" parameterType="Long" resultMap="LedgerProjectResult"> <include refid="selectLedgerProjectVo"/> where id = #{id} where id = #{id} AND del_flag = '0' </select> <select id="getProjectListByDeptId" parameterType="com.censoft.censoftrongtong.domain.LedgerProject" resultMap="LedgerProjectResult"> SELECT Loading Loading @@ -121,11 +141,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </update> <delete id="deleteLedgerProjectById" parameterType="Long"> delete from ledger_project where id = #{id} update ledger_project set del_flag = '1' where id = #{id} </delete> <delete id="deleteLedgerProjectByIds" parameterType="String"> delete from ledger_project where id in update ledger_project set del_flag = '1' where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> Loading