e2ba1ee0 by 夏齐

首次提交

0 parents
Showing 35 changed files with 1990 additions and 0 deletions
.idea
*.iml
.classpath
.factorypath
.project
.settings
.DS_Store
target
This diff is collapsed. Click to expand it.
package com.pashanhoo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(scanBasePackages={"com.pashanhoo"})
@EnableTransactionManagement
@MapperScan(basePackages = {"com.pashanhoo.**.mapper"})
public class Application {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(Application.class);
app.run(args);
}
}
package com.pashanhoo;
import io.swagger.annotations.Api;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* swagger配置类
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
// 为当前包路径
.apis(RequestHandlerSelectors.basePackage("com.pashanhoo"))
.apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
.paths(PathSelectors.any())
.build();
}
// 构建 api文档的详细信息函数,注意这里的注解引用的是哪个
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
// 页面标题
.title("接口文档")
// 版本号
.version("1.0")
// 描述
.description("API 描述")
.build();
}
}
package com.pashanhoo.common;
public interface CommonConstant {
/**
* 新增校验报错状态
*/
Integer CHECK_ERROR_2002=2002;
/**
* {@code 500 Server Error} (HTTP/1.0 - RFC 1945)
*/
Integer SC_INTERNAL_SERVER_ERROR_500 = 500;
/**
* {@code 200 OK} (HTTP/1.0 - RFC 1945)
*/
Integer SC_OK_200 = 200;
/**
* {@code 200 OK} (HTTP/1.0 - RFC 1945)
*/
Integer SC_INFO_206 = 206;
/**
* {@code 200 OK} (HTTP/1.0 - RFC 1945)
*/
Integer SC_INFO_210 = 210;
/**
* 字典信息缓存
*/
String SYS_DICT_NAME = "sys:dict:name:";
/**
* 字典信息缓存
*/
String SYS_DICT_ID = "sys:dict:id:";
/**
* 字典信息单条
*/
String SYS_DICT_ALL = "sys:dict:all:";
/**
* 字典信息缓存
*/
String SYS_DICT_CODE = "sys:dict:code:";
/**
* 菜单列表
*/
String MENU_TREE = "sys:menu:";
}
package com.pashanhoo.common;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Component
public class EciHttpUtil {
private static Logger logger = LoggerFactory.getLogger(EciHttpUtil.class);
@Value("${app.AppToken}")
private String appToken;
@Value("${app.AppSecret}")
private String appSecret;
@Value("${app.hostUrl}")
private String hostUrl;
public Map doPostForNew(String url, String params) {
logger.info("http request url:" + url);
logger.info("http request url:" + params);
PrintWriter out = null;
BufferedReader in = null;
Map jsonObject = new HashMap();
try{
URL url1=new URL(url);
HttpURLConnection conn= (HttpURLConnection) url1.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("accept","*/*");
conn.setRequestProperty("connection","Keep-Alive");
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setRequestProperty("Content-Type", "application/json;charset=utf-8");
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
long times=System.currentTimeMillis();
String unSignature = appToken + appSecret + times;
String signature = MD5Util.getMD5(unSignature);
conn.setRequestProperty("x-qys-accesstoken", appToken);
conn.setRequestProperty("x-qys-signature", signature);
conn.setRequestProperty("x-qys-timestamp", String.valueOf(times));
logger.info("x-qys-accesstoken==="+appToken);
logger.info("x-qys-signature==="+signature);
logger.info("x-qys-timestamp==="+System.currentTimeMillis());
out=new PrintWriter(new OutputStreamWriter(conn.getOutputStream(),"utf-8"));
out.print(params);
out.flush();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
String result="";
String line;
while ((line = in.readLine()) != null) {
result += line;
}
jsonObject = JSONObject.parseObject(result, Map.class);
}catch (Exception ex){
logger.info("发送 POST 请求出现异常!" + ex);
ex.printStackTrace();
}finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return jsonObject;
}
public Map doGetForNew(String url) {
logger.info("http request url:" + url);
BufferedReader in = null;
String result = "";
Map jsonObject = new HashMap();
try{
URL url1=new URL(url);
HttpURLConnection conn= (HttpURLConnection) url1.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("accept","*/*");
conn.setRequestProperty("connection","Keep-Alive");
conn.setRequestProperty("Charset", "utf-8");
conn.setDoInput(true);
conn.setDoOutput(false);
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
long times=System.currentTimeMillis();
String unSignature = appToken +appSecret + times;
String signature = MD5Util.getMD5(unSignature);
conn.setRequestProperty("x-qys-accesstoken", appToken);
conn.setRequestProperty("x-qys-signature", signature);
conn.setRequestProperty("x-qys-timestamp", String.valueOf(times));
logger.info("x-qys-accesstoken==="+appToken);
logger.info("x-qys-signature==="+signature);
logger.info("x-qys-timestamp==="+System.currentTimeMillis());
conn.connect();
in = new BufferedReader(new InputStreamReader(conn.getInputStream(),"UTF-8"));
String line;
while ((line = in.readLine()) != null) {
result += line;
}
jsonObject = JSONObject.parseObject(result, Map.class);
}catch (Exception ex){
logger.info("发送 POST 请求出现异常!" + ex);
ex.printStackTrace();
}finally {
try {
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return jsonObject;
}
/**
* 文件下载
*
* @param documentId 合同文档ID
* @return
*/
public String download(String documentId,String bh) {
String url = hostUrl + "/document/download" + "?documentId=" + documentId;
InputStream in = null;
String absolutePath = "";
OutputStream out = null;
try{
URL url1=new URL(url);
HttpURLConnection conn= (HttpURLConnection) url1.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("accept","*/*");
conn.setRequestProperty("connection","Keep-Alive");
conn.setRequestProperty("Charset", "utf-8");
conn.setDoInput(true);
conn.setDoOutput(true);
long times=System.currentTimeMillis();
//x-qys-signature生成方式:Md5(AppToken + AppSecret + timestamp),获取32位小写值
String unSignature = appToken + appSecret + times;
String signature = MD5Util.getMD5(unSignature);
conn.setRequestProperty("x-qys-accesstoken", appToken);
conn.setRequestProperty("x-qys-signature", signature);
conn.setRequestProperty("x-qys-timestamp", String.valueOf(times));
logger.info("x-qys-accesstoken==="+appToken);
logger.info("x-qys-signature==="+signature);
logger.info("x-qys-timestamp==="+System.currentTimeMillis());
conn.connect();
in =conn.getInputStream();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");
String dateDir = simpleDateFormat.format(new Date());
File savePath = new File("D:\\ECI\\" + dateDir+bh);
if (!savePath.exists()) {
savePath.mkdirs();
}
File filePath = new File(savePath + "\\" + documentId+".ofd");
if (!filePath.exists()){
filePath.createNewFile();
}
out = new FileOutputStream(filePath);
byte[] buffer = new byte[4096];
int readLength = 0;
while ((readLength = in.read(buffer)) != -1) {
out.write(buffer, 0, readLength);
}
absolutePath = filePath.getAbsolutePath();
out.flush();
}catch (Exception ex){
logger.info("发送 POST 请求出现异常!" + ex);
ex.printStackTrace();
}finally {
try {
if (in != null) {
in.close();
}
if(out != null) {
out.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return absolutePath;
}
}
package com.pashanhoo.common;
import java.security.MessageDigest;
public class MD5Util {
public static String getMD5(String unEncryption) {
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
try {
byte[] btInput = unEncryption.getBytes();
// 获得MD5摘要算法的 MessageDigest 对象
MessageDigest mdInst = MessageDigest.getInstance("MD5");
// 使用指定的字节更新摘要
mdInst.update(btInput);
// 获得密文
byte[] md = mdInst.digest();
// 把密文转换成十六进制的字符串形式
char[] str = new char[md.length * 2];
int k = 0;
for (byte byte0 : md) {
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
str[k++] = hexDigits[byte0 & 0xf];
}
return new String(str).toLowerCase();
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
package com.pashanhoo.common;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PageInfo {
@ApiModelProperty(name = "currentPage",value = "页码")
private Integer currentPage = 1;
@ApiModelProperty(name = "pageSize",value = "每页个数")
private Integer pageSize = 10;
@ApiModelProperty(name = "sortField",value = "排序字段" )
private String sortField;
@ApiModelProperty(name = "sortOrder",value = "升序(asc)或降序(desc)")
private String sortOrder;
public void defaultFillPageProp(String sortField, String sortOrder) {
if(StringUtils.isBlank(this.sortField)) {
this.sortField = sortField;
this.sortOrder = sortOrder;
}
}
}
package com.pashanhoo.common;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.apache.commons.codec.binary.Base64;
import java.io.*;
public class PdfUtil {
/**
* 获取文件base64
*
*/
public static String fileToBase64(InputStream in) {
String base64String="";
try {
byte[] bytes = toByteArray(in);
in.read(bytes);
base64String = Base64.encodeBase64String(bytes);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (null != in) {
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return base64String;
}
}
public static byte[] toByteArray(InputStream input) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buffer = new byte[1024*4];
int n = 0;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
}
return output.toByteArray();
}
}
package com.pashanhoo.common;
import net.glxn.qrgen.core.image.ImageType;
import net.glxn.qrgen.javase.QRCode;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
public class QRCodeUtil {
public static void imgUrl(String url,String fileName) {
try{
ByteArrayOutputStream out= QRCode.from(url).to(ImageType.PNG).stream();
byte[] data = out.toByteArray();
OutputStream oute = new FileOutputStream(new File("E:\\ewm\\"+fileName));
oute.write(data);
oute.flush();
oute.close();
}catch(Exception ex){
ex.printStackTrace();
}
}
}
package com.pashanhoo.common;
import com.pashanhoo.qys.service.EciService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
@Configuration
@EnableScheduling
public class QysTask {
@Autowired
private EciService eciService;
@Scheduled(cron="0 0/5 * * * ?")
public void accessCreateContract() {
System.out.println("===========创建合同定时任务进来了=========");
eciService.accessCreateContract();
System.out.println("===========创建合同定时任务走了=========");
}
}
package com.pashanhoo.common;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
@ApiModel(value = "接口返回对象", description = "接口返回对象")
@JsonInclude
public class Result<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 成功标志
*/
@ApiModelProperty(value = "成功标志")
private boolean success = true;
/**
* 返回处理消息
*/
@ApiModelProperty(value = "返回处理消息")
private String message = "操作成功!";
/**
* 返回代码
*/
@ApiModelProperty(value = "返回代码")
private Integer code = 0;
/**
* 返回数据对象 data
*/
@ApiModelProperty(value = "返回数据对象")
private T result;
/**
* 时间戳
*/
@ApiModelProperty(value = "时间戳")
private long timestamp = System.currentTimeMillis();
public Result() {
}
public Result<T> success(String message) {
this.message = message;
this.code = CommonConstant.SC_OK_200;
this.success = true;
return this;
}
public static Result<Object> ok() {
Result<Object> r = new Result<Object>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage("成功");
return r;
}
public static Result<Object> ok(String msg) {
Result<Object> r = new Result<Object>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setMessage(msg);
return r;
}
public static <T> Result<T> ok(T data) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static Result<String> content(String data) {
Result<String> r = new Result<String>();
r.setSuccess(true);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static Result<Object> info(Object data) {
Result<Object> r = new Result<Object>();
r.setSuccess(false);
r.setCode(CommonConstant.SC_INFO_206);
r.setResult(data);
return r;
}
public static Result<Object> exception(String data) {
Result<Object> r = new Result<Object>();
r.setSuccess(false);
r.setCode(CommonConstant.SC_INFO_210);
r.setMessage(data);
return r;
}
public static <T> Result<T> ok(T data, String msg) {
Result<T> r = new Result<T>();
r.setSuccess(true);
r.setMessage(msg);
r.setCode(CommonConstant.SC_OK_200);
r.setResult(data);
return r;
}
public static Result<String> error(String msg) {
return error(CommonConstant.SC_INTERNAL_SERVER_ERROR_500, msg);
}
public static Result<String> checkError(String msg) {
return error(CommonConstant.CHECK_ERROR_2002, msg);
}
public static Result<String> error(int code, String msg) {
Result<String> r = new Result<String>();
r.setCode(code);
r.setMessage(msg);
r.setSuccess(false);
return r;
}
public static <T> Result<T> error(String message, T data) {
Result<T> r = new Result<T>();
r.setMessage(message);
r.setResult(data);
r.setCode(CommonConstant.SC_INTERNAL_SERVER_ERROR_500);
r.setSuccess(false);
return r;
}
public Result<T> error500(String message) {
this.message = message;
this.code = CommonConstant.SC_INTERNAL_SERVER_ERROR_500;
this.success = false;
return this;
}
// /**
// * 无权限访问返回结果
// */
// public static Result<String> noauth(String msg) {
// return error(CommonConstant.SC_JEECG_NO_AUTHZ, msg);
// }
public static long getSerialVersionUID() {
return serialVersionUID;
}
public boolean getSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public T getResult() {
return result;
}
public void setResult(T result) {
this.result = result;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
}
package com.pashanhoo.common;
import com.pashanhoo.zhj.service.ZhjDatasSynService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
@Configuration
@EnableScheduling
public class ZhjTask {
@Autowired
private ZhjDatasSynService zhjDatasSynService;
//@Scheduled(cron="0 0 21 * * ? ")
public void execute() {
System.out.println("===========每天晚上九点定时任务进来了=========");
zhjDatasSynService.send_bdcYwInfo();
System.out.println("===========每天晚上九点定时任务走了=========");
}
}
package com.pashanhoo.config;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MybatisPlusConfig {
/**
* 分页插件
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
}
package com.pashanhoo.qys.controller;
import com.pashanhoo.common.Result;
import com.pashanhoo.qys.service.EciService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/eci/")
@Api(tags = "电子证照相关接口")
public class EciController {
@Autowired
private EciService eciService;
@PostMapping("accessCreateContract")
@ApiOperation("创建合同接口")
public Result accessCreateContract(@ApiParam("不动产权基本信息id")@RequestParam String zsbs,@ApiParam("证件号码")@RequestParam String qlrzjh,@ApiParam("证书编号")@RequestParam String bh) {
eciService.createContractForHandle(zsbs,qlrzjh,bh);
return Result.ok();
}
@GetMapping("accessDetails")
@ApiOperation("合同详情接口")
public Result accessDetails(@ApiParam("电子证照表主键ID")@RequestParam String biz_id) {
eciService.accessDetailsForHandle(biz_id);
return Result.ok();
}
@GetMapping("accessDownload")
@ApiOperation("下载合同文档接口")
public Result accessDownload(@ApiParam("电子证照表主键ID")@RequestParam String biz_id) {
eciService.accessDownloadForHandle(biz_id);
return Result.ok();
}
@GetMapping("convert")
@ApiOperation("ofd转换服务接口")
public Result convert(@ApiParam("电子证照表主键ID")@RequestParam String biz_id) {
eciService.convertElecForHandle(biz_id);
return Result.ok();
}
}
package com.pashanhoo.qys.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class ActionRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 是
* 签署动作类型:CORPORATE(企业签章),PERSONAL(个人签字),LP(法定代表人签字),AUDIT(审批)
*/
private String type;
/**
* 是
* 签署动作名称
*/
private String name;
/**
* 是
* 签署动作名称
*/
private String autoSign;
/**
* 是
* 签署顺序(从1开始);如果想按顺序签署,则分别设置签署动作的serialNo为1,2,3;如果想无序签署,则设置签署动作的serialNo为1,1,1;设置签署动作顺序为1,2,2时,表示第一个先签署,后两个同时签署。
*/
private Integer serialNo;
}
package com.pashanhoo.qys.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.util.List;
/**
* 创建合同请求实体
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class CreateContractRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 是
* 合同名称
*/
private String subject;
/**
* 否
* 合同编号,对接方系统中的业务编号
*/
private String sn;
/**
* 否
* 用印流程ID
*/
private String categoryId;
/**
* 否
* 是否发起合同,默认true。(true:立即发起;false:保存为草稿)
*/
private boolean send;
/**
* 否
* 合同创建人姓名
*/
private String creatorName;
/**
* 否
* 合同创建人手机号码
*/
private String creatorContact;
/**
* 否
* 发起方名称
*/
private String tenantName;
/**
* 受理申请pdf文件
*/
private MultipartFile file;
/**
* title
*/
private String title;
/**
* title
*/
private String fileType;
/**
* 否
* 签署方,为空时在合同签署完成后需要调用接口“封存合同”主动结束合同
*/
private List<SignatoryRequest> signatories;
/**
* 否
* 模板参数
*/
private List<DocumentParam> documentParams;
}
package com.pashanhoo.qys.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = false)
public class DocumentParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 是
* 模板参数名称
*/
private String name;
/**
* 是
* 模板参数值
*/
private String value;
}
package com.pashanhoo.qys.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 电子证照表实体
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ELEC_LICENSE_INFO")
public class ElecLicenseInfoDo {
/**
* 合同标识,主键,自己生成
*/
/**
* 主键
*/
@TableId(value = "BIZ_ID", type = IdType.UUID)
private String bizId;
/**
* 合同ID
*/
@TableField("CONTRACT_ID")
private Long contractId;
/**
* 模板参数
*/
@TableField("DOCUMENT_PARAM")
private String documentParam;
/**
* 合同文档ID
*/
@TableField("DOCUMENT_ID")
private String documentId;
/**
* 合同类型.1:不动产登记证明.2:不动产权证书.3:不动产查询证明
*/
@TableField("HTLX")
private String htlx;
/**
* 业务号
*/
@TableField("YWH")
private String ywh;
/**
* 证书标识
*/
@TableField("ZSBS")
private String zsbs;
/**
* 提交参数
*/
@TableField("TJCS")
private String tjcs;
/**
* 返回结果
*/
@TableField("FHJG")
private String fhjg;
/**
* 推送状态
*/
@TableField("TSZT")
private String tszt;
/**
* 合同状态(DRAFT:草稿,FILLING:拟定中,SIGNING:签署中,COMPLETE:已完成,REJECTED:已退回,RECALLED:已撤回,EXPIRED:已过期,TERMINATING:作废中,TERMINATED:已作废,DELETE:已删除,FINISHED:强制完成)
*/
@TableField("HTZT")
private String htzt;
/**
* 推送时间
*/
@TableField("TSSJ")
private Date tssj;
/**
* 是否下载 1是2否
*/
@TableField("SFXZ")
private String sfxz;
/**
* ofd文件地址
*/
@TableField("OFD_WJDZ")
private String ofdWjdz;
/**
* 是否转换1是2否
*/
@TableField("SFZH")
private String sfzh;
/**
* jpg文件地址
*/
@TableField("JPG_WJDZ")
private String jpgWjdz;
/**
* jpg文件地址
*/
@TableField("SIGN_URL")
private String signUrl;
/**
* 备注
*/
@TableField("BZ")
private String bz;
/**
* 二维码图片
*/
@TableField("EWMIMAGE")
private byte[] ewmimage;
/**
* 0:临时状态,1:现势,2:历史状态
*/
@TableField("DZZZ_STATE")
private String dzzz_state;
/**
* 0:正常,1:创建合同接口报错,2:合同详情接口报错,3:下载ofd接口报错,4:ofd转换接口报错
*/
@TableField("ERR_STATE")
private String err_state;
/**
* 证书编号
*/
@TableField("ZSBH")
private String zsbh;
/**
* 权利人名称
*/
@TableField("QLRMC")
private String qlrmc;
/**
* 证件号
*/
@TableField("ZJH")
private String zjh;
}
package com.pashanhoo.qys.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = false)
public class SignatoryRequest implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 是
* 签约主体类型:COMPANY(外部企业),PERSONAL(个人)
*/
private String tenantType;
/**
* 是
* 签约主体名称
*/
private String tenantName;
/**
* 是
* 签署顺序(从1开始);如果想按顺序签署,则分别设置签署方的serialNo为1,2,3;如果想无序签署,则设置签署方的serialNo为1,1,1;设置签署方顺序为1,2,2时,表示第一个先签署,后两个同时签署。
*/
private Integer serialNo;
/**
* 是
* 签约主体名称
*/
private String contact;
/**
* 否
* 签署动作,用印流程非预设且签署方为发起方时,使用用户传入的签署动作,其余情况使用用印流程的配置
*/
private List<ActionRequest> actions;
}
package com.pashanhoo.qys.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pashanhoo.qys.entity.ElecLicenseInfoDo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ElecLicenseInfoMapper extends BaseMapper<ElecLicenseInfoDo> {
List<ElecLicenseInfoDo> getEciInfoByZsbs(String zsbs);
List<ElecLicenseInfoDo> getDocumentIdIsNull(String ywh);
/**
* 获取合同文档ID已经入库并且还未下载集合
*
* @return
*/
List<ElecLicenseInfoDo> getWaitForDownload(String ywh);
/**
* 获取已经下载还未转换的集合
*
* @return
*/
List<ElecLicenseInfoDo> getWaitForConvert(String ywh);
/**
* 根据业务号和不动产单元号查询义务人名称
*/
List<String> getYwrMcByCOnditon(@Param("ywh")String ywh, @Param("bdcdyh")String bdcdyh);
void updateEciInfo(@Param("bizId")String bizId);
ElecLicenseInfoDo getElecLicenseInfo(ElecLicenseInfoDo elecLicenseInfoDo);
}
package com.pashanhoo.qys.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pashanhoo.common.Result;
import com.pashanhoo.qys.entity.ElecLicenseInfoDo;
public interface EciService extends IService<ElecLicenseInfoDo> {
/**
* 定时任务执行接口
*/
void accessCreateContract();
/**
* 手动执行创建合同
*/
Result createContractForHandle(String zsbs,String qlrzjh,String bh);
/**
* 手动执行获取详情
*/
Result accessDetailsForHandle(String biz_id);
/**
* 手动执行下载合同
*/
Result accessDownloadForHandle(String biz_id);
/**
* 手动执行ofd转换
*/
Result convertElecForHandle(String biz_id);
}
package com.pashanhoo.zhj.controller;
import com.pashanhoo.common.Result;
import com.pashanhoo.zhj.service.ZhjDatasSynService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/zhj/")
@Api(tags = "智慧局信息同步相关接口")
public class SynZhjInfoController {
@Autowired
private ZhjDatasSynService zhjDatasSynService;
@PostMapping("ZhjDatasSynInfo")
@ApiOperation("定时智慧局数据同步接口")
public Result ZhjDatasSynInfo() {
zhjDatasSynService.send_bdcYwInfo();
return Result.ok();
}
@PostMapping("synZdInfoByywh")
@ApiOperation("手动执行智慧局数据同步接口")
public Result synZdInfoByywh(@ApiParam("业务号")@RequestParam String ywh) {
zhjDatasSynService.synZdInfoByywh(ywh);
return Result.ok();
}
@PostMapping("synHInfoByYwh")
@ApiOperation("手动执行智慧局数据同步接口")
public Result synHInfoByYwh(@ApiParam("业务号")@RequestParam String ywh) {
zhjDatasSynService.synHInfoByYwh(ywh);
return Result.ok();
}
@PostMapping("synQSZTInfoByYwh")
@ApiOperation("手动执行智慧局数据同步接口")
public Result synQSZTInfoByYwh(@ApiParam("业务号")@RequestParam String ywh) {
zhjDatasSynService.synQSZTInfoByYwh(ywh);
return Result.ok();
}
}
package com.pashanhoo.zhj.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("REG_BUS_BDCQZSDJXX")
public class RegBusBdcqzsdjxxDo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "ID", type = IdType.UUID)
private String id;
/**
* 业务号
*/
@TableField("YWH")
private String ywh;
/**
* 不动产权证号
*/
@TableField("BDCQZH")
private String bdcqzh;
/**
* 不动产权证编号
*/
@TableField("BDCQZBH")
private String bdcqzbh;
/**
* 印刷序列号
*/
@TableField("YSXLH")
private String ysxlh;
/**
* 登簿时间
*/
@TableField("DBSJ")
private String dbsj;
/**
* 权利人名称
*/
@TableField("QLRMC")
private String qlrmc;
/**
* 共有情况
*/
@TableField("GYQK")
private String gyqk;
/**
* 坐落
*/
@TableField("ZL")
private String zl;
/**
* 宗地代码
*/
@TableField("ZDDM")
private String zddm;
/**
* 不动产单元号
*/
@TableField("BDCDYH")
private String bdcdyh;
/**
* 权利类型
*/
@TableField("QLLX")
private String qllx;
/**
* 权利性质
*/
@TableField("QLXZ")
private String qlxz;
/**
* 用途
*/
@TableField("YT")
private String yt;
/**
* 面积
*/
@TableField("MJ")
private String mj;
/**
* 使用期限
*/
@TableField("SYQX")
private String syqx;
/**
* 权利其他状况
*/
@TableField("QLQTZK")
private String qlqtzk;
/**
* 附记
*/
@TableField("FJ")
private String fj;
/**
* 抵押登记信息
*/
@TableField("DYDJXX")
private String dydjxx;
/**
* 解除抵押登记信息
*/
@TableField("JCDYDJXX")
private String jcdydjxx;
/**
* 查封情况
*/
@TableField("CFQK")
private String cfqk;
/**
* 解除查封
*/
@TableField("JCCF")
private String jccf;
/**
* 图号
*/
@TableField("TH")
private String th;
/**
* 批文号
*/
@TableField("PWH")
private String pwh;
/**
* 划拨价款
*/
@TableField("HBJK")
private String hbjk;
/**
* 划拨合同号
*/
@TableField("HBHTH")
private String hbhth;
/**
* 发证时间
*/
@TableField("FZSJ")
private String fzsj;
/**
* 终止时间
*/
@TableField("ZZSJ")
private String zzsj;
/**
* 登记类型
*/
@TableField("DJLX")
private String djlx;
/**
* 当前土地或者房屋登记状态
*/
@TableField("STATUS")
private String status;
/**
* 是否注销 分割合并后原数据注销
*/
@TableField("ISLOGOUT")
private String islogout;
/**
* 0:正常办理,1:分割合并变更更正附带确权产生数据
*/
@TableField("ISFDSJ")
private Integer isfdsj;
/**
* 是否历史数据手工录入
*/
@TableField("ISHISTORY")
private String ishistory;
/**
* 是否打印出证
*/
@TableField("ISPRINT")
private String isprint;
/**
* 确权类型
*/
@TableField("RIGHTS")
private String rights;
/**
* 创建者
*/
@TableField("CREATE_BY")
private String create_by;
/**
* 创建日期
*/
@TableField("CREATE_DATE")
private Date create_date;
/**
* 更新者
*/
@TableField("UPDATE_BY")
private String update_by;
/**
* 更新日期
*/
@TableField("UPDATE_DATE")
private Date update_date;
/**
* 备注
*/
@TableField("REMARKS")
protected String remarks;
/**
* 删除标记(0:正常;1:删除;2:审核)
*/
@TableField("DEL_FLAG")
protected String del_flag;
/**
* 上手id(原业务id)
*/
@TableField("OLDID")
private String oldid;
}
package com.pashanhoo.zhj.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("SYN_ZHJINFO")
public class SynZhjInfoDo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(value = "ID", type = IdType.UUID)
private String id;
/**
* 业务号
*/
@TableField("YWH")
private String ywh;
/**
* 宗地表同步状态0:未同步 1:已同步
*/
@TableField("ZD_STATE")
private String zd_state;
/**
* 户表同步状态0:未同步 1:已同步
*/
@TableField("H_STATE")
private String h_state;
/**
* 户权属表同步状态0:未同步 1:已同步
*/
@TableField("HQS_STATE")
private String hqs_state;
/**
* 创建者
*/
@TableField("CREATE_BY")
private String create_by;
/**
* 创建日期
*/
@TableField("CREATE_DATE")
private Date create_date;
/**
* 更新者
*/
@TableField("UPDATE_BY")
private String update_by;
/**
* 更新日期
*/
@TableField("UPDATE_DATE")
private Date update_date;
/**
* 删除标记(0:正常;1:删除;2:审核)
*/
@TableField("DEL_FLAG")
protected String del_flag;
}
package com.pashanhoo.zhj.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pashanhoo.zhj.entity.RegBusBdcqzsdjxxDo;
import com.pashanhoo.zhj.entity.SynZhjInfoDo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface RegBusBdcqzsdjxxMapper extends BaseMapper<RegBusBdcqzsdjxxDo> {
/**
* 批量业务号查询登记信息表数据
* @param selectAllListInfo
* @return
*/
List<RegBusBdcqzsdjxxDo> getZsdjInfoList(List<SynZhjInfoDo> selectAllListInfo);
/**
* 业务号查询登记信息表数据
* @param ywh
* @return
*/
List<RegBusBdcqzsdjxxDo> getZsdjInfoListByYwh(String ywh);
/**
* 根据宗地代码查询宗地信息
* @param regBusBdcqzsdjxxDo
* @return
*/
public List<Map> getZdInfoByZddm(RegBusBdcqzsdjxxDo regBusBdcqzsdjxxDo);
/**
* 根据宗地代码查询户信息
* @param regBusBdcqzsdjxxDo
* @return
*/
public List<Map> getHQSInfoByZddm(RegBusBdcqzsdjxxDo regBusBdcqzsdjxxDo);
/**
* 根据宗地代码查询户权属状态信息
* @param regBusBdcqzsdjxxDo
* @return
*/
public List<Map> getQSZTInfoByZddm(RegBusBdcqzsdjxxDo regBusBdcqzsdjxxDo);
/**
* 查询所有需要创建电子证照并且已经登簿的业务信息
* @return
*/
public List<Map> getBdcqzsjbxxInfo();
/**
* 查询所有需要创建电子证照并且已经登簿的业务信息
* @return
*/
public List<Map> getBdcqzsjbxxInfoByYwh(String ywh);
public List<Map> getUserInfo();
public void updateBdcqzsjbxxInfo(String id);
public Map getQlrInfoByYwh(String ywh);
public String getQlrInfoByYwhAndqlr(@Param("ywh") String ywh, @Param("qlrmc") String qlrmc);
public Map getBdcqzsJbxxById(String id);
public String getInfoByValue(@Param("value") String value, @Param("type") String type);
Map getRightsInfo(@Param("bdcdyh")String bdcdyh);
Map getDyqqInfo(@Param("ywh")String ywh,@Param("bdcdyh")String bdcdyh);
String getHtbhInfo(@Param("ywh")String ywh);
Map getBdcjbxxInfo(@Param("bdcdyh")String bdcdyh);
Map getJbxxInfoByYwhAndBdcdyh(@Param("ywh")String ywh,@Param("bdcdyh")String bdcdyh);
Map getJbxxById(@Param("id")String id);
Map getZdjbxxByZddm(@Param("zddm")String zddm);
Map getZrzInfo(@Param("bdcdyh")String bdcdyh);
Map getHInfo(@Param("bdcdyh")String bdcdyh);
}
package com.pashanhoo.zhj.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pashanhoo.zhj.entity.SynZhjInfoDo;
import java.util.List;
public interface SynZhjInfoMapper extends BaseMapper<SynZhjInfoDo> {
List<SynZhjInfoDo> selectAllInfo();
void updatezdzt(String ywh);
void updateHzt(String ywh);
void updateHqszt(String ywh);
}
package com.pashanhoo.zhj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pashanhoo.zhj.entity.RegBusBdcqzsdjxxDo;
public interface ZhjDatasSynService extends IService<RegBusBdcqzsdjxxDo> {
public void send_bdcYwInfo();
public void synZdInfoByywh(String ywh);
public void synHInfoByYwh(String ywh);
public void synQSZTInfoByYwh(String ywh);
}
spring:
profiles:
active: @profile.active@
<?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.pashanhoo.qys.mapper.ElecLicenseInfoMapper">
<update id="updateEciInfo">
update ELEC_LICENSE_INFO set ERR_STATE='0',DZZZ_STATE='1' where biz_id=#{bizId}
</update>
<select id="getEciInfoByZsbs" resultType="com.pashanhoo.qys.entity.ElecLicenseInfoDo">
select * from ELEC_LICENSE_INFO where zsbs=#{zsbs}
</select>
<select id="getDocumentIdIsNull" resultType="com.pashanhoo.qys.entity.ElecLicenseInfoDo">
select *
from ELEC_LICENSE_INFO
where DOCUMENT_ID is null and htzt='COMPLETE' and ywh = #{ywh}
</select>
<select id="getWaitForDownload" resultType="com.pashanhoo.qys.entity.ElecLicenseInfoDo">
select *
from ELEC_LICENSE_INFO
where DOCUMENT_ID is not null
and SFXZ = '2' and ywh = #{ywh}
</select>
<select id="getWaitForConvert" resultType="com.pashanhoo.qys.entity.ElecLicenseInfoDo">
select *
from ELEC_LICENSE_INFO
where SFXZ = '1'
and SFZH = '2'
and ofd_wjdz is not null and ywh = #{ywh}
</select>
<select id="getYwrMcByCOnditon" resultType="java.lang.String">
select qlrmc as ywr
from reg_bus_ywr c
where ywh = #{ywh}
and bdcdyh = #{bdcdyh}
and del_flag = '0'
and qszt = '1'
</select>
<select id="getElecLicenseInfo" resultType="com.pashanhoo.qys.entity.ElecLicenseInfoDo">
select *
from ELEC_LICENSE_INFO
where ywh = #{ywh} and zsbs=#{zsbs} and zsbh=#{zsbh} and zjh=#{zjh}
</select>
</mapper>
<?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.pashanhoo.zhj.mapper.RegBusBdcqzsdjxxMapper">
<update id="updateBdcqzsjbxxInfo">
update reg_bus_bdcqzsdjxx set ISCJDZZZ='1' where ID=#{id}
</update>
<select id="getZsdjInfoList" resultType="com.pashanhoo.zhj.entity.RegBusBdcqzsdjxxDo" parameterType="com.pashanhoo.zhj.entity.SynZhjInfoDo">
select * from reg_bus_bdcqzsdjxx where
del_flag='0'
and
ywh in
<foreach collection="list" item="selectAllListInfo" open="(" close=")" separator=",">
#{selectAllListInfo.ywh,jdbcType=VARCHAR}
</foreach>
</select>
<select id="getZsdjInfoListByYwh" resultType="com.pashanhoo.zhj.entity.RegBusBdcqzsdjxxDo" parameterType="java.lang.String">
select * from reg_bus_bdcqzsdjxx where
del_flag='0'
and ywh=#{ywh}
</select>
<select id="getZdInfoByZddm" parameterType="string" resultType="java.util.Map">
select c.seachcity as djqdm,
(select label
from sys_dict b
where type = 'reg_bus_djq'
and b.value = c.seachcity) as djqmc,
c.seachdistrict as djzqdm,
(select label
from sys_dict b
where type = 'reg_bus_djzq'
and b.value = c.seachdistrict) as djzqmc,
c.bdcdyh,
c.zl,
c.zdmj,
c.yt
from reg_base_zdjbxx c,reg_bus_bdcqzsdjxx a
where a.del_flag = '0'
and a.islogout = '0'
and a.bdcdyh = c.bdcdyh
and a.bdcdyh=#{bdcdyh}
and a.ywh=#{ywh}
and c.del_flag = '0'
</select>
<select id="getHQSInfoByZddm" parameterType="string" resultType="java.util.Map">
select c.bdcdyh,
c.zrzh,
c.ch,
c.zl,
c.sjcs,
c.shbw,
c.hx,
c.hxjg,
c.fwyt1,
c.scjzmj,
c.sctnjzmj,
c.scdxbfjzmj,
c.fttdmj,
c.fwlx,
c.fwxz,
b.qllx,
b.djlx,
b.syqmj,
to_char(trunc(b.syqqssj),'yyyy-mm-dd') as syqqssj,
to_char(trunc(b.syqjssj),'yyyy-mm-dd') as syqjssj,
b.bdcqzh,
b.qxdm,
to_char(trunc(b.djsj),'yyyy-mm-dd') as djsj,
b.qszt,
c.zt
from reg_base_h c, reg_bus_jsydsyq b
where c.del_flag = '0'
and c.rights != '3'
and exists (select 1
from reg_bus_bdcqzsdjxx a
where a.del_flag = '0'
and a.islogout = '0'
and a.bdcdyh = c.bdcdyh
and a.ywh=#{ywh}
and a.bdcdyh =#{bdcdyh})
and c.zddm=b.zddm
and b.del_flag = '0'
</select>
<select id="getQSZTInfoByZddm" parameterType="string" resultType="java.util.Map">
select #{bdcdyh} as bdcdyh,
nvl((select decode(qszt,'1','0','1') from reg_bus_dyaq where ywh=#{ywh} and bdcdyh=#{bdcdyh} and del_flag='0' and qszt=1),'0') as dyqszt,
nvl((select decode(qszt,'1','0','1') from reg_bus_ygdj where ywh=#{ywh} and bdcdyh=#{bdcdyh} and del_flag='0' and qszt=1),'0') as ygqszt,
nvl((select decode(qszt,'1','0','1') from reg_bus_yydj where ywh=#{ywh} and bdcdyh=#{bdcdyh} and del_flag='0' and qszt=1),'0') as yyqszt,
nvl((select decode(qszt,'1','0','1') from reg_bus_cfdj where ywh=#{ywh} and bdcdyh=#{bdcdyh} and del_flag='0' and qszt=1),'0') as cfqszt
from dual
</select>
<select id="getBdcqzsjbxxInfo" resultType="java.util.Map">
select c.id,
c.ywh,
c.bdcdyh,
c.bdcqzh,
c.create_date,
c.qlrmc,
c.gyqk,
c.zl,
(select label from sys_dict c where type ='reg_bus_qllx' and value= c.qllx and del_flag='0') qllx,
c.djlx,
c.qlxz,
c.qt,
c.yt,
c.mj,
c.syqx,
c.qlqtzk,
c.fj,
c.rights,
REPLACE(c.dbsj,'-','') as djsj,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'YYYY') as y,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'MM') as m,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'dd') as d,
c.bdcqzbh as bh
from reg_bus_bdcqzsdjxx c
where c.del_flag = '0'
and c.isxydzzz = '1'
and c.iscjdzzz = '0'
and dbsj is not null
</select>
<select id="getBdcqzsjbxxInfoByYwh" resultType="java.util.Map">
select c.id,
c.ywh,
c.bdcdyh,
c.bdcqzh,
c.create_date,
c.qlrmc,
c.gyqk,
c.zl,
(select label from sys_dict c where type ='reg_bus_qllx' and value= c.qllx and del_flag='0') qllx,
c.djlx,
c.qlxz,
c.qt,
c.yt,
c.mj,
c.syqx,
c.qlqtzk,
c.fj,
c.rights,
REPLACE(c.dbsj,'-','') as djsj,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'YYYY') as y,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'MM') as m,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'dd') as d,
c.bdcqzbh as bh
from reg_bus_bdcqzsdjxx c
where c.del_flag = '0'
and c.isxydzzz = '1'
and c.iscjdzzz = '0'
and c.ywh=#{ywh}
and dbsj is not null
</select>
<select id="getQlrInfoByYwh" resultType="java.util.Map">
select wm_concat(qlrmc) as qlrmc,wm_concat(zjh) as zjh from reg_bus_qlr c where ywh =#{ywh} and del_flag='0' and qszt='1' order by sxh
</select>
<select id="getQlrInfoByYwhAndqlr" resultType="java.lang.String">
select zjh from reg_bus_qlr c where ywh =#{ywh} and qlrmc=#{qlrmc} and del_flag='0' and qszt='1' order by sxh
</select>
<select id="getBdcqzsJbxxById" resultType="java.util.Map">
select c.id,
c.ywh,
c.bdcdyh,
c.bdcqzh,
c.create_date,
c.qlrmc,
c.gyqk,
c.zl,
(select label from sys_dict c where type ='reg_bus_qllx' and value= c.qllx and del_flag='0') qllx,
c.djlx,
c.qlxz,
c.qt,
c.yt,
c.mj,
c.syqx,
c.qlqtzk,
c.fj,
c.rights,
REPLACE(c.dbsj,'-','') as djsj,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'YYYY') as y,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'MM') as m,
to_char(to_date(c.dbsj, 'yyyy-mm-dd'),'dd') as d,
c.bdcqzbh as bh
from reg_bus_bdcqzsdjxx c
where c.id=#{id}
</select>
<select id="getInfoByValue" resultType="java.lang.String">
select label from sys_dict c where del_flag='0' and type=#{type} and value=#{value}
</select>
<select id="getRightsInfo" resultType="java.util.Map">
select * from ( SELECT * FROM reg_bus_rights a WHERE a.bdcdyh = #{bdcdyh} order by del_flag ) where rownum=1
</select>
<select id="getDyqqInfo" resultType="java.util.Map">
select c.bdbzzqse,to_char(c.zwlxqssj,'yyyymmdd') as zwlxqssj,to_char(c.zwlxjssj,'yyyymmdd') as zwlxjssj from reg_bus_dyaq c where ywh=#{ywh} and bdcdyh=#{bdcdyh} and qszt='1'
</select>
<select id="getHtbhInfo" resultType="java.lang.String">
select htbh from reg_bus_ygdj c where qszt='1' and del_flag='0' and ywh=#{ywh}
</select>
<select id="getBdcjbxxInfo" resultType="java.util.Map">
select * from reg_bus_bdcqzsdjxx c where bdcdyh=#{bdcdyh} and islogout='0' and dbsj is not null and del_flag='0'
</select>
<select id="getJbxxInfoByYwhAndBdcdyh" resultType="java.util.Map">
select * from reg_bus_bdcqzsdjxx c where ywh=#{ywh} and bdcdyh=#{bdcdyh} and islogout='0' and dbsj is not null and del_flag='0'
</select>
<select id="getJbxxById" resultType="java.util.Map">
select * from reg_bus_bdcqzsdjxx c where id=#{id}
</select>
<select id="getZdjbxxByZddm" resultType="java.util.Map">
select * from reg_base_zdjbxx where del_flag='0' and zddm=#{zddm} and islogout='0'
</select>
<select id="getZrzInfo" resultType="java.util.Map">
select * from reg_base_zrz where bdcdyh=#{bdcdyh} and del_flag='0'
</select>
<select id="getHInfo" resultType="java.util.Map">
select * from reg_base_h c where bdcdyh=#{bdcdyh} and islogout='0' and del_flag='0'
</select>
</mapper>
<?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.pashanhoo.zhj.mapper.SynZhjInfoMapper">
<select id="selectAllInfo" resultType="com.pashanhoo.zhj.entity.SynZhjInfoDo">
select * from syn_zhjinfo where ZD_STATE='0' and H_STATE='0' and HQS_STATE='0' and del_flag='0'
</select>
<update id="updatezdzt">
update syn_zhjinfo set ZD_STATE='1' where ywh=#{ywh}
</update>
<update id="updateHzt">
update syn_zhjinfo set H_STATE='1' where ywh=#{ywh}
</update>
<update id="updateHqszt">
update syn_zhjinfo set HQS_STATE='1' where ywh=#{ywh}
</update>
</mapper>