tangzy
2021-08-25 c546fc702821c050cd4e427b279570b9a6cf2d5f
1.单位
8 files modified
63 ■■■■■ changed files
src/main/java/org/springblade/common/constant/FtpConstant.java 16 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 27 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/IInformationService.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/vo/InformationVO.java 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/FtpConstant.java
@@ -8,25 +8,25 @@
    /**
     * sql connect
     */
//    String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhba";
    String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhba";
    /**
     * sql connect
     */
    String sql_connect_dev = "jdbc:mysql://localhost:3306/zhba";
    //String sql_connect_dev = "jdbc:mysql://localhost:3306/zhba";
    //ftp服务器IP地址
//    String ftpHost_dev = "192.168.0.105";
    String ftpHost_dev = "192.168.0.105";
    //ftp服务器IP地址
    String ftpHost_dev = "47.49.21.194";
    //String ftpHost_dev = "47.49.21.194";
    //ftp服务器端口
    int ftpPort = 21;
    //ftp服务器用户名
    String ftpUserName = "ylcs";
//    String ftpUserName = "yly";
    //String ftpUserName = "ylcs";
    String ftpUserName = "yly";
    //ftp服务器密码
@@ -39,6 +39,6 @@
    /**
     * 本地路径
     */
    String localPath = "/home/song/anbao/";
//    String localPath = "D:\\anbao\\";
    //String localPath = "/home/song/anbao/";
    String localPath = "D:\\anbao\\";
}
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -31,6 +31,7 @@
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
import org.springblade.modules.dispatcher.vo.DispatcherVO;
import org.springblade.modules.information.vo.InformationVO;
import org.springblade.modules.jurisdiction.service.JurisdictionService;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
@@ -97,8 +98,8 @@
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入information")
    public R<IPage<Information>> page(Information information, Query query) {
        IPage<Information> pages = informationService.selectInformationPage(Condition.getPage(query), information);
    public R<IPage<InformationVO>> page(InformationVO information, Query query) {
        IPage<InformationVO> pages = informationService.selectInformationPage(Condition.getPage(query), information);
        return R.data(pages);
    }
src/main/java/org/springblade/modules/information/mapper/InformationMapper.java
@@ -40,7 +40,7 @@
     * @param information
     * @return
     */
    List<Information> selectInformationPage(IPage page,Information information);
    List<InformationVO> selectInformationPage(IPage page,InformationVO information);
    void deleteIn(String creditcode);
    void deleteSh(String creditcode);
    void deleteMe(String creditcode);
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -34,18 +34,31 @@
    <select id="selectInformationPage" resultMap="informationResultMap">
        select * from sys_information where 1=1
        SELECT
        i.*,
        IFNULL(A.znum ,0) as znum,
        IFNULL(B.cnum ,0) as cnum,
        IFNULL(C.pnum ,0) as pnum
        FROM
        sys_information i
        LEFT JOIN ( SELECT COUNT( * ) AS znum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND is_deleted = 0 GROUP BY dept_id ) A ON A.dept_id = i.departmentid
        LEFT JOIN ( SELECT COUNT( * ) AS cnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND is_deleted = 0 AND hold=1 GROUP BY dept_id ) B ON B.dept_id = i.departmentid
        LEFT JOIN ( SELECT COUNT( * ) AS pnum, dept_id FROM blade_user WHERE role_id = '1412226235153731586' AND is_deleted = 0 AND dispatch=0 GROUP BY dept_id ) C ON C.dept_id = i.departmentid
        where  1=1
        <if test="information.enterprisename!=null and information.enterprisename!=''">
            and enterpriseName like concat(concat('%', #{information.enterprisename}),'%')
            and i.enterpriseName like concat(concat('%', #{information.enterprisename}),'%')
        </if>
        <if test="information.representative!=null and information.representative!=''">
            and representative like concat(concat('%', #{information.representative}),'%')
            and i.representative like concat(concat('%', #{information.representative}),'%')
        </if>
        <if test="information.stats!=null and information.stats!=''">
            and stats=#{stats}
            and i.stats=#{information.stats}
        </if>
        <if test="information.jurisdiction!=null and information.jurisdiction!=''">
            and jurisdiction=#{jurisdiction}
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1123598813738675201'">
            and i.jurisdiction=#{information.jurisdiction}
        </if>
        <if test="information.departmentid!=null and information.departmentid!=''">
            and i.departmentid=#{information.departmentid}
        </if>
    </select>
@@ -1253,7 +1266,7 @@
            AND A.jurisdiction=#{jurisdiction}
        </if>
        <if test="deptid!=null and deptid!=''">
            and A.dept_name like concat('%', #{deptid},'%')
            and A.enterpriseName like concat('%', #{deptid},'%')
        </if>
    </select>
src/main/java/org/springblade/modules/information/service/IInformationService.java
@@ -41,7 +41,7 @@
     * @param information
     * @return
     */
    IPage<Information> selectInformationPage(IPage<Information> page, Information information);
    IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information);
    void deleteIn(String ids);
    void deleteSh(String ids);
    void deleteMe(String ids);
src/main/java/org/springblade/modules/information/service/impl/InformationServiceImpl.java
@@ -38,7 +38,7 @@
public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements IInformationService {
    @Override
    public IPage<Information> selectInformationPage(IPage<Information> page, Information information) {
    public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information) {
        return page.setRecords(baseMapper.selectInformationPage(page, information));
    }
src/main/java/org/springblade/modules/information/vo/InformationVO.java
@@ -32,5 +32,8 @@
@ApiModel(value = "InformationVO对象", description = "InformationVO对象")
public class InformationVO extends Information {
    private static final long serialVersionUID = 1L;
    private String znum;
    private String cnum;
    private String pnum;
    private String deptName;
}
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -228,8 +228,8 @@
        <if test="user.securitynumber!=null and user.securitynumber != ''">
            and bu.securitynumber = #{user.securitynumber}
        </if>
        <if test="user.deptName!=null and user.deptName!=''">
            and  bd.dept_name like concat(concat('%', #{user.deptName}),'%')
        <if test="user.deptId!=null and user.deptId!=''">
            and  bu.dept_id =#{user.deptId}
        </if>
        <if test="user.useName==null or user.useName==''">
            order by bu.id