Commit 4757cbd1 authored by 廖旭伟's avatar 廖旭伟

打印接口查询参数修改

parent 6db694bd
package com.mortals.xhx.module.certificate.pdu;
import lombok.Data;
@Data
public class PrintListPdu {
/** 取件人证件号码 */
private String idCard;
/** 证件分类 */
private Long classifyId;
}
......@@ -37,6 +37,16 @@ public class CertificateClassifyServiceImpl extends AbstractCRUDServiceImpl<Cert
}
entity.setTotal(0);
entity.setSort(0);
entity.setShowFront(0);
entity.setClassifyType(1);
}
@Override
protected CertificateClassifyEntity findBefore(CertificateClassifyEntity entity, Context context) throws AppException {
Map<String,String> orderCols = new HashMap<>();
orderCols.put("sort","DESC");
entity.setOrderCols(orderCols);
return entity;
}
@Override
......
......@@ -13,16 +13,22 @@ import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity;
import com.mortals.xhx.module.certificate.model.CertificateClassifyEntity;
import com.mortals.xhx.module.certificate.pdu.PrintListPdu;
import com.mortals.xhx.module.certificate.pdu.PrintSettingPdu;
import com.mortals.xhx.module.certificate.service.CertificateCatalogService;
import com.mortals.xhx.module.certificate.service.CertificateClassifyService;
import com.mortals.xhx.module.record.model.ApplyLogEntity;
import com.mortals.xhx.module.record.model.PrintWaitQueueEntity;
import com.mortals.xhx.module.record.model.PrintWaitQueueQuery;
import com.mortals.xhx.module.record.service.ApplyLogService;
import com.mortals.xhx.module.record.service.PrintWaitQueueService;
import org.apache.commons.collections4.CollectionUtils;
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;
......@@ -36,6 +42,8 @@ public class CertificatePrintController extends BaseJsonBodyController {
@Autowired
private CertificateClassifyService certificateClassifyService;
@Autowired
private CertificateCatalogService certificateCatalogService;
@Autowired
private PrintWaitQueueService printWaitQueueService;
@PostMapping({"setting/info"})
......@@ -136,17 +144,28 @@ public class CertificatePrintController extends BaseJsonBodyController {
/**
* 获取打印文件
*/
@RequestMapping(value = {"list"},method = {RequestMethod.POST, RequestMethod.GET})
@PostMapping({"list"})
@UnAuth
public Rest<Object> listByIDCard(String idCard) {
public Rest<Object> listByIDCard(@RequestBody PrintListPdu pdu) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
String busiDesc = "查询待打印证件";
int code=1;
try {
PrintWaitQueueEntity query = new PrintWaitQueueEntity();
PrintWaitQueueQuery query = new PrintWaitQueueQuery();
query.setPrintStatus(YesNoEnum.NO.getValue());
query.setPickerIDCardNo(idCard);
query.setPickerIDCardNo(pdu.getIdCard());
CertificateCatalogEntity catalogEntity = new CertificateCatalogEntity();
catalogEntity.setClassifyId(pdu.getClassifyId());
List<CertificateCatalogEntity> clist = certificateCatalogService.find(catalogEntity);
if(CollectionUtils.isNotEmpty(clist)){
List<Long> cIdList = new ArrayList<>();
for(CertificateCatalogEntity entity:clist){
cIdList.add(entity.getId());
}
query.setCatalogIdList(cIdList);
}
List<PrintWaitQueueEntity> list = printWaitQueueService.find(query);
model.put("data", list);
model.put("message_info", busiDesc + "成功");
......
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