Commit 8d7b7712 by wang_jiaxing

修改查询报案信息未空的返回空列表不是返回空字符串,修改返回的时间格式,将不需要时分秒的格式改为yyyy-MM-dd,修改全国接口路径

parent a16228a7
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<spring.plugin.version>2.0.0.RELEASE</spring.plugin.version> <spring.plugin.version>2.0.0.RELEASE</spring.plugin.version>
<spring.platform.version>Cairo-SR8</spring.platform.version> <spring.platform.version>Cairo-SR8</spring.platform.version>
<log4j2.version>2.16.0</log4j2.version> <log4j2.version>2.17.0</log4j2.version>
<!-- 推荐使用Harbor --> <!-- 推荐使用Harbor -->
<docker.registry.url>192.168.186.129</docker.registry.url> <docker.registry.url>192.168.186.129</docker.registry.url>
......
...@@ -4,10 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,10 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.founder.entity.BaseModel; import org.springblade.founder.entity.BaseModel;
import org.springblade.founder.ryythcj.entity.TbStAppRyxx;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
...@@ -32,6 +32,7 @@ public class TbStAppDzbl extends BaseModel { ...@@ -32,6 +32,7 @@ public class TbStAppDzbl extends BaseModel {
private String zjlxStr; private String zjlxStr;
//电子笔录采集对象-出生日期 //电子笔录采集对象-出生日期
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date csrq; private Date csrq;
//电子笔录采集对象-性别 //电子笔录采集对象-性别
private String xbdm; private String xbdm;
...@@ -98,9 +99,11 @@ public class TbStAppDzbl extends BaseModel { ...@@ -98,9 +99,11 @@ public class TbStAppDzbl extends BaseModel {
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date djsjStart; private Date djsjStart;
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date djsjEnd; private Date djsjEnd;
@TableField(exist = false) @TableField(exist = false)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
where scbz = '0' where scbz = '0'
and open_flag = '1' and open_flag = '1'
<if test="dwdm != null and dwdm != ''"> <if test="dwdm != null and dwdm != ''">
unitcode like #{dwdm,jdbcType=VARCHAR} || '%' unitcode like CONCAT(#{dwdm,jdbcType=VARCHAR}, '%')
</if> </if>
<if test="dwList != null and dwList.size() > 0"> <if test="dwList != null and dwList.size() > 0">
and unitcode in and unitcode in
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</foreach> </foreach>
</if> </if>
<if test="xm != null and xm != ''"> <if test="xm != null and xm != ''">
and true_name like '%' || #{xm,jdbcType=VARCHAR} || '%' and true_name like CONCAT('%', #{xm,jdbcType=VARCHAR}, '%')
</if> </if>
<if test="sfzh != null and sfzh != ''"> <if test="sfzh != null and sfzh != ''">
and identitycard = #{sfzh,jdbcType=VARCHAR} and identitycard = #{sfzh,jdbcType=VARCHAR}
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
where scbz = '0' where scbz = '0'
and open_flag = '1' and open_flag = '1'
<if test="dwdm != null and dwdm != ''"> <if test="dwdm != null and dwdm != ''">
unitcode like #{dwdm,jdbcType=VARCHAR} || '%' unitcode like CONCAT(#{dwdm,jdbcType=VARCHAR}, '%')
</if> </if>
<if test="dwList != null and dwList.size() > 0"> <if test="dwList != null and dwList.size() > 0">
and unitcode in and unitcode in
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</foreach> </foreach>
</if> </if>
<if test="xm != null and xm != ''"> <if test="xm != null and xm != ''">
and true_name like '%' || #{xm,jdbcType=VARCHAR} || '%' and true_name like CONCAT('%', #{xm,jdbcType=VARCHAR}, '%')
</if> </if>
<if test="sfzh != null and sfzh != ''"> <if test="sfzh != null and sfzh != ''">
and identitycard = #{sfzh,jdbcType=VARCHAR} and identitycard = #{sfzh,jdbcType=VARCHAR}
......
...@@ -209,12 +209,13 @@ public class TbXwBaServiceImpl implements TbXwBaService { ...@@ -209,12 +209,13 @@ public class TbXwBaServiceImpl implements TbXwBaService {
public List<UserVO> queryAll(String asjbh, Integer page, Integer limit) { public List<UserVO> queryAll(String asjbh, Integer page, Integer limit) {
page = (page-1) * limit; page = (page-1) * limit;
limit +=page; limit +=page;
List<UserVO> userVOS=new ArrayList<>();
List<TbXwBaQgccj> tbXwZbfzxyrQgccjs=tbXwBaDao.queryAll(asjbh,page,limit); List<TbXwBaQgccj> tbXwZbfzxyrQgccjs=tbXwBaDao.queryAll(asjbh,page,limit);
if (CollectionUtils.isEmpty(tbXwZbfzxyrQgccjs)){ if (CollectionUtils.isEmpty(tbXwZbfzxyrQgccjs)){
return null; return userVOS;
} }
List<UserVO> userVOS=new ArrayList<>();
for (TbXwBaQgccj t:tbXwZbfzxyrQgccjs) { for (TbXwBaQgccj t:tbXwZbfzxyrQgccjs) {
userVOS.add(new UserVO(t)); userVOS.add(new UserVO(t));
} }
......
package org.springblade.founder.redis.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.system.entity.SysDictitem;
import org.springblade.modules.system.entity.User;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@Component
@Mapper
public interface DictitemMapper {
List<SysDictitem> findCodeAllByType(@Param(value = "value")String value,@Param(value = "bzxx")String bzxx);
List<User> queryAllUnitUser(Map m);
List<String> getAllTypes(@Param(value = "type") String type);
String getNameByCode(@Param(value = "code") String code, @Param(value = "groupid") String groupid);
//查询当前单位及其下级单位
List<Map<String, Object>> getXqdwList(Map map);
}
<?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.redis.mapper.DictitemMapper">
<select id="queryAllUnitUser" resultType="org.springblade.modules.system.entity.User" parameterType="java.util.Map">
select
ID as id,
real_name as relName,
account as account
from blade_user where dept_id = #{unitcode } and status='1'
<if test="true_name!=null and true_name!=''">and real_name like concat('%',#{true_name, jdbcType=VARCHAR},'%')
</if>
</select>
<select id="findCodeAllByType" parameterType="java.lang.String"
resultType="org.springblade.modules.system.entity.SysDictitem">
select distinct
id,
isparent,
groupid,
code ,
name,
groupname,
pid,
description,
yycj1,
yycj2,
yycj3,
yycj4,
yycj5,
yycj6,
yycj7,
yycj8,
yycj9,
startcode,
endcode
from sys_dictitem
where scbz = '0'
<if test="value != null">
and groupid=#{value, jdbcType=VARCHAR}
</if>
<if test="bzxx != null">
and code like #{bzxx,jdbcType=VARCHAR} || '%'
</if>
order by code
</select>
<select id="getAllTypes" resultType="java.lang.String">
select distinct(groupid)
from sys_dictitem
</select>
<select id="getNameByCode" resultType="java.lang.String">
select name
from sys_dictitem
where groupid = #{groupid, jdbcType=VARCHAR}
and code = #{code, jdbcType=VARCHAR}
</select>
<select id="getXqdwList" resultType="java.util.Map">
select CODE,NAME from sys_dictitem where groupid = 'CODE_UNIT' and CODE
<if test="myCode != null and myCode != ''">
AND CODE LIKE #{myCode}
</if>
<if test="type=='0'.toString()">
AND CODE != #{unitcode}
</if>
order by code
</select>
</mapper>
package org.springblade.founder.redis.service;
import org.springblade.modules.system.entity.ZTreeNode;
import java.util.List;
import java.util.Map;
public interface IDicItemService {
List<ZTreeNode> queryTypeCode(String code_type, String id, String startId, String yycj, String name);
/**
* 查询指定节点的代码
* @param code_type
* @param codes
* @return
*/
List<ZTreeNode> queryCodes(String code_type, String codes, String name);
/**
* 根据条件查询代码
* @param code_type
* @param id 父级id
* @param yycj 应用场景
* @param unitcode 单位
* @param name 搜索条件
* @return
*/
List<ZTreeNode> getZtreeNodeByName(String code_type, String id, String yycj, String unitcode, String name);
List<ZTreeNode> queryTypeUsercode(String startId, String name);
//查询当前单位及其下级单位
List<Map<String, Object>> getXqdwList(Map<String,Object> paramMap);
//查询字典码的值
String queryNameByCode(String codeVal, String codeType);
}
package org.springblade.founder.redis.service.impl;
import com.alibaba.fastjson.JSON;
import org.springblade.founder.redis.mapper.DictitemMapper;
import org.springblade.modules.system.entity.SysDictitem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.Set;
/**
* Created by Administrator on 2018/4/18.
*/
@Service
public class ImportCode {
@Autowired
private DictitemMapper iDictitemDao;
@Value("${ssdw}")
private String ssdw; //所属单位
@Autowired
private StringRedisTemplate redisTemplate;
public void insertIntoRedis(String type) {
if (null != ssdw && !"".equals(ssdw) && ssdw.length() >= 2) {
ssdw = ssdw.substring(0, 2);
}
//先删除指定key缓存,再加入缓存
String keys=ssdw+":*";
if(null!=type && !"".equals(type) && !"null".equals(type)){
keys=ssdw+":"+type+"*";
}
System.out.println("ssdw="+ssdw);
System.out.println("keys="+keys);
Set<String> dictitemKeys = redisTemplate.keys(keys);
System.out.println("缓冲中的建开始");
System.out.println(dictitemKeys.size());
System.out.println("缓冲中的建结束");
redisTemplate.delete(dictitemKeys);
String bzxx = null;
if("CODE_UNIT".equals(type) ||"QGCODE_UNIT".equals(type)){
bzxx=ssdw;
}
List<SysDictitem> zTreeNodeList = iDictitemDao.findCodeAllByType(type,bzxx);
for(SysDictitem node:zTreeNodeList){
String nodeStr= JSON.toJSONString(node);
String pid=null;
if(!StringUtils.isEmpty(node.getPid())){
pid=node.getPid();
}
String key = ssdw+":"+node.getGroupid()+":"+pid+":"+node.getCode()+":"+node.getName()+":"+node.getId()+"|"+node.getName();
System.out.println("key:"+key);
System.out.println("nodeStr:"+nodeStr);
redisTemplate.opsForValue().set(key,nodeStr);
System.out.println("获取到数据:");
System.out.println(redisTemplate.opsForValue().get(key));
}
type = (null==type || "null"==type)?"":type;
System.out.println("字典"+type+"成功加入缓存---------------------------------------------");
}
//获取字典表中相关的的groupid
public List<String> getAllTypes(String type) {
return iDictitemDao.getAllTypes(type);
}
}
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -47,6 +48,7 @@ public class TbStAppRyxx extends BaseModel { ...@@ -47,6 +48,7 @@ public class TbStAppRyxx extends BaseModel {
private String wwxm; private String wwxm;
//出生日期 //出生日期
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date csrq; private Date csrq;
//性别代码 CODE_XB //性别代码 CODE_XB
private String xbdm; private String xbdm;
...@@ -126,15 +128,19 @@ public class TbStAppRyxx extends BaseModel { ...@@ -126,15 +128,19 @@ public class TbStAppRyxx extends BaseModel {
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date csrqStart; private Date csrqStart;
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date csrqEnd; private Date csrqEnd;
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date djsjStart; private Date djsjStart;
@TableField(exist = false) @TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date djsjEnd; private Date djsjEnd;
@TableField(exist = false) @TableField(exist = false)
......
...@@ -2,6 +2,7 @@ package org.springblade.founder.xcxx.entity; ...@@ -2,6 +2,7 @@ package org.springblade.founder.xcxx.entity;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.founder.entity.BaseModel; import org.springblade.founder.entity.BaseModel;
...@@ -50,9 +51,11 @@ public class TbStAppXcxx extends BaseModel { ...@@ -50,9 +51,11 @@ public class TbStAppXcxx extends BaseModel {
private List<TbStAppXcxxFj> fjList; private List<TbStAppXcxxFj> fjList;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(exist = false) @TableField(exist = false)
private Date cksjStart; private Date cksjStart;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(exist = false) @TableField(exist = false)
private Date cksjEnd; private Date cksjEnd;
@TableField(exist = false) @TableField(exist = false)
......
package org.springblade.founder.ydjwhc.entity; package org.springblade.founder.ydjwhc.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
...@@ -21,6 +22,7 @@ public class Xzgzry implements Serializable { ...@@ -21,6 +22,7 @@ public class Xzgzry implements Serializable {
private String syrkZxjd; private String syrkZxjd;
private String syrkZxwd; private String syrkZxwd;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date syrkDjsj; private Date syrkDjsj;
//相关所有案事件编号,以 //相关所有案事件编号,以
private String xgAsjbh; private String xgAsjbh;
......
...@@ -143,7 +143,7 @@ public class BjHcServiceImpl implements BjHcService { ...@@ -143,7 +143,7 @@ public class BjHcServiceImpl implements BjHcService {
if (hm.startsWith("A") && hm.length() == 23) { if (hm.startsWith("A") && hm.length() == 23) {
HashMap<String, Object> resultMap = new HashMap<>(); HashMap<String, Object> resultMap = new HashMap<>();
HcAjJg ajxx = qsBjHcService.selectAjByAsjbh(hm); HcAjJg ajxx = qsBjHcService.selectAjByAsjbh(hm);
if (ajxx != null){ if (ajxx == null){
return null; return null;
} }
resultMap.put("ajxx", ajxx); resultMap.put("ajxx", ajxx);
......
...@@ -131,7 +131,7 @@ spring: ...@@ -131,7 +131,7 @@ spring:
#ssdw: '010000000000' #ssdw: '010000000000'
ssdw: '460000000000' ssdw: '460000000000'
#内蒙3.0跳转地址,用于调用全国接口 #内蒙3.0跳转地址,用于调用全国接口
zhyyPath: http://zhyy.xzxt.nm zhyyPath: http://10.100.17.122:80
#grade 级别为1的拿外省 2的拿本市外的 #grade 级别为1的拿外省 2的拿本市外的
grade: 1 grade: 1
......
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