添加供应商入驻接口
This commit is contained in:
parent
444517fa74
commit
8a6a743514
|
|
@ -0,0 +1,25 @@
|
|||
package com.nu.modules.suppliers;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.NuBillEntity;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.entity.SuppliersOrgEntity;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ISuppliersApi {
|
||||
|
||||
SuppliersApplyEntity addSuppliers(SuppliersApplyEntity suppliersApplyEntity);
|
||||
|
||||
IPage<SuppliersOrgAllEntity> getSuppliersOrgInfo(Integer pageNo, Integer pageSize, String orgCode, String title, String openId);
|
||||
|
||||
SuppliersOrgEntity applySupOrg(SuppliersOrgEntity suppliersOrgEntity);
|
||||
|
||||
IPage<SuppliersOrgAllEntity> getApplySuppliersOrgInfo(Integer pageNo, Integer pageSize, String orgCode, String title, String openId);
|
||||
|
||||
SuppliersApplyEntity editSuppliers(SuppliersApplyEntity suppliersApplyEntity);
|
||||
|
||||
SuppliersApplyEntity getSupInfoByOpenId(String openId);
|
||||
}
|
||||
|
|
@ -104,6 +104,7 @@ public class AdvisoryInfo implements Serializable {
|
|||
private String izYg;//是否是员工 0否 1是
|
||||
private String izJs;//是否是家属 0否 1是
|
||||
private String izJg;//是否是机构 0否 1是
|
||||
private String izGys;//是否是机构 0否 1是
|
||||
|
||||
/**身份证号*/
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.bizSuppliers.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService;
|
||||
|
||||
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: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="供应商信息")
|
||||
@RestController
|
||||
@RequestMapping("/bizSuppliers/nuBizSuppliersApply")
|
||||
@Slf4j
|
||||
public class NuBizSuppliersApplyController extends JeecgController<NuBizSuppliersApply, INuBizSuppliersApplyService> {
|
||||
@Autowired
|
||||
private INuBizSuppliersApplyService nuBizSuppliersApplyService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBizSuppliersApply
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "供应商信息-分页列表查询")
|
||||
@ApiOperation(value="供应商信息-分页列表查询", notes="供应商信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBizSuppliersApply>> queryPageList(NuBizSuppliersApply nuBizSuppliersApply,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBizSuppliersApply> queryWrapper = QueryGenerator.initQueryWrapper(nuBizSuppliersApply, req.getParameterMap());
|
||||
Page<NuBizSuppliersApply> page = new Page<NuBizSuppliersApply>(pageNo, pageSize);
|
||||
IPage<NuBizSuppliersApply> pageList = nuBizSuppliersApplyService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBizSuppliersApply
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商信息-添加")
|
||||
@ApiOperation(value="供应商信息-添加", notes="供应商信息-添加")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizSuppliersApply nuBizSuppliersApply) {
|
||||
nuBizSuppliersApplyService.save(nuBizSuppliersApply);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBizSuppliersApply
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商信息-编辑")
|
||||
@ApiOperation(value="供应商信息-编辑", notes="供应商信息-编辑")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBizSuppliersApply nuBizSuppliersApply) {
|
||||
nuBizSuppliersApplyService.updateById(nuBizSuppliersApply);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商信息-通过id删除")
|
||||
@ApiOperation(value="供应商信息-通过id删除", notes="供应商信息-通过id删除")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuBizSuppliersApplyService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商信息-批量删除")
|
||||
@ApiOperation(value="供应商信息-批量删除", notes="供应商信息-批量删除")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuBizSuppliersApplyService.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<NuBizSuppliersApply> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuBizSuppliersApply nuBizSuppliersApply = nuBizSuppliersApplyService.getById(id);
|
||||
if(nuBizSuppliersApply==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBizSuppliersApply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBizSuppliersApply
|
||||
*/
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuBizSuppliersApply nuBizSuppliersApply) {
|
||||
return super.exportXls(request, nuBizSuppliersApply, NuBizSuppliersApply.class, "供应商信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_apply:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuBizSuppliersApply.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.nu.modules.bizSuppliers.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService;
|
||||
|
||||
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: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="供应商-机构中间表")
|
||||
@RestController
|
||||
@RequestMapping("/bizSuppliers/nuBizSuppliersOrg")
|
||||
@Slf4j
|
||||
public class NuBizSuppliersOrgController extends JeecgController<NuBizSuppliersOrg, INuBizSuppliersOrgService> {
|
||||
@Autowired
|
||||
private INuBizSuppliersOrgService nuBizSuppliersOrgService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param nuBizSuppliersOrg
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "供应商-机构中间表-分页列表查询")
|
||||
@ApiOperation(value="供应商-机构中间表-分页列表查询", notes="供应商-机构中间表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<NuBizSuppliersOrg>> queryPageList(NuBizSuppliersOrg nuBizSuppliersOrg,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<NuBizSuppliersOrg> queryWrapper = QueryGenerator.initQueryWrapper(nuBizSuppliersOrg, req.getParameterMap());
|
||||
Page<NuBizSuppliersOrg> page = new Page<NuBizSuppliersOrg>(pageNo, pageSize);
|
||||
IPage<NuBizSuppliersOrg> pageList = nuBizSuppliersOrgService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param nuBizSuppliersOrg
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商-机构中间表-添加")
|
||||
@ApiOperation(value="供应商-机构中间表-添加", notes="供应商-机构中间表-添加")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizSuppliersOrg nuBizSuppliersOrg) {
|
||||
nuBizSuppliersOrgService.save(nuBizSuppliersOrg);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param nuBizSuppliersOrg
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商-机构中间表-编辑")
|
||||
@ApiOperation(value="供应商-机构中间表-编辑", notes="供应商-机构中间表-编辑")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody NuBizSuppliersOrg nuBizSuppliersOrg) {
|
||||
nuBizSuppliersOrgService.updateById(nuBizSuppliersOrg);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商-机构中间表-通过id删除")
|
||||
@ApiOperation(value="供应商-机构中间表-通过id删除", notes="供应商-机构中间表-通过id删除")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
nuBizSuppliersOrgService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "供应商-机构中间表-批量删除")
|
||||
@ApiOperation(value="供应商-机构中间表-批量删除", notes="供应商-机构中间表-批量删除")
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.nuBizSuppliersOrgService.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<NuBizSuppliersOrg> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
NuBizSuppliersOrg nuBizSuppliersOrg = nuBizSuppliersOrgService.getById(id);
|
||||
if(nuBizSuppliersOrg==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(nuBizSuppliersOrg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param nuBizSuppliersOrg
|
||||
*/
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, NuBizSuppliersOrg nuBizSuppliersOrg) {
|
||||
return super.exportXls(request, nuBizSuppliersOrg, NuBizSuppliersOrg.class, "供应商-机构中间表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("bizSuppliers:nu_biz_suppliers_org:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, NuBizSuppliersOrg.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.nu.modules.bizSuppliers.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: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_suppliers_apply")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_suppliers_apply对象", description="供应商信息")
|
||||
public class NuBizSuppliersApply implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**供应商名称*/
|
||||
@Excel(name = "供应商名称", width = 15)
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private java.lang.String suppliersName;
|
||||
/**供应商性质 1代理商 2批发商 3制造商*/
|
||||
@Excel(name = "供应商性质 1代理商 2批发商 3制造商", width = 15)
|
||||
@ApiModelProperty(value = "供应商性质 1代理商 2批发商 3制造商")
|
||||
private java.lang.String suppliersNature;
|
||||
/**供应商地址*/
|
||||
@Excel(name = "供应商地址", width = 15)
|
||||
@ApiModelProperty(value = "供应商地址")
|
||||
private java.lang.String suppliersAddress;
|
||||
/**负责人*/
|
||||
@Excel(name = "负责人", width = 15)
|
||||
@ApiModelProperty(value = "负责人")
|
||||
private java.lang.String personInCharge;
|
||||
/**联系电话*/
|
||||
@Excel(name = "联系电话", width = 15)
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private java.lang.String contactNumber;
|
||||
/**供应状态 1正常供应 2暂停供应*/
|
||||
@Excel(name = "供应状态 1正常供应 2暂停供应", width = 15)
|
||||
@ApiModelProperty(value = "供应状态 1正常供应 2暂停供应")
|
||||
private java.lang.String supplyState;
|
||||
/**开户行*/
|
||||
@Excel(name = "开户行", width = 15)
|
||||
@ApiModelProperty(value = "开户行")
|
||||
private java.lang.String openingBank;
|
||||
/**开户行账号*/
|
||||
@Excel(name = "开户行账号", width = 15)
|
||||
@ApiModelProperty(value = "开户行账号")
|
||||
private java.lang.String openingBankNo;
|
||||
/**微信账号*/
|
||||
@Excel(name = "微信账号", width = 15)
|
||||
@ApiModelProperty(value = "微信账号")
|
||||
private java.lang.String wechartId;
|
||||
/**资质照片*/
|
||||
@Excel(name = "资质照片", width = 15)
|
||||
@ApiModelProperty(value = "资质照片")
|
||||
private java.lang.String imgPath;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除 0未删除 1删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除 0未删除 1删除")
|
||||
@TableLogic
|
||||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**是否启用 0启用 1未启用*/
|
||||
@Excel(name = "是否启用 0启用 1未启用", width = 15)
|
||||
@ApiModelProperty(value = "是否启用 0启用 1未启用")
|
||||
private java.lang.String izEnabled;
|
||||
/**openId*/
|
||||
@Excel(name = "openId", width = 15)
|
||||
@ApiModelProperty(value = "openId")
|
||||
private java.lang.String openId;
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.nu.modules.bizSuppliers.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: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_suppliers_org")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_suppliers_org对象", description="供应商-机构中间表")
|
||||
public class NuBizSuppliersOrg implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**微信id*/
|
||||
@Excel(name = "微信id", width = 15)
|
||||
@ApiModelProperty(value = "微信id")
|
||||
private java.lang.String openId;
|
||||
/**供应商nu_biz_suppliers_apply.id*/
|
||||
@Excel(name = "供应商nu_biz_suppliers_apply.id", width = 15)
|
||||
@ApiModelProperty(value = "供应商nu_biz_suppliers_apply.id")
|
||||
private java.lang.String suppliersId;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private java.lang.String orgCode;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**是否在线 Y在线 N不在线*/
|
||||
@Excel(name = "是否在线 Y在线 N不在线", width = 15)
|
||||
@ApiModelProperty(value = "是否在线 Y在线 N不在线")
|
||||
private java.lang.String izOnline;
|
||||
/**申请状态 1申请中 2通过 3驳回*/
|
||||
@Excel(name = "申请状态 1申请中 2通过 3驳回", width = 15)
|
||||
@ApiModelProperty(value = "申请状态 1申请中 2通过 3驳回")
|
||||
private java.lang.String status;
|
||||
/**审核备注*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
private java.lang.String auditContent;
|
||||
/**是否历史数据 Y历史 N当前数据*/
|
||||
@Excel(name = "是否历史数据 Y历史 N当前数据", width = 15)
|
||||
@ApiModelProperty(value = "是否历史数据 Y历史 N当前数据")
|
||||
private java.lang.String izHistory;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.nu.modules.bizSuppliers.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 供应商信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuBizSuppliersApplyMapper extends BaseMapper<NuBizSuppliersApply> {
|
||||
|
||||
IPage<SuppliersOrgAllEntity> getSuppliersOrgInfo(IPage<SuppliersOrgAllEntity> page,@Param("orgCode") String orgCode,@Param("title") String title,@Param("openId") String openId);
|
||||
|
||||
IPage<SuppliersOrgAllEntity> getApplySuppliersOrgInfo(IPage<SuppliersOrgAllEntity> page,@Param("orgCode") String orgCode,@Param("title") String title,@Param("openId") String openId);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.nu.modules.bizSuppliers.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 供应商-机构中间表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuBizSuppliersOrgMapper extends BaseMapper<NuBizSuppliersOrg> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?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.nu.modules.bizSuppliers.mapper.NuBizSuppliersApplyMapper">
|
||||
|
||||
<select id="getApplySuppliersOrgInfo" resultType="com.nu.entity.SuppliersOrgAllEntity">
|
||||
select d.id as org_id,
|
||||
o.com_name as depart_name,
|
||||
d.org_code,
|
||||
d.server_url,
|
||||
o.org_leader,
|
||||
o.org_leader_phone,
|
||||
o.org_address,
|
||||
s.`status` as suppliers_status
|
||||
from sys_depart d
|
||||
left join nu_org_apply_info o on d.id = o.pk_id and o.status = '2'
|
||||
left join nu_biz_suppliers_org s on d.org_code = s.org_code and s.iz_history = 'N' and s.open_id = #{openId}
|
||||
where 1=1 and d.server_url is not null
|
||||
<if test="orgCode != null and orgCode != ''">
|
||||
and d.org_code IN
|
||||
<foreach item="item" collection="orgCode.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
and title like concat('%',#{title},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSuppliersOrgInfo" resultType="com.nu.entity.SuppliersOrgAllEntity">
|
||||
select
|
||||
d.id as org_id,
|
||||
o.com_name as depart_name,
|
||||
d.org_code,
|
||||
d.server_url,
|
||||
o.org_leader,
|
||||
o.org_leader_phone,
|
||||
o.org_address,
|
||||
s.`status` as suppliers_status
|
||||
from sys_depart d
|
||||
left join nu_org_apply_info o on d.id = o.pk_id and o.status = '2'
|
||||
left join nu_biz_suppliers_org s on d.org_code = s.org_code and s.iz_history = 'N'
|
||||
where 1=1 and s.open_id = #{openId} and d.server_url is not null
|
||||
<if test="orgCode != null and orgCode != ''">
|
||||
and d.org_code IN
|
||||
<foreach item="item" collection="orgCode.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="title != null and title != ''">
|
||||
and title like concat('%',#{title},'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -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.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.bizSuppliers.service;
|
||||
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 供应商信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuBizSuppliersApplyService extends IService<NuBizSuppliersApply> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.nu.modules.bizSuppliers.service;
|
||||
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 供应商-机构中间表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface INuBizSuppliersOrgService extends IService<NuBizSuppliersOrg> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
package com.nu.modules.bizSuppliers.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.entity.SuppliersOrgEntity;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersApply;
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.nu.modules.bizSuppliers.mapper.NuBizSuppliersApplyMapper;
|
||||
import com.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersApplyService;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfo;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import com.nu.modules.suppliers.ISuppliersApi;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 供应商信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuBizSuppliersApplyServiceImpl extends ServiceImpl<NuBizSuppliersApplyMapper, NuBizSuppliersApply> implements INuBizSuppliersApplyService, ISuppliersApi {
|
||||
|
||||
@Autowired
|
||||
private NuBizSuppliersOrgMapper nuBizSuppliersOrgMapper;
|
||||
|
||||
@Override
|
||||
public SuppliersApplyEntity addSuppliers(SuppliersApplyEntity suppliersApplyEntity) {
|
||||
QueryWrapper<NuBizSuppliersApply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id", suppliersApplyEntity.getOpenId());
|
||||
List<NuBizSuppliersApply> list = baseMapper.selectList(queryWrapper);
|
||||
if (list.size() > 0) {
|
||||
BeanUtils.copyProperties(list.get(0), suppliersApplyEntity);
|
||||
return suppliersApplyEntity;
|
||||
}
|
||||
NuBizSuppliersApply nuBizSuppliersApply = new NuBizSuppliersApply();
|
||||
BeanUtils.copyProperties(suppliersApplyEntity, nuBizSuppliersApply);
|
||||
baseMapper.insert(nuBizSuppliersApply);
|
||||
BeanUtils.copyProperties(nuBizSuppliersApply, suppliersApplyEntity);
|
||||
return suppliersApplyEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SuppliersOrgAllEntity> getSuppliersOrgInfo(Integer pageNo, Integer pageSize, String orgCode, String title, String openId) {
|
||||
IPage<SuppliersOrgAllEntity> page = new Page<>(pageNo, pageSize);
|
||||
IPage<SuppliersOrgAllEntity> list = baseMapper.getSuppliersOrgInfo(page, orgCode, title, openId);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuppliersOrgEntity applySupOrg(SuppliersOrgEntity suppliersOrgEntity) {
|
||||
NuBizSuppliersOrg nuBizSuppliersOrg = new NuBizSuppliersOrg();
|
||||
BeanUtils.copyProperties(suppliersOrgEntity, nuBizSuppliersOrg);
|
||||
|
||||
QueryWrapper<NuBizSuppliersOrg> orgqueryWrapper = new QueryWrapper<>();
|
||||
orgqueryWrapper.eq("open_id", suppliersOrgEntity.getOpenId());
|
||||
orgqueryWrapper.eq("org_code", suppliersOrgEntity.getOrgCode());
|
||||
orgqueryWrapper.eq("status", "1");
|
||||
//查询是否又申请中的数据,如果又直接返回申请数据
|
||||
List<NuBizSuppliersOrg> listOrg = nuBizSuppliersOrgMapper.selectList(orgqueryWrapper);
|
||||
if (listOrg.size() > 0) {
|
||||
BeanUtils.copyProperties(listOrg.get(0), suppliersOrgEntity);
|
||||
return suppliersOrgEntity;
|
||||
}else{
|
||||
//修改原来的数据都改为历史数据
|
||||
UpdateWrapper<NuBizSuppliersOrg> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.eq("open_id", suppliersOrgEntity.getOpenId());
|
||||
updateWrapper.eq("org_code", suppliersOrgEntity.getOrgCode());
|
||||
NuBizSuppliersOrg nuBizSuppliersOrgUp = new NuBizSuppliersOrg();
|
||||
nuBizSuppliersOrgUp.setIzHistory("Y");
|
||||
nuBizSuppliersOrgMapper.update(nuBizSuppliersOrgUp, updateWrapper);
|
||||
}
|
||||
QueryWrapper<NuBizSuppliersApply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id", suppliersOrgEntity.getOpenId());
|
||||
List<NuBizSuppliersApply> list = baseMapper.selectList(queryWrapper);
|
||||
//查询供应商信息,赋值对应字段
|
||||
if (list.size() > 0) {
|
||||
nuBizSuppliersOrg.setSuppliersId(list.get(0).getId());
|
||||
}
|
||||
nuBizSuppliersOrg.setStatus("1");
|
||||
nuBizSuppliersOrg.setIzHistory("N");
|
||||
nuBizSuppliersOrgMapper.insert(nuBizSuppliersOrg);
|
||||
|
||||
//todo 向对应业务机构添加供应商审核数据
|
||||
|
||||
BeanUtils.copyProperties(nuBizSuppliersOrg, suppliersOrgEntity);
|
||||
return suppliersOrgEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SuppliersOrgAllEntity> getApplySuppliersOrgInfo(Integer pageNo, Integer pageSize, String orgCode, String title, String openId) {
|
||||
IPage<SuppliersOrgAllEntity> page = new Page<>(pageNo, pageSize);
|
||||
IPage<SuppliersOrgAllEntity> list = baseMapper.getApplySuppliersOrgInfo(page, orgCode, title, openId);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuppliersApplyEntity editSuppliers(SuppliersApplyEntity suppliersApplyEntity) {
|
||||
NuBizSuppliersApply nuBizSuppliersApply = new NuBizSuppliersApply();
|
||||
BeanUtils.copyProperties(suppliersApplyEntity, nuBizSuppliersApply);
|
||||
baseMapper.updateById(nuBizSuppliersApply);
|
||||
|
||||
//todo 修改对应机构的供应商数据
|
||||
|
||||
BeanUtils.copyProperties(nuBizSuppliersApply, suppliersApplyEntity);
|
||||
return suppliersApplyEntity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuppliersApplyEntity getSupInfoByOpenId(String openId) {
|
||||
QueryWrapper<NuBizSuppliersApply> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("open_id", openId);
|
||||
List<NuBizSuppliersApply> list = baseMapper.selectList(queryWrapper);
|
||||
if (list.size() > 0) {
|
||||
SuppliersApplyEntity suppliersApplyEntity = new SuppliersApplyEntity();
|
||||
BeanUtils.copyProperties(list.get(0), suppliersApplyEntity);
|
||||
return suppliersApplyEntity;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.nu.modules.bizSuppliers.service.impl;
|
||||
|
||||
import com.nu.modules.bizSuppliers.entity.NuBizSuppliersOrg;
|
||||
import com.nu.modules.bizSuppliers.mapper.NuBizSuppliersOrgMapper;
|
||||
import com.nu.modules.bizSuppliers.service.INuBizSuppliersOrgService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 供应商-机构中间表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class NuBizSuppliersOrgServiceImpl extends ServiceImpl<NuBizSuppliersOrgMapper, NuBizSuppliersOrg> implements INuBizSuppliersOrgService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package com.nu.modules.wechat.suppliers;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nu.entity.EmployeesOrgApiEntity;
|
||||
import com.nu.entity.SuppliersApplyEntity;
|
||||
import com.nu.entity.SuppliersOrgAllEntity;
|
||||
import com.nu.entity.SuppliersOrgEntity;
|
||||
import com.nu.modules.orgapplyinfo.entity.EmployeesApiEntity;
|
||||
import com.nu.modules.orgapplyinfo.entity.OrgAllInfoApiEntity;
|
||||
import com.nu.modules.suppliers.ISuppliersApi;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/suppliers")
|
||||
public class SuppliersApi {
|
||||
@Autowired
|
||||
private ISuppliersApi suppliersApi;
|
||||
|
||||
|
||||
/**
|
||||
* 入驻供应商
|
||||
* @param suppliersApplyEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/addSuppliers")
|
||||
public Result<Object> addSuppliers(@RequestBody SuppliersApplyEntity suppliersApplyEntity) {
|
||||
SuppliersApplyEntity suppliersApplyEntity1 = suppliersApi.addSuppliers(suppliersApplyEntity);
|
||||
return Result.OK(suppliersApplyEntity);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改供应商信息
|
||||
* @param suppliersApplyEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/editSuppliers")
|
||||
public Result<Object> editSuppliers(@RequestBody SuppliersApplyEntity suppliersApplyEntity) {
|
||||
SuppliersApplyEntity suppliersApplyEntity1 = suppliersApi.editSuppliers(suppliersApplyEntity);
|
||||
return Result.OK(suppliersApplyEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商已经入驻机构的信息
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param orgCode
|
||||
* @param title
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getSuppliersOrgInfo")
|
||||
public Result<IPage<SuppliersOrgAllEntity>> getSuppliersOrgInfo(
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
|
||||
@RequestParam(value = "orgCode", defaultValue = "", required = false) String orgCode,
|
||||
@RequestParam(value = "title", defaultValue = "", required = false) String title,
|
||||
@RequestParam(value = "openId") String openId) {
|
||||
IPage<SuppliersOrgAllEntity> result = suppliersApi.getSuppliersOrgInfo(pageNo, pageSize, orgCode, title,openId);
|
||||
List<SuppliersOrgAllEntity> sourceRecords = result.getRecords();
|
||||
if (sourceRecords == null || sourceRecords.size() <= 0) {
|
||||
return Result.OK(result);
|
||||
}
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商入驻机构
|
||||
* @param suppliersOrgEntity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/applySupOrg")
|
||||
public Result<Object> applySupOrg(@RequestBody SuppliersOrgEntity suppliersOrgEntity) {
|
||||
suppliersApi.applySupOrg(suppliersOrgEntity);
|
||||
return Result.OK(suppliersOrgEntity);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取供应商可入驻机构信息
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param orgCode
|
||||
* @param title
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getApplySuppliersOrgInfo")
|
||||
public Result<IPage<SuppliersOrgAllEntity>> getApplySuppliersOrgInfo(
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "8") Integer pageSize,
|
||||
@RequestParam(value = "orgCode", defaultValue = "", required = false) String orgCode,
|
||||
@RequestParam(value = "title", defaultValue = "", required = false) String title,
|
||||
@RequestParam(value = "openId") String openId) {
|
||||
IPage<SuppliersOrgAllEntity> result = suppliersApi.getApplySuppliersOrgInfo(pageNo, pageSize, orgCode, title,openId);
|
||||
List<SuppliersOrgAllEntity> sourceRecords = result.getRecords();
|
||||
if (sourceRecords == null || sourceRecords.size() <= 0) {
|
||||
return Result.OK(result);
|
||||
}
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据openId获取供应商信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/getSupInfoByOpenId")
|
||||
public Result<SuppliersApplyEntity> getSupInfoByOpenId(
|
||||
@RequestParam(value = "openId") String openId) {
|
||||
SuppliersApplyEntity result = suppliersApi.getSupInfoByOpenId(openId);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -118,6 +118,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/sys/sysDepart/queryInstitutionsList", "anon");//授权接口排除
|
||||
filterChainDefinitionMap.put("/api/elderInfo/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/weixin/**", "anon"); //授权接口排除
|
||||
filterChainDefinitionMap.put("/api/suppliers/**", "anon"); //供应商入驻
|
||||
filterChainDefinitionMap.put("/api/pad/loginApi/**", "anon"); //pad登录-信息获取接口
|
||||
filterChainDefinitionMap.put("/sys/common/open/static/**", "anon");//获取本地文件资源
|
||||
filterChainDefinitionMap.put("/api/sysUtils/refreshDS", "anon");//刷新数据源
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ public class NuBizAdvisoryInfoEntity implements Serializable {
|
|||
private String izJs;
|
||||
//是否是机构 0否 1是
|
||||
private String izJg;
|
||||
//是否是机构 0否 1是
|
||||
private String izGys;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 供应商信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class SuppliersApplyEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**供应商名称*/
|
||||
private String suppliersName;
|
||||
/**供应商性质 1代理商 2批发商 3制造商*/
|
||||
private String suppliersNature;
|
||||
/**供应商地址*/
|
||||
private String suppliersAddress;
|
||||
/**负责人*/
|
||||
private String personInCharge;
|
||||
/**联系电话*/
|
||||
private String contactNumber;
|
||||
/**供应状态 1正常供应 2暂停供应*/
|
||||
private String supplyState;
|
||||
/**开户行*/
|
||||
private String openingBank;
|
||||
/**开户行账号*/
|
||||
private String openingBankNo;
|
||||
/**微信账号*/
|
||||
private String wechartId;
|
||||
/**资质照片*/
|
||||
private String imgPath;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
private String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
private String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
/**openId*/
|
||||
private String openId;
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 机构全部信息
|
||||
* @Author: zmy
|
||||
* @Date: 2025-07-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class SuppliersOrgAllEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private String orgId;
|
||||
|
||||
private String departName;
|
||||
|
||||
private String orgCode;
|
||||
|
||||
private String orgLeader;
|
||||
|
||||
private String orgLeaderPhone;
|
||||
|
||||
private String orgAddress;
|
||||
|
||||
private String suppliersStatus;
|
||||
|
||||
private String serverUrl;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.nu.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 供应商-机构中间表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_biz_suppliers_org")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_biz_suppliers_org对象", description="供应商-机构中间表")
|
||||
public class SuppliersOrgEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
/**微信id*/
|
||||
@Excel(name = "微信id", width = 15)
|
||||
@ApiModelProperty(value = "微信id")
|
||||
private String openId;
|
||||
/**供应商nu_biz_suppliers_apply.id*/
|
||||
@Excel(name = "供应商nu_biz_suppliers_apply.id", width = 15)
|
||||
@ApiModelProperty(value = "供应商nu_biz_suppliers_apply.id")
|
||||
private String suppliersId;
|
||||
/**机构编码*/
|
||||
@Excel(name = "机构编码", width = 15)
|
||||
@ApiModelProperty(value = "机构编码")
|
||||
private String orgCode;
|
||||
/**创建人*/
|
||||
@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;
|
||||
/**是否在线 Y在线 N不在线*/
|
||||
@Excel(name = "是否在线 Y在线 N不在线", width = 15)
|
||||
@ApiModelProperty(value = "是否在线 Y在线 N不在线")
|
||||
private String izOnline;
|
||||
/**申请状态 1申请中 2通过 3驳回*/
|
||||
@Excel(name = "申请状态 1申请中 2通过 3驳回", width = 15)
|
||||
@ApiModelProperty(value = "申请状态 1申请中 2通过 3驳回")
|
||||
private String status;
|
||||
/**审核备注*/
|
||||
@Excel(name = "审核备注", width = 15)
|
||||
@ApiModelProperty(value = "审核备注")
|
||||
private String auditContent;
|
||||
/**是否历史数据 Y历史 N当前数据*/
|
||||
@Excel(name = "是否历史数据 Y历史 N当前数据", width = 15)
|
||||
@ApiModelProperty(value = "是否历史数据 Y历史 N当前数据")
|
||||
private String izHistory;
|
||||
}
|
||||
Loading…
Reference in New Issue