From ca550af101e422dcb8162b8c91c6423bd9a8cfba Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Sat, 15 May 2021 23:23:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=83=E5=9C=BA=E5=88=86?= =?UTF-8?q?=E9=85=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distributioncard/IDistributionCardDao.java | 1 + .../distribution/impl/DistributionServiceImpl.java | 9 ++++++++- .../distributioncard/IDistributionCardService.java | 1 + .../impl/DistributionCardServiceImpl.java | 5 +++++ .../distributioncard/distribution-card-mapper.xml | 11 +++++++++++ 5 files changed, 26 insertions(+), 1 deletion(-) 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