修改了订单获取接口的查询结果

This commit is contained in:
ciei 2023-08-15 17:22:17 +08:00
parent 1a72722189
commit 947d0de2bd
5 changed files with 197 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.Try.entity.PurchaseAndOrder;
import org.jeecg.modules.demo.Try.entity.PurchaseOrderConfirmation;
import org.jeecg.modules.demo.Try.entity.PurchaseRequest;
import org.jeecg.modules.demo.Try.service.IPurchaseOrderConfirmationService;
@ -79,6 +80,20 @@ public class PurchaseOrderConfirmationController extends JeecgController<Purchas
return Result.OK(pageList);
}
/**
*
* 查询所有被接收的订单并连接
* @param purchaseOrderConfirmation
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@ApiOperation(value = "采购订单确认-连接查询", notes = "采购订单确认-连接查询")
@GetMapping(value = "/joinList")
public Result<List<PurchaseAndOrder>> queryAllList() {
return Result.OK(purchaseOrderConfirmationService.queryAllConfirm());
}
/**
* 添加
*

View File

@ -0,0 +1,162 @@
package org.jeecg.modules.demo.Try.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 采购表
* @Author: jeecg-boot
* @Date: 2023-08-12
* @Version: V1.0
*/
@Data
@TableName("purchase_request")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "purchase_request联表purchase_order_confirmation", description = "采购表连接采购确认表")
public class PurchaseAndOrder implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 申请人
*/
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "申请人")
private String createBy;
/**
* 申请日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "申请日期")
private Date createTime;
/**
* 需求编号
*/
@Excel(name = "需求编号", width = 15)
@ApiModelProperty(value = "需求编号")
private String requirementNumber;
/**
* 申请部门
*/
@ApiModelProperty(value = "申请部门")
private String sysOrgCode;
/**
* 需求状态
*/
@Excel(name = "需求状态", width = 15, dicCode = "procurement_approval_status")
@Dict(dicCode = "procurement_approval_status")
@ApiModelProperty(value = "需求状态")
private Integer demandStatus;
/**
* 更新人员
*/
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "更新人员")
private String updateBy;
/**
* 审批人
*/
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "审批人")
private String approvedBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 采购类别
*/
@Excel(name = "采购类别", width = 15, dicCode = "purchasing_categories")
@Dict(dicCode = "purchasing_categories")
@ApiModelProperty(value = "采购类别")
private Integer procurementCategory;
/**
* 采购方向
*/
@Excel(name = "采购方向", width = 15)
@ApiModelProperty(value = "采购方向")
private String procurementDirection;
/**
* 采购内容
*/
@Excel(name = "采购内容", width = 15)
@ApiModelProperty(value = "采购内容")
private String procurementContent;
/**
* 采购预算
*/
@Excel(name = "采购预算", width = 15)
@ApiModelProperty(value = "采购预算")
private String procurementBudget;
/**
* 附件
*/
@Excel(name = "附件", width = 15)
@ApiModelProperty(value = "附件")
private String annex;
/**
* 审核结果
*/
@Excel(name = "审核结果", width = 15)
@ApiModelProperty(value = "审核结果")
private String auditResults;
/**
* 采购方向
*/
@Excel(name = "是否被接受", width = 15)
@ApiModelProperty(value = "是否被接受")
private String isReceiving;
/**
* 供应商选择
*/
@Excel(name = "供应商选择", width = 15)
@ApiModelProperty(value = "供应商选择")
private java.lang.String supplierSelection;
/**
* 接单人
*/
@Excel(name = "接单人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "接单人")
private java.lang.String receiver;
/**
* 接单时间
*/
@Excel(name = "接单时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "接单时间")
private java.util.Date receivingTime;
/**
* 备注
*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private java.lang.String notes;
}

View File

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.Try.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.Try.entity.PurchaseAndOrder;
import org.jeecg.modules.demo.Try.entity.PurchaseRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface PurchaseRequestMapper extends BaseMapper<PurchaseRequest> {
@Select("select r.*,c.receiver,c.receiving_time,c.supplier_selection,c.notes from purchase_request r,purchase_order_confirmation c where r.requirement_number=c.association_number")
List<PurchaseAndOrder> getAllData();
}

View File

@ -1,9 +1,12 @@
package org.jeecg.modules.demo.Try.service;
import org.jeecg.modules.demo.Try.entity.PurchaseAndOrder;
import org.jeecg.modules.demo.Try.entity.PurchaseOrderConfirmation;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.Try.entity.PurchaseRequest;
import java.util.List;
/**
* @Description: 采购订单确认
* @Author: jeecg-boot
@ -15,4 +18,5 @@ public interface IPurchaseOrderConfirmationService extends IService<PurchaseOrde
PurchaseOrderConfirmation queryByRequireNo(String queryByRequireNo);
List<PurchaseAndOrder> queryAllConfirm();
}

View File

@ -1,14 +1,18 @@
package org.jeecg.modules.demo.Try.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.demo.Try.entity.PurchaseAndOrder;
import org.jeecg.modules.demo.Try.entity.PurchaseOrderConfirmation;
import org.jeecg.modules.demo.Try.mapper.PurchaseOrderConfirmationMapper;
import org.jeecg.modules.demo.Try.mapper.PurchaseRequestMapper;
import org.jeecg.modules.demo.Try.service.IPurchaseOrderConfirmationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 采购订单确认
* @Author: jeecg-boot
@ -20,6 +24,9 @@ public class PurchaseOrderConfirmationServiceImpl extends ServiceImpl<PurchaseOr
@Autowired
private PurchaseOrderConfirmationMapper purchaseOrderConfirmationMapper;
@Autowired
private PurchaseRequestMapper purchaseRequestMapper;
@Override
public PurchaseOrderConfirmation queryByRequireNo(PurchaseOrderConfirmation queryByRequireNo) {
return queryByRequireNo(queryByRequireNo.getAssociationNumber());
@ -31,4 +38,9 @@ public class PurchaseOrderConfirmationServiceImpl extends ServiceImpl<PurchaseOr
PurchaseOrderConfirmation purchaseOrderConfirmation = purchaseOrderConfirmationMapper.selectOne(queryWrapper);
return purchaseOrderConfirmation;
}
@Override
public List<PurchaseAndOrder> queryAllConfirm() {
return purchaseRequestMapper.getAllData();
}
}