diff --git a/src/main/java/cn/com/tenlion/dao/examination/distributioncard/IDistributionCardDao.java b/src/main/java/cn/com/tenlion/dao/examination/distributioncard/IDistributionCardDao.java index 7bf7cf5..e909b2c 100644 --- a/src/main/java/cn/com/tenlion/dao/examination/distributioncard/IDistributionCardDao.java +++ b/src/main/java/cn/com/tenlion/dao/examination/distributioncard/IDistributionCardDao.java @@ -117,4 +117,5 @@ public interface IDistributionCardDao { */ Integer count(Map params) throws SearchException; + void updateFieldId(Map update) throws UpdateException; } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java index 2acff27..efc5596 100644 --- a/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/examination/distribution/impl/DistributionServiceImpl.java @@ -322,7 +322,14 @@ public class DistributionServiceImpl extends DefaultBaseService implements IDist vo.setFieldName(field.getOrganizationName()); vo.setFieldNumber(field.getOrganizationUserNum()); vo.setFieldStatus("0"); - iDistributionFieldService.save(vo); + String distributionFieldId = iDistributionFieldService.saveReturnId(vo); + /** + * 更新card关联 + */ + Map update = new HashMap(); + update.put("fieldId", field.getOrganizationId()); + update.put("distributionFieldId", distributionFieldId); + iDistributionCardService.updateFieldId(update); } /** * 保存考试申请 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 aca7ee6..aa779c4 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 @@ -213,4 +213,5 @@ public interface IDistributionCardService { */ Integer count(Map params); + void updateFieldId(Map update); } \ No newline at end of file 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 35a3e82..433061c 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 @@ -323,4 +323,9 @@ public class DistributionCardServiceImpl extends DefaultBaseService implements I return count == null ? 0 : count; } + @Override + public void updateFieldId(Map update) { + distributionCardDao.updateFieldId(update); + } + } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/distributioncard/distribution-card-mapper.xml b/src/main/resources/mybatis/mapper/distributioncard/distribution-card-mapper.xml index 589eea5..15daae8 100644 --- a/src/main/resources/mybatis/mapper/distributioncard/distribution-card-mapper.xml +++ b/src/main/resources/mybatis/mapper/distributioncard/distribution-card-mapper.xml @@ -129,6 +129,17 @@ + + UPDATE + e_distribution_card + SET + distribution_field_id = #{distributionFieldId}, + gmt_modified = #{gmtModified}, + modifier = #{modifier} + WHERE + distribution_field_id = #{fieldId} + + UPDATE