Pārlūkot izejas kodu

Merge branch '20221013_sun新增适老化改造门户接口' of sckj/mz-cloud into master

15143018065 1 gadu atpakaļ
vecāks
revīzija
f556e9a375

+ 0 - 1
ruoyi-modules/mz-business-djpd/src/main/resources/mapper/business/DjpdSqMapper.xml

@@ -477,7 +477,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         FROM
         zwyw_djpd_sq
         LEFT JOIN zwyw_djzs_pb ON zwyw_djpd_sq.id = zwyw_djzs_pb.sq_id
-        AND status = '0'
         <where>
             (sqzt = '13' OR sqzt = '14' OR sqzt = '15' OR sqzt = '16')
             <if test="jgId != null  and jgId != ''"> and zwyw_djpd_sq.jg_id = #{jgId}</if>

+ 15 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/mapper/ZwywLrSlhgzMapper.java

@@ -1,5 +1,6 @@
 package com.ruoyi.business.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.ruoyi.business.domain.ZwywLrSlhgz;
 import com.ruoyi.common.datascope.handler.DataColumn;
 import com.ruoyi.common.datascope.handler.DataPermission;
@@ -22,4 +23,18 @@ public interface ZwywLrSlhgzMapper extends BaseMapperPlus<ZwywLrSlhgz> {
     public List<ZwywLrSlhgz> selectZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz);
     public ZwywLrSlhgz selectZwywLrSlhgzById(String id);
 
+    @InterceptorIgnore(tenantLine = "true")
+    public ZwywLrSlhgz selectPortalZwywLrSlhgzById(String id);
+
+    @InterceptorIgnore(tenantLine = "true")
+    public List<ZwywLrSlhgz> selectPortalZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz);
+
+    @InterceptorIgnore(tenantLine = "true")
+    public int insertPortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
+//
+//    @InterceptorIgnore(tenantLine = "true")
+//    public int updatePortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
+//
+//    @InterceptorIgnore(tenantLine = "true")
+//    public int deletePortalZwywLrSlhgzByIds(List<String> ids);
 }

+ 11 - 0
ruoyi-modules/mz-business-lrgl/src/main/java/com/ruoyi/business/service/IZwywLrSlhgzService.java

@@ -22,6 +22,9 @@ public interface IZwywLrSlhgzService
     @Slave
     public ZwywLrSlhgz selectZwywLrSlhgzById(String id);
 
+    @Slave
+    public ZwywLrSlhgz selectPortalZwywLrSlhgzById(String id);
+
     /**
      * 查询适老化改造列表
      *
@@ -31,6 +34,9 @@ public interface IZwywLrSlhgzService
     @Slave
     public List<ZwywLrSlhgz> selectZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz);
 
+    @Slave
+    public List<ZwywLrSlhgz> selectPortalZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz);
+
     /**
      * 新增适老化改造
      *
@@ -39,6 +45,8 @@ public interface IZwywLrSlhgzService
      */
     public int insertZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
 
+    public int insertPortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
+
     /**
      * 修改适老化改造
      *
@@ -47,6 +55,8 @@ public interface IZwywLrSlhgzService
      */
     public int updateZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
 
+//    public int updatePortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz);
+
     /**
      * 批量删除适老化改造
      *
@@ -55,4 +65,5 @@ public interface IZwywLrSlhgzService
      */
     public int deleteZwywLrSlhgzByIds(String[] ids);
 
+//    public int deletePortalZwywLrSlhgzByIds(String[] ids);
 }

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

@@ -34,6 +34,12 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
         return zwywLrSlhgzMapper.selectZwywLrSlhgzById(id);
     }
 
+    @Override
+    public ZwywLrSlhgz selectPortalZwywLrSlhgzById(String id)
+    {
+        return zwywLrSlhgzMapper.selectPortalZwywLrSlhgzById(id);
+    }
+
     /**
      * 查询适老化改造列表
      *
@@ -46,6 +52,12 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
         return zwywLrSlhgzMapper.selectZwywLrSlhgzList(zwywLrSlhgz);
     }
 
+    @Override
+    public List<ZwywLrSlhgz> selectPortalZwywLrSlhgzList(ZwywLrSlhgz zwywLrSlhgz)
+    {
+        return zwywLrSlhgzMapper.selectPortalZwywLrSlhgzList(zwywLrSlhgz);
+    }
+
     /**
      * 新增适老化改造
      *
@@ -59,6 +71,13 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
         return zwywLrSlhgzMapper.insert(zwywLrSlhgz);
     }
 
+    @Override
+    public int insertPortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz)
+    {
+        zwywLrSlhgz.setTbrSzqh(zwywLrSlhgz.getZfdz());
+        return zwywLrSlhgzMapper.insertPortalZwywLrSlhgz(zwywLrSlhgz);
+    }
+
     /**
      * 修改适老化改造
      *
@@ -71,6 +90,12 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
         return zwywLrSlhgzMapper.updateById(zwywLrSlhgz);
     }
 
+//    @Override
+//    public int updatePortalZwywLrSlhgz(ZwywLrSlhgz zwywLrSlhgz)
+//    {
+//        return zwywLrSlhgzMapper.updatePortalZwywLrSlhgz(zwywLrSlhgz);
+//    }
+
     /**
      * 批量删除适老化改造
      *
@@ -83,4 +108,10 @@ public class ZwywLrSlhgzServiceImpl implements IZwywLrSlhgzService
         return zwywLrSlhgzMapper.deleteBatchIds(Arrays.asList(ids));
     }
 
+//    @Override
+//    public int deletePortalZwywLrSlhgzByIds(String[] ids)
+//    {
+//        return zwywLrSlhgzMapper.deletePortalZwywLrSlhgzByIds(Arrays.asList(ids));
+//    }
+
 }

+ 104 - 0
ruoyi-modules/mz-business-lrgl/src/main/resources/mapper/business/ZwywLrSlhgzMapper.xml

@@ -64,4 +64,108 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </select>
 
+    <select id="selectPortalZwywLrSlhgzById" parameterType="String" resultMap="ZwywLrSlhgzResult">
+        <include refid="selectZwywLrSlhgzVo"/>
+        where id = #{id}
+    </select>
+
+    <select id="selectPortalZwywLrSlhgzList" parameterType="ZwywLrSlhgz" resultMap="ZwywLrSlhgzResult">
+        <include refid="selectZwywLrSlhgzVo"/>
+        <where>
+            <if test="tbrXm != null and tbrXm != ''"> and tbr_xm = #{tbrSjhm} </if>
+            <if test="tbrSjhm != null  and tbrSjhm != ''"> and tbr_sjhm = #{tbrSjhm}</if>
+        </where>
+    </select>
+
+    <insert id="insertPortalZwywLrSlhgz" parameterType="ZwywLrSlhgz">
+        insert into zwyw_lr_slhgz
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="xm != null">xm,</if>
+            <if test="lxdh != null">lxdh,</if>
+            <if test="isTsknlr != null">is_tsknlr,</if>
+            <if test="gzzj != null">gzzj,</if>
+            <if test="czbtzjQt != null">czbtzj_qt,</if>
+            <if test="zfdz != null">zfdz,</if>
+            <if test="zfdzName != null">zfdz_name,</if>
+            <if test="xxdz != null">xxdz,</if>
+            <if test="sfdm != null">sfdm,</if>
+            <if test="sfQt != null">sf_qt,</if>
+            <if test="gznr != null">gznr,</if>
+            <if test="gznrQt != null">gznr_qt,</if>
+            <if test="tbrXm != null">tbr_xm,</if>
+            <if test="tbrSjhm != null">tbr_sjhm,</if>
+            <if test="tbrSzqh != null">tbr_szqh,</if>
+            <if test="tbrSzqhName != null">tbr_szqh_name,</if>
+            <if test="xgcl != null">xgcl,</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="lxdh != null">#{lxdh},</if>
+            <if test="isTsknlr != null">#{isTsknlr},</if>
+            <if test="gzzj != null">#{gzzj},</if>
+            <if test="czbtzjQt != null">#{czbtzjQt},</if>
+            <if test="zfdz != null">#{zfdz},</if>
+            <if test="zfdzName != null">#{zfdzName},</if>
+            <if test="xxdz != null">#{xxdz},</if>
+            <if test="sfdm != null">#{sfdm},</if>
+            <if test="sfQt != null">#{sfQt},</if>
+            <if test="gznr != null">#{gznr},</if>
+            <if test="gznrQt != null">#{gznrQt},</if>
+            <if test="tbrXm != null">#{tbrXm},</if>
+            <if test="tbrSjhm != null">#{tbrSjhm},</if>
+            <if test="tbrSzqh != null">#{tbrSzqh},</if>
+            <if test="tbrSzqhName != null">#{tbrSzqhName},</if>
+            <if test="xgcl != null">#{xgcl},</if>
+            #{createTimeStr},
+            #{createUserId},
+            #{createUserType},#{createAreaCode},
+            #{createBy},
+            #{createUnit},
+            #{createUnitName}
+        </trim>
+    </insert>
+
+<!--    <update id="updatePortalZwywLrSlhgz" parameterType="ZwywLrSlhgz">-->
+<!--        update zwyw_lr_slhgz-->
+<!--        <trim prefix="SET" suffixOverrides=",">-->
+<!--            <if test="xm != null">xm = #{xm},</if>-->
+<!--            <if test="lxdh != null">lxdh = #{lxdh},</if>-->
+<!--            <if test="isTsknlr != null">is_tsknlr = #{isTsknlr},</if>-->
+<!--            <if test="gzzj != null">gzzj = #{gzzj},</if>-->
+<!--            <if test="czbtzjQt != null">czbtzj_qt = #{czbtzjQt},</if>-->
+<!--            <if test="zfdz != null">zfdz = #{zfdz},</if>-->
+<!--            <if test="zfdzName != null">zfdz_name = #{zfdzName},</if>-->
+<!--            <if test="xxdz != null">xxdz = #{xxdz},</if>-->
+<!--            <if test="sfdm != null">sfdm = #{sfdm},</if>-->
+<!--            <if test="sfQt != null">sf_qt = #{sfQt},</if>-->
+<!--            <if test="gznr != null">gznr = #{gznr},</if>-->
+<!--            <if test="gznrQt != null">gznr_qt = #{gznrQt},</if>-->
+<!--            <if test="tbrXm != null">tbr_xm = #{tbrXm},</if>-->
+<!--            <if test="tbrSjhm != null">tbr_sjhm = #{tbrSjhm},</if>-->
+<!--            <if test="tbrSzqh != null">tbr_szqh = #{tbrSzqh},</if>-->
+<!--            <if test="tbrSzqhName != null">tbr_szqh_name = #{tbrSzqhName},</if>-->
+<!--            <if test="xgcl != null">xgcl = #{xgcl},</if>-->
+<!--            update_time_str = #{updateTimeStr},-->
+<!--            update_user_id = #{updateUserId},-->
+<!--            update_by = #{updateBy},-->
+<!--            update_unit = #{updateUnit},-->
+<!--            update_unit_name = #{updateUnitName}-->
+<!--        </trim>-->
+<!--        where id = #{id}-->
+<!--    </update>-->
+
+<!--    <delete id="deletePortalZwywLrSlhgzByIds" parameterType="java.util.List">-->
+<!--        delete from zwyw_lr_slhgz where id in-->
+<!--        <foreach item="id" collection="list" open="(" separator="," close=")">-->
+<!--            #{id}-->
+<!--        </foreach>-->
+<!--    </delete>-->
 </mapper>

+ 5 - 0
ruoyi-modules/mz-portal/pom.xml

@@ -98,6 +98,11 @@
             <version>${ruoyi.version}</version>
         </dependency>
 
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-modules-business-lrgl</artifactId>
+            <version>${ruoyi.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 79 - 0
ruoyi-modules/mz-portal/src/main/java/com/ruoyi/portal/controller/ZwywLrSlhgzController.java

@@ -0,0 +1,79 @@
+package com.ruoyi.portal.controller;
+
+import com.ruoyi.business.domain.ZwywLrSlhgz;
+import com.ruoyi.business.service.IZwywLrSlhgzService;
+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-05
+ */
+@RestController
+@RequestMapping("/lrslhgz")
+public class ZwywLrSlhgzController extends BaseController
+{
+    @Autowired
+    private IZwywLrSlhgzService zwywLrSlhgzService;
+
+    /**
+     * 查询适老化改造列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(ZwywLrSlhgz zwywLrSlhgz)
+    {
+        startPage();
+        List<ZwywLrSlhgz> list = zwywLrSlhgzService.selectPortalZwywLrSlhgzList(zwywLrSlhgz);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取适老化改造详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") String id)
+    {
+        return AjaxResult.success(zwywLrSlhgzService.selectPortalZwywLrSlhgzById(id));
+    }
+
+    /**
+     * 新增适老化改造
+     */
+    @Log(title = "适老化改造", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated({AddGroup.class}) @RequestBody ZwywLrSlhgz zwywLrSlhgz)
+    {
+        return toAjax(zwywLrSlhgzService.insertPortalZwywLrSlhgz(zwywLrSlhgz),zwywLrSlhgz.getId());
+    }
+
+//    /**
+//     * 修改适老化改造
+//     */
+//    @Log(title = "适老化改造", businessType = BusinessType.UPDATE)
+//    @PutMapping
+//    public AjaxResult edit(@Validated @RequestBody ZwywLrSlhgz zwywLrSlhgz)
+//    {
+//        return toAjax(zwywLrSlhgzService.updatePortalZwywLrSlhgz(zwywLrSlhgz));
+//    }
+//
+//    /**
+//     * 删除适老化改造
+//     */
+//    @Log(title = "适老化改造", businessType = BusinessType.DELETE)
+//	@DeleteMapping("/{ids}")
+//    public AjaxResult remove(@PathVariable String[] ids)
+//    {
+//        return toAjax(zwywLrSlhgzService.deletePortalZwywLrSlhgzByIds(ids));
+//    }
+}