Browse Source

销售询价单(inquiry form)

yuansh 4 months ago
parent
commit
d2dc11ef6e
20 changed files with 816 additions and 381 deletions
  1. 19 0
      jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java
  2. 14 12
      srm-module-code/src/main/java/org/jeecg/modules/baseCode/controller/BaseShipArchiveController.java
  3. 9 5
      srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProductArchive.java
  4. 2 1
      srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProductClass.java
  5. 1 0
      srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProjectArchive.java
  6. 4 3
      srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseShipArchive.java
  7. 444 276
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/controller/CuspSupplierEvaluationController.java
  8. 2 1
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspIntermediator.java
  9. 44 5
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierEvaluation.java
  10. 10 5
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfile.java
  11. 5 4
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfileCatalog.java
  12. 67 33
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfileQualification.java
  13. 2 0
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/mapper/CuspSupplierProfileMapper.java
  14. 30 13
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/mapper/xml/CuspSupplierProfileMapper.xml
  15. 1 0
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/service/ICuspSupplierProfileService.java
  16. 6 0
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/service/impl/CuspSupplierProfileServiceImpl.java
  17. 11 7
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/vo/CuspSupplierDeadlineReminderVo.java
  18. 40 5
      srm-module-code/src/main/java/org/jeecg/modules/cuspCode/vo/CuspSupplierEvaluationPage.java
  19. 93 2
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleRfpController.java
  20. 12 9
      srm-module-code/src/main/java/org/jeecg/modules/saleCode/entity/SaleRfp.java

+ 19 - 0
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -68,6 +68,12 @@ public class DateUtils extends PropertyEditorSupport {
             return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         }
     };
+    public static ThreadLocal<SimpleDateFormat> dateYearFormat = new ThreadLocal<SimpleDateFormat>() {
+        @Override
+        protected SimpleDateFormat initialValue() {
+            return new SimpleDateFormat("yyyy");
+        }
+    };
 
     /**
      * 以毫秒表示的时间
@@ -293,6 +299,15 @@ public class DateUtils extends PropertyEditorSupport {
         return datetimeFormat.get().format(getCalendar().getTime());
     }
 
+    /**
+     * 当前时间,格式 yyyy-MM-dd HH:mm:ss
+     *
+     * @return 当前时间的标准形式字符串
+     */
+    public static String nowYear() {
+        return dateYearFormat.get().format(getCalendar().getTime());
+    }
+
     /**
      * 指定日期的时间戳
      *
@@ -814,4 +829,8 @@ public class DateUtils extends PropertyEditorSupport {
         return calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR);
     }
 
+
+    public static void main(String[] args) {
+        System.out.println(nowYear());
+    }
 }

+ 14 - 12
srm-module-code/src/main/java/org/jeecg/modules/baseCode/controller/BaseShipArchiveController.java

@@ -7,6 +7,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import io.micrometer.core.instrument.util.StringUtils;
 import org.jeecg.modules.baseCode.service.ISerialPatternService;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
@@ -84,18 +85,19 @@ public class BaseShipArchiveController extends JeecgController<BaseShipArchive,
     @PostMapping(value = "/add")
     public Result<String> add(@RequestBody BaseShipArchive baseShipArchive) {
 //
-//        String code = baseShipArchive.getImo();
-//        if (StringUtils.isNotBlank(code)) {
-//
-//            QueryWrapper<BaseShipArchive> queryWrapper = new QueryWrapper();
-//            queryWrapper.eq("imo", code);
-//            queryWrapper.eq("del_flag", "0");
-//
-//            List<BaseShipArchive> list = baseShipArchiveService.list(queryWrapper);
-//            if (list.size() != 0) {
-//                return Result.error("imo编码重复,请修改!");
-//            }
-//        } else {
+        String code = baseShipArchive.getImo();
+        if (StringUtils.isNotBlank(code)) {
+
+            QueryWrapper<BaseShipArchive> queryWrapper = new QueryWrapper();
+            queryWrapper.eq("imo", code);
+            queryWrapper.eq("del_flag", "0");
+
+            List<BaseShipArchive> list = baseShipArchiveService.list(queryWrapper);
+            if (list.size() != 0) {
+                return Result.error("imo编码重复,请修改!");
+            }
+        }
+//        else {
 //
 //            Result<String> result = serialPatternService.getNextSerial("base_ship_archive", "imo");
 //            if (!result.isSuccess()) {

+ 9 - 5
srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProductArchive.java

@@ -55,7 +55,7 @@ public class BaseProductArchive implements Serializable {
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
 	/**状态(1-启用,0-停用)*/
-	@Excel(name = "状态(status)", width = 15)
+	@Excel(name = "状态(status)", width = 15, dicCode = "valid_status")
     @ApiModelProperty(value = "状态(1-启用,0-停用)")
     @Dict(dicCode = "valid_status")
     private Integer status;
@@ -114,20 +114,24 @@ public class BaseProductArchive implements Serializable {
     @ApiModelProperty(value = "税率")
     private Double taxRate;
 	/**计量单位*/
-	@Excel(name = "计量单位(measurement unit)", width = 15)
+	@Excel(name = "计量单位(measurement unit)", width = 15, dicCode = "measurement")
     @ApiModelProperty(value = "计量单位")
+    @Dict(dicCode = "measurement_unit")
     private String measurementUnit;
 	/**有害物质(1-是,0-否)*/
-	@Excel(name = "有害物质(harmful substances)", width = 15)
+	@Excel(name = "有害物质(harmful substances)", width = 15, dicCode = "yes_or_no")
     @ApiModelProperty(value = "有害物质(1-是,0-否)")
+    @Dict(dicCode = "yes_or_no")
     private Integer harmfulSubstances;
 	/**虚拟产品(1-是,0-否)*/
-	@Excel(name = "虚拟产品(virtual product)", width = 15)
+	@Excel(name = "虚拟产品(virtual product)", width = 15, dicCode = "yes_or_no")
     @ApiModelProperty(value = "虚拟产品(1-是,0-否)")
+    @Dict(dicCode = "yes_or_no")
     private Integer virtualProduct;
 	/**返佣(1-是,0-否)*/
-	@Excel(name = "返佣(commissionRebate)", width = 15)
+	@Excel(name = "返佣(commissionRebate)", width = 15, dicCode = "yes_or_no")
     @ApiModelProperty(value = "返佣(1-是,0-否)")
+    @Dict(dicCode = "yes_or_no")
     private Integer commissionRebate;
 	/**备注*/
 	@Excel(name = "备注", width = 15)

+ 2 - 1
srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProductClass.java

@@ -74,7 +74,8 @@ public class BaseProductClass implements Serializable {
 	/**父级主键*/
 	@Excel(name = "上级分类(parent)", width = 15)
     @ApiModelProperty(value = "父级主键")
-    private Integer parentId;
+    @Dict(dictTable = "base_product_class", dicCode = "id", dicText = "name")
+    private String parentId;
 	/**毛利率*/
 	@Excel(name = "毛利率(gross margin)", width = 15)
     @ApiModelProperty(value = "毛利率")

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseProjectArchive.java

@@ -77,6 +77,7 @@ public class BaseProjectArchive implements Serializable {
 	/**客户*/
 	@Excel(name = "客户(customer)", width = 15)
     @ApiModelProperty(value = "客户")
+    @Dict(dictTable = "cusp_customer_profile", dicCode = "id", dicText = "name")
     private String customerId;
 	/**备注*/
 	@Excel(name = "备注(notes)", width = 15)

+ 4 - 3
srm-module-code/src/main/java/org/jeecg/modules/baseCode/entity/BaseShipArchive.java

@@ -87,11 +87,12 @@ public class BaseShipArchive implements Serializable {
 	/**关联客户*/
 	@Excel(name = "关联客户(relate customer)", width = 15)
     @ApiModelProperty(value = "关联客户")
+//    @Dict(dictTable = "cusp_customer_profile", dicCode = "id", dicText = "name")
     private String relateCustomer;
 	/**造船日期*/
-	@Excel(name = "造船日期(ship date)", 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")
+	@Excel(name = "造船日期(ship date)", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "造船日期")
     private Date shipDate;
 	/**备注*/

+ 444 - 276
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/controller/CuspSupplierEvaluationController.java

@@ -1,19 +1,18 @@
 package org.jeecg.modules.cuspCode.controller;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.HashMap;
+import java.util.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.baseCode.service.ISerialPatternService;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.cuspCode.entity.CuspSupplierEvaluation;
 import org.jeecg.modules.cuspCode.entity.CuspSupplierEvaluationScore;
+import org.jeecg.modules.cuspCode.entity.CuspSupplierProfile;
+import org.jeecg.modules.cuspCode.service.ICuspSupplierProfileService;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -44,308 +43,477 @@ import org.jeecg.common.aspect.annotation.AutoLog;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 
 
- /**
+/**
  * @Description: 供应商考评
  * @Author: jeecg-boot
- * @Date:   2024-11-07
+ * @Date: 2024-11-07
  * @Version: V1.0
  */
-@Api(tags="供应商考评")
+@Api(tags = "供应商考评")
 @RestController
 @RequestMapping("/cuspCode/cuspSupplierEvaluation")
 @Slf4j
 public class CuspSupplierEvaluationController {
-	@Autowired
-	private ICuspSupplierEvaluationService cuspSupplierEvaluationService;
-	@Autowired
-	private ICuspSupplierEvaluationScoreService cuspSupplierEvaluationScoreService;
-	 @Autowired
-	 private ISerialPatternService serialPatternService;
-
-	/**
-	 * 分页列表查询
-	 *
-	 * @param cuspSupplierEvaluation
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	//@AutoLog(value = "供应商考评-分页列表查询")
-	@ApiOperation(value="供应商考评-分页列表查询", notes="供应商考评-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<CuspSupplierEvaluation>> queryPageList(CuspSupplierEvaluation cuspSupplierEvaluation,
-															   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-															   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-															   HttpServletRequest req) {
+    @Autowired
+    private ICuspSupplierEvaluationService cuspSupplierEvaluationService;
+    @Autowired
+    private ICuspSupplierEvaluationScoreService cuspSupplierEvaluationScoreService;
+    @Autowired
+    private ISerialPatternService serialPatternService;
+    @Autowired
+    private ICuspSupplierProfileService cuspSupplierProfileService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param cuspSupplierEvaluation
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "供应商考评-分页列表查询")
+    @ApiOperation(value = "供应商考评-分页列表查询", notes = "供应商考评-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<CuspSupplierEvaluation>> queryPageList(CuspSupplierEvaluation cuspSupplierEvaluation,
+                                                               @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                               HttpServletRequest req) {
         // 自定义查询规则
         Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
         // 自定义多选的查询规则为:LIKE_WITH_OR
         customeRuleMap.put("supplierId", QueryRuleEnum.LIKE_WITH_OR);
         customeRuleMap.put("evaluationLevel", QueryRuleEnum.LIKE_WITH_OR);
         customeRuleMap.put("submit", QueryRuleEnum.LIKE_WITH_OR);
-        QueryWrapper<CuspSupplierEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierEvaluation, req.getParameterMap(),customeRuleMap);
-		Page<CuspSupplierEvaluation> page = new Page<CuspSupplierEvaluation>(pageNo, pageSize);
-		IPage<CuspSupplierEvaluation> pageList = cuspSupplierEvaluationService.page(page, queryWrapper);
-		return Result.OK(pageList);
-	}
-	
-	/**
-	 *   添加
-	 *
-	 * @param cuspSupplierEvaluationPage
-	 * @return
-	 */
-	@AutoLog(value = "供应商考评-添加")
-	@ApiOperation(value="供应商考评-添加", notes="供应商考评-添加")
+        QueryWrapper<CuspSupplierEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierEvaluation, req.getParameterMap(), customeRuleMap);
+        Page<CuspSupplierEvaluation> page = new Page<CuspSupplierEvaluation>(pageNo, pageSize);
+        IPage<CuspSupplierEvaluation> pageList = cuspSupplierEvaluationService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param cuspSupplierEvaluationPage
+     * @return
+     */
+    @AutoLog(value = "供应商考评-添加")
+    @ApiOperation(value = "供应商考评-添加", notes = "供应商考评-添加")
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:add")
-	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody CuspSupplierEvaluationPage cuspSupplierEvaluationPage) {
-
-
-		String code = cuspSupplierEvaluationPage.getBillCode();
-		if (StringUtils.isNotBlank(code)) {
-
-			QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
-			queryWrapper.eq("bill_code", code);
-			queryWrapper.eq("del_flag", "0");
-
-			List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
-			if (list.size() != 0) {
-				return Result.error("供应商考评编码重复,请修改!");
-			}
-		} else {
-
-			Result<String> result = serialPatternService.getNextSerial("cusp_supplier_evaluation", "bill_code");
-			if (!result.isSuccess()) {
-				return result;
-			}
-			cuspSupplierEvaluationPage.setBillCode(result.getMessage());
-		}
-
-		CuspSupplierEvaluation cuspSupplierEvaluation = new CuspSupplierEvaluation();
-		BeanUtils.copyProperties(cuspSupplierEvaluationPage, cuspSupplierEvaluation);
-		cuspSupplierEvaluationService.saveMain(cuspSupplierEvaluation, cuspSupplierEvaluationPage.getCuspSupplierEvaluationScoreList());
-		return Result.OK("添加成功!");
-	}
-	
-	/**
-	 *  编辑
-	 *
-	 * @param cuspSupplierEvaluationPage
-	 * @return
-	 */
-	@AutoLog(value = "供应商考评-编辑")
-	@ApiOperation(value="供应商考评-编辑", notes="供应商考评-编辑")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody CuspSupplierEvaluationPage cuspSupplierEvaluationPage) {
+
+
+        Date getBillDate = cuspSupplierEvaluationPage.getBillDate();
+        if (getBillDate == null) {
+            cuspSupplierEvaluationPage.setBillDate(new Date());
+        }
+
+        String supplierId = cuspSupplierEvaluationPage.getSupplierId();
+        String evaluationPeriod = cuspSupplierEvaluationPage.getEvaluationPeriod();
+
+        if (StringUtils.isBlank(supplierId)) {
+            return Result.error("供应商不能为空,请填写!");
+        }
+        if (StringUtils.isBlank(evaluationPeriod)) {
+            cuspSupplierEvaluationPage.setEvaluationPeriod(DateUtils.nowYear());
+        }
+
+        String code = cuspSupplierEvaluationPage.getBillCode();
+        if (StringUtils.isNotBlank(code)) {
+
+            QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
+            queryWrapper.eq("bill_code", code);
+            queryWrapper.eq("del_flag", "0");
+
+            List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+            if (list.size() != 0) {
+                return Result.error("供应商考评编码重复,请修改!");
+            }
+        } else {
+
+            QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
+            queryWrapper.eq("supplier_Id", supplierId);
+            queryWrapper.eq("evaluation_Period", cuspSupplierEvaluationPage.getEvaluationPeriod());
+            queryWrapper.eq("del_flag", "0");
+
+            List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+            if (list.size() != 0) {
+                return Result.error("供应商重复,请修改!");
+            }
+
+            Result<String> result = serialPatternService.getNextSerial("cusp_supplier_evaluation", "bill_code");
+            if (!result.isSuccess()) {
+                return result;
+            }
+            cuspSupplierEvaluationPage.setBillCode(result.getMessage());
+        }
+
+        CuspSupplierEvaluation cuspSupplierEvaluation = new CuspSupplierEvaluation();
+        BeanUtils.copyProperties(cuspSupplierEvaluationPage, cuspSupplierEvaluation);
+        cuspSupplierEvaluationService.saveMain(cuspSupplierEvaluation, cuspSupplierEvaluationPage.getCuspSupplierEvaluationScoreList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param cuspSupplierEvaluationPage
+     * @return
+     */
+    @AutoLog(value = "供应商考评-编辑")
+    @ApiOperation(value = "供应商考评-编辑", notes = "供应商考评-编辑")
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:edit")
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody CuspSupplierEvaluationPage cuspSupplierEvaluationPage) {
-		CuspSupplierEvaluation cuspSupplierEvaluation = new CuspSupplierEvaluation();
-		BeanUtils.copyProperties(cuspSupplierEvaluationPage, cuspSupplierEvaluation);
-		CuspSupplierEvaluation cuspSupplierEvaluationEntity = cuspSupplierEvaluationService.getById(cuspSupplierEvaluation.getId());
-		if(cuspSupplierEvaluationEntity==null) {
-			return Result.error("未找到对应数据");
-		}
-
-		String code = cuspSupplierEvaluation.getBillCode();
-		QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
-		queryWrapper.eq("bill_code", code);
-		queryWrapper.eq("del_flag", "0");
-		queryWrapper.notIn("id", cuspSupplierEvaluation.getId());
-
-		List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
-		if (list.size() != 0) {
-			return Result.error("供应商考评编码重复,请修改!");
-		}
-
-		cuspSupplierEvaluationService.updateMain(cuspSupplierEvaluation, cuspSupplierEvaluationPage.getCuspSupplierEvaluationScoreList());
-		return Result.OK("编辑成功!");
-	}
-	
-	/**
-	 *   通过id删除
-	 *
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "供应商考评-通过id删除")
-	@ApiOperation(value="供应商考评-通过id删除", notes="供应商考评-通过id删除")
+    @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> edit(@RequestBody CuspSupplierEvaluationPage cuspSupplierEvaluationPage) {
+        CuspSupplierEvaluation cuspSupplierEvaluation = new CuspSupplierEvaluation();
+        BeanUtils.copyProperties(cuspSupplierEvaluationPage, cuspSupplierEvaluation);
+        CuspSupplierEvaluation cuspSupplierEvaluationEntity = cuspSupplierEvaluationService.getById(cuspSupplierEvaluation.getId());
+        if (cuspSupplierEvaluationEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+
+
+        String supplierId = cuspSupplierEvaluationPage.getSupplierId();
+        String evaluationPeriod = cuspSupplierEvaluationPage.getEvaluationPeriod();
+
+        if (StringUtils.isBlank(supplierId)) {
+            return Result.error("供应商不能为空,请填写!");
+        }
+        if (StringUtils.isBlank(evaluationPeriod)) {
+            return Result.error("考评期间不能为空,请填写!");
+        }
+
+        QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
+        queryWrapper.eq("supplier_Id", supplierId);
+        queryWrapper.eq("evaluation_Period", evaluationPeriod);
+        queryWrapper.eq("del_flag", "0");
+        queryWrapper.notIn("id", cuspSupplierEvaluation.getId());
+
+        List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+        if (list.size() != 0) {
+            return Result.error("供应商重复,请修改!");
+        }
+
+//		String code = cuspSupplierEvaluation.getBillCode();
+//		QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper();
+//		queryWrapper.eq("bill_code", code);
+//		queryWrapper.eq("del_flag", "0");
+//		queryWrapper.notIn("id", cuspSupplierEvaluation.getId());
+//
+//		List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+//		if (list.size() != 0) {
+//			return Result.error("供应商考评编码重复,请修改!");
+//		}
+
+        cuspSupplierEvaluationService.updateMain(cuspSupplierEvaluation, cuspSupplierEvaluationPage.getCuspSupplierEvaluationScoreList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "供应商考评-通过id删除")
+    @ApiOperation(value = "供应商考评-通过id删除", notes = "供应商考评-通过id删除")
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:delete")
-	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-		cuspSupplierEvaluationService.delMain(id);
-		return Result.OK("删除成功!");
-	}
-	
-	/**
-	 *  批量提交
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "供应商考评-批量提交")
-	@ApiOperation(value="供应商考评-批量提交", notes="供应商考评-批量提交")
+    @DeleteMapping(value = "/delete")
+    public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
+        CuspSupplierEvaluation list = cuspSupplierEvaluationService.getById(id);
+
+        Integer submit = list.getSubmit();
+        if (submit != null && submit.equals(1)) {
+            return Result.error("已提交的数据,无法删除!");
+        }
+
+        cuspSupplierEvaluationService.delMain(id);
+        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="供应商考评-批量取消提交")
+    @GetMapping(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(",")));
+
+        List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+        if (list.size() == 0) {
+            return Result.error("数据为空!");
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for (CuspSupplierEvaluation o : list) {
+            //提交(1-是 ,0-否)
+            Integer submit = o.getSubmit();
+            String code = o.getBillCode();
+
+            String supplierId = o.getSupplierId();
+            String evaluationPeriod = o.getEvaluationPeriod();
+            String evaluationLevel = o.getEvaluationLevel();
+            Date getBillDate = o.getBillDate();
+
+            if (submit != null && submit.equals(1)) {
+                sb.append("考评单号" + code).append("已提交,请勿再次提交;");
+                continue;
+            }
+            if (StringUtils.isBlank(supplierId) || StringUtils.isBlank(evaluationPeriod)
+                    || StringUtils.isBlank(evaluationLevel) || getBillDate == null) {
+                sb.append("考评单号" + code).append("数据维护不全,请维护后提交;");
+                continue;
+            }
+
+        }
+
+        if (StringUtils.isNotBlank(sb.toString())) {
+
+            return Result.error(sb.toString());
+        }
+
+        CuspSupplierEvaluation ent = new CuspSupplierEvaluation();
+        ent.setSubmit(1);
+        cuspSupplierEvaluationService.update(ent, queryWrapper);
+
+        for (CuspSupplierEvaluation cuspSupplierEvaluationPage : list) {
+
+            String supplierId = cuspSupplierEvaluationPage.getSupplierId();
+//            String evaluationPeriod = cuspSupplierEvaluationPage.getEvaluationPeriod();
+            String evaluationLevel = cuspSupplierEvaluationPage.getEvaluationLevel();
+//
+//            if (!evaluationPeriod.equals(DateUtils.nowYear())) {
+//                continue;
+//            }
+
+            CuspSupplierProfile profile = new CuspSupplierProfile();
+            profile.setId(supplierId);
+            profile.setEvaluationLevel(evaluationLevel);
+            cuspSupplierProfileService.updateById(profile);
+
+        }
+
+        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("取消提交成功!");
-	}
-
-	/**
-	 *  批量删除
-	 *
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "供应商考评-批量删除")
-	@ApiOperation(value="供应商考评-批量删除", notes="供应商考评-批量删除")
+    @GetMapping(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(",")));
+
+        List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+        if (list.size() == 0) {
+            return Result.error("数据为空!");
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for (CuspSupplierEvaluation o : list) {
+            //提交(1-是 ,0-否)
+            Integer submit = o.getSubmit();
+            String code = o.getBillCode();
+
+            if (submit == null || submit.equals(0)) {
+                sb.append("考评单号" + code).append("已取消提交,请勿再次取消提交;");
+                continue;
+            }
+        }
+
+        if (StringUtils.isNotBlank(sb.toString())) {
+
+            return Result.error(sb.toString());
+        }
+
+        CuspSupplierEvaluation ent = new CuspSupplierEvaluation();
+        ent.setSubmit(0);
+        cuspSupplierEvaluationService.update(ent, queryWrapper);
+
+        for (CuspSupplierEvaluation cuspSupplierEvaluationPage : list) {
+
+            String supplierId = cuspSupplierEvaluationPage.getSupplierId();
+            String evaluationPeriod = cuspSupplierEvaluationPage.getEvaluationPeriod();
+//
+            if (!evaluationPeriod.equals(DateUtils.nowYear())) {
+                continue;
+            }
+
+            cuspSupplierProfileService.updateEvaluationLevel(supplierId);
+
+        }
+
+
+        return Result.OK("取消提交成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "供应商考评-批量删除")
+    @ApiOperation(value = "供应商考评-批量删除", notes = "供应商考评-批量删除")
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:deleteBatch")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		this.cuspSupplierEvaluationService.delBatchMain(Arrays.asList(ids.split(",")));
-		return Result.OK("批量删除成功!");
-	}
-
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "供应商考评-通过id查询")
-	@ApiOperation(value="供应商考评-通过id查询", notes="供应商考评-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<CuspSupplierEvaluation> queryById(@RequestParam(name="id",required=true) String id) {
-		CuspSupplierEvaluation cuspSupplierEvaluation = cuspSupplierEvaluationService.getById(id);
-		if(cuspSupplierEvaluation==null) {
-			return Result.error("未找到对应数据");
-		}
-		return Result.OK(cuspSupplierEvaluation);
-
-	}
-	
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "供应商考评-得分通过主表ID查询")
-	@ApiOperation(value="供应商考评-得分主表ID查询", notes="供应商考评-得分-通主表ID查询")
-	@GetMapping(value = "/queryCuspSupplierEvaluationScoreByMainId")
-	public Result<List<CuspSupplierEvaluationScore>> queryCuspSupplierEvaluationScoreListByMainId(@RequestParam(name="id",required=true) String id) {
-		List<CuspSupplierEvaluationScore> cuspSupplierEvaluationScoreList = cuspSupplierEvaluationScoreService.selectByMainId(id);
-		return Result.OK(cuspSupplierEvaluationScoreList);
-	}
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+
+        QueryWrapper<CuspSupplierEvaluation> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("id", Arrays.asList(ids.split(",")));
+
+        List<CuspSupplierEvaluation> list = cuspSupplierEvaluationService.list(queryWrapper);
+        if (list.size() == 0) {
+            return Result.error("数据为空!");
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for (CuspSupplierEvaluation o : list) {
+            //提交(1-是 ,0-否)
+            Integer submit = o.getSubmit();
+            String code = o.getBillCode();
+
+            if (submit != null && submit.equals(1)) {
+                sb.append("考评单号" + code).append("已提交,无法删除;");
+                continue;
+            }
+        }
+
+        if (StringUtils.isNotBlank(sb.toString())) {
+            return Result.error(sb.toString());
+        }
+
+        this.cuspSupplierEvaluationService.delBatchMain(Arrays.asList(ids.split(",")));
+        return Result.OK("批量删除成功!");
+    }
 
     /**
-    * 导出excel
-    *
-    * @param request
-    * @param cuspSupplierEvaluation
-    */
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "供应商考评-通过id查询")
+    @ApiOperation(value = "供应商考评-通过id查询", notes = "供应商考评-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<CuspSupplierEvaluation> queryById(@RequestParam(name = "id", required = true) String id) {
+        CuspSupplierEvaluation cuspSupplierEvaluation = cuspSupplierEvaluationService.getById(id);
+        if (cuspSupplierEvaluation == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(cuspSupplierEvaluation);
+
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "供应商考评-得分通过主表ID查询")
+    @ApiOperation(value = "供应商考评-得分主表ID查询", notes = "供应商考评-得分-通主表ID查询")
+    @GetMapping(value = "/queryCuspSupplierEvaluationScoreByMainId")
+    public Result<List<CuspSupplierEvaluationScore>> queryCuspSupplierEvaluationScoreListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<CuspSupplierEvaluationScore> cuspSupplierEvaluationScoreList = cuspSupplierEvaluationScoreService.selectByMainId(id);
+        return Result.OK(cuspSupplierEvaluationScoreList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param cuspSupplierEvaluation
+     */
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:exportXls")
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, CuspSupplierEvaluation cuspSupplierEvaluation) {
-      // Step.1 组装查询条件查询数据
-      QueryWrapper<CuspSupplierEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierEvaluation, request.getParameterMap());
-      LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-
-      //配置选中数据查询条件
-      String selections = request.getParameter("selections");
-      if(oConvertUtils.isNotEmpty(selections)) {
-         List<String> selectionList = Arrays.asList(selections.split(","));
-         queryWrapper.in("id",selectionList);
-      }
-      //Step.2 获取导出数据
-      List<CuspSupplierEvaluation> cuspSupplierEvaluationList = cuspSupplierEvaluationService.list(queryWrapper);
-
-      // Step.3 组装pageList
-      List<CuspSupplierEvaluationPage> pageList = new ArrayList<CuspSupplierEvaluationPage>();
-      for (CuspSupplierEvaluation main : cuspSupplierEvaluationList) {
-          CuspSupplierEvaluationPage vo = new CuspSupplierEvaluationPage();
-          BeanUtils.copyProperties(main, vo);
-          List<CuspSupplierEvaluationScore> cuspSupplierEvaluationScoreList = cuspSupplierEvaluationScoreService.selectByMainId(main.getId());
-          vo.setCuspSupplierEvaluationScoreList(cuspSupplierEvaluationScoreList);
-          pageList.add(vo);
-      }
-
-      // Step.4 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      mv.addObject(NormalExcelConstants.FILE_NAME, "供应商考评列表");
-      mv.addObject(NormalExcelConstants.CLASS, CuspSupplierEvaluationPage.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("供应商考评数据", "导出人:"+sysUser.getRealname(), "供应商考评"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<CuspSupplierEvaluation> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierEvaluation, request.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        //配置选中数据查询条件
+        String selections = request.getParameter("selections");
+        if (oConvertUtils.isNotEmpty(selections)) {
+            List<String> selectionList = Arrays.asList(selections.split(","));
+            queryWrapper.in("id", selectionList);
+        }
+        //Step.2 获取导出数据
+        List<CuspSupplierEvaluation> cuspSupplierEvaluationList = cuspSupplierEvaluationService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<CuspSupplierEvaluationPage> pageList = new ArrayList<CuspSupplierEvaluationPage>();
+        for (CuspSupplierEvaluation main : cuspSupplierEvaluationList) {
+            CuspSupplierEvaluationPage vo = new CuspSupplierEvaluationPage();
+            BeanUtils.copyProperties(main, vo);
+            List<CuspSupplierEvaluationScore> cuspSupplierEvaluationScoreList = cuspSupplierEvaluationScoreService.selectByMainId(main.getId());
+            vo.setCuspSupplierEvaluationScoreList(cuspSupplierEvaluationScoreList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "供应商考评列表");
+        mv.addObject(NormalExcelConstants.CLASS, CuspSupplierEvaluationPage.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("供应商考评数据", "导出人:" + sysUser.getRealname(), "供应商考评"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
     }
 
     /**
-    * 通过excel导入数据
-    *
-    * @param request
-    * @param response
-    * @return
-    */
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
     @RequiresPermissions("cuspCode:cusp_supplier_evaluation:importExcel")
     @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
     public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          // 获取上传文件对象
-          MultipartFile file = entity.getValue();
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<CuspSupplierEvaluationPage> list = ExcelImportUtil.importExcel(file.getInputStream(), CuspSupplierEvaluationPage.class, params);
-              for (CuspSupplierEvaluationPage page : list) {
-                  CuspSupplierEvaluation po = new CuspSupplierEvaluation();
-                  BeanUtils.copyProperties(page, po);
-                  cuspSupplierEvaluationService.saveMain(po, page.getCuspSupplierEvaluationScoreList());
-              }
-              return Result.OK("文件导入成功!数据行数:" + list.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.OK("文件导入失败!");
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            // 获取上传文件对象
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<CuspSupplierEvaluationPage> list = ExcelImportUtil.importExcel(file.getInputStream(), CuspSupplierEvaluationPage.class, params);
+                for (CuspSupplierEvaluationPage page : list) {
+                    CuspSupplierEvaluation po = new CuspSupplierEvaluation();
+                    BeanUtils.copyProperties(page, po);
+                    cuspSupplierEvaluationService.saveMain(po, page.getCuspSupplierEvaluationScoreList());
+                }
+                return Result.OK("文件导入成功!数据行数:" + list.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.OK("文件导入失败!");
     }
 
 }

+ 2 - 1
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspIntermediator.java

@@ -55,8 +55,9 @@ public class CuspIntermediator implements Serializable {
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
 	/**状态(1-启用,0-停用)*/
-	@Excel(name = "状态(status)", width = 15)
+	@Excel(name = "状态(status)", width = 15,dicCode = "valid_status")
     @ApiModelProperty(value = "状态(1-启用,0-停用)")
+    @Dict(dicCode = "valid_status")
     private Integer status;
 	/**删除状态(0-正常,1-已删除)*/
 //	@Excel(name = "删除状态(0-正常,1-已删除)", width = 15)

+ 44 - 5
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierEvaluation.java

@@ -52,6 +52,7 @@ public class CuspSupplierEvaluation implements Serializable {
 	/**状态(1-启用,0-停用)*/
 //	@Excel(name = "状态(1-启用,0-停用)", width = 15)
     @ApiModelProperty(value = "状态(1-启用,0-停用)")
+//    @Dict(dicCode = "valid_status")
     private Integer status;
 	/**删除状态(0-正常,1-已删除)*/
 //	@Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
@@ -59,9 +60,9 @@ public class CuspSupplierEvaluation implements Serializable {
     @TableLogic
     private Integer delFlag;
 	/**单据日期*/
-	@Excel(name = "单据日期(bill date)", 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")
+	@Excel(name = "单据日期(bill date)", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "单据日期")
     private Date billDate;
 	/**考评单号*/
@@ -69,9 +70,10 @@ public class CuspSupplierEvaluation implements Serializable {
     @ApiModelProperty(value = "考评单号")
     private String billCode;
 	/**供应商*/
-	@Excel(name = "供应商(supplier)", width = 15)
+	@Excel(name = "供应商(supplier)", width = 15,dictTable = "cusp_supplier_profile", dicCode = "id", dicText = "name")
     @ApiModelProperty(value = "供应商")
-    private Integer supplierId;
+    @Dict(dictTable = "cusp_supplier_profile", dicCode = "id", dicText = "name")
+    private String supplierId;
 	/**考评期间*/
 	@Excel(name = "考评期间(evaluation period)", width = 15)
     @ApiModelProperty(value = "考评期间")
@@ -79,6 +81,7 @@ public class CuspSupplierEvaluation implements Serializable {
 	/**考评等级*/
 	@Excel(name = "考评等级(evaluation level)", width = 15)
     @ApiModelProperty(value = "考评等级")
+    @Dict(dicCode = "grade")
     private String evaluationLevel;
 	/**备注*/
 //	@Excel(name = "备注", width = 15)
@@ -88,4 +91,40 @@ public class CuspSupplierEvaluation implements Serializable {
 	@Excel(name = "提交(submit)", width = 15)
     @ApiModelProperty(value = "提交(1-是 ,0-否)")
     private Integer submit;
+    /**价格得分*/
+    // @Excel(name = "价格得分", width = 15)
+    @ApiModelProperty(value = "价格得分")
+    private Double priceScore;
+    /**质量得分*/
+    // @Excel(name = "质量得分", width = 15)
+    @ApiModelProperty(value = "质量得分")
+    private Double qualityScore;
+    /**交期得分*/
+    // @Excel(name = "交期得分", width = 15)
+    @ApiModelProperty(value = "交期得分")
+    private Double deliveryTimeScore;
+    /**服务得分*/
+    // @Excel(name = "服务得分", width = 15)
+    @ApiModelProperty(value = "服务得分")
+    private Double serviceScore;
+    /**总计得分*/
+    // @Excel(name = "总计得分", width = 15)
+    @ApiModelProperty(value = "总计得分")
+    private Double totalScore;
+    /**价格自动取数*/
+    // @Excel(name = "价格自动取数", width = 15)
+    @ApiModelProperty(value = "价格自动取数")
+    private String priceAuto;
+    /**质量自动取数*/
+    // @Excel(name = "质量自动取数", width = 15)
+    @ApiModelProperty(value = "质量自动取数")
+    private String qualityAuto;
+    /**交期自动取数*/
+    // @Excel(name = "交期自动取数", width = 15)
+    @ApiModelProperty(value = "交期自动取数")
+    private String deliveryTimeAuto;
+    /**服务自动取数*/
+    // @Excel(name = "服务自动取数", width = 15)
+    @ApiModelProperty(value = "服务自动取数")
+    private String serviceAuto;
 }

+ 10 - 5
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfile.java

@@ -50,8 +50,9 @@ public class CuspSupplierProfile implements Serializable {
     @ApiModelProperty(value = "更新时间")
     private Date updateTime;
 	/**状态(1-启用,0-停用)*/
-	@Excel(name = "状态(status)", width = 15)
+	@Excel(name = "状态(status)", width = 15,dicCode = "valid_status")
     @ApiModelProperty(value = "状态(1-启用,0-停用)")
+    @Dict(dicCode = "valid_status")
     private Integer status;
 	/**删除状态(0-正常,1-已删除)*/
 //	@Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
@@ -103,8 +104,9 @@ public class CuspSupplierProfile implements Serializable {
     @ApiModelProperty(value = "公司地址")
     private String address;
 	/**供应商性质*/
-	@Excel(name = "供应商性质(supplier nature)", width = 15)
+	@Excel(name = "供应商性质(supplier nature)", width = 15,dicCode = "supplier_nature")
     @ApiModelProperty(value = "供应商性质")
+    @Dict(dicCode = "supplier_nature")
     private String supplierNature;
 	/**国家*/
 	@Excel(name = "国家(country)", width = 15)
@@ -115,12 +117,14 @@ public class CuspSupplierProfile implements Serializable {
     @ApiModelProperty(value = "币种")
     private String currency;
 	/**国外供应商*/
-//	@Excel(name = "国外供应商", width = 15)
+	@Excel(name = "国外供应商", width = 15,dicCode = "yes_or_no")
     @ApiModelProperty(value = "国外供应商")
+    @Dict(dicCode = "yes_or_no")
     private Integer abroadSupplier;
 	/**原厂*/
-	@Excel(name = "原厂(original factory)", width = 15)
+	@Excel(name = "原厂(original factory)", width = 15,dicCode = "yes_or_no")
     @ApiModelProperty(value = "原厂")
+    @Dict(dicCode = "yes_or_no")
     private Integer originalFactory;
 	/**开户行*/
 //	@Excel(name = "开户行", width = 15)
@@ -156,7 +160,8 @@ public class CuspSupplierProfile implements Serializable {
     private Integer temporarySupplier;
 	/**供应商等级*/
 	@Excel(name = "考评等级(evaluation level)", width = 15)
-    @ApiModelProperty(value = "供应商等级")
+    @ApiModelProperty(value = "考评等级")
+    @Dict(dicCode = "grade")
     private String evaluationLevel;
 
     @ApiModelProperty(value = "当前审批人姓名(临时供应商)")

+ 5 - 4
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfileCatalog.java

@@ -4,10 +4,8 @@ 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 com.baomidou.mybatisplus.annotation.*;
 import org.jeecg.common.constant.ProvinceCityArea;
 import org.jeecg.common.util.SpringContextUtils;
 import lombok.Data;
@@ -107,4 +105,7 @@ public class CuspSupplierProfileCatalog implements Serializable {
 	@Excel(name = "是否有效", width = 15)
     @ApiModelProperty(value = "是否有效")
     private Integer valid;
+
+    @TableField(exist = false)
+	private String classId;
 }

+ 67 - 33
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/entity/CuspSupplierProfileQualification.java

@@ -1,91 +1,125 @@
 package org.jeecg.modules.cuspCode.entity;
 
 import java.io.Serializable;
+
 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.aspect.annotation.Dict;
 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 java.util.Date;
+
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.io.UnsupportedEncodingException;
 
 /**
  * @Description: 供应商档案-资质信息
  * @Author: jeecg-boot
- * @Date:   2024-11-07
+ * @Date: 2024-11-07
  * @Version: V1.0
  */
-@ApiModel(value="cusp_supplier_profile_qualification对象", description="供应商档案-资质信息")
+@ApiModel(value = "cusp_supplier_profile_qualification对象", description = "供应商档案-资质信息")
 @Data
 @TableName("cusp_supplier_profile_qualification")
 public class CuspSupplierProfileQualification implements Serializable {
     private static final long serialVersionUID = 1L;
 
-	/**主键id*/
-	@TableId(type = IdType.ASSIGN_ID)
+    /**
+     * 主键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")
+    /**
+     * 创建时间
+     */
+    @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")
+    /**
+     * 更新时间
+     */
+    @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)
+    /**
+     * 状态(1-启用,0-停用)
+     */
+    //  @Excel(name = "状态(1-启用,0-停用)", width = 15)
     @ApiModelProperty(value = "状态(1-启用,0-停用)")
     private Integer status;
-	/**删除状态(0-正常,1-已删除)*/
-	//  @Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
+    /**
+     * 删除状态(0-正常,1-已删除)
+     */
+    //  @Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
     @ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
     @TableLogic
     private Integer delFlag;
-	/**主表主键(供应商档案)*/
+    /**
+     * 主表主键(供应商档案)
+     */
     @ApiModelProperty(value = "主表主键(供应商档案)")
     private String headId;
-	/**资质证书名称*/
-	//  @Excel(name = "资质证书名称", width = 15)
+    /**
+     * 资质证书名称
+     */
+    @Excel(name = "资质证书名称", width = 15)
     @ApiModelProperty(value = "资质证书名称")
     private String qualificationCertificateName;
-	/**资质证书编码*/
-	//  @Excel(name = "资质证书编码", width = 15)
+    /**
+     * 资质证书编码
+     */
+    @Excel(name = "资质证书编码", width = 15)
     @ApiModelProperty(value = "资质证书编码")
     private String qualificationCertificateCode;
-	/**有效期始*/
-	//  @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")
+    /**
+     * 有效期始
+     */
+    @Excel(name = "有效期始", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty(value = "有效期始")
     private Date validBegin;
-	/**有效期止*/
-	//  @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")
+    /**
+     * 有效期止
+     */
+    @Excel(name = "有效期止", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty(value = "有效期止")
     private Date validEnd;
-	/**资质证书附件*/
-	//  @Excel(name = "资质证书附件", width = 15)
+    /**
+     * 资质证书附件
+     */
+    //  @Excel(name = "资质证书附件", width = 15)
     @ApiModelProperty(value = "资质证书附件")
     private String qualificationCertificate;
-	/**临期提醒*/
-	//  @Excel(name = "临期提醒", width = 15)
+    /**
+     * 临期提醒
+     */
+    @Excel(name = "临期提醒", width = 15, dicCode = "yes_or_no")
     @ApiModelProperty(value = "临期提醒")
+    @Dict(dicCode = "yes_or_no")
     private Integer deadlineReminder;
 }

+ 2 - 0
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/mapper/CuspSupplierProfileMapper.java

@@ -16,5 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface CuspSupplierProfileMapper extends BaseMapper<CuspSupplierProfile> {
 
+    int updateEvaluationLevel(String id);
+
     IPage<CuspSupplierDeadlineReminderVo> page2(Page<CuspSupplierDeadlineReminderVo> page, @Param("ew")  QueryWrapper<CuspSupplierDeadlineReminderVo> queryWrapper);
 }

+ 30 - 13
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/mapper/xml/CuspSupplierProfileMapper.xml

@@ -2,18 +2,35 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.cuspCode.mapper.CuspSupplierProfileMapper">
 
-    <select id="page2"  resultType="org.jeecg.modules.cuspCode.vo.CuspSupplierDeadlineReminderVo">
-       select * from (
-        select
-        code,name,abbreviation,duty_paragraph,contacts,
-        phone,country,payment_Terms,original_Factory,
-        qualification_Certificate_Name,valid_Begin,
-        valid_End,
-        IF(DATEDIFF(valid_End,now())>=0, DATEDIFF(valid_End,now()), '超期') as deadlineReminder
-        from cusp_supplier_profile_qualification a
-        left join cusp_supplier_profile b
-        on a.head_Id=b.id
-        ) a
-        ${ew.customSqlSegment}
+    <select id="page2" resultType="org.jeecg.modules.cuspCode.vo.CuspSupplierDeadlineReminderVo">
+        select *
+        from (
+                 SELECT CODE,
+                        NAME,
+                        abbreviation,
+                        duty_paragraph,
+                        contacts,
+                        phone,
+                        country,
+                        payment_Terms,
+                        original_Factory,
+                        qualification_Certificate_Name,
+                        valid_Begin,
+                        valid_End,
+                        qualification_certificate,
+                        IF
+                            (DATEDIFF(valid_End, now()) >= 0, DATEDIFF(valid_End, now()), '超期') AS deadlineReminder
+                 FROM cusp_supplier_profile_qualification a
+                          LEFT JOIN cusp_supplier_profile b ON a.head_Id = b.id
+             ) a
+            ${ew.customSqlSegment}
     </select>
+
+    <update id="updateEvaluationLevel">
+        update cusp_supplier_profile
+        set evaluation_Level = null
+        where id = #{id}
+
+    </update>
+
 </mapper>

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/service/ICuspSupplierProfileService.java

@@ -71,6 +71,7 @@ public interface ICuspSupplierProfileService extends IService<CuspSupplierProfil
 
     IPage<CuspSupplierDeadlineReminderVo> page2(Page<CuspSupplierDeadlineReminderVo> page, QueryWrapper<CuspSupplierDeadlineReminderVo> queryWrapper);
 
+	public int updateEvaluationLevel(String id);
 //	/**
 //	 * 通过ids审核拒绝
 //	 *

+ 6 - 0
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/service/impl/CuspSupplierProfileServiceImpl.java

@@ -245,6 +245,12 @@ public class CuspSupplierProfileServiceImpl extends ServiceImpl<CuspSupplierProf
 		return cuspSupplierProfileMapper.page2(page,queryWrapper);
 	}
 
+
+	@Override
+	public int updateEvaluationLevel(String id){
+		return cuspSupplierProfileMapper.updateEvaluationLevel(id);
+	}
+
 	public static int getCharIndex(String[] array, String target) {
 		for (int i = 0; i < array.length; i++) {
 			if (array[i] == target) {

+ 11 - 7
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/vo/CuspSupplierDeadlineReminderVo.java

@@ -54,22 +54,26 @@ public class CuspSupplierDeadlineReminderVo {
     @ApiModelProperty(value = "资质证书名称")
     private String qualificationCertificateName;
     /**有效期始*/
-      @Excel(name = "有效期始valid begin)", 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")
+      @Excel(name = "有效期始valid begin)", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "有效期始")
     private Date validBegin;
     /**有效期止*/
-      @Excel(name = "有效期止(valid end)", 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")
+      @Excel(name = "有效期止(valid end)", width = 20, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "有效期止")
     private Date validEnd;
     /**临期提醒*/
-      @Excel(name = "临期提醒(deadline days)", width = 15)
+    @Excel(name = "临期提醒(deadline days)", width = 15)
     @ApiModelProperty(value = "临期提醒")
     @TableField(exist = false)
     private String deadlineReminder;
 
+    //资质证书附件(qualification certificate attachment)
+    @TableField(exist = false)
+    private String qualificationCertificate;
+
 
 }

+ 40 - 5
srm-module-code/src/main/java/org/jeecg/modules/cuspCode/vo/CuspSupplierEvaluationPage.java

@@ -50,9 +50,9 @@ public class CuspSupplierEvaluationPage {
 	@ApiModelProperty(value = "删除状态(0-正常,1-已删除)")
     private Integer delFlag;
 	/**单据日期*/
-	@Excel(name = "单据日期(bill date)", 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")
+	@Excel(name = "单据日期(bill date)", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
 	@ApiModelProperty(value = "单据日期")
     private Date billDate;
 	/**考评单号*/
@@ -62,7 +62,7 @@ public class CuspSupplierEvaluationPage {
 	/**供应商*/
 	@Excel(name = "供应商(supplier)", width = 15)
 	@ApiModelProperty(value = "供应商")
-    private Integer supplierId;
+    private String supplierId;
 	/**考评期间*/
 	@Excel(name = "考评期间(evaluation period)", width = 15)
 	@ApiModelProperty(value = "考评期间")
@@ -79,7 +79,42 @@ public class CuspSupplierEvaluationPage {
 	@Excel(name = "提交(submit)", width = 15)
 	@ApiModelProperty(value = "提交(1-是 ,0-否)")
     private Integer submit;
-
+	/**价格得分*/
+	// @Excel(name = "价格得分", width = 15)
+	@ApiModelProperty(value = "价格得分")
+	private Double priceScore;
+	/**质量得分*/
+	// @Excel(name = "质量得分", width = 15)
+	@ApiModelProperty(value = "质量得分")
+	private Double qualityScore;
+	/**交期得分*/
+	// @Excel(name = "交期得分", width = 15)
+	@ApiModelProperty(value = "交期得分")
+	private Double deliveryTimeScore;
+	/**服务得分*/
+	// @Excel(name = "服务得分", width = 15)
+	@ApiModelProperty(value = "服务得分")
+	private Double serviceScore;
+	/**总计得分*/
+	// @Excel(name = "总计得分", width = 15)
+	@ApiModelProperty(value = "总计得分")
+	private Double totalScore;
+	/**价格自动取数*/
+	// @Excel(name = "价格自动取数", width = 15)
+	@ApiModelProperty(value = "价格自动取数")
+	private String priceAuto;
+	/**质量自动取数*/
+	// @Excel(name = "质量自动取数", width = 15)
+	@ApiModelProperty(value = "质量自动取数")
+	private String qualityAuto;
+	/**交期自动取数*/
+	// @Excel(name = "交期自动取数", width = 15)
+	@ApiModelProperty(value = "交期自动取数")
+	private String deliveryTimeAuto;
+	/**服务自动取数*/
+	// @Excel(name = "服务自动取数", width = 15)
+	@ApiModelProperty(value = "服务自动取数")
+	private String serviceAuto;
 //	@ExcelCollection(name="供应商考评-得分")
 	@ApiModelProperty(value = "供应商考评-得分")
 	private List<CuspSupplierEvaluationScore> cuspSupplierEvaluationScoreList;

+ 93 - 2
srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleRfpController.java

@@ -9,6 +9,7 @@ import org.jeecg.modules.baseCode.service.ISerialPatternService;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.cuspCode.entity.CuspSupplierEvaluation;
 import org.jeecg.modules.saleCode.entity.SaleRfp;
 import org.jeecg.modules.saleCode.service.ISaleRfpService;
 
@@ -143,8 +144,98 @@ public class SaleRfpController extends JeecgController<SaleRfp, ISaleRfpService>
 		this.saleRfpService.removeByIds(Arrays.asList(ids.split(",")));
 		return Result.OK("批量删除成功!");
 	}
-	
-	/**
+
+
+	 /**
+	  *  批量提交
+	  *
+	  * @param ids
+	  * @return
+	  */
+	 @AutoLog(value = "招标书(RFP)-批量提交")
+	 @ApiOperation(value="招标书(RFP)-批量提交", notes="招标书(RFP)-批量提交")
+//    @RequiresPermissions("cuspCode:cusp_supplier_evaluation:deleteBatch")
+	 @GetMapping(value = "/submitBatch")
+	 public Result<String> submitBatch(@RequestParam(name="ids",required=true) String ids) {
+
+		 QueryWrapper<SaleRfp> queryWrapper = new QueryWrapper<>();
+		 queryWrapper.in("id",Arrays.asList(ids.split(",")));
+
+		 List<SaleRfp> list = saleRfpService.list(queryWrapper);
+		 if(list.size() == 0){
+			 return Result.error("数据为空!");
+		 }
+
+		 StringBuffer sb = new StringBuffer();
+		 for(SaleRfp o:list){
+			 //提交(1-是 ,0-否)
+			 Integer submit = o.getSubmit();
+			 String code = o.getBillCode();
+
+			 if(submit != null && submit.equals(1)){
+				 sb.append("单据编码"+code).append("已提交,请勿再次提交;");
+				 continue;
+			 }
+		 }
+
+		 if(StringUtils.isNotBlank(sb.toString())){
+
+			 return Result.error(sb.toString());
+		 }
+
+		 SaleRfp ent = new SaleRfp();
+		 ent.setSubmit(1);
+		 saleRfpService.update(ent,queryWrapper);
+
+		 return Result.OK("提交成功!");
+	 }
+
+	 /**
+	  *  批量取消提交
+	  *
+	  * @param ids
+	  * @return
+	  */
+	 @AutoLog(value = "招标书(RFP)-批量取消提交")
+	 @ApiOperation(value="招标书(RFP)-批量取消提交", notes="招标书(RFP)-批量取消提交")
+//    @RequiresPermissions("cuspCode:cusp_supplier_evaluation:deleteBatch")
+	 @GetMapping(value = "/returnSubmitBatch")
+	 public Result<String> returnSubmitBatch(@RequestParam(name="ids",required=true) String ids) {
+
+		 QueryWrapper<SaleRfp> queryWrapper = new QueryWrapper<>();
+		 queryWrapper.in("id",Arrays.asList(ids.split(",")));
+
+		 List<SaleRfp> list = saleRfpService.list(queryWrapper);
+		 if(list.size() == 0){
+			 return Result.error("数据为空!");
+		 }
+
+		 StringBuffer sb = new StringBuffer();
+		 for(SaleRfp o:list){
+			 //提交(1-是 ,0-否)
+			 Integer submit = o.getSubmit();
+			 String code = o.getBillCode();
+
+			 if(submit == null || submit.equals(0)){
+				 sb.append("单号"+code).append("已取消提交,请勿再次取消提交;");
+				 continue;
+			 }
+		 }
+
+		 if(StringUtils.isNotBlank(sb.toString())){
+
+			 return Result.error(sb.toString());
+		 }
+
+		 SaleRfp ent = new SaleRfp();
+		 ent.setSubmit(0);
+		 saleRfpService.update(ent,queryWrapper);
+
+		 return Result.OK("取消提交成功!");
+	 }
+
+
+	 /**
 	 * 通过id查询
 	 *
 	 * @param id

+ 12 - 9
srm-module-code/src/main/java/org/jeecg/modules/saleCode/entity/SaleRfp.java

@@ -76,15 +76,17 @@ public class SaleRfp implements Serializable {
 	/**项目*/
 	@Excel(name = "项目", width = 15)
     @ApiModelProperty(value = "项目")
+    @Dict(dictTable = "base_project_archive", dicCode = "id", dicText = "name")
     private String projectId;
 	/**客户*/
 	@Excel(name = "客户", width = 15)
+    @Dict(dictTable = "cusp_customer_profile", dicCode = "id", dicText = "name")
     @ApiModelProperty(value = "客户")
     private String customerId;
 	/**采购方式*/
 	@Excel(name = "采购方式", width = 15)
     @ApiModelProperty(value = "采购方式")
-    private Integer procurementMethod;
+    private String procurementMethod;
 	/**招标项目号*/
 	@Excel(name = "招标项目号", width = 15)
     @ApiModelProperty(value = "招标项目号")
@@ -98,15 +100,15 @@ public class SaleRfp implements Serializable {
     @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")
+	@Excel(name = "投标时间", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @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")
+	@Excel(name = "开标时间", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "开标时间")
     private Date openingTime;
 	/**项目总价*/
@@ -114,9 +116,10 @@ public class SaleRfp implements Serializable {
     @ApiModelProperty(value = "项目总价")
     private BigDecimal totalMoney;
 	/**投标结果*/
-	@Excel(name = "投标结果", width = 15)
+	@Excel(name = "投标结果", width = 15,dicCode = "tender_result")
     @ApiModelProperty(value = "投标结果")
-    private Integer tenderResult;
+    @Dict(dicCode = "tender_result")
+    private String tenderResult;
 	/**中标方*/
 	@Excel(name = "中标方", width = 15)
     @ApiModelProperty(value = "中标方")