diff --git a/src/main/java/cn/com/tenlion/service/examination/distributioncard/IDistributionCardService.java b/src/main/java/cn/com/tenlion/service/examination/distributioncard/IDistributionCardService.java index b70a140..aca7ee6 100644 --- a/src/main/java/cn/com/tenlion/service/examination/distributioncard/IDistributionCardService.java +++ b/src/main/java/cn/com/tenlion/service/examination/distributioncard/IDistributionCardService.java @@ -22,7 +22,7 @@ public interface IDistributionCardService { * 考场分配准考证 * @return */ - void buildingPictures(String classPlanId, String planId) throws Exception; + void saveBuildingPictures(String classPlanId, String planId) throws Exception; /** diff --git a/src/main/java/cn/com/tenlion/service/examination/distributioncard/impl/DistributionCardServiceImpl.java b/src/main/java/cn/com/tenlion/service/examination/distributioncard/impl/DistributionCardServiceImpl.java index 0dd41cf..147919f 100644 --- a/src/main/java/cn/com/tenlion/service/examination/distributioncard/impl/DistributionCardServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examination/distributioncard/impl/DistributionCardServiceImpl.java @@ -19,7 +19,9 @@ import cn.com.tenlion.service.examination.distributioncard.IDistributionCardServ import cn.com.tenlion.service.examination.distributionfield.IDistributionFieldService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.exceptions.SaveException; +import ink.wgink.module.dictionary.pojo.dtos.DataDTO; import ink.wgink.module.dictionary.service.IAreaService; +import ink.wgink.module.dictionary.service.IDataService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; @@ -61,8 +63,11 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I @Autowired private IApplyService iApplyService; + @Autowired + private IDataService dataDictionaryServiceImpl; + @Override - public void buildingPictures(String classPlanId, String planId) throws Exception { + public void saveBuildingPictures(String classPlanId, String planId) throws Exception { /** * 通过planId查找到考试申请信息 */ @@ -106,7 +111,8 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I userVO.setField(fieldDTO.getFieldName()); userVO.setStation(institutionDTO.getInstitutionName()); userVO.setNumber(j+""); - userVO.setSex(userList.get(i).getApplySex()); + DataDTO dataDTO = dataDictionaryServiceImpl.get(userList.get(i).getApplySex()); + userVO.setSex(dataDTO.getDataName()); userVO.setName(userList.get(i).getApplyName()); userVO.setIcon(userList.get(i).getApplyUserCardPhoto()); userVO.setIdentity(userList.get(i).getApplyCardNumber()); @@ -127,7 +133,7 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I distributionCardVO.setClassPlanId(classPlanId); distributionCardVO.setDistributionId(distributionDTO.getDistributionId()); distributionCardVO.setDistributionCardPictures(base64); - distributionCardVO.setDistributionCardUserSex(userList.get(i).getApplySex()); + distributionCardVO.setDistributionCardUserSex(dataDTO.getDataName()); distributionCardVO.setDistributionCardUserIdentity(userList.get(i).getApplyCardNumber()); distributionCardVO.setDistributionCardUserResult(""); distributionCardVO.setDistributionCardUserStatus("0"); @@ -179,11 +185,7 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I String distributionCardId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(distributionCardVO); params.put("distributionCardId", distributionCardId); - if (StringUtils.isBlank(token)) { - setSaveInfo(params); - } else { - setAppSaveInfo(token, params); - } + setSaveInfo(params); distributionCardDao.save(params); return distributionCardId; }