Commit c76f18ea by 宋珺琪

脑图审批接口(西藏)

parent 826a1b53
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class EasyUIPage implements Serializable {
private static final long serialVersionUID = 1L;
public EasyUIPage() {
}
private int page = 1;
private int begin;
private int end;
private int total = 0;
private String sort;
private String order;
private int rownum = 20;
private List<?> rows = new ArrayList();
private String flag;
private String pagePara;
private String state;
public String getFlag() {
return flag;
}
public void setFlag(String flag) {
this.flag = flag;
}
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public void setRows(List<?> rows) {
this.rows = rows;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getBegin() {
return begin;
}
public int getEnd() {
return end;
}
public List<?> getRows() {
return rows;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public String getOrder() {
return order;
}
public void setOrder(String order) {
this.order = order;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public void setPagePara(Integer rows) {
if (rows != null) {
this.begin = (this.page - 1) * rows;
this.end = this.page * rows;
} else {
this.begin = (this.page - 1) * rownum;
this.end = this.page * rownum;
}
}
public void setMysqlPagePara(Integer rows) {
if (rows != null) {
this.begin = (this.page - 1) * rows;
this.end = rows;
} else {
this.begin = (this.page - 1) * rownum;
this.end = rownum;
}
}
public int getRownum() {
return rownum;
}
public void setRownum(int rownum) {
this.rownum = rownum;
}
/**
* @return the pagePara
*/
public String getPagePara() {
return pagePara;
}
/**
* @param pagePara the pagePara to set
*/
public void setMysqlPagePara(String pagePara) {
this.pagePara = pagePara;
}
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import java.lang.annotation.*;
/**
* 自定义注解类 OperLog
* Created by LMD on 2019/3/22.
*/
@Target(ElementType.METHOD) //注解放置的目标位置,METHOD是可注解在方法级别上
@Retention(RetentionPolicy.RUNTIME) //注解在哪个阶段执行
@Documented //生成文档
public @interface OperLog {
/**
* @Description操作类型 为必填项,01:查询, 02:新建, 03:修改,04:删除, 05:登录 ,06:退出,07:文件下载
*/
String czxxLbdm();
/**
* @Description应用名称
*/
String yymcJyqk() default "";
/**
* @Description操作信息简要描述
*/
String czxxJyqk() default "";
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Data;
import java.util.Date;
@Data
public class OrderDetailxx {
private String asjbh;
private String orderCode; //申请单编号
private String orderTitle;
private int orderStatus; //申请单状态 0为暂存,1为在审,2为一级领导已审,3为二级领导/双签已审,4为撤回,5为一级领导驳回,6为二级领导/双签驳回
private String createUserPid;
private String xsSxz; //线索值
private String xsXslx; //线索类型
private Date xsKssj; //开始时间
private Date xsJssj; //结束时间
//查询使用
private String spLevel;
private String spdlx;
private String shCard;
private String spCard;
private String orderMethod;
private String orderStatusIsgq;
private Date createTime;
private String pzCode;
private String pzName;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Getter;
/**
* 流程节点
*/
@Getter
public enum OrderStatusEnum {
TEMPORARY_STURAGE(1,"暂存"),
UNDER_REVIEW(2,"在审"),
ONE_GRADE_AUDITED(3,"一级领导已审"),
TWO_GRADE_AUDITED(4,"二级领导已审"),
COUNTER_SIGN_AUDITED(5,"双签已审"),
RECELL(6,"撤回"),
ONE_GRADE_REJECT(7,"一级领导驳回"),
TWO_GRADE_REJECT(8,"二级领导驳回"),
COUNTER_SIGN_REJECT(9,"双签驳回");
private Integer code;
private String message;
OrderStatusEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Getter;
/**
* 返回结果枚举常量
*/
@Getter
public enum ResultEnum {
SUCCESS(0,"成功"),
YHCATE_PARAM_NOTNULL(1,"yhCate参数必传!"),
YHCATE_PARAM_ERROR(11,"yhCate参数错误!"),
OBJTYPE_PARAM_NOTNULL(2,"objType参数必传!"),
OBJTYPE_PARAM_ERROR(10,"objType参数错误!"),
OBJVALUE_PARAM_NOTNULL(3,"objValue参数必传!"),
PARAM_NOTNULL(13,"缺少必须的参数!"),
PARAM_ERROR(12,"参数错误!"),
IPHONE_PARAM_ERROE(4,"手机号码应为11位数!"),
IPHONE_PARAM_ERROR1(5,"手机号码不正确!"),
QQ_PARAM_ERROR(6,"QQ号码格式不正确"),
TIME_PARAM_NOTNULL(7,"起止时间必传!"),
TIME_PARAM_ERROR(8,"时间格式错误!"),
TIME_APRAM_ERROR2(9,"结束时间必须大于开始时间!"),
TASK_SEND_ERROR(22,"任务发送失败!"),
REQUEST_URL_ERROR(23,"请求远程地址错误!"),
REQUEST_TOKEN_ERROR(24,"Token值请求失败!"),
RESULT_ERROR(55,"发生了未知错误!"),
SECURITY_NONELOGIN(401,"未登录,未获取到Token"),
SECURITY_UNDEFINEDTOKEN(402,"登录超时,无效的Token"),
SECURITY_PERMISSIONDENIED(403,"权限不足"),
DB_QUERYIMSIS(502,"数据库查询IMSI出错!"),
DB_QUERYERROR(501,"数据库查询出错!"),
DB_UPDATEERROR(504,"数据库修改出错!"),
DB_SAVEERROR(503,"数据库保存出错!"),
WATHREASERVICERROR(505, "网安线程服务执行出错,断路器执行回退")
;
private Integer code;
private String message;
ResultEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Data;
/**
* 审批实体
*/
@Data
public class SptjcxVo {
private String unitcode; //单位代码
private String kssj; //开始时间
private String jssj;//结束时间
private String qxdj;//权限等级( ptyh:普通用户,cjgly;超级管理员,qxjgly;区县局管理员
private String username;//用户警号
private String createtime;
private String tjCount;
private String lbcx;//是否列表查询
private String orderStatus;
private String userUnitCode;
private int startNum; //开始行数
private int endNum; //结束行数
private int page;//当前第几页
private int limit;//每页多少行
private int begin; //开始行数
private int end; //结束行数
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Data;
/**
* 审批实体
*/
@Data
public class Spxx {
private String workFlowName; //流程节点名称 1审批通过、2审核驳回 下拉栏
private String remark; //审批备注 非必填
private String approveUserId;//审批人警号
private String orderNextPid; // 下一级审批人警号
private String orderCode;//申请单编号
private String orderStatus;//申请单状态 1为暂存,2为在审,3为一级领导已审,4为二级领导已审
// 5为双签已审,6为撤回,7为一级领导驳回,8为二级领导驳回, 9为双签驳回, 10为过期 11为违规操作
private String sqzt;//申请状态 1为在审,2为一级领导已审,3为二级领导已审 4为双签已审
private String createUserPid;//申请单创建人
private String sqfs;
private String spdlx;
private String pzId;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.founder.commonutils.util.CodeUtils;
import lombok.Data;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.util.Date;
/**
* (SysUser)表实体类
*
* @author jlt
* @since 2022-03-17 14:09:48
*/
@Data
@SuppressWarnings("serial")
@TableName("sys_user")
public class SysUser extends Model<SysUser> {
/**
* 用户帐号
*/
@TableField(exist = false)
private String name;
/**
* 序列号
*/
private String id;
/**
* 用户单位
*/
private String unitcode;
/**
* 用户帐号
*/
private String username;
/**
* 用户密码
*/
private String password;
/**
* 用户姓名
*/
private String trueName;
/**
* 激活标志(0是未激活、1是激活)
*/
private String openFlag;
private String defaultModel;
private String remark;
/**
* 录入人
*/
private String lrr;
/**
* 录入时间
*/
private Date lrsj;
/**
* 改写人
*/
private String gxr;
/**
* 改写时间
*/
private Date gxsj;
/**
* 录入单位代码
*/
private String lrdwdm;
/**
* 录入单位名称
*/
private String lrdwmc;
/**
* 用户身份证号
*/
private String identitycard;
/**
* 用户性别
*/
private String sex;
/**
* 用户出生日期
*/
private Date birthday;
/**
* 用户联系电话
*/
private String telephone;
/**
* 单位名称
*/
private String unitname;
/**
* 删除标志
*/
private BigDecimal scbz;
/**
* ip地址
*/
private String ip;
/**
* 用户级别
*/
private String grade;
/**
* 用户警号
*/
private String policemanid;
private Double defaultDesktop;
/**
* 个人主题图片
*/
private String theme;
private Date lastlogintime;
private Date lastchecktime;
/**
* 海南信息资源授权字符串
*/
private String xxzyurl;
/**
* 工作桌面指挥员模块要显示的模块id
*/
private String gzzmZhy;
/**
* 工作桌面研判员模块
*/
private String gzzmYpy;
/**
* 工作桌面侦查员模块
*/
private String gzzmZcy;
/**
* 用户角色
*/
private String gzzmPlay;
/**
* 管理员判断标志 00:否 01:是
*/
private String glybz;
/**
* 特权用户判断标志 00:否 01:是
*/
private String tqyhbz;
private String jgzPhotoZm;
private String jgzPhotoFm;
private String zbzxDwdm;
private Double grdf;
//请求支撑积分余额
@TableField(exist = false)
private String qqzcJfye;
//系统类型
@TableField(exist = false)
private String xtlx;
//单位代码(根据用户级别截取)
@TableField(exist = false)
private String countryCode;
public String getCountryCode() {
String unitcode = getUnitcode();
String grade = getGrade();
if (!StringUtils.isEmpty(unitcode) && !StringUtils.isEmpty(grade)) {
//根据用户等级截取单位
countryCode = CodeUtils.countryCode(unitcode, grade);
} else {
countryCode = null;
}
return countryCode;
}
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
/**
* 审批信息
*/
import lombok.Data;
@Data
public class TbSpxx {
private String ajbh;
private String sqdx;
private String sqly;
private String dwdm;
private String startuserid;
private String xsbh;
private String procdef;
private String auditor;
private String result;
private String nextuser;
private String usertask;
private String createdtime;
private String uptime;
private String ajmc;
private String startcjsj;
private String endcjsj;
private String xszt;
private int startNum;
private int endNum;
private String czrSfzh;
private int page;//当前第几页
private int limit;//每页多少行
private int begin; //开始行数
private int end; //结束行数
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Data;
@Data
/**
* 用户角色关联实体类
*/
public class TbStApproveUserRole {
//序列号(uuid)
private String id;
//用户ID
private String userId;
//角色ID
private String roleId;
//开始时间
private java.util.Date startTime;
//结束时间
private java.util.Date endTime;
//录入人
private String lrr;
//录入时间
private java.util.Date lrsj;
//更新人
private String gxr;
//更新时间
private java.util.Date gxsj;
//录入单位代码
private String lrdwdm;
//录入单位名称
private String lrdwmc;
//删除标志
private Double scbz;
//权限状态
private String roleState;
private String filename;
private byte[] imgFile;
private String imgStr;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Data;
/**
*@ClassName: TbstApproveAsjxx
*@Description
*@Author: 偷影子的人
*@Date: 2019/10/31 15:17
*@Version: 1.0
**/
@Data
public class TbstApproveAsjxx {
private String id;
private String asjmc;
private String orderCode; //申请单编号
private String ajlb;
private String filename;
private String mj;
private String createUserId;
private String jyaq;
private String createTime;
private byte[] imgFile;
private String imgStr;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*@ClassName: TbstApproveOrder
*@Description TODO: 申请单实体
*@Author: 偷影子的人
*@Date: 2019/10/31 15:17
*@Version: 1.0
**/
@Data
public class TbstApproveOrder {
private String id;
private String asjbh; //无用
private String asjmc; //无用
private String orderCode; //申请单编号
private String orderTitle;//申请单标题
private int orderStatus; //申请单状态 1为暂存,2为在审,3为一级领导已审,4为二级领导已审 5为双签已审 6为撤回,7为一级领导驳回,8为二级领导驳回 9为双签驳回
private int orderMethod; //申请单申请方式 1为二级审批,3为一级审批'
private int idDel; //是否删除 0为正常,1为已删除'
private String orderReason; //申请原由
private String orderMark; //备注
private String orderOnegradePid; //所领导警号 一级审核领导
private String orderTwogradePid; // 区县局领导警号 二级审批领导
private String orderCounterSignPid; //双签同事警号
private String orderDetails;//申请线索
private String czStatus;//操作状态 (save update)用于判断新增还是修改
private String orderly; //撤回理由
private String lrlb;//录入类别 //无用
private String spdlx;//申请单类型 JJSP紧急审批;PTSP普通审批
private String spLevel;//审批类型等级 01 关系拓展 02 轨迹拓展 03 时空碰撞 04 时空回溯 05 时空绘制 06 伴随分析 07 案发潜逃 08 首次出现 09 案前踩点 10 区域监控 11 人员聚集
private String pzCode; //卷宗编号
private String pzName; //卷宗名称
private String orderShldsm;//紧急审核领导沟通说明
private String orderSpldsm;//紧急审批领导沟通说明
private String spgtfs;//审批沟通方式 01 电话、02短信、03 QQ、04 微信 、05飞秋
private String shgtfs;//审核沟通方式 01 电话、02短信、03 QQ、04 微信 、05飞秋
private String shCard; //审核人员身份证
private String spCard; //审批人员身份证
private String gklx;//查询 cx;管控 gk
private String sdajmc; //手动案件名称 //无用
private String sdajlb; //手动案件类别 //无用
private String sqmj; //手动密级 //无用
private String sqjyaq;//手动简要案情 //无用
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String createUserPid;
private Date kssj;
private Date jssj;
private String timeStart;
private String timeEnd;
private int startNum; //开始行数
private int endNum; //结束行数
private int xsCount; //线索总数
private String createUserName;
private String orderCodes;
private int orderStatusIsgq;//是否过期状态(1是2否)
protected int page;//当前第几页
protected int limit;//每页多少行
private int begin; //开始行数
private int end; //结束行数
private int sqdztStatus;// 申请单状态
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
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;
/**
*@ClassName: TbstApprovePzxx
*@Description 卷宗表对应实体
**/
@Data
@TableName("sk_st_approve_pzxx")
@ApiModel(value = "卷宗信息表/措施信息表", description = "")
public class TbstApprovePzxx {
@ApiModelProperty(value = "主键")
@TableField("ID")
private String id; //P开头
@ApiModelProperty(value = "案事件名称")
@TableField("ASJMC")
private String asjmc;
@ApiModelProperty(value = "案事件编号")
@TableField("ASJBH")
private String asjbh;
@ApiModelProperty(value = "案件类别")
@TableField("AJLB")
private String ajlb; //刑事案件01 行政案件02 重点人员03 大数据建模05 其他04
@ApiModelProperty(value = "文件名")
@TableField("FILENAME")
private String filename;
@ApiModelProperty(value = "MJ")
@TableField("MJ")
private String mj;
@ApiModelProperty(value = "M登陆者用户名J")
@TableField("CREATE_USER_ID")
private String createUserId;
@ApiModelProperty(value = "简要案情")
@TableField("JYAQ")
private String jyaq;
@ApiModelProperty(value = "创建时间")
@TableField("CREATE_TIME")
private String createTime;
@ApiModelProperty(value = "图片")
@TableField("IMG_FILE")
private byte[] imgFile;
private String imgStr;
@ApiModelProperty(value = "案件录入")
@TableField("LRLB")
private String lrlb;//案件录入:AJLR;手动录入:SDLR
@ApiModelProperty(value = "卷宗名称")
@TableField("PZ_TITLE")
private String pzTitle;
@ApiModelProperty(value = "现勘编号")
@TableField("XKBH")
private String xkbh;
@ApiModelProperty(value = "接警编号")
@TableField("JJBH")
private String jjbh;
@ApiModelProperty(value = "有效期限")
@TableField("YXQX")
private String yxqx;//有效期限 01 一个月;02 三个月;03 六个月 04 一年
//分页使用
@TableField(exist = false)
private int rows;
@TableField(exist = false)
private int page;
@TableField(exist = false)
private int startNum;
@TableField(exist = false)
private int endNum;
@ApiModelProperty(value = "开始时间")
@TableField("KSSJ")
private String kssj;
@ApiModelProperty(value = "结束时间")
@TableField("JSSJ")
private String jssj;
@TableField(exist = false)
private String orderCount;
@TableField(exist = false)
private int limit;//每页多少行
@TableField(exist = false)
private int begin; //开始行数
@TableField(exist = false)
private int end; //结束行数
@ApiModelProperty(value = "文件")
@TableField("WORDFILE")
private byte[] wordFile;
@ApiModelProperty(value = "文件名")
@TableField("WORD_NAME")
private String wordName;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*@ClassName: TbstApproveWorkflow
*@Description TODO: 审批流程表
*@Author: 偷影子的人
*@Date: 2019/10/31 15:25
*@Version: 1.0
**/
@Data
public class TbstApproveWorkflow {
private String id;
private String orderCode; //申请单编号
private String workFlowName; //流程节点名称 提交单据、审批通过、审核通过(区县局领导)、审批驳回、审核驳回(区县局领导)、申请撤回'
private String handleUserPid;//操作人警号
private String handleUserName;//操作人名称
private String handleUserCid; //操作人身份证号
@JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone = "GMT+8")
private Date handleTime; //操作时间
private String handleContent; //操作内容
private String handleStatus; //操作状态 1、发起,2、通过、3、驳回、4、撤回'
private String assigneeUserPid; //受理人警号
private String assigneeUserName; //受理人姓名
private String assigneeUserCid; //受理人身份证号
private String assigneeAudit; //受理状态:0为未受理,1为已受理
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date timeStart;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date timeEnd;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
*@ClassName: TbstOrderDetail
*@Description TODO: 申请单详情(线索)
*@Author: 偷影子的人
*@Date: 2019/10/31 15:23
*@Version: 1.0
**/
@Data
public class TbstOrderDetail {
private String id;
private String asjbh; //无用
private String asjmc; //无用
private String orderCode; //申请单编号
private String orderTitle;
private String sqdlx;
private String xsSxz; //线索值
private String xsXslx; //线索类型
private Date xsKssj; //开始时间
private Date xsJssj; //结束时间
private String xsMark; //备注 1为暂存,2为在审,3为一级领导已审,4为二级领导已审 6为撤回,7为一级领导驳回,8为二级领导驳回 10为过期 11为违规操作
private String xsStatus; //状态:1,暂存,2,在审,3,在控4,停控,
private String xsStatusList;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String createUserPid; //创建人警号
private String xsKssjStr; //开始时间
private String xsJssjStr; //结束时间
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date timeStart;
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date timeEnd;
private int page;//当前第几页
private int limit;//每页多少行
private int begin; //开始行数
private int end; //结束行数
private String createUserName;
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import java.util.List;
public class User {
private String Id;
private String unitcode;
private String trueName;
private String identitycard;
private String sex;
private String birthday;
private String telephone;
private String unitname;
private String grade;
private String policemanid;
private String remark;
private List<String> dwList;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getUnitcode() {
return unitcode;
}
public String getId() {
return Id;
}
public void setId(String id) {
Id = id;
}
public void setUnitcode(String unitcode) {
this.unitcode = unitcode;
}
public String getTrueName() {
return trueName;
}
public void setTrueName(String trueName) {
this.trueName = trueName;
}
public String getIdentitycard() {
return identitycard;
}
public void setIdentitycard(String identitycard) {
this.identitycard = identitycard;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getUnitname() {
return unitname;
}
public void setUnitname(String unitname) {
this.unitname = unitname;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
public String getPolicemanid() {
return policemanid;
}
public void setPolicemanid(String policemanid) {
this.policemanid = policemanid;
}
public List<String> getDwList() {
return dwList;
}
public void setDwList(List<String> dwList) {
this.dwList = dwList;
}
}
package com.founder.commonutils.model.newPublicEntity.ApprovalEntity;
import lombok.Getter;
/**
* 流程节点
*/
@Getter
public enum WorkFlowEnum {
SUBMIT_DOCUMENT(1,"提交单据"),
SUCCESS(2,"审核通过"),
REJECT(3,"审核驳回"),
REQUEST_WITHDRAW(4,"申请撤回"),
EXCPTION(5,"违规操作"),
FREEZE_EXCPTION(6,"违规冻结"),
UNFREEZE_EXCPTION(7,"违规解冻"),
ONE_APPROVAL_PASSED(8,"一级审批通过,待二级审批"),
SQ_APPROVAL_PASSED(9,"双签审批通过,待领导审批");
private Integer code;
private String message;
WorkFlowEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
}
package com.founder.commonutils.model.newPublicEntity.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "全局自定义异常")
public class ApiException extends RuntimeException {
@ApiModelProperty(value = "状态码")
private Integer code;
@ApiModelProperty(value = "异常消息")
private String message;
@Override
public String toString() {
return "AsjxxzbException{" +
"message=" + this.getMessage() +
", code=" + code +
'}';
}
}
package com.founder.commonutils.model.newPublicEntity.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.HashMap;
import java.util.Map;
@Data
@ApiModel(value = "全局统一返回结果")
public class Result {
@ApiModelProperty(value = "是否成功")
private boolean success;
@ApiModelProperty(value = "返回码")
private Integer code;
@ApiModelProperty(value = "返回消息")
private String message;
@ApiModelProperty(value = "返回数据")
private Map<String, Object> data = new HashMap<String, Object>();
private Result(){}
public static Result ok(){
Result r = new Result();
r.setSuccess(true);
r.setCode(ResultCode.OK);
r.setMessage(ResultCode.OK_MSG);
return r;
}
public static Result error(){
Result r = new Result();
r.setSuccess(false);
r.setCode(ResultCode.ERROR);
r.setMessage(ResultCode.ERROR_MSG);
return r;
}
public static Result loginFail() {
Result r = new Result();
r.setSuccess(false);
r.setCode(ResultCode.LOGIN_OUT_TIME);
r.setMessage(ResultCode.LOGIN_OUT_TIME_MSG);
return r;
}
public Result message(String message){
this.setMessage(message);
return this;
}
public Result code(Integer code){
this.setCode(code);
return this;
}
public Result data(String key, Object value){
this.data.put(key, value);
return this;
}
public Result data(Map<String, Object> map){
this.setData(map);
return this;
}
public Result rows(Object object){
this.data("rows",object);
return this;
}
public Result total(Object object){
this.data("total",object);
return this;
}
}
package com.founder.commonutils.model.newPublicEntity.result;
public interface ResultCode {
/**
* 成功
*/
int OK = 200;
String OK_MSG = "成功";
/**
* 失败
*/
int ERROR = 201;
String ERROR_MSG = "失败";
String FAIL_MSG = "出错了";
/**
* 登陆超时
*/
int LOGIN_OUT_TIME = 202;
/**
* 登陆超时消息
*/
String LOGIN_OUT_TIME_MSG = "登陆超时";
/**
* 用户名或密码错误
*/
int LOGIN_OR_PASSWORD_ERROR = 203;
String LOGIN_OR_PASSWORD_ERROR_MSG = "用户名或密码错误";
/**
* 参数格式错误
*/
int PARAM_ERROR = 204;
String PARAM_ERROR_MSG = "参数格式错误";
/**
* IP地址错误
*/
Integer IP_ERROR = 205;
String IP_ERROR_MSG = "IP地址错误";
}
package com.founder.commonutils.util;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CodeUtils {
public static String countryCode(String unitCode, String grade) {
if (unitCode.startsWith("15") && unitCode.indexOf("S") == 6) {
//内蒙特殊单位森林公安局单位处理
if ("T".equals(grade) || "S".equals(grade)) {
unitCode = unitCode.substring(0, 2);
} else if ("D".equals(grade)) {
unitCode = unitCode.substring(0, 4);
} else if ("X".equals(grade)) {
unitCode = unitCode.substring(0, 8);
} else if ("K".equals(grade)) {
unitCode = unitCode.substring(0, 10);
}
} else {
if ("T".equals(grade) || "S".equals(grade)) {
unitCode = unitCode.substring(0, 2);
} else if ("D".equals(grade)) {
unitCode = unitCode.substring(0, 4);
} else if ("X".equals(grade)) {
unitCode = unitCode.substring(0, 6);
} else if ("K".equals(grade)) {
unitCode = unitCode.substring(0, 8);
}
}
return unitCode;
}
public static String getUuid(){
return UUID.randomUUID().toString().replace("-", "");
}
/**
*
* @Description: 生成唯一的主键 格式: 19位
*/
public static synchronized String getUUIDKey(String str) {
String uuid= System.currentTimeMillis()+ UUID.randomUUID().toString().replaceAll("-","").substring(0,6);
return str + uuid;
}
public static String substrDwdm(String dwdm){
if (dwdm.endsWith("0000000000")){
dwdm = dwdm.substring(0,2);
}else if(dwdm.endsWith("00000000")){
dwdm = dwdm.substring(0,4);
}else if(dwdm.endsWith("000000")){
dwdm = dwdm.substring(0,6);
}else if(dwdm.endsWith("0000")){
dwdm = dwdm.substring(0,8);
}else if(dwdm.endsWith("00")){
dwdm = dwdm.substring(0,10);
}
return dwdm;
}
/**
* 截取案件类别代码
* @param lbdm
* @return
*/
public static String substrAjldDm(String lbdm){
if (lbdm.endsWith("000000")){
lbdm = lbdm.substring(0,2);
}else if(lbdm.endsWith("0000")){
lbdm = lbdm.substring(0,4);
}else if(lbdm.endsWith("00")){
lbdm = lbdm.substring(0,6);
}
return lbdm;
}
/**
* 截取行政区划代码
* @param xzqhDm
* @return
*/
public static String substrXzqhdm(String xzqhDm) {
if(xzqhDm.endsWith("0000")){
return xzqhDm.substring(0,2);
}else if(xzqhDm.endsWith("00")){
return xzqhDm.substring(0,4);
}
return xzqhDm;
}
/**
* 代码映射字典值sql
*
* @param groupid, colunm
* @return
*/
private static Pattern linePattern = Pattern.compile("_(\\w)");
public static String getSqlStr(String groupid, String colunm) {
//下划线转驼峰,需在实体类加字段:aBbCccStr
colunm = colunm.toLowerCase();
Matcher matcher = linePattern.matcher(colunm);
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
}
matcher.appendTail(sb);
return "(select name from sys_dictitem s where s.groupid = '" + groupid + "' and code = " + colunm + ") AS " + sb.toString() + "Str";
}
}
package com.founder.commonutils.util;
import io.swagger.annotations.Api;
import java.util.HashMap;
import java.util.Map;
/**
* @author jing
* @date 2021/12/10 -- 17:43
*/
@Api(value = "获取分类单位工具类", tags = "获取分类单位工具类")
public class HqXjDwCommon {
public static Map<String, String> getMapDwLevCode(String dwUnitCode, String userGrade) {
Map<String, String> map = new HashMap<>();
String firstlev = "";
String lev="";
String codeLevCol="";
String dscodeLevCol="";
String unitcode=dwUnitCode;
if ("1".equals(userGrade)) {
firstlev = "1";
lev = "2";
codeLevCol = "CODE_LEV1";
dscodeLevCol = "CODE_LEV2";
}else if ("2".equals(userGrade)) {
firstlev = "2";
lev = "3";
codeLevCol = "CODE_LEV2";
dscodeLevCol = "CODE_LEV3";
} else if ("3".equals(userGrade)) {
firstlev = "3";
lev = "4";
codeLevCol = "CODE_LEV3";
dscodeLevCol = "CODE_LEV4";
} else if ("4".equals(userGrade)) {
firstlev = "4";
lev = "5";
codeLevCol = "CODE_LEV4";
dscodeLevCol = "CODE_LEV5";
}
//userGarde传入数字,是根据单位查询出其所在lev,传入unitcode时应该查哪一级别
map.put("firstlev",firstlev);
map.put("lev",lev);
map.put("codeLevCol",codeLevCol);
map.put("dscodeLevCol",dscodeLevCol);
map.put("unitcode",unitcode);
return map;
}
}
package com.founder.commonutils.util;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
public class KeyUtilNaotu {
/**
*
* @Description: 生成唯一的主键 格式: 19位
* @Param:
* @return: java.lang.String
* @Author: cao peng
* @date: 2018/8/12 0012-23:14
*/
public static synchronized String getUUIDKey(String str) {
String uuid= System.currentTimeMillis()+ UUID.randomUUID().toString().replaceAll("-","").substring(0,6);
return str + uuid;
}
/**
* 生成申请表编号 19位
* @return
*/
public static synchronized String getSpKey() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date date = new Date();
String dateNowStr = sdf.format(date);
int num = UUID.randomUUID().toString().replaceAll("-","").hashCode();
num = num < 0 ? -num:num;
return "CQXZ"+dateNowStr+ String.valueOf(num).substring(0,7);
}
/**
*
* @Description: 生成唯一的主键 格式: 19位
* @Param:
* @return: java.lang.String
* @Author: cao peng
* @date: 2018/8/12 0012-23:14
*/
public static synchronized String getJzKey(String str) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date date = new Date();
String dateNowStr = sdf.format(date);
int num = UUID.randomUUID().toString().replaceAll("-","").hashCode();
num = num < 0 ? -num:num;
String asd = str+dateNowStr+ String.valueOf(num).substring(0,9);
return asd;
}
public static void main(String[] args) {
String str ="JZ";
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
Date date = new Date();
String dateNowStr = sdf.format(date);
int num = UUID.randomUUID().toString().replaceAll("-","").hashCode();
num = num < 0 ? -num:num;
System.out.println("dateNowStr============"+dateNowStr);
System.out.println("num============"+num);
String substring = String.valueOf(num).substring(0, 10);
System.out.println("substring==========="+substring);
System.out.println(str+dateNowStr+substring);
String asd = str+dateNowStr+ String.valueOf(num).substring(0,9);
System.out.println(asd);
}
}
package com.founder.publicapi.controller.ApprovalService;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ApprovalTbStAsj;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.OperLog;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ResultEnum;
import com.founder.publicapi.service.OrderDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* @author
* @version 1.0
* @Description 提供案件信息查询接口
* @Company: Founder
* @E-mail:wu_shanyu@founder.com.cn
* @careate 2019/7/2 20:49
*/
@Api(tags = "通过案事件编号或接警编号查询案事件信息")
@Controller
@CrossOrigin //跨域访问
@RequestMapping("/asjInter")
public class AsjxxSelectController {
@Autowired
private OrderDetailService orderDetailService;
/**
* 通过案事件编号或接警编号查询案事件信息
* @param queryBh
* @return
*/
@GetMapping(value = "/queryAsjxx")
@ResponseBody
@ApiOperation(value = "审批_通过案事件编号或接警编号查询案事件信息")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "通过案事件编号或接警编号查询案事件信息")
public JSONObject queryAsjxx( String queryBh){
JSONObject jsonObject = new JSONObject();
ApprovalTbStAsj asj =null;
try {
asj = orderDetailService.queryAsjxx(queryBh);
} catch (Exception e){
e.printStackTrace();
jsonObject.put("asjxx",asj);
jsonObject.put("code", ResultEnum.SUCCESS.getCode());
jsonObject.put("msg", ResultEnum.SUCCESS.getMessage());
return jsonObject;
}
jsonObject.put("asjxx",asj);
jsonObject.put("code", ResultEnum.SUCCESS.getCode());
jsonObject.put("msg", ResultEnum.SUCCESS.getMessage());
return jsonObject;
}
}
package com.founder.publicapi.controller.ApprovalService;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.EasyUIPage;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.OperLog;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveOrder;
import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import com.founder.publicapi.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*@ClassName: ApprovalOrder
*@Description TODO: 申请单查询
*@Author: 偷影子的人
*@Date: 2019/11/1 10:00
*@Version: 1.0
**/
@RestController
@CrossOrigin //跨域访问
@Api(tags = "申请单操作")
public class OrderController {
@Autowired
private OrderService orderService;
/**
* 查询该人名下是否有紧急审批单超过24小时未全部审批通过的普通审批
* @param tbstApproveOrder 查询人警号
* @return 返回值
*/
// @RequestMapping(value = "/querOrderTimeOut24H",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/querOrderTimeOut24H")
@ApiOperation(value = "审批_查询超时未审批")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "查询超时未审批")
public boolean querOrderTimeOut24H(@RequestBody TbstApproveOrder tbstApproveOrder){
boolean bol = false;
try{
tbstApproveOrder.setSpdlx("JJSP");
bol = orderService.querOrderTimeOut24H(tbstApproveOrder);
}catch (Exception e){
e.printStackTrace();
}
return bol;
}
/**
* 分页查询申请单List
* @param approveOrder 参数对象
* @param page 页码
* @param rows 页数
* @return
*/
// @RequestMapping(value = "/queryOrderList",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/queryOrderList")
@ResponseBody
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批_申请单列表查询")
@ApiOperation(value = "审批_申请单列表查询")
public Map<String,Object> queryOrderList(TbstApproveOrder approveOrder,
@RequestParam(value = "page",defaultValue = "0") int page,
@RequestParam(value = "rows",defaultValue = "0") int rows){
Map<String,Object> objectMap = null;
try{
int begin = (page - 1) * rows;
approveOrder.setBegin(begin);
approveOrder.setLimit(rows);
objectMap = orderService.queryOrderList(approveOrder);
}catch (Exception e){
e.printStackTrace();
//报错返回空对象
objectMap = new HashMap<>();
List<TbstApproveOrder> orders = new ArrayList<TbstApproveOrder>();
objectMap.put("data",orders);
objectMap.put("count",0);
objectMap.put("status",200);
objectMap.put("msg","success");
}
return objectMap;
}
/**
* 申请单(线索)详情
* @param tbstApproveOrder
* @return
*/
// @RequestMapping(value = "/querySqdDteail",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/querySqdDteail")
@ResponseBody
@ApiOperation(value = "审批_获取申请单详情")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "获取申请单详情")
public Map<String,Object> querySqdDteail(@RequestBody TbstApproveOrder tbstApproveOrder){
Map<String,Object> objectMap = new HashMap<>();
try{
objectMap = orderService.getSqdDteail(tbstApproveOrder);
}catch (Exception e){
e.printStackTrace();
}
return objectMap;
}
/**
* 申请撤回
*/
// @RequestMapping(value = "/chsqd",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/chsqd")
@ResponseBody
@OperLog(czxxLbdm = "03" , yymcJyqk = "0206",czxxJyqk = "申请单撤回")
@ApiOperation(value = "审批_申请单撤回")
public Map<String,Object> chsqd(@RequestBody TbstApproveOrder tbstApproveOrder){
Map<String,Object> resultMap = new HashMap<String,Object>();
try{
resultMap = orderService.getSqch(tbstApproveOrder);
}catch (Exception e){
e.printStackTrace();
}
return resultMap;
}
/**
* 待我审批的申请单
*/
@PostMapping("/allWaitApproveOrders")
@ResponseBody
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "待我审批的申请单列表查询")
@ApiOperation(value = "审批_待我审批的申请单")
public MapRestResult allWaitApproveOrders(Integer page, Integer rows, TbstApproveOrder tbstApproveOrder){
// page.setMysqlPagePara(rows);
Map<String, Object> stringObjectMap = orderService.queryMyApproveOrderList(page, rows, tbstApproveOrder);
return new MapRestResult(200,"ok",stringObjectMap.get("total"),stringObjectMap.get("allList"));
}
/**
* 我审批完毕的申请单
*/
@PostMapping("/allHasApproveOrders")
@ResponseBody
@ApiOperation(value = "审批_审批完毕的申请单列表查询")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批完毕的申请单列表查询")
public MapRestResult allHasApproveOrders(EasyUIPage page, Integer rows, TbstApproveOrder tbstApproveOrder){
page.setMysqlPagePara(rows);
page=orderService.queryMyOrderApprovedList(page,tbstApproveOrder);
return new MapRestResult(200,"ok",page.getTotal(),page.getRows());
}
@PostMapping("/delSqd")
@OperLog(czxxLbdm = "04" , yymcJyqk = "0206",czxxJyqk = "申请单删除")
@ApiOperation(value = "审批_申请单删除")
@ResponseBody
public Map<String,Object> delSqd( String sqdbh){
Map<String,Object> result = new HashMap<>();
boolean r = orderService.deleteOrderBySqdbh(sqdbh);
if(r){
result.put("state","success");
}else{
result.put("state","fail");
}
return result;
}
/**
* 跳转到审批页面
* @param orderCode 申请单编号
* @return
*/
@PostMapping("/toSpPage")
@ApiOperation(value = "审批_审批页面跳转")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批页面跳转")
public Map<String,Object> toSpPage(String orderCode, String dlyhJh){
Map<String,Object> mapResult = new HashMap<>();
Map<String,Object> objectMap = new HashMap<>();
try{
TbstApproveOrder tbstApproveOrder = new TbstApproveOrder();
tbstApproveOrder.setOrderCode(orderCode);
objectMap = orderService.getSqdDteail(tbstApproveOrder);
}catch (Exception e){
e.printStackTrace();
}
Object data = objectMap.get("data");
ArrayList<Object> re = new ArrayList<>();
HashMap<Object, Object> map = new HashMap<>();
map.put("dlyhJh", dlyhJh);
map.put("objectMap", data);
re.add(map);
mapResult.put("data",re);
mapResult.put("msg","success");
mapResult.put("status",200);
mapResult.put("count","");
return mapResult;
}
@ApiOperation(value = "审批_申请单数量查询")
@PostMapping("/queryDwspPlclTotal")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "申请单数量查询")
public JSONObject queryDwspPlclTotal(String cxrJh){
JSONObject jsonObject = new JSONObject();
Integer total = orderService.queryDwspPlspOrderListTotal(cxrJh);
jsonObject.put("total", total);
return jsonObject;
}
}
package com.founder.publicapi.controller.ApprovalService;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.OperLog;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstOrderDetail;
import com.founder.publicapi.service.OrderDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*@ClassName: ApprovalOrderDetail
*@Description TODO:申请单详情controller
*@Author: 偷影子的人
*@Date: 2019/11/1 10:02
*@Version: 1.0
**/
@Api(tags = "订单详情")
@RestController
@CrossOrigin //跨域访问
public class OrderDetailController {
@Autowired
private OrderDetailService orderDetailService;
/**
* 分页查询申请单List
* @param orderDetail 参数对象
* @param page 页码
* @param rows 页数
* @return
*/
// @RequestMapping(value = "/queryOrderDetailList",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/queryOrderDetailList")
@ResponseBody
@ApiOperation(value = "审批_分页查询申请单List")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "分页查询申请单List")
public Map<String,Object> queryOrderDetailList(TbstOrderDetail orderDetail,
@RequestParam(value = "page",defaultValue = "0") int page,
@RequestParam(value = "rows",defaultValue = "0") int rows){
Map<String,Object> objectMap = null;
try{
int begin = (page-1)*rows;
orderDetail.setBegin(begin);
orderDetail.setLimit(rows);
objectMap = orderDetailService.queryOrderDetailList(orderDetail);
}catch (Exception e){
e.printStackTrace();
//报错返回空对象
objectMap = new HashMap<>();
List<TbstOrderDetail> orderDetails = new ArrayList<TbstOrderDetail>();
objectMap.put("data",orderDetails);
objectMap.put("count",0);
objectMap.put("msg","success");
objectMap.put("status",200);
}
return objectMap;
}
/**
* 获取线索(申请单)个数
* @param orderDetail
* @return
*/
// @RequestMapping(value = "/getXsCount",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/getXsCount")
@ResponseBody
@ApiOperation(value = "审批_获取线索(申请单)个数")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "获取线索(申请单)个数")
public Integer getXsCount(@RequestBody TbstOrderDetail orderDetail){
Integer xsCount = 0;
try{
xsCount = orderDetailService.getXsCount(orderDetail);
}catch (Exception e){
e.printStackTrace();
}
return xsCount;
}
//删除线索
@PostMapping("/deteteXs")
@ResponseBody
@ApiOperation(value = "审批_删除线索")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "删除线索")
public Map<String,Object> deteteXs( String orderCode){
Map<String,Object> result = new HashMap<>();
boolean r = orderDetailService.deleteXs(orderCode);
if(r){
result.put("state","success");
}else{
result.put("state","fail");
}
return result;
}
//删除线索(根据信息主键编号)
@PostMapping("/deleteXsById")
@ResponseBody
@ApiOperation(value = "审批_删除线索(根据信息主键编号)")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "删除线索(根据信息主键编号)")
public Map<String,Object> deleteXsById( String xxzjbh){
Map<String,Object> result = new HashMap<>();
TbstOrderDetail orderDetail = new TbstOrderDetail();
orderDetail.setId(xxzjbh);
boolean r = orderDetailService.deleteXsById(orderDetail);
if(r){
result.put("state","success");
}else{
result.put("state","fail");
}
return result;
}
/**
* 通过审批对象查询,返回与该对象关联的案事件信息及该案件下绑定的所有线索信息
* @param xsbh
* @return
*/
// @RequestMapping(value = "/getSpxx", method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/getSpxx")
@ResponseBody
@ApiOperation(value = "审批_审批信息查询")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批信息查询")
public String getSpxx( String xsbh) throws Exception {
String result = "";
//Map{ajmc,xszList}
TbstOrderDetail orderDetail = new TbstOrderDetail();
orderDetail.setXsSxz(xsbh);
Map<String,List<String>> asjMap = orderDetailService.getAjxsxx(orderDetail);
if(asjMap != null && asjMap.size() > 0){
result = asjMap.toString();
return result;
} else {
return "null";
}
}
//todo 不用了
/**
* 通过审批对象查询,返回与该对象关联的申请单信息及该申请单下绑定的所有线索信息
* @param xsbh
* @return
*/
// @RequestMapping(value = "/getSqdXsxx", method = {RequestMethod.GET, RequestMethod.POST}, produces = {"application/json;charset=UTF-8"})
@PostMapping(value = "/getSqdXsxx")
@ResponseBody
@ApiOperation(value = "审批_审批对象查询")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批对象查询")
public JSONArray getSqdXsxx(String xsbh, String yhjh, String type) throws Exception {
TbstOrderDetail orderDetail = new TbstOrderDetail();
orderDetail.setXsSxz(xsbh);
orderDetail.setCreateUserPid(yhjh);
orderDetail.setXsXslx(type);
JSONArray result = orderDetailService.getSqdXsxx(orderDetail);
return result;
}
/**
* 查询当前人员是否有发送时空任务的权限 当前版本审批该接口无用
* @param yhjh
* @return
*/
// @RequestMapping(value = "/getFsrwqx", method = {RequestMethod.GET, RequestMethod.POST}, produces = {"application/json;charset=UTF-8"})
@PostMapping(value = "/getFsrwqx")
@ResponseBody
@ApiOperation(value = "审批_查询当前人员是否有发送时空任务的权限")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "查询当前人员是否有发送时空任务的权限")
public JSONObject getFsrwqx(String yhjh, String queryType, String xsz) throws Exception {
JSONObject result = orderDetailService.getFsrwqx(yhjh,queryType,xsz);
return result;
}
}
package com.founder.publicapi.controller.ApprovalService;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.*;
import com.founder.publicapi.service.OrderDetailService;
import com.founder.publicapi.service.OrderService;
import com.founder.publicapi.service.SpxxService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Api(tags = "审批信息")
@Controller
@CrossOrigin //跨域访问
public class SpxxController {
@Autowired
private SpxxService spxxService;
@Autowired
private OrderService orderService;
@Autowired
private OrderDetailService orderDetailService;
@PostMapping(value="/toEditSqd")
@ResponseBody
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "申请单编辑页面跳转")
@ApiOperation(value = "审批_申请单编辑页面跳转")
public Map<String,Object> toEditSqd(String sqdbh, String zjhm, String cxrXm, String cxrJh) {
Map<String,Object> mapResult = new HashMap<>();
String htmllj = "";
//查询申请单信息
TbstApproveOrder tbstApproveOrder = orderService.queryOrderByOrderCode(sqdbh);
/*if("PTSP".equals(tbstApproveOrder.getSpdlx())){//普通审批
htmllj = "xssp/asjspEdit";
}else if("JJSP".equals(tbstApproveOrder.getSpdlx())){//紧急审批
htmllj = "xssp/jjspEdit";
}
ModelAndView modelAndView = new ModelAndView(htmllj);*/
//查询线索信息
List<TbstOrderDetail> details = orderDetailService.queryOrderDetailListByOrderCode(sqdbh);
ArrayList<Object> re = new ArrayList<>();
HashMap<Object, Object> map = new HashMap<>();
map.put("zjhm",zjhm);
map.put("cxrXm",cxrXm);
map.put("cxrJh",cxrJh);
map.put("splx",tbstApproveOrder.getSpdlx());
map.put("type",tbstApproveOrder.getGklx());
map.put("approveOrder",tbstApproveOrder);
map.put("details",details);
re.add(map);
mapResult.put("data",re);
mapResult.put("status",200);
mapResult.put("msg","success");
mapResult.put("count","");
return mapResult;
}
// @RequestMapping(value = "/queryXsspList",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/queryXsspList")
@ResponseBody
@ApiOperation(value = "审批_申请单审批列表查询")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "申请单审批列表查询")
public Map<String,Object> queryXsspList(TbSpxx tbSpxx,
@RequestParam(value = "page",defaultValue = "0") int page,
@RequestParam(value = "rows",defaultValue = "0") int rows){
Map<String,Object> objectMap = new HashMap<>();
try{
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(page);
easyUIPage.setMysqlPagePara(rows);
int begin = easyUIPage.getBegin();
int end = easyUIPage.getEnd();
tbSpxx.setBegin(begin);
tbSpxx.setEnd(end);
tbSpxx.setLimit(rows);
// tbSpxx.setStartNum(begin);
// tbSpxx.setEndNum(end);
objectMap = spxxService.queryXsspList(tbSpxx);
}catch (Exception e){
e.printStackTrace();
}
return objectMap;
}
@PostMapping("/getAllFzdblSpxx")
@ResponseBody
@ApiOperation(value = "审批_获取所有的Fzdbl和Spxx")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "申请单审批列表查询")
public Map<String,Object> getAllFzdblSpxx(String zjhm,String cxrJh){
Map<String,Object> result = new HashMap<>();
try {
User param = new User();
param.setIdentitycard(zjhm);
param.setPolicemanid(cxrJh);
List<TbSpxx> spxxList = spxxService.getAllFzdblSpxx(param);
result.put("spxxCount",spxxList.size());
if(!spxxList.isEmpty()){
result.put("allSpxx",spxxList);
}
result.put("state","success");
} catch (Exception e) {
e.printStackTrace();
result.put("state","error");
result.put("allSpxx",new ArrayList<>());
result.put("spxxCount",0);
}
return result;
}
/**
* 申请单增加
* @return
*/
@PostMapping("/saveOrUpdateSpxx")
@ResponseBody
@OperLog(czxxLbdm = "03" , yymcJyqk = "0206",czxxJyqk = "审批_点击提交申请调用")
@ApiOperation(value = "审批_点击提交申请调用")
public JSONObject saveOrUpdateSpxx(@RequestBody TbstApproveOrder tbstApproveOrder){
JSONObject result = new JSONObject();
boolean flag = false;
try {
//判断是新增还是修改
if("save".equals(tbstApproveOrder.getCzStatus())){
result = orderService.saveSpxx(tbstApproveOrder);
}else if("update".equals(tbstApproveOrder.getCzStatus())){
result = orderService.updateSpxx(tbstApproveOrder);
}
} catch (Exception e) {
e.printStackTrace();
result.put("status",201);
result.put("msg","异常");
result.put("data","");
}
return result;
}
@PostMapping("/updateXsStatus")
@ResponseBody
@ApiOperation(value = "审批_申请单状态修改")
@OperLog(czxxLbdm = "03" , yymcJyqk = "0206",czxxJyqk = "申请单状态修改")
public JSONObject updateXsStatus(String orderCode){
JSONObject result = new JSONObject();
try {
boolean flag = orderService.updateXsStatus(orderCode);
result.put("state",flag);
} catch (Exception e) {
e.printStackTrace();
result.put("state","error");
}
return result;
}
/**
* 审批操作
* @return
*/
@PostMapping("/toSpsqlistxx")
@ResponseBody
@Transactional(rollbackFor = Exception.class)
@ApiOperation(value = "审批_申请单审批")
@OperLog(czxxLbdm = "03" , yymcJyqk = "0206",czxxJyqk = "申请单审批")
public JSONObject toSpsqlistxx(@RequestBody List<Spxx> spxxList){
JSONObject jsonObject1 = new JSONObject();
for (Spxx spxx : spxxList) {
jsonObject1=spxxService.toSpsqxx(spxx);
}
return jsonObject1;
}
/**
* 审批操作
* @return
*/
@PostMapping("/toSpsqxx")
@ResponseBody
@Transactional(rollbackFor = Exception.class)
@ApiOperation(value = "审批_审批通过/驳回")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "审批通过/驳回")
public JSONObject toSpsqxx(@RequestBody Spxx spxx){
JSONObject jsonObject = spxxService.toSpsqxx(spxx);
return jsonObject;
}
/**
* 审批统计图
* @return
*/
@PostMapping("/querySptjt")
@ResponseBody
@ApiOperation(value = "审批_获取审批统计图")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "获取审批统计图")
public JSONObject querySptjt(@RequestBody SptjcxVo sptjcxVo){
JSONObject jsonObject = new JSONObject();
try {
jsonObject = spxxService.toQuerySptjtxx(sptjcxVo);
} catch (Exception e) {
e.printStackTrace();
jsonObject.put("status",201);
jsonObject.put("msg","统计图查询失败!");
jsonObject.put("data","");
}
return jsonObject;
}
/**
* 审批统计列表
* @return
*/
@PostMapping("/querySptjbList")
@ResponseBody
@ApiOperation(value = "审批_获取审批统计列表")
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "获取审批统计列表")
public JSONObject querySptjbList(int page, int rows, SptjcxVo sptjcxVo){
JSONObject jsonObject = new JSONObject();
try {
// sptjcxVo.setStartNum((currentPageNo-1)*pageSize);
// sptjcxVo.setEndNum(currentPageNo*pageSize);
EasyUIPage easyUIPage = new EasyUIPage();
easyUIPage.setPage(page);
easyUIPage.setMysqlPagePara(rows);
int begin = easyUIPage.getBegin();
sptjcxVo.setBegin(begin);
// sptjcxVo.setEnd(end);
sptjcxVo.setLimit(rows);
jsonObject = spxxService.toQuerySptjlbxx(sptjcxVo);;
} catch (Exception e) {
e.printStackTrace();
jsonObject.put("count", 0);
jsonObject.put("status", 201);
jsonObject.put("msg", "异常");
jsonObject.put("data", new ArrayList<>());
}
return jsonObject;
}
}
package com.founder.publicapi.controller.ApprovalService;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.OperLog;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow;
import com.founder.publicapi.service.WorkFlowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*@ClassName: WorkFlowController
*@Description TODO: 审批流记录controller
*@Author: 偷影子的人
*@Date: 2019/11/1 10:07
*@Version: 1.0
**/
@Api(tags = "查询工作流")
@RestController
@CrossOrigin
public class WorkFlowController {
@Autowired
private WorkFlowService workFlowService;
/**
* 查询工作流 不分页
* @param workflow 参数对象
* @return
*/
// @RequestMapping(value = "/queryWorkFlowList",method = {RequestMethod.GET, RequestMethod.POST})
@PostMapping(value = "/queryWorkFlowList")
@ResponseBody
@OperLog(czxxLbdm = "01" , yymcJyqk = "0206",czxxJyqk = "工作流信息查询")
@ApiOperation(value = "审批_申请单流程")
public Map<String,Object> queryWorkFlowList(@RequestBody TbstApproveWorkflow workflow) {
Map<String,Object> mapResult = new HashMap<>();
List<TbstApproveWorkflow> workflows = null;
try {
workflows = workFlowService.queryWorkFlowList(workflow);
} catch (Exception e) {
e.printStackTrace();
//报错返回空对象
workflows = new ArrayList<TbstApproveWorkflow>();
}
mapResult.put("data",workflows);
mapResult.put("status",200);
mapResult.put("mag","success");
mapResult.put("count",workflows.size());
return mapResult;
}
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ApprovalTbStAsj;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface ApprovalTbStAsjMapper {
List<ApprovalTbStAsj> findAsjxxByAsjbh(String _parameter);
/**
* 通过案事件编号或接警编号查询案事件信息
*/
ApprovalTbStAsj queryAsjxx(ApprovalTbStAsj approvalTbStAsj);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveAsjxx;
import org.springframework.stereotype.Repository;
/**
*@ClassName: OrderAsjxxMapper
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:10
*@Version: 1.0
**/
@Repository
public interface OrderAsjxxMapper {
Integer saveSpAsjxx(TbstApproveAsjxx tbstApproveAsjxx);
Integer deleteSpAsjxxByCode(String orderCode);
Integer querySpAsjxxCount(String orderCode);
TbstApproveAsjxx queryApproveAsjxx(String orderCode);
Integer updateSpAsjxx(TbstApproveAsjxx tbstApproveAsjxx);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstOrderDetail;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*@ClassName: OrderDetailMapper
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:11
*@Version: 1.0
**/
@Repository
public interface OrderDetailMapper {
//查询申请单详情(线索)List 分页
List<TbstOrderDetail> queryOrderDetailList(TbstOrderDetail orderDetail) throws Exception;
List<TbstOrderDetail> queryOrderDetailListByOrderCode(String orderCode);
Integer queryOrderDetailListTotalCount(TbstOrderDetail orderDetail) throws Exception;
//批量保存申请表线索
Integer saveSpxsxx(List<TbstOrderDetail> tbstOrderDetail) throws Exception;
//根据申请单号删除线索表信息
Integer deleteSpxsxxBySpxxbh(String spxxbh) throws Exception;
//线索详情
List<TbstOrderDetail> querySqdxsDteail(TbstOrderDetail tbstOrderDetail) throws Exception;
//线索详情
List<TbstOrderDetail> querySqdxsDteailByOther(TbstOrderDetail tbstOrderDetail) throws Exception;
Integer updateXsStatusBySqdbh(TbstOrderDetail tbstOrderDetail);
Integer deleteXsById(TbstOrderDetail orderDetail);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.OrderDetailxx;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.SptjcxVo;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.Spxx;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*@ClassName: OrderMapper
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:10
*@Version: 1.0
**/
@Repository
public interface OrderMapper {
//查询申请单List 分页
List<TbstApproveOrder> queryOrderList(TbstApproveOrder approveOrder) throws Exception;
//查询当前单位代码下的所有申请单
List<TbstApproveOrder> queryOrderListByUnitcode(SptjcxVo sptjcxVo);
//查询当前单位代码下的所有申请单
List<TbstApproveOrder> queryOrderListByUnitcodePage(SptjcxVo sptjcxVo);
//查询当前单位代码下的所有申请单
Integer queryOrderListByUnitcodeTotalCount(SptjcxVo sptjcxVo);
//查询出当前单位代码下所有的申请单每一天的申请单个数
List<SptjcxVo> queryOrderListCountByUnitcode(SptjcxVo sptjcxVo);
TbstApproveOrder queryOrderByOrderCode(String orderCode);
//查询申请单总数
Integer queryOrderListTotalCount(TbstApproveOrder approveOrder) throws Exception;
//保存申请表信息
Integer saveSpxx(TbstApproveOrder tbstApproveOrder);
//更新申请表信息
Integer updateSpxx(TbstApproveOrder tbstApproveOrder);
//撤回申请表信息
Integer recellSpxx(TbstApproveOrder tbstApproveOrder);
//申请单详情
TbstApproveOrder querySqdDteail(TbstApproveOrder tbstApproveOrder);
Integer deleteOrder(String sqdbh);
int queryMyOrderListTotalCount(@Param("orderParam") TbstApproveOrder orderParam, @Param("statusList") List<Integer> orderStatusList, @Param("dealPid") String dealPid);
List<TbstApproveOrder> queryMyOrderListPage(@Param("orderParam") TbstApproveOrder orderParam, @Param("statusList") List<Integer> orderStatusList, @Param("dealPid") String dealPid);
List<TbstApproveOrder> queryDwspPlclListPage(@Param("orderParam") TbstApproveOrder orderParam, @Param("statusList") List<Integer> orderStatusList, @Param("dealPid") String dealPid);
//查询名下超过72小时未审批通过的紧急申请单
List<TbstApproveOrder> querOrderTimeOut72H(TbstApproveOrder tbstApproveOrder);
//查询名下超过24小时审批通过的普通申请单
List<TbstApproveOrder> querOrderTimeOut24H(TbstApproveOrder tbstApproveOrder);
List<TbstApproveOrder> querOrderTimeOut(TbstApproveOrder tbstApproveOrder, String myCreateUserPid, String dateNum);
List<TbstApproveOrder> getOrderList(TbstApproveOrder approveOrder);
Integer updateSqdStatus(TbstApproveOrder overOrder);
List<OrderDetailxx> getXsSpResult(OrderDetailxx orderDetailxx);
Integer queryMyOrderApprovedListTotalCount(TbstApproveOrder tbstApproveOrder);
List<TbstApproveOrder> queryMyOrderApprovedListPage(TbstApproveOrder tbstApproveOrder);
List<TbstApproveOrder> queryWgczListPage(TbstApproveOrder tbstApproveOrder);
Integer isExistSqdCsByOne(Spxx spxx);
Integer updateSqdStatusIsgq(TbstApproveOrder overOrder);
List<TbstApproveOrder> getSuccessOrderList(TbstApproveOrder approveOrder);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*@ClassName: OrderPzxxMapper
*@Description 卷宗信息管理
*@Author: 偷影子的人
*@Date: 2019/11/1 10:10
*@Version: 1.0
**/
@Repository
@Component
public interface OrderPzxxMapper {
Integer savePzxx(TbstApprovePzxx tbstApprovePzxx);
Integer deletePzById(TbstApprovePzxx tbstApprovePzxx);
Integer selectPzxxTotalCount(TbstApprovePzxx tbstApprovePzxx);
List<TbstApprovePzxx> selectPzxx(TbstApprovePzxx tbstApprovePzxx);
List<TbstApprovePzxx> queryUserPz(TbstApprovePzxx tbstApprovePzxx);
TbstApprovePzxx queryPzById(TbstApprovePzxx tbstApprovePzxx);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.User;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SpxxMapper {
List<TbSpxx> queryXsspList(TbSpxx tbspxx);
Integer queryXsspListTotalCount(TbSpxx spxx);
List<TbSpxx> queryAllFzDbl(User param);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.SysUser;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbStApproveUserRole;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
*@ClassName: UserMapper
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/10/31 10:52
*@Version: 1.0
**/
@Repository
public interface UserMapper {
List<User> getSysUser(User user) throws Exception;
SysUser checkUserExist(String username);
List<User> getUserWithRoles(@Param("user") User paramUser, @Param("roleList") List<String> roleList, @Param("roleState") String roleState);
int addApproveUserRole(Map<String, Object> map);
int updateApproveUserRole(Map<String, Object> map);
TbStApproveUserRole getUserRoleInfoByRoleId(@Param("userId") String userId, @Param("roleId") String roleId);
Integer getAgentUsersCount(Map<String, Object> map);
List<Map<String,Object>> getAgentUsersRows(Map<String, Object> map);
void updateTimeOutUserRoleState(String roleId);
List<User> getSysUserList(@Param("pid") List<String> pid);
int deleteApproveUserRole(Map<String, Object> paramMap);
Integer updateSysUserIpSqdStatus(@Param("username") String username, @Param("status") String status);
List<Map<String,String>> queryUserPermisionByUsername(String username);
TbStApproveUserRole queryUserRoleInfo(@Param("id") String username);
String getDwLevByDwdm(String unitcode);
List<String> getAllXjdwByMap(@Param("dw") Map<String, String> dw);
Map<String,String> getSjDwLevByDwdm(String unitcode);
}
package com.founder.publicapi.mapper.mysqlMapper;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*@ClassName: WorkFlowMapper
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:11
*@Version: 1.0
**/
@Repository
public interface WorkFlowMapper {
//查询申请单流程List 不分页
List<TbstApproveWorkflow> queryWorkFlowList(TbstApproveWorkflow workflow) throws Exception;
//保存流程表
Integer saveWorkflow(TbstApproveWorkflow tbstApproveWorkflow);
Integer deleteWorkflowBySqdbh(String sqdbh);
}
<?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="com.founder.publicapi.mapper.mysqlMapper.ApprovalTbStAsjMapper">
<select id="findAsjxxByAsjbh" parameterType="String" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ApprovalTbStAsj">
SELECT ASJBH as asjbh,ASJFSSJ_ASJFSKSSJ as asjfssjAsjfskssj,AJMC as ajmc,ASJFSDD_DZMC as asjfsddDzmc,JYAQ as jyaq from tb_st_asj where XXSC_PDBZ='0' and asjbh IN (${_parameter})
</select>
<select id="queryAsjxx" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ApprovalTbStAsj" parameterType="String">
select ASJBH as asjbh,
JJBH as jjbh,
AJMC as pzTitle,
AJMC as ajmc,
(select name from sys_dictitem where groupid='CODE_AJLB' and code=AJLBDM) as ajlbdm,
(select name from sys_dictitem where groupid='CODE_XZQH' and code=ASJFSDD_XZQHDM) as xzqhmc,
LARQ as larq,
LADW_GAJGMC as ladw_gajgmc,
LADW_GAJGJGDM as ladw_gajgjgdm,
JYAQ as jyaq
from tb_st_asj
<where>
XXSC_PDBZ='0'
<if test="asjbh != null and asjbh !=''">
and ASJBH = #{asjbh, jdbcType=VARCHAR}
</if>
<if test="jjbh != null and jjbh != ''">
and JJBH = #{jjbh, jdbcType=VARCHAR}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
<?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="com.founder.publicapi.mapper.mysqlMapper.OrderAsjxxMapper">
<insert id="saveSpAsjxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveAsjxx">
insert into TB_ST_APPROVE_ASJXX
(
ID,
ORDER_CODE,
ASJMC,
AJLB,
MJ,
JYAQ,
FILENAME,
CREATE_USER_ID,
<if test="imgFile != null and imgFile != ''">IMG_FILE,</if>
CREATE_TIME
) values (
#{id}
<if test="orderCode != null and orderCode != ''">,#{orderCode}</if>
<if test="orderCode == null or orderCode == ''">,NULL</if>
<if test="asjmc != null and asjmc != ''">,#{asjmc}</if>
<if test="asjmc == null or asjmc == ''">,NULL</if>
<if test="ajlb != null and ajlb != ''">,#{ajlb}</if>
<if test="ajlb == null or ajlb == ''">,NULL</if>
<if test="mj != null and mj != ''">,#{mj}</if>
<if test="mj == null or mj == ''">,NULL</if>
<if test="jyaq != null and jyaq != ''">,#{jyaq}</if>
<if test="jyaq == null or jyaq == ''">,NULL</if>
<if test="filename != null and filename != ''">,#{filename}</if>
<if test="filename == null or filename == ''">,NULL</if>
<if test="createUserId != null and createUserId != ''">,#{createUserId}</if>
<if test="createUserId == null or createUserId == ''">,NULL</if>
<if test="imgFile != null and imgFile != ''">,#{imgFile}</if>
,NOW()
)
</insert>
<delete id="deleteSpAsjxxByCode" parameterType="String">
delete TB_ST_APPROVE_ASJXX where ORDER_CODE = #{orderCode}
</delete>
<select id="querySpAsjxxCount" parameterType="String" resultType="java.lang.Integer">
select count(*) from TB_ST_APPROVE_ASJXX where ORDER_CODE = #{orderCode}
</select>
<select id="queryApproveAsjxx" parameterType="String" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveAsjxx">
select
ID as id,
ORDER_CODE as orderCode,
ASJMC as asjmc,
AJLB as ajlb,
MJ as mj,
JYAQ as jyaq,
IMG_FILE as imgFile,
FILENAME as filename
from TB_ST_APPROVE_ASJXX where ORDER_CODE = #{orderCode}
</select>
<update id="updateSpAsjxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveAsjxx">
update TB_ST_APPROVE_ASJXX SET
<if test="ajlb != null and ajlb != ''">ajlb =#{ajlb}</if>
<if test="asjmc != null and asjmc != ''">,ASJMC =#{asjmc}</if>
<if test="mj != null and mj != ''">,MJ =#{mj}</if>
<if test="jyaq != null and jyaq != ''">,JYAQ = #{jyaq}</if>
<if test="imgFile != null and imgFile != ''">,IMG_FILE = #{imgFile}</if>
<if test="filename != null and filename != ''">,FILENAME = #{filename}</if>
where ORDER_CODE=#{orderCode}
</update>
</mapper>
\ No newline at end of file
<?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="com.founder.publicapi.mapper.mysqlMapper.OrderPzxxMapper">
<insert id="savePzxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
insert into sk_st_approve_pzxx
(
ID,
ASJBH,
JJBH,
XKBH,
ASJMC,
AJLB,
MJ,
JYAQ,
FILENAME,
CREATE_USER_ID,
LRLB,
PZ_TITLE,
KSSJ,
JSSJ,
YXQX,
<if test="imgFile != null and imgFile != ''">IMG_FILE,</if>
CREATE_TIME,
<if test="wordFile != null and wordFile != ''">WORDFILE,</if>
WORD_NAME
) values (
#{id}
<if test="asjbh != null and asjbh != ''">,#{asjbh}</if>
<if test="asjbh == null or asjbh == ''">,NULL</if>
<if test="jjbh != null and jjbh != ''">,#{jjbh}</if>
<if test="jjbh == null or jjbh == ''">,NULL</if>
<if test="xkbh != null and xkbh != ''">,#{xkbh}</if>
<if test="xkbh == null or xkbh == ''">,NULL</if>
<if test="asjmc != null and asjmc != ''">,#{asjmc}</if>
<if test="asjmc == null or asjmc == ''">,NULL</if>
<if test="ajlb != null and ajlb != ''">,#{ajlb}</if>
<if test="ajlb == null or ajlb == ''">,NULL</if>
<if test="mj != null and mj != ''">,#{mj}</if>
<if test="mj == null or mj == ''">,NULL</if>
<if test="jyaq != null and jyaq != ''">,#{jyaq}</if>
<if test="jyaq == null or jyaq == ''">,NULL</if>
<if test="filename != null and filename != ''">,#{filename}</if>
<if test="filename == null or filename == ''">,NULL</if>
<if test="createUserId != null and createUserId != ''">,#{createUserId}</if>
<if test="createUserId == null or createUserId == ''">,NULL</if>
<if test="lrlb != null and lrlb != ''">,#{lrlb}</if>
<if test="lrlb == null or lrlb == ''">,NULL</if>
<if test="pzTitle != null and pzTitle != ''">,#{pzTitle}</if>
<if test="pzTitle == null or pzTitle == ''">,NULL</if>
<if test="kssj != null and kssj != ''">,str_to_date(#{kssj},'%Y-%m-%d %H:%i:%s')</if>
<if test="kssj == null or kssj == ''">,NULL</if>
<if test="jssj != null and jssj != ''">,str_to_date(#{jssj},'%Y-%m-%d %H:%i:%s')</if>
<if test="jssj == null or jssj == ''">,NULL</if>
<if test="yxqx != null and yxqx != ''">,#{yxqx}</if>
<if test="yxqx == null or yxqx == ''">,NULL</if>
<if test="imgFile != null and imgFile != ''">,#{imgFile}</if>
,NOW()
<if test="wordFile != null and wordFile != ''">,#{wordFile}</if>
<if test="wordName != null and wordName != ''">,#{wordName}</if>
<if test="wordName == null or wordName == ''">,NULL</if>
)
</insert>
<delete id="deletePzById" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
delete from sk_st_approve_pzxx where ID = #{id}
</delete>
<select id="queryUserPz" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
select
a.ID as id,
a.ASJBH as asjbh,
a.ASJMC as asjmc,
a.AJLB as ajlb,
a.MJ as mj,
a.PZ_TITLE as pzTitle,
a.JYAQ as jyaq,
a.FILENAME as filename,
a.CREATE_USER_ID as createUserId,
a.LRLB as lrlb,
a.IMG_FILE as imgFile,
(select count(*) from sk_st_approve_order where PZID=a.ID) as orderCount,
date_format(a.CREATE_TIME,'%Y-%m-%d %H:%i:%s') as createTime
from
sk_st_approve_pzxx a
where 1=1
<if test="createUserId !='' and createUserId !=null">and a.CREATE_USER_ID = #{createUserId}</if>
<if test="pzTitle !='' and pzTitle !=null" >and a.PZ_TITLE = #{pzTitle} </if>
and NOW() between a.KSSJ and a.JSSJ
order by a.CREATE_TIME desc
</select>
<!-- 分页查询串并案列表-->
<select id="selectPzxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
select
a.ID as id,
a.ASJBH as asjbh,
a.ASJMC as asjmc,
a.AJLB as ajlb,
a.MJ as mj,
a.PZ_TITLE as pzTitle,
a.JYAQ as jyaq,
a.FILENAME as filename,
a.CREATE_USER_ID as createUserId,
a.LRLB as lrlb,
a.IMG_FILE as imgFile,
(select count(*) from sk_st_approve_order where PZID=a.ID) as orderCount,
date_format(a.KSSJ,'%Y-%m-%d %H:%i:%s') as kssj,
date_format(a.JSSJ,'%Y-%m-%d %H:%i:%s') as jssj,
date_format(a.CREATE_TIME,'%Y-%m-%d %H:%i:%s') as createTime
from
sk_st_approve_pzxx a
where 1=1
<if test="createUserId !='' and createUserId !=null">and a.CREATE_USER_ID = #{createUserId}</if>
<if test="pzTitle !='' and pzTitle !=null">and a.PZ_TITLE LIKE concat('%',#{pzTitle},'%')</if>
<if test="asjbh !='' and asjbh !=null">and a.ASJBH LIKE concat('%',#{asjbh},'%')</if>
<if test="asjmc !='' and asjmc !=null">and a.ASJMC LIKE concat('%',#{asjmc},'%')</if>
<if test="kssj !='' and kssj !=null">and a.CREATE_TIME <![CDATA[ >= ]]> str_to_date(#{kssj},'%Y-%m-%d %H:%i:%s')</if>
<if test="jssj !='' and jssj !=null">and a.CREATE_TIME <![CDATA[ <= ]]> str_to_date(#{jssj},'%Y-%m-%d %H:%i:%s')</if>
order by a.CREATE_TIME desc
limit #{begin},#{limit}
</select>
<!-- 分页查询串并组列表总数-->
<select id="selectPzxxTotalCount" resultType="java.lang.Integer" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
select count(*)
from
sk_st_approve_pzxx a
where 1=1
<if test="createUserId !='' and createUserId !=null">and a.CREATE_USER_ID = #{createUserId}</if>
<if test="pzTitle !='' and pzTitle !=null">and a.PZ_TITLE LIKE concat('%',#{pzTitle},'%')</if>
<if test="asjbh !='' and asjbh !=null">and a.ASJBH LIKE concat('%',#{asjbh},'%')</if>
<if test="asjmc !='' and asjmc !=null">and a.ASJMC LIKE concat('%',#{asjmc},'%')</if>
<if test="kssj !='' and kssj !=null">and a.CREATE_TIME <![CDATA[ >= ]]> str_to_date(#{kssj},'%Y-%m-%d %H:%i:%s')</if>
<if test="jssj !='' and jssj !=null">and a.CREATE_TIME <![CDATA[ <= ]]> str_to_date(#{jssj},'%Y-%m-%d %H:%i:%s')</if>
</select>
<!-- 查询指定卷宗信息-->
<select id="queryPzById" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx">
select
a.ID as id,
a.ASJBH as asjbh,
a.XKBH as xkbh,
a.JJBH as jjbh,
a.ASJMC as asjmc,
a.AJLB as ajlb,
a.MJ as mj,
a.JYAQ as jyaq,
a.FILENAME as filename,
a.PZ_TITLE as pzTitle,
a.CREATE_USER_ID as createUserId,
a.LRLB as lrlb,
a.IMG_FILE as imgFile,
a.WORD_NAME as wordName,
(select count(*) from sk_st_approve_order where PZID=a.ID) as yxqx,
date_format(a.KSSJ,'%Y-%m-%d %H:%i:%s') as kssj,
date_format(a.JSSJ,'%Y-%m-%d %H:%i:%s') as jssj,
date_format(a.CREATE_TIME,'%Y-%m-%d %H:%i:%s') as createTime
from
sk_st_approve_pzxx a
where 1=1
and a.ID =#{id}
</select>
</mapper>
\ No newline at end of file
<?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="com.founder.publicapi.mapper.mysqlMapper.SpxxMapper">
<select id="queryXsspList" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx">
select
v.AJBH as ajbh,
v.SQDX as sqdx,
v.STARTUSERID as startuserid,
v.AUDITOR as auditor,
v.RESULT as result,
date_format(v.CREATEDTIME ,'%Y-%m-%d %H:%i:%s') as createdtime,
date_format(v.UPTIME ,'%Y-%m-%d %H:%i:%s') as uptime
from XZSP.VW_ZHZCNT_VIEW v where 1=1
<if test="ajbh != null and ajbh != '' "> and v.AJBH like '%' #{ajbh} '%' </if>
<if test="sqdx != null and sqdx != '' "> and v.SQDX like '%' #{sqdx} '%'</if>
<if test="czrSfzh != null and czrSfzh != '' "> and v.STARTUSERID = #{czrSfzh} </if>
<if test="xszt != null and xszt != '' ">
<choose>
<when test="xszt ==2">
and v.RESULT is null
</when>
<otherwise>
and v.RESULT = #{xszt}
</otherwise>
</choose>
</if>
<if test="startcjsj != null and startcjsj != '' "> and v.CREATEDTIME <![CDATA[>=]]> str_to_date(#{startcjsj},'%Y-%m-%d %H:%i:%s')</if>
<if test="endcjsj != null and endcjsj != '' "> and v.CREATEDTIME <![CDATA[<=]]> str_to_date(#{endcjsj},'%Y-%m-%d %H:%i:%s')</if>
ORDER BY v.createdtime DESC
limit #{begin},#{limit}
</select>
<select id="queryXsspListTotalCount" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx" resultType="java.lang.Integer">
select *)
from XZSP.VW_ZHZCNT_VIEW v where 1=1
<if test="ajbh != null and ajbh != '' "> and v.AJBH like '%' #{ajbh} '%' </if>
<if test="sqdx != null and sqdx != '' "> and v.SQDX like '%' #{sqdx} '%'</if>
<if test="czrSfzh != null and czrSfzh != '' "> and v.STARTUSERID = #{czrSfzh} </if>
<if test="xszt != null and xszt != '' ">
<choose>
<when test="xszt ==2">
and v.RESULT is null
</when>
<otherwise>
and v.RESULT = #{xszt}
</otherwise>
</choose>
</if>
<if test="startcjsj != null and startcjsj != '' "> and v.CREATEDTIME <![CDATA[>=]]> str_to_date(#{startcjsj},'%Y-%m-%d %H:%i:%s')</if>
<if test="endcjsj != null and endcjsj != '' "> and v.CREATEDTIME <![CDATA[<=]]> str_to_date(#{endcjsj},'%Y-%m-%d %H:%i:%s')</if>
</select>
<select id="queryAllFzDbl" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.User">
select * from XZSP.VW_ZHZCNT_VIEW where AJBH = 'FZDBL'
and result = '1'
and STARTUSERID = #{identitycard}
</select>
</mapper>
\ No newline at end of file
<?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="com.founder.publicapi.mapper.mysqlMapper.WorkFlowMapper">
<!-- 审批流程表查询条件 -->
<sql id = "splcxx_where_sql">
<if test="id != null and id != ''">
and t.ID = #{id}
</if>
<if test="orderCode != null and orderCode != ''">
and t.ORDER_CODE = #{orderCode}
</if>
<if test="workFlowName != null and workFlowName != ''">
and t.WORKFLOW_NAME = #{workFlowName}
</if>
<if test="handleUserPid != null and handleUserPid != ''">
and t.HANDLE_USER_PID = #{handleUserPid}
</if>
<if test="handleUserName != null and handleUserName != ''">
and t.HANDLE_USER_NAME = #{handleUserName}
</if>
<if test="handleUserCid != null and handleUserCid != ''">
and t.HANDLE_USER_CID = #{handleUserCid}
</if>
<if test="timeStart != null and timeStart != '' ">
and t.HANDLE_TIME <![CDATA[>=]]> str_to_date(#{timeStart},'%Y-%m-%d %H:%i:%s')
</if>
<if test="timeEnd != null and timeEnd != '' ">
and t.HANDLE_TIME <![CDATA[<=]]> str_to_date(#{timeEnd},'%Y-%m-%d %H:%i:%s')
</if>
<if test="handleContent != null and handleContent != ''">
and t.HANDLE_CONTENT = #{handleContent}
</if>
<if test="handleStatus != null and handleStatus != ''">
and t.HANDLE_STATUS = #{handleStatus}
</if>
<if test="assigneeUserPid != null and assigneeUserPid != ''">
and t.ASSIGNEE_USER_PID = #{assigneeUserPid}
</if>
<if test="assigneeUserName != null and assigneeUserName != ''">
and t.ASSIGNEE_USER_NAME = #{assigneeUserName}
</if>
<if test="assigneeUserCid != null and assigneeUserCid != ''">
and t.ASSIGNEE_USER_CID = #{assigneeUserCid}
</if>
<if test="assigneeAudit != null and assigneeAudit != ''">
and t.ASSIGNEE_AUDIT = #{assigneeAudit}
</if>
<if test="createTime != null and createTime != ''">
and t.CREATE_TIME = #{createTime}
</if>
</sql>
<!-- 查询审批流程详情 -->
<select id = "queryWorkFlowList" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow" resultType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow">
SELECT
t.ID as id,
t.ORDER_CODE as orderCode,
t.WORKFLOW_NAME as workFlowName,
t.HANDLE_USER_PID as handleUserPid,
t.HANDLE_USER_NAME as handleUserName,
t.HANDLE_USER_CID as handleUserCid,
t.HANDLE_TIME as handleTime,
t.HANDLE_CONTENT as handleContent,
t.HANDLE_STATUS as handleStatus,
t.ASSIGNEE_USER_PID as assigneeUserPid,
t.ASSIGNEE_USER_NAME as assigneeUserName,
t.ASSIGNEE_USER_CID as assigneeUserCid,
t.ASSIGNEE_AUDIT as assigneeAudit,
t.CREATE_TIME as createTime
FROM sk_st_approve_workflow t
WHERE 1=1
<include refid = "splcxx_where_sql" />
order by HANDLE_TIME desc
</select>
<insert id="saveWorkflow" parameterType="com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow">
insert into sk_st_approve_workflow
(
ID,
ORDER_CODE,
WORKFLOW_NAME,
HANDLE_USER_PID,
HANDLE_USER_NAME,
HANDLE_USER_CID,
HANDLE_TIME,
HANDLE_CONTENT,
HANDLE_STATUS,
ASSIGNEE_USER_PID,
ASSIGNEE_USER_NAME,
ASSIGNEE_USER_CID,
ASSIGNEE_AUDIT,
CREATE_TIME
) values (
#{id}
<if test="orderCode != null and orderCode != ''">,#{orderCode}</if>
<if test="orderCode == null or orderCode == ''">,NULL</if>
<if test="workFlowName != null and workFlowName != ''">,#{workFlowName}</if>
<if test="workFlowName == null or workFlowName == ''">,NULL</if>
<if test="handleUserPid != null and handleUserPid != ''">,#{handleUserPid}</if>
<if test="handleUserPid == null or handleUserPid == ''">,NULL</if>
<if test="handleUserName != null and handleUserName != ''">,#{handleUserName}</if>
<if test="handleUserName == null or handleUserName == ''">,NULL</if>
<if test="handleUserCid != null and handleUserCid != ''">,#{handleUserCid}</if>
<if test="handleUserCid == null or handleUserCid == ''">,NULL</if>
,NOW()
<if test="handleContent != null and handleContent != ''">,#{handleContent}</if>
<if test="handleContent == null or handleContent == ''">,NULL</if>
<if test="handleStatus != null and handleStatus != ''">,#{handleStatus}</if>
<if test="handleStatus == null or handleStatus == ''">,NULL</if>
<if test="assigneeUserPid != null and assigneeUserPid != ''">,#{assigneeUserPid}</if>
<if test="assigneeUserPid == null or assigneeUserPid == ''">,NULL</if>
<if test="assigneeUserName != null and assigneeUserName != ''">,#{assigneeUserName}</if>
<if test="assigneeUserName == null or assigneeUserName == ''">,NULL</if>
<if test="assigneeUserCid != null and assigneeUserCid != ''">,#{assigneeUserCid}</if>
<if test="assigneeUserCid == null or assigneeUserCid == ''">,NULL</if>
<if test="assigneeAudit != null and assigneeAudit != ''">,#{assigneeAudit}</if>
<if test="assigneeAudit == null or assigneeAudit == ''">,NULL</if>
,NOW()
)
</insert>
<delete id="deleteWorkflowBySqdbh" parameterType="java.lang.String">
delete sk_st_approve_workflow where ORDER_CODE = #{sqdbh}
</delete>
</mapper>
\ No newline at end of file
package com.founder.publicapi.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.ApprovalTbStAsj;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstOrderDetail;
import java.util.List;
import java.util.Map;
/**
*@ClassName: OrderDetailService
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:05
*@Version: 1.0
**/
public interface OrderDetailService {
Map<String,Object> queryOrderDetailList(TbstOrderDetail orderDetail) throws Exception;
List<TbstOrderDetail> queryOrderDetailListByOrderCode(String orderCode);
Integer getXsCount(TbstOrderDetail orderDetail) throws Exception;
boolean deleteXs(String spxxbh);
boolean deleteXsById(TbstOrderDetail orderDetail);
Map<String,List<String>> getAjxsxx(TbstOrderDetail orderDetail) throws Exception;
JSONArray getSqdXsxx(TbstOrderDetail orderDetail) throws Exception;
JSONObject getFsrwqx(String username, String queryType, String xsz);
ApprovalTbStAsj queryAsjxx(String queryBh);
}
package com.founder.publicapi.service;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.EasyUIPage;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.SysUser;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveOrder;
import java.util.Map;
/**
* @ClassName: OrderService
* @Description TODO:
* @Author: 偷影子的人
* @Date: 2019/11/1 10:04
* @Version: 1.0
**/
public interface OrderService {
//查询申请单List
Map<String,Object> queryOrderList(TbstApproveOrder approveOrder) throws Exception;
TbstApproveOrder queryOrderByOrderCode(String orderCode);
public Map<String,Object> getSqdDteail(TbstApproveOrder tbstApproveOrder) throws Exception;
//申请表新增
JSONObject saveSpxx(TbstApproveOrder tbstApproveOrder) throws Exception;
//申请表修改
JSONObject updateSpxx(TbstApproveOrder tbstApproveOrder) throws Exception;
Map<String,Object> getSqch(TbstApproveOrder tbstApproveOrder) throws Exception;
Boolean updateXsStatus(String orderCode) throws Exception;
//获取我名下未审的申请单
Map<String,Object> queryMyApproveOrderList(Integer page,Integer rows, TbstApproveOrder tbstApproveOrder);
Map<String,Object> queryDwspPlspOrderList(String jh);
Integer queryDwspPlspOrderListTotal(String jh);
boolean deleteOrderBySqdbh(String sqdbh);
//查询名下超过24小时未审批通过的普通审批申请单
boolean querOrderTimeOut24H(TbstApproveOrder tbstApproveOrder);
//脑图查询审批结果
JSONObject getXsSpResult(String cxrJh, String xs, String xslx);
//获取我名下已审批的申请单
EasyUIPage queryMyOrderApprovedList(EasyUIPage page, TbstApproveOrder tbstApproveOrder);
SysUser checkUserExist(String username);
}
package com.founder.publicapi.service;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx;
import java.util.List;
import java.util.Map;
public interface PzService {
JSONObject savePzxx(TbstApprovePzxx tbstApprovePzxx);
JSONObject deletePzById(TbstApprovePzxx tbstApprovePzxx);
Map selectPzxx(TbstApprovePzxx tbstApprovePzxx);
TbstApprovePzxx queryPzById(TbstApprovePzxx tbstApprovePzxx);
List<TbstApprovePzxx> queryUserPz(TbstApprovePzxx tbstApprovePzxx);
}
package com.founder.publicapi.service;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.SptjcxVo;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.Spxx;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbSpxx;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.User;
import java.util.List;
import java.util.Map;
public interface SpxxService {
Map<String,Object> queryXsspList(TbSpxx tbSpxx) throws Exception;
public List<TbSpxx> getAllFzdblSpxx(User param);
//审批
JSONObject toSpsqxx(Spxx spxx);
//批量审批(留置)
JSONObject toSpsqlistxx(List<Spxx> spxxList);
//查询单个人员是否存在申请单审批超时(单个审批)
boolean isExistSqdCsByOne(Spxx spxx);
//更新ip表中用户的状态(0 正常,1冻结)
Integer updateSysUserIpSqdStatus(String username, String sqdStatus);
JSONObject toQuerySptjtxx(SptjcxVo sptjcxVo);
JSONObject toQuerySptjlbxx(SptjcxVo sptjcxVo);
}
package com.founder.publicapi.service;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.EasyUIPage;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbStApproveUserRole;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.User;
import java.util.List;
import java.util.Map;
/**
*@ClassName: service
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/10/31 10:42
*@Version: 1.0
**/
public interface UserService {
List<User> getSysUser(User user) throws Exception;
/**
* 设置用户角色
*/
public Map<String,Object> setUserAgentRole(User loginUser, User user);
/**
* 获取当前登录用户单位下可以代理二级审批权限的用户
*
**/
public List<User> getAllowAgentUsers(String loginUserPoliceId, String agentUserPoliceId, String agentUserXm);
/**
* 根据角色获取审批用户
* @param loginUser 登陆
* @param approveType 审批类型
* @return
*/
List<User> getApproveUsers(User loginUser, String approveType);
/**
* 验证用户是否具有二级审批权限
* @param logginUser
* @return
*/
boolean validateUserEjspqx(User logginUser);
/**
* 验证用户是否具有一级审批权限
* @param logginUser
* @return
*/
boolean validateUserYjspqx(User logginUser);
/**
* 获取被授权二级审批权限的用户以及权限信息
* @param unitcode
* @return
*/
List<Map<String,Object>> getAgentUsers(String unitcode);
Map<String,Object> getAgentUsersPage(EasyUIPage page, Integer rows, String unitcode);
Map<String,Object> setUserRoleState(String agentUserPoliceId, String roleState);
void updateTimeOutUserRoleState();
Map<String, Object> deleteUserRole(String policeId, String qxtype);
List<Map<String,String>> queryUserPermisionByUsername(String username);
TbStApproveUserRole queryUserRoleInfo(String id);
}
package com.founder.publicapi.service;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow;
import java.util.List;
/**
* @ClassName: WorkFlowController
* @Description TODO: 审批流记录Service
* @Author: 偷影子的人
* @Date: 2019/11/1 10:07
* @Version: 1.0
**/
public interface WorkFlowService {
//查询审批流程List 不分页
List<TbstApproveWorkflow> queryWorkFlowList(TbstApproveWorkflow workflow) throws Exception;
}
package com.founder.publicapi.service.serviceimpl;
import com.alibaba.fastjson.JSONObject;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApprovePzxx;
import com.founder.commonutils.util.KeyUtilNaotu;
import com.founder.publicapi.mapper.mysqlMapper.OrderPzxxMapper;
import com.founder.publicapi.service.PzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.misc.BASE64Encoder;
import java.text.SimpleDateFormat;
import java.util.*;
@Service
public class PzServiceImpl implements PzService {
@Autowired
private OrderPzxxMapper orderPzxxMapper;
@Override
public JSONObject savePzxx(TbstApprovePzxx tbstApprovePzxx) {
JSONObject jsonObject = new JSONObject();
String jzid = KeyUtilNaotu.getJzKey("JZ");
tbstApprovePzxx.setId(jzid);
String yxqx = tbstApprovePzxx.getYxqx();
tbstApprovePzxx.setKssj(getYxSj(yxqx,"kssj"));
tbstApprovePzxx.setJssj(getYxSj(yxqx,"jssj"));
Integer count = orderPzxxMapper.savePzxx(tbstApprovePzxx);
if(count>0){
jsonObject.put("status",200);
jsonObject.put("count",0);
jsonObject.put("msg","卷宗保存成功");
jsonObject.put("data",jzid);
}else{
jsonObject.put("status",201);
jsonObject.put("count",0);
jsonObject.put("msg","卷宗保存失败");
jsonObject.put("data","");
}
return jsonObject;
}
private String getYxSj(String yxqx,String type){
String result = "";
Date kssj = new Date();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar = Calendar.getInstance();
calendar.setTime(kssj);
if("01".equals(yxqx)){//一个月
calendar.add(Calendar.MONTH, 1);
}else if("02".equals(yxqx)){//三个月
calendar.add(Calendar.MONTH, 3);
}else if("03".equals(yxqx)){//六个月
calendar.add(Calendar.MONTH, 6);
}else if("04".equals(yxqx)){//一年
calendar.add(Calendar.MONTH, 12);
}
Date nextDate = calendar.getTime();
if("kssj".equals(type)){
result = format.format(kssj);
}else if("jssj".equals(type)){
result = format.format(nextDate);
}
return result;
}
@Override
public JSONObject deletePzById(TbstApprovePzxx tbstApprovePzxx) {
JSONObject jsonObject = new JSONObject();
Integer count = orderPzxxMapper.deletePzById(tbstApprovePzxx);
if(count>0){
jsonObject.put("status",200);
jsonObject.put("msg","卷宗删除成功");
jsonObject.put("data","");
jsonObject.put("count","");
}else{
jsonObject.put("status",200);
jsonObject.put("msg","卷宗删除失败");
jsonObject.put("data","");
jsonObject.put("count","");
}
return jsonObject;
}
@Override
public TbstApprovePzxx queryPzById(TbstApprovePzxx tbstApprovePzxx) {
new HashMap<>();
TbstApprovePzxx pzxx = orderPzxxMapper.queryPzById(tbstApprovePzxx);
if("SDLR".equals(pzxx.getLrlb())) {
pzxx.setImgStr(zpStr(pzxx));
}
return pzxx;
}
@Override
public List<TbstApprovePzxx> queryUserPz(TbstApprovePzxx tbstApprovePzxx) {
List<TbstApprovePzxx> result = orderPzxxMapper.queryUserPz(tbstApprovePzxx);
return result;
}
@Override
public Map selectPzxx(TbstApprovePzxx tbstApprovePzxx) {
HashMap<Object, Object> map = new HashMap<>();
Integer count = orderPzxxMapper.selectPzxxTotalCount(tbstApprovePzxx);
if (count > 0) {
List<TbstApprovePzxx> dataList = orderPzxxMapper.selectPzxx(tbstApprovePzxx);
for (TbstApprovePzxx pzxx : dataList) {
if ("SDLR".equals(pzxx.getLrlb())) {
pzxx.setImgStr(zpStr(pzxx));
}
}
map.put("total", count);
map.put("rows", dataList);
return map;
}else {
map.put("total",0);
map.put("rows",new ArrayList<>());
return map;
}
}
private String zpStr (TbstApprovePzxx pzxx){
String zp = "";
if(pzxx.getImgFile() != null){
String imgLx = pzxx.getFilename().substring(pzxx.getFilename().indexOf("."),pzxx.getFilename().length());
if(".jpg".equalsIgnoreCase(imgLx)
|| ".png".equalsIgnoreCase(imgLx)
|| ".gif".equalsIgnoreCase(imgLx)
|| ".bmp".equalsIgnoreCase(imgLx)){
String zp64bite="";
if(null!=pzxx.getImgFile()){
BASE64Encoder base64Encoder=new BASE64Encoder();
zp64bite=base64Encoder.encode(pzxx.getImgFile());
}
String xsfjDzwjgs = (imgLx).substring(1, (imgLx).length());
zp = "data:image/" + xsfjDzwjgs + ";base64," + zp64bite;
}
}
return zp;
}
}
package com.founder.publicapi.service.serviceimpl;
import com.founder.commonutils.model.newPublicEntity.ApprovalEntity.TbstApproveWorkflow;
import com.founder.publicapi.mapper.mysqlMapper.WorkFlowMapper;
import com.founder.publicapi.service.WorkFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*@ClassName: WorkFlowService
*@Description TODO:
*@Author: 偷影子的人
*@Date: 2019/11/1 10:08
*@Version: 1.0
**/
@Service
public class WorkFlowServiceImpl implements WorkFlowService {
@Autowired
private WorkFlowMapper workFlowMapper;
/**
* 审批流查询不分页
* @param workflow
* @return
* @throws Exception
*/
@Override
public List<TbstApproveWorkflow> queryWorkFlowList(TbstApproveWorkflow workflow) throws Exception {
return workFlowMapper.queryWorkFlowList(workflow);
}
}
......@@ -21,30 +21,38 @@ spring.datasource.qgdb.url=ENC(Y1dXm7lJCGbPffW6Pbg/Uid1UK2Z1Tu2TNdp9AgqT/iXb4hNR
spring.datasource.qgdb.username=ENC(e7qsvm7EnrdHG04YnaTMsw==)
spring.datasource.qgdb.password=ENC(XPnOn0zoWMgOG8gIws+Bh7JITC3mMqSn)
spring.datasource.qgdb.type=com.alibaba.druid.pool.DruidDataSource
#\u5377\u5B97\u4E0A\u4F20\u7684\u8DEF\u5F84
approvalFilePath = /data/excel/approvalWord/
#\u65B0\u589E\u5377\u5B97\u5927\u6570\u636E\u6A21\u578B\u4E0B\u8F7D\u8DEF\u5F84
approvalDownload = http://47.92.48.137:1009/excel/approvalWord/
#\u65B0\u589E\u5377\u5B97\u5927\u6570\u636E\u6A21\u578B\u4E0B\u8F7D\u6A21\u677F\u7684\u8DEF\u5F84
approvalDownloadTemplate = http://47.92.48.137:1009/excel/approvalWord/ApprovalWordTemplate.docx
#xml???
mybatis-plus.mapper-locations=classpath*:com/founder/publicapi/mapper/*/xml/*.xml
#es?????????
management.health.elasticsearch.enabled=false
#??????λ
#??????\uFFFD\uFFFD
ssdw=460000000000
#server.tomcat.basedir: /tmp/tomcat
#阿里云用dev 公安网用prod
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDdev \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDprod
environment=dev
#FTP服务器ip
#FTP\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFDip
host=47.92.48.137
#FTP服务器端口
#FTP\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02FF\uFFFD
port=54322
#FTP登录账号
#FTP\uFFFD\uFFFD\u00BC\uFFFD\u02FA\uFFFD
usernameFtp=root
#FTP登录密码
#FTP\uFFFD\uFFFD\u00BC\uFFFD\uFFFD\uFFFD\uFFFD
password=Cc150520
#FTP服务器基础目录,/data2/images
#FTP\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u013F\u00BC,/data2/images
basePath=/data2/images
imagesUrl=http://65.26.2.173:1008/images/
#mongodb配置
#mongodb\uFFFD\uFFFD\uFFFD\uFFFD
spring.data.mongodb.primary=mongodb://localhost:27017/whale
logging.level.org.springframework.data.mongodb.core=DEBUG
spring.data.mongodb.second.uri=mongodb://localhost:27017/whale
#poi检索地址
#poi\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05B7
addressPoiUrl=http://220.26.6.1:8088/PGIS_S_Address/fullSearch
#����˿�
#\uFFFD\uFFFD\uFFFD\uFFFD\u02FF\uFFFD
server.port=20012
#����json��ȫ��ʱ���ʽ
#\uFFFD\uFFFD\uFFFD\uFFFDjson\uFFFD\uFFFD\u022B\uFFFD\uFFFD\u02B1\uFFFD\uFFFD\uFFFD\u02BD
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
#������־����
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05BE\uFFFD\uFFFD\uFFFD\uFFFD
logging.level.root=INFO
#mybatis��־
#mybatis\uFFFD\uFFFD\u05BE
#mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#mysql���ݿ�����
#mysql\uFFFD\uFFFD\uFFFD\u077F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.xzxtdb.url=ENC(tiSZbUuzhdixQN8Dzz8Z+qVWXvVloz282KIqk3q/cjv1t3AQ/BwwkHFroqOtGySHLh1KQgly/wZyX3sdaTeyKOQyw75WCJBqpNiWugbRcKBF7eeGAQdvtMHEAJTomycF+Y7P6COEHAFRjW2OjvSx+Sqm3DeOl5XxbfpQWLFktGTTCO/18+JejVJ8b8odRxYRXAyLB/BA12f8DYqVWlsaLM7HvBZdhW9RLGVH1OHM+s5gCnLoQKZoZ4zwounPD/dpfAPo9a4U1U6qNIpXsfin2FweY3xZUhJH)
spring.datasource.xzxtdb.username=ENC(AcwX02W3j68cs+8BTDI9Sw==)
spring.datasource.xzxtdb.password=ENC(kB78UiJzT7X+gn2hy9HnYO8JZJhfBnVQ)
spring.datasource.xzxtdb.type=com.alibaba.druid.pool.DruidDataSource
#oracle���ݿ�����(ȫ����)
#oracle\uFFFD\uFFFD\uFFFD\u077F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD(\u022B\uFFFD\uFFFD\uFFFD\uFFFD)
spring.datasource.qgdb.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.qgdb.url=ENC(tiSZbUuzhdixQN8Dzz8Z+qVWXvVloz282KIqk3q/cjv1t3AQ/BwwkHFroqOtGySHLh1KQgly/wZyX3sdaTeyKOQyw75WCJBqpNiWugbRcKBF7eeGAQdvtMHEAJTomycF+Y7P6COEHAFRjW2OjvSx+Sqm3DeOl5XxbfpQWLFktGTTCO/18+JejVJ8b8odRxYRXAyLB/BA12f8DYqVWlsaLM7HvBZdhW9RLGVH1OHM+s5gCnLoQKZoZ4zwounPD/dpfAPo9a4U1U6qNIpXsfin2FweY3xZUhJH)
spring.datasource.qgdb.username=ENC(AcwX02W3j68cs+8BTDI9Sw==)
spring.datasource.qgdb.password=ENC(kB78UiJzT7X+gn2hy9HnYO8JZJhfBnVQ)
spring.datasource.qgdb.type=com.alibaba.druid.pool.DruidDataSource
#xmlɨ��
#\u5377\u5B97\u4E0A\u4F20\u7684\u8DEF\u5F84
approvalFilePath = /data/excel/approvalWord/
#\u65B0\u589E\u5377\u5B97\u5927\u6570\u636E\u6A21\u578B\u4E0B\u8F7D\u8DEF\u5F84
approvalDownload = http://47.92.48.137:1009/excel/approvalWord/
#\u65B0\u589E\u5377\u5B97\u5927\u6570\u636E\u6A21\u578B\u4E0B\u8F7D\u6A21\u677F\u7684\u8DEF\u5F84
approvalDownloadTemplate = http://47.92.48.137:1009/excel/approvalWord/ApprovalWordTemplate.docx
#xml\u0268\uFFFD\uFFFD
mybatis-plus.mapper-locations=classpath*:com/founder/publicapi/mapper/*/xml/*.xml
#es�������ر�
#es\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0631\uFFFD
management.health.elasticsearch.enabled=false
#������λ
#\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03BB
ssdw=540000000000
#server.tomcat.basedir: /tmp/tomcat
#阿里云用dev 公安网用prod
#\u963F\u91CC\u4E91\u7528dev \u516C\u5B89\u7F51\u7528prod
environment=prod
#FTP服务器ip
#FTP\u670D\u52A1\u5668ip
host=65.26.2.173
#FTP服务器端口
#FTP\u670D\u52A1\u5668\u7AEF\u53E3
port=2233
#FTP登录账号
#FTP\u767B\u5F55\u8D26\u53F7
usernameFtp=root
#FTP登录密码
#FTP\u767B\u5F55\u5BC6\u7801
password=Hnsgat12#$1
#FTP服务器基础目录,/data2/images
#FTP\u670D\u52A1\u5668\u57FA\u7840\u76EE\u5F55,/data2/images
basePath=/data/hnxz/images
imagesUrl=http://65.26.2.173:1008/images/
#mongodb配置 车主
#mongodb\u914D\u7F6E \u8F66\u4E3B
spring.data.mongodb.primary.uri=mongodb://fz:wc%40thailand@155.1.11.212:28001/whale
#mongodb配置 机主
#mongodb\u914D\u7F6E \u673A\u4E3B
spring.data.mongodb.second.uri=mongodb://fz:wc%40thailand@155.1.11.213:28001/whale
logging.level.org.springframework.data.mongodb.core=DEBUG
#poi检索地址
#poi\u68C0\u7D22\u5730\u5740
addressPoiUrl=http://220.26.6.1:8088/PGIS_S_Address/fullSearch
\ No newline at end of file
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