Commit 45a3fd05 by wang_jiaxing

人员一体化采集中加入是否已经录入校验,现场和人员查询的时间结束条件加一天,电子笔录相关接口

parent 3b4c357c
package org.springblade.founder.dzbl.controller;
import org.springblade.founder.dzbl.entity.TbStAppDzbl;
import org.springblade.founder.dzbl.service.TbStAppDzblService;
import org.springblade.founder.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping("/dzbl")
public class TbStAppDzblController {
@Autowired
private TbStAppDzblService tbStAppDzblService;
@PostMapping("/saveNewDzbl")
public R saveNewDzbl(TbStAppDzbl dzbl) {
try {
String xxzjbh = tbStAppDzblService.saveNewDzbl(dzbl);
return R.ok().data("xxzjbh", xxzjbh);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/updateDzbl")
public R updateDzbl(TbStAppDzbl dzbl) {
try {
String xxzjbh = tbStAppDzblService.updateDzbl(dzbl);
return R.ok().data("xxzjbh", xxzjbh);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/getDzblList")
public R getDzblList(TbStAppDzbl dzbl) {
try {
Map<String, Object> restluMap = tbStAppDzblService.getDzblList(dzbl);
return R.ok().data(restluMap);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/getDzblByXxzjbh")
public R getDzblByXxzjbh(String xxzjbh) {
try {
TbStAppDzbl dzbl = tbStAppDzblService.getDzblByXxzjbh(xxzjbh);
return R.ok().data("dzbl", dzbl);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/deleteDzbl")
public R deleteDzbl(String xxzjbh) {
try {
tbStAppDzblService.deleteDzbl(xxzjbh);
return R.ok().data("xxzjbh", xxzjbh);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/deleteDzblBsh")
public R deleteDzblBsh(String xxzjbh) {
try {
tbStAppDzblService.deleteDzblBsh(xxzjbh);
return R.ok().data("xxzjbh", xxzjbh);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
}
package org.springblade.founder.dzbl.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.founder.entity.BaseModel;
import org.springblade.founder.ryythcj.entity.TbStAppRyxx;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_st_app_dzbl")
public class TbStAppDzbl extends BaseModel {
//现场编号
@TableId(type = IdType.INPUT)
private String xxzjbh;
//关联人员编号
private String glxxRybh;
//案件编号
private String asjbh;
//是否电信诈骗 0否 1是
private String sfdxzpPdbz;
//主办侦查员姓名
private String zbzcyXm;
//主办侦查员身份证号
private String zbzcySfzh;
//主办侦查员联系电话
private String zbzcyLxdh;
//主办侦查员单位代码
private String zbzcyDwdm;
//主办侦查员单位名称
private String zbzcyDwmc;
//协办侦查员姓名
private String xbzcyXm;
//协办侦查员身份证号
private String xbzcySfzh;
//协办侦查员联系电话
private String xbzcyLxdh;
//协办侦查员单位代码
private String xbzcyDwdm;
//协办侦查员单位名称
private String xbzcyDwmc;
//电子笔录简要情况
private String dzblJyqk;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date xxrbksj;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date xxrsksj;
private String xxrskPdbz;
private String xxrbkPdbz;
@TableField(exist = false)
private TbStAppRyxx ryxx;
@TableField(exist = false)
private List<TbStAppDzblBsh> bshList;
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date djsjStart;
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date djsjEnd;
}
package org.springblade.founder.dzbl.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.founder.entity.BaseModel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_st_app_dzbl_bsh")
public class TbStAppDzblBsh extends BaseModel {
//现场编号
@TableId(type = IdType.INPUT)
private String xxzjbh;
//关联电子笔录编号
private String glxxXxzjbh;
//标示号类型 CODE_DZBL_BSHLX
private String bshLx;
//标示号号码
private String bshHm;
//标示号描述
private String bshMs;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date xxrbksj;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date xxrsksj;
private String xxrskPdbz;
private String xxrbkPdbz;
//标示号类型 CODE_DZBL_BSHLX
@TableField(exist = false)
private String bshStr;
}
package org.springblade.founder.dzbl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.dzbl.entity.TbStAppDzblBsh;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface TbStAppDzblBshMapper extends BaseMapper<TbStAppDzblBsh> {
List<TbStAppDzblBsh> selectListByGlxxXxzjbh(String glxxXxzjbh);
}
<?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="org.springblade.founder.dzbl.mapper.TbStAppDzblBshMapper">
<select id="selectListByGlxxXxzjbh" resultType="org.springblade.founder.dzbl.entity.TbStAppDzblBsh">
SELECT XXZJBH,
GLXX_XXZJBH,
BSH_LX,
(select name from SYS_DICTITEM where GROUPID = 'CODE_DZBL_BSHLX' and code = BSH_LX) as bshStr,
BSH_HM,
BSH_MS,
DJSJ,
XXDJDW_GAJGJGDM,
XXDJDW_GAJGMC,
XXDJRY_XM,
XXDJRY_GMSFHM,
XXDJRY_LXDH,
XXCZDW_GAJGJGDM,
XXCZDW_GAJGMC,
XXCZRY_XM,
XXCZRY_GMSFHM,
GXSJ,
XXLYMS,
XXRSKSJ,
XXRBKSJ,
XXRSK_PDBZ,
XXRBK_PDBZ,
XXSC_PDBZ
FROM TB_ST_APP_DZBL_BSH
where GLXX_XXZJBH = #{glxxXxzjbh,jdbcType=VARCHAR}
and xxsc_pdbz = '0'
</select>
</mapper>
package org.springblade.founder.dzbl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.dzbl.entity.TbStAppDzbl;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface TbStAppDzblMapper extends BaseMapper<TbStAppDzbl> {
/**
* selectListByParam 分页查询列表
* @return java.util.List<org.springblade.founder.dzbl.entity.TbStAppDzbl>
* @author lystar
* 2021/11/26 16:49
*/
List<TbStAppDzbl> selectListByParam(TbStAppDzbl dzbl);
/**
* selectCountByParam 查询条数
* @return java.lang.Integer
* @author lystar
* 2021/11/26 16:49
*/
Integer selectCountByParam(TbStAppDzbl dzbl);
/**
* selectByxxzjbh 查询详情
* @param xxzjbh: 信息主键编号
* @return org.springblade.founder.dzbl.entity.TbStAppDzbl
* @author lystar
* 2021/11/27 10:23
*/
TbStAppDzbl selectByxxzjbh(String xxzjbh);
}
<?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="org.springblade.founder.dzbl.mapper.TbStAppDzblMapper">
<resultMap id="baseResultMap" type="org.springblade.founder.dzbl.entity.TbStAppDzbl">
<id column="XXZJBH" property="xxzjbh" jdbcType="VARCHAR"/>
<result column="GLXX_RYBH" property="glxxRybh" jdbcType="VARCHAR"/>
<result column="ASJBH" property="asjbh" jdbcType="VARCHAR"/>
<result column="SFDXZP_PDBZ" property="sfdxzpPdbz" jdbcType="VARCHAR"/>
<result column="ZBZCY_XM" property="zbzcyXm" jdbcType="VARCHAR"/>
<result column="ZBZCY_SFZH" property="zbzcySfzh" jdbcType="VARCHAR"/>
<result column="ZBZCY_LXDH" property="zbzcyLxdh" jdbcType="VARCHAR"/>
<result column="ZBZCY_DWDM" property="zbzcyDwdm" jdbcType="VARCHAR"/>
<result column="ZBZCY_DWMC" property="zbzcyDwmc" jdbcType="VARCHAR"/>
<result column="XBZCY_XM" property="xbzcyXm" jdbcType="VARCHAR"/>
<result column="XBZCY_SFZH" property="xbzcySfzh" jdbcType="VARCHAR"/>
<result column="XBZCY_LXDH" property="xbzcyLxdh" jdbcType="VARCHAR"/>
<result column="XBZCY_DWDM" property="xbzcyDwdm" jdbcType="VARCHAR"/>
<result column="XBZCY_DWMC" property="xbzcyDwmc" jdbcType="VARCHAR"/>
<result column="DZBL_JYQK" property="dzblJyqk" jdbcType="VARCHAR"/>
<result column="DJSJ" property="djsj" jdbcType="TIMESTAMP"/>
<result column="XXDJDW_GAJGJGDM" property="xxdjdwGajgjgdm" jdbcType="VARCHAR"/>
<result column="XXDJDW_GAJGMC" property="xxdjdwGajgmc" jdbcType="VARCHAR"/>
<result column="XXDJRY_XM" property="xxdjryXm" jdbcType="VARCHAR"/>
<result column="XXDJRY_GMSFHM" property="xxdjryGmsfhm" jdbcType="VARCHAR"/>
<result column="XXDJRY_LXDH" property="xxdjryLxdh" jdbcType="VARCHAR"/>
<result column="XXCZDW_GAJGJGDM" property="xxczdwGajgjgdm" jdbcType="VARCHAR"/>
<result column="XXCZDW_GAJGMC" property="xxczdwGajgmc" jdbcType="VARCHAR"/>
<result column="XXCZRY_XM" property="xxczryXm" jdbcType="VARCHAR"/>
<result column="XXCZRY_GMSFHM" property="xxczryGmsfhm" jdbcType="VARCHAR"/>
<result column="GXSJ" property="gxsj" jdbcType="TIMESTAMP"/>
<result column="XXLYMS" property="xxlyms" jdbcType="VARCHAR"/>
<result column="XXRSKSJ" property="xxrsksj" jdbcType="TIMESTAMP"/>
<result column="XXRBKSJ" property="xxrbksj" jdbcType="TIMESTAMP"/>
<result column="XXRSK_PDBZ" property="xxrskPdbz" jdbcType="VARCHAR"/>
<result column="XXRBK_PDBZ" property="xxrbkPdbz" jdbcType="VARCHAR"/>
<result column="XXSC_PDBZ" property="xxscPdbz" jdbcType="VARCHAR"/>
<association property="ryxx" javaType="org.springblade.founder.ryythcj.entity.TbStAppRyxx"
select="org.springblade.founder.ryythcj.mapper.TbStAppRyxxMapper.selectByXxzjbh"
column="GLXX_RYBH" fetchType="lazy"/>
</resultMap>
<select id="selectListByParam" resultMap="baseResultMap">
SELECT
<include refid="dzblField"/>
FROM TB_ST_APP_DZBL dzbl,
TB_ST_APP_RYXX ryxx
where dzbl.XXSC_PDBZ = '0'
and ryxx.XXSC_PDBZ = '0'
and dzbl.GLXX_RYBH = ryxx.XXZJBH
<include refid="dzblParam"/>
</select>
<select id="selectCountByParam" resultType="java.lang.Integer">
select count(1)
FROM TB_ST_APP_DZBL dzbl,
TB_ST_APP_RYXX ryxx
where dzbl.XXSC_PDBZ = '0'
and ryxx.XXSC_PDBZ = '0'
and dzbl.GLXX_RYBH = ryxx.XXZJBH
<include refid="dzblParam"/>
</select>
<select id="selectByxxzjbh" resultMap="baseResultMap">
SELECT
<include refid="dzblField"/>
FROM TB_ST_APP_DZBL dzbl
where dzbl.XXSC_PDBZ = '0'
and XXZJBH = #{xxzjbh,jdbcType=VARCHAR}
</select>
<sql id="dzblField">
dzbl.XXZJBH,
dzbl.GLXX_RYBH,
dzbl.ASJBH,
dzbl.SFDXZP_PDBZ,
dzbl.ZBZCY_XM,
dzbl.ZBZCY_SFZH,
dzbl.ZBZCY_LXDH,
dzbl.ZBZCY_DWDM,
dzbl.ZBZCY_DWMC,
dzbl.XBZCY_XM,
dzbl.XBZCY_SFZH,
dzbl.XBZCY_LXDH,
dzbl.XBZCY_DWDM,
dzbl.XBZCY_DWMC,
dzbl.DZBL_JYQK,
dzbl.DJSJ,
dzbl.XXDJDW_GAJGJGDM,
dzbl.XXDJDW_GAJGMC,
dzbl.XXDJRY_XM,
dzbl.XXDJRY_GMSFHM,
dzbl.XXDJRY_LXDH,
dzbl.XXCZDW_GAJGJGDM,
dzbl.XXCZDW_GAJGMC,
dzbl.XXCZRY_XM,
dzbl.XXCZRY_GMSFHM,
dzbl.GXSJ,
dzbl.XXLYMS,
dzbl.XXRSKSJ,
dzbl.XXRBKSJ,
dzbl.XXRSK_PDBZ,
dzbl.XXRBK_PDBZ,
dzbl.XXSC_PDBZ
</sql>
<sql id="dzblParam">
<if test="xxzjbh != null and xxzjbh != ''">
AND dzbl.XXZJBH like '%' || #{xxzjbh , jdbcType=VARCHAR } || '%'
</if>
<if test="glxxRybh != null and glxxRybh != ''">
AND dzbl.GLXX_RYBH like #{glxxRybh , jdbcType=VARCHAR } || '%'
</if>
<if test="asjbh != null and asjbh != ''">
AND dzbl.ASJBH like #{asjbh , jdbcType=VARCHAR } || '%'
</if>
<if test="sfdxzpPdbz != null and sfdxzpPdbz != ''">
AND dzbl.SFDXZP_PDBZ = #{sfdxzpPdbz , jdbcType=VARCHAR }
</if>
<if test="zbzcyXm != null and zbzcyXm != ''">
AND dzbl.ZBZCY_XM = #{zbzcyXm , jdbcType=VARCHAR }
</if>
<if test="zbzcySfzh != null and zbzcySfzh != ''">
AND dzbl.ZBZCY_SFZH = #{zbzcySfzh , jdbcType=VARCHAR }
</if>
<if test="zbzcyLxdh != null and zbzcyLxdh != ''">
AND dzbl.ZBZCY_LXDH = #{zbzcyLxdh , jdbcType=VARCHAR }
</if>
<if test="zbzcyDwdm != null and zbzcyDwdm != ''">
AND dzbl.ZBZCY_DWDM = #{zbzcyDwdm , jdbcType=VARCHAR }
</if>
<if test="zbzcyDwmc != null and zbzcyDwmc != ''">
AND dzbl.ZBZCY_DWMC = #{zbzcyDwmc , jdbcType=VARCHAR }
</if>
<if test="xbzcyXm != null and xbzcyXm != ''">
AND dzbl.XBZCY_XM = #{xbzcyXm , jdbcType=VARCHAR }
</if>
<if test="xbzcySfzh != null and xbzcySfzh != ''">
AND dzbl.XBZCY_SFZH = #{xbzcySfzh , jdbcType=VARCHAR }
</if>
<if test="xbzcyLxdh != null and xbzcyLxdh != ''">
AND dzbl.XBZCY_LXDH = #{xbzcyLxdh , jdbcType=VARCHAR }
</if>
<if test="xbzcyDwdm != null and xbzcyDwdm != ''">
AND dzbl.XBZCY_DWDM = #{xbzcyDwdm , jdbcType=VARCHAR }
</if>
<if test="xbzcyDwmc != null and xbzcyDwmc != ''">
AND dzbl.XBZCY_DWMC = #{xbzcyDwmc , jdbcType=VARCHAR }
</if>
<if test="dzblJyqk != null and dzblJyqk != ''">
AND dzbl.DZBL_JYQK = #{dzblJyqk , jdbcType=VARCHAR }
</if>
<if test="djsj != null">
AND dzbl.DJSJ = #{djsj , jdbcType=TIMESTAMP }
</if>
<if test="xxdjdwGajgjgdm != null and xxdjdwGajgjgdm != ''">
AND dzbl.XXDJDW_GAJGJGDM like #{xxdjdwGajgjgdm , jdbcType=VARCHAR } || '%'
</if>
<if test="xxdjdwGajgmc != null and xxdjdwGajgmc != ''">
AND dzbl.XXDJDW_GAJGMC = #{xxdjdwGajgmc , jdbcType=VARCHAR }
</if>
<if test="xxdjryXm != null and xxdjryXm != ''">
AND dzbl.XXDJRY_XM = #{xxdjryXm , jdbcType=VARCHAR }
</if>
<if test="xxdjryGmsfhm != null and xxdjryGmsfhm != ''">
AND dzbl.XXDJRY_GMSFHM = #{xxdjryGmsfhm , jdbcType=VARCHAR }
</if>
<if test="xxdjryLxdh != null and xxdjryLxdh != ''">
AND dzbl.XXDJRY_LXDH = #{xxdjryLxdh , jdbcType=VARCHAR }
</if>
<if test="xxczdwGajgjgdm != null and xxczdwGajgjgdm != ''">
AND dzbl.XXCZDW_GAJGJGDM = #{xxczdwGajgjgdm , jdbcType=VARCHAR }
</if>
<if test="xxczdwGajgmc != null and xxczdwGajgmc != ''">
AND dzbl.XXCZDW_GAJGMC = #{xxczdwGajgmc , jdbcType=VARCHAR }
</if>
<if test="xxczryXm != null and xxczryXm != ''">
AND dzbl.XXCZRY_XM = #{xxczryXm , jdbcType=VARCHAR }
</if>
<if test="xxczryGmsfhm != null and xxczryGmsfhm != ''">
AND dzbl.XXCZRY_GMSFHM = #{xxczryGmsfhm , jdbcType=VARCHAR }
</if>
<if test="gxsj != null">
AND dzbl.GXSJ = #{gxsj , jdbcType=TIMESTAMP }
</if>
<if test="xxlyms != null and xxlyms != ''">
AND dzbl.XXLYMS = #{xxlyms , jdbcType=VARCHAR }
</if>
<if test="xxrsksj != null">
AND dzbl.XXRSKSJ = #{xxrsksj , jdbcType=TIMESTAMP }
</if>
<if test="xxrbksj != null">
AND dzbl.XXRBKSJ = #{xxrbksj , jdbcType=TIMESTAMP }
</if>
<if test="xxrskPdbz != null and xxrskPdbz != ''">
AND dzbl.XXRSK_PDBZ = #{xxrskPdbz , jdbcType=VARCHAR }
</if>
<if test="xxrbkPdbz != null and xxrbkPdbz != ''">
AND dzbl.XXRBK_PDBZ = #{xxrbkPdbz , jdbcType=VARCHAR }
</if>
<if test="ryxx != null and ryxx.xm != null and ryxx.xm != ''">
AND ryxx.xm like '%' || #{ryxx.xm , jdbcType=VARCHAR } || '%'
</if>
</sql>
</mapper>
package org.springblade.founder.dzbl.service;
import org.springblade.founder.dzbl.entity.TbStAppDzbl;
import java.util.Map;
public interface TbStAppDzblService {
/**
* saveNewDzbl 新增电子笔录
* @return java.lang.String
* @author lystar
* 2021/11/26 15:23
*/
String saveNewDzbl(TbStAppDzbl dzbl);
/**
* updateDzbl 修改电子笔录
* @return java.lang.String
* @author lystar
* 2021/11/26 16:19
*/
String updateDzbl(TbStAppDzbl dzbl);
/**
* getDzblList 查询电子笔录列表
* @return java.util.Map<java.lang.String,java.lang.Object>
* @author lystar
* 2021/11/26 16:38
*/
Map<String, Object> getDzblList(TbStAppDzbl dzbl);
/**
* getDzblByXxzjbh 查询电子笔录详情
* @param xxzjbh: 信息主键编号
* @return org.springblade.founder.dzbl.entity.TbStAppDzbl
* @author lystar
* 2021/11/27 10:22
*/
TbStAppDzbl getDzblByXxzjbh(String xxzjbh);
/**
* deleteDzbl 删除电子笔录
* @param xxzjbh: 信息主键编号
* @author lystar
* 2021/11/27 10:41
*/
void deleteDzbl(String xxzjbh);
/**
* deleteDzblBsh 删除标示号
* @param xxzjbh: 信息主键编号
* @author lystar
* 2021/11/27 10:45
*/
void deleteDzblBsh(String xxzjbh);
}
package org.springblade.founder.dzbl.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.commons.lang.StringUtils;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.asj.dao.HnJbAsjXsMapper;
import org.springblade.founder.asj.dao.QgJbAsjXsMapper;
import org.springblade.founder.dzbl.entity.TbStAppDzbl;
import org.springblade.founder.dzbl.entity.TbStAppDzblBsh;
import org.springblade.founder.dzbl.mapper.TbStAppDzblBshMapper;
import org.springblade.founder.dzbl.mapper.TbStAppDzblMapper;
import org.springblade.founder.dzbl.service.TbStAppDzblService;
import org.springblade.founder.ryythcj.entity.TbStAppRyxx;
import org.springblade.founder.ryythcj.service.TbStAppRyxxService;
import org.springblade.founder.utils.DateUtil;
import org.springblade.founder.utils.SysXxzjbhService;
import org.springblade.founder.utils.Utils;
import org.springblade.modules.system.entity.XzxtUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@DS("xzxt_hn")
public class TbStAppDzblServiceImpl implements TbStAppDzblService {
@Autowired
private TbStAppDzblMapper tbStAppDzblMapper;
@Autowired
private TbStAppDzblBshMapper tbStAppDzblBshMapper;
@Autowired
private TbStAppRyxxService tbStAppRyxxService;
@Autowired
private HnJbAsjXsMapper hnJbAsjXsMapper;
@Autowired
private QgJbAsjXsMapper qgJbAsjXsMapper;
@Autowired
private SysXxzjbhService xxzjbhService;
@Override
public String saveNewDzbl(TbStAppDzbl dzbl) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
//保存人员信息
TbStAppRyxx ryxx = dzbl.getRyxx();
String rybh;
//是否为新录入的人员
if (StringUtils.isEmpty(ryxx.getXxzjbh())) {
rybh = tbStAppRyxxService.saveNewRyxx(ryxx);
if (rybh.startsWith("false")) {
rybh = rybh.substring(5);
tbStAppRyxxService.updateYrxxByXxzjbh(ryxx);
}
} else {
rybh = ryxx.getXxzjbh();
tbStAppRyxxService.updateYrxxByXxzjbh(ryxx);
}
//保存笔录信息
dzbl.setGlxxRybh(rybh);
String xxzjbh = xxzjbhService.getXxzjbh(xzxtUser.getUnitcode());
dzbl.setXxzjbh(xxzjbh);
Utils.setUserDjxxAndCzxx(dzbl);
tbStAppDzblMapper.insert(dzbl);
//如果是电诈案件保存标示号
if ("1".equals(dzbl.getSfdxzpPdbz())) {
saveBsh(dzbl, xzxtUser);
}
return xxzjbh;
}
@Override
public String updateDzbl(TbStAppDzbl dzbl) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
//保存人员信息
TbStAppRyxx ryxx = dzbl.getRyxx();
ryxx.setXxzjbh(dzbl.getGlxxRybh());
tbStAppRyxxService.updateYrxxByXxzjbh(ryxx);
//保存笔录信息
Utils.setUserCzxx(dzbl);
tbStAppDzblMapper.updateById(dzbl);
//如果是电诈案件保存标示号
if ("1".equals(dzbl.getSfdxzpPdbz())) {
saveBsh(dzbl, xzxtUser);
}
return dzbl.getXxzjbh();
}
@Override
public Map<String, Object> getDzblList(TbStAppDzbl dzbl) {
Utils.setPageParams(dzbl);
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
String dwlike;
if (StringUtils.isEmpty(dzbl.getXxdjdwGajgjgdm())) {
dwlike = Utils.getDwlikeByUnitCode(xzxtUser.getUnitcode());
} else {
dwlike = Utils.getDwlikeByUnitCode(dzbl.getXxdjdwGajgjgdm());
}
dzbl.setXxdjdwGajgjgdm(dwlike);
TbStAppRyxx ryxx = dzbl.getRyxx();
if (ryxx != null) {
if (ryxx.getCsrqEnd() != null) {
ryxx.setCsrqEnd(DateUtil.getDiffDate(ryxx.getCsrqEnd(), 1));
}
}
if (dzbl.getDjsjEnd() != null) {
dzbl.setDjsjEnd(DateUtil.getDiffDate(dzbl.getDjsjEnd(), 1));
}
List<TbStAppDzbl> rows = tbStAppDzblMapper.selectListByParam(dzbl);
Integer total = tbStAppDzblMapper.selectCountByParam(dzbl);
HashMap<String, Object> resultMap = new HashMap<>();
resultMap.put("rows", rows);
resultMap.put("total", total);
return resultMap;
}
@Override
public TbStAppDzbl getDzblByXxzjbh(String xxzjbh) {
TbStAppDzbl dzbl = tbStAppDzblMapper.selectByxxzjbh(xxzjbh);
TbStAppRyxx ryxx = dzbl.getRyxx();
List<String> hnAsjbhList = hnJbAsjXsMapper.getAsjbhListZjhm(ryxx.getZjhm());
List<String> qgAsjbhList = qgJbAsjXsMapper.getAsjbhListZjhm(ryxx.getZjhm(), hnAsjbhList);
ryxx.setQsAsjbhList(hnAsjbhList);
ryxx.setQgAsjbhList(qgAsjbhList);
if ("1".equals(dzbl.getSfdxzpPdbz())) {
List<TbStAppDzblBsh> bshList = tbStAppDzblBshMapper.selectListByGlxxXxzjbh(xxzjbh);
dzbl.setBshList(bshList);
}
return dzbl;
}
@Override
public void deleteDzbl(String xxzjbh) {
TbStAppDzbl dzbl = new TbStAppDzbl();
dzbl.setXxzjbh(xxzjbh);
dzbl.setXxscPdbz("0");
Utils.setUserCzxx(dzbl);
tbStAppDzblMapper.updateById(dzbl);
}
@Override
public void deleteDzblBsh(String xxzjbh) {
TbStAppDzblBsh bsh = new TbStAppDzblBsh();
bsh.setXxzjbh(xxzjbh);
bsh.setXxscPdbz("0");
Utils.setUserCzxx(bsh);
tbStAppDzblBshMapper.updateById(bsh);
}
/**
* saveBsh 新增或修改标示号
*
* @author lystar
*/
private void saveBsh(TbStAppDzbl dzbl, XzxtUser xzxtUser) {
List<TbStAppDzblBsh> bshList = dzbl.getBshList();
if (bshList != null && !bshList.isEmpty()) {
for (TbStAppDzblBsh bsh : bshList) {
if (StringUtils.isEmpty(bsh.getGlxxXxzjbh())) {
bsh.setGlxxXxzjbh(dzbl.getXxzjbh());
bsh.setXxzjbh(xxzjbhService.getXxzjbh(xzxtUser.getUnitcode()));
Utils.setUserDjxxAndCzxx(bsh);
tbStAppDzblBshMapper.insert(bsh);
} else {
Utils.setUserCzxx(bsh);
tbStAppDzblBshMapper.updateById(bsh);
}
}
}
}
}
...@@ -22,6 +22,9 @@ public class TbStAppRyxxController { ...@@ -22,6 +22,9 @@ public class TbStAppRyxxController {
public R saveNewRyxx(TbStAppRyxx ryxx){ public R saveNewRyxx(TbStAppRyxx ryxx){
try { try {
String xxzjbh = tbStAppRyxxService.saveNewRyxx(ryxx); String xxzjbh = tbStAppRyxxService.saveNewRyxx(ryxx);
if (xxzjbh != null && xxzjbh.startsWith("false")){
return R.error("该人员已经存在");
}
return R.ok().data("xxzjbh", xxzjbh); return R.ok().data("xxzjbh", xxzjbh);
} catch (Exception e){ } catch (Exception e){
e.printStackTrace(); e.printStackTrace();
......
...@@ -91,22 +91,24 @@ ...@@ -91,22 +91,24 @@
</sql> </sql>
<sql id="ryxxQueryParam"> <sql id="ryxxQueryParam">
<if test="xxzjbh != null and xxzjbh != ''"> <if test="xxzjbh != null and xxzjbh != ''">
AND XXZJBH = #{xxzjbh , jdbcType=VARCHAR } AND XXZJBH like #{xxzjbh , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="asjbh != null and asjbh != ''"> <if test="asjbh != null and asjbh != ''">
AND ASJBH = #{asjbh , jdbcType=VARCHAR } AND ASJBH like #{asjbh , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="jzrybh != null and jzrybh != ''"> <if test="jzrybh != null and jzrybh != ''">
AND JZRYBH = #{jzrybh , jdbcType=VARCHAR } AND JZRYBH like #{jzrybh , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="xm != null and xm != ''"> <if test="xm != null and xm != ''">
AND XM like '%' || #{xm , jdbcType=VARCHAR } || '%' AND (XM like '%' || #{xm , jdbcType=VARCHAR } || '%'
or CYM like '%' || #{xm , jdbcType=VARCHAR } || '%'
or BM like '%' || #{xm , jdbcType=VARCHAR } || '%')
</if> </if>
<if test="sfzh != null and sfzh != ''"> <if test="sfzh != null and sfzh != ''">
AND SFZH = #{sfzh , jdbcType=VARCHAR } AND SFZH like '%' || #{sfzh , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="xmpy != null and xmpy != ''"> <if test="xmpy != null and xmpy != ''">
AND XMPY = #{xmpy , jdbcType=VARCHAR } AND XMPY like '%' || #{xmpy , jdbcType=VARCHAR } || '%'
</if> </if>
<if test="cym != null and cym != ''"> <if test="cym != null and cym != ''">
AND CYM = #{cym , jdbcType=VARCHAR } AND CYM = #{cym , jdbcType=VARCHAR }
......
...@@ -13,10 +13,7 @@ import org.springblade.founder.ryythcj.entity.TbStAppRyzpfj; ...@@ -13,10 +13,7 @@ import org.springblade.founder.ryythcj.entity.TbStAppRyzpfj;
import org.springblade.founder.ryythcj.mapper.TbStAppRyxxMapper; import org.springblade.founder.ryythcj.mapper.TbStAppRyxxMapper;
import org.springblade.founder.ryythcj.mapper.TbStAppRyzpfjMapper; import org.springblade.founder.ryythcj.mapper.TbStAppRyzpfjMapper;
import org.springblade.founder.ryythcj.service.TbStAppRyxxService; import org.springblade.founder.ryythcj.service.TbStAppRyxxService;
import org.springblade.founder.utils.QgryckUtils; import org.springblade.founder.utils.*;
import org.springblade.founder.utils.SpellHelper;
import org.springblade.founder.utils.SysXxzjbhService;
import org.springblade.founder.utils.Utils;
import org.springblade.modules.system.entity.XzxtUser; import org.springblade.modules.system.entity.XzxtUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundSetOperations; import org.springframework.data.redis.core.BoundSetOperations;
...@@ -50,6 +47,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService { ...@@ -50,6 +47,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService {
@Override @Override
public String saveNewRyxx(TbStAppRyxx ryxx) { public String saveNewRyxx(TbStAppRyxx ryxx) {
if(StringUtils.isNotEmpty(ryxx.getSfzh())){
QueryWrapper<TbStAppRyxx> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("xxsc_pdbz", "0");
queryWrapper.eq("sfzh", ryxx.getSfzh());
TbStAppRyxx one = tbStAppRyxxMapper.selectOne(queryWrapper);
if (one != null && StringUtils.isNotEmpty(one.getXxzjbh())){
return "false" + one.getXxzjbh();
}
}
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
String xxzjbh = xxzjbhService.getZcxwYwbh(xzxtUser.getUnitcode(), null, "TB_ST_APP_RYXX", "R"); String xxzjbh = xxzjbhService.getZcxwYwbh(xzxtUser.getUnitcode(), null, "TB_ST_APP_RYXX", "R");
ryxx.setXxzjbh(xxzjbh); ryxx.setXxzjbh(xxzjbh);
...@@ -90,9 +96,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService { ...@@ -90,9 +96,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService {
@Override @Override
public Map<String, Object> getYrxxList(TbStAppRyxx ryxx) { public Map<String, Object> getYrxxList(TbStAppRyxx ryxx) {
Utils.setPageParams(ryxx); Utils.setPageParams(ryxx);
if (StringUtils.isEmpty(ryxx.getXxdjdwGajgjgdm())) { // if (StringUtils.isEmpty(ryxx.getXxdjdwGajgjgdm())) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); // XzxtUser xzxtUser = SecureUtil.getUserXzxt();
ryxx.setXxdjdwGajgjgdm(Utils.getDwlikeByUnitCode(xzxtUser.getUnitcode())); // ryxx.setXxdjdwGajgjgdm(Utils.getDwlikeByUnitCode(xzxtUser.getUnitcode()));
// }
if (ryxx.getCsrqEnd() != null){
ryxx.setCsrqEnd(DateUtil.getDiffDate(ryxx.getCsrqEnd(), 1));
}
if (ryxx.getDjsjEnd() != null){
ryxx.setDjsjEnd(DateUtil.getDiffDate(ryxx.getDjsjEnd(), 1));
} }
List<TbStAppRyxx> rows = tbStAppRyxxMapper.selectListByParay(ryxx); List<TbStAppRyxx> rows = tbStAppRyxxMapper.selectListByParay(ryxx);
Integer total = tbStAppRyxxMapper.selectCountByParay(ryxx); Integer total = tbStAppRyxxMapper.selectCountByParay(ryxx);
...@@ -146,6 +158,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService { ...@@ -146,6 +158,15 @@ public class TbStAppRyxxServiceImpl implements TbStAppRyxxService {
@Override @Override
public TbStAppRyxx tqQgryxx(String zjhm) throws ParseException { public TbStAppRyxx tqQgryxx(String zjhm) throws ParseException {
if(StringUtils.isNotEmpty(zjhm)){
QueryWrapper<TbStAppRyxx> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("xxsc_pdbz", "0");
queryWrapper.eq("sfzh", zjhm);
TbStAppRyxx one = tbStAppRyxxMapper.selectOne(queryWrapper);
if (one != null && StringUtils.isNotEmpty(one.getXxzjbh())){
return one;
}
}
QgryckUtils qgryckUtils = new QgryckUtils(); QgryckUtils qgryckUtils = new QgryckUtils();
QgckryBean qgry = qgryckUtils.getQgckAllxxXml(zjhm); QgckryBean qgry = qgryckUtils.getQgckAllxxXml(zjhm);
return new TbStAppRyxx(qgry); return new TbStAppRyxx(qgry);
......
...@@ -53,6 +53,13 @@ public class DateUtil { ...@@ -53,6 +53,13 @@ public class DateUtil {
return sdf.format(c.getTime()); return sdf.format(c.getTime());
} }
public static Date getDiffDate(Date date, int num){
Calendar c = Calendar.getInstance();
c.setTime(date);
c.add(Calendar.DATE, num);
return c.getTime();
}
public static String getNextWorkDay(Date date) { public static String getNextWorkDay(Date date) {
TemporalAdjuster nextWorkingDay = TemporalAdjusters.ofDateAdjuster( TemporalAdjuster nextWorkingDay = TemporalAdjusters.ofDateAdjuster(
temporal -> { temporal -> {
......
...@@ -6,6 +6,7 @@ import org.apache.commons.io.FilenameUtils; ...@@ -6,6 +6,7 @@ import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springblade.core.secure.utils.SecureUtil; import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.utils.DateUtil;
import org.springblade.founder.utils.SysXxzjbhService; import org.springblade.founder.utils.SysXxzjbhService;
import org.springblade.founder.utils.Utils; import org.springblade.founder.utils.Utils;
import org.springblade.founder.xcxx.entity.TbStAppXcxx; import org.springblade.founder.xcxx.entity.TbStAppXcxx;
...@@ -89,6 +90,9 @@ public class XcxxServiceImpl implements XcxxService { ...@@ -89,6 +90,9 @@ public class XcxxServiceImpl implements XcxxService {
String dwlike = Utils.getDwlikeByUnitCode(user.getUnitcode()); String dwlike = Utils.getDwlikeByUnitCode(user.getUnitcode());
tbStAppXcxx.setXxdjdwGajgjgdm(dwlike); tbStAppXcxx.setXxdjdwGajgjgdm(dwlike);
tbStAppXcxx.setXxscPdbz("0"); tbStAppXcxx.setXxscPdbz("0");
if (tbStAppXcxx.getCksjEnd() != null){
tbStAppXcxx.setCksjEnd(DateUtil.getDiffDate(tbStAppXcxx.getCksjEnd(), 1));
}
List<TbStAppXcxx> rows = xcxxMapper.selectPageList(tbStAppXcxx); List<TbStAppXcxx> rows = xcxxMapper.selectPageList(tbStAppXcxx);
Integer total = xcxxMapper.selectPageCount(tbStAppXcxx); Integer total = xcxxMapper.selectPageCount(tbStAppXcxx);
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment