Browse Source

项目统计指标开发

dev_kxc
zhuyulei 1 year ago
parent
commit
66996481f5
  1. 2
      jwtech-framework/src/main/java/com/jianwei/common/core/domain/entity/SysDept.java
  2. 4
      jwtech-system/src/main/java/com/kms/earlyStage/controller/SpecialProjectInfoController.java
  3. 6
      jwtech-system/src/main/java/com/kms/earlyStage/service/SpecialProjectInfoService.java
  4. 38
      jwtech-system/src/main/resources/mapper/system/SysDeptMapper.xml

2
jwtech-framework/src/main/java/com/jianwei/common/core/domain/entity/SysDept.java

@ -118,6 +118,8 @@ public class SysDept extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private List<String> classifyId;//专题库的id集合 private List<String> classifyId;//专题库的id集合
private String unifiedSocialCreditCode;
public List<String> addLibraryIds(String id){ public List<String> addLibraryIds(String id){
if(StringUtils.isEmpty(specialLibraryIds)) { if(StringUtils.isEmpty(specialLibraryIds)) {
specialLibraryIds = new ArrayList<>(); specialLibraryIds = new ArrayList<>();

4
jwtech-system/src/main/java/com/kms/earlyStage/controller/SpecialProjectInfoController.java

@ -91,13 +91,13 @@ public class SpecialProjectInfoController extends BaseController {
@ApiOperation("专题项目前期背景信息列表") @ApiOperation("专题项目前期背景信息列表")
public IPage list(@RequestBody SearchParam<SpecialProjectInfo> sp) { public IPage list(@RequestBody SearchParam<SpecialProjectInfo> sp) {
if (ObjectUtil.isNull(sp.getData())) { /*if (ObjectUtil.isNull(sp.getData())) {
Page<SpecialProjectInfo> page = new Page<>(); Page<SpecialProjectInfo> page = new Page<>();
List<SpecialProjectInfo> list = specialProjectInfoService.list(); List<SpecialProjectInfo> list = specialProjectInfoService.list();
page.setRecords(list); page.setRecords(list);
page.setTotal(list.size()); page.setTotal(list.size());
return page; return page;
} }*/
IPage<SpecialProjectInfo> specialProjectInfoIPage = specialProjectInfoService.selectPage(sp); IPage<SpecialProjectInfo> specialProjectInfoIPage = specialProjectInfoService.selectPage(sp);

6
jwtech-system/src/main/java/com/kms/earlyStage/service/SpecialProjectInfoService.java

@ -77,7 +77,11 @@ public class SpecialProjectInfoService extends BaseService<SpecialProjectInfoMap
list1 = specialProjectInfoMapper.getByUserPro(new Page(sp.getPageNum(),sp.getPageSize()),sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(), data.getProNo(), list1 = specialProjectInfoMapper.getByUserPro(new Page(sp.getPageNum(),sp.getPageSize()),sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(), data.getProNo(),
data.getProjectType(), sysXzqhService.getSubString(sp.getData().getAdcd()), "create_time"); data.getProjectType(), sysXzqhService.getSubString(sp.getData().getAdcd()), "create_time");
} else { } else {
list1 = specialProjectInfoMapper.getByUserPro(new Page(sp.getPageNum(),sp.getPageSize()),sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(), data.getProNo(), list1 = specialProjectInfoMapper.getByUserPro(new Page(sp.getPageNum(),sp.getPageSize()),
sysUser.getId(), sysUser.getUserType(),
data.getId(),
data.getProjectName(),
data.getProNo(),
data.getProjectType(), sysXzqhService.getSubString(sp.getData().getAdcd()), (String) params.get("orderBy")); data.getProjectType(), sysXzqhService.getSubString(sp.getData().getAdcd()), (String) params.get("orderBy"));
} }

38
jwtech-system/src/main/resources/mapper/system/SysDeptMapper.xml

@ -34,15 +34,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="beginDate" column="begin_date" /> <result property="beginDate" column="begin_date" />
<result property="endDate" column="end_date" /> <result property="endDate" column="end_date" />
</resultMap> </resultMap>
<sql id="selectDeptVo"> <sql id="selectDeptVo">
select d.id,d.ip_start,d.ip_end,d.is_download,d.is_comment, d.parent_id, d.ancestors, select d.id,d.ip_start,d.ip_end,d.is_download,d.is_comment, d.parent_id, d.ancestors,
d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.tag, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.tag,
d.del_flag, d.create_uid, d.create_time, d.name, d.pc_logo, d.pc_background, d.del_flag, d.create_uid, d.create_time, d.name, d.pc_logo, d.pc_background,
d.admin_name, d.admin_logo,d.data_type,d.begin_date,d.end_date,d.xzqh_id,d.xzqh_name d.admin_name, d.admin_logo,d.data_type,d.begin_date,d.end_date,d.xzqh_id,d.xzqh_name,d.unifiedSocialCreditCode
from sys_dept d from sys_dept d
</sql> </sql>
<select id="selectDeptList" parameterType="com.jianwei.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> <select id="selectDeptList" parameterType="com.jianwei.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where d.del_flag = '0' where d.del_flag = '0'
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope} ${params.dataScope}
order by d.parent_id, d.order_num order by d.parent_id, d.order_num
</select> </select>
<select id="selectDeptListByRoleId" parameterType="String" resultType="Integer"> <select id="selectDeptListByRoleId" parameterType="String" resultType="Integer">
select d.id, d.parent_id select d.id, d.parent_id
from sys_dept d from sys_dept d
@ -71,34 +71,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and d.id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.id = rd.dept_id and rd.role_id = #{roleId}) and d.id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.id = rd.dept_id and rd.role_id = #{roleId})
order by d.parent_id, d.order_num order by d.parent_id, d.order_num
</select> </select>
<select id="selectDeptById" parameterType="String" resultMap="SysDeptResult"> <select id="selectDeptById" parameterType="String" resultMap="SysDeptResult">
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where id = #{id} where id = #{id}
</select> </select>
<select id="checkDeptExistUser" parameterType="String" resultType="int"> <select id="checkDeptExistUser" parameterType="String" resultType="int">
select count(1) from sys_user where id = #{id} and del_flag = '0' select count(1) from sys_user where id = #{id} and del_flag = '0'
</select> </select>
<select id="hasChildByDeptId" parameterType="String" resultType="int"> <select id="hasChildByDeptId" parameterType="String" resultType="int">
select count(1) from sys_dept select count(1) from sys_dept
where del_flag = '0' and parent_id = #{id} limit 1 where del_flag = '0' and parent_id = #{id} limit 1
</select> </select>
<select id="selectChildrenDeptById" parameterType="String" resultMap="SysDeptResult"> <select id="selectChildrenDeptById" parameterType="String" resultMap="SysDeptResult">
select * from sys_dept where find_in_set(#{id}, ancestors) select * from sys_dept where find_in_set(#{id}, ancestors)
</select> </select>
<select id="selectNormalChildrenDeptById" parameterType="String" resultType="int"> <select id="selectNormalChildrenDeptById" parameterType="String" resultType="int">
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{id}, ancestors) select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{id}, ancestors)
</select> </select>
<select id="checkDeptNameUnique" resultMap="SysDeptResult"> <select id="checkDeptNameUnique" resultMap="SysDeptResult">
<include refid="selectDeptVo"/> <include refid="selectDeptVo"/>
where dept_name=#{deptName} and parent_id = #{parentId} limit 1 where dept_name=#{deptName} and parent_id = #{parentId} limit 1
</select> </select>
<insert id="insertDept" parameterType="com.jianwei.common.core.domain.entity.SysDept"> <insert id="insertDept" parameterType="com.jianwei.common.core.domain.entity.SysDept">
insert into sys_dept( insert into sys_dept(
<if test="id != null and id != ''">id,</if> <if test="id != null and id != ''">id,</if>
@ -125,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="adminName != null and adminName != ''">admin_name,</if> <if test="adminName != null and adminName != ''">admin_name,</if>
<if test="adminLogo != null and adminLogo != ''">admin_logo,</if> <if test="adminLogo != null and adminLogo != ''">admin_logo,</if>
<if test="xzqhId != null and adminLogo != ''">xzqh_id,</if> <if test="xzqhId != null and adminLogo != ''">xzqh_id,</if>
<if test="unifiedSocialCreditCode!=null and unifiedSocialCreditCode!=''">unified_social_credit_code</if>
create_time create_time
)values( )values(
<if test="id != null and id != ''">#{id},</if> <if test="id != null and id != ''">#{id},</if>
@ -151,10 +152,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="adminName != null and adminName != ''">#{adminName},</if> <if test="adminName != null and adminName != ''">#{adminName},</if>
<if test="adminLogo != null and adminLogo != ''">#{adminLogo},</if> <if test="adminLogo != null and adminLogo != ''">#{adminLogo},</if>
<if test="xzqhId != null and adminLogo != ''">#{xzqhId},</if> <if test="xzqhId != null and adminLogo != ''">#{xzqhId},</if>
<if test="unifiedSocialCreditCode!=null and unifiedSocialCreditCode!=''">#{unifiedSocialCreditCode}</if>
sysdate() sysdate()
) )
</insert> </insert>
<update id="updateDept" parameterType="com.jianwei.common.core.domain.entity.SysDept"> <update id="updateDept" parameterType="com.jianwei.common.core.domain.entity.SysDept">
update sys_dept update sys_dept
<set> <set>
@ -183,7 +185,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
<update id="updateDeptChildren" parameterType="java.util.List"> <update id="updateDeptChildren" parameterType="java.util.List">
update sys_dept set ancestors = update sys_dept set ancestors =
<foreach collection="depts" item="item" index="index" <foreach collection="depts" item="item" index="index"
@ -196,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.id} #{item.id}
</foreach> </foreach>
</update> </update>
<update id="updateDeptStatus" parameterType="com.jianwei.common.core.domain.entity.SysDept"> <update id="updateDeptStatus" parameterType="com.jianwei.common.core.domain.entity.SysDept">
update sys_dept a update sys_dept a
<set> <set>
@ -206,9 +208,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</set> </set>
where FIND_IN_SET(a.id,#{ancestors}) where FIND_IN_SET(a.id,#{ancestors})
</update> </update>
<delete id="deleteDeptById" parameterType="String"> <delete id="deleteDeptById" parameterType="String">
delete from sys_dept where id = #{id} delete from sys_dept where id = #{id}
</delete> </delete>
</mapper> </mapper>

Loading…
Cancel
Save