Explorar el Código

添加共享服务相关接口

DESKTOP-2K9OVK9\siwei hace 8 meses
padre
commit
a230f1f0fe

+ 60 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/controller/zymlapplication/ShareConfigurationController.java

@@ -0,0 +1,60 @@
+package com.onemap.apply.controller.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlApplicationRecord;
+import com.onemap.apply.service.zymlapplication.IShareConfigurationService;
+import com.onemap.apply.service.zymlapplication.ITZymlApplicationRecordService;
+import com.onemap.common.core.utils.StringUtils;
+import com.onemap.common.core.web.controller.BaseController;
+import com.onemap.common.core.web.domain.AjaxResult;
+import com.onemap.common.core.web.page.TableDataInfo;
+import com.onemap.common.log.annotation.Log;
+import com.onemap.common.log.enums.BusinessType;
+import com.onemap.common.security.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 共享配置
+ */
+@RestController
+@RequestMapping("/share/configuration")
+public class ShareConfigurationController extends BaseController {
+
+    @Resource
+    private IShareConfigurationService shareConfigurationService;
+
+    /**
+     * 共享资源配置
+     */
+    @Log(title = "共享资源配置", businessType = BusinessType.INSERT)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TZymlApplicationRecord tZymlApplicationRecord) {
+        if (StringUtils.isNull(tZymlApplicationRecord)) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (StringUtils.isEmpty(tZymlApplicationRecord.getId())) {
+            return AjaxResult.error("参数缺失");
+        }
+        return toAjax(shareConfigurationService.updateZymlShareStateById(tZymlApplicationRecord.getId()));
+    }
+
+    /**
+     *
+     */
+//    @RequiresPermissions("@ss.hasPermi('share:resources:application:list')")
+    @GetMapping("/fileds/list")
+    public AjaxResult filedsList(TZymlApplicationRecord tZymlApplicationRecord) {
+        if (StringUtils.isNull(tZymlApplicationRecord)) {
+            return AjaxResult.error("参数缺失");
+        }
+        if (StringUtils.isEmpty(tZymlApplicationRecord.getId())) {
+            return AjaxResult.error("参数缺失");
+        }
+        return AjaxResult.success(shareConfigurationService.selectTZymlFiledList(tZymlApplicationRecord.getId()));
+    }
+
+}

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/zymlapplication/TZymlApplicationRecord.java

@@ -169,7 +169,7 @@ public class TZymlApplicationRecord extends BaseEntity {
     /**
      * $column.columnComment
      */
-    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    @Excel(name = "状态", readConverterExp = "$column.readConverterExp()")
     private Integer state;
 
     public void setId(String id) {

+ 77 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/domain/zymlapplication/TZymlFiled.java

@@ -0,0 +1,77 @@
+package com.onemap.apply.domain.zymlapplication;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.onemap.common.core.annotation.Excel;
+import com.onemap.common.core.web.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 我的服务字段
+ *
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+public class TZymlFiled extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+    private String id;
+    //    private String zyml_id;
+    private String zymlId;
+    //    private String filed_name;
+    private String filedName;
+    //    private String filed_name_zh;
+    private String filedNameZh;
+    //    private String share_display;
+    private String shareDisplay;
+    private String sort;
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getZymlId() {
+        return zymlId;
+    }
+
+    public void setZymlId(String zymlId) {
+        this.zymlId = zymlId;
+    }
+
+    public String getFiledName() {
+        return filedName;
+    }
+
+    public void setFiledName(String filedName) {
+        this.filedName = filedName;
+    }
+
+    public String getFiledNameZh() {
+        return filedNameZh;
+    }
+
+    public void setFiledNameZh(String filedNameZh) {
+        this.filedNameZh = filedNameZh;
+    }
+
+    public String getShareDisplay() {
+        return shareDisplay;
+    }
+
+    public void setShareDisplay(String shareDisplay) {
+        this.shareDisplay = shareDisplay;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+}

+ 10 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/ShareConfigurationMapper.java

@@ -0,0 +1,10 @@
+package com.onemap.apply.mapper.zymlapplication;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface ShareConfigurationMapper {
+
+    int updateZymlShareState(String bsm);
+
+}

+ 64 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/mapper/zymlapplication/TZymlFiledMapper.java

@@ -0,0 +1,64 @@
+package com.onemap.apply.mapper.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlFiled;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 我的申请Mapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-20
+ */
+@Mapper
+public interface TZymlFiledMapper {
+    /**
+     * 查询我的申请
+     *
+     * @param id 我的申请主键
+     * @return 我的申请
+     */
+    public TZymlFiled selectTZymlFiledById(String id);
+
+    /**
+     * 查询我的申请列表
+     *
+     * @param tZymlFiled 我的申请
+     * @return 我的申请集合
+     */
+    public List<TZymlFiled> selectTZymlFiledList(TZymlFiled tZymlFiled);
+
+
+    /**
+     * 新增我的申请
+     *
+     * @param tZymlFiled 我的申请
+     * @return 结果
+     */
+    public int insertTZymlFiled(TZymlFiled tZymlFiled);
+
+    /**
+     * 修改我的申请
+     *
+     * @param tZymlFiled 我的申请
+     * @return 结果
+     */
+    public int updateTZymlFiled(TZymlFiled tZymlFiled);
+
+    /**
+     * 删除我的申请
+     *
+     * @param id 我的申请主键
+     * @return 结果
+     */
+    public int deleteTZymlFiledById(String id);
+
+    /**
+     * 批量删除我的申请
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTZymlFiledByIds(String[] ids);
+}

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 122 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/impl/zymlapplication/ShareConfigurationServiceImp.java


+ 12 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/zymlapplication/IShareConfigurationService.java

@@ -0,0 +1,12 @@
+package com.onemap.apply.service.zymlapplication;
+
+import com.onemap.apply.domain.zymlapplication.TZymlFiled;
+
+import java.util.List;
+
+public interface IShareConfigurationService {
+
+    int updateZymlShareStateById(String bsm);
+
+    public List<TZymlFiled> selectTZymlFiledList(String bsm);
+}

+ 10 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/ShareConfigurationMapper.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.zymlapplication.ShareConfigurationMapper">
+
+    <update id="updateZymlShareState" parameterType="String">
+        update t_yzt_zyml set sharestate = (case when sharestate ='0' then '0' else '1' end)  where bsm = #{bsm}
+    </update>
+</mapper>

+ 75 - 0
onemap-modules/onemap-apply/src/main/resources/mapper/postgresql/zymlapplication/TZymlFiledMapper.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.onemap.apply.mapper.zymlapplication.TZymlFiledMapper">
+
+    <resultMap type="TZymlFiled" id="TZymlFiledResult">
+        <result property="id"    column="id"    />
+        <result property="zymlId"    column="zyml_id"    />
+        <result property="filedName"    column="filed_name"    />
+        <result property="filedNameZh"    column="filed_name_zh"    />
+        <result property="shareDisplay"    column="share_display"    />
+        <result property="sort"    column="sort"    />
+    </resultMap>
+
+    <sql id="selectTZymlFiledVo">
+        select id, zyml_id, filed_name, filed_name_zh, share_display, sort from t_zyml_filed
+    </sql>
+
+    <select id="selectTZymlFiledList" parameterType="TZymlFiled" resultMap="TZymlFiledResult">
+        <include refid="selectTZymlFiledVo"/>
+        <where>
+            <if test="zymlId != null  and zymlId != ''"> and zyml_id = #{zymlId}</if>
+            <if test="filedName != null  and filedName != ''"> and filed_name like concat('%', #{filedName}, '%')</if>
+            <if test="filedNameZh != null  and filedNameZh != ''"> and filed_name_zh like concat('%', #{filedNameZh}, '%')</if>
+        </where>
+    </select>
+
+    <select id="selectTZymlFiledById" parameterType="String" resultMap="TZymlFiledResult">
+        <include refid="selectTZymlFiledVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertTZymlFiled" parameterType="TZymlFiled">
+        insert into t_zyml_filed
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="zymlId != null">zyml_id,</if>
+            <if test="filedName != null">filed_name,</if>
+            <if test="filedNameZh != null">filed_name_zh,</if>
+            <if test="shareDisplay != null">share_display,</if>
+            <if test="sort != sort">sort,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="zymlId != null">#{zymlId},</if>
+            <if test="filedName != null">#{filedName},</if>
+            <if test="filedNameZh != null">#{filedNameZh},</if>
+            <if test="shareDisplay != null">#{shareDisplay},</if>
+            <if test="sort != null">#{sort},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTZymlFiled" parameterType="TZymlFiled">
+        update t_zyml_filed
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="filedName != null">filed_name = #{filedName},</if>
+            <if test="filedNameZh != null">filed_name_zh = #{filedNameZh},</if>
+            <if test="shareDisplay != null">share_display = #{shareDisplay},</if>
+            <if test="sort != null">sort = #{sort},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteTZymlFiledById" parameterType="String">
+        delete from t_zyml_filed where id = #{id}
+    </delete>
+
+    <delete id="deleteTZymlFiledByIds" parameterType="String">
+        delete from t_zyml_filed where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio