Browse Source

20221013_sun门户新增老人机构预约相关

15143018065 2 years ago
parent
commit
66d2b2a3a2

+ 9 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/mapper/ZwywLrJgyyMapper.java

@@ -1,5 +1,6 @@
 package com.ruoyi.business.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.ruoyi.business.domain.ZwywLrJgyy;
 import com.ruoyi.common.datascope.handler.DataColumn;
 import com.ruoyi.common.datascope.handler.DataPermission;
@@ -22,4 +23,12 @@ public interface ZwywLrJgyyMapper extends BaseMapperPlus<ZwywLrJgyy> {
     public List<ZwywLrJgyy> selectLrJgyyList(ZwywLrJgyy zwywLrJgyy);
     public ZwywLrJgyy selectLrJgyyListById(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
+    public ZwywLrJgyy selectPortalZwywLrJgyyById(String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    public List<ZwywLrJgyy> selectPortalZwywLrJgyyList(ZwywLrJgyy zwywLrJgyy);
+
+    @InterceptorIgnore(tenantLine = "true")
+    public int insertPortalZwywLrJgyy(ZwywLrJgyy zwywLrJgyy);
 }

+ 8 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/IZwywLrJgyyService.java

@@ -22,6 +22,9 @@ public interface IZwywLrJgyyService
     @Slave
     public ZwywLrJgyy selectZwywLrJgyyById(String id);
 
+    @Slave
+    public ZwywLrJgyy selectPortalZwywLrJgyyById(String id);
+
     /**
      * 查询老人机构预约列表
      *
@@ -31,6 +34,9 @@ public interface IZwywLrJgyyService
     @Slave
     public List<ZwywLrJgyy> selectZwywLrJgyyList(ZwywLrJgyy zwywLrJgyy);
 
+    @Slave
+    public List<ZwywLrJgyy> selectPortalZwywLrJgyyList(ZwywLrJgyy zwywLrJgyy);
+
     /**
      * 新增老人机构预约
      *
@@ -39,6 +45,8 @@ public interface IZwywLrJgyyService
      */
     public int insertZwywLrJgyy(ZwywLrJgyy zwywLrJgyy);
 
+    public int insertPortalZwywLrJgyy(ZwywLrJgyy zwywLrJgyy);
+
     /**
      * 修改老人机构预约
      *

+ 20 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/impl/ZwywLrJgyyServiceImpl.java

@@ -35,6 +35,12 @@ public class ZwywLrJgyyServiceImpl implements IZwywLrJgyyService
         return jgyy;
     }
 
+    @Override
+    public ZwywLrJgyy selectPortalZwywLrJgyyById(String id)
+    {
+        return zwywLrJgyyMapper.selectPortalZwywLrJgyyById(id);
+    }
+
     /**
      * 查询老人机构预约列表
      *
@@ -47,6 +53,12 @@ public class ZwywLrJgyyServiceImpl implements IZwywLrJgyyService
         return zwywLrJgyyMapper.selectLrJgyyList(zwywLrJgyy);
     }
 
+    @Override
+    public List<ZwywLrJgyy> selectPortalZwywLrJgyyList(ZwywLrJgyy zwywLrJgyy)
+    {
+        return zwywLrJgyyMapper.selectPortalZwywLrJgyyList(zwywLrJgyy);
+    }
+
     /**
      * 新增老人机构预约
      *
@@ -60,6 +72,14 @@ public class ZwywLrJgyyServiceImpl implements IZwywLrJgyyService
         return zwywLrJgyyMapper.insert(zwywLrJgyy);
     }
 
+    @Transactional
+    @Override
+    public int insertPortalZwywLrJgyy(ZwywLrJgyy zwywLrJgyy)
+    {
+        zwywLrJgyy.setCreateAreaCode(zwywLrJgyy.getLrjzdzxzqh());
+        return zwywLrJgyyMapper.insertPortalZwywLrJgyy(zwywLrJgyy);
+    }
+
     /**
      * 修改老人机构预约
      *

+ 54 - 0
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrJgyyMapper.xml

@@ -118,5 +118,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ORDER BY a.create_time_str ASC
     </select>
 
+    <select id="selectPortalZwywLrJgyyById" parameterType="ZwywLrJgyy" resultMap="ZwywLrJgyyResult">
+        <include refid="selectLrJgYyInfo"></include>
+        <where>
+            <if test="id != null  and id != ''"> and a.id = #{id}</if>
+        </where>
+        ORDER BY a.create_time_str ASC
+    </select>
+
+    <select id="selectPortalZwywLrJgyyList" parameterType="ZwywLrJgyy" resultMap="ZwywLrJgyyResult">
+        <include refid="selectLrJgYyInfo"></include>
+        <where>
+            <if test="xm != null  and xm != ''"> and a.xm = #{xm}</if>
+            <if test="zjhm != null  and zjhm != ''"> and a.zjhm = #{zjhm}</if>
+            <if test="jgmc != null  and jgmc != ''"> and b.jgmc like concat('%',#{jgmc},'%')</if>
+            <if test="yyLrYljg != null  and yyLrYljg != ''"> and a.yy_lr_yljg = #{yyLrYljg}</if>
+            <if test="params.beginYysj != null and params.beginYysj != '' and params.endYysj != null and params.endYysj != ''"> and a.yy_lr_sj between #{params.beginYysj} and #{params.endYysj}</if>
+            <if test="params.beginYysj != null and params.beginYysj != '' and (params.endYysj == null or params.endYysj == '')"> and a.yy_lr_sj &gt;= #{params.beginYysj}</if>
+            <if test="(params.beginYysj == null or params.beginYysj == '') and params.endYysj != null and params.endYysj != ''"> and a.yy_lr_sj &lt;= #{params.endYysj}</if>
+        </where>
+        ORDER BY a.create_time_str ASC
+    </select>
 
+    <insert id="insertPortalZwywLrJgyy" parameterType="ZwywLrJgyy">
+        insert into zwyw_lr_jgyy
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="xm != null">xm,</if>
+            <if test="zjhm != null">zjhm,</if>
+            <if test="yyLrYljg != null">yy_lr_yljg,</if>
+            <if test="lrjzdzxzqh != null">lrjzdzxzqh,</if>
+            <if test="lrjzdz != null">lrjzdz,</if>
+            <if test="yyLrRzyddh != null">yy_lr_rzyddh,</if>
+            create_time_str,
+            create_user_id,
+            create_user_type,create_area_code,
+            create_by,
+            create_unit,
+            create_unit_name
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="xm != null">#{xm},</if>
+            <if test="zjhm != null">#{zjhm},</if>
+            <if test="yyLrYljg != null">#{yyLrYljg},</if>
+            <if test="lrjzdzxzqh != null">#{lrjzdzxzqh},</if>
+            <if test="lrjzdz != null">#{lrjzdz},</if>
+            <if test="yyLrRzyddh != null">#{yyLrRzyddh},</if>
+            #{createTimeStr},
+            #{createUserId},
+            #{createUserType},#{createAreaCode},
+            #{createBy},
+            #{createUnit},
+            #{createUnitName}
+        </trim>
+    </insert>
 </mapper>

+ 81 - 0
ruoyi-modules/mz-portal/src/main/java/com/ruoyi/portal/controller/ZwywLrJgyyController.java

@@ -0,0 +1,81 @@
+package com.ruoyi.portal.controller;
+
+import com.ruoyi.business.domain.ZwywLrJgyy;
+import com.ruoyi.business.service.IZwywLrJgyyService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.system.validate.group.AddGroup;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 老人机构预约Controller
+ *
+ * @author CH
+ * @date 2022-05-03
+ */
+@RestController
+@RequestMapping("/lrjgyy")
+public class ZwywLrJgyyController extends BaseController
+{
+    @Autowired
+    private IZwywLrJgyyService zwywLrJgyyService;
+
+    /**
+     * 查询老人机构预约列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(ZwywLrJgyy zwywLrJgyy)
+    {
+        startPage();
+        List<ZwywLrJgyy> list = zwywLrJgyyService.selectPortalZwywLrJgyyList(zwywLrJgyy);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取老人机构预约详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(zwywLrJgyyService.selectPortalZwywLrJgyyById(id));
+    }
+
+    /**
+     * 新增老人机构预约
+     */
+    @Log(title = "老人机构预约", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywLrJgyy zwywLrJgyy)
+    {
+        return toAjax(zwywLrJgyyService.insertPortalZwywLrJgyy(zwywLrJgyy),zwywLrJgyy.getId());
+    }
+
+//    /**
+//     * 修改老人机构预约
+//     */
+//    @RequiresPermissions("business:lrjgyy:edit")
+//    @Log(title = "老人机构预约", businessType = BusinessType.UPDATE)
+//    @PutMapping
+//    public AjaxResult edit(@Validated @RequestBody ZwywLrJgyy zwywLrJgyy)
+//    {
+//        return toAjax(zwywLrJgyyService.updateZwywLrJgyy(zwywLrJgyy));
+//    }
+//
+//    /**
+//     * 删除老人机构预约
+//     */
+//    @RequiresPermissions("business:lrjgyy:remove")
+//    @Log(title = "老人机构预约", businessType = BusinessType.DELETE)
+//	@DeleteMapping("/{ids}")
+//    public AjaxResult remove(@PathVariable String[] ids)
+//    {
+//        return toAjax(zwywLrJgyyService.deleteZwywLrJgyyByIds(ids));
+//    }
+}