供应商列表
This commit is contained in:
		
							parent
							
								
									4deca312e6
								
							
						
					
					
						commit
						f36b656c0f
					
				| 
						 | 
				
			
			@ -8,6 +8,7 @@ import com.bonus.canteen.core.drp.dto.*;
 | 
			
		|||
import com.bonus.canteen.core.drp.service.DrpSupplierService;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpMaterialSupplierVO;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpSupplierPageVO;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpSupplierVO;
 | 
			
		||||
import com.bonus.common.core.web.domain.AjaxResult;
 | 
			
		||||
import com.github.pagehelper.page.PageMethod;
 | 
			
		||||
import io.swagger.annotations.Api;
 | 
			
		||||
| 
						 | 
				
			
			@ -86,15 +87,13 @@ public class DrpSupplierController {
 | 
			
		|||
      return AjaxResult.success();
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   @PostMapping({"/list/supplier"})
 | 
			
		||||
//   @RequiresAuthentication
 | 
			
		||||
//   @ApiOperation("查询供应商集合")
 | 
			
		||||
//   public LeResponse<List<DrpSupplierVO>> listSupplier(@RequestBody LeRequest<DrpSupplierQueryDTO> leRequest) {
 | 
			
		||||
//      DrpSupplierQueryDTO content = (DrpSupplierQueryDTO)leRequest.getContent();
 | 
			
		||||
//      List<DrpSupplierVO> resultList = this.drpSupplierService.listSupplier(content);
 | 
			
		||||
//      return LeResponse.succ(resultList);
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
   @PostMapping({"/list/supplier"})
 | 
			
		||||
   @ApiOperation("查询供应商集合")
 | 
			
		||||
   public AjaxResult listSupplier(@RequestBody DrpSupplierQueryDTO dto) {
 | 
			
		||||
      List<DrpSupplierVO> resultList = this.drpSupplierService.listSupplier(dto);
 | 
			
		||||
      return AjaxResult.success(resultList);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   @PostMapping({"/list/supplierByMaterialId"})
 | 
			
		||||
//   @RequiresAuthentication
 | 
			
		||||
//   @ApiOperation("根据原料或类别查询供应商集合")
 | 
			
		||||
| 
						 | 
				
			
			@ -145,13 +144,12 @@ public class DrpSupplierController {
 | 
			
		|||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   @PostMapping({"/bidMaterialSupplier"})
 | 
			
		||||
//   @RequiresAuthentication
 | 
			
		||||
//   @ApiOperation("原料绑定供应商")
 | 
			
		||||
//   public void bidMaterialSupplier(@RequestBody LeRequest<DrpBidMaterialSupplierDTO> leRequest) {
 | 
			
		||||
//      this.drpSupplierService.bidMaterialSupplier((DrpBidMaterialSupplierDTO)leRequest.getContent());
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
   @PostMapping({"/bidMaterialSupplier"})
 | 
			
		||||
   @ApiOperation("原料绑定供应商")
 | 
			
		||||
   public void bidMaterialSupplier(@RequestBody DrpBidMaterialSupplierDTO dto) {
 | 
			
		||||
      this.drpSupplierService.bidMaterialSupplier(dto);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   @PostMapping({"/getMaterialSupplierByMaterialId"})
 | 
			
		||||
//   @RequiresAuthentication
 | 
			
		||||
//   @ApiOperation("采购订单获取原料供应商")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,92 @@
 | 
			
		|||
package com.bonus.canteen.core.drp.dto;
 | 
			
		||||
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
public class DrpBidMaterialSupplierDTO {
 | 
			
		||||
   @ApiModelProperty("食堂ID")
 | 
			
		||||
   private Long canteenId;
 | 
			
		||||
   @ApiModelProperty("货品ID")
 | 
			
		||||
   private Long materialId;
 | 
			
		||||
   @ApiModelProperty("类别ID")
 | 
			
		||||
   private Long categoryId;
 | 
			
		||||
   @ApiModelProperty("供应商id")
 | 
			
		||||
   private Long supplierId;
 | 
			
		||||
   @ApiModelProperty("备选供应商列表")
 | 
			
		||||
   private String alternativeSupplier;
 | 
			
		||||
   @ApiModelProperty("货品IDList")
 | 
			
		||||
   private List<Long> materialIdList;
 | 
			
		||||
   @ApiModelProperty("类别IDList")
 | 
			
		||||
   private List<Long> categoryIdList;
 | 
			
		||||
   @ApiModelProperty("是否供应 1是 2否")
 | 
			
		||||
   private Integer ifSupply;
 | 
			
		||||
 | 
			
		||||
   public Long getCanteenId() {
 | 
			
		||||
      return this.canteenId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getMaterialId() {
 | 
			
		||||
      return this.materialId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getCategoryId() {
 | 
			
		||||
      return this.categoryId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getSupplierId() {
 | 
			
		||||
      return this.supplierId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String getAlternativeSupplier() {
 | 
			
		||||
      return this.alternativeSupplier;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public List<Long> getMaterialIdList() {
 | 
			
		||||
      return this.materialIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public List<Long> getCategoryIdList() {
 | 
			
		||||
      return this.categoryIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Integer getIfSupply() {
 | 
			
		||||
      return this.ifSupply;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCanteenId(final Long canteenId) {
 | 
			
		||||
      this.canteenId = canteenId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setMaterialId(final Long materialId) {
 | 
			
		||||
      this.materialId = materialId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCategoryId(final Long categoryId) {
 | 
			
		||||
      this.categoryId = categoryId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setSupplierId(final Long supplierId) {
 | 
			
		||||
      this.supplierId = supplierId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setAlternativeSupplier(final String alternativeSupplier) {
 | 
			
		||||
      this.alternativeSupplier = alternativeSupplier;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setMaterialIdList(final List<Long> materialIdList) {
 | 
			
		||||
      this.materialIdList = materialIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCategoryIdList(final List<Long> categoryIdList) {
 | 
			
		||||
      this.categoryIdList = categoryIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setIfSupply(final Integer ifSupply) {
 | 
			
		||||
      this.ifSupply = ifSupply;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String toString() {
 | 
			
		||||
      Long var10000 = this.getCanteenId();
 | 
			
		||||
      return "DrpBidMaterialSupplierDTO(canteenId=" + var10000 + ", materialId=" + this.getMaterialId() + ", categoryId=" + this.getCategoryId() + ", supplierId=" + this.getSupplierId() + ", alternativeSupplier=" + this.getAlternativeSupplier() + ", materialIdList=" + String.valueOf(this.getMaterialIdList()) + ", categoryIdList=" + String.valueOf(this.getCategoryIdList()) + ", ifSupply=" + this.getIfSupply() + ")";
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
package com.bonus.canteen.core.drp.dto;
 | 
			
		||||
 | 
			
		||||
import com.bonus.canteen.core.common.page.PageDTO;
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
public class DrpSupplierQueryDTO extends PageDTO {
 | 
			
		||||
   @ApiModelProperty("供应商Id")
 | 
			
		||||
   private List<Long> supplierIdList;
 | 
			
		||||
   @ApiModelProperty("供应商名称")
 | 
			
		||||
   private String supplierName;
 | 
			
		||||
   @ApiModelProperty("区域id列表")
 | 
			
		||||
   private List<Long> areaIdList;
 | 
			
		||||
 | 
			
		||||
   public List<Long> getSupplierIdList() {
 | 
			
		||||
      return this.supplierIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String getSupplierName() {
 | 
			
		||||
      return this.supplierName;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public List<Long> getAreaIdList() {
 | 
			
		||||
      return this.areaIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setSupplierIdList(final List<Long> supplierIdList) {
 | 
			
		||||
      this.supplierIdList = supplierIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setSupplierName(final String supplierName) {
 | 
			
		||||
      this.supplierName = supplierName;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setAreaIdList(final List<Long> areaIdList) {
 | 
			
		||||
      this.areaIdList = areaIdList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String toString() {
 | 
			
		||||
      String var10000 = String.valueOf(this.getSupplierIdList());
 | 
			
		||||
      return "DrpSupplierQueryDTO(supplierIdList=" + var10000 + ", supplierName=" + this.getSupplierName() + ", areaIdList=" + String.valueOf(this.getAreaIdList()) + ")";
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,23 @@
 | 
			
		|||
package com.bonus.canteen.core.drp.mapper;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpMenuMaterialSupplier;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpMaterialSupplierVO;
 | 
			
		||||
import org.apache.ibatis.annotations.Mapper;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@Mapper
 | 
			
		||||
public interface DrpMenuMaterialSupplierMapper extends BaseMapper<DrpMenuMaterialSupplier> {
 | 
			
		||||
//   List<DrpMenuMaterialSupplierDetailVO> detail(@Param("materialId") Long materialId);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpMenuMaterialSupplierCanteenVO> getSupplierByMaterialIdAndCanteenId(@Param("content") DrpMenuMaterialSupplierQueryDTO content);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpMaterialSupplierVO> getMaterialSupplierByMaterialId(@Param("materialIdList") List<Long> materialIdList);
 | 
			
		||||
//
 | 
			
		||||
//   HashSet<DrpSupplierSimpleVo> getMaterialSupplierCert(@Param("certId") Long certId, @Param("supplierIdList") List<Long> supplierIdList);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpSupplierMaterialCertVO> checkSupplierMaterialCert(@Param("content") DrpSupplierMaterialCertDTO content);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
			
		|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.bonus.canteen.core.drp.dto.DrpMaterialInfoDTO;
 | 
			
		||||
import com.bonus.canteen.core.drp.dto.DrpSupplierPageDTO;
 | 
			
		||||
import com.bonus.canteen.core.drp.dto.DrpSupplierQueryDTO;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpSupplier;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpMaterialSupplierVO;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpSupplierPageVO;
 | 
			
		||||
| 
						 | 
				
			
			@ -24,8 +25,8 @@ public interface DrpSupplierMapper extends BaseMapper<DrpSupplier> {
 | 
			
		|||
   @Select({"select a.supplier_id,a.supplier_name from drp_supplier a where a.supplier_user_id = #{userId}"})
 | 
			
		||||
   DrpSupplierVO listSupplierByUserId(@Param("userId") Long userId);
 | 
			
		||||
 | 
			
		||||
//   List<DrpSupplierVO> listSupplier(@Param("status") Integer status, @Param("delFlag") Integer delFlag, @Param("content") DrpSupplierQueryDTO content);
 | 
			
		||||
//
 | 
			
		||||
   List<DrpSupplierVO> listSupplier(@Param("status") Integer status, @Param("delFlag") Integer delFlag, @Param("content") DrpSupplierQueryDTO content);
 | 
			
		||||
 | 
			
		||||
//   List<DrpCompariseSupplierQualificationPageVO> pageCompariseSupplierQualification(@Param("content") DrpCompariseSupplierQualificationPageDTO content, @Param("delFlag") Integer delFlag);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpSupplyStatisticsPageVO> supplyStatistics(@Param("content") DrpSupplyStatisticsPageDTO content, @Param("delFlag") Integer delFlag);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,154 @@
 | 
			
		|||
package com.bonus.canteen.core.drp.model;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.FieldFill;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import io.swagger.annotations.ApiModel;
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.LocalDateTime;
 | 
			
		||||
 | 
			
		||||
@TableName("drp_menu_material_supplier")
 | 
			
		||||
@ApiModel(
 | 
			
		||||
   description = "原料绑定食堂供应商"
 | 
			
		||||
)
 | 
			
		||||
public class DrpMenuMaterialSupplier implements Serializable {
 | 
			
		||||
   private static final long serialVersionUID = 241673783169229609L;
 | 
			
		||||
   @TableId
 | 
			
		||||
   private Long id;
 | 
			
		||||
   private Long canteenId;
 | 
			
		||||
   private Long supplierId;
 | 
			
		||||
   private Long materialId;
 | 
			
		||||
   private Long categoryId;
 | 
			
		||||
   private Integer delFlag;
 | 
			
		||||
   @TableField(
 | 
			
		||||
      value = "crby",
 | 
			
		||||
      fill = FieldFill.INSERT
 | 
			
		||||
   )
 | 
			
		||||
   @ApiModelProperty("创建人")
 | 
			
		||||
   private String crby;
 | 
			
		||||
   @TableField(
 | 
			
		||||
      value = "crtime",
 | 
			
		||||
      fill = FieldFill.INSERT
 | 
			
		||||
   )
 | 
			
		||||
   @ApiModelProperty("创建时间")
 | 
			
		||||
   private LocalDateTime crtime;
 | 
			
		||||
   @TableField(
 | 
			
		||||
      value = "upby",
 | 
			
		||||
      fill = FieldFill.UPDATE
 | 
			
		||||
   )
 | 
			
		||||
   @ApiModelProperty("更新人")
 | 
			
		||||
   private String upby;
 | 
			
		||||
   @TableField(
 | 
			
		||||
      value = "uptime",
 | 
			
		||||
      fill = FieldFill.UPDATE
 | 
			
		||||
   )
 | 
			
		||||
   @ApiModelProperty("更新时间")
 | 
			
		||||
   private LocalDateTime uptime;
 | 
			
		||||
   private String alternativeSupplier;
 | 
			
		||||
   @ApiModelProperty("是否供应 1是 2否")
 | 
			
		||||
   private Integer ifSupply;
 | 
			
		||||
 | 
			
		||||
   public Long getId() {
 | 
			
		||||
      return this.id;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getCanteenId() {
 | 
			
		||||
      return this.canteenId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getSupplierId() {
 | 
			
		||||
      return this.supplierId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getMaterialId() {
 | 
			
		||||
      return this.materialId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Long getCategoryId() {
 | 
			
		||||
      return this.categoryId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Integer getDelFlag() {
 | 
			
		||||
      return this.delFlag;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String getCrby() {
 | 
			
		||||
      return this.crby;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public LocalDateTime getCrtime() {
 | 
			
		||||
      return this.crtime;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String getUpby() {
 | 
			
		||||
      return this.upby;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public LocalDateTime getUptime() {
 | 
			
		||||
      return this.uptime;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String getAlternativeSupplier() {
 | 
			
		||||
      return this.alternativeSupplier;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public Integer getIfSupply() {
 | 
			
		||||
      return this.ifSupply;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setId(final Long id) {
 | 
			
		||||
      this.id = id;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCanteenId(final Long canteenId) {
 | 
			
		||||
      this.canteenId = canteenId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setSupplierId(final Long supplierId) {
 | 
			
		||||
      this.supplierId = supplierId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setMaterialId(final Long materialId) {
 | 
			
		||||
      this.materialId = materialId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCategoryId(final Long categoryId) {
 | 
			
		||||
      this.categoryId = categoryId;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setDelFlag(final Integer delFlag) {
 | 
			
		||||
      this.delFlag = delFlag;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCrby(final String crby) {
 | 
			
		||||
      this.crby = crby;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setCrtime(final LocalDateTime crtime) {
 | 
			
		||||
      this.crtime = crtime;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setUpby(final String upby) {
 | 
			
		||||
      this.upby = upby;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setUptime(final LocalDateTime uptime) {
 | 
			
		||||
      this.uptime = uptime;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setAlternativeSupplier(final String alternativeSupplier) {
 | 
			
		||||
      this.alternativeSupplier = alternativeSupplier;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public void setIfSupply(final Integer ifSupply) {
 | 
			
		||||
      this.ifSupply = ifSupply;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   public String toString() {
 | 
			
		||||
      Long var10000 = this.getId();
 | 
			
		||||
      return "DrpMenuMaterialSupplier(id=" + var10000 + ", canteenId=" + this.getCanteenId() + ", supplierId=" + this.getSupplierId() + ", materialId=" + this.getMaterialId() + ", categoryId=" + this.getCategoryId() + ", delFlag=" + this.getDelFlag() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ", alternativeSupplier=" + this.getAlternativeSupplier() + ", ifSupply=" + this.getIfSupply() + ")";
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -6,6 +6,7 @@ import com.bonus.canteen.core.drp.dto.*;
 | 
			
		|||
import com.bonus.canteen.core.drp.model.DrpSupplier;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpMaterialSupplierVO;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpSupplierPageVO;
 | 
			
		||||
import com.bonus.canteen.core.drp.vo.DrpSupplierVO;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
| 
						 | 
				
			
			@ -21,8 +22,8 @@ public interface DrpSupplierService extends IService<DrpSupplier> {
 | 
			
		|||
 | 
			
		||||
   void editDrpSupplierStatus(DrpSupplierEditStatusDTO content);
 | 
			
		||||
 | 
			
		||||
//   List<DrpSupplierVO> listSupplier(DrpSupplierQueryDTO content);
 | 
			
		||||
//
 | 
			
		||||
   List<DrpSupplierVO> listSupplier(DrpSupplierQueryDTO content);
 | 
			
		||||
 | 
			
		||||
//   List<DrpCompariseSupplierQualificationPageVO> compariseSupplierQualification(DrpCompariseSupplierQualificationPageDTO content);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpSupplyStatisticsPageVO> supplyStatistics(DrpSupplyStatisticsPageDTO content);
 | 
			
		||||
| 
						 | 
				
			
			@ -35,8 +36,8 @@ public interface DrpSupplierService extends IService<DrpSupplier> {
 | 
			
		|||
 | 
			
		||||
   List<DrpMaterialSupplierVO> getMaterialSupplier(DrpMaterialInfoDTO content);
 | 
			
		||||
 | 
			
		||||
//   void bidMaterialSupplier(DrpBidMaterialSupplierDTO content);
 | 
			
		||||
//
 | 
			
		||||
   void bidMaterialSupplier(DrpBidMaterialSupplierDTO content);
 | 
			
		||||
 | 
			
		||||
//   List<DrpMaterialSupplierVO> getMaterialSupplierByMaterialId(List<Long> content);
 | 
			
		||||
//
 | 
			
		||||
//   List<DrpSupplierVO> listSupplierNew(DrpSupplierQueryDTO content);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,15 +13,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 | 
			
		|||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
			
		||||
import com.bonus.canteen.core.drp.api.DrpAuthorityApi;
 | 
			
		||||
import com.bonus.canteen.core.drp.constant.DrpBusinessConstants;
 | 
			
		||||
import com.bonus.canteen.core.drp.constant.DrpQuantityMainFlagEnum;
 | 
			
		||||
import com.bonus.canteen.core.drp.constant.DrpSupplierStatusEnum;
 | 
			
		||||
import com.bonus.canteen.core.drp.dto.*;
 | 
			
		||||
import com.bonus.canteen.core.drp.mapper.*;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpSupplier;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpSupplierCategory;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpSupplierDeliver;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.DrpSupplierQualification;
 | 
			
		||||
import com.bonus.canteen.core.drp.model.*;
 | 
			
		||||
import com.bonus.canteen.core.drp.po.CategoryModel;
 | 
			
		||||
import com.bonus.canteen.core.drp.po.DrpSupplierModel;
 | 
			
		||||
import com.bonus.canteen.core.drp.service.DrpSupplierCategoryService;
 | 
			
		||||
| 
						 | 
				
			
			@ -82,12 +80,12 @@ public class DrpSupplierServiceImpl extends ServiceImpl<DrpSupplierMapper, DrpSu
 | 
			
		|||
   @Autowired
 | 
			
		||||
   @Lazy
 | 
			
		||||
   private DrpMaterialWinBidRecordsMapper drpMaterialWinBidRecordsMapper;
 | 
			
		||||
//   @Autowired
 | 
			
		||||
//   @Lazy
 | 
			
		||||
//   private DrpMenuMaterialSupplierMapper drpMenuMaterialSupplierMapper;
 | 
			
		||||
//   @Autowired
 | 
			
		||||
//   @Lazy
 | 
			
		||||
//   private DrpAuthorityApi drpAuthorityApi;
 | 
			
		||||
   @Autowired
 | 
			
		||||
   @Lazy
 | 
			
		||||
   private DrpMenuMaterialSupplierMapper drpMenuMaterialSupplierMapper;
 | 
			
		||||
   @Autowired
 | 
			
		||||
   @Lazy
 | 
			
		||||
   private DrpAuthorityApi drpAuthorityApi;
 | 
			
		||||
   @Autowired
 | 
			
		||||
   @Lazy
 | 
			
		||||
   private DrpSupplierDeliverService drpSupplierDeliverService;
 | 
			
		||||
| 
						 | 
				
			
			@ -329,11 +327,11 @@ public class DrpSupplierServiceImpl extends ServiceImpl<DrpSupplierMapper, DrpSu
 | 
			
		|||
              .set(DrpSupplier::getStatus, content.getStatus()).set(DrpSupplier::getUpby, username));
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   public List<DrpSupplierVO> listSupplier(DrpSupplierQueryDTO content) {
 | 
			
		||||
//      content.setAreaIdList(this.drpAuthorityApi.authAreaList(content.getAreaIdList()));
 | 
			
		||||
//      return ((DrpSupplierMapper)this.baseMapper).listSupplier(DrpSupplierStatusEnum.NORMAL.key(), DelFlagEnum.DEL_FALSE.key(), content);
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
   public List<DrpSupplierVO> listSupplier(DrpSupplierQueryDTO content) {
 | 
			
		||||
      content.setAreaIdList(this.drpAuthorityApi.authAreaList(content.getAreaIdList()));
 | 
			
		||||
      return ((DrpSupplierMapper)this.baseMapper).listSupplier(DrpSupplierStatusEnum.NORMAL.key(), DelFlagEnum.DEL_FALSE.key(), content);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   public List<DrpCompariseSupplierQualificationPageVO> compariseSupplierQualification(DrpCompariseSupplierQualificationPageDTO content) {
 | 
			
		||||
//      List<DrpCompariseSupplierQualificationPageVO> resultList = ((DrpSupplierMapper)this.baseMapper).pageCompariseSupplierQualification(content, DelFlagEnum.DEL_FALSE.key());
 | 
			
		||||
//      Iterator var3 = resultList.iterator();
 | 
			
		||||
| 
						 | 
				
			
			@ -533,51 +531,56 @@ public class DrpSupplierServiceImpl extends ServiceImpl<DrpSupplierMapper, DrpSu
 | 
			
		|||
      return drpMaterialSupplierList;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   public void bidMaterialSupplier(DrpBidMaterialSupplierDTO content) {
 | 
			
		||||
//      if (CollUtil.isNotEmpty(content.getMaterialIdList())) {
 | 
			
		||||
//         content.getMaterialIdList().forEach((materialId) -> {
 | 
			
		||||
//            content.setMaterialId(materialId);
 | 
			
		||||
//            this.packageData(content);
 | 
			
		||||
//         });
 | 
			
		||||
//      }
 | 
			
		||||
//
 | 
			
		||||
//      if (CollUtil.isNotEmpty(content.getCategoryIdList())) {
 | 
			
		||||
//         content.getCategoryIdList().forEach((categoryId) -> {
 | 
			
		||||
//            content.setCategoryId(categoryId);
 | 
			
		||||
//            this.packageData(content);
 | 
			
		||||
//         });
 | 
			
		||||
//      } else {
 | 
			
		||||
//         this.packageData(content);
 | 
			
		||||
//      }
 | 
			
		||||
//
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
//   private void packageData(DrpBidMaterialSupplierDTO content) {
 | 
			
		||||
//      DrpMenuMaterialSupplier drpMenuMaterialSupplier = (DrpMenuMaterialSupplier)this.drpMenuMaterialSupplierMapper.selectOne(((LambdaQueryWrapper)((LambdaQueryWrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(DrpMenuMaterialSupplier.class).eq(DrpMenuMaterialSupplier::getCanteenId, content.getCanteenId())).eq(DrpMenuMaterialSupplier::getDelFlag, DelFlagEnum.DEL_FALSE.key())).eq(ObjectUtil.isNotNull(content.getMaterialId()), DrpMenuMaterialSupplier::getMaterialId, content.getMaterialId())).eq(ObjectUtil.isNotNull(content.getCategoryId()), DrpMenuMaterialSupplier::getCategoryId, content.getCategoryId()));
 | 
			
		||||
//      if (ObjectUtil.isEmpty(drpMenuMaterialSupplier)) {
 | 
			
		||||
//         drpMenuMaterialSupplier = new DrpMenuMaterialSupplier();
 | 
			
		||||
//         drpMenuMaterialSupplier.setId(Id.next());
 | 
			
		||||
//         drpMenuMaterialSupplier.setSupplierId(content.getSupplierId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setCanteenId(content.getCanteenId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setMaterialId(content.getMaterialId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setCategoryId(content.getCategoryId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setDelFlag(DelFlagEnum.DEL_FALSE.key());
 | 
			
		||||
//         drpMenuMaterialSupplier.setAlternativeSupplier(content.getAlternativeSupplier());
 | 
			
		||||
//         drpMenuMaterialSupplier.setIfSupply(content.getIfSupply());
 | 
			
		||||
//         this.drpMenuMaterialSupplierMapper.insert(drpMenuMaterialSupplier);
 | 
			
		||||
//      } else {
 | 
			
		||||
//         drpMenuMaterialSupplier.setSupplierId(content.getSupplierId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setMaterialId(content.getMaterialId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setCanteenId(content.getCanteenId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setCategoryId(content.getCategoryId());
 | 
			
		||||
//         drpMenuMaterialSupplier.setDelFlag(DelFlagEnum.DEL_FALSE.key());
 | 
			
		||||
//         drpMenuMaterialSupplier.setAlternativeSupplier(content.getAlternativeSupplier());
 | 
			
		||||
//         drpMenuMaterialSupplier.setIfSupply(content.getIfSupply());
 | 
			
		||||
//         this.drpMenuMaterialSupplierMapper.updateById(drpMenuMaterialSupplier);
 | 
			
		||||
//      }
 | 
			
		||||
//
 | 
			
		||||
//   }
 | 
			
		||||
//
 | 
			
		||||
   public void bidMaterialSupplier(DrpBidMaterialSupplierDTO content) {
 | 
			
		||||
      if (CollUtil.isNotEmpty(content.getMaterialIdList())) {
 | 
			
		||||
         content.getMaterialIdList().forEach((materialId) -> {
 | 
			
		||||
            content.setMaterialId(materialId);
 | 
			
		||||
            this.packageData(content);
 | 
			
		||||
         });
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (CollUtil.isNotEmpty(content.getCategoryIdList())) {
 | 
			
		||||
         content.getCategoryIdList().forEach((categoryId) -> {
 | 
			
		||||
            content.setCategoryId(categoryId);
 | 
			
		||||
            this.packageData(content);
 | 
			
		||||
         });
 | 
			
		||||
      } else {
 | 
			
		||||
         this.packageData(content);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   private void packageData(DrpBidMaterialSupplierDTO content) {
 | 
			
		||||
      DrpMenuMaterialSupplier drpMenuMaterialSupplier = (DrpMenuMaterialSupplier)this.drpMenuMaterialSupplierMapper
 | 
			
		||||
                      .selectOne(Wrappers.lambdaQuery(DrpMenuMaterialSupplier.class)
 | 
			
		||||
                     .eq(DrpMenuMaterialSupplier::getCanteenId, content.getCanteenId())
 | 
			
		||||
                     .eq(DrpMenuMaterialSupplier::getDelFlag, DelFlagEnum.DEL_FALSE.key())
 | 
			
		||||
                     .eq(ObjectUtil.isNotNull(content.getMaterialId()), DrpMenuMaterialSupplier::getMaterialId, content.getMaterialId())
 | 
			
		||||
                     .eq(ObjectUtil.isNotNull(content.getCategoryId()), DrpMenuMaterialSupplier::getCategoryId, content.getCategoryId()));
 | 
			
		||||
      if (ObjectUtil.isEmpty(drpMenuMaterialSupplier)) {
 | 
			
		||||
         drpMenuMaterialSupplier = new DrpMenuMaterialSupplier();
 | 
			
		||||
         drpMenuMaterialSupplier.setId(Id.next());
 | 
			
		||||
         drpMenuMaterialSupplier.setSupplierId(content.getSupplierId());
 | 
			
		||||
         drpMenuMaterialSupplier.setCanteenId(content.getCanteenId());
 | 
			
		||||
         drpMenuMaterialSupplier.setMaterialId(content.getMaterialId());
 | 
			
		||||
         drpMenuMaterialSupplier.setCategoryId(content.getCategoryId());
 | 
			
		||||
         drpMenuMaterialSupplier.setDelFlag(DelFlagEnum.DEL_FALSE.key());
 | 
			
		||||
         drpMenuMaterialSupplier.setAlternativeSupplier(content.getAlternativeSupplier());
 | 
			
		||||
         drpMenuMaterialSupplier.setIfSupply(content.getIfSupply());
 | 
			
		||||
         this.drpMenuMaterialSupplierMapper.insert(drpMenuMaterialSupplier);
 | 
			
		||||
      } else {
 | 
			
		||||
         drpMenuMaterialSupplier.setSupplierId(content.getSupplierId());
 | 
			
		||||
         drpMenuMaterialSupplier.setMaterialId(content.getMaterialId());
 | 
			
		||||
         drpMenuMaterialSupplier.setCanteenId(content.getCanteenId());
 | 
			
		||||
         drpMenuMaterialSupplier.setCategoryId(content.getCategoryId());
 | 
			
		||||
         drpMenuMaterialSupplier.setDelFlag(DelFlagEnum.DEL_FALSE.key());
 | 
			
		||||
         drpMenuMaterialSupplier.setAlternativeSupplier(content.getAlternativeSupplier());
 | 
			
		||||
         drpMenuMaterialSupplier.setIfSupply(content.getIfSupply());
 | 
			
		||||
         this.drpMenuMaterialSupplierMapper.updateById(drpMenuMaterialSupplier);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
//   public List<DrpMaterialSupplierVO> getMaterialSupplierByMaterialId(List<Long> materialIdList) {
 | 
			
		||||
//      return this.drpMenuMaterialSupplierMapper.getMaterialSupplierByMaterialId(materialIdList);
 | 
			
		||||
//   }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -290,28 +290,29 @@
 | 
			
		|||
<!--            </foreach>-->
 | 
			
		||||
<!--        </if>-->
 | 
			
		||||
<!--    </select>-->
 | 
			
		||||
<!--    <select id="listSupplier" resultType="net.xnzn.core.drp.vo.DrpSupplierVO">-->
 | 
			
		||||
<!--        SELECT-->
 | 
			
		||||
<!--        ds.supplier_id,-->
 | 
			
		||||
<!--        ds.supplier_name,-->
 | 
			
		||||
<!--        ds.supplier_score,-->
 | 
			
		||||
<!--        ds.area_id,-->
 | 
			
		||||
<!--        aa.area_name-->
 | 
			
		||||
<!--        FROM-->
 | 
			
		||||
<!--        drp_supplier ds-->
 | 
			
		||||
<!--        LEFT JOIN alloc_area aa ON aa.area_id = ds.area_id-->
 | 
			
		||||
<!--        where ds.status = #{status}-->
 | 
			
		||||
<!--        and ds.del_flag = #{delFlag}-->
 | 
			
		||||
<!--        <if test="content.areaIdList != null and content.areaIdList.size() > 0">-->
 | 
			
		||||
<!--            and ds.area_id in-->
 | 
			
		||||
<!--            <foreach collection="content.areaIdList" item="item" separator="," open="(" close=")">-->
 | 
			
		||||
<!--                #{item}-->
 | 
			
		||||
<!--            </foreach>-->
 | 
			
		||||
<!--        </if>-->
 | 
			
		||||
<!--        <if test="content.supplierName != null and content.supplierName != ''">-->
 | 
			
		||||
<!--            and ds.supplier_name like concat('%',#{content.supplierName},'%')-->
 | 
			
		||||
<!--        </if>-->
 | 
			
		||||
<!--    </select>-->
 | 
			
		||||
 | 
			
		||||
    <select id="listSupplier" resultType="com.bonus.canteen.core.drp.vo.DrpSupplierVO">
 | 
			
		||||
        SELECT
 | 
			
		||||
        ds.supplier_id,
 | 
			
		||||
        ds.supplier_name,
 | 
			
		||||
        ds.supplier_score,
 | 
			
		||||
        ds.area_id,
 | 
			
		||||
        aa.area_name
 | 
			
		||||
        FROM
 | 
			
		||||
        drp_supplier ds
 | 
			
		||||
        LEFT JOIN alloc_area aa ON aa.area_id = ds.area_id
 | 
			
		||||
        where ds.status = #{status}
 | 
			
		||||
        and ds.del_flag = #{delFlag}
 | 
			
		||||
        <if test="content.areaIdList != null and content.areaIdList.size() > 0">
 | 
			
		||||
            and ds.area_id in
 | 
			
		||||
            <foreach collection="content.areaIdList" item="item" separator="," open="(" close=")">
 | 
			
		||||
                #{item}
 | 
			
		||||
            </foreach>
 | 
			
		||||
        </if>
 | 
			
		||||
        <if test="content.supplierName != null and content.supplierName != ''">
 | 
			
		||||
            and ds.supplier_name like concat('%',#{content.supplierName},'%')
 | 
			
		||||
        </if>
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="getCategorySupplier" resultType="com.bonus.canteen.core.drp.vo.DrpMaterialSupplierVO"
 | 
			
		||||
            parameterType="com.bonus.canteen.core.drp.dto.DrpMaterialInfoDTO">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue