供应链问题修复
This commit is contained in:
parent
df10f63647
commit
9cf676d4a9
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.ims.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
|
|
@ -141,6 +143,12 @@ public class ImsInventoryController extends BaseController
|
|||
@ApiOperation("过期预警")
|
||||
public TableDataInfo expireWarning(ExpireWarningDTO content) {
|
||||
startPage();
|
||||
if(content !=null && content.getAreaId() != null ) {
|
||||
content.setAreaIdList(Collections.singletonList(content.getAreaId()));
|
||||
}
|
||||
if(content !=null && content.getWarehouseId() != null ) {
|
||||
content.setWarehouseIdList(Collections.singletonList(content.getWarehouseId()));
|
||||
}
|
||||
List<ExpireWarningVO> inventoryWarningList = this.imsInventoryService.expireWarning(content);
|
||||
return getDataTable(inventoryWarningList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
package com.bonus.canteen.core.ims.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 供应商资质对象 ims_supplier_qualification
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
|
|
@ -50,15 +53,16 @@ public class SupplierQualification extends BaseEntity {
|
|||
private Long certId;
|
||||
|
||||
/** 资质照片 */
|
||||
@Getter
|
||||
@Excel(name = "资质照片")
|
||||
@ApiModelProperty(value = "资质照片")
|
||||
private String imgUrl;
|
||||
|
||||
/** 有效期 */
|
||||
@ApiModelProperty(value = "有效期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date expirationDate;
|
||||
private String expirationDate;
|
||||
|
||||
/** 主次(1主,2次) */
|
||||
@Excel(name = "主次(1主,2次)")
|
||||
|
|
@ -66,4 +70,7 @@ public class SupplierQualification extends BaseEntity {
|
|||
private Long mainFlag;
|
||||
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = FileUrlUtil.getFileUrl(imgUrl);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
|||
import lombok.ToString;
|
||||
import org.checkerframework.checker.units.qual.N;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
|
@ -62,6 +63,7 @@ public class ImsIntoInventoryDetailAdd implements Serializable
|
|||
@ApiModelProperty(value = "单价")
|
||||
@NotNull(message = "单价不能为空")
|
||||
@Min(value = 0, message = "单价不能小于0")
|
||||
@Max(value = 9999, message = "单价不能大于9999")
|
||||
private Long unitPrice;
|
||||
|
||||
/** 总价 */
|
||||
|
|
@ -78,6 +80,7 @@ public class ImsIntoInventoryDetailAdd implements Serializable
|
|||
@ApiModelProperty(value = "入库合格数量")
|
||||
@NotNull(message = "入库合格数量不能为空")
|
||||
@Min(value = 0, message = "入库合格数量不能小于0")
|
||||
@Max(value = 9999, message = "入库合格数量不能大于9999")
|
||||
private BigDecimal purNum;
|
||||
|
||||
/** 不合格数量 */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.bonus.canteen.core.ims.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* 供应商类目关联对象 ims_supplier_category
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-06-30
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class SupplierCategoryAndSupplier extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
private Long id;
|
||||
|
||||
/** 供应商id */
|
||||
@Excel(name = "供应商id")
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@Excel(name = "供应商名称")
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/** 类目id */
|
||||
@Excel(name = "类目id")
|
||||
@ApiModelProperty(value = "类目id")
|
||||
private Long categoryId;
|
||||
|
||||
@Excel(name = "类目名称")
|
||||
@ApiModelProperty(value = "类目名称")
|
||||
private String materialName;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,28 @@ public class ExpireWarningDTO {
|
|||
@ApiModelProperty("导出字段")
|
||||
private List<String> exportCols;
|
||||
|
||||
@ApiModelProperty("区域id")
|
||||
private Long areaId;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
|
||||
public Long getWarehouseId() {
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(Long warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public Long getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(Long areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return this.materialName;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class SupplierEditDTO {
|
|||
@ApiModelProperty("主要联系人")
|
||||
private String linkman;
|
||||
@ApiModelProperty("主要联系人电话")
|
||||
private String linkmanNumber;
|
||||
private String linkmanPhone;
|
||||
@ApiModelProperty("主要邮箱")
|
||||
private String email;
|
||||
@ApiModelProperty("主要微信号")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public class SupplierQualificationAddDTO {
|
|||
@ApiModelProperty("资质类型(1-营业执照,2-ISO9001国际质量体系认证,3-食品经营许可证,4-烟草经营许可证,5-HACCP认证)")
|
||||
private Long qualificationType;
|
||||
@ApiModelProperty("有效期")
|
||||
private LocalDate expirationDate;
|
||||
private String expirationDate;
|
||||
@ApiModelProperty("资质照片")
|
||||
private String imgUrl;
|
||||
@ApiModelProperty("主次(1主,2次)")
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ public class SupplierQualificationPageDTO {
|
|||
private String qualificationName;
|
||||
@ApiModelProperty("供应商id")
|
||||
private Long supplierId;
|
||||
@ApiModelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
@ApiModelProperty("主次资质类型")
|
||||
private Integer mainFlag;
|
||||
@ApiModelProperty("小于30,1是 2否")
|
||||
|
|
@ -22,6 +24,29 @@ public class SupplierQualificationPageDTO {
|
|||
@ApiModelProperty("区域id列表")
|
||||
private List<Long> areaIdList;
|
||||
|
||||
@ApiModelProperty("区域id")
|
||||
private Long areaId;
|
||||
|
||||
public Long getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(Long areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public void setQualificationCode(String qualificationCode) {
|
||||
this.qualificationCode = qualificationCode;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public Long getCurrent() {
|
||||
return this.current;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
package com.bonus.canteen.core.ims.enums;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public enum QualificationTypeEnum {
|
||||
BUSINESS(1L, "营业执照"),
|
||||
ISO(2L, "ISO9001国际质量体系认证"),
|
||||
FOOD(3L, "食品经营许可证"),
|
||||
SMOKE(4L, "烟草经营许可证"),
|
||||
HACCP(5L, "HACCP认证");
|
||||
|
||||
private final Long key;
|
||||
private final String value;
|
||||
|
||||
private QualificationTypeEnum(Long key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static Long getKey(String value) {
|
||||
QualificationTypeEnum[] enums = values();
|
||||
QualificationTypeEnum[] var2 = enums;
|
||||
int var3 = enums.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
QualificationTypeEnum temp = var2[var4];
|
||||
if (temp.value().equals(value)) {
|
||||
return temp.key();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getValue(Long key) {
|
||||
QualificationTypeEnum[] enums = values();
|
||||
QualificationTypeEnum[] var2 = enums;
|
||||
int var3 = enums.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
QualificationTypeEnum temp = var2[var4];
|
||||
if (temp.key().equals(key)) {
|
||||
return temp.value();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Long key() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static List<Long> listOverAndNotEnough() {
|
||||
return Lists.newArrayList(new Long[]{BUSINESS.key, ISO.key,FOOD.key,SMOKE.key,HACCP.key});
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static QualificationTypeEnum[] $values() {
|
||||
return new QualificationTypeEnum[]{BUSINESS, ISO, FOOD,SMOKE, HACCP};
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.ims.domain.SupplierCategory;
|
||||
import com.bonus.canteen.core.ims.domain.vo.SupplierCategoryAndSupplier;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
|
||||
/**
|
||||
|
|
@ -62,4 +63,8 @@ public interface SupplierCategoryMapper {
|
|||
void deleteSupplierCategoryBySupplierId(Long supplierId);
|
||||
|
||||
List<CategoryModel> selectNameBySupplier(Long supplierId);
|
||||
|
||||
List<SupplierCategoryAndSupplier> selectSupplierCategoryBySupplierId(Long supplierId);
|
||||
|
||||
List<SupplierCategoryAndSupplier> selectSupplierCategoryByCategoryId(Long categoryId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,4 +81,6 @@ public interface ICheckInventoryService {
|
|||
void removeByCheckId(Integer checkId);
|
||||
|
||||
List<CheckInventoryPageVO> getDrpCkeckInventoryPage(CheckInventoryPageDTO content);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.ims.domain.SupplierCategory;
|
||||
import com.bonus.canteen.core.ims.domain.vo.SupplierCategoryAndSupplier;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
|
||||
/**
|
||||
|
|
@ -19,6 +20,10 @@ public interface ISupplierCategoryService {
|
|||
*/
|
||||
public SupplierCategory selectSupplierCategoryById(Long id);
|
||||
|
||||
List<SupplierCategoryAndSupplier> selectSupplierCategoryBySupplierId(Long id);
|
||||
|
||||
List<SupplierCategoryAndSupplier> selectSupplierCategoryByCategoryId(Long id);
|
||||
|
||||
/**
|
||||
* 查询供应商类目关联列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -176,6 +176,11 @@ public class CheckInventoryServiceImpl implements ICheckInventoryService {
|
|||
|
||||
@Override
|
||||
public CheckInventoryAddVO addCommitCheckInventory(CheckInventoryDraftAddDTO content) {
|
||||
|
||||
if(ObjectUtil.isEmpty(content.getFirstCheckUser())) {
|
||||
throw new ServiceException("盘点员不能为空");
|
||||
}
|
||||
|
||||
CheckInventory checkInventory = new CheckInventory();
|
||||
BeanUtil.copyProperties(content, checkInventory, new String[0]);
|
||||
checkInventory.setCreateBy(SecurityUtils.getUsername());
|
||||
|
|
@ -372,4 +377,5 @@ public class CheckInventoryServiceImpl implements ICheckInventoryService {
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,9 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
imsOutInventory.setImsOutInventoryDetailList(list);
|
||||
}
|
||||
imsOutInventoryMapper.updateImsOutInventory(imsOutInventory);
|
||||
this.addOutImsReportInventoryMessage(imsOutInventory);
|
||||
if(imsOutInventory.getStatus()== 2L){
|
||||
this.addOutImsReportInventoryMessage(imsOutInventory);
|
||||
}
|
||||
return imsOutInventory;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service.impl;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.ims.domain.vo.SupplierCategoryAndSupplier;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
|
|
@ -22,12 +23,26 @@ public class SupplierCategoryServiceImpl implements ISupplierCategoryService {
|
|||
@Autowired
|
||||
private SupplierCategoryMapper supplierCategoryMapper;
|
||||
|
||||
@Override
|
||||
public List<SupplierCategoryAndSupplier> selectSupplierCategoryBySupplierId(Long id) {
|
||||
return supplierCategoryMapper.selectSupplierCategoryBySupplierId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SupplierCategoryAndSupplier> selectSupplierCategoryByCategoryId(Long id) {
|
||||
return supplierCategoryMapper.selectSupplierCategoryByCategoryId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商类目关联
|
||||
*
|
||||
* @param id 供应商类目关联主键
|
||||
* @return 供应商类目关联
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public SupplierCategory selectSupplierCategoryById(Long id) {
|
||||
return supplierCategoryMapper.selectSupplierCategoryById(id);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service.impl;
|
|||
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.ims.dto.SupplierQualificationPageDTO;
|
||||
|
|
@ -108,6 +109,9 @@ public class SupplierQualificationServiceImpl implements ISupplierQualificationS
|
|||
|
||||
@Override
|
||||
public List<SupplierQualificationExpireVO> earlyWarning(SupplierQualificationPageDTO supplierQualification) {
|
||||
if (supplierQualification != null && supplierQualification.getAreaId() != null) {
|
||||
supplierQualification.setAreaIdList(Collections.singletonList(supplierQualification.getAreaId()));
|
||||
}
|
||||
List<SupplierQualificationExpireVO> list = supplierQualificationMapper.earlyWarning(supplierQualification);
|
||||
if(list !=null && list.size() >0 ) {
|
||||
list.forEach(item->{
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -162,6 +163,9 @@ public class SupplierScoreRuleServiceImpl extends ServiceImpl<SupplierScoreRuleM
|
|||
|
||||
@Override
|
||||
public List<SupplierScoreVO> pageSupplierScoreRule(SupplierScoreDTO content) {
|
||||
if (content != null && content.getAreaId() != null) {
|
||||
content.setAreaIdList(Collections.singletonList(content.getAreaId()));
|
||||
}
|
||||
List<SupplierScoreVO> resultList = this.supplierMapper.selectSupplier(content, DelFlagEnum.DEL_FALSE.key());
|
||||
Iterator<SupplierScoreVO> var3 = resultList.iterator();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.canteen.core.ims.domain.SupplierCategory;
|
||||
import com.bonus.canteen.core.ims.domain.SupplierQualification;
|
||||
import com.bonus.canteen.core.ims.domain.vo.SupplierCategoryAndSupplier;
|
||||
import com.bonus.canteen.core.ims.dto.*;
|
||||
import com.bonus.canteen.core.ims.enums.QualificationTypeEnum;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
import com.bonus.canteen.core.ims.service.*;
|
||||
import com.bonus.canteen.core.ims.vo.SupplierDeliverVO;
|
||||
|
|
@ -54,6 +56,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier>
|
|||
@Resource
|
||||
private ISupplierQualificationService supplierQualificationService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询供应商信息
|
||||
*
|
||||
|
|
@ -174,6 +177,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier>
|
|||
supplierQualification.setCreateTime(DateUtils.getNowDate());
|
||||
supplierQualification.setMainFlag(flag);
|
||||
supplierQualification.setCreateBy(SecurityUtils.getUserId()+"");
|
||||
supplierQualification.setQualificationType(QualificationTypeEnum.getKey(qualification.getQualificationName() ==null ? "营业执照" : qualification.getQualificationName()));
|
||||
supplierQualificationService.insertSupplierQualification(supplierQualification);
|
||||
}
|
||||
}
|
||||
|
|
@ -241,6 +245,21 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier>
|
|||
*/
|
||||
@Override
|
||||
public int deleteSupplierBySupplierIds(Long[] supplierIds) {
|
||||
//supplierCategoryServiceImpl
|
||||
List<SupplierCategoryAndSupplier> allList = new ArrayList<>();
|
||||
for (Long supplierId : supplierIds) {
|
||||
List<SupplierCategoryAndSupplier> supplierCategoryList = supplierCategoryService.selectSupplierCategoryBySupplierId(supplierId);
|
||||
allList.addAll(supplierCategoryList);
|
||||
}
|
||||
if(allList !=null && allList.size()>0){
|
||||
String distinctNames = allList.stream()
|
||||
.map(SupplierCategoryAndSupplier::getMaterialName)
|
||||
.distinct()
|
||||
.map(String::valueOf)
|
||||
.collect(Collectors.joining(", "));
|
||||
throw new ServiceException("供应商已被类目【"+distinctNames+"】关联,不能删除");
|
||||
}
|
||||
|
||||
return supplierMapper.deleteSupplierBySupplierIds(supplierIds);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,11 +59,13 @@ public class ReportInventoryOutDetailVO {
|
|||
private String supplierId;
|
||||
private String supplierName;
|
||||
|
||||
@ExcelProperty(
|
||||
value = {"出库类型"},
|
||||
converter = OutTypeConverter.class
|
||||
)
|
||||
@ApiModelProperty("出入库类型")
|
||||
@ExcelProperty(value = {"出入库类型"},converter = OutTypeConverter.class)
|
||||
private Integer outType;
|
||||
|
||||
@ApiModelProperty("类型 1入库 2出库")
|
||||
private Integer recordType;
|
||||
|
||||
@ApiModelProperty("日期")
|
||||
@ExcelProperty({"出库时间"})
|
||||
private LocalDateTime outDate;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.vo;
|
|||
|
||||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
import com.bonus.canteen.core.utils.SysUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
|
@ -137,11 +138,11 @@ public class SupplierPageVO {
|
|||
}
|
||||
|
||||
public String getIdCardImgZ() {
|
||||
return SysUtil.getCutFileUrl(this.idCardImgZ);
|
||||
return FileUrlUtil.getFileUrl(this.idCardImgZ);
|
||||
}
|
||||
|
||||
public String getIdCardImgF() {
|
||||
return SysUtil.getCutFileUrl(this.idCardImgF);
|
||||
return FileUrlUtil.getFileUrl(this.idCardImgF);
|
||||
}
|
||||
|
||||
public Long getSupplierId() {
|
||||
|
|
@ -172,7 +173,7 @@ public class SupplierPageVO {
|
|||
return this.linkman;
|
||||
}
|
||||
|
||||
public String getLinkmanNumber() {
|
||||
public String getLinkmanPhone() {
|
||||
return this.linkmanPhone;
|
||||
}
|
||||
|
||||
|
|
@ -352,7 +353,7 @@ public class SupplierPageVO {
|
|||
this.linkman = linkman;
|
||||
}
|
||||
|
||||
public void setLinkmanNumber(final String linkmanPhone) {
|
||||
public void setLinkmanPhone(final String linkmanPhone) {
|
||||
this.linkmanPhone = linkmanPhone;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.canteen.core.ims.vo;
|
||||
|
||||
import com.bonus.canteen.core.common.utils.FileUrlUtil;
|
||||
import com.bonus.canteen.core.utils.SysUtil;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -24,5 +25,14 @@ public class SupplierQualificationDetailPageVO {
|
|||
private Long supplierId;
|
||||
@ApiModelProperty("关联证书库ID")
|
||||
private Long certId;
|
||||
@ApiModelProperty("有效期")
|
||||
private String expirationDate;
|
||||
|
||||
public String getImgUrl() {
|
||||
return FileUrlUtil.getFileUrl(imgUrl);
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN cook_material_type mmc ON mmc.material_type_id = mm.material_type_id
|
||||
left join basic_area aa on aa.area_id = dw.area_id
|
||||
<where>
|
||||
mm.material_name is not null and mm.material_code is not null
|
||||
<if test="content.warehouseIdList != null and content.warehouseIdList.size() > 0">
|
||||
AND di.warehouse_id in
|
||||
<foreach collection="content.warehouseIdList" item="item" separator="," open="(" close=")">
|
||||
|
|
@ -238,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="content.materialName != null and content.materialName != ''">
|
||||
and mm.material_name like #{content.materialName}
|
||||
</if>
|
||||
and inventory_status in (2, 3)
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.ims.mapper.ImsOutInventoryMapper">
|
||||
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.ImsOutInventoryVO" id="ImsOutInventoryResult">
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="outCode" column="out_code" />
|
||||
|
|
@ -104,9 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ioi.out_date <![CDATA[ <= ]]> #{endDateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by ioi.out_date desc
|
||||
order by ioi.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectImsOutInventoryByOutId" parameterType="Long" resultMap="ImsOutInventoryResult">
|
||||
select out_id, out_code, ioi.warehouse_id, out_date, ioi.fetch_user_id, total_num, out_type,
|
||||
ioi.status, order_id, total_amount, plan_id, fetch_material_id, goods_allocation_id,
|
||||
|
|
@ -233,7 +233,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{outId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteImsOutInventoryDetailByOutIds" parameterType="String">
|
||||
update ims_out_inventory_detail set del_flag = '2' where out_id in
|
||||
<foreach item="outId" collection="array" open="(" separator="," close=")">
|
||||
|
|
@ -251,4 +251,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
( #{item.outDetailId}, #{item.outId}, #{item.outCode}, #{item.inventoryId}, #{item.fetchNum}, #{item.totalPrice}, #{item.intoDetailId}, #{item.intervalId}, #{item.size}, #{item.imgUrl}, #{item.ifOverdraft}, #{item.remark}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ds.supplier_name,
|
||||
dw.warehouse_id,
|
||||
dw.warehouse_name,
|
||||
de.record_type,
|
||||
de.out_into_type outType,
|
||||
de.record_time outDate,
|
||||
de.out_into_num outNum,
|
||||
|
|
@ -349,6 +350,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ds.supplier_name,
|
||||
dw.warehouse_id,
|
||||
dw.warehouse_name,
|
||||
de.record_type,
|
||||
de.out_into_type intoType,
|
||||
de.record_time intoDate,
|
||||
de.out_into_num intoNum,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.canteen.core.ims.domain.vo.SupplierCategoryAndSupplier" id="SupplierCategoryAndSupplier">
|
||||
<result property="id" column="id" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSupplierCategoryVo">
|
||||
select id, supplier_id, category_id, remark, create_by, create_time, update_by, update_time from ims_supplier_category
|
||||
</sql>
|
||||
|
|
@ -83,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="selectNameBySupplier" resultType="com.bonus.canteen.core.ims.model.CategoryModel">
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
mmc.material_type_id as categoryId,
|
||||
mmc.material_type_name as categoryName
|
||||
FROM
|
||||
|
|
@ -92,4 +104,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where dsc.supplier_id = #{supplierId}
|
||||
|
||||
</select>
|
||||
|
||||
<sql id="selectSupplierCategoryAndSupplierVo">
|
||||
SELECT
|
||||
id,
|
||||
a.supplier_id,
|
||||
b.supplier_name,
|
||||
a.category_id,
|
||||
c.material_name,
|
||||
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time
|
||||
FROM
|
||||
ims_supplier_bind_material a
|
||||
LEFT JOIN ims_supplier b on a.supplier_id = b.supplier_id
|
||||
LEFT JOIN cook_material c on c.material_id = a.material_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSupplierCategoryBySupplierId" resultMap="SupplierCategoryAndSupplier">
|
||||
<include refid="selectSupplierCategoryAndSupplierVo"/>
|
||||
where a.supplier_id = #{supplierId}
|
||||
</select>
|
||||
|
||||
<select id="selectSupplierCategoryByCategoryId" resultMap="SupplierCategoryAndSupplier">
|
||||
<include refid="selectSupplierCategoryAndSupplierVo"/>
|
||||
where a.category_id = #{categoryId} and a.supplier_id is not null
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and a.supplier_code = #{content.supplierCode}
|
||||
</if>
|
||||
<if test="content.supplierName != null and content.supplierName != ''">
|
||||
and a.supplier_name like #{content.supplierName}
|
||||
and a.supplier_name like concat('%',#{content.supplierName},'%')
|
||||
</if>
|
||||
<if test="content.areaIdList != null and content.areaIdList.size() > 0">
|
||||
AND a.area_id in
|
||||
|
|
@ -361,7 +361,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</if>
|
||||
<if test="content.linkman != null and content.linkman != ''">
|
||||
and a.linkman like #{content.linkman}
|
||||
and a.linkman like concat('%',#{content.linkman},'%')
|
||||
</if>
|
||||
<if test="content.status != null">
|
||||
and a.status = #{content.status}
|
||||
|
|
|
|||
|
|
@ -127,12 +127,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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 test="content.supplierName != null and content.supplierName != '' ">
|
||||
and ds.supplier_name like concat('%', #{content.supplierName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="content.qualificationName != null and content.qualificationName != '' ">
|
||||
and dsq.qualification_name like concat('%', #{content.qualificationName}, '%')
|
||||
</if>
|
||||
<if test="content.qualificationCode != null and content.qualificationCode != '' ">
|
||||
and dsq.qualification_code like concat('%', #{content.qualificationCode}, '%')
|
||||
</if>
|
||||
<if test="content.supplierId != null and content.supplierId != '' ">
|
||||
and ds.supplier_id = #{content.supplierId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue