智慧保安后台管理-外网-验收版本
tangzy
2021-09-15 aef469e9a54038868e51b610aa6465470b09753c
1.社保
4 files modified
54 ■■■■ changed files
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 12 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/licetuser/controller/LicetuserController.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/social/entity/Social.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -79,7 +79,7 @@
        <if test="information.stats!=null and information.stats!=''">
            and i.stats=#{information.stats}
        </if>
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1123598813738675201'">
        <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1372091709474910209'">
            and i.jurisdiction=#{information.jurisdiction}
        </if>
        <if test="information.departmentid!=null and information.departmentid!=''">
@@ -154,7 +154,7 @@
        ) A ON H.departmentid = A.dept_id
        LEFT JOIN ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE (u.examination_type = 1 or u.examination_type is null ) and role_id = '1412226235153731586' AND `status` = 1 AND is_deleted = 0 GROUP BY u.dept_id
        ) B ON H.departmentid = B.dept_id where 1=1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and H.jurisdiction = #{jurisdiction}
        </if>
        <if test="deptid!=null and deptid!=''">
@@ -212,7 +212,7 @@
        <if test="deptid!=null and deptid!=''">
            and H.departmentid = #{deptid}
        </if>
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and H.jurisdiction = #{jurisdiction}
        </if>
    </select>
@@ -260,7 +260,7 @@
        GROUP BY
        dept_id
        ) B ON H.departmentid  = B.dept_id where 1=1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and H.jurisdiction = #{jurisdiction}
        </if>
        <if test="deptid!=null and deptid!=''">
@@ -282,7 +282,7 @@
        <if test="deptid!=null and deptid!=''">
            and H.departmentid = #{deptid}
        </if>
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and H.jurisdiction = #{jurisdiction}
        </if>
    </select>
@@ -321,7 +321,7 @@
        FROM
        `sys_dispatcher_unit`
        WHERE YEAR (end_time) >='2021'
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1372091709474910209'">
            and jurisdiction =#{jurisdiction}
        </if>
        <if test="deptid!=null and deptid!=''">
src/main/java/org/springblade/modules/licetuser/controller/LicetuserController.java
@@ -23,10 +23,12 @@
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.common.constant.FtpConstant;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.FTP.FtpUtil;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.licetuser.entity.Licetuser;
@@ -34,6 +36,7 @@
import org.springblade.modules.licetuser.service.ILicetuserService;
import org.springblade.core.boot.ctrl.BladeController;
import java.text.SimpleDateFormat;
import java.util.Map;
/**
@@ -69,12 +72,43 @@
        Map map = licetuserService.liceIn(licetuser.getUserid(),licetuser.getPtype());
        if (map==null){
            licetuserService.save(licetuser);
            String url = "";
            String[] split = licetuser.getLinks().split(",");
            for (int i = 0; i < split.length; i++) {
                String s = split[i].substring(26, split[i].length());
                url += FtpConstant.ip + s + ",";
            }
            String substring = url.substring(0, url.length() - 1);
            licetuser.setLinks(substring);
            //数据同步
            String s1 =
                "insert into sys_talk(id,userid,ptype,templateid,links) " +
                    "values(" + "'" + licetuser.getId() + "'" + "," +
                    "'" + licetuser.getUserid() + "'" + "," +
                    "'" + licetuser.getPtype() + "'" + "," +
                    "'" + licetuser.getTemplateid() + "'" + "," +
                    "'" + licetuser.getLinks() + "'" + ")";
            FtpUtil.sqlFileUpload(s1);
        }
        else {
            String id = map.get("id").toString();
            Integer a= Integer.parseInt(id);
            licetuser.setId(a);
            licetuserService.updateById(licetuser);
            String url = "";
            String[] split = licetuser.getLinks().split(",");
            for (int i = 0; i < split.length; i++) {
                String s = split[i].substring(26, split[i].length());
                url += FtpConstant.ip + s + ",";
            }
            String substring = url.substring(0, url.length() - 1);
            licetuser.setLinks(substring);
            String s1 = "update sys_talk set userid = " + "'" + licetuser.getUserid() + "'" +
                ",ptype = " + "'" + licetuser.getPtype() + "'" +
                ",templateid = " + "'" + licetuser.getTemplateid() + "'" +
                ",links = " + "'" + licetuser.getLinks() + "'" +
                " " + "where id = " + "'" + licetuser.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
        }
        return R.data("成功");
    }
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -607,6 +607,7 @@
        String fileExtension = org.springblade.core.tool.utils.FileUtil.getFileExtension(fileName);
        Attach attach = new Attach();
        attach.setDomain(bladeFile.getDomain());
        attach.setTenantId("000000");
        attach.setLink(bladeFile.getLink());
        attach.setName(bladeFile.getName());
        attach.setOriginalName(bladeFile.getOriginalName());
@@ -620,12 +621,12 @@
        }
        attachService.save(attach);
        String[] split = bladeFile.getName().split("/");
        String ip = FtpConstant.ip+"/zhba/picture/";
        String ip = FtpConstant.ip+"/zhba/upload/picture/";
        String imgurl = ip + split[2];
        FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in);
        //数据同步
        String s1 =
            "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,create_dept," +
            "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," +
                "create_time,update_user,update_time,status,is_deleted,type,cardid";
        if (noticeId != null) {
            s1 += ",notice_id";
@@ -640,7 +641,7 @@
                "'" + attach.getExtension() + "'" + "," +
                "'" + attach.getAttachSize() + "'" + "," +
                "'" + attach.getCreateUser() + "'" + "," +
                "'" + attach.getCreateDept() + "'" + "," +
                "'" + attach.getDeptid() + "'" + "," +
                "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
                "'" + attach.getUpdateUser() + "'" + "," +
                "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
src/main/java/org/springblade/modules/social/entity/Social.java
@@ -105,6 +105,7 @@
    */
        @ApiModelProperty(value = "单位id")
        private String deptid;
        private String jurisdiction;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;