Commit 0c8e7dd4 authored by 廖旭伟's avatar 廖旭伟

优化证照目录获取方式

parent 76cca374
......@@ -146,7 +146,7 @@ public class DataInterfaceController extends BaseJsonBodyController {
//二维码地址
formContentJson.put("@qrcode_1_二维码","");
applyLogPdu.setFormContent(formContentJson.toJSONString());
applyLogService.midSaveApplyLog(applyLogPdu,1l);
applyLogService.midSaveApplyLog(applyLogPdu,"食品经营许可证");
ret.put("data",applyLogPdu);
model.put("message_info", "生成证照成功");
}
......
......@@ -62,8 +62,8 @@ public interface ApplyLogService extends ICRUDService<ApplyLogEntity,Long>{
/***
* 微中台接口数据转存
* @param pdu
* @param classifyId
* @param classifyName
* @throws AppException
*/
void midSaveApplyLog(ApplyLogPdu pdu,Long classifyId) throws AppException;
void midSaveApplyLog(ApplyLogPdu pdu,String classifyName) throws AppException;
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ import com.mortals.xhx.common.utils.*;
import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity;
import com.mortals.xhx.module.certificate.model.CertificateCatalogQuery;
import com.mortals.xhx.module.certificate.model.CertificateClassifyEntity;
import com.mortals.xhx.module.certificate.model.CertificateClassifyQuery;
import com.mortals.xhx.module.certificate.pdu.ApplyLogPdu;
import com.mortals.xhx.module.certificate.service.CertificateCatalogService;
import com.mortals.xhx.module.certificate.service.CertificateClassifyService;
......@@ -84,6 +85,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
@Autowired
private UserService userService;
@Autowired
private CertificateClassifyService certificateClassifyService;
@Override
protected ApplyLogEntity findBefore(ApplyLogEntity entity, PageInfo pageInfo, Context context) throws AppException {
......@@ -570,8 +573,12 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
}
@Override
public void midSaveApplyLog(ApplyLogPdu pdu, Long classifyId) throws AppException {
List<CertificateCatalogEntity> catalogEntityList = this.certificateCatalogService.find(new CertificateCatalogQuery().classifyId(classifyId));
public void midSaveApplyLog(ApplyLogPdu pdu, String classifyName) throws AppException {
CertificateClassifyEntity certificateClassifyEntity = certificateClassifyService.selectOne(new CertificateClassifyQuery().classifyName(classifyName));
if(certificateClassifyEntity==null){
throw new AppException("证照类型名称不正确");
}
List<CertificateCatalogEntity> catalogEntityList = this.certificateCatalogService.find(new CertificateCatalogQuery().classifyId(certificateClassifyEntity.getId()));
if(CollectionUtils.isNotEmpty(catalogEntityList)){
for(CertificateCatalogEntity catalogEntity:catalogEntityList){
ApplyLogEntity entity = new ApplyLogEntity();
......
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