Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6f050ec0f9
|
|
@ -2,6 +2,9 @@ package com.bonus.canteen.core.ims.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.ims.dto.SupplierQualificationPageDTO;
|
||||||
|
import com.bonus.canteen.core.ims.vo.SupplierQualificationExpireVO;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
|
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -116,4 +119,17 @@ public class SupplierQualificationController extends BaseController {
|
||||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||||
return toAjax(supplierQualificationService.deleteSupplierQualificationByIds(ids));
|
return toAjax(supplierQualificationService.deleteSupplierQualificationByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询供应商资质列表")
|
||||||
|
//@RequiresPermissions("ims:qualification:list")
|
||||||
|
@GetMapping("/early_warning")
|
||||||
|
public TableDataInfo earlyWarning(SupplierQualificationPageDTO supplierQualification) {
|
||||||
|
startPage();
|
||||||
|
List<SupplierQualificationExpireVO> list = supplierQualificationService.earlyWarning(supplierQualification);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class SupplierAddDTO {
|
||||||
@ApiModelProperty("主要联系人")
|
@ApiModelProperty("主要联系人")
|
||||||
private String linkman;
|
private String linkman;
|
||||||
@ApiModelProperty("主要联系人电话")
|
@ApiModelProperty("主要联系人电话")
|
||||||
private String linkmanNumber;
|
private String linkmanPhone;
|
||||||
@ApiModelProperty("主要邮箱")
|
@ApiModelProperty("主要邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
@ApiModelProperty("主要微信号")
|
@ApiModelProperty("主要微信号")
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ public class SupplierQualificationAddDTO {
|
||||||
@ApiModelProperty("资质类型(1-营业执照,2-ISO9001国际质量体系认证,3-食品经营许可证,4-烟草经营许可证,5-HACCP认证)")
|
@ApiModelProperty("资质类型(1-营业执照,2-ISO9001国际质量体系认证,3-食品经营许可证,4-烟草经营许可证,5-HACCP认证)")
|
||||||
private Long qualificationType;
|
private Long qualificationType;
|
||||||
@ApiModelProperty("有效期")
|
@ApiModelProperty("有效期")
|
||||||
private LocalDate validity;
|
private LocalDate expirationDate;
|
||||||
@ApiModelProperty("资质照片")
|
@ApiModelProperty("资质照片")
|
||||||
private String imgUrl;
|
private String imgUrl;
|
||||||
@ApiModelProperty("主次(1主,2次)")
|
@ApiModelProperty("主次(1主,2次)")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.bonus.canteen.core.ims.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SupplierQualificationPageDTO {
|
||||||
|
@ApiModelProperty("当前页")
|
||||||
|
private Long current;
|
||||||
|
@ApiModelProperty("每页显示条数")
|
||||||
|
private Long size;
|
||||||
|
@ApiModelProperty("资质编号")
|
||||||
|
private String qualificationCode;
|
||||||
|
@ApiModelProperty("资质名称")
|
||||||
|
private String qualificationName;
|
||||||
|
@ApiModelProperty("供应商id")
|
||||||
|
private Long supplierId;
|
||||||
|
@ApiModelProperty("主次资质类型")
|
||||||
|
private Integer mainFlag;
|
||||||
|
@ApiModelProperty("小于30,1是 2否")
|
||||||
|
private Integer isLessThanMonth;
|
||||||
|
@ApiModelProperty("区域id列表")
|
||||||
|
private List<Long> areaIdList;
|
||||||
|
|
||||||
|
public Long getCurrent() {
|
||||||
|
return this.current;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSize() {
|
||||||
|
return this.size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualificationCode() {
|
||||||
|
return this.qualificationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQualificationName() {
|
||||||
|
return this.qualificationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSupplierId() {
|
||||||
|
return this.supplierId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMainFlag() {
|
||||||
|
return this.mainFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsLessThanMonth() {
|
||||||
|
return this.isLessThanMonth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Long> getAreaIdList() {
|
||||||
|
return this.areaIdList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setCurrent(final Long current) {
|
||||||
|
this.current = current;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setSize(final Long size) {
|
||||||
|
this.size = size;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setQualificationNum(final String qualificationCode) {
|
||||||
|
this.qualificationCode = qualificationCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setQualificationName(final String qualificationName) {
|
||||||
|
this.qualificationName = qualificationName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setSupplierId(final Long supplierId) {
|
||||||
|
this.supplierId = supplierId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setMainFlag(final Integer mainFlag) {
|
||||||
|
this.mainFlag = mainFlag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setIsLessThanMonth(final Integer isLessThanMonth) {
|
||||||
|
this.isLessThanMonth = isLessThanMonth;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SupplierQualificationPageDTO setAreaIdList(final List<Long> areaIdList) {
|
||||||
|
this.areaIdList = areaIdList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.bonus.canteen.core.ims.enums;
|
||||||
|
|
||||||
|
public enum SupplierQualificationEnum {
|
||||||
|
BUSINE(1, "营业执照"),
|
||||||
|
ISO(2, "ISO9001国际质量体系认证"),
|
||||||
|
FOOD(3, "食品经营许可证"),
|
||||||
|
SMOKE(4, "烟草经营许可证"),
|
||||||
|
HACCP(5, "HACCP认证");
|
||||||
|
|
||||||
|
|
||||||
|
private final Integer key;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
private SupplierQualificationEnum(Integer key, String desc) {
|
||||||
|
this.key = key;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
public Integer getKey() {
|
||||||
|
return this.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return this.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,9 @@ package com.bonus.canteen.core.ims.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.canteen.core.ims.domain.SupplierQualification;
|
import com.bonus.canteen.core.ims.domain.SupplierQualification;
|
||||||
|
import com.bonus.canteen.core.ims.dto.SupplierQualificationPageDTO;
|
||||||
|
import com.bonus.canteen.core.ims.vo.SupplierQualificationExpireVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商资质Mapper接口
|
* 供应商资质Mapper接口
|
||||||
|
|
@ -59,4 +62,6 @@ public interface SupplierQualificationMapper {
|
||||||
public int deleteSupplierQualificationByIds(Long[] ids);
|
public int deleteSupplierQualificationByIds(Long[] ids);
|
||||||
|
|
||||||
void deleteSupplierQualificationBySupplierId(Long supplierId);
|
void deleteSupplierQualificationBySupplierId(Long supplierId);
|
||||||
|
|
||||||
|
List<SupplierQualificationExpireVO> earlyWarning(@Param("content") SupplierQualificationPageDTO content);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.ims.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.bonus.canteen.core.ims.domain.SupplierQualification;
|
import com.bonus.canteen.core.ims.domain.SupplierQualification;
|
||||||
|
import com.bonus.canteen.core.ims.dto.SupplierQualificationPageDTO;
|
||||||
|
import com.bonus.canteen.core.ims.vo.SupplierQualificationExpireVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商资质Service接口
|
* 供应商资质Service接口
|
||||||
|
|
@ -59,4 +61,6 @@ public interface ISupplierQualificationService {
|
||||||
public int deleteSupplierQualificationById(Long id);
|
public int deleteSupplierQualificationById(Long id);
|
||||||
|
|
||||||
void deleteSupplierQualificationBySupplierId(Long supplierId);
|
void deleteSupplierQualificationBySupplierId(Long supplierId);
|
||||||
|
|
||||||
|
List<SupplierQualificationExpireVO> earlyWarning(SupplierQualificationPageDTO supplierQualification);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,11 @@
|
||||||
package com.bonus.canteen.core.ims.service.impl;
|
package com.bonus.canteen.core.ims.service.impl;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.bonus.canteen.core.ims.dto.SupplierQualificationPageDTO;
|
||||||
|
import com.bonus.canteen.core.ims.vo.SupplierQualificationExpireVO;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -100,4 +105,18 @@ public class SupplierQualificationServiceImpl implements ISupplierQualificationS
|
||||||
public void deleteSupplierQualificationBySupplierId(Long supplierId) {
|
public void deleteSupplierQualificationBySupplierId(Long supplierId) {
|
||||||
supplierQualificationMapper.deleteSupplierQualificationBySupplierId(supplierId);
|
supplierQualificationMapper.deleteSupplierQualificationBySupplierId(supplierId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SupplierQualificationExpireVO> earlyWarning(SupplierQualificationPageDTO supplierQualification) {
|
||||||
|
List<SupplierQualificationExpireVO> list = supplierQualificationMapper.earlyWarning(supplierQualification);
|
||||||
|
if(list !=null && list.size() >0 ) {
|
||||||
|
list.forEach(item->{
|
||||||
|
if(item.getExpirationDate() !=null){
|
||||||
|
Duration duration = Duration.between(LocalDateTime.now(), item.getExpirationDate().atStartOfDay());
|
||||||
|
item.setExpireDays(duration.toDays());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.bonus.canteen.core.ims.vo.SupplierQualificationDetailPageVO;
|
||||||
import com.bonus.canteen.core.kitchen.domain.KitchenDeviceInfo;
|
import com.bonus.canteen.core.kitchen.domain.KitchenDeviceInfo;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
|
import com.bonus.common.core.utils.StringUtils;
|
||||||
import com.bonus.common.houqin.constant.DelFlagEnum;
|
import com.bonus.common.houqin.constant.DelFlagEnum;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public class SupplierPageVO {
|
||||||
@ApiModelProperty("供应商id")
|
@ApiModelProperty("供应商id")
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
@ApiModelProperty("供应商编号")
|
@ApiModelProperty("供应商编号")
|
||||||
private String supplierNum;
|
private String supplierCode;
|
||||||
@ApiModelProperty("供应商名称")
|
@ApiModelProperty("供应商名称")
|
||||||
private String supplierName;
|
private String supplierName;
|
||||||
@ApiModelProperty("区域id")
|
@ApiModelProperty("区域id")
|
||||||
|
|
@ -30,7 +30,7 @@ public class SupplierPageVO {
|
||||||
@ApiModelProperty("主要联系人")
|
@ApiModelProperty("主要联系人")
|
||||||
private String linkman;
|
private String linkman;
|
||||||
@ApiModelProperty("主要联系人电话")
|
@ApiModelProperty("主要联系人电话")
|
||||||
private String linkmanNumber;
|
private String linkmanPhone;
|
||||||
@ApiModelProperty("主要邮箱")
|
@ApiModelProperty("主要邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
@ApiModelProperty("主要微信号")
|
@ApiModelProperty("主要微信号")
|
||||||
|
|
@ -148,8 +148,8 @@ public class SupplierPageVO {
|
||||||
return this.supplierId;
|
return this.supplierId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSupplierNum() {
|
public String getSupplierCode() {
|
||||||
return this.supplierNum;
|
return this.supplierCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSupplierName() {
|
public String getSupplierName() {
|
||||||
|
|
@ -173,7 +173,7 @@ public class SupplierPageVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLinkmanNumber() {
|
public String getLinkmanNumber() {
|
||||||
return this.linkmanNumber;
|
return this.linkmanPhone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
|
|
@ -344,8 +344,8 @@ public class SupplierPageVO {
|
||||||
this.supplierId = supplierId;
|
this.supplierId = supplierId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSupplierNum(final String supplierNum) {
|
public void setSupplierCode(final String supplierCode) {
|
||||||
this.supplierNum = supplierNum;
|
this.supplierCode = supplierCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSupplierName(final String supplierName) {
|
public void setSupplierName(final String supplierName) {
|
||||||
|
|
@ -368,8 +368,8 @@ public class SupplierPageVO {
|
||||||
this.linkman = linkman;
|
this.linkman = linkman;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLinkmanNumber(final String linkmanNumber) {
|
public void setLinkmanNumber(final String linkmanPhone) {
|
||||||
this.linkmanNumber = linkmanNumber;
|
this.linkmanPhone = linkmanPhone;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(final String email) {
|
public void setEmail(final String email) {
|
||||||
|
|
@ -548,8 +548,61 @@ public class SupplierPageVO {
|
||||||
this.attachmentList = attachmentList;
|
this.attachmentList = attachmentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
Long var10000 = this.getSupplierId();
|
return "SupplierPageVO{" +
|
||||||
return "DrpSupplierPageVO(supplierId=" + var10000 + ", supplierNum=" + this.getSupplierNum() + ", supplierName=" + this.getSupplierName() + ", areaId=" + this.getAreaId() + ", areaName=" + this.getAreaName() + ", address=" + this.getAddress() + ", linkman=" + this.getLinkman() + ", linkmanNumber=" + this.getLinkmanNumber() + ", email=" + this.getEmail() + ", wechat=" + this.getWechat() + ", openingBank=" + this.getOpeningBank() + ", bankAccount=" + this.getBankAccount() + ", supplierSimpleName=" + this.getSupplierSimpleName() + ", telephone=" + this.getTelephone() + ", companyWeb=" + this.getCompanyWeb() + ", regionProvince=" + this.getRegionProvince() + ", regionCity=" + this.getRegionCity() + ", regionDistrict=" + this.getRegionDistrict() + ", taxRate=" + this.getTaxRate() + ", paymentDays=" + this.getPaymentDays() + ", standbyLinkman=" + this.getStandbyLinkman() + ", standbyPhone=" + this.getStandbyPhone() + ", standbyWechat=" + this.getStandbyWechat() + ", standbyEmail=" + this.getStandbyEmail() + ", categoryModelList=" + String.valueOf(this.getCategoryModelList()) + ", registFund=" + String.valueOf(this.getRegistFund()) + ", establishDate=" + String.valueOf(this.getEstablishDate()) + ", workersNum=" + this.getWorkersNum() + ", clientNum=" + this.getClientNum() + ", lastYearOperatingIncome=" + String.valueOf(this.getLastYearOperatingIncome()) + ", beforeYearOperatingIncome=" + String.valueOf(this.getBeforeYearOperatingIncome()) + ", businessScope=" + this.getBusinessScope() + ", topFiveClient=" + this.getTopFiveClient() + ", topFiveSupplier=" + this.getTopFiveSupplier() + ", companyIntroduction=" + this.getCompanyIntroduction() + ", mainAdvantage=" + this.getMainAdvantage() + ", ifReceiveNotice=" + this.getIfReceiveNotice() + ", noticeStyle=" + this.getNoticeStyle() + ", supplierUserId=" + this.getSupplierUserId() + ", status=" + this.getStatus() + ", supplierScore=" + String.valueOf(this.getSupplierScore()) + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ", idCardImgZ=" + this.getIdCardImgZ() + ", idCardImgF=" + this.getIdCardImgF() + ", attachment=" + this.getAttachment() + ", mainQualificationList=" + String.valueOf(this.getMainQualificationList()) + ", otherQualificationList=" + String.valueOf(this.getOtherQualificationList()) + ", deliverVOList=" + String.valueOf(this.getDeliverVOList()) + ", attachmentList=" + String.valueOf(this.getAttachmentList()) + ")";
|
"supplierId=" + supplierId +
|
||||||
|
", supplierCode='" + supplierCode + '\'' +
|
||||||
|
", supplierName='" + supplierName + '\'' +
|
||||||
|
", areaId=" + areaId +
|
||||||
|
", areaName='" + areaName + '\'' +
|
||||||
|
", address='" + address + '\'' +
|
||||||
|
", linkman='" + linkman + '\'' +
|
||||||
|
", linkmanPhone='" + linkmanPhone + '\'' +
|
||||||
|
", email='" + email + '\'' +
|
||||||
|
", wechat='" + wechat + '\'' +
|
||||||
|
", openingBank='" + openingBank + '\'' +
|
||||||
|
", bankAccount='" + bankAccount + '\'' +
|
||||||
|
", supplierSimpleName='" + supplierSimpleName + '\'' +
|
||||||
|
", telephone='" + telephone + '\'' +
|
||||||
|
", companyWeb='" + companyWeb + '\'' +
|
||||||
|
", regionProvince='" + regionProvince + '\'' +
|
||||||
|
", regionCity='" + regionCity + '\'' +
|
||||||
|
", regionDistrict='" + regionDistrict + '\'' +
|
||||||
|
", taxRate=" + taxRate +
|
||||||
|
", paymentDays=" + paymentDays +
|
||||||
|
", standbyLinkman='" + standbyLinkman + '\'' +
|
||||||
|
", standbyPhone='" + standbyPhone + '\'' +
|
||||||
|
", standbyWechat='" + standbyWechat + '\'' +
|
||||||
|
", standbyEmail='" + standbyEmail + '\'' +
|
||||||
|
", categoryModelList=" + categoryModelList +
|
||||||
|
", registFund=" + registFund +
|
||||||
|
", establishDate=" + establishDate +
|
||||||
|
", workersNum=" + workersNum +
|
||||||
|
", clientNum=" + clientNum +
|
||||||
|
", lastYearOperatingIncome=" + lastYearOperatingIncome +
|
||||||
|
", beforeYearOperatingIncome=" + beforeYearOperatingIncome +
|
||||||
|
", businessScope='" + businessScope + '\'' +
|
||||||
|
", topFiveClient='" + topFiveClient + '\'' +
|
||||||
|
", topFiveSupplier='" + topFiveSupplier + '\'' +
|
||||||
|
", companyIntroduction='" + companyIntroduction + '\'' +
|
||||||
|
", mainAdvantage='" + mainAdvantage + '\'' +
|
||||||
|
", ifReceiveNotice=" + ifReceiveNotice +
|
||||||
|
", noticeStyle=" + noticeStyle +
|
||||||
|
", supplierUserId=" + supplierUserId +
|
||||||
|
", status=" + status +
|
||||||
|
", supplierScore=" + supplierScore +
|
||||||
|
", crby='" + crby + '\'' +
|
||||||
|
", crtime=" + crtime +
|
||||||
|
", upby='" + upby + '\'' +
|
||||||
|
", uptime=" + uptime +
|
||||||
|
", idCardImgZ='" + idCardImgZ + '\'' +
|
||||||
|
", idCardImgF='" + idCardImgF + '\'' +
|
||||||
|
", attachment='" + attachment + '\'' +
|
||||||
|
", mainQualificationList=" + mainQualificationList +
|
||||||
|
", otherQualificationList=" + otherQualificationList +
|
||||||
|
", deliverVOList=" + deliverVOList +
|
||||||
|
", attachmentList=" + attachmentList +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.bonus.canteen.core.ims.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SupplierQualificationExpireVO {
|
||||||
|
@ApiModelProperty("资质编号")
|
||||||
|
private String qualificationCode;
|
||||||
|
@ApiModelProperty("资质名称")
|
||||||
|
private String qualificationName;
|
||||||
|
@ApiModelProperty("有效期")
|
||||||
|
private LocalDate expirationDate;
|
||||||
|
@ApiModelProperty("资质照片")
|
||||||
|
private String imgUrl;
|
||||||
|
@ApiModelProperty("供应商id")
|
||||||
|
private Long supplierId;
|
||||||
|
@ApiModelProperty("供应商编号")
|
||||||
|
private String supplierCode;
|
||||||
|
@ApiModelProperty("主次(1主,2次)")
|
||||||
|
private Integer mainFlag;
|
||||||
|
@ApiModelProperty("供应商")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("区域id")
|
||||||
|
private Long areaId;
|
||||||
|
@ApiModelProperty("区域名称")
|
||||||
|
private String areaName;
|
||||||
|
@ApiModelProperty("主要联系人")
|
||||||
|
private String linkman;
|
||||||
|
@ApiModelProperty("主要联系人电话")
|
||||||
|
private String linkmanPhone;
|
||||||
|
@ApiModelProperty("临期天数")
|
||||||
|
private Long expireDays;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -88,7 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mmc.material_type_name as categoryName
|
mmc.material_type_name as categoryName
|
||||||
FROM
|
FROM
|
||||||
ims_supplier_category dsc
|
ims_supplier_category dsc
|
||||||
LEFT JOIN cook_material_type mmc ON dsc.category_id = mmc.material_type_id and mmc.`level` =2
|
LEFT JOIN cook_material_type mmc ON dsc.category_id = mmc.material_type_id
|
||||||
where dsc.supplier_id = #{supplierId}
|
where dsc.supplier_id = #{supplierId}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -107,4 +107,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<delete id="deleteSupplierQualificationBySupplierId">
|
<delete id="deleteSupplierQualificationBySupplierId">
|
||||||
delete from ims_supplier_qualification where supplier_id = #{supplierId}
|
delete from ims_supplier_qualification where supplier_id = #{supplierId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="earlyWarning" resultType="com.bonus.canteen.core.ims.vo.SupplierQualificationExpireVO">
|
||||||
|
SELECT
|
||||||
|
ds.supplier_id,
|
||||||
|
ds.supplier_code,
|
||||||
|
ds.supplier_name,
|
||||||
|
ds.area_id,
|
||||||
|
aa.area_name,
|
||||||
|
ds.linkman,
|
||||||
|
ds.linkman_phone,
|
||||||
|
dsq.qualification_code,
|
||||||
|
dsq.qualification_name,
|
||||||
|
dsq.main_flag,
|
||||||
|
dsq.expiration_date,
|
||||||
|
dsq.img_url
|
||||||
|
FROM
|
||||||
|
ims_supplier_qualification dsq
|
||||||
|
LEFT JOIN ims_supplier ds ON ds.supplier_id = dsq.supplier_id
|
||||||
|
LEFT JOIN basic_area aa on ds.area_id = aa.area_id
|
||||||
|
<where>
|
||||||
|
<if test="content.qualificationCode != null and content.qualificationCode != '' ">
|
||||||
|
and dsq.qualification_code like concat('%', #{content.qualificationCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="content.qualificationName != null and content.qualificationName != '' ">
|
||||||
|
and dsq.qualification_name like concat('%', #{content.qualificationName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="content.supplierId != null and content.supplierId != '' ">
|
||||||
|
and ds.supplier_id = #{content.supplierId}
|
||||||
|
</if>
|
||||||
|
<if test="content.isLessThanMonth != null and content.isLessThanMonth != '' ">
|
||||||
|
<if test="content.isLessThanMonth == 1 ">
|
||||||
|
and (DATEDIFF(dsq.expiration_date, now())) <![CDATA[<]]> 30
|
||||||
|
</if>
|
||||||
|
<if test="content.isLessThanMonth == 2 ">
|
||||||
|
and (DATEDIFF(dsq.expiration_date, now())) <![CDATA[>=]]> 30
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
<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>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue