ソースを参照

招标书(RFP)

yuansh 1 週間 前
コミット
b35c6eaec1

+ 2 - 1
srm-module-code/src/main/java/com/cuidian/srm/baseCode/controller/BaseCompanyInformationController.java

@@ -70,7 +70,8 @@ public class BaseCompanyInformationController extends JeecgController<BaseCompan
 								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 								   HttpServletRequest req) {
         QueryWrapper<BaseCompanyInformation> queryWrapper = QueryGenerator.initQueryWrapper(baseCompanyInformation, req.getParameterMap());
-		Page<BaseCompanyInformation> page = new Page<BaseCompanyInformation>(pageNo, pageSize);
+		queryWrapper.orderByDesc("reorder");
+        Page<BaseCompanyInformation> page = new Page<BaseCompanyInformation>(pageNo, pageSize);
 		IPage<BaseCompanyInformation> pageList = baseCompanyInformationService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}

+ 43 - 1
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/controller/CuspSupplierEvaluationController.java

@@ -143,6 +143,48 @@ public class CuspSupplierEvaluationController {
 		return Result.OK("删除成功!");
 	}
 	
+	/**
+	 *  批量提交
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "供应商考评-批量提交")
+	@ApiOperation(value="供应商考评-批量提交", notes="供应商考评-批量提交")
+//    @RequiresPermissions("cuspCode:cusp_supplier_evaluation:deleteBatch")
+	@DeleteMapping(value = "/submitBatch")
+	public Result<String> submitBatch(@RequestParam(name="ids",required=true) String ids) {
+
+		QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper<>();
+		queryWrapper.in("id",Arrays.asList(ids.split(",")));
+		CuspSupplierEvaluation ent = new CuspSupplierEvaluation();
+		ent.setSubmit(1);
+		cuspSupplierEvaluationService.update(ent,queryWrapper);
+
+		return Result.OK("提交成功!");
+	}
+
+	/**
+	 *  批量取消提交
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "供应商考评-批量取消提交")
+	@ApiOperation(value="供应商考评-批量取消提交", notes="供应商考评-批量取消提交")
+//    @RequiresPermissions("cuspCode:cusp_supplier_evaluation:deleteBatch")
+	@DeleteMapping(value = "/returnSubmitBatch")
+	public Result<String> returnSubmitBatch(@RequestParam(name="ids",required=true) String ids) {
+
+		QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper<>();
+		queryWrapper.in("id",Arrays.asList(ids.split(",")));
+		CuspSupplierEvaluation ent = new CuspSupplierEvaluation();
+		ent.setSubmit(0);
+		cuspSupplierEvaluationService.update(ent,queryWrapper);
+
+		return Result.OK("取消提交成功!");
+	}
+
 	/**
 	 *  批量删除
 	 *
@@ -157,7 +199,7 @@ public class CuspSupplierEvaluationController {
 		this.cuspSupplierEvaluationService.delBatchMain(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
+
 	/**
 	 * 通过id查询
 	 *

+ 180 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/controller/SaleRfpController.java

@@ -0,0 +1,180 @@
+package com.cuidian.srm.saleCode.controller;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.query.QueryRuleEnum;
+import org.jeecg.common.util.oConvertUtils;
+import com.cuidian.srm.saleCode.entity.SaleRfp;
+import com.cuidian.srm.saleCode.service.ISaleRfpService;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+
+ /**
+ * @Description: 招标书(RFP)
+ * @Author: jeecg-boot
+ * @Date:   2024-11-07
+ * @Version: V1.0
+ */
+@Api(tags="招标书(RFP)")
+@RestController
+@RequestMapping("/saleCode/saleRfp")
+@Slf4j
+public class SaleRfpController extends JeecgController<SaleRfp, ISaleRfpService> {
+	@Autowired
+	private ISaleRfpService saleRfpService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param saleRfp
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "招标书(RFP)-分页列表查询")
+	@ApiOperation(value="招标书(RFP)-分页列表查询", notes="招标书(RFP)-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<SaleRfp>> queryPageList(SaleRfp saleRfp,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<SaleRfp> queryWrapper = QueryGenerator.initQueryWrapper(saleRfp, req.getParameterMap());
+		Page<SaleRfp> page = new Page<SaleRfp>(pageNo, pageSize);
+		IPage<SaleRfp> pageList = saleRfpService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param saleRfp
+	 * @return
+	 */
+	@AutoLog(value = "招标书(RFP)-添加")
+	@ApiOperation(value="招标书(RFP)-添加", notes="招标书(RFP)-添加")
+	@RequiresPermissions("saleCode:sale_rfp:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody SaleRfp saleRfp) {
+		saleRfpService.save(saleRfp);
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param saleRfp
+	 * @return
+	 */
+	@AutoLog(value = "招标书(RFP)-编辑")
+	@ApiOperation(value="招标书(RFP)-编辑", notes="招标书(RFP)-编辑")
+	@RequiresPermissions("saleCode:sale_rfp:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody SaleRfp saleRfp) {
+		saleRfpService.updateById(saleRfp);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "招标书(RFP)-通过id删除")
+	@ApiOperation(value="招标书(RFP)-通过id删除", notes="招标书(RFP)-通过id删除")
+	@RequiresPermissions("saleCode:sale_rfp:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		saleRfpService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "招标书(RFP)-批量删除")
+	@ApiOperation(value="招标书(RFP)-批量删除", notes="招标书(RFP)-批量删除")
+	@RequiresPermissions("saleCode:sale_rfp:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.saleRfpService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "招标书(RFP)-通过id查询")
+	@ApiOperation(value="招标书(RFP)-通过id查询", notes="招标书(RFP)-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<SaleRfp> queryById(@RequestParam(name="id",required=true) String id) {
+		SaleRfp saleRfp = saleRfpService.getById(id);
+		if(saleRfp==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(saleRfp);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param saleRfp
+    */
+    @RequiresPermissions("saleCode:sale_rfp:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, SaleRfp saleRfp) {
+        return super.exportXls(request, saleRfp, SaleRfp.class, "招标书(RFP)");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("saleCode:sale_rfp:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, SaleRfp.class);
+    }
+
+}

+ 144 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleRfp.java

@@ -0,0 +1,144 @@
+package com.cuidian.srm.saleCode.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 招标书(RFP)
+ * @Author: jeecg-boot
+ * @Date:   2024-11-07
+ * @Version: V1.0
+ */
+@Data
+@TableName("sale_rfp")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="sale_rfp对象", description="招标书(RFP)")
+public class SaleRfp implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @ApiModelProperty(value = "主键id")
+    private String id;
+	/**创建人*/
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+	/**更新人*/
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+	/**更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+	/**状态(1-启用,0-停用)*/
+	@Excel(name = "状态(1-启用,0-停用)", width = 15)
+    @ApiModelProperty(value = "状态(1-启用,0-停用)")
+    private Integer status;
+	/**删除状态(0-正常,1-已删除)*/
+	@Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
+    @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
+    @TableLogic
+    private Integer delFlag;
+	/**单据日期*/
+	@Excel(name = "单据日期", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "单据日期")
+    private Date billDate;
+	/**单据编码*/
+	@Excel(name = "单据编码", width = 15)
+    @ApiModelProperty(value = "单据编码")
+    private String billCode;
+	/**项目*/
+	@Excel(name = "项目", width = 15)
+    @ApiModelProperty(value = "项目")
+    private String projectId;
+	/**客户*/
+	@Excel(name = "客户", width = 15)
+    @ApiModelProperty(value = "客户")
+    private String customerId;
+	/**采购方式*/
+	@Excel(name = "采购方式", width = 15)
+    @ApiModelProperty(value = "采购方式")
+    private Integer procurementMethod;
+	/**招标项目号*/
+	@Excel(name = "招标项目号", width = 15)
+    @ApiModelProperty(value = "招标项目号")
+    private String tenderCode;
+	/**招标项目名称*/
+	@Excel(name = "招标项目名称", width = 15)
+    @ApiModelProperty(value = "招标项目名称")
+    private String tenderName;
+	/**包号*/
+	@Excel(name = "包号", width = 15)
+    @ApiModelProperty(value = "包号")
+    private String packetNumber;
+	/**投标时间*/
+	@Excel(name = "投标时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "投标时间")
+    private Date bidTime;
+	/**开标时间*/
+	@Excel(name = "开标时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "开标时间")
+    private Date openingTime;
+	/**项目总价*/
+	@Excel(name = "项目总价", width = 15)
+    @ApiModelProperty(value = "项目总价")
+    private BigDecimal totalMoney;
+	/**投标结果*/
+	@Excel(name = "投标结果", width = 15)
+    @ApiModelProperty(value = "投标结果")
+    private Integer tenderResult;
+	/**中标方*/
+	@Excel(name = "中标方", width = 15)
+    @ApiModelProperty(value = "中标方")
+    private String winningBidder;
+	/**中标价*/
+	@Excel(name = "中标价", width = 15)
+    @ApiModelProperty(value = "中标价")
+    private BigDecimal bidPrice;
+	/**参与家数*/
+	@Excel(name = "参与家数", width = 15)
+    @ApiModelProperty(value = "参与家数")
+    private String households;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String notes;
+	/**附件*/
+	@Excel(name = "附件", width = 15)
+    @ApiModelProperty(value = "附件")
+    private String attachs;
+	/**提交(0未提交,1已提交)*/
+	@Excel(name = "提交(0未提交,1已提交)", width = 15)
+    @ApiModelProperty(value = "提交(0未提交,1已提交)")
+    private Integer submit;
+}

+ 17 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleRfpMapper.java

@@ -0,0 +1,17 @@
+package com.cuidian.srm.saleCode.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import com.cuidian.srm.saleCode.entity.SaleRfp;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 招标书(RFP)
+ * @Author: jeecg-boot
+ * @Date:   2024-11-07
+ * @Version: V1.0
+ */
+public interface SaleRfpMapper extends BaseMapper<SaleRfp> {
+
+}

+ 5 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/xml/SaleRfpMapper.xml

@@ -0,0 +1,5 @@
+<?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.cuidian.srm.saleCode.mapper.SaleRfpMapper">
+
+</mapper>

+ 14 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleRfpService.java

@@ -0,0 +1,14 @@
+package com.cuidian.srm.saleCode.service;
+
+import com.cuidian.srm.saleCode.entity.SaleRfp;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 招标书(RFP)
+ * @Author: jeecg-boot
+ * @Date:   2024-11-07
+ * @Version: V1.0
+ */
+public interface ISaleRfpService extends IService<SaleRfp> {
+
+}

+ 19 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/impl/SaleRfpServiceImpl.java

@@ -0,0 +1,19 @@
+package com.cuidian.srm.saleCode.service.impl;
+
+import com.cuidian.srm.saleCode.entity.SaleRfp;
+import com.cuidian.srm.saleCode.mapper.SaleRfpMapper;
+import com.cuidian.srm.saleCode.service.ISaleRfpService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 招标书(RFP)
+ * @Author: jeecg-boot
+ * @Date:   2024-11-07
+ * @Version: V1.0
+ */
+@Service
+public class SaleRfpServiceImpl extends ServiceImpl<SaleRfpMapper, SaleRfp> implements ISaleRfpService {
+
+}