Эх сурвалжийг харах

增加日志,新增报价监控

gmcs 2 сар өмнө
parent
commit
e2ac86e456

+ 1 - 0
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/controller/BsExpertController.java

@@ -168,6 +168,7 @@ public class BsExpertController extends BaseController {
     }
 
     // 测试 用户新增服务
+    @Log(title = "专家用户新增", businessType = BusinessType.INSERT)
     @PostMapping("/addExpertUser")
     public AjaxResult addExpertUser() {
         SysUser user = new SysUser();

+ 4 - 1
ruoyi-modules/hh-basic/src/main/java/com/hh/pms/sae/controller/BsSupplierController.java

@@ -110,6 +110,7 @@ public class BsSupplierController extends BaseController {
         return AjaxResult.success(outputStream);
     }
 
+    @Log(title = "供应商登录", businessType = BusinessType.OTHER)
     @PostMapping("/loginSupplier")
     public AjaxResult login(String userName, String pass, String code, HttpServletRequest request,
                             HttpServletResponse response) {
@@ -142,6 +143,7 @@ public class BsSupplierController extends BaseController {
         return AjaxResult.error("用户名或者密码错误");
     }
 
+    @Log(title = "供应商登录2", businessType = BusinessType.OTHER)
     @PostMapping("/loginSupplier2")
     public AjaxResult login2(String userName, String pass, String code, HttpServletRequest request,
                              HttpServletResponse response) {
@@ -246,7 +248,7 @@ public class BsSupplierController extends BaseController {
     /**
      * 导出供应商列表
      */
-    @Log(title = "供应商", businessType = BusinessType.EXPORT)
+    @Log(title = "供应商导出", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, BsSupplier bsSupplier) {
         List<BsSupplier> list = bsSupplierService.selectBsSupplierList(bsSupplier);
@@ -450,6 +452,7 @@ public class BsSupplierController extends BaseController {
     }
 
     @Transactional(rollbackFor = Exception.class)
+    @Log(title = "供应商批量导入", businessType = BusinessType.INSERT)
     @PostMapping("/leadExcel")
     public AjaxResult leadExcel(MultipartFile file) throws IOException {
         int i = 0;

+ 105 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/controller/QuoteInfoController.java

@@ -0,0 +1,105 @@
+package com.hh.bidding.controller;
+
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.security.annotation.RequiresPermissions;
+import com.hh.bidding.domain.QuoteInfo;
+import com.hh.bidding.service.IQuoteInfoService;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.core.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.web.page.TableDataInfo;
+
+/**
+ * QuoteInfoController
+ *
+ * @author ruoyi
+ * @date 2024-09-28
+ */
+@RestController
+@RequestMapping("/quoteInfo")
+public class QuoteInfoController extends BaseController
+{
+    @Autowired
+    private IQuoteInfoService quoteInfoService;
+
+    /**
+     * 查询QuoteInfo列表
+     */
+    // @RequiresPermissions("system:quoteInfo:list")
+    @GetMapping("/list")
+    public TableDataInfo list(QuoteInfo quoteInfo)
+    {
+        startPage();
+        List<QuoteInfo> list = quoteInfoService.selectQuoteInfoList(quoteInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出QuoteInfo列表
+     */
+    // @RequiresPermissions("system:quoteInfo:export")
+    @Log(title = "QuoteInfo", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, QuoteInfo quoteInfo)
+    {
+        List<QuoteInfo> list = quoteInfoService.selectQuoteInfoList(quoteInfo);
+        ExcelUtil<QuoteInfo> util = new ExcelUtil<QuoteInfo>(QuoteInfo.class);
+        util.exportExcel(response, list, "QuoteInfo数据");
+    }
+
+    /**
+     * 获取QuoteInfo详细信息
+     */
+    // @RequiresPermissions("system:quoteInfo:query")
+    @GetMapping(value = "/getInfo")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(quoteInfoService.selectQuoteInfoById(id));
+    }
+
+    /**
+     * 新增QuoteInfo
+     */
+    // @RequiresPermissions("system:quoteInfo:add")
+    @Log(title = "QuoteInfo", businessType = BusinessType.INSERT)
+    @PostMapping("/add")
+    public AjaxResult add(@RequestBody QuoteInfo quoteInfo)
+    {
+        return toAjax(quoteInfoService.insertQuoteInfo(quoteInfo));
+    }
+
+    /**
+     * 修改QuoteInfo
+     */
+    // @RequiresPermissions("system:quoteInfo:edit")
+    @Log(title = "QuoteInfo", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody QuoteInfo quoteInfo)
+    {
+        return toAjax(quoteInfoService.updateQuoteInfo(quoteInfo));
+    }
+
+    /**
+     * 删除QuoteInfo
+     */
+    // @RequiresPermissions("system:quoteInfo:remove")
+    @Log(title = "QuoteInfo", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(quoteInfoService.deleteQuoteInfoByIds(ids));
+    }
+}

+ 81 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/domain/QuoteInfo.java

@@ -0,0 +1,81 @@
+package com.hh.bidding.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * QuoteInfo对象 quote_info
+ *
+ * @author ruoyi
+ * @date 2024-09-28
+ */
+public class QuoteInfo extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long sid;
+
+    /** $column.columnComment */
+    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
+    private Long hid;
+
+    /** 报价详情 */
+    @Excel(name = "报价详情")
+    private String detail;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setSid(Long sid)
+    {
+        this.sid = sid;
+    }
+
+    public Long getSid()
+    {
+        return sid;
+    }
+    public void setHid(Long hid)
+    {
+        this.hid = hid;
+    }
+
+    public Long getHid()
+    {
+        return hid;
+    }
+    public void setDetail(String detail)
+    {
+        this.detail = detail;
+    }
+
+    public String getDetail()
+    {
+        return detail;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("sid", getSid())
+                .append("hid", getHid())
+                .append("detail", getDetail())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}

+ 61 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/mapper/QuoteInfoMapper.java

@@ -0,0 +1,61 @@
+package com.hh.bidding.mapper;
+
+import java.util.List;
+import com.hh.bidding.domain.QuoteInfo;
+
+/**
+ * QuoteInfoMapper接口
+ *
+ * @author ruoyi
+ * @date 2024-09-28
+ */
+public interface QuoteInfoMapper
+{
+    /**
+     * 查询QuoteInfo
+     *
+     * @param id QuoteInfo主键
+     * @return QuoteInfo
+     */
+    public QuoteInfo selectQuoteInfoById(Long id);
+
+    /**
+     * 查询QuoteInfo列表
+     *
+     * @param quoteInfo QuoteInfo
+     * @return QuoteInfo集合
+     */
+    public List<QuoteInfo> selectQuoteInfoList(QuoteInfo quoteInfo);
+
+    /**
+     * 新增QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    public int insertQuoteInfo(QuoteInfo quoteInfo);
+
+    /**
+     * 修改QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    public int updateQuoteInfo(QuoteInfo quoteInfo);
+
+    /**
+     * 删除QuoteInfo
+     *
+     * @param id QuoteInfo主键
+     * @return 结果
+     */
+    public int deleteQuoteInfoById(Long id);
+
+    /**
+     * 批量删除QuoteInfo
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteQuoteInfoByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/IQuoteInfoService.java

@@ -0,0 +1,61 @@
+package com.hh.bidding.service;
+
+import java.util.List;
+import com.hh.bidding.domain.QuoteInfo;
+
+/**
+ * QuoteInfoService接口
+ *
+ * @author ruoyi
+ * @date 2024-09-28
+ */
+public interface IQuoteInfoService
+{
+    /**
+     * 查询QuoteInfo
+     *
+     * @param id QuoteInfo主键
+     * @return QuoteInfo
+     */
+    public QuoteInfo selectQuoteInfoById(Long id);
+
+    /**
+     * 查询QuoteInfo列表
+     *
+     * @param quoteInfo QuoteInfo
+     * @return QuoteInfo集合
+     */
+    public List<QuoteInfo> selectQuoteInfoList(QuoteInfo quoteInfo);
+
+    /**
+     * 新增QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    public int insertQuoteInfo(QuoteInfo quoteInfo);
+
+    /**
+     * 修改QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    public int updateQuoteInfo(QuoteInfo quoteInfo);
+
+    /**
+     * 批量删除QuoteInfo
+     *
+     * @param ids 需要删除的QuoteInfo主键集合
+     * @return 结果
+     */
+    public int deleteQuoteInfoByIds(Long[] ids);
+
+    /**
+     * 删除QuoteInfo信息
+     *
+     * @param id QuoteInfo主键
+     * @return 结果
+     */
+    public int deleteQuoteInfoById(Long id);
+}

+ 96 - 0
ruoyi-modules/hh-bidding/src/main/java/com/hh/bidding/service/impl/QuoteInfoServiceImpl.java

@@ -0,0 +1,96 @@
+package com.hh.bidding.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.core.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.hh.bidding.mapper.QuoteInfoMapper;
+import com.hh.bidding.domain.QuoteInfo;
+import com.hh.bidding.service.IQuoteInfoService;
+
+/**
+ * QuoteInfoService业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-09-28
+ */
+@Service
+public class QuoteInfoServiceImpl implements IQuoteInfoService
+{
+    @Autowired
+    private QuoteInfoMapper quoteInfoMapper;
+
+    /**
+     * 查询QuoteInfo
+     *
+     * @param id QuoteInfo主键
+     * @return QuoteInfo
+     */
+    @Override
+    public QuoteInfo selectQuoteInfoById(Long id)
+    {
+        return quoteInfoMapper.selectQuoteInfoById(id);
+    }
+
+    /**
+     * 查询QuoteInfo列表
+     *
+     * @param quoteInfo QuoteInfo
+     * @return QuoteInfo
+     */
+    @Override
+    public List<QuoteInfo> selectQuoteInfoList(QuoteInfo quoteInfo)
+    {
+        return quoteInfoMapper.selectQuoteInfoList(quoteInfo);
+    }
+
+    /**
+     * 新增QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    @Override
+    public int insertQuoteInfo(QuoteInfo quoteInfo)
+    {
+        quoteInfo.setCreateTime(DateUtils.getNowDate());
+        return quoteInfoMapper.insertQuoteInfo(quoteInfo);
+    }
+
+    /**
+     * 修改QuoteInfo
+     *
+     * @param quoteInfo QuoteInfo
+     * @return 结果
+     */
+    @Override
+    public int updateQuoteInfo(QuoteInfo quoteInfo)
+    {
+        quoteInfo.setUpdateTime(DateUtils.getNowDate());
+        return quoteInfoMapper.updateQuoteInfo(quoteInfo);
+    }
+
+    /**
+     * 批量删除QuoteInfo
+     *
+     * @param ids 需要删除的QuoteInfo主键
+     * @return 结果
+     */
+    @Override
+    public int deleteQuoteInfoByIds(Long[] ids)
+    {
+        return quoteInfoMapper.deleteQuoteInfoByIds(ids);
+    }
+
+    /**
+     * 删除QuoteInfo信息
+     *
+     * @param id QuoteInfo主键
+     * @return 结果
+     */
+    @Override
+    public int deleteQuoteInfoById(Long id)
+    {
+        return quoteInfoMapper.deleteQuoteInfoById(id);
+    }
+}

+ 74 - 0
ruoyi-modules/hh-bidding/src/main/resources/mapper/QuoteInfoMapper.xml

@@ -0,0 +1,74 @@
+<?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.hh.bidding.mapper.QuoteInfoMapper">
+
+    <resultMap type="com.hh.bidding.domain.QuoteInfo" id="QuoteInfoResult">
+        <result property="id"    column="id"    />
+        <result property="sid"    column="sid"    />
+        <result property="hid"    column="hid"    />
+        <result property="detail"    column="detail"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQuoteInfoVo">
+        select id, sid, hid, detail, create_time, update_time from quote_info
+    </sql>
+
+    <select id="selectQuoteInfoList" parameterType="com.hh.bidding.domain.QuoteInfo" resultMap="QuoteInfoResult">
+        <include refid="selectQuoteInfoVo"/>
+        <where>
+            <if test="sid != null "> and sid = #{sid}</if>
+            <if test="hid != null "> and hid = #{hid}</if>
+            <if test="detail != null  and detail != ''"> and detail = #{detail}</if>
+        </where>
+    </select>
+
+    <select id="selectQuoteInfoById" parameterType="Long" resultMap="QuoteInfoResult">
+        <include refid="selectQuoteInfoVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertQuoteInfo" parameterType="com.hh.bidding.domain.QuoteInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into quote_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sid != null">sid,</if>
+            <if test="hid != null">hid,</if>
+            <if test="detail != null">detail,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sid != null">#{sid},</if>
+            <if test="hid != null">#{hid},</if>
+            <if test="detail != null">#{detail},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateQuoteInfo" parameterType="com.hh.bidding.domain.QuoteInfo">
+        update quote_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sid != null">sid = #{sid},</if>
+            <if test="hid != null">hid = #{hid},</if>
+            <if test="detail != null">detail = #{detail},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteQuoteInfoById" parameterType="Long">
+        delete from quote_info where id = #{id}
+    </delete>
+
+    <delete id="deleteQuoteInfoByIds" parameterType="String">
+        delete from quote_info where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>