Commit 170ed31e authored by 廖旭伟's avatar 廖旭伟

增加证照申请档案信息接口

parent bc186c88
......@@ -2142,6 +2142,75 @@ data|object|数据对象
```
### 查询证照申请档案信息
**请求URL:** apply/log/record
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询证照申请档案信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|主键
**请求样例:**
```
{
"id":1
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|array|结果集列表
  id|Long|序号,主键,自增长
  recordId|Long|证照档案ID
  catalogId|Long|证照目录ID
  catalogCode|String|证照目录编号
  catalogName|String|目录名称
  certificateCode|String|证件编号
  certificateName|String|证件名称
  issueTime|Date|颁发时间
  pickerName|String|取件人姓名
  pickerIDCardNo|String|取件人证件号码
  holderType|Integer|持有者类型,1:自然人,2:法人,3:自然人法人
  holderIdType|Integer|持有者证件类型,1:身份证,2:组织机构代码等
  holderName|String|持有者名称
  holderIDCardNo|String|持有者证件号码
  enterpriseName|String|企业名称
  validityStart|Date|有效期起始
  validityEnd|Date|有效期截止
  privateID|String|专网ID
  certificateUrl|String|证件附件地址
  previewUrl|String|证件预览地址
  formContent|String|证照模板正本表单内容
  formTemplate|String|证照模板正本表单内容
  generateStatus|Integer|生成状态1未生成2已生成
  operType|Integer|档案操作类型1新增2变更
  createUserId|Long|创建用户
  createTime|Date|创建时间
  updateUserId|Long|更新用户
  updateTime|Date|更新时间
dict|object|字典对象
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
## 证照打印记录
### 查询证照打印记录列表
......
package com.mortals.xhx.common.code;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.common.IBaseEnum;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Created by chendilin on 2018/3/7.
*/
public enum OperTypeEnum {
public enum OperTypeEnum implements IBaseEnum {
SAVE(0,"新增"),
UPDATE(1,"修改"),
DELETE(2,"删除"),
OTHER(-1,"其它");
SAVE(0,"新增", SysConstains.STYLE_DEFAULT),
UPDATE(1,"修改", SysConstains.STYLE_DEFAULT),
DELETE(2,"删除", SysConstains.STYLE_DEFAULT),
OTHER(-1,"其它", SysConstains.STYLE_DEFAULT);
private int value;
private String msg;
private String desc;
private String style;
private OperTypeEnum(int value,String msg) {
OperTypeEnum(int value, String desc, String style) {
this.value = value;
this.msg = msg;
this.desc = desc;
this.style = style;
}
@Override
public int getValue() {
return this.value;
}
public static Map<String,String> getEnumMap(){
Map<String,String> resultMap = new HashMap<>();
OperTypeEnum[] operTypeEnum = OperTypeEnum.values();
for (OperTypeEnum typeEnum : operTypeEnum) {
resultMap.put(String.valueOf(typeEnum.value),typeEnum.msg);
public String getDesc() {
return desc;
}
public String getStyle()
{
return style;
}
public static OperTypeEnum getByValue(int value) {
for (OperTypeEnum e : OperTypeEnum.values()) {
if (e.getValue() == value) {
return e;
}
}
return null;
}
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (OperTypeEnum item : OperTypeEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
......
......@@ -36,7 +36,9 @@ public class CertificateClassifyServiceImpl extends AbstractCRUDServiceImpl<Cert
throw new AppException("分类名称重复");
}
entity.setTotal(0);
entity.setSort(0);
if(entity.getSort()==null){
entity.setSort(0);
}
entity.setShowFront(0);
entity.setClassifyType(1);
}
......
......@@ -18,8 +18,7 @@ public class ApplyLogVo extends BaseEntityLong {
/** 查询条件 */
private String query;
/**
* 证照目录编号
*/
private String catalogCode;
/** 操作类型名称 */
private String operTypeName;
}
\ No newline at end of file
......@@ -5,6 +5,8 @@ import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import java.util.List;
/**
* ApplyLogService
*
......@@ -30,4 +32,11 @@ public interface ApplyLogService extends ICRUDService<ApplyLogEntity,Long>{
void generateOriginal(ApplyLogEntity applyLogEntity, Context context) throws AppException;
/**
* 变更记录
* @param applyId
* @return
* @throws AppException
*/
List<ApplyLogEntity> ApplyRecord(Long applyId) throws AppException;
}
\ No newline at end of file
......@@ -16,6 +16,8 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.mortals.framework.model.PageInfo;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.ClassifyType;
import com.mortals.xhx.common.code.GenerateStatus;
import com.mortals.xhx.common.code.OperTypeEnum;
......@@ -80,6 +82,9 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
@Autowired
private RecordDao recordDao;
@Autowired
private UserService userService;
@Override
protected ApplyLogEntity findBefore(ApplyLogEntity entity, PageInfo pageInfo, Context context) throws AppException {
ApplyLogQuery query = new ApplyLogQuery();
......@@ -246,6 +251,29 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
printWaitQueueService.creatWaitQueueByApply(applyLogEntity, GenerateStatus.ORIGINAL.getValue(),context);
}
@Override
public List<ApplyLogEntity> ApplyRecord(Long applyId) throws AppException {
ApplyLogEntity applyLogEntity = this.dao.get(applyId);
if(applyLogEntity==null){
throw new AppException("数据不存在");
}
UserEntity userEntity = userService.get(applyLogEntity.getCreateUserId());
ApplyLogEntity query = new ApplyLogEntity();
query.setRecordId(applyLogEntity.getRecordId());
List<ApplyLogEntity> list = dao.getList(query);
for(ApplyLogEntity entity:list){
OperTypeEnum operTypeEnum = OperTypeEnum.getByValue(entity.getOperType());
if(operTypeEnum!=null){
entity.setOperTypeName(operTypeEnum.getDesc()+entity.getCertificateName());
}
if(userEntity!=null){
entity.setCreateUserName(userEntity.getRealName());
}
}
return list;
}
private String preview(DocTemplateVO docTemplate,Context context){
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
//转换表单参数为map集合
......
......@@ -103,4 +103,25 @@ public class ApplyLogController extends BaseCRUDJsonBodyMappingController<ApplyL
return ret;
}
/**
* 档案
*/
@PostMapping(value = "record")
@UnAuth
public Rest<Object> record(@RequestBody ApplyLogEntity applyLogEntity) {
Rest<Object> ret = new Rest();
try {
List<ApplyLogEntity> list = this.service.ApplyRecord(applyLogEntity.getId());
ret.setCode(VALUE_RESULT_SUCCESS);
ret.setMsg("查询档案成功");
ret.setData(list);
} catch (Exception e) {
log.error("查询档案异常", e);
ret.setCode(VALUE_RESULT_FAILURE);
ret.setMsg(super.convertException(e));
}
return ret;
}
}
\ 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