Commit 33be1114 by liulianglang

合成作战工作室代码提交

parent 613bd30a
package org.springblade.founder.hcypgl.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springblade.founder.gnsyrzlog.LogOper;
import org.springblade.founder.hcypgl.entity.TbYwDzqqFjVo;
import org.springblade.founder.hcypgl.entity.TbYwHcypglCygl;
import org.springblade.founder.hcypgl.entity.TbYwHcypglFkxx;
import org.springblade.founder.hcypgl.entity.TbYwHcypglXx;
import org.springblade.founder.hcypgl.mapper.TbYwHcypglXxMapper;
import org.springblade.founder.hcypgl.service.TbYwHcypglXxService;
import org.springblade.founder.utils.EasyUIPage;
import org.springblade.founder.utils.R;
import org.springblade.modules.system.entity.SysNewUser;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 合成研判管理模块请求主表(TbYwHcypglXx)表控制层
*
* @author liulianglang
* @since 2023-11-21 10:09:03
*/
@RestController
@RequestMapping("/hcypgl")
public class TbYwHcypglXxController {
/**
* 服务对象
*/
@Resource
private TbYwHcypglXxService tbYwHcypglXxService;
@Resource
private TbYwHcypglXxMapper tbYwHcypglXxMapper;
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@PostMapping("selectOne")
public R selectOne(String id) {
return R.ok().data("rows",tbYwHcypglXxService.queryById(id));
}
@PostMapping("/insertXzqqXx")
public R insertXzqqXx(TbYwHcypglXx tbYwHcypglXx,
@RequestParam(value = "lajdsfile",required = false) MultipartFile lajdsfile,
@RequestParam(value = "qtfile",required = false) MultipartFile qtfile
) {
tbYwHcypglXxService.insert(tbYwHcypglXx,lajdsfile,qtfile);
return R.ok().data("xxzjbh","");
}
@PostMapping("/selectAll")
public R selectAll(TbYwHcypglXx tbYwHcypglXx){
try {
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(tbYwHcypglXx.getPage());
easyUIPage.setPagePara(tbYwHcypglXx.getLimit());
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
tbYwHcypglXx.setPage(begin);
tbYwHcypglXx.setLimit(end);
Map<String,Object> map = new HashMap<>();
List<TbYwHcypglXx> list = tbYwHcypglXxService.queryAll(tbYwHcypglXx);
int count = tbYwHcypglXxService.queryAllCount(tbYwHcypglXx);
map.put("rows",list);
map.put("total",count);
return R.ok().data(map);
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/updateXzqqXx")
public R updateXzqqXx(TbYwHcypglXx tbYwHcypglXx, @RequestParam(value = "lajdsfile",required = false) MultipartFile lajdsfile,
@RequestParam(value = "qtfile",required = false) MultipartFile qtfile
) {
tbYwHcypglXxService.update(tbYwHcypglXx,lajdsfile,qtfile);
return R.ok().data("xxzjbh","");
}
@PostMapping("/deleteById")
public R deleteById(TbYwHcypglXx tbYwHcypglXx){
try {
tbYwHcypglXxService.deleteById(tbYwHcypglXx.getXxzjbh());
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/shXzqqXx")
public R shXzqqXx(TbYwHcypglXx tbYwHcypglXx) {
try {
tbYwHcypglXxService.shXzqqXx(tbYwHcypglXx);
return R.ok().data("xxzjbh","");
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@RequestMapping(value = "/imgInfo", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(value = "查询详情页附件信息", notes = "信息主键编号")
public R queryImgInfo(@ApiParam(name = "xxzjbh", value = "信息主键编号")
@RequestParam(required = true) String xxzjbh) {
List<TbYwDzqqFjVo> xxVo = tbYwHcypglXxService.queryImgInfo(xxzjbh);
if (xxVo == null) {
return R.error("该主键号无法查到附件信息");
}
return R.ok().data("detail", xxVo);
}
@PostMapping("/insertFkXx")
public R insertFkXx(TbYwHcypglFkxx tbYwHcypglFkxx, @RequestParam(value = "fkfile",required = false) MultipartFile fkfile
) {
tbYwHcypglXxService.insertFkXx(tbYwHcypglFkxx,fkfile);
return R.ok().data("xxzjbh","");
}
@PostMapping("/updateFkXx")
public R updateFkXx(TbYwHcypglFkxx tbYwHcypglFkxx, @RequestParam(value = "fkfile",required = false) MultipartFile fkfile
) {
tbYwHcypglXxService.updateFkXx(tbYwHcypglFkxx,fkfile);
return R.ok().data("xxzjbh","");
}
@PostMapping("selectFkXxOne")
public R selectFkXxOne(String id) {
return R.ok().data("rows",tbYwHcypglXxService.selectFkXxOne(id));
}
@PostMapping("selectJsXxOne")
public R selectJsXxOne(String id) {
return R.ok().data("rows",tbYwHcypglXxService.selectJsXxOne(id));
}
@PostMapping("/selectUserNewList")
public R selectUserNewList(SysNewUser sysNewUser){
try {
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(sysNewUser.getPage());
easyUIPage.setPagePara(sysNewUser.getLimit());
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
sysNewUser.setBegin(begin);
sysNewUser.setEnd(end);
Map<String,Object> map = new HashMap<>();
List<SysNewUser> list = tbYwHcypglXxService.getUserNewList(sysNewUser);
if(list == null){
return R.error("无权限查看");
}else{
int count = tbYwHcypglXxService.getUserNewCount(sysNewUser);
map.put("rows",list);
map.put("total",count);
return R.ok().data(map);
}
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/selectCyglList")
public R selectCyglList(SysNewUser sysNewUser){
try {
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(sysNewUser.getPage());
easyUIPage.setPagePara(sysNewUser.getLimit());
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
sysNewUser.setBegin(begin);
sysNewUser.setEnd(end);
Map<String,Object> map = new HashMap<>();
List<SysNewUser> list = tbYwHcypglXxService.selectCyglList(sysNewUser);
if(list == null){
return R.error("无权限查看");
}else{
int count = tbYwHcypglXxService.selectCyglListCount(sysNewUser);
map.put("rows",list);
map.put("total",count);
return R.ok().data(map);
}
} catch (Exception e) {
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/deleteCyglById")
public R deleteCyglById(TbYwHcypglXx tbYwHcypglXx){
try {
tbYwHcypglXxService.deleteCyglById(tbYwHcypglXx.getXxzjbh());
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/updateCyglById")
public R updateCyglById(TbYwHcypglCygl tbYwHcypglCygl){
try {
tbYwHcypglXxService.updateCyglById(tbYwHcypglCygl);
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("/insertCyglById")
public R insertCyglById(TbYwHcypglCygl tbYwHcypglCygl){
try {
tbYwHcypglXxService.insertCyglById(tbYwHcypglCygl);
return R.ok();
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@RequestMapping("/downLoadFile")
@ApiOperation(value = "附件文书下载", notes = "附件文书下载")
public void downloadFlws(@RequestParam("xxzjbh") String xxzjbh, HttpServletResponse response) throws Exception {
InputStream in = null;
BufferedOutputStream out = null;
List<TbYwDzqqFjVo> lajdsFj = tbYwHcypglXxMapper.selectFjById( xxzjbh);
if(lajdsFj!=null&&lajdsFj.size()>0)
{
TbYwDzqqFjVo fjVo=lajdsFj.get(0);
if (fjVo != null) {
String fileName = URLEncoder.encode(fjVo.getDzwjbt(), "UTF-8").replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName);
try {
in = new ByteArrayInputStream(fjVo.getDzwjnr());
out = new BufferedOutputStream(response.getOutputStream());
byte[] buff = new byte[8192];
int bytesRead;
while ((bytesRead = in.read(buff, 0, buff.length)) != -1) {
out.write(buff, 0, bytesRead);
}
out.flush();
} catch (Exception e) {
e.printStackTrace();
System.out.println("下载文件异常,检查是否根路径错误或文件已挪至其他位置" + e.getMessage());
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
}
}
return;
}
}
package org.springblade.founder.hcypgl.entity;
import lombok.Data;
/**
* 调证请求附件信息视图对象*
*
* @author zzj*
*/
@Data
public class TbYwDzqqFjVo extends TbYwHcypglFj {
/**
* 立案决定书在法律文书表的信息主键编号*
*/
private String flwsXxzjbh;
/**
* 附件类型翻译*
*/
private String fjlxText;
/**
* 电子文件内容base64预览对象*
*/
private String dzwjnrBase64;
}
package org.springblade.founder.hcypgl.entity;
import lombok.Data;
import org.springblade.modules.system.entity.XzxtUser;
import java.io.Serializable;
import java.util.Date;
@Data
public class TbYwHcypglCygl implements Serializable {
private static final long serialVersionUID = 634307427993037567L;
/**
* 信息主键编号
*/
private String xxzjbh;
/**
* 关联信息主键编号
*/
private String glxxzjbh;
/**
* 单位组号
*/
private String dwz;
/**
* 信息删除判断标志
*/
private String xxscPdbz;
/**
* 信息登记单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxdjdwGajgjgdm;
/**
* 信息登记单位_公安机关名称
*/
private String xxdjdwGajgmc;
/**
* 信息登记人员_姓名
*/
private String xxdjryXm;
/**
* 信息登记人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxdjryGmsfhm;
/**
* 信息登记人员_联系电话
*/
private String xxdjryLxdh;
/**
* 登记时间
*/
private Date djsj;
/**
* 信息操作单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxczdwGajgjgdm;
/**
* 信息操作单位_公安机关名称
*/
private String xxczdwGajgmc;
/**
* 信息操作人员_姓名
*/
private String xxczryXm;
/**
* 信息操作人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxczryGmsfhm;
/**
* 更新时间
*/
private Date gxsj;
/**
* 成员角色
*/
private String cyjs;
// 更新人员
public void setUpUser(XzxtUser user){
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
}
public void setDjUser(XzxtUser user){
this.xxdjryXm=user.getRealname();
this.xxdjdwGajgjgdm=user.getUnitcode();
this.xxdjdwGajgmc=user.getUnitname();
this.xxdjryGmsfhm=user.getIdentitycard();
this.xxdjryLxdh=user.getPhone();
this.xxscPdbz="0";
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
this.djsj = new Date();
}
}
package org.springblade.founder.hcypgl.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class TbYwHcypglFj implements Serializable {
private static final long serialVersionUID = 632112287108925469L;
/**
* 信息主键编号
*/
private String xxzjbh;
/**
* 关联的调证信息主键编号
*/
private String dzXxzjbh;
/**
* 电子文件标题
*/
private String dzwjbt;
/**
* 电子文件格式
*/
private String dzwjgs;
/**
* 电子文件位置
*/
private String dzwjwz;
/**
* 电子文件内容
*/
private byte[] dzwjnr;
/**
* 附件类型,1-立案决定书,2-其它附件,3-反馈附件
*/
private String fjlx;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
/**
* 信息删除判断标志
*/
private String xxscPdbz;
}
package org.springblade.founder.hcypgl.entity;
import lombok.Data;
import org.springblade.modules.system.entity.XzxtUser;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class TbYwHcypglFkxx implements Serializable {
private static final long serialVersionUID = -22350871634937379L;
/**
* 信息主键编号
*/
private String xxzjbh;
private String removezpStr;
/**
* 关联信息主键编号
*/
private String glxxzjbh;
private String xzzt;
/**
* 反馈内容
*/
private String fknr;
private List<TbYwDzqqFjVo> wj;
/**
* 信息删除判断标志
*/
private String xxscPdbz;
/**
* 信息登记单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxdjdwGajgjgdm;
/**
* 信息登记单位_公安机关名称
*/
private String xxdjdwGajgmc;
/**
* 信息登记人员_姓名
*/
private String xxdjryXm;
/**
* 信息登记人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxdjryGmsfhm;
/**
* 信息登记人员_联系电话
*/
private String xxdjryLxdh;
/**
* 登记时间
*/
private Date djsj;
/**
* 信息操作单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxczdwGajgjgdm;
/**
* 信息操作单位_公安机关名称
*/
private String xxczdwGajgmc;
/**
* 信息操作人员_姓名
*/
private String xxczryXm;
/**
* 信息操作人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxczryGmsfhm;
/**
* 更新时间
*/
private Date gxsj;
// 更新人员
public void setUpUser(XzxtUser user){
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
}
public void setDjUser(XzxtUser user){
this.xxdjryXm=user.getRealname();
this.xxdjdwGajgjgdm=user.getUnitcode();
this.xxdjdwGajgmc=user.getUnitname();
this.xxdjryGmsfhm=user.getIdentitycard();
this.xxdjryLxdh=user.getPhone();
this.xxscPdbz="0";
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
this.djsj = new Date();
}
}
package org.springblade.founder.hcypgl.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springblade.modules.system.entity.XzxtUser;
import java.io.Serializable;
import java.util.Date;
@Data
public class TbYwHcypglXx implements Serializable {
private static final long serialVersionUID = 495366910065813829L;
/**
* 信息主键编号
*/
private String xxzjbh;
//分页查询开始位置
private Integer page;
//分页查询结束位置
private Integer limit;
/**
* 关联的案件编号
*/
private String asjbh;
private String grade; //等级
private String dwcxsql;
private String unitcode;
private String sfbj;
/**
* 案件名称
*/
private String ajmc;
private String removezpStr;
/**
* 案件类别代码
*/
private String ajlbdm;
/**
* 立案单位代码
*/
private String ladwdm;
/**
* 简要案情
*/
private String jayq;
/**
* 立案日期
*/
private String larq;
/**
* 线索类型
*/
private String xslx;
/**
* 线索号码
*/
private String xshm;
/**
* 线索描述
*/
private String xsms;
/**
* 申请时间
*/
private Date sqsj;
/**
* 审批人身份证号
*/
private String sprSfzh;
/**
* 审批意见
*/
private String spyj;
/**
* 审批时间
*/
private Date spsj;
/**
* 协作状态 0-草稿,1-待审批,2-审批不通过,3-审批通过,4-待市反馈,5-市已反馈,6-待市审批,7-市审批通过
* 8-市审批不通过 ,9-待省反馈,10-省已反馈
*/
private String xzzt;
private String xzztStr;
/**
* 信息删除判断标志
*/
private String xxscPdbz;
/**
* 信息登记单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxdjdwGajgjgdm;
/**
* 信息登记单位_公安机关名称
*/
private String xxdjdwGajgmc;
/**
* 信息登记人员_姓名
*/
private String xxdjryXm;
/**
* 信息登记人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxdjryGmsfhm;
/**
* 信息登记人员_联系电话
*/
private String xxdjryLxdh;
/**
* 登记时间
*/
private Date djsj;
/**
* 信息操作单位_公安机关机构代码/采用GA 380《全国公安机关机构代码编码规则》统一编制的代码/CODE_GXS
*/
private String xxczdwGajgjgdm;
/**
* 信息操作单位_公安机关名称
*/
private String xxczdwGajgmc;
/**
* 信息操作人员_姓名
*/
private String xxczryXm;
/**
* 信息操作人员_公民身份号码/符合GB 11643《公民身份号码》
*/
private String xxczryGmsfhm;
/**
* 更新时间
*/
private Date gxsj;
private String userId;
// 更新人员
public void setUpUser(XzxtUser user){
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
}
public void setDjUser(XzxtUser user){
this.xxdjryXm=user.getRealname();
this.xxdjdwGajgjgdm=user.getUnitcode();
this.xxdjdwGajgmc=user.getUnitname();
this.xxdjryGmsfhm=user.getIdentitycard();
this.xxdjryLxdh=user.getPhone();
this.xxscPdbz="0";
this.xxczryXm=user.getRealname();
this.xxczdwGajgjgdm=user.getUnitcode();
this.xxczdwGajgmc=user.getUnitname();
this.xxczryGmsfhm=user.getIdentitycard();
this.gxsj = new Date();
this.djsj = new Date();
}
}
package org.springblade.founder.hcypgl.mapper;
import org.springblade.founder.hcypgl.entity.*;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.modules.system.entity.SysNewUser;
import org.springframework.stereotype.Component;
/**
* 合成研判管理模块请求主表(TbYwHcypglXx)表数据库访问层
*
* @author liulianglang
* @since 2023-11-21 10:08:56
*/
@Component
@Mapper
public interface TbYwHcypglXxMapper {
/**
* 通过ID查询单条数据
*
* @param xxzjbh 主键
* @return 实例对象
*/
TbYwHcypglXx queryById(String xxzjbh);
/**
* 查询指定行数据
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return 对象列表
*/
List<TbYwHcypglXx> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
/*查询字典*/
String queryNameByCode(@Param(value = "groupid") String groupid,
@Param(value = "code") String code);
/**
* 通过实体作为筛选条件查询
*
* @param tbYwHcypglXx 实例对象
* @return 对象列表
*/
List<TbYwHcypglXx> queryAll(TbYwHcypglXx tbYwHcypglXx);
int queryAllCount(TbYwHcypglXx tbYwHcypglXx);
/**
* 新增数据
*
* @param tbYwHcypglXx 实例对象
* @return 影响行数
*/
int insert(TbYwHcypglXx tbYwHcypglXx);
int insertFkXx(TbYwHcypglFkxx tbYwHcypglFkxx);
int updateFkXx(TbYwHcypglFkxx tbYwHcypglFkxx);
TbYwHcypglFkxx selectFkXxOne(String xxzjbh);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TbYwHcypglXx> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TbYwHcypglXx> entities);
/**
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
*
* @param entities List<TbYwHcypglXx> 实例对象列表
* @return 影响行数
*/
int insertOrUpdateBatch(@Param("entities") List<TbYwHcypglXx> entities);
/**
* 修改数据
*
* @param tbYwHcypglXx 实例对象
* @return 影响行数
*/
int update(TbYwHcypglXx tbYwHcypglXx);
int insertFj(TbYwHcypglFj tbYwHcypglFj);
/**
* 通过主键删除数据
*
* @param
* @return 影响行数
*/
int deleteById(TbYwHcypglXx tbYwHcypglXx);
int deleteCyglById(TbYwHcypglCygl tbYwHcypglCygl);
int updateCyglById(TbYwHcypglCygl tbYwHcypglCygl);
int insertCyglById(TbYwHcypglCygl tbYwHcypglCygl);
List<TbYwDzqqFjVo> selectFjInfo(@Param("fjlx") String fjlx, @Param("dzXxzjbh") String dzXxzjbh);
List<TbYwDzqqFjVo> selectFjById(@Param("xxzjbh") String xxzjbh);
void updateDzqqFjXxscPdbz(@Param("dzXxzjbh") String dzXxzjbh, @Param("fjlx") String fjlx, @Param("xxzjbh") String xxzjbh);
// 获取用户 个数
int getUserNewCount(SysNewUser sysNewUser)throws Exception;
// 获取用户 列表
List<SysNewUser> getUserNewList(SysNewUser sysNewUser)throws Exception;
int selectCyglListCount(SysNewUser sysNewUser)throws Exception;
List<SysNewUser> selectCyglList(SysNewUser sysNewUser)throws Exception;
String selectJsXxOne (String userId);
}
package org.springblade.founder.hcypgl.service;
import org.springblade.founder.hcypgl.entity.TbYwDzqqFjVo;
import org.springblade.founder.hcypgl.entity.TbYwHcypglCygl;
import org.springblade.founder.hcypgl.entity.TbYwHcypglFkxx;
import org.springblade.founder.hcypgl.entity.TbYwHcypglXx;
import org.springblade.modules.system.entity.SysNewUser;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 合成研判管理模块请求主表(TbYwHcypglXx)表服务接口
*
* @author liulianglang
* @since 2023-11-21 10:08:59
*/
public interface TbYwHcypglXxService {
/**
* 通过ID查询单条数据
*
* @param xxzjbh 主键
* @return 实例对象
*/
TbYwHcypglXx queryById(String xxzjbh);
/**
* 查询多条数据
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return 对象列表
*/
List<TbYwHcypglXx> queryAllByLimit(int offset, int limit);
List<TbYwHcypglXx> queryAll(TbYwHcypglXx tbYwHcypglXx);
int queryAllCount(TbYwHcypglXx TbYwHcypglXx);
/**
* 新增数据
*
* @param tbYwHcypglXx 实例对象
* @return 实例对象
*/
TbYwHcypglXx insert(TbYwHcypglXx tbYwHcypglXx,MultipartFile lajdsfile, MultipartFile qtfile);
/**
* 修改数据
*
* @param tbYwHcypglXx 实例对象
* @return 实例对象
*/
TbYwHcypglXx update(TbYwHcypglXx tbYwHcypglXx,MultipartFile lajdsfile, MultipartFile qtfile);
/**
* 通过主键删除数据
*
* @param xxzjbh 主键
* @return 是否成功
*/
boolean deleteById(String xxzjbh);
boolean deleteCyglById(String xxzjbh);
TbYwHcypglCygl updateCyglById(TbYwHcypglCygl tbYwHcypglCygl);
TbYwHcypglCygl insertCyglById(TbYwHcypglCygl tbYwHcypglCygl);
TbYwHcypglXx shXzqqXx(TbYwHcypglXx tbYwHcypglXx) throws Exception;
List<TbYwDzqqFjVo> queryImgInfo(String xxzjbh);
List<TbYwDzqqFjVo> encodeToString(List<TbYwDzqqFjVo> fjs);
// 获取用户 列表
List<SysNewUser> getUserNewList(SysNewUser sysNewUser)throws Exception;
// 获取用户 个数
int getUserNewCount(SysNewUser sysNewUser)throws Exception;
// 获取用户 列表
List<SysNewUser> selectCyglList(SysNewUser sysNewUser)throws Exception;
// 获取用户 个数
int selectCyglListCount(SysNewUser sysNewUser)throws Exception;
TbYwHcypglFkxx insertFkXx(TbYwHcypglFkxx tbYwHcypglFkxx, MultipartFile fkfile);
TbYwHcypglFkxx updateFkXx(TbYwHcypglFkxx tbYwHcypglFkxx, MultipartFile fkfile);
TbYwHcypglFkxx selectFkXxOne(String id);
String selectJsXxOne(String id);
}
package org.springblade.founder.shzy.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.Charsets;
import org.springblade.founder.gnsyrzlog.LogOper;
import org.springblade.founder.shzy.entity.KuaishouGjXx;
import org.springblade.founder.shzy.entity.KuaishouZcXx;
import org.springblade.founder.shzy.entity.SysYhczrz;
import org.springblade.founder.shzy.entity.TbShzysjDdxx;
import org.springblade.founder.shzy.service.KuaiShouService;
import org.springblade.founder.shzy.util.YhczRzUtil;
import org.springblade.founder.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping(value = "/ks")
public class KuaiShouController {
@Autowired
private KuaiShouService kuaiShouService;
@PostMapping("zcxxList")
@ApiOperation(value = "注册信息", notes = "注册信息")
@LogOper(czxxLbdm = "01", yymcJyqk = "快手注册信息查询", czxxJyqk = "快手注册信息查询列表")
public R zcxxList(KuaishouZcXx zc) {
try{
SysYhczrz sysYhczrz=new SysYhczrz();
sysYhczrz.setCzlx("查询");
sysYhczrz.setCzlxdm("04");
Map<String, Object> map = JSON.parseObject(JSON.toJSONString(zc));
sysYhczrz.setYymcdm("B0703");
sysYhczrz.setYymcJyqk("快手注册信息查询");
YhczRzUtil.doCzrz(sysYhczrz,map);
return R.ok().data(kuaiShouService.queryZcxxBySjh(zc));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@RequestMapping("/exportZcxxList")
@ResponseBody
public void exportZcxxList(KuaishouZcXx zc, HttpServletResponse response, HttpServletRequest request) throws IOException {
SysYhczrz sysYhczrz=new SysYhczrz();
sysYhczrz.setCzlx("导出");
sysYhczrz.setCzlxdm("06");
Map<String, Object> map = JSON.parseObject(JSON.toJSONString(zc));
sysYhczrz.setYymcdm("B070301");
sysYhczrz.setYymcJyqk("导出快手注册信息");
YhczRzUtil.doCzrz(sysYhczrz,map);
zc.setLimit(10000);
zc.setPage(1);
Map<String, Object> result = kuaiShouService.queryZcxxBySjh(zc);
List<KuaishouZcXx> dzqqXxList = (List<KuaishouZcXx>) result.get("rows");
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding(Charsets.UTF_8.name());
String fileName = URLEncoder.encode("注册信息", Charsets.UTF_8.name());
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), KuaishouZcXx.class).sheet("注册信息").doWrite(dzqqXxList);
}
@PostMapping("gjxxList")
@ApiOperation(value = "快手轨迹信息", notes = "快手轨迹信息")
@LogOper(czxxLbdm = "01", yymcJyqk = "快手轨迹信息查询", czxxJyqk = "快手轨迹信息查询列表")
public R gjxxList(KuaishouGjXx gjXx) {
try{
SysYhczrz sysYhczrz=new SysYhczrz();
sysYhczrz.setCzlx("查询");
sysYhczrz.setCzlxdm("04");
Map<String, Object> map = JSON.parseObject(JSON.toJSONString(gjXx));
sysYhczrz.setYymcdm("B070302");
sysYhczrz.setYymcJyqk("快手账号轨迹信息查询");
YhczRzUtil.doCzrz(sysYhczrz,map);
return R.ok().data(kuaiShouService.gjxxList(gjXx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@RequestMapping("/exportGjxxList")
@ResponseBody
public void exportGjxxList(KuaishouGjXx gjXx, HttpServletResponse response, HttpServletRequest request) throws IOException {
SysYhczrz sysYhczrz=new SysYhczrz();
sysYhczrz.setCzlx("导出");
sysYhczrz.setCzlxdm("06");
Map<String, Object> map = JSON.parseObject(JSON.toJSONString(gjXx));
sysYhczrz.setYymcdm("B070303");
sysYhczrz.setYymcJyqk("导出快手账号轨迹信息");
YhczRzUtil.doCzrz(sysYhczrz,map);
gjXx.setLimit(10000);
gjXx.setPage(1);
Map<String, Object> result = kuaiShouService.gjxxList(gjXx);
List<KuaishouGjXx> dzqqXxList = (List<KuaishouGjXx>) result.get("rows");
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding(Charsets.UTF_8.name());
String fileName = URLEncoder.encode("轨迹信息", Charsets.UTF_8.name());
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), KuaishouGjXx.class).sheet("轨迹信息").doWrite(dzqqXxList);
}
}
package org.springblade.founder.shzy.controller;
import io.swagger.annotations.ApiOperation;
import org.springblade.founder.shzy.entity.TbSfDrsj;
import org.springblade.founder.shzy.entity.TbShzysjDdxx;
import org.springblade.founder.shzy.service.MtxxService;
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;
@RestController
@RequestMapping(value = "/xhmt")
public class XhMtController {
@Autowired
private MtxxService mtxxService;
@PostMapping("mtQmdtjMclb")
@ApiOperation(value = "美团亲密度统计列表", notes = "美团亲密度统计列表")
public R mtQmdtjMclb(TbShzysjDdxx tbShzysjDdxx) {
try{
return R.ok().data(mtxxService.mtQmdtjMclb(tbShzysjDdxx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("mtdztjMclb")
@ApiOperation(value = "美团亲密度统计列表", notes = "美团亲密度统计列表")
public R mtdztjMclb(TbShzysjDdxx tbShzysjDdxx) {
try{
return R.ok().data(mtxxService.mtdztjMclb(tbShzysjDdxx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("wlQmdtjMclb")
@ApiOperation(value = "物流亲密度统计列表", notes = "物流亲密度统计列表")
public R wlQmdtjMclb(TbShzysjDdxx tbShzysjDdxx) {
try{
return R.ok().data(mtxxService.wlQmdtjMclb(tbShzysjDdxx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("wldztjMclb")
@ApiOperation(value = "物流dz统计列表", notes = "物流dz统计列表")
public R wldztjMclb(TbShzysjDdxx tbShzysjDdxx) {
try{
return R.ok().data(mtxxService.wldztjMclb(tbShzysjDdxx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
@PostMapping("queryWlxxBySjh")
@ApiOperation(value = "物流信息", notes = "物流信息")
public R queryWlxxBySjh(TbSfDrsj wlxx) {
try{
return R.ok().data(mtxxService.queryWlxxBySjhtest(wlxx));
}catch (Exception e){
e.printStackTrace();
return R.error(e.getMessage());
}
}
}
package org.springblade.founder.shzy.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CountNameVo {
/**
* 百分比
*/
private String bfb;
private String maxsj;
/**
* 总数
*/
private Long count;
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
public String getBfb() {
return bfb;
}
public void setBfb(String bfb) {
this.bfb = bfb;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
/**
* 名称
*/
private String name;
/**
* 代码
*/
private String code;
}
package org.springblade.founder.shzy.entity;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
@Data
@ExcelIgnoreUnannotated
@ColumnWidth(25)
public class KuaishouGjXx {
/**
* 信息主键编号
*/
private String xxzjbh;
/**
* 用户ID
*/
private String userId;
/**
* 活动时间
*/
@ExcelProperty(value = "活动时间")
private String activeTime;
/**
* 活动类型
*/
@ExcelProperty(value = "活动类型")
private String activeType;
/**
* 活动IP
*/
@ExcelProperty(value = "活动IP")
private String activeIp;
/**
* 端口号
*/
@ExcelProperty(value = "端口号")
private String activePort;
/**
* 活动地点
*/
@ExcelProperty(value = "活动地点")
private String activeLocation;
/**
* 活动经纬度
*/
@ExcelProperty(value = "活动经纬度")
private String longitudeLatitude;
private int page;
private int limit;
private String paramSjh;
}
package org.springblade.founder.shzy.entity;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@ExcelIgnoreUnannotated
@ColumnWidth(25)
public class KuaishouZcXx {
/**
* 信息主键编号
*/
private String xxzjbh;
/**
* 用户ID
*/
@ExcelProperty(value = "用户ID")
private String userId;
/**
* 快手号
*/
@ExcelProperty(value = "快手号")
private String kwaiNumber;
/**
* 用户名
*/
@ExcelProperty(value = "用户名")
private String userName;
/**
* 真实姓名
*/
@ExcelProperty(value = "真实姓名")
private String realName;
/**
* 身份证号
*/
@ExcelProperty(value = "身份证号")
private String identitycard;
/**
* OPENID
*/
@ExcelProperty(value = "OPENID")
private String openId;
/**
* 注册时间
*/
@ExcelProperty(value = "注册时间")
private String registrationTime;
/**
* 注册IP
*/
@ExcelProperty(value = "注册IP")
private String registrationIp;
/**
* 注册地
*/
@ExcelProperty(value = "注册地")
private String registrationLocation;
/**
* 注册方式
*/
@ExcelProperty(value = "注册方式")
private String registrationMethod;
/**
* 手机号码
*/
@ExcelProperty(value = "手机号码")
private String phoneNumber;
private int page;
private int limit;
private String paramSjh;
}
package org.springblade.founder.shzy.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@TableName("sys_yhczrz")
@ApiModel(value = "SysYhczrz", description = "用户操作日志对象")
@ColumnWidth(30)
public class SysYhczrz {
@ApiModelProperty(value = "日志流水号")
@TableField("rzlsh")
private String rzlsh;
@ApiModelProperty(value = "访问时间")
@TableField("fwsj")
private Date fwsj;
@ApiModelProperty(value = "应用名称")
@TableField("yymc_jyqk")
private String yymcJyqk;
@ApiModelProperty(value = "应用名称代码")
@TableField("yymcdm")
private String yymcdm;
@ApiModelProperty(value = "用户_姓名")
@TableField("yh_xm")
private String yhXm;
@ApiModelProperty(value = "用户_公民身份号码")
@TableField("yh_gmsfhm")
private String yhGmsfhm;
@ApiModelProperty(value = "用户IP")
@TableField("yh_ip")
private String yhIp;
@ApiModelProperty(value = "用户单位公安机关机构代码")
@TableField("yhdw_gajgjgdm")
private String yhdwGajgjgdm;
@ApiModelProperty(value = "用户单位名称")
@TableField("yhdw_gajgmc")
private String yhdwGajgmc;
@ApiModelProperty(value = "操作类型代码")
@TableField("czlxdm")
private String czlxdm;
@ApiModelProperty(value = "操作类型")
@TableField("czlx")
private String czlx;
@ApiModelProperty(value = "操作信息参数")
@TableField("czxx_param")
private String czxxParam;
@ApiModelProperty(value = "信息删除_判断标识")
@TableField("xxsc_pdbz")
private String xxscPdbz;
@ApiModelProperty(value = "信息登记单位_公安机关机构代码")
@TableField("xxdjdw_gajgjgdm")
private String xxdjdwGajgjgdm;
@ApiModelProperty(value = "信息登记单位_公安机关名称")
@TableField("xxdjdw_gajgmc")
private String xxdjdwGajgmc;
@ApiModelProperty(value = "信息登记人员_姓名")
@TableField("xxdjry_xm")
private String xxdjryXm;
@ApiModelProperty(value = "信息登记人员_公民身份号码")
@TableField("xxdjry_gmsfhm")
private String xxdjryGmsfhm;
@ApiModelProperty(value = "信息登记人员_联系电话")
@TableField("xxdjry_lxdh")
private String xxdjryLxdh;
@ApiModelProperty(value = "登记时间")
@TableField("djsj")
private Date djsj;
@ApiModelProperty(value = "信息操作单位_公安机关机构代码")
@TableField("xxczdw_gajgjgdm")
private String xxczdwGajgjgdm;
@ApiModelProperty(value = "信息操作单位_公安机关名称")
@TableField("xxczdw_gajgmc")
private String xxczdwGajgmc;
@ApiModelProperty(value = "信息操作人员_姓名")
@TableField("xxczry_xm")
private String xxczryXm;
@ApiModelProperty(value = "信息操作人员_公民身份号码")
@TableField("xxczry_gmsfhm")
private String xxczryGmsfhm;
@ApiModelProperty(value = "改写时间")
@TableField("gxsj")
private Date gxsj;
@ApiModelProperty(value = "信息来源描述")
@TableField("xxlyms")
private String xxlyms;
@ApiModelProperty(value = "比对原因")
@ExcelIgnore
@TableField(exist = false)
private String zpms;
@ApiModelProperty(value = "信息主键编号")
@ExcelIgnore
@TableField(exist = false)
private String xxzjbh;
@ApiModelProperty(value = "任务id")
@ExcelIgnore
@TableField(exist = false)
private String taskId;
}
package org.springblade.founder.shzy.entity;
import lombok.Data;
@Data
public class TbDbKdxx {
/**
* 自增主键
*/
private Integer id;
/**
* 运单号
*/
private String ydh;
/**
* 收货日期
*/
private String shrq;
/**
* 发货人
*/
private String fhr;
/**
* 发货人-手机号码
*/
private String fhrSjhm;
/**
* 发货人-电话号码
*/
private String fhrDhhm;
/**
* 发货人-地址
*/
private String fhrDz;
/**
* 商品名称
*/
private String spmc;
/**
* 数量
*/
private String sl;
/**
* 重量
*/
private String zl;
/**
* 体积
*/
private String tj;
/**
* 出发城市
*/
private String cfcs;
/**
* 到大城市
*/
private String ddcs;
/**
* 发货部门
*/
private String fhbm;
/**
* 收货人
*/
private String shr;
/**
* 收货人-手机号码
*/
private String shrSjhm;
/**
* 收货人-电话号码
*/
private String shrDhhm;
/**
* 收货人-地址
*/
private String shrDz;
}
package org.springblade.founder.shzy.entity;
import lombok.Data;
import java.util.Date;
//物流信息(顺丰)
@Data
public class TbSfDrsj {
private String paramSjh;
private String paramSjh2;
private String paramdz2;
private String id;
/**
* 运单号
*/
private String ydh;
/**
* 寄件时间
*/
private String jjsj;
private String jjsjStart;
private String jjsjEnd;
/**
* 寄件地址
*/
private String jjdz;
/**
* 寄件公司
*/
private String jjgs;
/**
* 寄件联系人
*/
private String jjlxr;
/**
* 寄件电话
*/
private String jjdh;
/**
* 寄件手机号
*/
private String jjsjh;
/**
* 收件地址
*/
private String sjdz;
/**
* 收件公司
*/
private String sjgs;
/**
* 收件联系人
*/
private String sjlxr;
/**
* 收件电话
*/
private String sjdh;
/**
* 收件手机号
*/
private String sjsjh;
/**
* 收件员
*/
private String sjy;
/**
* 原寄地
*/
private String yjd;
/**
* 目的地
*/
private String mdd;
/**
* 寄方客户编号
*/
private String jfkhbm;
/**
* 付款方式
*/
private String fkfs;
/**
*
*/
private String dshkje;
private String tjnr;
private String jfzl;
private String js;
private String yf;
private String pfkhbm;
private String pjy;
private Date lrsj;
private String filename;
private Date rksj;
private Integer qxbj;
private String yjdpd;
private String yjdpm;
private String yjdcd;
private String yjdcm;
private String mddpd;
private String mddpm;
private String mddcd;
private String mddcm;
private int page;
private int limit;
private String yuefrqparam; //月份日期时间
private String rqparam;
private String sfparam; //省份字段查询
private String dzcs;
private String sfbr;
private String qmcs;
private String xdsjStart;
private String xdsjEnd;
private String cxlx="1";
}
package org.springblade.founder.shzy.entity;
import lombok.Data;
import java.util.Date;
//美团信息
@Data
public class TbShzysjDdxx {
/**
* 自增主键
*/
private Integer id;
/**
* 订单ID
*/
private String ddid;
/**
* 收单手机号码
*/
private String xdsjhm;
/**
* 下单时间
*/
private Date xdsj;
private String xdsjStart;
private String xdsjEnd;
/**
* 商品名称
*/
private String spmc;
/**
* 订单行政区划名称
*/
private String ddXzqhmc;
/**
* 收货人
*/
private String shr;
/**
* 收货人手机号码
*/
private String sdrsjhm;
/**
* 收货地址
*/
private String shdz;
/**
* 事件类型
*/
private String sjlx;
/**
* 线索类型
*/
private String xslx;
/**
* 线索数据
*/
private String xssj;
/**
* 数据入库时间
*/
private Date rksj;
/**
* 导入文件名称
*/
private String wjmc;
/**
* 删除标志: 0:有效;1;删除
*/
private String scbz;
private int page;
private int limit;
private String paramSjh;
private String rqparam; //日期时间
private String yuefrqparam; //月份日期时间
private String dzcs;
private String sfbr; //1:是本人 ,2非本人
private String qmcs;
private String sjhone;
private String sjhtwo;
private String shdzone;
private String shdzsjh;
}
package org.springblade.founder.shzy.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.shzy.entity.KuaishouGjXx;
import org.springblade.founder.shzy.entity.KuaishouZcXx;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface KuaiShouMapper {
List<KuaishouZcXx> queryZcxxBySjh(KuaishouZcXx kuaishouZcXx);
int queryZcxxBySjhCount(KuaishouZcXx kuaishouZcXx);
List<KuaishouGjXx> queryGjxxBySjh(KuaishouGjXx kuaishouGjXx);
int queryGjxxBySjhCount(KuaishouGjXx kuaishouGjXx);
}
<?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.shzy.mapper.KuaiShouMapper">
<select id="queryZcxxBySjh" resultType="org.springblade.founder.shzy.entity.KuaishouZcXx">
select * from tb_yw_dzqq_kuaishou_info where
phone_number like concat(concat('%',#{paramSjh}),'%')
or user_name like concat(concat('%',#{paramSjh}),'%')
order by registration_time desc
limit #{page} ,#{limit}
</select>
<select id="queryZcxxBySjhCount" resultType="java.lang.Integer">
select count(*) from tb_yw_dzqq_kuaishou_info where
phone_number like concat(concat('%',#{paramSjh}),'%')
or user_name like concat(concat('%',#{paramSjh}),'%')
</select>
<select id="queryGjxxBySjh" resultType="org.springblade.founder.shzy.entity.KuaishouGjXx">
select * from tb_yw_dzqq_kuaishou_active_info where user_id=#{userId}
and SUBSTRING_INDEX(longitude_latitude,',',1)>=72 and SUBSTRING_INDEX(longitude_latitude,',',1) <![CDATA[<=]]> 136
and SUBSTRING_INDEX(longitude_latitude,',',-1)>=1 and SUBSTRING_INDEX(longitude_latitude,',',-1) <![CDATA[<=]]> 56
order by active_time desc
limit #{page} ,#{limit}
</select>
<select id="queryGjxxBySjhCount" resultType="java.lang.Integer">
select count(1) from tb_yw_dzqq_kuaishou_active_info where user_id=#{userId}
and SUBSTRING_INDEX(longitude_latitude,',',1)>=72 and SUBSTRING_INDEX(longitude_latitude,',',1) <![CDATA[<=]]> 136
and SUBSTRING_INDEX(longitude_latitude,',',-1)>=1 and SUBSTRING_INDEX(longitude_latitude,',',-1) <![CDATA[<=]]> 56
</select>
</mapper>
package org.springblade.founder.shzy.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.shzy.entity.CountNameVo;
import org.springblade.founder.shzy.entity.TbSfDrsj;
import org.springblade.founder.shzy.entity.TbShzysjDdxx;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface MtxxMapper {
List<TbShzysjDdxx> queryMtxxBySjh(TbShzysjDdxx tbShzysjDdxx);
int queryMtxxBySjhCount(TbShzysjDdxx tbShzysjDdxx);
List<TbShzysjDdxx> queryMtxxBySjhTj(TbShzysjDdxx tbShzysjDdxx);
List<TbShzysjDdxx> queryMtxxBySjhTj2(TbShzysjDdxx tbShzysjDdxx);
List<TbSfDrsj> queryWlxxBySjh(TbSfDrsj tbSfDrsj);
List<TbSfDrsj> queryWlxxBySjhtest(TbSfDrsj tbSfDrsj);
int queryWlxxBySjhCountTest(TbSfDrsj tbSfDrsj);
int queryWlxxBySjhCount(TbSfDrsj tbSfDrsj);
List<TbSfDrsj> queryWlxxBySjhTj(TbSfDrsj tbSfDrsj);
List<TbSfDrsj> queryWlxxBySjhTj2(TbSfDrsj tbSfDrsj);
//美团日期统计
List<CountNameVo> mtRqsjBySjh(TbShzysjDdxx tbShzysjDdxx);
//美团月份日期统计
List<CountNameVo> mtYuefRqsjBySjh(TbShzysjDdxx tbShzysjDdxx);
//美团本人下单统计
int mtBrxdCountBySjh(TbShzysjDdxx tbShzysjDdxx);
//美团收货地址统计
List<CountNameVo> mtShdztjBySjh(TbShzysjDdxx tbShzysjDdxx);
//美团亲密度统计
List<CountNameVo> mtQmdtjBySjh(TbShzysjDdxx tbShzysjDdxx);
//细化美团亲密度列表
List<CountNameVo> mtQmdtjMclb(TbShzysjDdxx tbShzysjDdxx);
List<CountNameVo> mtdztjMclb(TbShzysjDdxx tbShzysjDdxx);
//end
//细化物流亲密度列表
List<CountNameVo> wlQmdtjMclb(TbShzysjDdxx tbShzysjDdxx);
List<CountNameVo> wldztjMclb(TbShzysjDdxx tbShzysjDdxx);
//end
//物流日期统计
List<CountNameVo> wlRqsjBySjh(TbSfDrsj tbSfDrsj);
//物流月份日期统计
List<CountNameVo> wlYuefRqsjBySjh(TbSfDrsj tbSfDrsj);
//物流本人寄件统计
int wlBrjjBySjh(TbSfDrsj tbSfDrsj);
//物流地址统计
List<CountNameVo> wlShdztjBySjh(TbSfDrsj tbSfDrsj);
//物流省份统计
List<CountNameVo> wlSftjBySjh(TbSfDrsj tbSfDrsj);
//物流亲密度统计
List<CountNameVo> wlQmdtjBySjh(TbSfDrsj tbSfDrsj);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
package org.springblade.founder.shzy.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.shzy.entity.CountNameVo;
import org.springblade.founder.shzy.entity.TbDbKdxx;
import org.springblade.founder.shzy.entity.TbSfDrsj;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Mapper
public interface WlxxMapper {
//德邦
List<TbDbKdxx> queryWlxxBySjh(TbDbKdxx tbDbKdxx);
//德邦
List<TbSfDrsj> queryWlxxBySjh2(TbSfDrsj tbDbKdxx);
int queryWlxxBySjhCount(TbDbKdxx tbDbKdxx);
//物流日期统计
List<CountNameVo> wlRqsjBySjh(TbSfDrsj mtxx);
//物流月份日期统计
List<CountNameVo> wlYuefRqsjBySjh(TbSfDrsj mtxx);
//物流本人寄件统计
int wlBrjjBySjh(TbSfDrsj mtxx);
//物流地址统计
List<CountNameVo> wlShdztjBySjh(TbSfDrsj mtxx);
//物流省份统计
List<CountNameVo> wlSftjBySjh(TbSfDrsj mtxx);
//物流亲密度统计
List<CountNameVo> wlQmdtjBySjh(TbSfDrsj mtxx);
}
package org.springblade.founder.shzy.service;
import org.springblade.founder.shzy.entity.KuaishouGjXx;
import org.springblade.founder.shzy.entity.KuaishouZcXx;
import java.util.Map;
public interface KuaiShouService {
Map<String, Object> queryZcxxBySjh(KuaishouZcXx zc);
Map<String, Object> gjxxList(KuaishouGjXx zc);
}
package org.springblade.founder.shzy.service;
import org.springblade.founder.shzy.entity.TbSfDrsj;
import org.springblade.founder.shzy.entity.TbShzysjDdxx;
import java.util.List;
import java.util.Map;
public interface MtxxService {
Map<String, Object> queryMtxxBySjh(TbShzysjDdxx mtxx);
Map<String, Object> queryWlxxBySjh(TbSfDrsj mtxx);
Map<String, Object> queryWlxxBySjhtest(TbSfDrsj mtxx);
Map<String, Object> doAnalyseWlxxBySjh(TbSfDrsj mtxx);
Map<String, Object> mtRqsjBySjh(TbShzysjDdxx mtxx);
Map<String, Object> mtYuefRqsjBySjh(TbShzysjDdxx mtxx);
Map<String, Object> mtBrxdCountBySjh(TbShzysjDdxx mtxx);
Map<String, Object> mtShdztjBySjh(TbShzysjDdxx mtxx);
Map<String, Object> mtQmdtjBySjh(TbShzysjDdxx mtxx);
//细化
Map<String, Object> mtQmdtjMclb(TbShzysjDdxx mtxx);
Map<String, Object> mtdztjMclb(TbShzysjDdxx mtxx);
//细化物流
Map<String, Object> wlQmdtjMclb(TbShzysjDdxx mtxx);
Map<String, Object> wldztjMclb(TbShzysjDdxx mtxx);
Map<String, Object> queryXhMtxxBySjh(TbShzysjDdxx mtxx);
//end
Map<String, Object> mtDzListTjBySjh(TbShzysjDdxx mtxx);
Map<String, Object> mtQmdListTjBySjh(TbShzysjDdxx mtxx);
Map<String, Object> wlRqsjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlYuefRqsjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlBrjjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlShdztjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlSftjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlQmdtjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlDzListTjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlQmdListTjBySjh(TbSfDrsj mtxx);
Map<String, Object> wlSfListTjBySjh(TbSfDrsj mtxx);
}
package org.springblade.founder.shzy.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.springblade.founder.shzy.entity.KuaishouGjXx;
import org.springblade.founder.shzy.entity.KuaishouZcXx;
import org.springblade.founder.shzy.entity.TbSfDrsj;
import org.springblade.founder.shzy.mapper.KuaiShouMapper;
import org.springblade.founder.shzy.service.KuaiShouService;
import org.springblade.founder.utils.EasyUIPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
@DS("hunan_shzy")
public class KuaiShouServiceImpl implements KuaiShouService {
@Autowired
private KuaiShouMapper kuaiShouMapper;
@Override
public Map<String, Object> queryZcxxBySjh(KuaishouZcXx zc) {
Map<String, Object> rtMap = new HashMap<>();
List<KuaishouZcXx> listResult=new ArrayList<>();
long total=0;
rtMap.put("rows",new ArrayList<>());
rtMap.put("total",0);
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(zc.getPage());
easyUIPage.setPagePara(zc.getLimit());
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
zc.setPage(begin);
zc.setLimit(end);
listResult= kuaiShouMapper.queryZcxxBySjh(zc);
total= kuaiShouMapper.queryZcxxBySjhCount(zc);
rtMap.put("total",total);
rtMap.put("rows",listResult);
return rtMap;
}
@Override
public Map<String, Object> gjxxList(KuaishouGjXx gjXx) {
Map<String, Object> rtMap = new HashMap<>();
List<KuaishouGjXx> listResult=new ArrayList<>();
long total=0;
rtMap.put("rows",new ArrayList<>());
rtMap.put("total",0);
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(gjXx.getPage());
easyUIPage.setPagePara(gjXx.getLimit());
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
gjXx.setPage(begin);
gjXx.setLimit(end);
listResult= kuaiShouMapper.queryGjxxBySjh(gjXx);
total= kuaiShouMapper.queryGjxxBySjhCount(gjXx);
rtMap.put("total",total);
rtMap.put("rows",listResult);
return rtMap;
}
}
package org.springblade.founder.shzy.util;
import com.alibaba.fastjson.JSON;
import org.apache.http.HttpStatus;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.founder.shzy.entity.SysYhczrz;
import org.springblade.modules.system.entity.XzxtUser;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.net.InetAddress;
import java.util.*;
@Component
public class YhczRzUtil {
private static String url;
private static String authorization;
private static final HashMap<String, String> headers = new HashMap<>();
@Value("${yhczrz.url}")
private void setUrl(String url) {
YhczRzUtil.url = url;
}
@Value("${yhczrz.authorization}")
private void setAuthorization(String authorization) {
YhczRzUtil.authorization = authorization;
if (!headers.containsKey("founder.authorization")) {
headers.put("founder.authorization", YhczRzUtil.authorization);
}
}
public static void doCzrz(SysYhczrz sysYhczrz,Map<String, Object> map) {
try {
XzxtUser xzxtUser = SecureUtil.getUserXzxt();
if (xzxtUser != null) {
String dw = xzxtUser.getUnitcode().substring(0, 2);
if ("43".equals(dw)) {
} else {
return;
}
} else {
return;
}
Set<String> set = map.keySet();
Iterator<String> it = set.iterator();
while (it.hasNext()) {
String key = (String) it.next();
Object values = map.get(key);
if (values instanceof String) {
values = ((String) values).trim();
if (values.equals("")) {
values = null;
}
}
map.put(key, values);
}
sysYhczrz.setCzxxParam(JSON.toJSONString(map));
sysYhczrz.setYhIp(getIp());
sysYhczrz.setYhdwGajgjgdm(xzxtUser.getUnitcode());
sysYhczrz.setYhdwGajgmc(xzxtUser.getUnitname());
sysYhczrz.setYhGmsfhm(xzxtUser.getIdentitycard());
sysYhczrz.setYhXm(xzxtUser.getRealname());
sysYhczrz.setFwsj(new Date());
sysYhczrz.setXxdjdwGajgjgdm(xzxtUser.getUnitcode());
sysYhczrz.setXxdjdwGajgmc(xzxtUser.getUnitname());
sysYhczrz.setXxdjryXm(xzxtUser.getRealname());
sysYhczrz.setXxdjryGmsfhm(xzxtUser.getIdentitycard());
sysYhczrz.setXxdjryLxdh(xzxtUser.getPhone());
sysYhczrz.setXxczdwGajgjgdm(xzxtUser.getUnitcode());
sysYhczrz.setXxczdwGajgmc(xzxtUser.getUnitname());
sysYhczrz.setXxczryXm(xzxtUser.getRealname());
sysYhczrz.setXxczryGmsfhm(xzxtUser.getIdentitycard());
String param = JSON.toJSONString(sysYhczrz);
String resultToken = doPostJson(url, headers, param);
} catch (Exception e) {
e.printStackTrace();
}
}
public static String doPostJson(String url, Map<String, String> headers, String json) throws Exception {
// post请求返回结果
CloseableHttpClient httpClient = HttpClients.createDefault();
String jsonResult = null;
HttpPost httpPost = new HttpPost(url);
// 设置请求和传输超时时间
httpPost.setConfig(RequestConfig.custom().setSocketTimeout(4000).setConnectTimeout(4000).build());
if (headers != null) {
for (String key : headers.keySet()) {
httpPost.setHeader(key, headers.get(key));
}
}
try {
//设置参数解决中文乱码
if (null != json) {
StringEntity entity = new StringEntity(json, "utf-8");
entity.setContentEncoding("UTF-8");
entity.setContentType("application/json");
httpPost.setEntity(entity);
}
//发送请求
CloseableHttpResponse result = httpClient.execute(httpPost);
if (result.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
// 读取服务器返回的json数据(然后解析)
jsonResult = EntityUtils.toString(result.getEntity(), "utf-8");
} else {
throw new Exception();
}
} catch (Exception e) {
e.printStackTrace();
throw new Exception();
} finally {
httpPost.releaseConnection();
}
return jsonResult;
}
public static String getIp() throws Exception {
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String ip = request.getHeader("X-Forwarded-For");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
//有些网络通过多层代理,那么获取到的ip就会有多个,一般都是通过逗号(,)分割开来,并且第一个ip为客户端的真实IP
if (ip != null && ip.length() != 0) {
ip = ip.split(",")[0];
}
if ("127.0.0.1".equals(ip) || ip == "127.0.0.1" || "0:0:0:0:0:0:0:1".equals(ip)
|| ip == "0:0:0:0:0:0:0:1") {
ip = InetAddress.getLocalHost().getHostAddress();
}
return ip;
}
}
package org.springblade.founder.utils;
import org.springblade.founder.shzy.entity.CountNameVo;
import io.swagger.models.auth.In;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
......@@ -11,23 +12,14 @@ import java.util.stream.Collectors;
public class HMacUtil {
public static void main(String[] args) {
try {
String secret = HMACSHA256("app_id=XZ15000000&app_key=pSFRNTQQXDJKSjzL&xz_token=2d69c3e2da6e8ecc8e977603&timestamp=1591152151950", "zdejRKFNCUSSAIjbvijEdRFxjnzKAI");
System.out.println(secret);
List<CountNameVo> list = new ArrayList<>();
list.add(new CountNameVo("","",70L,"张三","" ));
list.add(new CountNameVo("","",70L,"张三","" ));
list.add(new CountNameVo("","",70L,"张三","" ));
list.add(new CountNameVo("","",70L,"张三","" ));
List<CountNameVo> studentList = new ArrayList<>();
list.parallelStream().collect(Collectors.groupingBy(o -> (o.getName() ), Collectors.toList())).forEach((id, transfer) -> {
transfer.stream().reduce((a, b) -> new CountNameVo("","",a.getCount() + b.getCount(),a.getName(),"" )).ifPresent(studentList::add);
});
for (CountNameVo student : studentList) {
System.out.println(student.toString());
String j="4";
String jj="10";
if(Integer.parseInt(j)>5){
System.out.println("21");
}
String secret = HMACSHA256("app_id=XZ15000000&app_key=pSFRNTQQXDJKSjzL&xz_token=2d69c3e2da6e8ecc8e977603&timestamp=1591152151950", "zdejRKFNCUSSAIjbvijEdRFxjnzKAI");
System.out.println(secret);
......
......@@ -21,14 +21,16 @@ public class SysNewUser extends BaseModel {
private String oldPassword;
private String newPassword;
private String newPassword1;
private String cyjs;
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
private String id;
private String cyxxzjbh;
@ApiModelProperty(value = "单位代码")
private String unitcode;
@ApiModelProperty(value = "用户姓名")
private String username;
@ApiModelProperty(value = "密码")
......
......@@ -17,16 +17,16 @@ spring:
# database: 0
# ssl: false
business:
host: 47.92.223.200
port: 7779
password: p!ssw0rd1
database: 2
host: 192.168.1.123
port: 6379
password:
database: 0
ssl: false
userredis:
host: 192.168.79.128
host: 192.168.1.123
port: 6379
password:
database: 2
database: 0
ssl: false
##redis 集群环境配置
#cluster:
......
......@@ -2,7 +2,7 @@
spring:
redis:
##redis 单机环境配置
host: 127.0.0.1
host: 192.168.1.123
port: 6379
password:
database: 0
......
......@@ -21,6 +21,7 @@ spring:
multipart:
max-file-size: 256MB
max-request-size: 1024MB
# location: /data/hnxz/tempFile
mvc:
throw-exception-if-no-handler-found: true
resources:
......
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