Commit 822e93724e761aa464cc8d392b208ec35a73ae20

Authored by hujiaqi
1 parent 399e9757ae

修改儿童建档

Showing 1 changed file with 7 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 822e937
... ... @@ -15,7 +15,6 @@
15 15 import com.lyms.platform.operate.web.result.*;
16 16 import com.lyms.platform.operate.web.utils.BabyListTask;
17 17 import com.lyms.platform.operate.web.utils.GrowthCountTask;
18   -import com.lyms.platform.operate.web.utils.HiskCountTask;
19 18 import com.lyms.platform.operate.web.utils.MessageCenterService;
20 19 import com.lyms.platform.permission.model.Organization;
21 20 import com.lyms.platform.permission.model.OrganizationQuery;
... ... @@ -32,7 +31,6 @@
32 31 import javax.servlet.http.HttpServletResponse;
33 32 import java.io.IOException;
34 33 import java.io.OutputStream;
35   -import java.text.DecimalFormat;
36 34 import java.util.*;
37 35 import java.util.concurrent.*;
38 36  
... ... @@ -201,7 +199,7 @@
201 199 * @return
202 200 */
203 201 public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request, Integer userId) {
204   - BabyModel model = getBabyModel(request);
  202 + BabyModel model = getBabyModel(request,false);
205 203 model.setModified(new Date());
206 204 model.setOperator(userId);
207 205 if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) {
... ... @@ -486,7 +484,7 @@
486 484 return br;
487 485 }
488 486  
489   - BabyModel model = getBabyModel(request);
  487 + BabyModel model = getBabyModel(request,true);
490 488 model.setPid(babyPersonId);
491 489 model.setOperator(userId);
492 490 if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) {
... ... @@ -722,7 +720,8 @@
722 720 * @param b
723 721 * @return
724 722 */
725   - private BabyModel getBabyModel(BabyBookbuildingAddRequest b) {
  723 + private BabyModel getBabyModel(BabyBookbuildingAddRequest b,boolean isAdd) {
  724 + // hujiaqi添加了一个字段,判断是插入还是更新,如果是更新,就不更新birth字段
726 725 BabyModel bm = new BabyModel();
727 726 bm.setYn(YnEnums.YES.getId());
728 727  
... ... @@ -743,7 +742,9 @@
743 742 bm.setName(b.getBabyName());
744 743 bm.setSex(b.getSex());
745 744 bm.setCardNo(b.getBabyCardNo());
746   - bm.setBirth(DateUtil.parseYMD(b.getBabyBirthday()));
  745 + if(isAdd) {
  746 + bm.setBirth(DateUtil.parseYMD(b.getBabyBirthday()));
  747 + }
747 748 bm.setAddress(b.getHomeAddress());
748 749 bm.setProvinceId(b.getHomeProvinceId());
749 750 bm.setCityId(b.getHomeCityId());