Commit 71685c65 authored by 廖旭伟's avatar 廖旭伟

bug修改

parent 4d6c29bb
...@@ -136,6 +136,14 @@ public class RetainLogEntity extends RetainLogVo { ...@@ -136,6 +136,14 @@ public class RetainLogEntity extends RetainLogVo {
* 专网ID * 专网ID
*/ */
private String privateID; private String privateID;
/**
* 申请ID
*/
private Long applyId;
/**
* 打印次数
*/
private Integer total;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -182,5 +190,7 @@ public class RetainLogEntity extends RetainLogVo { ...@@ -182,5 +190,7 @@ public class RetainLogEntity extends RetainLogVo {
this.holderType = 1; this.holderType = 1;
this.holderIdType = 1; this.holderIdType = 1;
this.privateID = ""; this.privateID = "";
this.applyId = null;
this.total = 1;
} }
} }
\ No newline at end of file
...@@ -275,6 +275,36 @@ public class RetainLogQuery extends RetainLogEntity { ...@@ -275,6 +275,36 @@ public class RetainLogQuery extends RetainLogEntity {
/** 专网ID排除列表 */ /** 专网ID排除列表 */
private List <String> privateIDNotList; private List <String> privateIDNotList;
/** 开始 申请ID */
private Long applyIdStart;
/** 结束 申请ID */
private Long applyIdEnd;
/** 增加 申请ID */
private Long applyIdIncrement;
/** 申请ID列表 */
private List <Long> applyIdList;
/** 申请ID排除列表 */
private List <Long> applyIdNotList;
/** 开始 打印次数 */
private Integer totalStart;
/** 结束 打印次数 */
private Integer totalEnd;
/** 增加 打印次数 */
private Integer totalIncrement;
/** 打印次数列表 */
private List <Integer> totalList;
/** 打印次数排除列表 */
private List <Integer> totalNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<RetainLogQuery> orConditionList; private List<RetainLogQuery> orConditionList;
...@@ -1812,6 +1842,168 @@ public class RetainLogQuery extends RetainLogEntity { ...@@ -1812,6 +1842,168 @@ public class RetainLogQuery extends RetainLogEntity {
this.privateIDNotList = privateIDNotList; this.privateIDNotList = privateIDNotList;
} }
/**
* 获取 开始 申请ID
* @return applyIdStart
*/
public Long getApplyIdStart(){
return this.applyIdStart;
}
/**
* 设置 开始 申请ID
* @param applyIdStart
*/
public void setApplyIdStart(Long applyIdStart){
this.applyIdStart = applyIdStart;
}
/**
* 获取 结束 申请ID
* @return $applyIdEnd
*/
public Long getApplyIdEnd(){
return this.applyIdEnd;
}
/**
* 设置 结束 申请ID
* @param applyIdEnd
*/
public void setApplyIdEnd(Long applyIdEnd){
this.applyIdEnd = applyIdEnd;
}
/**
* 获取 增加 申请ID
* @return applyIdIncrement
*/
public Long getApplyIdIncrement(){
return this.applyIdIncrement;
}
/**
* 设置 增加 申请ID
* @param applyIdIncrement
*/
public void setApplyIdIncrement(Long applyIdIncrement){
this.applyIdIncrement = applyIdIncrement;
}
/**
* 获取 申请ID
* @return applyIdList
*/
public List<Long> getApplyIdList(){
return this.applyIdList;
}
/**
* 设置 申请ID
* @param applyIdList
*/
public void setApplyIdList(List<Long> applyIdList){
this.applyIdList = applyIdList;
}
/**
* 获取 申请ID
* @return applyIdNotList
*/
public List<Long> getApplyIdNotList(){
return this.applyIdNotList;
}
/**
* 设置 申请ID
* @param applyIdNotList
*/
public void setApplyIdNotList(List<Long> applyIdNotList){
this.applyIdNotList = applyIdNotList;
}
/**
* 获取 开始 打印次数
* @return totalStart
*/
public Integer getTotalStart(){
return this.totalStart;
}
/**
* 设置 开始 打印次数
* @param totalStart
*/
public void setTotalStart(Integer totalStart){
this.totalStart = totalStart;
}
/**
* 获取 结束 打印次数
* @return $totalEnd
*/
public Integer getTotalEnd(){
return this.totalEnd;
}
/**
* 设置 结束 打印次数
* @param totalEnd
*/
public void setTotalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
}
/**
* 获取 增加 打印次数
* @return totalIncrement
*/
public Integer getTotalIncrement(){
return this.totalIncrement;
}
/**
* 设置 增加 打印次数
* @param totalIncrement
*/
public void setTotalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
}
/**
* 获取 打印次数
* @return totalList
*/
public List<Integer> getTotalList(){
return this.totalList;
}
/**
* 设置 打印次数
* @param totalList
*/
public void setTotalList(List<Integer> totalList){
this.totalList = totalList;
}
/**
* 获取 打印次数
* @return totalNotList
*/
public List<Integer> getTotalNotList(){
return this.totalNotList;
}
/**
* 设置 打印次数
* @param totalNotList
*/
public void setTotalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2683,6 +2875,114 @@ public class RetainLogQuery extends RetainLogEntity { ...@@ -2683,6 +2875,114 @@ public class RetainLogQuery extends RetainLogEntity {
return this; return this;
} }
/**
* 设置 申请ID
* @param applyId
*/
public RetainLogQuery applyId(Long applyId){
setApplyId(applyId);
return this;
}
/**
* 设置 开始 申请ID
* @param applyIdStart
*/
public RetainLogQuery applyIdStart(Long applyIdStart){
this.applyIdStart = applyIdStart;
return this;
}
/**
* 设置 结束 申请ID
* @param applyIdEnd
*/
public RetainLogQuery applyIdEnd(Long applyIdEnd){
this.applyIdEnd = applyIdEnd;
return this;
}
/**
* 设置 增加 申请ID
* @param applyIdIncrement
*/
public RetainLogQuery applyIdIncrement(Long applyIdIncrement){
this.applyIdIncrement = applyIdIncrement;
return this;
}
/**
* 设置 申请ID
* @param applyIdList
*/
public RetainLogQuery applyIdList(List<Long> applyIdList){
this.applyIdList = applyIdList;
return this;
}
/**
* 设置 申请ID
* @param applyIdNotList
*/
public RetainLogQuery applyIdNotList(List<Long> applyIdNotList){
this.applyIdNotList = applyIdNotList;
return this;
}
/**
* 设置 打印次数
* @param total
*/
public RetainLogQuery total(Integer total){
setTotal(total);
return this;
}
/**
* 设置 开始 打印次数
* @param totalStart
*/
public RetainLogQuery totalStart(Integer totalStart){
this.totalStart = totalStart;
return this;
}
/**
* 设置 结束 打印次数
* @param totalEnd
*/
public RetainLogQuery totalEnd(Integer totalEnd){
this.totalEnd = totalEnd;
return this;
}
/**
* 设置 增加 打印次数
* @param totalIncrement
*/
public RetainLogQuery totalIncrement(Integer totalIncrement){
this.totalIncrement = totalIncrement;
return this;
}
/**
* 设置 打印次数
* @param totalList
*/
public RetainLogQuery totalList(List<Integer> totalList){
this.totalList = totalList;
return this;
}
/**
* 设置 打印次数
* @param totalNotList
*/
public RetainLogQuery totalNotList(List<Integer> totalNotList){
this.totalNotList = totalNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -21,6 +21,7 @@ import com.mortals.xhx.module.record.dao.RetainLogDao; ...@@ -21,6 +21,7 @@ import com.mortals.xhx.module.record.dao.RetainLogDao;
import com.mortals.xhx.module.record.model.*; import com.mortals.xhx.module.record.model.*;
import com.mortals.xhx.module.record.service.ApplyLogService; import com.mortals.xhx.module.record.service.ApplyLogService;
import com.mortals.xhx.module.record.service.PrintWaitQueueService; import com.mortals.xhx.module.record.service.PrintWaitQueueService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -156,18 +157,10 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait ...@@ -156,18 +157,10 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
} }
private void doPrintSuccess(PrintWaitQueueEntity waitQueueEntity){ private void doPrintSuccess(PrintWaitQueueEntity waitQueueEntity){
RetainLogEntity retainLogEntity = new RetainLogEntity();
ApplyLogEntity applyLogEntity = applyLogService.get(waitQueueEntity.getApplyId()); ApplyLogEntity applyLogEntity = applyLogService.get(waitQueueEntity.getApplyId());
Date now = new Date(); Date now = new Date();
BeanUtils.copyProperties(applyLogEntity, retainLogEntity, BeanUtil.getNullPropertyNames(applyLogEntity));
retainLogEntity.setId(null);
retainLogEntity.setUpdateUserId(null);
retainLogEntity.setUpdateTime(null);
retainLogEntity.setCertificateStatus(CertificateStatus.NORMAL.getValue());
retainLogEntity.setCreateUserId(waitQueueEntity.getCreateUserId());
retainLogEntity.setCreateTime(now);
PrintLogEntity printLogEntity = new PrintLogEntity(); PrintLogEntity printLogEntity = new PrintLogEntity();
BeanUtils.copyProperties(waitQueueEntity, printLogEntity, BeanUtil.getNullPropertyNames(waitQueueEntity)); BeanUtils.copyProperties(waitQueueEntity, printLogEntity, BeanUtil.getNullPropertyNames(waitQueueEntity));
...@@ -179,7 +172,28 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait ...@@ -179,7 +172,28 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
printLogEntity.setCreateTime(now); printLogEntity.setCreateTime(now);
printLogEntity.setPrintStatus(PrintStatus.SUCCESS.getValue()); printLogEntity.setPrintStatus(PrintStatus.SUCCESS.getValue());
printLogEntity.setStatusRemark(PrintStatus.SUCCESS.getDesc()); printLogEntity.setStatusRemark(PrintStatus.SUCCESS.getDesc());
RetainLogEntity retainLogquery = new RetainLogEntity();
retainLogquery.setApplyId(waitQueueEntity.getApplyId());
List<RetainLogEntity> tempRetainLogList = retainLogDao.getList(retainLogquery);
if(CollectionUtils.isNotEmpty(tempRetainLogList)){
RetainLogQuery updateRetainLog = new RetainLogQuery();
updateRetainLog.setUpdateTime(now);
updateRetainLog.setId(tempRetainLogList.get(0).getId());
updateRetainLog.setTotalIncrement(1);
retainLogDao.update(updateRetainLog);
}else {
RetainLogEntity retainLogEntity = new RetainLogEntity();
BeanUtils.copyProperties(applyLogEntity, retainLogEntity, BeanUtil.getNullPropertyNames(applyLogEntity));
retainLogEntity.setId(null);
retainLogEntity.setUpdateUserId(null);
retainLogEntity.setUpdateTime(null);
retainLogEntity.setCertificateStatus(CertificateStatus.NORMAL.getValue());
retainLogEntity.setCreateUserId(waitQueueEntity.getCreateUserId());
retainLogEntity.setCreateTime(now);
retainLogDao.insert(retainLogEntity); retainLogDao.insert(retainLogEntity);
}
printLogDao.insert(printLogEntity); printLogDao.insert(printLogEntity);
CertificateCatalogEntity catalogEntity = certificateCatalogService.get(waitQueueEntity.getCatalogId()); CertificateCatalogEntity catalogEntity = certificateCatalogService.get(waitQueueEntity.getCatalogId());
CertificateClassifyQuery query = new CertificateClassifyQuery(); CertificateClassifyQuery query = new CertificateClassifyQuery();
...@@ -189,6 +203,9 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait ...@@ -189,6 +203,9 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
certificateClassifyService.update(query); certificateClassifyService.update(query);
ApplyLogEntity updateApply = new ApplyLogEntity(); ApplyLogEntity updateApply = new ApplyLogEntity();
updateApply.setId(applyLogEntity.getId()); updateApply.setId(applyLogEntity.getId());
updateApply.setCertificateCode(applyLogEntity.getCertificateCode());
updateApply.setEnterpriseName(applyLogEntity.getEnterpriseName());
updateApply.setCatalogId(applyLogEntity.getCatalogId());
updateApply.setRecordStatus(YesNoEnum.YES.getValue()); updateApply.setRecordStatus(YesNoEnum.YES.getValue());
updateApply.setUpdateTime(new Date()); updateApply.setUpdateTime(new Date());
applyLogService.update(updateApply); applyLogService.update(updateApply);
......
...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.record.web; ...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.record.web;
import com.mortals.framework.common.IBaseEnum; import com.mortals.framework.common.IBaseEnum;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CertificateStatus; import com.mortals.xhx.common.code.CertificateStatus;
import com.mortals.xhx.common.code.StatusEnum; import com.mortals.xhx.common.code.StatusEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -25,6 +27,8 @@ import java.util.Arrays; ...@@ -25,6 +27,8 @@ import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
import static java.util.stream.Collectors.toMap;
/** /**
* *
* 证照持有 * 证照持有
...@@ -38,6 +42,8 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai ...@@ -38,6 +42,8 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private UserService userService;
public RetainLogController(){ public RetainLogController(){
super.setModuleDesc( "证照持有"); super.setModuleDesc( "证照持有");
...@@ -47,6 +53,7 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai ...@@ -47,6 +53,7 @@ public class RetainLogController extends BaseCRUDJsonBodyMappingController<Retai
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model,"status", IBaseEnum.getEnumMap(StatusEnum.class)); this.addDict(model,"status", IBaseEnum.getEnumMap(StatusEnum.class));
this.addDict(model,"certificateStatus", IBaseEnum.getEnumMap(CertificateStatus.class)); this.addDict(model,"certificateStatus", IBaseEnum.getEnumMap(CertificateStatus.class));
this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
super.init(model, context); super.init(model, context);
} }
......
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