Commit c4f1b7ef authored by 廖旭伟's avatar 廖旭伟

终端打印文件查询接口bug修改,打印成功后记录打印次数

parent 32bd3ce7
......@@ -153,13 +153,15 @@ public class CertificatePrintController extends BaseJsonBodyController {
CertificateCatalogEntity catalogEntity = new CertificateCatalogEntity();
catalogEntity.setClassifyId(pdu.getClassifyId());
List<CertificateCatalogEntity> clist = certificateCatalogService.find(catalogEntity);
if(CollectionUtils.isNotEmpty(clist)){
List<Long> cIdList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(clist)){
for(CertificateCatalogEntity entity:clist){
cIdList.add(entity.getId());
}
query.setCatalogIdList(cIdList);
}else {
cIdList.add(-1l);
}
query.setCatalogIdList(cIdList);
List<PrintWaitQueueEntity> list = printWaitQueueService.find(query);
model.put("data", list);
model.put("message_info", busiDesc + "成功");
......
......@@ -4,7 +4,9 @@ import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity;
import com.mortals.xhx.module.certificate.model.CertificateClassifyEntity;
import com.mortals.xhx.module.certificate.model.CertificateClassifyQuery;
import com.mortals.xhx.module.certificate.service.CertificateCatalogService;
import com.mortals.xhx.module.certificate.service.CertificateClassifyService;
import com.mortals.xhx.module.record.dao.PrintLogDao;
import com.mortals.xhx.module.record.dao.RetainLogDao;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
......@@ -52,6 +54,8 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
private RetainLogDao retainLogDao;
@Autowired
private CertificateCatalogService certificateCatalogService;
@Autowired
private CertificateClassifyService certificateClassifyService;
@Override
protected void findAfter(PrintWaitQueueEntity entity, Context context, List<PrintWaitQueueEntity> list) throws AppException {
......@@ -199,5 +203,13 @@ public class PrintWaitQueueServiceImpl extends AbstractCRUDServiceImpl<PrintWait
printLogEntity.setPrintStatus(PrintStatus.SUCCESS.getValue());
retainLogDao.insert(retainLogEntity);
printLogDao.insert(printLogEntity);
CertificateCatalogEntity catalogEntity = certificateCatalogService.get(waitQueueEntity.getCatalogId());
CertificateClassifyQuery query = new CertificateClassifyQuery();
query.setId(catalogEntity.getClassifyId());
query.setTotalIncrement(1);
query.setUpdateTime(now);
certificateClassifyService.update(query);
}
}
\ 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