测试问题修复
This commit is contained in:
parent
1793e7cec9
commit
47308edce8
|
|
@ -26,4 +26,4 @@ public class SchedulingConfig {
|
|||
public void scheduledTask() {
|
||||
tcpMonitorService.checkAllDevicesAsyncByScheduled();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class PersonSettingController extends BaseController {
|
|||
@ApiOperation("供应链人员配置-查询")
|
||||
@GetMapping("/getList")
|
||||
public TableDataInfo getList(PersonSetting dto) {
|
||||
if("0".equals(dto.getIsPaging())){
|
||||
if(dto.getIsPaging() ==0){
|
||||
startPage();
|
||||
}
|
||||
return getDataTable(service.getList(dto));
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ public class ImsIntoInventory extends BaseEntity
|
|||
@Excel(name = "关联采购订单号")
|
||||
private String relateOrderGoodsId;
|
||||
|
||||
private Long orderGoodsId;
|
||||
|
||||
/** 关联验货单号 */
|
||||
@ApiModelProperty(value = "关联验货单号")
|
||||
@Excel(name = "关联验货单号")
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
|
||||
/**
|
||||
* 入库记录明细对象 ims_into_inventory_detail
|
||||
*
|
||||
*
|
||||
* @author gaowdong
|
||||
* @date 2025-07-07
|
||||
*/
|
||||
|
|
@ -163,4 +163,6 @@ public class ImsIntoInventoryDetail extends BaseEntity
|
|||
@Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime intoDate;
|
||||
|
||||
private Long orderGoodsId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ public class ImsIntoInventoryAdd implements Serializable
|
|||
@ApiModelProperty(value = "关联采购订单号")
|
||||
private String relateOrderGoodsId;
|
||||
|
||||
private Long orderGoodsId;
|
||||
|
||||
/** 关联验货单号 */
|
||||
@ApiModelProperty(value = "关联验货单号")
|
||||
private String relateInspectGoodsId;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,8 @@ public class ImsIntoInventoryDetailAdd implements Serializable
|
|||
/** 关联送货单明细id */
|
||||
@ApiModelProperty(value = "关联送货单明细id")
|
||||
private Long relateDeliveryGoodsDetailId;
|
||||
|
||||
private Long orderGoodsId;
|
||||
//
|
||||
// /** 删除标志(0代表存在 2代表删除) */
|
||||
// private String delFlag;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
package com.bonus.canteen.core.ims.enums;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Generated;
|
||||
|
||||
@ApiModel
|
||||
@Data
|
||||
public class DrpOrderNumAndAmountModel {
|
||||
@ApiModelProperty("采购订单数量")
|
||||
private int orderNum;
|
||||
@ApiModelProperty("采购订单金额")
|
||||
private long orderAmount;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.bonus.canteen.core.ims.enums;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public enum ImsInquiryStatusEnum {
|
||||
NO_COMMIT(1, "待提交"),
|
||||
ALREADY_QUOTE(2, "已决标"),
|
||||
DOING_QUOTE(3, "未决标"),
|
||||
LOSE_THE_BID(5, "已取消");
|
||||
|
||||
private final Integer key;
|
||||
private final String value;
|
||||
|
||||
private ImsInquiryStatusEnum(Integer key, String value) {
|
||||
this.key = key;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static Integer getKey(String value) {
|
||||
ImsInquiryStatusEnum[] enums = values();
|
||||
ImsInquiryStatusEnum[] var2 = enums;
|
||||
int var3 = enums.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
ImsInquiryStatusEnum temp = var2[var4];
|
||||
if (temp.value().equals(value)) {
|
||||
return temp.key();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getValue(Integer key) {
|
||||
ImsInquiryStatusEnum[] enums = values();
|
||||
ImsInquiryStatusEnum[] var2 = enums;
|
||||
int var3 = enums.length;
|
||||
|
||||
for(int var4 = 0; var4 < var3; ++var4) {
|
||||
ImsInquiryStatusEnum temp = var2[var4];
|
||||
if (temp.key().equals(key)) {
|
||||
return temp.value();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static List<Integer> listNotCommitStatus() {
|
||||
return Lists.newArrayList(new Integer[]{NO_COMMIT.key, LOSE_THE_BID.key});
|
||||
}
|
||||
|
||||
public Integer key() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static ImsInquiryStatusEnum[] $values() {
|
||||
return new ImsInquiryStatusEnum[]{NO_COMMIT, ALREADY_QUOTE, DOING_QUOTE, LOSE_THE_BID};
|
||||
}
|
||||
}
|
||||
|
|
@ -75,4 +75,6 @@ public interface SupplierBindMaterialMapper {
|
|||
|
||||
|
||||
List<SupplierBindCategoryVO> selectSupplierBindcategoryList(SupplierBindMaterial supplierBindMaterial);
|
||||
|
||||
int insertSupplierBindMaterialList(@Param("list") List<SupplierBindMaterial> alternativeSuppliers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.ims.mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -7,6 +9,9 @@ import com.bonus.canteen.core.ims.domain.Supplier;
|
|||
import com.bonus.canteen.core.ims.dto.SupplierPageDTO;
|
||||
import com.bonus.canteen.core.ims.dto.SupplierScoreDTO;
|
||||
import com.bonus.canteen.core.ims.dto.SupplyStatisticsPageDTO;
|
||||
import com.bonus.canteen.core.ims.enums.DrpOrderNumAndAmountModel;
|
||||
import com.bonus.canteen.core.ims.model.SupplierBidTimesAndAmountModel;
|
||||
import com.bonus.canteen.core.ims.model.SupplierLastBidInfoModel;
|
||||
import com.bonus.canteen.core.ims.model.SupplierScoreSupplierModel;
|
||||
import com.bonus.canteen.core.ims.vo.SupplierPageVO;
|
||||
import com.bonus.canteen.core.ims.vo.SupplierScoreVO;
|
||||
|
|
@ -78,4 +83,13 @@ public interface SupplierMapper extends BaseMapper<Supplier> {
|
|||
|
||||
List<SupplierScoreSupplierModel> listSupplierScoreSupplier(@Param("content") SupplierScoreDTO content, @Param("delFlag") Integer delFlag, @Param("mainFlag") Integer mainFlag);
|
||||
|
||||
List<SupplyStatisticsPageVO> supplyList(@Param("content")SupplyStatisticsPageDTO supplyStatisticsPageDTO, @Param("delFlag") Integer key);
|
||||
|
||||
SupplierBidTimesAndAmountModel selectBidTimesAndAmount(@Param("supplierId") Long supplierId, @Param("content")SupplyStatisticsPageDTO supplyStatisticsPageDTO);
|
||||
|
||||
SupplierLastBidInfoModel selectLastBidInfo(@Param("supplierId") Long supplierId,@Param("content") SupplyStatisticsPageDTO supplyStatisticsPageDTO, @Param("bidStatus") Integer bidStatus);
|
||||
|
||||
BigDecimal getDeliveryQualifiedRate(@Param("supplierId") Long supplierId, @Param("startTime") LocalDate startTime, @Param("endTime") LocalDate endTime, @Param("intoStatus") Integer intoStatus);
|
||||
|
||||
DrpOrderNumAndAmountModel selectOrderNumAndAmount(@Param("supplierId") Long supplierId, @Param("content") SupplyStatisticsPageDTO content, @Param("supplierConfirmStatus") Long supplierConfirmStatus);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.canteen.core.ims.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Generated;
|
||||
|
||||
@ApiModel
|
||||
@Data
|
||||
public class SupplierBidTimesAndAmountModel {
|
||||
@ApiModelProperty("中标次数")
|
||||
private Integer bidNumbers;
|
||||
@ApiModelProperty("累计中标金额")
|
||||
private Long cumulativeBidAmount;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.bonus.canteen.core.ims.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.Generated;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@ApiModel
|
||||
@Data
|
||||
public class SupplierLastBidInfoModel {
|
||||
@ApiModelProperty("上次中标日期")
|
||||
private LocalDate lastBidDate;
|
||||
@ApiModelProperty("上次中标金额")
|
||||
private Long lastBidAmount;
|
||||
|
||||
}
|
||||
|
|
@ -274,6 +274,10 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
imsIntoInventoryDetail.setIfFillInventory(CommonFlagEnum.NO.getKey());
|
||||
}
|
||||
imsIntoInventoryDetail.setDelFlag(String.valueOf(DelFlagEnum.DEL_FALSE.key()));
|
||||
if(imsIntoInventoryDetailAdd.getOrderGoodsId() !=null){
|
||||
imsIntoInventoryDetail.setRelateOrderGoodsDetailId(imsIntoInventoryDetailAdd.getOrderGoodsId());
|
||||
}
|
||||
|
||||
list.add(imsIntoInventoryDetail);
|
||||
if(Long.valueOf(2).equals(imsIntoInventory.getStatus())) {
|
||||
if(Objects.isNull(imsIntoInventoryDetail.getMaterialId())
|
||||
|
|
@ -416,7 +420,7 @@ public class ImsIntoInventoryServiceImpl implements IImsIntoInventoryService
|
|||
}
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
orderGoods.setOrderGoodsCode(imsIntoInventory.getRelateOrderGoodsId());
|
||||
orderGoods.setOrderStatus(2L);
|
||||
orderGoods.setOrderStatus(3L);
|
||||
List<OrderGoodsVO> orderGoodsList = orderGoodsService.selectOrderGoodsList(orderGoods);
|
||||
if(CollUtil.isEmpty(orderGoodsList) || orderGoodsList.size() > 1) {
|
||||
throw new ServiceException("关联采购单错误, 采购单不存在或存在多条相同采购订单");
|
||||
|
|
|
|||
|
|
@ -225,7 +225,9 @@ public class ImsInventoryServiceImpl implements IImsInventoryService
|
|||
}
|
||||
});
|
||||
if(content.getExpireState() !=null){
|
||||
List<ExpireWarningVO> warningList = list.stream().filter(l -> Objects.equals(l.getExpireState(), content.getExpireState())).collect(Collectors.toList());
|
||||
List<ExpireWarningVO> warningList = list.stream().filter(l -> Objects.equals(l.getExpireState(), content.getExpireState()))
|
||||
.filter(warning -> warning.getExpireState() != 3)
|
||||
.collect(Collectors.toList());
|
||||
System.out.println("warningList = " + warningList);
|
||||
System.out.println("warningList.size = " + warningList.size());
|
||||
return warningList;
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ public class ImsOutInventoryServiceImpl implements IImsOutInventoryService
|
|||
if(newOutCount.compareTo(funchNum) < 0){
|
||||
throw new ServiceException("领取数量大于待领数量,操作失败!");
|
||||
}
|
||||
fetchMaterialDetailUpdate.setOutCount(newOutCount);
|
||||
fetchMaterialDetailUpdate.setOutCount(outCount);
|
||||
fetchMaterialDetailMapper. updateFetchMaterialDetail(fetchMaterialDetailUpdate);
|
||||
totalOutNum = totalOutNum.add(imsOutInventoryDetailAdd.getFetchNum());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,26 @@
|
|||
package com.bonus.canteen.core.ims.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.ims.domain.Inquiry;
|
||||
import com.bonus.canteen.core.ims.domain.InquiryDetail;
|
||||
import com.bonus.canteen.core.ims.domain.InquirySupplier;
|
||||
import com.bonus.canteen.core.ims.mapper.InquiryMapper;
|
||||
import com.bonus.canteen.core.ims.mapper.InquirySupplierMapper;
|
||||
import com.bonus.canteen.core.ims.mapper.QuoteInquiryPicMapper;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.ims.mapper.QuoteMapper;
|
||||
import com.bonus.canteen.core.ims.domain.Quote;
|
||||
import com.bonus.canteen.core.ims.service.IQuoteService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 报价详情Service业务层处理
|
||||
*
|
||||
|
|
@ -28,6 +34,10 @@ public class QuoteServiceImpl implements IQuoteService {
|
|||
@Autowired
|
||||
private InquirySupplierMapper inquirySupplierMapper;
|
||||
|
||||
@Resource
|
||||
private InquiryMapper inquiryMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询报价详情
|
||||
*
|
||||
|
|
@ -64,6 +74,16 @@ public class QuoteServiceImpl implements IQuoteService {
|
|||
public int insertQuote(Quote quote) {
|
||||
quote.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
|
||||
// Inquiry inquiry = inquiryMapper.selectInquiryByInquiryId(quote.getInquiryId(),null);
|
||||
// Date startTime = inquiry.getStartTime();
|
||||
// Date endTime = inquiry.getEndTime();
|
||||
// if (startTime.getTime() > System.currentTimeMillis()) {
|
||||
// throw new ServiceException("询价单未开始");
|
||||
// }
|
||||
// if (endTime.getTime() < System.currentTimeMillis()) {
|
||||
// throw new ServiceException("询价单已结束");
|
||||
// }
|
||||
return quoteMapper.insertQuote(quote);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
|
|
@ -79,6 +99,15 @@ public class QuoteServiceImpl implements IQuoteService {
|
|||
@Override
|
||||
public int updateQuote(Inquiry quote) {
|
||||
quote.setUpdateTime(DateUtils.getNowDate());
|
||||
Inquiry inquiry = inquiryMapper.selectInquiryByInquiryId(quote.getInquiryId(),null);
|
||||
Date startTime = inquiry.getStartTime();
|
||||
Date endTime = inquiry.getEndTime();
|
||||
if (startTime.getTime() > System.currentTimeMillis()) {
|
||||
throw new ServiceException("询价报价未开始");
|
||||
}
|
||||
if (endTime.getTime() < System.currentTimeMillis()) {
|
||||
throw new ServiceException("询价报价已结束");
|
||||
}
|
||||
try {
|
||||
List<InquiryDetail> list=quote.getDetailList();
|
||||
InquirySupplier iInquirySupplier=new InquirySupplier();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.canteen.core.ims.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -193,14 +194,17 @@ public class SupplierBindMaterialServiceImpl implements ISupplierBindMaterialSer
|
|||
return 1;
|
||||
}
|
||||
int count = 0;
|
||||
List<SupplierBindMaterial> alternativeSuppliers = new ArrayList<>();
|
||||
for(int i=0;i<materialIds.length;i++){
|
||||
//新增
|
||||
supplierBindMaterials.setCreateBy(SecurityUtils.getUsername());
|
||||
supplierBindMaterials.setCreateTime(DateUtils.getNowDate());
|
||||
supplierBindMaterials.setMaterialId(materialIds[i]);
|
||||
supplierBindMaterials.setCategoryId(supplierBindMaterials.getCategoryId());
|
||||
count += supplierBindMaterialMapper.insertSupplierBindMaterial(supplierBindMaterials);
|
||||
alternativeSuppliers.add(supplierBindMaterials);
|
||||
// count += supplierBindMaterialMapper.insertSupplierBindMaterial(supplierBindMaterials);
|
||||
}
|
||||
count = supplierBindMaterialMapper.insertSupplierBindMaterialList(alternativeSuppliers);
|
||||
supplierBindMaterials.setCreateBy(SecurityUtils.getUsername());
|
||||
supplierBindMaterials.setCreateTime(DateUtils.getNowDate());
|
||||
supplierBindMaterials.setMaterialId(null);
|
||||
|
|
@ -265,14 +269,18 @@ public class SupplierBindMaterialServiceImpl implements ISupplierBindMaterialSer
|
|||
if(supplierBindMaterials.getSupplierId() == null){
|
||||
return 1;
|
||||
}
|
||||
List<SupplierBindMaterial> alternativeSuppliers = new ArrayList<>();
|
||||
for(int i=0;i<materialIds.length;i++){
|
||||
//新增
|
||||
supplierBindMaterials.setCreateBy(SecurityUtils.getUsername());
|
||||
supplierBindMaterials.setCreateTime(DateUtils.getNowDate());
|
||||
supplierBindMaterials.setMaterialId(materialIds[i]);
|
||||
supplierBindMaterials.setCategoryId(categoryId);
|
||||
count += supplierBindMaterialMapper.insertSupplierBindMaterial(supplierBindMaterials);
|
||||
alternativeSuppliers.add(supplierBindMaterials);
|
||||
//count += supplierBindMaterialMapper.insertSupplierBindMaterial(supplierBindMaterials);
|
||||
}
|
||||
count += supplierBindMaterialMapper.insertSupplierBindMaterialList(alternativeSuppliers);
|
||||
//insertSupplierBindMaterialList
|
||||
supplierBindMaterials.setCreateBy(SecurityUtils.getUsername());
|
||||
supplierBindMaterials.setCreateTime(DateUtils.getNowDate());
|
||||
supplierBindMaterials.setMaterialId(null);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.canteen.core.ims.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -20,8 +21,13 @@ 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.DrpOrderNumAndAmountModel;
|
||||
import com.bonus.canteen.core.ims.enums.ImsInquiryStatusEnum;
|
||||
import com.bonus.canteen.core.ims.enums.IntoInventoryStatusEnum;
|
||||
import com.bonus.canteen.core.ims.enums.QualificationTypeEnum;
|
||||
import com.bonus.canteen.core.ims.model.CategoryModel;
|
||||
import com.bonus.canteen.core.ims.model.SupplierBidTimesAndAmountModel;
|
||||
import com.bonus.canteen.core.ims.model.SupplierLastBidInfoModel;
|
||||
import com.bonus.canteen.core.ims.service.*;
|
||||
import com.bonus.canteen.core.ims.vo.SupplierDeliverVO;
|
||||
import com.bonus.canteen.core.ims.vo.SupplierPageVO;
|
||||
|
|
@ -39,7 +45,7 @@ import org.springframework.stereotype.Service;
|
|||
import com.bonus.canteen.core.ims.mapper.SupplierMapper;
|
||||
import com.bonus.canteen.core.ims.domain.Supplier;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.bonus.canteen.core.ims.enums.DrpCommitStatusEnum;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
|
|
@ -324,10 +330,29 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier>
|
|||
|
||||
@Override
|
||||
public List<SupplyStatisticsPageVO> supplyStatistics(SupplyStatisticsPageDTO supplyStatisticsPageDTO) {
|
||||
List<SupplyStatisticsPageVO> pageVOList = supplierMapper.supplyStatistics(supplyStatisticsPageDTO, DelFlagEnum.DEL_FALSE.key());
|
||||
//TODO 合格率
|
||||
//TODO 订单数量
|
||||
|
||||
return pageVOList;
|
||||
// List<SupplyStatisticsPageVO> pageVOList = supplierMapper.supplyStatistics(supplyStatisticsPageDTO, DelFlagEnum.DEL_FALSE.key());
|
||||
// //TODO 合格率
|
||||
// //TODO 订单数量
|
||||
List<SupplyStatisticsPageVO> resultList = supplierMapper.supplyList(supplyStatisticsPageDTO, DelFlagEnum.DEL_FALSE.key());
|
||||
Iterator var7 = resultList.iterator();
|
||||
while(var7.hasNext()) {
|
||||
SupplyStatisticsPageVO result = (SupplyStatisticsPageVO)var7.next();
|
||||
SupplierBidTimesAndAmountModel supplierBidTimesAndAmountModel = supplierMapper.selectBidTimesAndAmount(result.getSupplierId(), supplyStatisticsPageDTO);
|
||||
result.setBidNumbers(supplierBidTimesAndAmountModel.getBidNumbers());
|
||||
result.setCumulativeBidAmount(supplierBidTimesAndAmountModel.getCumulativeBidAmount());
|
||||
SupplierLastBidInfoModel supplierLastBidInfoModel = supplierMapper.selectLastBidInfo(result.getSupplierId(), supplyStatisticsPageDTO, ImsInquiryStatusEnum.ALREADY_QUOTE.key());
|
||||
if (ObjectUtil.isNotEmpty(supplierLastBidInfoModel)) {
|
||||
result.setLastBidDate(supplierLastBidInfoModel.getLastBidDate());
|
||||
result.setLastBidAmount(supplierLastBidInfoModel.getLastBidAmount());
|
||||
}
|
||||
BigDecimal deliveryQualifiedRate = supplierMapper.getDeliveryQualifiedRate(result.getSupplierId(), null, null, IntoInventoryStatusEnum.COMMIT.key());
|
||||
result.setDeliveryPassRate(deliveryQualifiedRate);
|
||||
DrpOrderNumAndAmountModel drpOrderNumAndAmountModel = supplierMapper.selectOrderNumAndAmount(result.getSupplierId(), supplyStatisticsPageDTO, DrpCommitStatusEnum.COMMIT.key());
|
||||
if (ObjectUtil.isNotEmpty(drpOrderNumAndAmountModel)) {
|
||||
result.setOrderNum(drpOrderNumAndAmountModel.getOrderNum());
|
||||
result.setOrderAmount(drpOrderNumAndAmountModel.getOrderAmount());
|
||||
}
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
);
|
||||
if(bean !=null) {
|
||||
throw new ServiceException("设备名称已存在,请检查后重新输入");
|
||||
|
|
@ -111,6 +112,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceSn, kitchenDeviceInfo.getDeviceSn())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
);
|
||||
if(bean !=null) {
|
||||
throw new ServiceException("设备SN码已存在,请检查后重新输入");
|
||||
|
|
@ -118,6 +120,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
);
|
||||
if(bean !=null) {
|
||||
throw new ServiceException("设备名称已存在,请检查后重新输入");
|
||||
|
|
@ -139,7 +142,8 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceType, kitchenDeviceInfo.getDeviceType())
|
||||
.eq(KitchenDeviceInfo::getChannel, kitchenDeviceInfo.getChannel()));
|
||||
.eq(KitchenDeviceInfo::getChannel, kitchenDeviceInfo.getChannel())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key()));
|
||||
if(bean !=null) {
|
||||
throw new ServiceException("改类型设备通道已存在,请检查后重新输入");
|
||||
}
|
||||
|
|
@ -191,6 +195,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceName, kitchenDeviceInfo.getDeviceName())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
.ne(KitchenDeviceInfo::getDeviceId, kitchenDeviceInfo.getDeviceId())
|
||||
);
|
||||
if(bean !=null){
|
||||
|
|
@ -199,6 +204,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getDeviceSn, kitchenDeviceInfo.getDeviceSn())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
.ne(KitchenDeviceInfo::getDeviceId, kitchenDeviceInfo.getDeviceId())
|
||||
);
|
||||
if(bean !=null){
|
||||
|
|
@ -207,6 +213,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
bean = kitchenDeviceInfoMapper.selectOne(
|
||||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getIp, kitchenDeviceInfo.getIp())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
.ne(KitchenDeviceInfo::getDeviceId, kitchenDeviceInfo.getDeviceId())
|
||||
);
|
||||
if(bean !=null){
|
||||
|
|
@ -216,6 +223,7 @@ public class KitchenDeviceInfoServiceImpl extends ServiceImpl<KitchenDeviceInfoM
|
|||
Wrappers.<KitchenDeviceInfo>lambdaQuery()
|
||||
.eq(KitchenDeviceInfo::getChannel, kitchenDeviceInfo.getChannel())
|
||||
.eq(KitchenDeviceInfo::getDeviceType, kitchenDeviceInfo.getDeviceType())
|
||||
.eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
|
||||
.ne(KitchenDeviceInfo::getDeviceId, kitchenDeviceInfo.getDeviceId())
|
||||
);
|
||||
if(bean !=null){
|
||||
|
|
|
|||
|
|
@ -212,16 +212,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
cd.selenium,
|
||||
cd.carotene,
|
||||
CASE
|
||||
|
||||
WHEN iin.material_num IS NOT NULL
|
||||
AND iin.material_num > 0 THEN
|
||||
1 ELSE 0
|
||||
END AS has_inventory
|
||||
WHEN EXISTS (
|
||||
SELECT 1
|
||||
FROM cook_dishes_material cdm2
|
||||
LEFT JOIN ims_inventory iin2 ON iin2.material_id = cdm2.material_id AND iin2.del_flag = 0
|
||||
WHERE cdm2.dishes_id = cd.dishes_id
|
||||
AND iin2.material_num IS NOT NULL
|
||||
AND iin2.material_num > 0
|
||||
) THEN 1
|
||||
ELSE 0
|
||||
END AS has_inventory,
|
||||
(SELECT iin3.material_id
|
||||
FROM cook_dishes_material cdm3
|
||||
LEFT JOIN ims_inventory iin3 ON iin3.material_id = cdm3.material_id AND iin3.del_flag = 0
|
||||
WHERE cdm3.dishes_id = cd.dishes_id
|
||||
AND iin3.material_num IS NOT NULL
|
||||
AND iin3.material_num > 0
|
||||
LIMIT 1) AS material_id
|
||||
FROM
|
||||
cook_dishes cd
|
||||
LEFT JOIN cook_dishes_material cdm ON cdm.dishes_id = cd.dishes_id
|
||||
LEFT JOIN ims_inventory iin ON iin.material_id = cdm.material_id
|
||||
AND iin.del_flag = 0
|
||||
LEFT JOIN basic_area ba ON cd.area_id = ba.area_id
|
||||
LEFT JOIN basic_canteen bc ON cd.canteen_id = bc.canteen_id
|
||||
LEFT JOIN basic_stall bs ON cd.shopstall_id = bs.stall_id
|
||||
|
|
@ -230,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectCookDishesList" parameterType="com.bonus.canteen.core.cook.domain.CookDishes" resultMap="CookDishesResult">
|
||||
<include refid="selectCookDishesVo"/>
|
||||
|
||||
<where>
|
||||
and cd.del_flag = 0
|
||||
<if test="typeIds != null and typeIds.size() > 0">
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT distinct(crd.recipe_detail_id)
|
||||
FROM cook_recipe_detail crd
|
||||
left join cook_recipe cr ON cr.recipe_id = crd.recipe_id
|
||||
where cr.recipe_id = #{recipeId} and cr.recipe_type = 2 and crd.detail_type = 2 and crd.apply_date >= NOW()-1
|
||||
where cr.recipe_id = #{recipeId} and cr.recipe_type = 2 and crd.detail_type = 2
|
||||
and crd.apply_date >= CURRENT_DATE()
|
||||
</select>
|
||||
|
||||
<select id="getToDeleteCookRecipeDetailIds4WeeklyTemplate" parameterType="Long" resultType="Long">
|
||||
|
|
|
|||
|
|
@ -76,7 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="pageOrForm == 1 ">
|
||||
and order_status in (2,3)
|
||||
</if>
|
||||
|
||||
<if test="orderStatus !=null ">
|
||||
and iog.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="isInspect != null and isInspect != '' and isInspect != 0 and isInspect != '0'.toString()">
|
||||
and iog.if_all_inspect = #{isInspect}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -229,12 +229,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '2'"> and aa.status = 3 </if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '3'"> and aa.status = 4 </if>
|
||||
<if test="inquiryState != null and inquiryState != '' and inquiryState == '4'"> and aa.status = 5 </if>
|
||||
<if test="status != null and status != '' and status == '1'"> and aa.status = 4 </if>
|
||||
<if test="status != null and status != '' and status == '2'"> and aa.status = 5 </if>
|
||||
<if test="orderStatus != null and orderStatus != '' and orderStatus == '1'"> and aa.status = 1 </if>
|
||||
<if test="status !=null and status !='' ">and cc.bid_status = #{status}</if>
|
||||
<!-- <if test="status != null and status != '' and status == '1'"> and aa.status = 4 </if>-->
|
||||
<!-- <if test="status != null and status != '' and status == '2'"> and aa.status = 5 </if>-->
|
||||
<if test="orderStatus != null and orderStatus != '' and orderStatus == '2'"> and aa.status != 1</if>
|
||||
<if test="startTime != null "> and aa.start_time >= #{startTime} </if>
|
||||
<if test="endTime != null "> and #{endTime}>=aa.start_time </if>
|
||||
<if test="title !=null and title !=''"> and aa.title like CONCAT('%',#{title},'%')</if>
|
||||
<if test="inquiryCode !=null and inquiryCode !='' "> and aa.inquiry_code like CONCAT('%',#{inquiryCode},'%')</if>
|
||||
|
||||
</where>
|
||||
<!-- group by aa.inquiry_id-->
|
||||
|
|
|
|||
|
|
@ -497,6 +497,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="param.startDate !=null and param.startDate !='' and param.endDate !=null and param.endDate !=''">
|
||||
create_time between #{param.startDate} and #{param.endDate}
|
||||
</if>
|
||||
and supplier_id is not null
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -506,6 +507,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="param.startDate !=null and param.startDate !='' and param.endDate !=null and param.endDate !=''">
|
||||
create_time between #{param.startDate} and #{param.endDate}
|
||||
</if>
|
||||
and supplier_id is not null
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -306,4 +306,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
|
||||
</delete>
|
||||
|
||||
<insert id="insertSupplierBindMaterialList">
|
||||
insert into ims_supplier_bind_material(canteen_id, supplier_id, material_id, category_id, alternative_supplier, if_supply, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.canteenId}, #{item.supplierId}, #{item.materialId}, #{item.categoryId}, #{item.alternativeSupplier}, #{item.ifSupply}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -508,4 +508,69 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
a.workers_num,
|
||||
a.regist_fund
|
||||
</select>
|
||||
|
||||
<select id="supplyList" resultType="com.bonus.canteen.core.ims.vo.SupplyStatisticsPageVO">
|
||||
SELECT
|
||||
a.supplier_code,
|
||||
a.supplier_id,
|
||||
a.supplier_name,
|
||||
a.area_id,
|
||||
aa.area_name
|
||||
FROM
|
||||
ims_supplier a
|
||||
LEFT JOIN basic_area aa on a.area_id = aa.area_id
|
||||
where a.del_flag = #{delFlag}
|
||||
<if test="content.supplierId != null">
|
||||
AND a.supplier_id = #{content.supplierId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBidTimesAndAmount" resultType="com.bonus.canteen.core.ims.model.SupplierBidTimesAndAmountModel">
|
||||
SELECT
|
||||
count( inquiry_id ) bidNumbers,
|
||||
sum( bid_total_price ) cumulativeBidAmount
|
||||
FROM
|
||||
ims_inquiry
|
||||
WHERE
|
||||
supplier_id = #{supplierId}
|
||||
</select>
|
||||
|
||||
<select id="selectLastBidInfo" resultType="com.bonus.canteen.core.ims.model.SupplierLastBidInfoModel">
|
||||
SELECT
|
||||
bid_time lastBidDate,
|
||||
bid_total_price lastBidAmount
|
||||
FROM
|
||||
ims_inquiry
|
||||
WHERE
|
||||
supplier_id = #{supplierId}
|
||||
AND `status` = #{bidStatus}
|
||||
ORDER BY
|
||||
bid_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getDeliveryQualifiedRate" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
ROUND( SUM( pur_num ) / SUM( delivery_num ) * 100, 2 )
|
||||
FROM
|
||||
ims_into_inventory_detail a
|
||||
LEFT JOIN ims_into_inventory b ON b.into_id = a.into_id
|
||||
WHERE
|
||||
a.supplier_id = #{supplierId}
|
||||
and b.`status` = #{intoStatus}
|
||||
<!-- AND DATE_FORMAT( b.into_date, '%Y-%m-%d' ) <![CDATA[ >= ]]> #{startTime}-->
|
||||
<!-- AND DATE_FORMAT( b.into_date, '%Y-%m-%d' ) <![CDATA[ <= ]]> #{endTime}-->
|
||||
<!-- AND b.relate_delivery_goods_id is not null-->
|
||||
</select>
|
||||
|
||||
<select id="selectOrderNumAndAmount" resultType="com.bonus.canteen.core.ims.enums.DrpOrderNumAndAmountModel">
|
||||
SELECT
|
||||
count(*) orderNum,
|
||||
IFNULL(sum( order_amount ),0) orderAmount
|
||||
FROM
|
||||
ims_order_goods
|
||||
WHERE
|
||||
supplier_confirm_status = #{supplierConfirmStatus}
|
||||
AND supplier_id = #{supplierId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue