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

优化证照目录获取方式

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