图片套版生成模块

This commit is contained in:
cuibaocheng 2021-05-05 16:59:54 +08:00
parent 5dfd58f787
commit 20da5aa0a0
2 changed files with 11 additions and 9 deletions

View File

@ -22,7 +22,7 @@ public interface IDistributionCardService {
* 考场分配准考证
* @return
*/
void buildingPictures(String classPlanId, String planId) throws Exception;
void saveBuildingPictures(String classPlanId, String planId) throws Exception;
/**

View File

@ -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<String, Object> 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;
}