Ver Fonte

Merge branch '20250213_sun' of sckj/mz-cloud into master

sckj há 1 semana atrás
pai
commit
e4b3ffbe79

+ 3 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/domain/GljtSqSq.java

@@ -40,6 +40,9 @@ public class GljtSqSq extends BaseEntity
     @ApiModelProperty(value = "老人主键")
     private String lrId;
 
+    @ApiModelProperty(value = "老人主键")
+    private String lrHiId;
+
     /** 行政区划 */
     @Excel(name = "行政区划")
     @ApiModelProperty(value = "行政区划", required = true)

+ 4 - 2
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/service/impl/GljtSqSqServiceImpl.java

@@ -223,7 +223,8 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
             lr.setStatus(GljtLrStatus.FF.getCode());
             try {
                 asyncIn(gljtSqSq);
-                gljtSqUtils.insertLrHi(lr, "0");
+                String lrHiId = gljtSqUtils.insertLrHiSq(lr, "0");
+                gljtSqSq.setLrHiId(lrHiId);
             } catch (Exception ignored) {}
         } else {
             lr.setStatus(GljtLrStatus.DJ.getCode());
@@ -289,7 +290,8 @@ public class GljtSqSqServiceImpl implements IGljtSqSqService
                 asyncIn(old);
                 BeanUtil.copyProperties(gljtSqSq, gljtSqLr, new CopyOptions().ignoreNullValue());
                 gljtSqLr.setStatus(GljtLrStatus.FF.getCode());
-                gljtSqUtils.insertLrHi(gljtSqLr, "0");
+                String lrHiId = gljtSqUtils.insertLrHiSq(gljtSqLr, "0");
+                gljtSqSq.setLrHiId(lrHiId);
             } catch (Exception ignored) {}
             gljtSqLrMapper.updateById(lr);
         } else if (StringUtils.equals(gljtSqSq.getStatus(), GljtAdStatus.FPASS.getCode())) {

+ 13 - 0
ruoyi-modules/mz-gljt/src/main/java/com/ruoyi/gljt/utils/GljtSqUtils.java

@@ -44,6 +44,19 @@ public class GljtSqUtils {
         gljtSqLrHiMapper.insert(in);
     }
 
+    public <T> String insertLrHiSq(T t, String bdyy) {
+        String res = IdUtils.simpleUUID();
+        String now = DateUtils.dateTimeNow();
+        GljtSqLrHi in = new GljtSqLrHi();
+        BeanUtil.copyProperties(t, in, new CopyOptions().ignoreNullValue());
+        in.setBdsj(now);
+        in.setBdyy(bdyy);
+        in.setId(res);
+        in.setState(null);
+        gljtSqLrHiMapper.insert(in);
+        return res;
+    }
+
     public GljtQxpz getQxpz() {
         GljtQxpz pz = gljtQxpzMapper.selectOne(new LambdaQueryWrapper<GljtQxpz>()
                 .likeRight(GljtQxpz::getXzqh, SecurityUtils.getAreaCode().substring(0, 6)));