Kaynağa Gözat

销售询价单(inquiry form)

yuansh 1 gün önce
ebeveyn
işleme
332fa11eae
29 değiştirilmiş dosya ile 2082 ekleme ve 252 silme
  1. 4 0
      srm-module-code/pom.xml
  2. 202 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/controller/CuspSupplierProfileCatalogController.java
  3. 281 249
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/controller/CuspSupplierProfileController.java
  4. 10 1
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/entity/CuspSupplierProfile.java
  5. 110 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/entity/CuspSupplierProfileCatalog.java
  6. 32 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/mapper/CuspSupplierProfileCatalogMapper.java
  7. 19 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/mapper/xml/CuspSupplierProfileCatalogMapper.xml
  8. 18 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/ICuspSupplierProfileCatalogService.java
  9. 24 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/ICuspSupplierProfileService.java
  10. 54 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/impl/CuspSupplierProfileCatalogServiceImpl.java
  11. 152 2
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/impl/CuspSupplierProfileServiceImpl.java
  12. 3 0
      srm-module-code/src/main/java/com/cuidian/srm/cuspCode/vo/CuspSupplierProfilePage.java
  13. 288 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/controller/SaleInquiryFormController.java
  14. 153 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryForm.java
  15. 125 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryFormProduct.java
  16. 87 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryFormShip.java
  17. 17 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormMapper.java
  18. 31 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormProductMapper.java
  19. 31 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormShipMapper.java
  20. 5 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/xml/SaleInquiryFormMapper.xml
  21. 16 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/xml/SaleInquiryFormProductMapper.xml
  22. 16 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/xml/SaleInquiryFormShipMapper.xml
  23. 22 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormProductService.java
  24. 51 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormService.java
  25. 22 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormShipService.java
  26. 27 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/impl/SaleInquiryFormProductServiceImpl.java
  27. 98 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/impl/SaleInquiryFormServiceImpl.java
  28. 27 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/impl/SaleInquiryFormShipServiceImpl.java
  29. 157 0
      srm-module-code/src/main/java/com/cuidian/srm/saleCode/vo/SaleInquiryFormPage.java

+ 4 - 0
srm-module-code/pom.xml

@@ -23,6 +23,10 @@
             <groupId>org.jeecgframework.boot</groupId>
             <artifactId>jeecg-boot-base-core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.jeecgframework.boot</groupId>
+            <artifactId>jeecg-system-biz</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 202 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/controller/CuspSupplierProfileCatalogController.java

@@ -0,0 +1,202 @@
+package com.cuidian.srm.cuspCode.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 com.cuidian.srm.cuspCode.entity.CuspSupplierProfileMan;
+import com.cuidian.srm.cuspCode.vo.CuspSupplierProfilePage;
+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.cuspCode.entity.CuspSupplierProfileCatalog;
+import com.cuidian.srm.cuspCode.service.ICuspSupplierProfileCatalogService;
+
+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: 供应商档案子表 - 供货目录
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Api(tags="供应商档案子表 - 供货目录")
+@RestController
+@RequestMapping("/cuspCode/cuspSupplierProfileCatalog")
+@Slf4j
+public class CuspSupplierProfileCatalogController extends JeecgController<CuspSupplierProfileCatalog, ICuspSupplierProfileCatalogService> {
+	@Autowired
+	private ICuspSupplierProfileCatalogService cuspSupplierProfileCatalogService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param cuspSupplierProfileCatalog
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "供应商档案子表 - 供货目录-分页列表查询")
+	@ApiOperation(value="供应商档案子表 - 供货目录-分页列表查询", notes="供应商档案子表 - 供货目录-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<CuspSupplierProfileCatalog>> queryPageList(CuspSupplierProfileCatalog cuspSupplierProfileCatalog,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<CuspSupplierProfileCatalog> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierProfileCatalog, req.getParameterMap());
+		Page<CuspSupplierProfileCatalog> page = new Page<CuspSupplierProfileCatalog>(pageNo, pageSize);
+		IPage<CuspSupplierProfileCatalog> pageList = cuspSupplierProfileCatalogService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+
+
+	 /**
+	  * 通过id查询
+	  *
+	  * @param id
+	  * @return
+	  */
+	 //@AutoLog(value = "供应商档案-供货目录-列表查询")
+	 @ApiOperation(value = "供应商档案-供货目录-列表查询", notes = "供应商档案-供货目录-列表查询")
+	 @GetMapping(value = "/querySupplierProfileCatalogByMainId")
+	 public Result<List<CuspSupplierProfileCatalog>> queryCuspSupplierProfileManListByMainId(@RequestParam(name = "id", required = true) String id) {
+		 List<CuspSupplierProfileCatalog> cuspSupplierProfileManList = cuspSupplierProfileCatalogService.selectByMainId(id);
+		 return Result.OK(cuspSupplierProfileManList);
+	 }
+
+
+	 /**
+	 *   添加
+	 *
+	 * @param cuspSupplierProfilePage
+	 * @return
+	 */
+	@AutoLog(value = "供应商档案子表 - 供货目录-添加")
+	@ApiOperation(value="供应商档案子表 - 供货目录-添加", notes="供应商档案子表 - 供货目录-添加")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody CuspSupplierProfilePage cuspSupplierProfilePage) {
+		if(cuspSupplierProfilePage !=null && cuspSupplierProfilePage.getCuspSupplierProfileCatalog().size() > 0){
+			cuspSupplierProfileCatalogService.updateMain(cuspSupplierProfilePage.getCuspSupplierProfileCatalog());
+			return Result.OK("添加成功!");
+		}
+
+		return Result.error("数据为空!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param cuspSupplierProfileCatalog
+	 * @return
+	 */
+	@AutoLog(value = "供应商档案子表 - 供货目录-编辑")
+	@ApiOperation(value="供应商档案子表 - 供货目录-编辑", notes="供应商档案子表 - 供货目录-编辑")
+	@RequiresPermissions("cuspCode:cusp_supplier_profile_catalog:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody CuspSupplierProfileCatalog cuspSupplierProfileCatalog) {
+		cuspSupplierProfileCatalogService.updateById(cuspSupplierProfileCatalog);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "供应商档案子表 - 供货目录-通过id删除")
+	@ApiOperation(value="供应商档案子表 - 供货目录-通过id删除", notes="供应商档案子表 - 供货目录-通过id删除")
+	@RequiresPermissions("cuspCode:cusp_supplier_profile_catalog:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		cuspSupplierProfileCatalogService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "供应商档案子表 - 供货目录-批量删除")
+	@ApiOperation(value="供应商档案子表 - 供货目录-批量删除", notes="供应商档案子表 - 供货目录-批量删除")
+	@RequiresPermissions("cuspCode:cusp_supplier_profile_catalog:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.cuspSupplierProfileCatalogService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "供应商档案子表 - 供货目录-通过id查询")
+	@ApiOperation(value="供应商档案子表 - 供货目录-通过id查询", notes="供应商档案子表 - 供货目录-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<CuspSupplierProfileCatalog> queryById(@RequestParam(name="id",required=true) String id) {
+		CuspSupplierProfileCatalog cuspSupplierProfileCatalog = cuspSupplierProfileCatalogService.getById(id);
+		if(cuspSupplierProfileCatalog==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(cuspSupplierProfileCatalog);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param cuspSupplierProfileCatalog
+    */
+    @RequiresPermissions("cuspCode:cusp_supplier_profile_catalog:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, CuspSupplierProfileCatalog cuspSupplierProfileCatalog) {
+        return super.exportXls(request, cuspSupplierProfileCatalog, CuspSupplierProfileCatalog.class, "供应商档案子表 - 供货目录");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("cuspCode:cusp_supplier_profile_catalog:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, CuspSupplierProfileCatalog.class);
+    }
+
+}

+ 281 - 249
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/controller/CuspSupplierProfileController.java

@@ -16,6 +16,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.cuidian.srm.baseCode.service.ISerialPatternService;
 import com.cuidian.srm.cuspCode.entity.CuspCustomerProfile;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.modules.system.service.ISysUserService;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -51,42 +52,43 @@ 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/cuspSupplierProfile")
 @Slf4j
 public class CuspSupplierProfileController {
-	@Autowired
-	private ICuspSupplierProfileService cuspSupplierProfileService;
-	@Autowired
-	private ICuspSupplierProfileManService cuspSupplierProfileManService;
-	@Autowired
-	private ICuspSupplierProfileQualificationService cuspSupplierProfileQualificationService;
-	 @Autowired
-	 private ISerialPatternService serialPatternService;
-
-	/**
-	 * 分页列表查询
-	 *
-	 * @param cuspSupplierProfile
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	//@AutoLog(value = "供应商档案-分页列表查询")
-	@ApiOperation(value="供应商档案-分页列表查询", notes="供应商档案-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<CuspSupplierProfile>> queryPageList(CuspSupplierProfile cuspSupplierProfile,
-								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-								   HttpServletRequest req) {
+    @Autowired
+    private ICuspSupplierProfileService cuspSupplierProfileService;
+    @Autowired
+    private ICuspSupplierProfileManService cuspSupplierProfileManService;
+    @Autowired
+    private ICuspSupplierProfileQualificationService cuspSupplierProfileQualificationService;
+    @Autowired
+    private ISerialPatternService serialPatternService;
+
+
+    /**
+     * 分页列表查询
+     *
+     * @param cuspSupplierProfile
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    //@AutoLog(value = "供应商档案-分页列表查询")
+    @ApiOperation(value = "供应商档案-分页列表查询", notes = "供应商档案-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<CuspSupplierProfile>> queryPageList(CuspSupplierProfile cuspSupplierProfile,
+                                                            @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
@@ -96,242 +98,272 @@ public class CuspSupplierProfileController {
         customeRuleMap.put("originalFactory", QueryRuleEnum.LIKE_WITH_OR);
         customeRuleMap.put("temporarySupplier", QueryRuleEnum.LIKE_WITH_OR);
         customeRuleMap.put("evaluationLevel", QueryRuleEnum.LIKE_WITH_OR);
-        QueryWrapper<CuspSupplierProfile> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierProfile, req.getParameterMap(),customeRuleMap);
-		Page<CuspSupplierProfile> page = new Page<CuspSupplierProfile>(pageNo, pageSize);
-		IPage<CuspSupplierProfile> pageList = cuspSupplierProfileService.page(page, queryWrapper);
-		return Result.OK(pageList);
-	}
-	
-	/**
-	 *   添加
-	 *
-	 * @param cuspSupplierProfilePage
-	 * @return
-	 */
-	@AutoLog(value = "供应商档案-添加")
-	@ApiOperation(value="供应商档案-添加", notes="供应商档案-添加")
+        QueryWrapper<CuspSupplierProfile> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierProfile, req.getParameterMap(), customeRuleMap);
+        Page<CuspSupplierProfile> page = new Page<CuspSupplierProfile>(pageNo, pageSize);
+        IPage<CuspSupplierProfile> pageList = cuspSupplierProfileService.page(page, queryWrapper);
+        return Result.OK(pageList);
+    }
+
+    /**
+     * 添加
+     *
+     * @param cuspSupplierProfilePage
+     * @return
+     */
+    @AutoLog(value = "供应商档案-添加")
+    @ApiOperation(value = "供应商档案-添加", notes = "供应商档案-添加")
     @RequiresPermissions("cuspCode:cusp_supplier_profile:add")
-	@PostMapping(value = "/add")
-	public Result<String> add(@RequestBody CuspSupplierProfilePage cuspSupplierProfilePage) {
-
-
-		String code = cuspSupplierProfilePage.getCode();
-		if (StringUtils.isNotBlank(code)) {
-
-			QueryWrapper<CuspSupplierProfile> queryWrapper = new QueryWrapper();
-			queryWrapper.eq("code", code);
-			queryWrapper.eq("del_flag", "0");
-
-			List<CuspSupplierProfile> list = cuspSupplierProfileService.list(queryWrapper);
-			if (list.size() != 0) {
-				return Result.error("供应商档案编码重复,请修改!");
-			}
-		} else {
-
-			Result<String> result = serialPatternService.getNextSerial("cusp_supplier_profile", "code");
-			if (!result.isSuccess()) {
-				return result;
-			}
-			cuspSupplierProfilePage.setCode(result.getMessage());
-		}
-
-
-		CuspSupplierProfile cuspSupplierProfile = new CuspSupplierProfile();
-		BeanUtils.copyProperties(cuspSupplierProfilePage, cuspSupplierProfile);
-		cuspSupplierProfileService.saveMain(cuspSupplierProfile, cuspSupplierProfilePage.getCuspSupplierProfileManList(),cuspSupplierProfilePage.getCuspSupplierProfileQualificationList());
-		return Result.OK("添加成功!");
-	}
-	
-	/**
-	 *  编辑
-	 *
-	 * @param cuspSupplierProfilePage
-	 * @return
-	 */
-	@AutoLog(value = "供应商档案-编辑")
-	@ApiOperation(value="供应商档案-编辑", notes="供应商档案-编辑")
+    @PostMapping(value = "/add")
+    public Result<String> add(@RequestBody CuspSupplierProfilePage cuspSupplierProfilePage) {
+
+
+        String code = cuspSupplierProfilePage.getCode();
+        if (StringUtils.isNotBlank(code)) {
+
+            QueryWrapper<CuspSupplierProfile> queryWrapper = new QueryWrapper();
+            queryWrapper.eq("code", code);
+            queryWrapper.eq("del_flag", "0");
+
+            List<CuspSupplierProfile> list = cuspSupplierProfileService.list(queryWrapper);
+            if (list.size() != 0) {
+                return Result.error("供应商档案编码重复,请修改!");
+            }
+        } else {
+
+            Result<String> result = serialPatternService.getNextSerial("cusp_supplier_profile", "code");
+            if (!result.isSuccess()) {
+                return result;
+            }
+            cuspSupplierProfilePage.setCode(result.getMessage());
+        }
+
+
+        CuspSupplierProfile cuspSupplierProfile = new CuspSupplierProfile();
+        BeanUtils.copyProperties(cuspSupplierProfilePage, cuspSupplierProfile);
+        cuspSupplierProfileService.saveMain(cuspSupplierProfile, cuspSupplierProfilePage.getCuspSupplierProfileManList(), cuspSupplierProfilePage.getCuspSupplierProfileQualificationList());
+        return Result.OK("添加成功!");
+    }
+
+    /**
+     * 编辑
+     *
+     * @param cuspSupplierProfilePage
+     * @return
+     */
+    @AutoLog(value = "供应商档案-编辑")
+    @ApiOperation(value = "供应商档案-编辑", notes = "供应商档案-编辑")
     @RequiresPermissions("cuspCode:cusp_supplier_profile:edit")
-	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
-	public Result<String> edit(@RequestBody CuspSupplierProfilePage cuspSupplierProfilePage) {
-		CuspSupplierProfile cuspSupplierProfile = new CuspSupplierProfile();
-		BeanUtils.copyProperties(cuspSupplierProfilePage, cuspSupplierProfile);
-		CuspSupplierProfile cuspSupplierProfileEntity = cuspSupplierProfileService.getById(cuspSupplierProfile.getId());
-		if(cuspSupplierProfileEntity==null) {
-			return Result.error("未找到对应数据");
-		}
-
-		String code = cuspSupplierProfile.getCode();
-		QueryWrapper<CuspSupplierProfile> queryWrapper = new QueryWrapper();
-		queryWrapper.eq("code", code);
-		queryWrapper.eq("del_flag", "0");
-		queryWrapper.notIn("id", cuspSupplierProfile.getId());
-
-		List<CuspSupplierProfile> list = cuspSupplierProfileService.list(queryWrapper);
-		if (list.size() != 0) {
-			return Result.error("供应商档案编码重复,请修改!");
-		}
-
-		cuspSupplierProfileService.updateMain(cuspSupplierProfile, cuspSupplierProfilePage.getCuspSupplierProfileManList(),cuspSupplierProfilePage.getCuspSupplierProfileQualificationList());
-		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 CuspSupplierProfilePage cuspSupplierProfilePage) {
+        CuspSupplierProfile cuspSupplierProfile = new CuspSupplierProfile();
+        BeanUtils.copyProperties(cuspSupplierProfilePage, cuspSupplierProfile);
+        CuspSupplierProfile cuspSupplierProfileEntity = cuspSupplierProfileService.getById(cuspSupplierProfile.getId());
+        if (cuspSupplierProfileEntity == null) {
+            return Result.error("未找到对应数据");
+        }
+
+        String code = cuspSupplierProfile.getCode();
+        QueryWrapper<CuspSupplierProfile> queryWrapper = new QueryWrapper();
+        queryWrapper.eq("code", code);
+        queryWrapper.eq("del_flag", "0");
+        queryWrapper.notIn("id", cuspSupplierProfile.getId());
+
+        List<CuspSupplierProfile> list = cuspSupplierProfileService.list(queryWrapper);
+        if (list.size() != 0) {
+            return Result.error("供应商档案编码重复,请修改!");
+        }
+
+        cuspSupplierProfileService.updateMain(cuspSupplierProfile, cuspSupplierProfilePage.getCuspSupplierProfileManList(), cuspSupplierProfilePage.getCuspSupplierProfileQualificationList());
+        return Result.OK("编辑成功!");
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "供应商档案-通过id删除")
+    @ApiOperation(value = "供应商档案-通过id删除", notes = "供应商档案-通过id删除")
     @RequiresPermissions("cuspCode:cusp_supplier_profile:delete")
-	@DeleteMapping(value = "/delete")
-	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
-		cuspSupplierProfileService.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) {
+        cuspSupplierProfileService.delMain(id);
+        return Result.OK("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "供应商档案-批量删除")
+    @ApiOperation(value = "供应商档案-批量删除", notes = "供应商档案-批量删除")
     @RequiresPermissions("cuspCode:cusp_supplier_profile:deleteBatch")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		this.cuspSupplierProfileService.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<CuspSupplierProfile> queryById(@RequestParam(name="id",required=true) String id) {
-		CuspSupplierProfile cuspSupplierProfile = cuspSupplierProfileService.getById(id);
-		if(cuspSupplierProfile==null) {
-			return Result.error("未找到对应数据");
-		}
-		return Result.OK(cuspSupplierProfile);
-
-	}
-	
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "供应商档案-联系人通过主表ID查询")
-	@ApiOperation(value="供应商档案-联系人主表ID查询", notes="供应商档案-联系人-通主表ID查询")
-	@GetMapping(value = "/queryCuspSupplierProfileManByMainId")
-	public Result<List<CuspSupplierProfileMan>> queryCuspSupplierProfileManListByMainId(@RequestParam(name="id",required=true) String id) {
-		List<CuspSupplierProfileMan> cuspSupplierProfileManList = cuspSupplierProfileManService.selectByMainId(id);
-		return Result.OK(cuspSupplierProfileManList);
-	}
-	/**
-	 * 通过id查询
-	 *
-	 * @param id
-	 * @return
-	 */
-	//@AutoLog(value = "供应商档案-资质信息通过主表ID查询")
-	@ApiOperation(value="供应商档案-资质信息主表ID查询", notes="供应商档案-资质信息-通主表ID查询")
-	@GetMapping(value = "/queryCuspSupplierProfileQualificationByMainId")
-	public Result<List<CuspSupplierProfileQualification>> queryCuspSupplierProfileQualificationListByMainId(@RequestParam(name="id",required=true) String id) {
-		List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList = cuspSupplierProfileQualificationService.selectByMainId(id);
-		return Result.OK(cuspSupplierProfileQualificationList);
-	}
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        this.cuspSupplierProfileService.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<CuspSupplierProfile> queryById(@RequestParam(name = "id", required = true) String id) {
+        CuspSupplierProfile cuspSupplierProfile = cuspSupplierProfileService.getById(id);
+        if (cuspSupplierProfile == null) {
+            return Result.error("未找到对应数据");
+        }
+        return Result.OK(cuspSupplierProfile);
+
+    }
+
+
+    /**
+     * 通过id申请转正式
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "供应商档案-通过id申请转正式")
+    @ApiOperation(value = "供应商档案-通过id申请转正式", notes = "供应商档案-通过id申请转正式")
+    @GetMapping(value = "/applyFor")
+    public Result<String> applyFor(@RequestParam(name = "ids", required = true) String ids) {
+        return cuspSupplierProfileService.applyFor(Arrays.asList(ids.split(",")));
+    }
+
+
+    /**
+     * 通过id审批
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "供应商档案-通过id审批")
+    @ApiOperation(value = "供应商档案-通过id审批", notes = "供应商档案-通过id审批")
+    @GetMapping(value = "/approveTemp")
+    public Result<String> approveTemp(@RequestParam(name = "ids", required = true) String ids) {
+        return cuspSupplierProfileService.approveTemp(Arrays.asList(ids.split(",")));
+    }
+
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "供应商档案-联系人通过主表ID查询")
+    @ApiOperation(value = "供应商档案-联系人主表ID查询", notes = "供应商档案-联系人-通主表ID查询")
+    @GetMapping(value = "/queryCuspSupplierProfileManByMainId")
+    public Result<List<CuspSupplierProfileMan>> queryCuspSupplierProfileManListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<CuspSupplierProfileMan> cuspSupplierProfileManList = cuspSupplierProfileManService.selectByMainId(id);
+        return Result.OK(cuspSupplierProfileManList);
+    }
 
     /**
-    * 导出excel
-    *
-    * @param request
-    * @param cuspSupplierProfile
-    */
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    //@AutoLog(value = "供应商档案-资质信息通过主表ID查询")
+    @ApiOperation(value = "供应商档案-资质信息主表ID查询", notes = "供应商档案-资质信息-通主表ID查询")
+    @GetMapping(value = "/queryCuspSupplierProfileQualificationByMainId")
+    public Result<List<CuspSupplierProfileQualification>> queryCuspSupplierProfileQualificationListByMainId(@RequestParam(name = "id", required = true) String id) {
+        List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList = cuspSupplierProfileQualificationService.selectByMainId(id);
+        return Result.OK(cuspSupplierProfileQualificationList);
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param cuspSupplierProfile
+     */
     @RequiresPermissions("cuspCode:cusp_supplier_profile:exportXls")
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, CuspSupplierProfile cuspSupplierProfile) {
-      // Step.1 组装查询条件查询数据
-      QueryWrapper<CuspSupplierProfile> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierProfile, 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<CuspSupplierProfile> cuspSupplierProfileList = cuspSupplierProfileService.list(queryWrapper);
-
-      // Step.3 组装pageList
-      List<CuspSupplierProfilePage> pageList = new ArrayList<CuspSupplierProfilePage>();
-      for (CuspSupplierProfile main : cuspSupplierProfileList) {
-          CuspSupplierProfilePage vo = new CuspSupplierProfilePage();
-          BeanUtils.copyProperties(main, vo);
-          List<CuspSupplierProfileMan> cuspSupplierProfileManList = cuspSupplierProfileManService.selectByMainId(main.getId());
-          vo.setCuspSupplierProfileManList(cuspSupplierProfileManList);
-          List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList = cuspSupplierProfileQualificationService.selectByMainId(main.getId());
-          vo.setCuspSupplierProfileQualificationList(cuspSupplierProfileQualificationList);
-          pageList.add(vo);
-      }
-
-      // Step.4 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      mv.addObject(NormalExcelConstants.FILE_NAME, "供应商档案列表");
-      mv.addObject(NormalExcelConstants.CLASS, CuspSupplierProfilePage.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("供应商档案数据", "导出人:"+sysUser.getRealname(), "供应商档案"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
+        // Step.1 组装查询条件查询数据
+        QueryWrapper<CuspSupplierProfile> queryWrapper = QueryGenerator.initQueryWrapper(cuspSupplierProfile, 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<CuspSupplierProfile> cuspSupplierProfileList = cuspSupplierProfileService.list(queryWrapper);
+
+        // Step.3 组装pageList
+        List<CuspSupplierProfilePage> pageList = new ArrayList<CuspSupplierProfilePage>();
+        for (CuspSupplierProfile main : cuspSupplierProfileList) {
+            CuspSupplierProfilePage vo = new CuspSupplierProfilePage();
+            BeanUtils.copyProperties(main, vo);
+            List<CuspSupplierProfileMan> cuspSupplierProfileManList = cuspSupplierProfileManService.selectByMainId(main.getId());
+            vo.setCuspSupplierProfileManList(cuspSupplierProfileManList);
+            List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList = cuspSupplierProfileQualificationService.selectByMainId(main.getId());
+            vo.setCuspSupplierProfileQualificationList(cuspSupplierProfileQualificationList);
+            pageList.add(vo);
+        }
+
+        // Step.4 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        mv.addObject(NormalExcelConstants.FILE_NAME, "供应商档案列表");
+        mv.addObject(NormalExcelConstants.CLASS, CuspSupplierProfilePage.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_profile: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<CuspSupplierProfilePage> list = ExcelImportUtil.importExcel(file.getInputStream(), CuspSupplierProfilePage.class, params);
-              for (CuspSupplierProfilePage page : list) {
-                  CuspSupplierProfile po = new CuspSupplierProfile();
-                  BeanUtils.copyProperties(page, po);
-                  cuspSupplierProfileService.saveMain(po, page.getCuspSupplierProfileManList(),page.getCuspSupplierProfileQualificationList());
-              }
-              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<CuspSupplierProfilePage> list = ExcelImportUtil.importExcel(file.getInputStream(), CuspSupplierProfilePage.class, params);
+                for (CuspSupplierProfilePage page : list) {
+                    CuspSupplierProfile po = new CuspSupplierProfile();
+                    BeanUtils.copyProperties(page, po);
+                    cuspSupplierProfileService.saveMain(po, page.getCuspSupplierProfileManList(), page.getCuspSupplierProfileQualificationList());
+                }
+                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("文件导入失败!");
     }
 
 }

+ 10 - 1
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/entity/CuspSupplierProfile.java

@@ -152,10 +152,19 @@ public class CuspSupplierProfile implements Serializable {
     private String notes;
 	/**临时供应商*/
 	@Excel(name = "临时供应商(Temporary supplier)", width = 15)
-    @ApiModelProperty(value = "临时供应商")
+    @ApiModelProperty(value = "临时供应商(0-是,1-申请中,2-否)")
     private Integer temporarySupplier;
 	/**供应商等级*/
 	@Excel(name = "考评等级(evaluation level)", width = 15)
     @ApiModelProperty(value = "供应商等级")
     private String evaluationLevel;
+
+    @ApiModelProperty(value = "当前审批人姓名(临时供应商)")
+    private String approveNowName;
+    @ApiModelProperty(value = "当前审批人(临时供应商)")
+    private String approveNow;
+    @ApiModelProperty(value = "审批历史(临时供应商)")
+    private String approveHis;
+    @ApiModelProperty(value = "所有需要审批的人(临时供应商)")
+    private String approveAll;
 }

+ 110 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/entity/CuspSupplierProfileCatalog.java

@@ -0,0 +1,110 @@
+package com.cuidian.srm.cuspCode.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: 供应商档案子表 - 供货目录
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Data
+@TableName("cusp_supplier_profile_catalog")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value="cusp_supplier_profile_catalog对象", description="供应商档案子表 - 供货目录")
+public class CuspSupplierProfileCatalog 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)
+    @ApiModelProperty(value = "主表主键(供应商档案)")
+    private String headId;
+	/**产品主键*/
+	@Excel(name = "产品主键", width = 15)
+    @ApiModelProperty(value = "产品主键")
+    private String productId;
+	/**分类*/
+	@Excel(name = "分类", width = 15)
+    @ApiModelProperty(value = "分类")
+    private String className;
+	/**编码*/
+	@Excel(name = "编码", width = 15)
+    @ApiModelProperty(value = "编码")
+    private String code;
+	/**中文名*/
+	@Excel(name = "中文名", width = 15)
+    @ApiModelProperty(value = "中文名")
+    private String chineseName;
+	/**英文名*/
+	@Excel(name = "英文名", width = 15)
+    @ApiModelProperty(value = "英文名")
+    private String englishName;
+	/**规格*/
+	@Excel(name = "规格", width = 15)
+    @ApiModelProperty(value = "规格")
+    private String specifications;
+	/**型号*/
+	@Excel(name = "型号", width = 15)
+    @ApiModelProperty(value = "型号")
+    private String model;
+	/**计量单位*/
+	@Excel(name = "计量单位", width = 15)
+    @ApiModelProperty(value = "计量单位")
+    private String measurementUnit;
+	/**有害物质*/
+	@Excel(name = "有害物质", width = 15)
+    @ApiModelProperty(value = "有害物质")
+    private Integer harmfulSubstances;
+	/**是否有效*/
+	@Excel(name = "是否有效", width = 15)
+    @ApiModelProperty(value = "是否有效")
+    private Integer valid;
+}

+ 32 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/mapper/CuspSupplierProfileCatalogMapper.java

@@ -0,0 +1,32 @@
+package com.cuidian.srm.cuspCode.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileCatalog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 供应商档案子表 - 供货目录
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface CuspSupplierProfileCatalogMapper extends BaseMapper<CuspSupplierProfileCatalog> {
+
+    /**
+     * 通过主表id删除子表数据
+     *
+     * @param mainId 主表id
+     * @return boolean
+     */
+    public boolean deleteByMainId(@Param("mainId") String mainId);
+
+    /**
+     * 通过主表id查询子表数据
+     *
+     * @param mainId 主表id
+     * @return List<CuspSupplierProfileCatalog>
+     */
+    public List<CuspSupplierProfileCatalog> selectByMainId(@Param("mainId") String mainId);
+}

+ 19 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/mapper/xml/CuspSupplierProfileCatalogMapper.xml

@@ -0,0 +1,19 @@
+<?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.cuspCode.mapper.CuspSupplierProfileCatalogMapper">
+
+    <delete id="deleteByMainId" parameterType="java.lang.String">
+        DELETE
+        FROM  cusp_supplier_profile_catalog
+        WHERE
+            head_id = #{mainId} 	</delete>
+
+    <select id="selectByMainId" parameterType="java.lang.String" resultType="com.cuidian.srm.cuspCode.entity.CuspSupplierProfileCatalog">
+        SELECT a.valid,c.name class_id,b.code,b.chinese_name,b.english_name,b.specifications,b.model,b.measurement_unit,b.harmful_substances
+        FROM  cusp_supplier_profile_catalog a
+                  left join base_product_archive b on a.product_id = b.id
+                  left join base_product_class c on b.class_id = c.id
+        where a.del_flag=0 and
+            head_id = #{mainId}
+    </select>
+</mapper>

+ 18 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/ICuspSupplierProfileCatalogService.java

@@ -0,0 +1,18 @@
+package com.cuidian.srm.cuspCode.service;
+
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileCatalog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * @Description: 供应商档案子表 - 供货目录
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface ICuspSupplierProfileCatalogService extends IService<CuspSupplierProfileCatalog> {
+
+    public void updateMain(List<CuspSupplierProfileCatalog> cuspSupplierProfileCatalog);
+    public List<CuspSupplierProfileCatalog> selectByMainId(String mainId);
+}

+ 24 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/ICuspSupplierProfileService.java

@@ -4,6 +4,8 @@ import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileMan;
 import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileQualification;
 import com.cuidian.srm.cuspCode.entity.CuspSupplierProfile;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.api.vo.Result;
+
 import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
@@ -48,4 +50,26 @@ public interface ICuspSupplierProfileService extends IService<CuspSupplierProfil
 	 */
 	public void delBatchMain (Collection<? extends Serializable> idList);
 	
+
+	/**
+	 * 通过ids申请转正式
+	 *
+	 * @param idList
+	 */
+	public Result<String> applyFor (Collection<? extends Serializable> idList);
+
+	/**
+	 * 通过ids审核通过
+	 *
+	 * @param idList
+	 */
+	public Result<String> approveTemp (Collection<? extends Serializable> idList);
+
+//	/**
+//	 * 通过ids审核拒绝
+//	 *
+//	 * @param idList
+//	 */
+//	public Result<String> approveTempFalse (Collection<? extends Serializable> idList);
+
 }

+ 54 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/impl/CuspSupplierProfileCatalogServiceImpl.java

@@ -0,0 +1,54 @@
+package com.cuidian.srm.cuspCode.service.impl;
+
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfile;
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileCatalog;
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileMan;
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileQualification;
+import com.cuidian.srm.cuspCode.mapper.CuspSupplierProfileCatalogMapper;
+import com.cuidian.srm.cuspCode.mapper.CuspSupplierProfileMapper;
+import com.cuidian.srm.cuspCode.service.ICuspSupplierProfileCatalogService;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Description: 供应商档案子表 - 供货目录
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Service
+public class CuspSupplierProfileCatalogServiceImpl extends ServiceImpl<CuspSupplierProfileCatalogMapper, CuspSupplierProfileCatalog> implements ICuspSupplierProfileCatalogService {
+
+   @Autowired
+    private CuspSupplierProfileCatalogMapper cuspSupplierProfileCatalogMapper;
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void updateMain(List<CuspSupplierProfileCatalog> cuspSupplierProfileCatalog) {
+
+        //2.子表数据重新插入
+        if(cuspSupplierProfileCatalog!=null && cuspSupplierProfileCatalog.size()>0) {
+
+            //1.先删除子表数据
+            cuspSupplierProfileCatalogMapper.deleteByMainId(cuspSupplierProfileCatalog.get(0).getHeadId());
+
+            for(CuspSupplierProfileCatalog entity:cuspSupplierProfileCatalog) {
+                //外键设置
+//                entity.setHeadId(cuspSupplierProfile.getId());
+                cuspSupplierProfileCatalogMapper.insert(entity);
+            }
+        }
+    }
+
+
+    public List<CuspSupplierProfileCatalog> selectByMainId(String mainId){
+        return cuspSupplierProfileCatalogMapper.selectByMainId(mainId);
+    }
+}

+ 152 - 2
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/service/impl/CuspSupplierProfileServiceImpl.java

@@ -7,6 +7,12 @@ import com.cuidian.srm.cuspCode.mapper.CuspSupplierProfileManMapper;
 import com.cuidian.srm.cuspCode.mapper.CuspSupplierProfileQualificationMapper;
 import com.cuidian.srm.cuspCode.mapper.CuspSupplierProfileMapper;
 import com.cuidian.srm.cuspCode.service.ICuspSupplierProfileService;
+import io.micrometer.core.instrument.util.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.system.entity.SysUser;
+import org.jeecg.modules.system.service.ISysUserService;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,7 +36,9 @@ public class CuspSupplierProfileServiceImpl extends ServiceImpl<CuspSupplierProf
 	private CuspSupplierProfileManMapper cuspSupplierProfileManMapper;
 	@Autowired
 	private CuspSupplierProfileQualificationMapper cuspSupplierProfileQualificationMapper;
-	
+	@Autowired
+	private ISysUserService sysUserService;
+
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public void saveMain(CuspSupplierProfile cuspSupplierProfile, List<CuspSupplierProfileMan> cuspSupplierProfileManList,List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList) {
@@ -94,5 +102,147 @@ public class CuspSupplierProfileServiceImpl extends ServiceImpl<CuspSupplierProf
 			cuspSupplierProfileMapper.deleteById(id);
 		}
 	}
-	
+
+	/**
+	 * 通过ids申请转正式
+	 * @param idList
+	 * @return
+	 */
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public Result<String> applyFor (Collection<? extends Serializable> idList){
+
+		StringBuffer sb = new StringBuffer();
+		for(Serializable id:idList) {
+			CuspSupplierProfile supplierProfile = cuspSupplierProfileMapper.selectById(id);
+
+			if(supplierProfile == null){
+				continue;
+			}
+
+			String name = supplierProfile.getName();
+
+			//临时供应商(0-是,1-申请中,2-否)
+			Integer temporarySupplier = supplierProfile.getTemporarySupplier();
+			if(temporarySupplier !=null && (temporarySupplier == 1 || temporarySupplier == 2)){
+				sb.append("供应商 "+name+" 当前状态").append("无法再次申请;");
+				continue;
+			}
+
+			//所有需要审批的人(临时供应商)
+			supplierProfile.setApproveAll("admin");
+			supplierProfile.setApproveNow("admin");
+			supplierProfile.setApproveNowName("管理员");
+			supplierProfile.setTemporarySupplier(1);//申请中
+
+			cuspSupplierProfileMapper.updateById(supplierProfile);
+		}
+
+		if(StringUtils.isBlank(sb.toString())){
+
+			return Result.OK("提交申请成功,请等待管理员审批!");
+		}else{
+
+			return Result.error(sb.toString());
+		}
+
+	}
+
+	/**
+	 * 通过ids审核通过
+	 * @param idList
+	 * @return
+	 */
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public Result<String> approveTemp (Collection<? extends Serializable> idList){
+
+		StringBuffer sb = new StringBuffer();
+
+		LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		String loginCode = sysUser.getUsername();
+
+		for(Serializable id:idList) {
+			CuspSupplierProfile supplierProfile = cuspSupplierProfileMapper.selectById(id);
+
+			if(supplierProfile == null){
+				continue;
+			}
+
+			String name = supplierProfile.getName();
+
+			//临时供应商(0-是,1-申请中,2-否)
+			Integer temporarySupplier = supplierProfile.getTemporarySupplier();
+			if(temporarySupplier == null || temporarySupplier == 0 || temporarySupplier == 2){
+				sb.append("供应商 "+name+" 当前状态").append("无法审批;");
+				continue;
+			}
+
+			String approveNow = supplierProfile.getApproveNow();
+			String approveNowName = supplierProfile.getApproveNowName();
+			if(!loginCode.equals(approveNow)){
+				sb.append("供应商 "+name+"当前审批人为:").append(approveNowName+";");
+				continue;
+			}
+
+			String approveAll = supplierProfile.getApproveAll();
+			String approveHis = supplierProfile.getApproveHis();
+
+			if(StringUtils.isBlank(approveHis)){
+				approveHis = approveNow;
+			}else{
+				approveHis = approveHis+","+approveNow;
+			}
+			supplierProfile.setApproveHis(approveHis);
+
+			if(approveHis.equals(approveAll)){
+
+				supplierProfile.setApproveNow("审批完成");
+				supplierProfile.setApproveNowName("审批完成");
+				supplierProfile.setTemporarySupplier(2);//临时供应商(0-是,1-申请中,2-否)
+
+			}else{
+
+				String[] approves = approveAll.split(",");
+				int index = getCharIndex(approves, approveNow);
+
+				String nowApp = approves[index+1];
+
+				supplierProfile.setApproveNow(nowApp);
+
+				SysUser user = sysUserService.getUserByName(nowApp);
+
+				if(user == null){
+					sb.append("供应商 "+name+"下一级审批人异常,请维护;");
+					continue;
+				}
+
+				supplierProfile.setApproveNowName(user.getRealname());
+
+				supplierProfile.setTemporarySupplier(1);//临时供应商(0-是,1-申请中,2-否)
+			}
+
+
+			cuspSupplierProfileMapper.updateById(supplierProfile);
+		}
+
+		if(StringUtils.isBlank(sb.toString())){
+
+			return Result.OK("审批成功!");
+		}else{
+
+			return Result.error(sb.toString());
+		}
+
+	}
+
+	public static int getCharIndex(String[] array, String target) {
+		for (int i = 0; i < array.length; i++) {
+			if (array[i] == target) {
+				return i;
+			}
+		}
+		return -1;
+	}
+
 }

+ 3 - 0
srm-module-code/src/main/java/com/cuidian/srm/cuspCode/vo/CuspSupplierProfilePage.java

@@ -2,6 +2,7 @@ package com.cuidian.srm.cuspCode.vo;
 
 import java.util.List;
 import com.cuidian.srm.cuspCode.entity.CuspSupplierProfile;
+import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileCatalog;
 import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileMan;
 import com.cuidian.srm.cuspCode.entity.CuspSupplierProfileQualification;
 import lombok.Data;
@@ -161,5 +162,7 @@ public class CuspSupplierProfilePage {
 //	@ExcelCollection(name="供应商档案-资质信息")
 	@ApiModelProperty(value = "供应商档案-资质信息")
 	private List<CuspSupplierProfileQualification> cuspSupplierProfileQualificationList;
+	@ApiModelProperty(value = "供应商档案子表 - 供货目录")
+	private List<CuspSupplierProfileCatalog> cuspSupplierProfileCatalog;
 
 }

+ 288 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/controller/SaleInquiryFormController.java

@@ -0,0 +1,288 @@
+package com.cuidian.srm.saleCode.controller;
+
+import java.io.UnsupportedEncodingException;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.HashMap;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+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.vo.LoginUser;
+import org.apache.shiro.SecurityUtils;
+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.SaleInquiryFormShip;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.cuidian.srm.saleCode.entity.SaleInquiryForm;
+import com.cuidian.srm.saleCode.vo.SaleInquiryFormPage;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormService;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormShipService;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormProductService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+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 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: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Api(tags="销售询价单")
+@RestController
+@RequestMapping("/saleCode/saleInquiryForm")
+@Slf4j
+public class SaleInquiryFormController {
+	@Autowired
+	private ISaleInquiryFormService saleInquiryFormService;
+	@Autowired
+	private ISaleInquiryFormShipService saleInquiryFormShipService;
+	@Autowired
+	private ISaleInquiryFormProductService saleInquiryFormProductService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param saleInquiryForm
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "销售询价单-分页列表查询")
+	@ApiOperation(value="销售询价单-分页列表查询", notes="销售询价单-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<SaleInquiryForm>> queryPageList(SaleInquiryForm saleInquiryForm,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+        QueryWrapper<SaleInquiryForm> queryWrapper = QueryGenerator.initQueryWrapper(saleInquiryForm, req.getParameterMap());
+		Page<SaleInquiryForm> page = new Page<SaleInquiryForm>(pageNo, pageSize);
+		IPage<SaleInquiryForm> pageList = saleInquiryFormService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param saleInquiryFormPage
+	 * @return
+	 */
+	@AutoLog(value = "销售询价单-添加")
+	@ApiOperation(value="销售询价单-添加", notes="销售询价单-添加")
+    @RequiresPermissions("saleCode:sale_inquiry_form:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody SaleInquiryFormPage saleInquiryFormPage) {
+		SaleInquiryForm saleInquiryForm = new SaleInquiryForm();
+		BeanUtils.copyProperties(saleInquiryFormPage, saleInquiryForm);
+		saleInquiryFormService.saveMain(saleInquiryForm, saleInquiryFormPage.getSaleInquiryFormShipList(),saleInquiryFormPage.getSaleInquiryFormProductList());
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param saleInquiryFormPage
+	 * @return
+	 */
+	@AutoLog(value = "销售询价单-编辑")
+	@ApiOperation(value="销售询价单-编辑", notes="销售询价单-编辑")
+    @RequiresPermissions("saleCode:sale_inquiry_form:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody SaleInquiryFormPage saleInquiryFormPage) {
+		SaleInquiryForm saleInquiryForm = new SaleInquiryForm();
+		BeanUtils.copyProperties(saleInquiryFormPage, saleInquiryForm);
+		SaleInquiryForm saleInquiryFormEntity = saleInquiryFormService.getById(saleInquiryForm.getId());
+		if(saleInquiryFormEntity==null) {
+			return Result.error("未找到对应数据");
+		}
+		saleInquiryFormService.updateMain(saleInquiryForm, saleInquiryFormPage.getSaleInquiryFormShipList(),saleInquiryFormPage.getSaleInquiryFormProductList());
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "销售询价单-通过id删除")
+	@ApiOperation(value="销售询价单-通过id删除", notes="销售询价单-通过id删除")
+    @RequiresPermissions("saleCode:sale_inquiry_form:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		saleInquiryFormService.delMain(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "销售询价单-批量删除")
+	@ApiOperation(value="销售询价单-批量删除", notes="销售询价单-批量删除")
+    @RequiresPermissions("saleCode:sale_inquiry_form:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.saleInquiryFormService.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<SaleInquiryForm> queryById(@RequestParam(name="id",required=true) String id) {
+		SaleInquiryForm saleInquiryForm = saleInquiryFormService.getById(id);
+		if(saleInquiryForm==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(saleInquiryForm);
+
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "销售询价单子表 - 船明细通过主表ID查询")
+	@ApiOperation(value="销售询价单子表 - 船明细主表ID查询", notes="销售询价单子表 - 船明细-通主表ID查询")
+	@GetMapping(value = "/querySaleInquiryFormShipByMainId")
+	public Result<List<SaleInquiryFormShip>> querySaleInquiryFormShipListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SaleInquiryFormShip> saleInquiryFormShipList = saleInquiryFormShipService.selectByMainId(id);
+		return Result.OK(saleInquiryFormShipList);
+	}
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "销售询价单子表 - 产品明细通过主表ID查询")
+	@ApiOperation(value="销售询价单子表 - 产品明细主表ID查询", notes="销售询价单子表 - 产品明细-通主表ID查询")
+	@GetMapping(value = "/querySaleInquiryFormProductByMainId")
+	public Result<List<SaleInquiryFormProduct>> querySaleInquiryFormProductListByMainId(@RequestParam(name="id",required=true) String id) {
+		List<SaleInquiryFormProduct> saleInquiryFormProductList = saleInquiryFormProductService.selectByMainId(id);
+		return Result.OK(saleInquiryFormProductList);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param saleInquiryForm
+    */
+    @RequiresPermissions("saleCode:sale_inquiry_form:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, SaleInquiryForm saleInquiryForm) {
+      // Step.1 组装查询条件查询数据
+      QueryWrapper<SaleInquiryForm> queryWrapper = QueryGenerator.initQueryWrapper(saleInquiryForm, 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<SaleInquiryForm> saleInquiryFormList = saleInquiryFormService.list(queryWrapper);
+
+      // Step.3 组装pageList
+      List<SaleInquiryFormPage> pageList = new ArrayList<SaleInquiryFormPage>();
+      for (SaleInquiryForm main : saleInquiryFormList) {
+          SaleInquiryFormPage vo = new SaleInquiryFormPage();
+          BeanUtils.copyProperties(main, vo);
+          List<SaleInquiryFormShip> saleInquiryFormShipList = saleInquiryFormShipService.selectByMainId(main.getId());
+          vo.setSaleInquiryFormShipList(saleInquiryFormShipList);
+          List<SaleInquiryFormProduct> saleInquiryFormProductList = saleInquiryFormProductService.selectByMainId(main.getId());
+          vo.setSaleInquiryFormProductList(saleInquiryFormProductList);
+          pageList.add(vo);
+      }
+
+      // Step.4 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      mv.addObject(NormalExcelConstants.FILE_NAME, "销售询价单列表");
+      mv.addObject(NormalExcelConstants.CLASS, SaleInquiryFormPage.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("销售询价单数据", "导出人:"+sysUser.getRealname(), "销售询价单"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+    }
+
+    /**
+    * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("saleCode:sale_inquiry_form: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<SaleInquiryFormPage> list = ExcelImportUtil.importExcel(file.getInputStream(), SaleInquiryFormPage.class, params);
+              for (SaleInquiryFormPage page : list) {
+                  SaleInquiryForm po = new SaleInquiryForm();
+                  BeanUtils.copyProperties(page, po);
+                  saleInquiryFormService.saveMain(po, page.getSaleInquiryFormShipList(),page.getSaleInquiryFormProductList());
+              }
+              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("文件导入失败!");
+    }
+
+}

+ 153 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryForm.java

@@ -0,0 +1,153 @@
+package com.cuidian.srm.saleCode.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+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;
+
+/**
+ * @Description: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@ApiModel(value="sale_inquiry_form对象", description="销售询价单")
+@Data
+@TableName("sale_inquiry_form")
+public class SaleInquiryForm 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;
+	/**其他状态(other status)*/
+	@Excel(name = "其他状态(other status)", width = 15)
+    @ApiModelProperty(value = "其他状态(other status)")
+    private String otherStatus;
+	/**提交(1是 0否)*/
+	@Excel(name = "提交(1是 0否)", width = 15)
+    @ApiModelProperty(value = "提交(1是 0否)")
+    private String submit;
+	/**单据日期(bill date)*/
+	@Excel(name = "单据日期(bill date)", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "单据日期(bill date)")
+    private Date billDate;
+	/**询价单号(bill code)*/
+	@Excel(name = "询价单号(bill code)", width = 15)
+    @ApiModelProperty(value = "询价单号(bill code)")
+    private String billCode;
+	/**询价项目(inquiry project)*/
+	@Excel(name = "询价项目(inquiry project)", width = 15)
+    @ApiModelProperty(value = "询价项目(inquiry project)")
+    private String inquiryProject;
+	/**询价客户(inquiry customer)*/
+	@Excel(name = "询价客户(inquiry customer)", width = 15)
+    @ApiModelProperty(value = "询价客户(inquiry customer)")
+    private String inquiryCustomer;
+	/**询价平台(inquiry platform)*/
+	@Excel(name = "询价平台(inquiry platform)", width = 15)
+    @ApiModelProperty(value = "询价平台(inquiry platform)")
+    private String inquiryPlatform;
+	/**客户询价单号(customer inquiry number)*/
+	@Excel(name = "客户询价单号(customer inquiry number)", width = 15)
+    @ApiModelProperty(value = "客户询价单号(customer inquiry number)")
+    private String customerInquiryNumber;
+	/**询价有效期(inquiry period)止*/
+	@Excel(name = "询价有效期(inquiry period)止", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "询价有效期(inquiry period)止")
+    private Date inquiryPeriodEnd;
+	/**询价有效期(inquiry period)始*/
+	@Excel(name = "询价有效期(inquiry period)始", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @ApiModelProperty(value = "询价有效期(inquiry period)始")
+    private Date inquiryPeriodBegin;
+	/**业务类型(busyness type)*/
+	@Excel(name = "业务类型(busyness type)", width = 15)
+    @ApiModelProperty(value = "业务类型(busyness type)")
+    private String busynessType;
+	/**优先级(priority)*/
+	@Excel(name = "优先级(priority)", width = 15)
+    @ApiModelProperty(value = "优先级(priority)")
+    private String priority;
+	/**产品分类(production class)*/
+	@Excel(name = "产品分类(production class)", width = 15)
+    @ApiModelProperty(value = "产品分类(production class)")
+    private String productionClass;
+	/**机型(model)*/
+	@Excel(name = "机型(model)", width = 15)
+    @ApiModelProperty(value = "机型(model)")
+    private String model;
+	/**厂家(maker)*/
+	@Excel(name = "厂家(maker)", width = 15)
+    @ApiModelProperty(value = "厂家(maker)")
+    private String maker;
+	/**销售部门(sale department)*/
+	@Excel(name = "销售部门(sale department)", width = 15)
+    @ApiModelProperty(value = "销售部门(sale department)")
+    private String saleDepartment;
+	/**业务员(salesman)*/
+	@Excel(name = "业务员(salesman)", width = 15)
+    @ApiModelProperty(value = "业务员(salesman)")
+    private String salesman;
+	/**采购询价组(procurement inquiry team)*/
+	@Excel(name = "采购询价组(procurement inquiry team)", width = 15)
+    @ApiModelProperty(value = "采购询价组(procurement inquiry team)")
+    private String inquiryTeam;
+	/**交期(delivery time)*/
+	@Excel(name = "交期(delivery time)", 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 = "交期(delivery time)")
+    private Date deliveryTime;
+	/**附件(attachs)*/
+	@Excel(name = "附件(attachs)", width = 15)
+    @ApiModelProperty(value = "附件(attachs)")
+    private String attachs;
+	/**询价备注(inquiry notes)*/
+	@Excel(name = "询价备注(inquiry notes)", width = 15)
+    @ApiModelProperty(value = "询价备注(inquiry notes)")
+    private String inquiryNotes;
+}

+ 125 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryFormProduct.java

@@ -0,0 +1,125 @@
+package com.cuidian.srm.saleCode.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.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-14
+ * @Version: V1.0
+ */
+@ApiModel(value="sale_inquiry_form_product对象", description="销售询价单子表 - 产品明细")
+@Data
+@TableName("sale_inquiry_form_product")
+public class SaleInquiryFormProduct 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;
+	/**表头主键(销售询价单)*/
+    @ApiModelProperty(value = "表头主键(销售询价单)")
+    private String headId;
+	/**产品id*/
+	@Excel(name = "产品id", width = 15)
+    @ApiModelProperty(value = "产品id")
+    private Integer productId;
+	/**交期*/
+	@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 deliveryTime;
+	/**产品分类*/
+	@Excel(name = "产品分类", width = 15)
+    @ApiModelProperty(value = "产品分类")
+    private String productClass;
+	/**产品编码*/
+	@Excel(name = "产品编码", width = 15)
+    @ApiModelProperty(value = "产品编码")
+    private String productCode;
+	/**产品中文名*/
+	@Excel(name = "产品中文名", width = 15)
+    @ApiModelProperty(value = "产品中文名")
+    private String chineseName;
+	/**产品英文名*/
+	@Excel(name = "产品英文名", width = 15)
+    @ApiModelProperty(value = "产品英文名")
+    private String englishName;
+	/**规格*/
+	@Excel(name = "规格", width = 15)
+    @ApiModelProperty(value = "规格")
+    private String specifications;
+	/**型号*/
+	@Excel(name = "型号", width = 15)
+    @ApiModelProperty(value = "型号")
+    private String model;
+	/**厂家*/
+	@Excel(name = "厂家", width = 15)
+    @ApiModelProperty(value = "厂家")
+    private String factory;
+	/**质量等级*/
+	@Excel(name = "质量等级", width = 15)
+    @ApiModelProperty(value = "质量等级")
+    private String qualityGrade;
+	/**数量*/
+	@Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private Double quantity;
+	/**单位*/
+	@Excel(name = "单位", width = 15)
+    @ApiModelProperty(value = "单位")
+    private String unit;
+	/**需要船检证书(1是 0否)*/
+	@Excel(name = "需要船检证书(1是 0否)", width = 15)
+    @ApiModelProperty(value = "需要船检证书(1是 0否)")
+    private String needShip;
+	/**船检证书*/
+	@Excel(name = "船检证书", width = 15)
+    @ApiModelProperty(value = "船检证书")
+    private String shipInspection;
+	/**备注*/
+	@Excel(name = "备注", width = 15)
+    @ApiModelProperty(value = "备注")
+    private String notes;
+}

+ 87 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/entity/SaleInquiryFormShip.java

@@ -0,0 +1,87 @@
+package com.cuidian.srm.saleCode.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.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-14
+ * @Version: V1.0
+ */
+@ApiModel(value="sale_inquiry_form_ship对象", description="销售询价单子表 - 船明细")
+@Data
+@TableName("sale_inquiry_form_ship")
+public class SaleInquiryFormShip 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;
+	/**表头主键(销售询价单)*/
+    @ApiModelProperty(value = "表头主键(销售询价单)")
+    private String headId;
+	/**船id*/
+	@Excel(name = "船id", width = 15)
+    @ApiModelProperty(value = "船id")
+    private String shipId;
+	/**船名*/
+	@Excel(name = "船名", width = 15)
+    @ApiModelProperty(value = "船名")
+    private String shipName;
+	/**主机号*/
+	@Excel(name = "主机号", width = 15)
+    @ApiModelProperty(value = "主机号")
+    private String hostNumber;
+	/**工程编号*/
+	@Excel(name = "工程编号", width = 15)
+    @ApiModelProperty(value = "工程编号")
+    private String projectNo;
+	/**船厂*/
+	@Excel(name = "船厂", width = 15)
+    @ApiModelProperty(value = "船厂")
+    private String shipFactory;
+	/**船东*/
+	@Excel(name = "船东", width = 15)
+    @ApiModelProperty(value = "船东")
+    private String shipowner;
+}

+ 17 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormMapper.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.SaleInquiryForm;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface SaleInquiryFormMapper extends BaseMapper<SaleInquiryForm> {
+
+}

+ 31 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormProductMapper.java

@@ -0,0 +1,31 @@
+package com.cuidian.srm.saleCode.mapper;
+
+import java.util.List;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 销售询价单子表 - 产品明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface SaleInquiryFormProductMapper extends BaseMapper<SaleInquiryFormProduct> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<SaleInquiryFormProduct>
+   */
+	public List<SaleInquiryFormProduct> selectByMainId(@Param("mainId") String mainId);
+}

+ 31 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/SaleInquiryFormShipMapper.java

@@ -0,0 +1,31 @@
+package com.cuidian.srm.saleCode.mapper;
+
+import java.util.List;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * @Description: 销售询价单子表 - 船明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface SaleInquiryFormShipMapper extends BaseMapper<SaleInquiryFormShip> {
+
+	/**
+	 * 通过主表id删除子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return boolean
+	 */
+	public boolean deleteByMainId(@Param("mainId") String mainId);
+
+  /**
+   * 通过主表id查询子表数据
+   *
+   * @param mainId 主表id
+   * @return List<SaleInquiryFormShip>
+   */
+	public List<SaleInquiryFormShip> selectByMainId(@Param("mainId") String mainId);
+}

+ 5 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/mapper/xml/SaleInquiryFormMapper.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.SaleInquiryFormMapper">
+
+</mapper>

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

@@ -0,0 +1,16 @@
+<?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.SaleInquiryFormProductMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sale_inquiry_form_product 
+		WHERE
+			 head_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct">
+		SELECT * 
+		FROM  sale_inquiry_form_product
+		WHERE
+			 head_id = #{mainId} 	</select>
+</mapper>

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

@@ -0,0 +1,16 @@
+<?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.SaleInquiryFormShipMapper">
+
+	<delete id="deleteByMainId" parameterType="java.lang.String">
+		DELETE 
+		FROM  sale_inquiry_form_ship 
+		WHERE
+			 head_id = #{mainId} 	</delete>
+	
+	<select id="selectByMainId" parameterType="java.lang.String" resultType="com.cuidian.srm.saleCode.entity.SaleInquiryFormShip">
+		SELECT * 
+		FROM  sale_inquiry_form_ship
+		WHERE
+			 head_id = #{mainId} 	</select>
+</mapper>

+ 22 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormProductService.java

@@ -0,0 +1,22 @@
+package com.cuidian.srm.saleCode.service;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 销售询价单子表 - 产品明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface ISaleInquiryFormProductService extends IService<SaleInquiryFormProduct> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<SaleInquiryFormProduct>
+	 */
+	public List<SaleInquiryFormProduct> selectByMainId(String mainId);
+}

+ 51 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormService.java

@@ -0,0 +1,51 @@
+package com.cuidian.srm.saleCode.service;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.cuidian.srm.saleCode.entity.SaleInquiryForm;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @Description: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface ISaleInquiryFormService extends IService<SaleInquiryForm> {
+
+	/**
+	 * 添加一对多
+	 *
+	 * @param saleInquiryForm
+	 * @param saleInquiryFormShipList
+	 * @param saleInquiryFormProductList
+	 */
+	public void saveMain(SaleInquiryForm saleInquiryForm,List<SaleInquiryFormShip> saleInquiryFormShipList,List<SaleInquiryFormProduct> saleInquiryFormProductList) ;
+	
+	/**
+	 * 修改一对多
+	 *
+   * @param saleInquiryForm
+   * @param saleInquiryFormShipList
+   * @param saleInquiryFormProductList
+	 */
+	public void updateMain(SaleInquiryForm saleInquiryForm,List<SaleInquiryFormShip> saleInquiryFormShipList,List<SaleInquiryFormProduct> saleInquiryFormProductList);
+	
+	/**
+	 * 删除一对多
+	 *
+	 * @param id
+	 */
+	public void delMain (String id);
+	
+	/**
+	 * 批量删除一对多
+	 *
+	 * @param idList
+	 */
+	public void delBatchMain (Collection<? extends Serializable> idList);
+	
+}

+ 22 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/service/ISaleInquiryFormShipService.java

@@ -0,0 +1,22 @@
+package com.cuidian.srm.saleCode.service;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+
+/**
+ * @Description: 销售询价单子表 - 船明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+public interface ISaleInquiryFormShipService extends IService<SaleInquiryFormShip> {
+
+	/**
+	 * 通过主表id查询子表数据
+	 *
+	 * @param mainId 主表id
+	 * @return List<SaleInquiryFormShip>
+	 */
+	public List<SaleInquiryFormShip> selectByMainId(String mainId);
+}

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

@@ -0,0 +1,27 @@
+package com.cuidian.srm.saleCode.service.impl;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.cuidian.srm.saleCode.mapper.SaleInquiryFormProductMapper;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormProductService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 销售询价单子表 - 产品明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Service
+public class SaleInquiryFormProductServiceImpl extends ServiceImpl<SaleInquiryFormProductMapper, SaleInquiryFormProduct> implements ISaleInquiryFormProductService {
+	
+	@Autowired
+	private SaleInquiryFormProductMapper saleInquiryFormProductMapper;
+	
+	@Override
+	public List<SaleInquiryFormProduct> selectByMainId(String mainId) {
+		return saleInquiryFormProductMapper.selectByMainId(mainId);
+	}
+}

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

@@ -0,0 +1,98 @@
+package com.cuidian.srm.saleCode.service.impl;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryForm;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import com.cuidian.srm.saleCode.mapper.SaleInquiryFormShipMapper;
+import com.cuidian.srm.saleCode.mapper.SaleInquiryFormProductMapper;
+import com.cuidian.srm.saleCode.mapper.SaleInquiryFormMapper;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Collection;
+
+/**
+ * @Description: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Service
+public class SaleInquiryFormServiceImpl extends ServiceImpl<SaleInquiryFormMapper, SaleInquiryForm> implements ISaleInquiryFormService {
+
+	@Autowired
+	private SaleInquiryFormMapper saleInquiryFormMapper;
+	@Autowired
+	private SaleInquiryFormShipMapper saleInquiryFormShipMapper;
+	@Autowired
+	private SaleInquiryFormProductMapper saleInquiryFormProductMapper;
+	
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void saveMain(SaleInquiryForm saleInquiryForm, List<SaleInquiryFormShip> saleInquiryFormShipList,List<SaleInquiryFormProduct> saleInquiryFormProductList) {
+		saleInquiryFormMapper.insert(saleInquiryForm);
+		if(saleInquiryFormShipList!=null && saleInquiryFormShipList.size()>0) {
+			for(SaleInquiryFormShip entity:saleInquiryFormShipList) {
+				//外键设置
+				entity.setHeadId(saleInquiryForm.getId());
+				saleInquiryFormShipMapper.insert(entity);
+			}
+		}
+		if(saleInquiryFormProductList!=null && saleInquiryFormProductList.size()>0) {
+			for(SaleInquiryFormProduct entity:saleInquiryFormProductList) {
+				//外键设置
+				entity.setHeadId(saleInquiryForm.getId());
+				saleInquiryFormProductMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void updateMain(SaleInquiryForm saleInquiryForm,List<SaleInquiryFormShip> saleInquiryFormShipList,List<SaleInquiryFormProduct> saleInquiryFormProductList) {
+		saleInquiryFormMapper.updateById(saleInquiryForm);
+		
+		//1.先删除子表数据
+		saleInquiryFormShipMapper.deleteByMainId(saleInquiryForm.getId());
+		saleInquiryFormProductMapper.deleteByMainId(saleInquiryForm.getId());
+		
+		//2.子表数据重新插入
+		if(saleInquiryFormShipList!=null && saleInquiryFormShipList.size()>0) {
+			for(SaleInquiryFormShip entity:saleInquiryFormShipList) {
+				//外键设置
+				entity.setHeadId(saleInquiryForm.getId());
+				saleInquiryFormShipMapper.insert(entity);
+			}
+		}
+		if(saleInquiryFormProductList!=null && saleInquiryFormProductList.size()>0) {
+			for(SaleInquiryFormProduct entity:saleInquiryFormProductList) {
+				//外键设置
+				entity.setHeadId(saleInquiryForm.getId());
+				saleInquiryFormProductMapper.insert(entity);
+			}
+		}
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delMain(String id) {
+		saleInquiryFormShipMapper.deleteByMainId(id);
+		saleInquiryFormProductMapper.deleteByMainId(id);
+		saleInquiryFormMapper.deleteById(id);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void delBatchMain(Collection<? extends Serializable> idList) {
+		for(Serializable id:idList) {
+			saleInquiryFormShipMapper.deleteByMainId(id.toString());
+			saleInquiryFormProductMapper.deleteByMainId(id.toString());
+			saleInquiryFormMapper.deleteById(id);
+		}
+	}
+	
+}

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

@@ -0,0 +1,27 @@
+package com.cuidian.srm.saleCode.service.impl;
+
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.cuidian.srm.saleCode.mapper.SaleInquiryFormShipMapper;
+import com.cuidian.srm.saleCode.service.ISaleInquiryFormShipService;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * @Description: 销售询价单子表 - 船明细
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Service
+public class SaleInquiryFormShipServiceImpl extends ServiceImpl<SaleInquiryFormShipMapper, SaleInquiryFormShip> implements ISaleInquiryFormShipService {
+	
+	@Autowired
+	private SaleInquiryFormShipMapper saleInquiryFormShipMapper;
+	
+	@Override
+	public List<SaleInquiryFormShip> selectByMainId(String mainId) {
+		return saleInquiryFormShipMapper.selectByMainId(mainId);
+	}
+}

+ 157 - 0
srm-module-code/src/main/java/com/cuidian/srm/saleCode/vo/SaleInquiryFormPage.java

@@ -0,0 +1,157 @@
+package com.cuidian.srm.saleCode.vo;
+
+import java.util.List;
+import com.cuidian.srm.saleCode.entity.SaleInquiryForm;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormShip;
+import com.cuidian.srm.saleCode.entity.SaleInquiryFormProduct;
+import lombok.Data;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecgframework.poi.excel.annotation.ExcelEntity;
+import org.jeecgframework.poi.excel.annotation.ExcelCollection;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.util.Date;
+import org.jeecg.common.aspect.annotation.Dict;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * @Description: 销售询价单
+ * @Author: jeecg-boot
+ * @Date:   2024-11-14
+ * @Version: V1.0
+ */
+@Data
+@ApiModel(value="sale_inquiry_formPage对象", description="销售询价单")
+public class SaleInquiryFormPage {
+
+	/**主键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-已删除)")
+    private Integer delFlag;
+	/**其他状态(other status)*/
+	@Excel(name = "其他状态(other status)", width = 15)
+	@ApiModelProperty(value = "其他状态(other status)")
+    private String otherStatus;
+	/**提交(1是 0否)*/
+	@Excel(name = "提交(1是 0否)", width = 15)
+	@ApiModelProperty(value = "提交(1是 0否)")
+    private String submit;
+	/**单据日期(bill date)*/
+	@Excel(name = "单据日期(bill date)", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "单据日期(bill date)")
+    private Date billDate;
+	/**询价单号(bill code)*/
+	@Excel(name = "询价单号(bill code)", width = 15)
+	@ApiModelProperty(value = "询价单号(bill code)")
+    private String billCode;
+	/**询价项目(inquiry project)*/
+	@Excel(name = "询价项目(inquiry project)", width = 15)
+	@ApiModelProperty(value = "询价项目(inquiry project)")
+    private String inquiryProject;
+	/**询价客户(inquiry customer)*/
+	@Excel(name = "询价客户(inquiry customer)", width = 15)
+	@ApiModelProperty(value = "询价客户(inquiry customer)")
+    private String inquiryCustomer;
+	/**询价平台(inquiry platform)*/
+	@Excel(name = "询价平台(inquiry platform)", width = 15)
+	@ApiModelProperty(value = "询价平台(inquiry platform)")
+    private String inquiryPlatform;
+	/**客户询价单号(customer inquiry number)*/
+	@Excel(name = "客户询价单号(customer inquiry number)", width = 15)
+	@ApiModelProperty(value = "客户询价单号(customer inquiry number)")
+    private String customerInquiryNumber;
+	/**询价有效期(inquiry period)止*/
+	@Excel(name = "询价有效期(inquiry period)止", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "询价有效期(inquiry period)止")
+    private Date inquiryPeriodEnd;
+	/**询价有效期(inquiry period)始*/
+	@Excel(name = "询价有效期(inquiry period)始", width = 15, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@ApiModelProperty(value = "询价有效期(inquiry period)始")
+    private Date inquiryPeriodBegin;
+	/**业务类型(busyness type)*/
+	@Excel(name = "业务类型(busyness type)", width = 15)
+	@ApiModelProperty(value = "业务类型(busyness type)")
+    private String busynessType;
+	/**优先级(priority)*/
+	@Excel(name = "优先级(priority)", width = 15)
+	@ApiModelProperty(value = "优先级(priority)")
+    private String priority;
+	/**产品分类(production class)*/
+	@Excel(name = "产品分类(production class)", width = 15)
+	@ApiModelProperty(value = "产品分类(production class)")
+    private String productionClass;
+	/**机型(model)*/
+	@Excel(name = "机型(model)", width = 15)
+	@ApiModelProperty(value = "机型(model)")
+    private String model;
+	/**厂家(maker)*/
+	@Excel(name = "厂家(maker)", width = 15)
+	@ApiModelProperty(value = "厂家(maker)")
+    private String maker;
+	/**销售部门(sale department)*/
+	@Excel(name = "销售部门(sale department)", width = 15)
+	@ApiModelProperty(value = "销售部门(sale department)")
+    private String saleDepartment;
+	/**业务员(salesman)*/
+	@Excel(name = "业务员(salesman)", width = 15)
+	@ApiModelProperty(value = "业务员(salesman)")
+    private String salesman;
+	/**采购询价组(procurement inquiry team)*/
+	@Excel(name = "采购询价组(procurement inquiry team)", width = 15)
+	@ApiModelProperty(value = "采购询价组(procurement inquiry team)")
+    private String inquiryTeam;
+	/**交期(delivery time)*/
+	@Excel(name = "交期(delivery time)", 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 = "交期(delivery time)")
+    private Date deliveryTime;
+	/**附件(attachs)*/
+	@Excel(name = "附件(attachs)", width = 15)
+	@ApiModelProperty(value = "附件(attachs)")
+    private String attachs;
+	/**询价备注(inquiry notes)*/
+	@Excel(name = "询价备注(inquiry notes)", width = 15)
+	@ApiModelProperty(value = "询价备注(inquiry notes)")
+    private String inquiryNotes;
+
+	@ExcelCollection(name="销售询价单子表 - 船明细")
+	@ApiModelProperty(value = "销售询价单子表 - 船明细")
+	private List<SaleInquiryFormShip> saleInquiryFormShipList;
+	@ExcelCollection(name="销售询价单子表 - 产品明细")
+	@ApiModelProperty(value = "销售询价单子表 - 产品明细")
+	private List<SaleInquiryFormProduct> saleInquiryFormProductList;
+
+}