Commit 6dfd6ccc by 宋珺琪

修改各种bug

parent 6e9eca2a
......@@ -44,7 +44,7 @@ public class PortEntity {
private String returnParam;
@TableField("state")
private String state; // 0未成功 1成功
private String state; // 0未测试 1成功 2未成功
@TableField("is_delete")
private String isDelete;//0未删除 1删除
......
......@@ -90,6 +90,12 @@ public class SkRegionalsTask extends Model<SkRegionalsTask> {
*/
@TableField(exist = false)
private String resultCount;
/**
* 导出时间格式转换备用字段
*/
@TableField(exist = false)
private String byzd1;
/**
* 获取主键值
*
......
......@@ -84,4 +84,10 @@ public class SkServiceCache implements Serializable {
@TableField(exist = false)
private String xslx;
/**
* 导出时间格式转换备用字段
*/
@TableField(exist = false)
private String byzd1;
}
......@@ -68,4 +68,11 @@ public class KshServiceCache implements Serializable {
@ApiModelProperty(value = "每页数")
@TableField(exist = false)
private int pageSize;
/**
* 导出时间格式转换备用字段
*/
@TableField(exist = false)
private String byzd1;
}
......@@ -33,6 +33,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
......@@ -365,10 +366,19 @@ public class KshServiceController extends ApiController {
queryWrapper.orderByDesc("cjsj");
IPage page1 = kshCacheService.page(page, queryWrapper);
List<KshServiceCache> listResult = page1.getRecords();
for (KshServiceCache serviceCache : listResult) {
//对任务时间进行格式修改
if (serviceCache.getCjsj()!=null ){
Date djsj = serviceCache.getCjsj();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
String format = sdf.format(djsj);
serviceCache.setByzd1(format);
}
}
ExportExcelUtil<KshServiceCache> exportExcelUtil = new ExportExcelUtil<>();
String[] headersName = {"研判名称","标识号","标识号类型","研判时间","备注"};
String[] headersField = {"ypmc","bsh","bshtype","cjsj","bz"};
String[] headersField = {"ypmc","bsh","bshtype","byzd1","bz"};
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, listResult, response,"多维情报线索分析列表导出");
}
......
......@@ -86,9 +86,19 @@ public class WebSocketServer {
public static void SendMessage(Session session, String message) {
try {
// session.getBasicRemote().sendText(String.format("%s (From Server,Session ID=%s)",message,session.getId()));
if (session.isOpen()){
session.getBasicRemote().sendText(message);
}
for (Session session1 : SessionSet) {
if (session.equals(session1)){
session.getBasicRemote().sendText(message);
}
}
/* for (Session value : map.values()) {
if (session.getId().equals(value.getId())){
session.getBasicRemote().sendText(message);
}
}
if (session.isOpen()){
session.getBasicRemote().sendText(message);
}*/
} catch (IOException e) {
log.error("发送消息出错:{}", e.getMessage());
e.printStackTrace();
......
......@@ -54,15 +54,24 @@ public class PzGlController {
if (tbstApprovePzxx.getAjlb().equals("大数据建模")){
String originalName = multipartFile.getOriginalFilename().toLowerCase(Locale.ROOT);
tbstApprovePzxx.setWordName(originalName);
try {
/* try {
tbstApprovePzxx.setWordFile(multipartFile.getBytes());
} catch (IOException e) {
e.printStackTrace();
}
}*/
result = pzService.savePzxx(tbstApprovePzxx);
//上传到服务器
String username = tbstApprovePzxx.getCreateUserId();
String jzmc = (String) result.get("data");
//判断文件类型
String s = multipartFile.getOriginalFilename().toLowerCase(Locale.ROOT);
if (!s.endsWith(".docx") && !s.endsWith(".doc")) {
result.put("status",201);
result.put("msg","上传失败,请选择doxc或doc文件");
result.put("data","");
result.put("count",0);
return result;
}
saveInResources(multipartFile,username,jzmc);
}else
try {
......
......@@ -47,35 +47,35 @@ public class DatabaseController {
if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("sk")){
//sk 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC ");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' ,table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC ");
}else if (!StringUtil.isEmpty(type) && StringUtil.isEmpty(table) && type.equals("xz")){
//xz 列表
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%') ORDER BY CREATE_TIME DESC ");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' ,table_rows'数量' from information_schema.tables where table_schema='skyp' and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%') ORDER BY CREATE_TIME DESC ");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("sk")){
//sk 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' and TABLE_NAME like 'sk%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("ksh")){
//ksh 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and TABLE_NAME like 'ksh%' ORDER BY CREATE_TIME DESC");
}else if (!StringUtil.isEmpty(type) && !StringUtil.isEmpty(table) && type.equals("xz")){
//xz 模糊
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%' ORDER BY CREATE_TIME DESC) ");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%'and (TABLE_NAME not like 'sk%' and TABLE_NAME not like 'ksh%' ORDER BY CREATE_TIME DESC) ");
} else if (StringUtil.isEmpty(type)&& StringUtil.isEmpty(table)){
//查询所有的
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' ORDER BY CREATE_TIME DESC ");//limit " + page + ","+pageSize+"
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' ORDER BY CREATE_TIME DESC ");//limit " + page + ","+pageSize+"
}else if(StringUtil.isEmpty(type)&& !StringUtil.isEmpty(table)){
// 模糊查询
rs = stmt.executeQuery
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' ORDER BY CREATE_TIME DESC");
("select TABLE_NAME '表名称',table_comment '表说明',CREATE_TIME '创建时间',table_rows'数量' from information_schema.tables where table_schema='skyp' and TABLE_NAME like '%"+table+"%' ORDER BY CREATE_TIME DESC");
}
while (rs.next())
{
......@@ -83,6 +83,7 @@ public class DatabaseController {
map.put("TABLE_NAME",rs.getString("表名称"));
map.put("TABLE_COMMENT",rs.getString("表说明"));
map.put("CREATE_TIME",rs.getString("创建时间"));
map.put("TABLE_ROWS",rs.getString("数量"));
database.add(map);
}
int total = database.size();
......
......@@ -6,6 +6,7 @@ import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import com.founder.commonutils.model.newPublicEntity.PortEntity;
import com.founder.commonutils.model.newPublicEntity.SysUser;
import com.founder.commonutils.model.newPublicEntity.Token;
import com.founder.commonutils.model.newPublicEntity.ztypEntity.KshServicePojo;
import com.founder.commonutils.util.*;
import com.founder.publicapi.mapper.mysqlMapper.PortMapper;
import com.founder.servicebase.logs.OperLog;
......@@ -24,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Type;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -111,7 +113,7 @@ public class PortController {
public MapRestResult text() throws Exception {
QueryWrapper<PortEntity> wrapper = new QueryWrapper<>();
wrapper.eq("is_delete","0");
wrapper.eq("state",2);
wrapper.eq("state",0);
List<PortEntity> portEntities = portMapper.selectList(wrapper);
String token = gettoken("admin");
ArrayList list = new ArrayList<>();
......@@ -120,7 +122,8 @@ public class PortController {
port.setHeaders("application/json");
}
port.setState("0");
if ( !port.getUrl().contains("localhost")){
if ( !port.getUrl().contains("47.92.48.137:1003")){
port.setReturnParam("接口不通");
port.setState("2");
}else if (port.getUrl().contains("export") ||port.getUrl().contains("Export")||port.getApiName().equals("上传文件")||port.getApiName().equals("下载文件")||port.getApiName().equals("消息群发")||port.getApiName().equals("消息单发")){
port.setState("1");
......@@ -193,9 +196,8 @@ public class PortController {
List error = new ArrayList<>();
List secceed = new ArrayList<>();
for (PortEntity entity : portEntity) {
String id = genUniqueKey();
// String id = KeyUtilNaotu.getJzKey("JK");
entity.setId(id);
// String id = genUniqueKey();
// entity.setId(id);
int insert = portMapper.insert(entity);
if ( insert > 0 ){
secceed.add(entity.getApiName());
......@@ -233,7 +235,7 @@ public class PortController {
@PostMapping("portQueryIs")
@ApiOperation(value = "接口查询调用是否成功")
@OperLog(message = "接口查询调用是否成功", operation = OperationType.ADD)
@OperLog(message = "接口查询调用是否成功", operation = OperationType.QUERY)
public MapRestResult portQueryIs(){
QueryWrapper<PortEntity> wrapper = new QueryWrapper<>();
wrapper.eq("is_delete","0");
......@@ -245,6 +247,33 @@ public class PortController {
return new MapRestResult(200,"ok",collect);
}
@PostMapping("export")
@ApiOperation(value = "接口查询调用是否成功导出")
@OperLog(message = "接口查询调用是否成功导出", operation = OperationType.QUERY)
public void export(HttpServletResponse response) throws Exception {
QueryWrapper<PortEntity> wrapper = new QueryWrapper<>();
wrapper.eq("is_delete","0");
wrapper.orderByDesc("state");
List<PortEntity> list = portMapper.selectList(wrapper);
for (PortEntity portEntity : list) {
if (StringUtils.isNotEmpty(portEntity.getState())){
if (portEntity.getState().equals("0")){
portEntity.setState("未测试");
}else if (portEntity.getState().equals("1")){
portEntity.setState("成功");
}else if (portEntity.getState().equals("2")){
portEntity.setState("失败");
}
}
}
ExportExcelUtil<PortEntity> exportExcelUtil = new ExportExcelUtil<>();
String[] headersName = {"一级模块","二级模块","接口名称","请求路径","请求方式","调用时间","是否成功"};
String[] headersField = {"firstModule","secondModule","apiName","url","method","callTime","state"};
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, list, response,"服务概述导出");
}
public static Map<String,String> StringFoMap (String str) {
Gson gson = new Gson();
Type type = new TypeToken<Map<String, String>>() {
......
......@@ -76,8 +76,7 @@ public class ResourceManagerController {
}else return new MapRestResult(200,"上传失败",null);
}else {
return new MapRestResult().error("请上传文件");
}
return new MapRestResult(200,"请上传文件",null); }
}
@PostMapping("resourceDelete")
......@@ -171,8 +170,8 @@ public class ResourceManagerController {
@GetMapping(value = "download")
@OperLog(message = "文件下载", operation = OperationType.QUERY)
@ApiOperation(value = "文件下载")
@OperLog(message = "下载文件", operation = OperationType.QUERY)
@ApiOperation(value = "下载文件")
public void download (String id ,String fileType, String fileName,HttpServletResponse response) throws IOException {
String path1 = RESOURCE_MANAGER_DOWNLOAD +id + fileType;
......
......@@ -34,6 +34,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.websocket.Session;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.CompletableFuture;
......@@ -255,7 +256,7 @@ public class SkRegionalsResultController extends ApiController implements ExcelC
// 给指定用户推送消息
Thread.sleep(5000);// 延时5秒后执行
try{
WebSocketServer.SendMessage(WebSocketServer.map.get("433"),"任务:"+taskList.get(0).getTaskname()+"已完成!");
WebSocketServer.SendMessage(WebSocketServer.map.get(JwtUser.getUser(request).getIdentitycard()),"任务:"+taskList.get(0).getTaskname()+"已完成!");
}catch (Exception e){
System.out.println("WebSocketServer异常===================="+e);
}
......
......@@ -27,7 +27,9 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.IntStream;
......@@ -188,9 +190,30 @@ public class SkRegionalsTaskController extends ApiController implements ExcelCon
// 分页
skRegionalsDetailParam.setPage((skRegionalsDetailParam.getPage() - 1) * skRegionalsDetailParam.getPageSize());
List<SkRegionalsTask> list = skRegionalsTaskService.queryTaskInfoList(skRegionalsDetailParam);
for (SkRegionalsTask skRegionalsTask : list) {
//对任务时间进行格式修改
if (skRegionalsTask.getFssj()!=null ){
Date djsj = skRegionalsTask.getFssj();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
String format = sdf.format(djsj);
skRegionalsTask.setByzd1(format);
}
if (skRegionalsTask.getState()!=null ){
if (skRegionalsTask.getState().equals("1")){
skRegionalsTask.setState("已完成0%");
}else if (skRegionalsTask.getState().equals("2")){
skRegionalsTask.setState("已完成60%");
}else if (skRegionalsTask.getState().equals("3")){
skRegionalsTask.setState("已完成100%");
}else if (skRegionalsTask.getState().equals("4")){
skRegionalsTask.setState("失败");
}
}
}
ExportExcelUtil<SkRegionalsTask> exportExcelUtil = new ExportExcelUtil<>();
String[] headersName = {"类型名称","任务名称","任务时间","发送人员","任务状态"};
String[] headersField = {"typename","taskname","fssj","fsrxm","state"};
String[] headersField = {"typename","taskname","byzd1","fsrxm","state"};
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, list, response,"任务列表信息");
}
......
......@@ -28,6 +28,8 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -167,6 +169,15 @@ public class SkServiceCacheController extends ApiController {
queryWrapper.orderByDesc("ypsj");
IPage page1 = skCacheService.page(page, queryWrapper);
List<SkServiceCache> listResult = page1.getRecords();
for (SkServiceCache serviceCache : listResult) {
//时间格式的修改
if (serviceCache.getYpsj()!=null ){
Date djsj = serviceCache.getYpsj();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
String format = sdf.format(djsj);
serviceCache.setByzd1(format);
}
}
listResult.stream().forEach(q->{
Map<Object,Object> map = JSON.parseObject(q.getYptjStringJson(), Map.class);
map.forEach((k, v) -> {
......@@ -192,7 +203,7 @@ public class SkServiceCacheController extends ApiController {
});
ExportExcelUtil<SkServiceCache> exportExcelUtil = new ExportExcelUtil<>();
String[] headersName = {"研判名称","研判号码","研判时间","研判条件"};
String[] headersField = {"ypmc","objectvalue","ypsj","yptj"};
String[] headersField = {"ypmc","objectvalue","byzd1","yptj"};
exportExcelUtil.exportExcel("DataStatistics", headersName, headersField, page1.getRecords(), response,"线索列表信息");
}
}
......
......@@ -62,7 +62,7 @@ public class PaperController {
String wzId = KeyUtilNaotu.getJzKey("wz");
paperEntity.setId(wzId);
paperEntity.setCreateTime(nowTime());
paperEntity.setIsDelete("0");
// paperEntity.setIsDelete("0");
paperEntity.setCount(0);
if (photos!= null){
List<String> zp = new ArrayList<>();
......@@ -171,7 +171,39 @@ public class PaperController {
@PostMapping("articleUpdate")
@ApiOperation(value = "文章修改")
@OperLog(message = "文章修改", operation = OperationType.UPDATE)
public MapRestResult articleUpdate(@RequestBody PaperEntity paperEntity) {
public MapRestResult articleUpdate( PaperEntity paperEntity,@RequestParam(required = false) MultipartFile[] photos,@RequestParam(required = false) MultipartFile[] files) throws IOException {
if (photos!= null){
List<String> zp = new ArrayList<>();
for (MultipartFile photo : photos) {
//图片后缀
String type = photo.getOriginalFilename().substring(photo.getOriginalFilename().lastIndexOf("."));
String far = KeyUtil.getUUIDKey("wz")+type;
// 上传图片到服务器
FtpUtil.uploadFile(far,photo.getInputStream());
zp.add(imagesUrl+far);
}
String pho = "";
for (String o : zp) {
pho+=o+",";
}
paperEntity.setPhoto(pho);
}
if (files != null) {
for (MultipartFile file : files) {
//文件名
String originalName = file.getOriginalFilename().toLowerCase(Locale.ROOT);
// 文件后缀
String postfix = originalName.substring(originalName.lastIndexOf("."));
// 上传文件路径
String path = SUGGESTIONL_FILE_PATH + paperEntity.getUserName() + "/" + paperEntity.getId() + postfix;
try {
FileUtil.writeBytes(file.getBytes(), path);
} catch (IOException e) {
e.printStackTrace();
}
paperEntity.setFileName(originalName);
}
}
paperEntity.setUpdateTime(nowTime());
int i = paperMapper.updateById(paperEntity);
if ( i > 0 ){
......
......@@ -45,8 +45,69 @@
,asjbz.ajxlb AS ajxlb
,(select name from sys_dictitem where groupid='CODE_AJXLB' AND code = asjbz.ajxlb) AS ajxlbMc
FROM tb_st_asj T left join tb_st_asj_asjbz asjbz on T.asjbh = asjbz.asjbh
WHERE 1=1
<include refid="queryWhereByReceiving"/>
WHERE
<if test="startLng!=null and startLng!='' and endLng!=null and endLng!='' and startLat!=null and startLat!='' and endLat!=null and endLat!=''">
cast(T.ASJFSDD_DQJD as signed) BETWEEN cast(#{startLng,jdbcType=VARCHAR} as signed) AND cast(#{endLng,jdbcType=VARCHAR} as signed)
AND cast(T.ASJFSDD_DQWD as signed) BETWEEN cast(#{startLat,jdbcType=VARCHAR} as signed) AND cast(#{endLat,jdbcType=VARCHAR} as signed)
</if>
<if test="asjbh!= null and asjbh!=''">
AND T.ASJBH= #{ asjbh , jdbcType=VARCHAR }
</if>
<if test="ajmc!= null and ajmc!=''">
AND T.AJMC like concat('%', #{ajmc , jdbcType=VARCHAR }, '%')
</if>
<if test="jyaq!= null and jyaq!=''">
AND T.JYAQ LIKE concat('%', #{jyaq , jdbcType=VARCHAR }, '%')
</if>
<if test="larqStart!= null and larqStart!=''">
AND T.LARQ <![CDATA[>=]]> DATE_FORMAT(#{larqStart,jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%s')
</if>
<if test="larqEnd!= null and larqEnd!=''">
AND T.LARQ <![CDATA[<]]> DATE_FORMAT(#{larqEnd,jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%s')
</if>
<if test="afdXzqhdm!= null and afdXzqhdm!=''">
AND T.ASJFSDD_XZQHDM like concat(#{afdXzqhdm , jdbcType=VARCHAR }, '%')
</if>
<if test="zcjddm!= null and zcjddm!=''">
AND T.ZCJDDM= #{ zcjddm , jdbcType=VARCHAR }
</if>
<if test="ajlbdm!= null and ajlbdm!=''">
AND T.AJLBDM like concat(#{ajlbdm , jdbcType=VARCHAR }, '%')
</if>
<if test="zatzJyqk!= null and zatzJyqk!=''">
AND T.ZATZ_JYQK = #{zatzJyqk , jdbcType=VARCHAR }
</if>
<if test="ajxlb!= null and ajxlb!=''">
AND asjbz.ajxlb = #{ajxlb , jdbcType=VARCHAR }
</if>
<if test="kssj!= null and kssj!=''">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> DATE_FORMAT(#{kssj},'%Y-%m-%d %H:%i:%s')
</if>
<if test="jssj!= null and jssj!=''">
AND T.ASJFSSJ_ASJFSJSSJ <![CDATA[<=]]> DATE_FORMAT(#{jssj},'%Y-%m-%d %H:%i:%s')
</if>
<if test="ssFjOrPcs!= null and ssFjOrPcs!=''">
<if test="ssFjOrPcs=='1'">
AND T.ladw_Gajgjgdm like concat(substr(T.ladw_Gajgjgdm,0,6), '%')
</if>
<if test="ssFjOrPcs=='2'">
AND T.ladw_Gajgjgdm like concat(substr(T.ladw_Gajgjgdm,0,8), '%')
</if>
</if>
<if test="gjc!= null and gjc.length>0">
and(
<foreach collection="gjc" item="item" index="index" separator=" or ">
T.jyaq like '%${item}%'
</foreach>
)
</if>
<if test="pabj_pdbz != null and pabj_pdbz == '0'">
and ZCJDDM not in ('0600','0700','0800')
</if>
<if test="ladwGajgjgdm!= null and ladwGajgjgdm!=''">
AND T.ladw_Gajgjgdm = #{ladwGajgjgdm , jdbcType=VARCHAR }
</if>
<if test="pageSize!=0">
limit #{page},#{pageSize}
</if>
......@@ -55,8 +116,69 @@
SELECT
count(*)
FROM tb_st_asj T left join tb_st_asj_asjbz asjbz on T.asjbh = asjbz.asjbh
WHERE 1=1
<include refid="queryWhereByReceiving"/>
WHERE
<if test="startLng!=null and startLng!='' and endLng!=null and endLng!='' and startLat!=null and startLat!='' and endLat!=null and endLat!=''">
cast(T.ASJFSDD_DQJD as signed) BETWEEN cast(#{startLng,jdbcType=VARCHAR} as signed) AND cast(#{endLng,jdbcType=VARCHAR} as signed)
AND cast(T.ASJFSDD_DQWD as signed) BETWEEN cast(#{startLat,jdbcType=VARCHAR} as signed) AND cast(#{endLat,jdbcType=VARCHAR} as signed)
</if>
<if test="asjbh!= null and asjbh!=''">
AND T.ASJBH= #{ asjbh , jdbcType=VARCHAR }
</if>
<if test="ajmc!= null and ajmc!=''">
AND T.AJMC like concat('%', #{ajmc , jdbcType=VARCHAR }, '%')
</if>
<if test="jyaq!= null and jyaq!=''">
AND T.JYAQ LIKE concat('%', #{jyaq , jdbcType=VARCHAR }, '%')
</if>
<if test="larqStart!= null and larqStart!=''">
AND T.LARQ <![CDATA[>=]]> DATE_FORMAT(#{larqStart,jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%s')
</if>
<if test="larqEnd!= null and larqEnd!=''">
AND T.LARQ <![CDATA[<]]> DATE_FORMAT(#{larqEnd,jdbcType=VARCHAR},'%Y-%m-%d %H:%i:%s')
</if>
<if test="afdXzqhdm!= null and afdXzqhdm!=''">
AND T.ASJFSDD_XZQHDM like concat(#{afdXzqhdm , jdbcType=VARCHAR }, '%')
</if>
<if test="zcjddm!= null and zcjddm!=''">
AND T.ZCJDDM= #{ zcjddm , jdbcType=VARCHAR }
</if>
<if test="ajlbdm!= null and ajlbdm!=''">
AND T.AJLBDM like concat(#{ajlbdm , jdbcType=VARCHAR }, '%')
</if>
<if test="zatzJyqk!= null and zatzJyqk!=''">
AND T.ZATZ_JYQK = #{zatzJyqk , jdbcType=VARCHAR }
</if>
<if test="ajxlb!= null and ajxlb!=''">
AND asjbz.ajxlb = #{ajxlb , jdbcType=VARCHAR }
</if>
<if test="kssj!= null and kssj!=''">
AND T.ASJFSSJ_ASJFSKSSJ <![CDATA[>=]]> DATE_FORMAT(#{kssj},'%Y-%m-%d %H:%i:%s')
</if>
<if test="jssj!= null and jssj!=''">
AND T.ASJFSSJ_ASJFSJSSJ <![CDATA[<=]]> DATE_FORMAT(#{jssj},'%Y-%m-%d %H:%i:%s')
</if>
<if test="ssFjOrPcs!= null and ssFjOrPcs!=''">
<if test="ssFjOrPcs=='1'">
AND T.ladw_Gajgjgdm like concat(substr(T.ladw_Gajgjgdm,0,6), '%')
</if>
<if test="ssFjOrPcs=='2'">
AND T.ladw_Gajgjgdm like concat(substr(T.ladw_Gajgjgdm,0,8), '%')
</if>
</if>
<if test="gjc!= null and gjc.length>0">
and(
<foreach collection="gjc" item="item" index="index" separator=" or ">
T.jyaq like '%${item}%'
</foreach>
)
</if>
<if test="pabj_pdbz != null and pabj_pdbz == '0'">
and ZCJDDM not in ('0600','0700','0800')
</if>
<if test="ladwGajgjgdm!= null and ladwGajgjgdm!=''">
AND T.ladw_Gajgjgdm = #{ladwGajgjgdm , jdbcType=VARCHAR }
</if>
</select>
<sql id="queryWhereByReceiving">
<if test="asjbh!= null and asjbh!=''">
......@@ -111,8 +233,8 @@
)
</if>
<if test="startLng!=null and startLng!='' and endLng!=null and endLng!='' and startLat!=null and startLat!='' and endLat!=null and endLat!=''">
AND T.ASJFSDD_DQJD <![CDATA[>=]]>#{startLng,jdbcType=VARCHAR} AND T.ASJFSDD_DQJD <![CDATA[<=]]>#{endLng,jdbcType=VARCHAR}
AND T.ASJFSDD_DQWD <![CDATA[>=]]>#{startLat,jdbcType=VARCHAR} AND T.ASJFSDD_DQWD <![CDATA[<=]]>#{endLat,jdbcType=VARCHAR}
cast(T.ASJFSDD_DQJD as signed) BETWEEN cast(#{startLng,jdbcType=VARCHAR} as signed) AND cast(#{endLng,jdbcType=VARCHAR} as signed)
AND cast(T.ASJFSDD_DQWD as signed) BETWEEN cast(#{startLat,jdbcType=VARCHAR} as signed) AND cast(#{endLat,jdbcType=VARCHAR} as signed)
</if>
<if test="pabj_pdbz != null and pabj_pdbz == '0'">
and ZCJDDM not in ('0600','0700','0800')
......
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