Browse Source

农民信息权限查看更新

dev_kxc
zth 10 months ago
parent
commit
808e2a6bec
  1. 2
      jwtech-admin/src/main/java/com/kms/web/controller/system/SysLoginController.java
  2. 2
      jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameProController.java
  3. 11
      jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSectionExcel.java
  4. 22
      jwtech-system/src/main/java/com/kms/build/mapper/BsSgcJsjdBuiRealNameProMapper.java
  5. 22
      jwtech-system/src/main/java/com/kms/build/mapper/BsSgcjsjdBuiProInfoMapper.java
  6. 50
      jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiRealNameProService.java
  7. 122
      jwtech-system/src/main/resources/mapper/build/BsSgcJsjdBuiRealNamePro.xml
  8. 117
      jwtech-system/src/main/resources/mapper/build/BsSgcjsjdBuiProInfoMapper.xml

2
jwtech-admin/src/main/java/com/kms/web/controller/system/SysLoginController.java

@ -245,7 +245,7 @@ public class SysLoginController extends BaseController {
// }
// }
// }
RedirectView redirectView = new RedirectView(redirect+"?token="+tokenValue+"&page="+page);
RedirectView redirectView = new RedirectView("http://210.76.82.26/jgThinking/#/singleLogin"+"?token="+tokenValue+"&page="+page);
ModelAndView modelAndView = new ModelAndView(redirectView);
return modelAndView;
}

2
jwtech-system/src/main/java/com/kms/build/controller/BsSgcJsjdBuiRealNameProController.java

@ -52,7 +52,7 @@ public class BsSgcJsjdBuiRealNameProController extends BaseController
@ApiOperation("农民工实行信息关联项目列表")
public IPage list(@RequestBody SearchParam<BsSgcJsjdBuiRealNamePro> sp)
{
return bsSgcJsjdBuiRealNameProService.selectPage(sp);
return bsSgcJsjdBuiRealNameProService.selectPage1(sp);
}
/**

11
jwtech-system/src/main/java/com/kms/build/domain/BsSgcJsjdBuiSectionExcel.java

@ -16,23 +16,24 @@ public class BsSgcJsjdBuiSectionExcel {
private String sectionName;
/** 项目法人 */ @Excel(name = "项目法人单位")
/** 项目法人 */
@Excel(name = "项目法人单位")
@ApiModelProperty("项目法人")
private String projectlegalPerson;
private String projectLegalPerson;
/** 单位法定代表人电话 */
@Excel(name = "单位法定代表人")
@ApiModelProperty("单位法定代表人")
private String projectunitLegal ;
private String projectUnitLegal ;
@Excel(name = "单位法定代表人电话")
private String projectUnitLegalPhone;
@Excel(name = "项目负责人")
private String projectsuperintendent;
private String projectSuperintendent;
@Excel(name = "项目负责人电话")
private String projectsuperinteidentPhone;
private String projectSuperintendentPhone;
/** 项目建设地址 */
@Excel(name = "建设地址")

22
jwtech-system/src/main/java/com/kms/build/mapper/BsSgcJsjdBuiRealNameProMapper.java

@ -1,9 +1,13 @@
package com.kms.build.mapper;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
import java.util.List;
/**
* 农民工实行信息关联项目Mapper接口
*
@ -13,4 +17,22 @@ import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
@Repository
public interface BsSgcJsjdBuiRealNameProMapper extends BaseMapper<BsSgcJsjdBuiRealNamePro> {
List<BsSgcJsjdBuiRealNamePro> getByUser(@Param("userId") String userId,
@Param("userType") String userType,
@Param("id") String id,
@Param("projectName") String projectName,
@Param("adcd") String adcd,
@Param("pageNum") int pageNum,
@Param("pageSize") int pageSize,
@Param("proNo") String proNo,
@Param("proCode")String proCode);
List<BsSgcJsjdBuiRealNamePro> getCount(@Param("userId") String userId,
@Param("userType") String userType,
@Param("id") String id,
@Param("projectName") String projectName,
@Param("adcd") String adcd,
@Param("proNo") String proNo,
@Param("proCode")String proCode);
}

22
jwtech-system/src/main/java/com/kms/build/mapper/BsSgcjsjdBuiProInfoMapper.java

@ -2,6 +2,7 @@ package com.kms.build.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.domain.Num;
import com.kms.build.domain.dto.AssertStatisticsDto;
@ -96,4 +97,25 @@ public interface BsSgcjsjdBuiProInfoMapper extends BaseMapper<BsSgcjsjdBuiProInf
FlowDto statistics(
@Param("proNo") String proNo,
@Param("proCode") String proCode);
List<BsSgcJsjdBuiRealNamePro> getByUser(@Param("userId") String userId,
@Param("userType") String userType,
@Param("id") String id,
@Param("projectName") String projectName,
@Param("adcd") String adcd,
@Param("pageNum") int pageNum,
@Param("pageSize") int pageSize,
@Param("proNo") String proNo,
@Param("proCode")String proCode);
Integer getRealNameCount(@Param("userId") String userId,
@Param("userType") String userType,
@Param("id") String id,
@Param("projectName") String projectName,
@Param("adcd") String adcd,
@Param("proNo") String proNo,
@Param("proCode")String proCode);
}

50
jwtech-system/src/main/java/com/kms/build/service/BsSgcJsjdBuiRealNameProService.java

@ -1,10 +1,26 @@
package com.kms.build.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jianwei.common.core.domain.SearchParam;
import com.jianwei.common.core.domain.entity.SysDept;
import com.jianwei.common.core.domain.entity.SysUser;
import com.jianwei.common.mybaitsplus.BeanToWrapper;
import com.kms.build.domain.BsSgcjsjdBuiProInfo;
import com.kms.build.mapper.BsSgcjsjdBuiProInfoMapper;
import com.kms.common.utils.UserUtils;
import com.kms.system.domain.SysXzqh;
import com.kms.system.service.SysDeptService;
import com.kms.system.service.SysXzqhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jianwei.common.core.service.BaseService;
import com.kms.build.mapper.BsSgcJsjdBuiRealNameProMapper;
import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
import javax.annotation.Resource;
import java.util.List;
/**
* 农民工实行信息关联项目Service接口
*
@ -13,5 +29,39 @@ import com.kms.build.domain.BsSgcJsjdBuiRealNamePro;
*/
@Service
public class BsSgcJsjdBuiRealNameProService extends BaseService<BsSgcJsjdBuiRealNameProMapper, BsSgcJsjdBuiRealNamePro>{
@Autowired
SysDeptService sysDeptService;
@Autowired
private BsSgcJsjdBuiRealNameProMapper bsSgcJsjdBuiRealNameProMapper;
@Autowired
private BsSgcjsjdBuiProInfoMapper bsSgcjsjdBuiProInfoMapper;
@Autowired
SysXzqhService sysXzqhService;
public IPage<BsSgcJsjdBuiRealNamePro> selectPage1(SearchParam<BsSgcJsjdBuiRealNamePro> sp){
SysUser sysUser = UserUtils.getUser();
BsSgcJsjdBuiRealNamePro data = sp.getData();
if (sysUser.getUserType().equals("00") && data.getAdcd() == null) {
String deptId = sysUser.getDeptId();
SysDept sysDept = sysDeptService.get(deptId);
String xzqhId = sysDept.getXzqhId();
data.setAdcd(xzqhId);
}
String subString=null;
subString = sysXzqhService.getSubString(data.getAdcd());
List<BsSgcJsjdBuiRealNamePro> list = bsSgcjsjdBuiProInfoMapper.getByUser(sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(),
subString,
sp.getPageNum(), sp.getPageSize(), sp.getData().getProNo(), sp.getData().getProCode());
Integer count = bsSgcjsjdBuiProInfoMapper.getRealNameCount(sysUser.getId(), sysUser.getUserType(), data.getId(), data.getProjectName(),
subString,
sp.getData().getProNo(), sp.getData().getProCode());
Page<BsSgcJsjdBuiRealNamePro>page=new Page<>(sp.getPageNum(),sp.getPageSize());
page.setRecords(list);
page.setTotal(count);
return page;
}
}

122
jwtech-system/src/main/resources/mapper/build/BsSgcJsjdBuiRealNamePro.xml

@ -0,0 +1,122 @@
<?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.kms.build.mapper.BsSgcJsjdBuiRealNameProMapper">
<resultMap id="BsSgcJsjdBuiRealName" type="BsSgcJsjdBuiRealNamePro">
<id property="id" column="id"/>
<result property="projectName" column="project_name"/>
<result property="proCode" column="pro_code"/>
<result property="adcd" column="adcd"/>
<result property="proNo" column="pro_no"/>
</resultMap>
<select id="getByUser" resultMap="BsSgcJsjdBuiRealName">
select id,project_name,pro_code,adcd,pro_no from bs_sgc_jsjd_bui_real_name_pro np
<if test="userType==01">
WHERE
np.PRO_NO IN (
SELECT
PRO_NO
FROM
sys_user_pro
<where>
<if test="userId!=null and userId!=''">
AND user_id=#{userId})
</if>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
order by np.create_time desc LIMIT #{pageNum},#{pageSize};
</where>
</if>
<if test="userType==00">
<where>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
order by np.create_time desc LIMIT #{pageNum},#{pageSize};
</if>
</select>
<select id="getCount" resultMap="BsSgcJsjdBuiRealName">
select id,project_name,pro_code,adcd,pro_no from bs_sgc_jsjd_bui_real_name_pro np
<if test="userType==01">
WHERE
np.pro_no IN (
SELECT
PRO_NO
FROM
sys_user_pro
<where>
<if test="userId!=null and userId!=''">
AND user_id=#{userId})
</if>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
</if>
<if test="userType==00">
<where>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
</if>
</select>
</mapper>

117
jwtech-system/src/main/resources/mapper/build/BsSgcjsjdBuiProInfoMapper.xml

@ -620,4 +620,121 @@
</select>
<resultMap id="BsSgcJsjdBuiRealName" type="BsSgcJsjdBuiRealNamePro">
<id property="id" column="id"/>
<result property="projectName" column="project_name"/>
<result property="proCode" column="pro_code"/>
<result property="adcd" column="adcd"/>
<result property="proNo" column="pro_no"/>
</resultMap>
<select id="getByUser" resultMap="BsSgcJsjdBuiRealName">
select id,project_name,pro_code,adcd,pro_no,is_approval from bs_sgc_jsjd_bui_real_name_pro np
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
<if test="userType==01">
WHERE
np.PRO_NO IN (
SELECT
PRO_NO
FROM
sys_user_pro
<where>
<if test="userId!=null and userId!=''">
AND user_id=#{userId})
</if>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
order by np.create_time desc LIMIT #{pageNum}-1,#{pageSize};
</if>
<if test="userType==00">
<where>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
order by np.create_time desc LIMIT #{pageNum},#{pageSize};
</if>
</select>
<select id="getRealNameCount" resultType="java.lang.Integer">
select count(*) from bs_sgc_jsjd_bui_real_name_pro np
<if test="userType==01">
WHERE
np.pro_no IN (
SELECT
PRO_NO
FROM
sys_user_pro
<where>
<if test="userId!=null and userId!=''">
AND user_id=#{userId})
</if>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
</if>
<if test="userType==00">
<where>
<if test="projectName!=null and projectName!=''">
and np.project_name like concat('%',#{projectName},'%')
</if>
<if test="proCode != null and proCode != ''">
and np.PRO_CODE=#{proCode}
</if>
<if test="proNo != null and proNo != ''">
and np.PRO_NO=#{proNo}
</if>
<if test="adcd!=null and adcd !=''">
and np.adcd like concat(#{adcd},'%')
</if>
<if test="id!=null and id!=''">
and id=#{id}
</if>
</where>
</if>
</select>
</mapper>

Loading…
Cancel
Save