Merge remote-tracking branch 'origin/master'

This commit is contained in:
sxu 2025-07-01 17:38:02 +08:00
commit 94741f61af
76 changed files with 4085 additions and 337 deletions

View File

@ -2,6 +2,8 @@ package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.canteen.core.ims.domain.vo.InspectGoodsVO;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
@ -42,26 +44,26 @@ public class InspectGoodsController extends BaseController {
*/
@ApiOperation(value = "查询验货单列表")
//@RequiresPermissions("ims:goods:list")
@GetMapping("/list")
public TableDataInfo list(InspectGoods inspectGoods) {
@PostMapping("/list")
public TableDataInfo list(@RequestBody InspectGoods inspectGoods) {
startPage();
List<InspectGoods> list = inspectGoodsService.selectInspectGoodsList(inspectGoods);
List<InspectGoodsVO> list = inspectGoodsService.selectInspectGoodsList(inspectGoods);
return getDataTable(list);
}
/**
* 导出验货单列表
*/
@ApiOperation(value = "导出验货单列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:goods:export")
@SysLog(title = "验货单", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出验货单")
@PostMapping("/export")
public void export(HttpServletResponse response, InspectGoods inspectGoods) {
List<InspectGoods> list = inspectGoodsService.selectInspectGoodsList(inspectGoods);
ExcelUtil<InspectGoods> util = new ExcelUtil<InspectGoods>(InspectGoods.class);
util.exportExcel(response, list, "验货单数据");
}
// @ApiOperation(value = "导出验货单列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:goods:export")
// @SysLog(title = "验货单", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出验货单")
// @PostMapping("/export")
// public void export(HttpServletResponse response, InspectGoods inspectGoods) {
// List<InspectGoods> list = inspectGoodsService.selectInspectGoodsList(inspectGoods);
// ExcelUtil<InspectGoods> util = new ExcelUtil<InspectGoods>(InspectGoods.class);
// util.exportExcel(response, list, "验货单数据");
// }
/**
* 获取验货单详细信息

View File

@ -2,10 +2,17 @@ package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.canteen.core.ims.domain.PurchaseContract;
import com.bonus.canteen.core.ims.domain.param.OrderGoodsAdd;
import com.bonus.canteen.core.ims.domain.param.OrderGoodsQuery;
import com.bonus.canteen.core.ims.domain.param.OrderGoodsUpdate;
import com.bonus.canteen.core.ims.domain.vo.OrderGoodsVO;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -42,26 +49,28 @@ public class OrderGoodsController extends BaseController {
*/
@ApiOperation(value = "查询采购订单主列表")
//@RequiresPermissions("ims:goods:list")
@GetMapping("/list")
public TableDataInfo list(OrderGoods orderGoods) {
@PostMapping("/list")
public TableDataInfo list(@RequestBody OrderGoodsQuery orderGoodsQuery) {
startPage();
List<OrderGoods> list = orderGoodsService.selectOrderGoodsList(orderGoods);
OrderGoods orderGoods = new OrderGoods();
BeanUtils.copyProperties(orderGoodsQuery, orderGoods);
List<OrderGoodsVO> list = orderGoodsService.selectOrderGoodsList(orderGoods);
return getDataTable(list);
}
/**
* 导出采购订单主列表
*/
@ApiOperation(value = "导出采购订单主列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:goods:export")
@SysLog(title = "采购订单主", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购订单主")
@PostMapping("/export")
public void export(HttpServletResponse response, OrderGoods orderGoods) {
List<OrderGoods> list = orderGoodsService.selectOrderGoodsList(orderGoods);
ExcelUtil<OrderGoods> util = new ExcelUtil<OrderGoods>(OrderGoods.class);
util.exportExcel(response, list, "采购订单主数据");
}
// @ApiOperation(value = "导出采购订单主列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:goods:export")
// @SysLog(title = "采购订单主", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购订单主")
// @PostMapping("/export")
// public void export(HttpServletResponse response, OrderGoods orderGoods) {
// List<OrderGoods> list = orderGoodsService.selectOrderGoodsList(orderGoods);
// ExcelUtil<OrderGoods> util = new ExcelUtil<OrderGoods>(OrderGoods.class);
// util.exportExcel(response, list, "采购订单主数据");
// }
/**
* 获取采购订单主详细信息
@ -81,8 +90,10 @@ public class OrderGoodsController extends BaseController {
//@RequiresPermissions("ims:goods:add")
@SysLog(title = "采购订单主", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增采购订单主")
@PostMapping
public AjaxResult add(@RequestBody OrderGoods orderGoods) {
public AjaxResult add(@RequestBody OrderGoodsAdd orderGoodsAdd) {
try {
OrderGoods orderGoods = new OrderGoods();
BeanUtils.copyProperties(orderGoodsAdd, orderGoods);
return toAjax(orderGoodsService.insertOrderGoods(orderGoods));
} catch (Exception e) {
return error(e.getMessage());
@ -97,8 +108,10 @@ public class OrderGoodsController extends BaseController {
//@RequiresPermissions("ims:goods:edit")
@SysLog(title = "采购订单主", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改采购订单主")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody OrderGoods orderGoods) {
public AjaxResult edit(@RequestBody OrderGoodsUpdate orderGoodsUpdate) {
try {
OrderGoods orderGoods = new OrderGoods();
BeanUtils.copyProperties(orderGoodsUpdate, orderGoods);
return toAjax(orderGoodsService.updateOrderGoods(orderGoods));
} catch (Exception e) {
return error(e.getMessage());

View File

@ -2,10 +2,17 @@ package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.bonus.canteen.core.ims.domain.param.PurchaseContractAdd;
import com.bonus.canteen.core.ims.domain.param.PurchaseContractQuery;
import com.bonus.canteen.core.ims.domain.param.PurchaseContractUpdate;
import com.bonus.canteen.core.ims.domain.vo.PurchaseContractVO;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -42,26 +49,28 @@ public class PurchaseContractController extends BaseController {
*/
@ApiOperation(value = "查询采购合同主列表")
//@RequiresPermissions("ims:contract:list")
@GetMapping("/list")
public TableDataInfo list(PurchaseContract purchaseContract) {
@PostMapping("/list")
public TableDataInfo list(@RequestBody PurchaseContractQuery purchaseContractQuery) {
startPage();
List<PurchaseContract> list = purchaseContractService.selectPurchaseContractList(purchaseContract);
PurchaseContract purchaseContract = new PurchaseContract();
BeanUtils.copyProperties(purchaseContractQuery, purchaseContract);
List<PurchaseContractVO> list = purchaseContractService.selectPurchaseContractList(purchaseContract);
return getDataTable(list);
}
/**
* 导出采购合同主列表
*/
@ApiOperation(value = "导出采购合同主列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:contract:export")
@SysLog(title = "采购合同主", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购合同主")
@PostMapping("/export")
public void export(HttpServletResponse response, PurchaseContract purchaseContract) {
List<PurchaseContract> list = purchaseContractService.selectPurchaseContractList(purchaseContract);
ExcelUtil<PurchaseContract> util = new ExcelUtil<PurchaseContract>(PurchaseContract.class);
util.exportExcel(response, list, "采购合同主数据");
}
// @ApiOperation(value = "导出采购合同主列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:contract:export")
// @SysLog(title = "采购合同主", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购合同主")
// @PostMapping("/export")
// public void export(HttpServletResponse response, PurchaseContract purchaseContract) {
// List<PurchaseContract> list = purchaseContractService.selectPurchaseContractList(purchaseContract);
// ExcelUtil<PurchaseContract> util = new ExcelUtil<PurchaseContract>(PurchaseContract.class);
// util.exportExcel(response, list, "采购合同主数据");
// }
/**
* 获取采购合同主详细信息
@ -81,8 +90,10 @@ public class PurchaseContractController extends BaseController {
//@RequiresPermissions("ims:contract:add")
@SysLog(title = "采购合同主", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增采购合同主")
@PostMapping
public AjaxResult add(@RequestBody PurchaseContract purchaseContract) {
public AjaxResult add(@RequestBody @Valid PurchaseContractAdd purchaseContractAdd) {
try {
PurchaseContract purchaseContract = new PurchaseContract();
BeanUtils.copyProperties(purchaseContractAdd, purchaseContract);
return toAjax(purchaseContractService.insertPurchaseContract(purchaseContract));
} catch (Exception e) {
return error(e.getMessage());
@ -97,8 +108,10 @@ public class PurchaseContractController extends BaseController {
//@RequiresPermissions("ims:contract:edit")
@SysLog(title = "采购合同主", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改采购合同主")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody PurchaseContract purchaseContract) {
public AjaxResult edit(@RequestBody @Valid PurchaseContractUpdate purchaseContractUpdate) {
try {
PurchaseContract purchaseContract = new PurchaseContract();
BeanUtils.copyProperties(purchaseContractUpdate, purchaseContract);
return toAjax(purchaseContractService.updatePurchaseContract(purchaseContract));
} catch (Exception e) {
return error(e.getMessage());

View File

@ -2,10 +2,16 @@ package com.bonus.canteen.core.ims.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.canteen.core.ims.domain.param.PurchasePlanAdd;
import com.bonus.canteen.core.ims.domain.param.PurchasePlanQuery;
import com.bonus.canteen.core.ims.domain.param.PurchasePlanUpdate;
import com.bonus.canteen.core.ims.domain.vo.PurchasePlanVO;
import com.bonus.common.log.enums.OperaType;
//import com.bonus.canteen.core.ims.common.annotation.PreventRepeatSubmit;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -42,26 +48,28 @@ public class PurchasePlanController extends BaseController {
*/
@ApiOperation(value = "查询采购计划列表")
//@RequiresPermissions("ims:plan:list")
@GetMapping("/list")
public TableDataInfo list(PurchasePlan purchasePlan) {
@PostMapping("/list")
public TableDataInfo list(@RequestBody PurchasePlanQuery purchasePlanQuery) {
startPage();
List<PurchasePlan> list = purchasePlanService.selectPurchasePlanList(purchasePlan);
PurchasePlan purchasePlan = new PurchasePlan();
BeanUtils.copyProperties(purchasePlanQuery, purchasePlan);
List<PurchasePlanVO> list = purchasePlanService.selectPurchasePlanList(purchasePlan);
return getDataTable(list);
}
/**
* 导出采购计划列表
*/
@ApiOperation(value = "导出采购计划列表")
//@PreventRepeatSubmit
//@RequiresPermissions("ims:plan:export")
@SysLog(title = "采购计划", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购计划")
@PostMapping("/export")
public void export(HttpServletResponse response, PurchasePlan purchasePlan) {
List<PurchasePlan> list = purchasePlanService.selectPurchasePlanList(purchasePlan);
ExcelUtil<PurchasePlan> util = new ExcelUtil<PurchasePlan>(PurchasePlan.class);
util.exportExcel(response, list, "采购计划数据");
}
// @ApiOperation(value = "导出采购计划列表")
// //@PreventRepeatSubmit
// //@RequiresPermissions("ims:plan:export")
// @SysLog(title = "采购计划", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购计划")
// @PostMapping("/export")
// public void export(HttpServletResponse response, PurchasePlan purchasePlan) {
// List<PurchasePlan> list = purchasePlanService.selectPurchasePlanList(purchasePlan);
// ExcelUtil<PurchasePlan> util = new ExcelUtil<PurchasePlan>(PurchasePlan.class);
// util.exportExcel(response, list, "采购计划数据");
// }
/**
* 获取采购计划详细信息
@ -81,8 +89,10 @@ public class PurchasePlanController extends BaseController {
//@RequiresPermissions("ims:plan:add")
@SysLog(title = "采购计划", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增采购计划")
@PostMapping
public AjaxResult add(@RequestBody PurchasePlan purchasePlan) {
public AjaxResult add(@RequestBody PurchasePlanAdd purchasePlanAdd) {
try {
PurchasePlan purchasePlan = new PurchasePlan();
BeanUtils.copyProperties(purchasePlanAdd, purchasePlan);
return toAjax(purchasePlanService.insertPurchasePlan(purchasePlan));
} catch (Exception e) {
return error(e.getMessage());
@ -97,8 +107,10 @@ public class PurchasePlanController extends BaseController {
//@RequiresPermissions("ims:plan:edit")
@SysLog(title = "采购计划", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改采购计划")
@PostMapping("/edit")
public AjaxResult edit(@RequestBody PurchasePlan purchasePlan) {
public AjaxResult edit(@RequestBody PurchasePlanUpdate purchasePlanUpdate) {
try {
PurchasePlan purchasePlan = new PurchasePlan();
BeanUtils.copyProperties(purchasePlanUpdate, purchasePlan);
return toAjax(purchasePlanService.updatePurchasePlan(purchasePlan));
} catch (Exception e) {
return error(e.getMessage());

View File

@ -52,7 +52,7 @@ public class SupplierController extends BaseController {
//@RequiresPermissions("ims:supplier:list")
@GetMapping("/list")
public TableDataInfo list(SupplierPageDTO supplierPageDTO) {
if(supplierPageDTO.getIsPaging() == 2){
if(supplierPageDTO.getIsPaging() == 2 || supplierPageDTO.getIsPaging() == null) {
startPage();
}
List<SupplierPageVO>list = supplierService.selectSupplierList(supplierPageDTO);

View File

@ -1,7 +1,11 @@
package com.bonus.canteen.core.ims.domain;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
@ -30,9 +34,9 @@ public class InspectGoods extends BaseEntity {
/** 验货时间 */
@ApiModelProperty(value = "验货时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "验货时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "验货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime inspectDate;
/** 验货人 */
@Excel(name = "验货人")
@ -78,7 +82,7 @@ public class InspectGoods extends BaseEntity {
@ApiModelProperty(value = "送货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date deliveryDate;
private LocalDate deliveryDate;
/** 验货合格总数量 */
@Excel(name = "验货合格总数量")
@ -105,5 +109,10 @@ public class InspectGoods extends BaseEntity {
@ApiModelProperty(value = "签名图片")
private String signaturePicUrl;
@Excel(name = "送货供应商名称")
@ApiModelProperty(value = "送货供应商名称")
private String deliverySupplierName;
private List<InspectGoodsDetail> inspectGoodsDetails;
}

View File

@ -78,5 +78,8 @@ public class InspectGoodsDetail extends BaseEntity {
@ApiModelProperty(value = "验货图片")
private String checkPicUrls;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
}

View File

@ -1,7 +1,10 @@
package com.bonus.canteen.core.ims.domain;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
@ -25,6 +28,11 @@ public class OrderGoods extends BaseEntity {
/** 采购订单id */
private Long orderGoodsId;
/** 采购单编号 */
@Excel(name = "采购单编号")
@ApiModelProperty(value = "采购单编号")
private String orderGoodsCode;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
@ -44,7 +52,7 @@ public class OrderGoods extends BaseEntity {
@ApiModelProperty(value = "期望交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "期望交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date requestArrivalTime;
private LocalDate requestArrivalTime;
/** 地址 */
@Excel(name = "地址")
@ -68,7 +76,7 @@ public class OrderGoods extends BaseEntity {
/** 采购审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
private Integer approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ -102,9 +110,9 @@ public class OrderGoods extends BaseEntity {
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date approveTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 档口ID */
@Excel(name = "档口ID")
@ -123,9 +131,9 @@ public class OrderGoods extends BaseEntity {
/** 供应商确认时间 */
@ApiModelProperty(value = "供应商确认时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "供应商确认时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date confirmTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "供应商确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmTime;
/** 供应商确认备注 */
@Excel(name = "供应商确认备注")
@ -140,5 +148,26 @@ public class OrderGoods extends BaseEntity {
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "供应商名称")
@ApiModelProperty(value = "供应商名称")
private String supplierName;
@Excel(name = "仓库名称")
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
@Excel(name = "区域名称")
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称")
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "档口名称")
private String stallName;
private List<OrderGoodsDetail> orderGoodsDetailList;
}

View File

@ -81,5 +81,12 @@ public class OrderGoodsDetail extends BaseEntity {
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -1,7 +1,10 @@
package com.bonus.canteen.core.ims.domain;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
@ -9,6 +12,8 @@ import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
import javax.validation.constraints.NotNull;
/**
* 采购合同主对象 ims_purchase_contract
*
@ -38,10 +43,10 @@ public class PurchaseContract extends BaseEntity {
@ApiModelProperty(value = "合同提交状态(1待提交,2已提交)")
private Long commitStatus;
/** 合同状态(待生效,2履行中3已失效4已终止) */
@Excel(name = "合同状态(待生效,2履行中3已失效4已终止)")
/** 合同状态(1待生效,2履行中3已失效4已终止) */
@Excel(name = "合同状态(1待生效,2履行中3已失效4已终止)")
@ApiModelProperty(value = "合同状态(待生效,2履行中3已失效4已终止)")
private Long contractStatus;
private Integer contractStatus;
/** 合同总金额 */
@Excel(name = "合同总金额")
@ -57,7 +62,13 @@ public class PurchaseContract extends BaseEntity {
@ApiModelProperty(value = "合同签订日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date contractSigningTime;
@NotNull(message = "合同签订日期不能为空")
private LocalDate contractSigningTime;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ -71,20 +82,22 @@ public class PurchaseContract extends BaseEntity {
/** 合同开始时间 */
@ApiModelProperty(value = "合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date contractStartTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同签订时间不能为空")
private LocalDateTime contractStartTime;
/** 合同结束时间 */
@ApiModelProperty(value = "合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date contractEndTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同结束时间不能为空")
private LocalDateTime contractEndTime;
/** 合同审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
private Integer approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ -98,9 +111,9 @@ public class PurchaseContract extends BaseEntity {
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date approveTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ -126,7 +139,7 @@ public class PurchaseContract extends BaseEntity {
@ApiModelProperty(value = "付款日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date payMoneyDate;
private LocalDate payMoneyDate;
/** 收款银行 */
@Excel(name = "收款银行")
@ -161,5 +174,29 @@ public class PurchaseContract extends BaseEntity {
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "区域名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "供应商名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "供应商名称")
private String supplierName;
@ApiModelProperty(value = "查询字符串")
private String searchValue;
@ApiModelProperty("合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startDateTime;
@ApiModelProperty("合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endDateTime;
private List<PurchaseContractDetail> purchaseContractDetailList;
}

View File

@ -64,5 +64,13 @@ public class PurchaseContractDetail extends BaseEntity {
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -1,6 +1,10 @@
package com.bonus.canteen.core.ims.domain;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
@ -36,9 +40,9 @@ public class PurchasePlan extends BaseEntity {
/** 采购计划时间 */
@ApiModelProperty(value = "采购计划时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "采购计划时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date purchaseDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "采购计划时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime purchaseDate;
/** 采购员id */
@Excel(name = "采购员id")
@ -53,7 +57,7 @@ public class PurchasePlan extends BaseEntity {
/** 采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝) */
@Excel(name = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
@ApiModelProperty(value = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
private Long approveStatus;
private Integer approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ -65,6 +69,11 @@ public class PurchasePlan extends BaseEntity {
@ApiModelProperty(value = "关联采购订单号")
private String relatePlanIds;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂id */
@Excel(name = "食堂id")
@ApiModelProperty(value = "食堂id")
@ -92,9 +101,9 @@ public class PurchasePlan extends BaseEntity {
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date approveTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ -110,10 +119,26 @@ public class PurchasePlan extends BaseEntity {
@ApiModelProperty(value = "交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date deliverGoodsDate;
private LocalDate deliverGoodsDate;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "区域名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称")
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "档口名称")
private String stallName;
@Excel(name = "供应商名称")
@ApiModelProperty(value = "供应商名称")
private String supplierNames;
private List<PurchasePlanDetail> purchasePlanDetailList;
}

View File

@ -86,5 +86,16 @@ public class PurchasePlanDetail extends BaseEntity {
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "材料单位名称")
@ApiModelProperty(value = "材料单位名称")
private String unitName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "材料名称")
private String stallName;
}

View File

@ -0,0 +1,32 @@
package com.bonus.canteen.core.ims.domain.constants;
public enum ApproveStatusEnum {
WAIT_APPROVE(1, "待审批"),
IN_PROGRESS(2, "审批中"),
APPROVED(3, "审批通过"),
REJECTED(4, "审批拒绝");
private final Integer key;
private final String desc;
private ApproveStatusEnum(Integer key, String desc) {
this.key = key;
this.desc = desc;
}
public Integer getKey() {
return this.key;
}
public String getDesc() {
return this.desc;
}
public static String getDescByKey(Integer targetKey) {
for (ApproveStatusEnum approveStatusEnum : ApproveStatusEnum.values()) {
if (approveStatusEnum.getKey().equals(targetKey)) {
return approveStatusEnum.getDesc();
}
}
return "";
}
}

View File

@ -0,0 +1,32 @@
package com.bonus.canteen.core.ims.domain.constants;
public enum PurchaseContractStatusEnum {
WAIT_EFFECT(1, "待生效"),
TAKE_EFFECT(2, "履行中"),
EXPIRED(3, "已失效"),
END(4, "已中止");
private final Integer key;
private final String desc;
private PurchaseContractStatusEnum(Integer key, String desc) {
this.key = key;
this.desc = desc;
}
public Integer getKey() {
return this.key;
}
public String getDesc() {
return this.desc;
}
public static String getDescByKey(Integer targetKey) {
for (PurchaseContractStatusEnum contractStatusEnum : PurchaseContractStatusEnum.values()) {
if (contractStatusEnum.getKey().equals(targetKey)) {
return contractStatusEnum.getDesc();
}
}
return "";
}
}

View File

@ -0,0 +1,113 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 验货单对象 ims_inspect_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 验货时间 */
@ApiModelProperty(value = "验货时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "验货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime inspectDate;
/** 验货人 */
@Excel(name = "验货人")
@ApiModelProperty(value = "验货人")
private String inspector;
/** 提交状态(1待提交,2已提交) */
@Excel(name = "提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "提交状态(1待提交,2已提交)")
private Long status;
/** 关联送货单号 */
@Excel(name = "关联送货单号")
@ApiModelProperty(value = "关联送货单号")
private String relateDeliveryGoodsId;
/** 送货供应商id */
@Excel(name = "送货供应商id")
@ApiModelProperty(value = "送货供应商id")
private Long deliverySupplierId;
/** 送货人 */
@Excel(name = "送货人")
@ApiModelProperty(value = "送货人")
private String deliveryMan;
/** 送货人电话 */
@Excel(name = "送货人电话")
@ApiModelProperty(value = "送货人电话")
private String deliveryPhone;
/** 送货仓库 */
@Excel(name = "送货仓库")
@ApiModelProperty(value = "送货仓库")
private Long deliveryWarehouseId;
/** 送货总数量 */
@Excel(name = "送货总数量")
@ApiModelProperty(value = "送货总数量")
private BigDecimal deliveryTotalNum;
/** 送货日期 */
@ApiModelProperty(value = "送货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliveryDate;
/** 验货合格总数量 */
@Excel(name = "验货合格总数量")
@ApiModelProperty(value = "验货合格总数量")
private BigDecimal inspectQualifiedNum;
/** 累计合格总数量 */
@Excel(name = "累计合格总数量")
@ApiModelProperty(value = "累计合格总数量")
private BigDecimal totalQualifiedNum;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relateOrderGoodsId;
/** 是否入库(1是2否) */
@Excel(name = "是否入库(1是2否)")
@ApiModelProperty(value = "是否入库(1是2否)")
private Long ifInto;
/** 签名图片 */
@Excel(name = "签名图片")
@ApiModelProperty(value = "签名图片")
private String signaturePicUrl;
@Excel(name = "送货供应商名称")
@ApiModelProperty(value = "送货供应商名称")
private String deliverySupplierName;
private List<InspectGoodsDetailAdd> inspectGoodsDetails;
}

View File

@ -0,0 +1,74 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 验货单明细对象 ims_inspect_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsDetailAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 送货明细id */
@Excel(name = "送货明细id")
@ApiModelProperty(value = "送货明细id")
private Long deliveryGoodsDetailId;
/** 货品id */
@Excel(name = "货品id")
@ApiModelProperty(value = "货品id")
private Long materialId;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long unitPrice;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 送货数量 */
@Excel(name = "送货数量")
@ApiModelProperty(value = "送货数量")
private BigDecimal deliveryNum;
/** 累计合格数量 */
@Excel(name = "累计合格数量")
@ApiModelProperty(value = "累计合格数量")
private BigDecimal totalQualifiedNum;
/** 本次合格数量 */
@Excel(name = "本次合格数量")
@ApiModelProperty(value = "本次合格数量")
private BigDecimal qualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 验货图片 */
@Excel(name = "验货图片")
@ApiModelProperty(value = "验货图片")
private String checkPicUrls;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
}

View File

@ -0,0 +1,70 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 验货单明细对象 ims_inspect_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsDetailUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 送货明细id */
@Excel(name = "送货明细id")
@ApiModelProperty(value = "送货明细id")
private Long deliveryGoodsDetailId;
/** 货品id */
@Excel(name = "货品id")
@ApiModelProperty(value = "货品id")
private Long materialId;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long unitPrice;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 送货数量 */
@Excel(name = "送货数量")
@ApiModelProperty(value = "送货数量")
private BigDecimal deliveryNum;
/** 累计合格数量 */
@Excel(name = "累计合格数量")
@ApiModelProperty(value = "累计合格数量")
private BigDecimal totalQualifiedNum;
/** 本次合格数量 */
@Excel(name = "本次合格数量")
@ApiModelProperty(value = "本次合格数量")
private BigDecimal qualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 验货图片 */
@Excel(name = "验货图片")
@ApiModelProperty(value = "验货图片")
private String checkPicUrls;
}

View File

@ -0,0 +1,55 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 验货单对象 ims_inspect_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsQuery implements Serializable {
private static final long serialVersionUID = 1L;
/** 验货单编号 */
private String inspectGoodsCode;
/** 提交状态(1待提交,2已提交) */
@Excel(name = "提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "提交状态(1待提交,2已提交)")
private Long status;
/** 送货供应商id */
@Excel(name = "送货供应商id")
@ApiModelProperty(value = "送货供应商id")
private Long deliverySupplierId;
/** 是否入库(1是2否) */
@Excel(name = "是否入库(1是2否)")
@ApiModelProperty(value = "是否入库(1是2否)")
private Long ifInto;
@ApiModelProperty("开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startDateTime;
@ApiModelProperty("结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endDateTime;
}

View File

@ -0,0 +1,112 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 验货单对象 ims_inspect_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 验货单id */
private Long inspectGoodsId;
/** 验货时间 */
@ApiModelProperty(value = "验货时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "验货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime inspectDate;
/** 验货人 */
@Excel(name = "验货人")
@ApiModelProperty(value = "验货人")
private String inspector;
/** 提交状态(1待提交,2已提交) */
@Excel(name = "提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "提交状态(1待提交,2已提交)")
private Long status;
/** 关联送货单号 */
@Excel(name = "关联送货单号")
@ApiModelProperty(value = "关联送货单号")
private String relateDeliveryGoodsId;
/** 送货供应商id */
@Excel(name = "送货供应商id")
@ApiModelProperty(value = "送货供应商id")
private Long deliverySupplierId;
/** 送货人 */
@Excel(name = "送货人")
@ApiModelProperty(value = "送货人")
private String deliveryMan;
/** 送货人电话 */
@Excel(name = "送货人电话")
@ApiModelProperty(value = "送货人电话")
private String deliveryPhone;
/** 送货仓库 */
@Excel(name = "送货仓库")
@ApiModelProperty(value = "送货仓库")
private Long deliveryWarehouseId;
/** 送货总数量 */
@Excel(name = "送货总数量")
@ApiModelProperty(value = "送货总数量")
private BigDecimal deliveryTotalNum;
/** 送货日期 */
@ApiModelProperty(value = "送货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliveryDate;
/** 验货合格总数量 */
@Excel(name = "验货合格总数量")
@ApiModelProperty(value = "验货合格总数量")
private BigDecimal inspectQualifiedNum;
/** 累计合格总数量 */
@Excel(name = "累计合格总数量")
@ApiModelProperty(value = "累计合格总数量")
private BigDecimal totalQualifiedNum;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relateOrderGoodsId;
/** 是否入库(1是2否) */
@Excel(name = "是否入库(1是2否)")
@ApiModelProperty(value = "是否入库(1是2否)")
private Long ifInto;
/** 签名图片 */
@Excel(name = "签名图片")
@ApiModelProperty(value = "签名图片")
private String signaturePicUrl;
private List<InspectGoodsDetailUpdate> inspectGoodsDetails;
}

View File

@ -0,0 +1,144 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购订单主对象 ims_order_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 订单状态(1待提交,2已提交) */
@Excel(name = "订单状态(1待提交,2已提交)")
@ApiModelProperty(value = "订单状态(1待提交,2已提交)")
private Long orderStatus;
/** 订单总金额 */
@Excel(name = "订单总金额")
@ApiModelProperty(value = "订单总金额")
private Long orderAmount;
/** 期望交货日期 */
@ApiModelProperty(value = "期望交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "期望交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate requestArrivalTime;
/** 地址 */
@Excel(name = "地址")
@ApiModelProperty(value = "地址")
private String supplyAddress;
/** 仓库id */
@Excel(name = "仓库id")
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/** 是否已经拆单1是2否 */
@Excel(name = "是否已经拆单", readConverterExp = "1=是2否")
private Long ifDismantle;
/** 订单标题 */
@Excel(name = "订单标题")
@ApiModelProperty(value = "订单标题")
private String orderTitle;
/** 采购审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ApiModelProperty(value = "审批流程id")
private Long processInstanceId;
/** 供应商待确认状态(1待确认,2确认通过,3已拒绝) */
@Excel(name = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
@ApiModelProperty(value = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
private Long supplierConfirmStatus;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 订单数量 */
@Excel(name = "订单数量")
@ApiModelProperty(value = "订单数量")
private BigDecimal totalNum;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal totalIntoNum;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private String stallId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 供应商确认时间 */
@ApiModelProperty(value = "供应商确认时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "供应商确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmTime;
/** 供应商确认备注 */
@Excel(name = "供应商确认备注")
@ApiModelProperty(value = "供应商确认备注")
private String confirmRemark;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
private List<OrderGoodsDetailAdd> orderGoodsDetailList;
}

View File

@ -0,0 +1,83 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购订单明细对象 ims_order_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsDetailAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal intoNum;
/** 不合格数量 */
@Excel(name = "不合格数量")
@ApiModelProperty(value = "不合格数量")
private BigDecimal unqualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,83 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购订单明细对象 ims_order_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsDetailUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal intoNum;
/** 不合格数量 */
@Excel(name = "不合格数量")
@ApiModelProperty(value = "不合格数量")
private BigDecimal unqualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,67 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购订单主对象 ims_order_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsQuery implements Serializable {
private static final long serialVersionUID = 1L;
/** 采购单编号 */
@Excel(name = "采购单编号")
@ApiModelProperty(value = "采购单编号")
private String orderGoodsCode;
/** 订单状态(1待提交,2已提交) */
@Excel(name = "订单状态(1待提交,2已提交)")
@ApiModelProperty(value = "订单状态(1待提交,2已提交)")
private Long orderStatus;
@Excel(name = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
@ApiModelProperty(value = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
private Long supplierConfirmStatus;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private String stallId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
@ApiModelProperty("开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startDateTime;
@ApiModelProperty("结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endDateTime;
}

View File

@ -0,0 +1,147 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购订单主对象 ims_order_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 采购订单id */
private Long orderGoodsId;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 订单状态(1待提交,2已提交) */
@Excel(name = "订单状态(1待提交,2已提交)")
@ApiModelProperty(value = "订单状态(1待提交,2已提交)")
private Long orderStatus;
/** 订单总金额 */
@Excel(name = "订单总金额")
@ApiModelProperty(value = "订单总金额")
private Long orderAmount;
/** 期望交货日期 */
@ApiModelProperty(value = "期望交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "期望交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate requestArrivalTime;
/** 地址 */
@Excel(name = "地址")
@ApiModelProperty(value = "地址")
private String supplyAddress;
/** 仓库id */
@Excel(name = "仓库id")
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/** 是否已经拆单1是2否 */
@Excel(name = "是否已经拆单", readConverterExp = "1=是2否")
private Long ifDismantle;
/** 订单标题 */
@Excel(name = "订单标题")
@ApiModelProperty(value = "订单标题")
private String orderTitle;
/** 采购审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ApiModelProperty(value = "审批流程id")
private Long processInstanceId;
/** 供应商待确认状态(1待确认,2确认通过,3已拒绝) */
@Excel(name = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
@ApiModelProperty(value = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
private Long supplierConfirmStatus;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 订单数量 */
@Excel(name = "订单数量")
@ApiModelProperty(value = "订单数量")
private BigDecimal totalNum;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal totalIntoNum;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private String stallId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 供应商确认时间 */
@ApiModelProperty(value = "供应商确认时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "供应商确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmTime;
/** 供应商确认备注 */
@Excel(name = "供应商确认备注")
@ApiModelProperty(value = "供应商确认备注")
private String confirmRemark;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
private List<OrderGoodsDetailUpdate> orderGoodsDetailList;
}

View File

@ -0,0 +1,150 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.PurchaseContractDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购合同主对象 ims_purchase_contract
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 合同提交状态(1待提交,2已提交) */
@Excel(name = "合同提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "合同提交状态(1待提交,2已提交)")
private Long commitStatus;
/** 合同状态(1待生效,2履行中3已失效4已终止) */
@Excel(name = "合同状态(1待生效,2履行中3已失效4已终止)")
@ApiModelProperty(value = "合同状态(待生效,2履行中3已失效4已终止)")
private Integer contractStatus;
/** 合同总金额 */
@Excel(name = "合同总金额")
@ApiModelProperty(value = "合同总金额")
private Long contractAmount;
/** 采购订单金额 */
@Excel(name = "采购订单金额")
@ApiModelProperty(value = "采购订单金额")
private Long orderGoodsAmount;
/** 合同签订日期 */
@ApiModelProperty(value = "合同签订日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
@NotNull(message = "合同签订日期不能为空")
private LocalDate contractSigningTime;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 合同标题 */
@Excel(name = "合同标题")
@ApiModelProperty(value = "合同标题")
private String contractTitle;
/** 合同开始时间 */
@ApiModelProperty(value = "合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同签订时间不能为空")
private LocalDateTime contractStartTime;
/** 合同结束时间 */
@ApiModelProperty(value = "合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同结束时间不能为空")
private LocalDateTime contractEndTime;
/** 合同审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
/** 合同货品数量 */
@Excel(name = "合同货品数量")
@ApiModelProperty(value = "合同货品数量")
private BigDecimal totalNum;
/** 类别数量 */
@Excel(name = "类别数量")
@ApiModelProperty(value = "类别数量")
private Long categoryNum;
/** 付款方式(1一次性付款,2分期付款) */
@Excel(name = "付款方式(1一次性付款,2分期付款)")
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
private Long payMoneyStyle;
/** 付款日期 */
@ApiModelProperty(value = "付款日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate payMoneyDate;
/** 收款银行 */
@Excel(name = "收款银行")
@ApiModelProperty(value = "收款银行")
private String collectMoneyBank;
/** 收款账号 */
@Excel(name = "收款账号")
@ApiModelProperty(value = "收款账号")
private String collectMoneyAccount;
/** 账户名称 */
@Excel(name = "账户名称")
@ApiModelProperty(value = "账户名称")
private String collectMoneyAccountName;
/** 付款备注 */
@Excel(name = "付款备注")
@ApiModelProperty(value = "付款备注")
private String payRemark;
/** 合同附件,多个则逗号分隔 */
@Excel(name = "合同附件,多个则逗号分隔")
@ApiModelProperty(value = "合同附件,多个则逗号分隔")
private String contractAttachment;
/** 负责人 */
@Excel(name = "负责人")
@ApiModelProperty(value = "负责人")
private String contractPerson;
private List<PurchaseContractDetailAdd> purchaseContractDetailList;
}

View File

@ -0,0 +1,64 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购合同明细对象 ims_purchase_contract_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractDetailAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,64 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购合同明细对象 ims_purchase_contract_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractDetailUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,52 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 采购合同主对象 ims_purchase_contract
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractQuery implements Serializable {
private static final long serialVersionUID = 1L;
/** 合同提交状态(1待提交,2已提交) */
@ApiModelProperty(value = "合同提交状态(1待提交,2已提交)")
private Long commitStatus;
/** 合同状态(1待生效,2履行中3已失效4已终止) */
@ApiModelProperty(value = "合同状态(待生效,2履行中3已失效4已终止)")
private Integer contractStatus;
/** 区域ID */
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂ID */
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
@ApiModelProperty(value = "查询字符串")
private String searchValue;
@ApiModelProperty("合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startDateTime;
@ApiModelProperty("合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endDateTime;
}

View File

@ -0,0 +1,148 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.PurchaseContractDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购合同主对象 ims_purchase_contract
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 合同主键id */
private Long contractId;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 合同提交状态(1待提交,2已提交) */
@Excel(name = "合同提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "合同提交状态(1待提交,2已提交)")
private Long commitStatus;
/** 合同状态(1待生效,2履行中3已失效4已终止) */
@Excel(name = "合同状态(1待生效,2履行中3已失效4已终止)")
@ApiModelProperty(value = "合同状态(待生效,2履行中3已失效4已终止)")
private Integer contractStatus;
/** 合同总金额 */
@Excel(name = "合同总金额")
@ApiModelProperty(value = "合同总金额")
private Long contractAmount;
/** 采购订单金额 */
@Excel(name = "采购订单金额")
@ApiModelProperty(value = "采购订单金额")
private Long orderGoodsAmount;
/** 合同签订日期 */
@ApiModelProperty(value = "合同签订日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
@NotNull(message = "合同签订日期不能为空")
private LocalDate contractSigningTime;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 合同标题 */
@Excel(name = "合同标题")
@ApiModelProperty(value = "合同标题")
private String contractTitle;
/** 合同开始时间 */
@ApiModelProperty(value = "合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同签订时间不能为空")
private LocalDateTime contractStartTime;
/** 合同结束时间 */
@ApiModelProperty(value = "合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同结束时间不能为空")
private LocalDateTime contractEndTime;
/** 合同货品数量 */
@Excel(name = "合同货品数量")
@ApiModelProperty(value = "合同货品数量")
private BigDecimal totalNum;
/** 类别数量 */
@Excel(name = "类别数量")
@ApiModelProperty(value = "类别数量")
private Long categoryNum;
/** 付款方式(1一次性付款,2分期付款) */
@Excel(name = "付款方式(1一次性付款,2分期付款)")
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
private Long payMoneyStyle;
/** 付款日期 */
@ApiModelProperty(value = "付款日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate payMoneyDate;
/** 收款银行 */
@Excel(name = "收款银行")
@ApiModelProperty(value = "收款银行")
private String collectMoneyBank;
/** 收款账号 */
@Excel(name = "收款账号")
@ApiModelProperty(value = "收款账号")
private String collectMoneyAccount;
/** 账户名称 */
@Excel(name = "账户名称")
@ApiModelProperty(value = "账户名称")
private String collectMoneyAccountName;
/** 付款备注 */
@Excel(name = "付款备注")
@ApiModelProperty(value = "付款备注")
private String payRemark;
/** 合同附件,多个则逗号分隔 */
@Excel(name = "合同附件,多个则逗号分隔")
@ApiModelProperty(value = "合同附件,多个则逗号分隔")
private String contractAttachment;
/** 负责人 */
@Excel(name = "负责人")
@ApiModelProperty(value = "负责人")
private String contractPerson;
private List<PurchaseContractDetailUpdate> purchaseContractDetailList;
}

View File

@ -0,0 +1,113 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.PurchasePlanDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购计划对象 ims_purchase_plan
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 采购计划状态(1-待发布,2-已发布) */
@Excel(name = "采购计划状态(1-待发布,2-已发布)")
@ApiModelProperty(value = "采购计划状态(1-待发布,2-已发布)")
private Long status;
/** 采购计划时间 */
@ApiModelProperty(value = "采购计划时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "采购计划时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime purchaseDate;
/** 采购员id */
@Excel(name = "采购员id")
@ApiModelProperty(value = "采购员id")
private Long purchaseUserId;
/** 采购计划Id,逗号分隔存储 */
@Excel(name = "采购计划Id,逗号分隔存储")
@ApiModelProperty(value = "采购计划Id,逗号分隔存储")
private String productionPlanId;
/** 采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝) */
@Excel(name = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
@ApiModelProperty(value = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
private Long approveStatus;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relatePlanIds;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂id */
@Excel(name = "食堂id")
@ApiModelProperty(value = "食堂id")
private Long canteenId;
/** 档口id */
@Excel(name = "档口id")
@ApiModelProperty(value = "档口id")
private String stallId;
/** 预计采购预算 */
@Excel(name = "预计采购预算")
@ApiModelProperty(value = "预计采购预算")
private Long purchaseBudgetTotal;
/** 供应商ID */
@Excel(name = "供应商ID")
@ApiModelProperty(value = "供应商ID")
private String supplierIds;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 是否合并(1是2否) */
@Excel(name = "是否合并(1是2否)")
@ApiModelProperty(value = "是否合并(1是2否)")
private Long ifMerge;
/** 交货日期 */
@ApiModelProperty(value = "交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliverGoodsDate;
private List<PurchasePlanDetailAdd> purchasePlanDetailList;
}

View File

@ -0,0 +1,87 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购计划详情对象 ims_purchase_plan_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanDetailAdd implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long unitPrice;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 采购数量 */
@Excel(name = "采购数量")
@ApiModelProperty(value = "采购数量")
private BigDecimal purchaseNum;
/** 生产计划数量 */
@Excel(name = "生产计划数量")
@ApiModelProperty(value = "生产计划数量")
private BigDecimal productionPlanNum;
/** 当前库存数 */
@Excel(name = "当前库存数")
@ApiModelProperty(value = "当前库存数")
private BigDecimal inventoryNum;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long purchaseBudgetPrice;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private Long stallId;
/** 原始数量 */
@Excel(name = "原始数量")
@ApiModelProperty(value = "原始数量")
private BigDecimal originalQuantity;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "材料单位名称")
@ApiModelProperty(value = "材料单位名称")
private String unitName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "材料名称")
private String stallName;
}

View File

@ -0,0 +1,87 @@
package com.bonus.canteen.core.ims.domain.param;
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;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 采购计划详情对象 ims_purchase_plan_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanDetailUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long unitPrice;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 采购数量 */
@Excel(name = "采购数量")
@ApiModelProperty(value = "采购数量")
private BigDecimal purchaseNum;
/** 生产计划数量 */
@Excel(name = "生产计划数量")
@ApiModelProperty(value = "生产计划数量")
private BigDecimal productionPlanNum;
/** 当前库存数 */
@Excel(name = "当前库存数")
@ApiModelProperty(value = "当前库存数")
private BigDecimal inventoryNum;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long purchaseBudgetPrice;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private Long stallId;
/** 原始数量 */
@Excel(name = "原始数量")
@ApiModelProperty(value = "原始数量")
private BigDecimal originalQuantity;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "材料单位名称")
@ApiModelProperty(value = "材料单位名称")
private String unitName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "材料名称")
private String stallName;
}

View File

@ -0,0 +1,56 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.canteen.core.ims.domain.PurchasePlanDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购计划对象 ims_purchase_plan
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanQuery implements Serializable {
private static final long serialVersionUID = 1L;
/** 采购计划状态(1-待发布,2-已发布) */
@ApiModelProperty(value = "采购计划状态(1-待发布,2-已发布)")
private Long status;
@ApiModelProperty(value = "采购计划单号")
private String planCode;
/** 区域ID */
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂id */
@ApiModelProperty(value = "食堂id")
private Long canteenId;
/** 档口id */
@ApiModelProperty(value = "档口id")
private String stallId;
@ApiModelProperty("合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime startDateTime;
@ApiModelProperty("合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime endDateTime;
}

View File

@ -0,0 +1,114 @@
package com.bonus.canteen.core.ims.domain.param;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购计划对象 ims_purchase_plan
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanUpdate implements Serializable {
private static final long serialVersionUID = 1L;
/** 计划id */
private Long planId;
/** 采购计划状态(1-待发布,2-已发布) */
@Excel(name = "采购计划状态(1-待发布,2-已发布)")
@ApiModelProperty(value = "采购计划状态(1-待发布,2-已发布)")
private Long status;
/** 采购计划时间 */
@ApiModelProperty(value = "采购计划时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "采购计划时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime purchaseDate;
/** 采购员id */
@Excel(name = "采购员id")
@ApiModelProperty(value = "采购员id")
private Long purchaseUserId;
/** 采购计划Id,逗号分隔存储 */
@Excel(name = "采购计划Id,逗号分隔存储")
@ApiModelProperty(value = "采购计划Id,逗号分隔存储")
private String productionPlanId;
/** 采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝) */
@Excel(name = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
@ApiModelProperty(value = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
private Long approveStatus;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relatePlanIds;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂id */
@Excel(name = "食堂id")
@ApiModelProperty(value = "食堂id")
private Long canteenId;
/** 档口id */
@Excel(name = "档口id")
@ApiModelProperty(value = "档口id")
private String stallId;
/** 预计采购预算 */
@Excel(name = "预计采购预算")
@ApiModelProperty(value = "预计采购预算")
private Long purchaseBudgetTotal;
/** 供应商ID */
@Excel(name = "供应商ID")
@ApiModelProperty(value = "供应商ID")
private String supplierIds;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 是否合并(1是2否) */
@Excel(name = "是否合并(1是2否)")
@ApiModelProperty(value = "是否合并(1是2否)")
private Long ifMerge;
/** 交货日期 */
@ApiModelProperty(value = "交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliverGoodsDate;
private List<PurchasePlanDetailUpdate> purchasePlanDetailList;
}

View File

@ -0,0 +1,86 @@
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;
import java.math.BigDecimal;
/**
* 验货单明细对象 ims_inspect_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsDetailVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 验货明细id */
private Long inspectGoodsDetailId;
/** 验货单id */
@Excel(name = "验货单id")
@ApiModelProperty(value = "验货单id")
private Long inspectGoodsId;
/** 验货单号 */
@Excel(name = "验货单号")
@ApiModelProperty(value = "验货单号")
private String inspectGoodsCode;
/** 送货明细id */
@Excel(name = "送货明细id")
@ApiModelProperty(value = "送货明细id")
private Long deliveryGoodsDetailId;
/** 货品id */
@Excel(name = "货品id")
@ApiModelProperty(value = "货品id")
private Long materialId;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long unitPrice;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 送货数量 */
@Excel(name = "送货数量")
@ApiModelProperty(value = "送货数量")
private BigDecimal deliveryNum;
/** 累计合格数量 */
@Excel(name = "累计合格数量")
@ApiModelProperty(value = "累计合格数量")
private BigDecimal totalQualifiedNum;
/** 本次合格数量 */
@Excel(name = "本次合格数量")
@ApiModelProperty(value = "本次合格数量")
private BigDecimal qualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 验货图片 */
@Excel(name = "验货图片")
@ApiModelProperty(value = "验货图片")
private String checkPicUrls;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
}

View File

@ -0,0 +1,118 @@
package com.bonus.canteen.core.ims.domain.vo;
import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 验货单对象 ims_inspect_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class InspectGoodsVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 验货单id */
private Long inspectGoodsId;
/** 验货单编号 */
private String inspectGoodsCode;
/** 验货时间 */
@ApiModelProperty(value = "验货时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "验货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime inspectDate;
/** 验货人 */
@Excel(name = "验货人")
@ApiModelProperty(value = "验货人")
private String inspector;
/** 提交状态(1待提交,2已提交) */
@Excel(name = "提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "提交状态(1待提交,2已提交)")
private Long status;
/** 关联送货单号 */
@Excel(name = "关联送货单号")
@ApiModelProperty(value = "关联送货单号")
private String relateDeliveryGoodsId;
/** 送货供应商id */
@Excel(name = "送货供应商id")
@ApiModelProperty(value = "送货供应商id")
private Long deliverySupplierId;
/** 送货人 */
@Excel(name = "送货人")
@ApiModelProperty(value = "送货人")
private String deliveryMan;
/** 送货人电话 */
@Excel(name = "送货人电话")
@ApiModelProperty(value = "送货人电话")
private String deliveryPhone;
/** 送货仓库 */
@Excel(name = "送货仓库")
@ApiModelProperty(value = "送货仓库")
private Long deliveryWarehouseId;
/** 送货总数量 */
@Excel(name = "送货总数量")
@ApiModelProperty(value = "送货总数量")
private BigDecimal deliveryTotalNum;
/** 送货日期 */
@ApiModelProperty(value = "送货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "送货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliveryDate;
/** 验货合格总数量 */
@Excel(name = "验货合格总数量")
@ApiModelProperty(value = "验货合格总数量")
private BigDecimal inspectQualifiedNum;
/** 累计合格总数量 */
@Excel(name = "累计合格总数量")
@ApiModelProperty(value = "累计合格总数量")
private BigDecimal totalQualifiedNum;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relateOrderGoodsId;
/** 是否入库(1是2否) */
@Excel(name = "是否入库(1是2否)")
@ApiModelProperty(value = "是否入库(1是2否)")
private Long ifInto;
/** 签名图片 */
@Excel(name = "签名图片")
@ApiModelProperty(value = "签名图片")
private String signaturePicUrl;
@Excel(name = "送货供应商名称")
@ApiModelProperty(value = "送货供应商名称")
private String deliverySupplierName;
private List<InspectGoodsDetailVO> inspectGoodsDetails;
}

View File

@ -0,0 +1,90 @@
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;
import java.math.BigDecimal;
/**
* 采购订单明细对象 ims_order_goods_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsDetailVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 订货明细id */
private Long orderGoodsDetailId;
/** 订货单id */
@Excel(name = "订货单id")
@ApiModelProperty(value = "订货单id")
private Long orderGoodsId;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal intoNum;
/** 不合格数量 */
@Excel(name = "不合格数量")
@ApiModelProperty(value = "不合格数量")
private BigDecimal unqualifiedNum;
/** 不合格原因 */
@Excel(name = "不合格原因")
@ApiModelProperty(value = "不合格原因")
private String unqualifiedReason;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,171 @@
package com.bonus.canteen.core.ims.domain.vo;
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购订单主对象 ims_order_goods
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class OrderGoodsVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 采购订单id */
private Long orderGoodsId;
/** 采购单编号 */
@Excel(name = "采购单编号")
@ApiModelProperty(value = "采购单编号")
private String orderGoodsCode;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 订单状态(1待提交,2已提交) */
@Excel(name = "订单状态(1待提交,2已提交)")
@ApiModelProperty(value = "订单状态(1待提交,2已提交)")
private Long orderStatus;
/** 订单总金额 */
@Excel(name = "订单总金额")
@ApiModelProperty(value = "订单总金额")
private Long orderAmount;
/** 期望交货日期 */
@ApiModelProperty(value = "期望交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "期望交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate requestArrivalTime;
/** 地址 */
@Excel(name = "地址")
@ApiModelProperty(value = "地址")
private String supplyAddress;
/** 仓库id */
@Excel(name = "仓库id")
@ApiModelProperty(value = "仓库id")
private Long warehouseId;
/** 是否已经拆单1是2否 */
@Excel(name = "是否已经拆单", readConverterExp = "1=是2否")
private Long ifDismantle;
/** 订单标题 */
@Excel(name = "订单标题")
@ApiModelProperty(value = "订单标题")
private String orderTitle;
/** 采购审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "采购审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ApiModelProperty(value = "审批流程id")
private Long processInstanceId;
/** 供应商待确认状态(1待确认,2确认通过,3已拒绝) */
@Excel(name = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
@ApiModelProperty(value = "供应商待确认状态(1待确认,2确认通过,3已拒绝)")
private Long supplierConfirmStatus;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 订单数量 */
@Excel(name = "订单数量")
@ApiModelProperty(value = "订单数量")
private BigDecimal totalNum;
/** 入库数量 */
@Excel(name = "入库数量")
@ApiModelProperty(value = "入库数量")
private BigDecimal totalIntoNum;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private String stallId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 供应商确认时间 */
@ApiModelProperty(value = "供应商确认时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "供应商确认时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmTime;
/** 供应商确认备注 */
@Excel(name = "供应商确认备注")
@ApiModelProperty(value = "供应商确认备注")
private String confirmRemark;
/** 是否全部验货(1是2否) */
@Excel(name = "是否全部验货(1是2否)")
@ApiModelProperty(value = "是否全部验货(1是2否)")
private Long ifAllInspect;
@Excel(name = "供应商名称")
@ApiModelProperty(value = "供应商名称")
private String supplierName;
@Excel(name = "仓库名称")
@ApiModelProperty(value = "仓库名称")
private String warehouseName;
@Excel(name = "区域名称")
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称")
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "档口名称")
private String stallName;
private List<OrderGoodsDetailVO> orderGoodsDetailList;
}

View File

@ -0,0 +1,74 @@
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;
import java.math.BigDecimal;
/**
* 采购合同明细对象 ims_purchase_contract_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractDetailVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 合同明细id */
private Long contractDetailId;
/** 合同主键id */
private Long contractId;
/** 合同编号 */
@Excel(name = "合同编号")
@ApiModelProperty(value = "合同编号")
private String contractCode;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 订货数量 */
@Excel(name = "订货数量")
@ApiModelProperty(value = "订货数量")
private BigDecimal orderNum;
/** 单价 */
@Excel(name = "单价")
@ApiModelProperty(value = "单价")
private Long singlePrice;
/** 总金额 */
@Excel(name = "总金额")
@ApiModelProperty(value = "总金额")
private Long totalPrice;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "计量单位名称")
@ApiModelProperty(value = "计量单位名称")
private String unitName;
}

View File

@ -0,0 +1,188 @@
package com.bonus.canteen.core.ims.domain.vo;
import com.bonus.canteen.core.ims.domain.PurchaseContractDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购合同主对象 ims_purchase_contract
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchaseContractVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 合同主键id */
private Long contractId;
/** 合同编号 */
private String contractCode;
/** 供应商id */
@Excel(name = "供应商id")
@ApiModelProperty(value = "供应商id")
private Long supplierId;
/** 合同提交状态(1待提交,2已提交) */
@Excel(name = "合同提交状态(1待提交,2已提交)")
@ApiModelProperty(value = "合同提交状态(1待提交,2已提交)")
private Long commitStatus;
/** 合同状态(1待生效,2履行中3已失效4已终止) */
@Excel(name = "合同状态(1待生效,2履行中3已失效4已终止)")
@ApiModelProperty(value = "合同状态(待生效,2履行中3已失效4已终止)")
private Integer contractStatus;
/** 合同总金额 */
@Excel(name = "合同总金额")
@ApiModelProperty(value = "合同总金额")
private Long contractAmount;
/** 采购订单金额 */
@Excel(name = "采购订单金额")
@ApiModelProperty(value = "采购订单金额")
private Long orderGoodsAmount;
/** 合同签订日期 */
@ApiModelProperty(value = "合同签订日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "合同签订日期", width = 30, dateFormat = "yyyy-MM-dd")
@NotNull(message = "合同签订日期不能为空")
private LocalDate contractSigningTime;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂ID */
@Excel(name = "食堂ID")
@ApiModelProperty(value = "食堂ID")
private Long canteenId;
/** 合同标题 */
@Excel(name = "合同标题")
@ApiModelProperty(value = "合同标题")
private String contractTitle;
/** 合同开始时间 */
@ApiModelProperty(value = "合同开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同签订时间不能为空")
private LocalDateTime contractStartTime;
/** 合同结束时间 */
@ApiModelProperty(value = "合同结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "合同结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@NotNull(message = "合同结束时间不能为空")
private LocalDateTime contractEndTime;
/** 合同审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "合同审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
private Long approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ApiModelProperty(value = "审批流程id")
private Long processInstanceId;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 合同货品数量 */
@Excel(name = "合同货品数量")
@ApiModelProperty(value = "合同货品数量")
private BigDecimal totalNum;
/** 类别数量 */
@Excel(name = "类别数量")
@ApiModelProperty(value = "类别数量")
private Long categoryNum;
/** 付款方式(1一次性付款,2分期付款) */
@Excel(name = "付款方式(1一次性付款,2分期付款)")
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
private Long payMoneyStyle;
/** 付款日期 */
@ApiModelProperty(value = "付款日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate payMoneyDate;
/** 收款银行 */
@Excel(name = "收款银行")
@ApiModelProperty(value = "收款银行")
private String collectMoneyBank;
/** 收款账号 */
@Excel(name = "收款账号")
@ApiModelProperty(value = "收款账号")
private String collectMoneyAccount;
/** 账户名称 */
@Excel(name = "账户名称")
@ApiModelProperty(value = "账户名称")
private String collectMoneyAccountName;
/** 付款备注 */
@Excel(name = "付款备注")
@ApiModelProperty(value = "付款备注")
private String payRemark;
/** 合同附件,多个则逗号分隔 */
@Excel(name = "合同附件,多个则逗号分隔")
@ApiModelProperty(value = "合同附件,多个则逗号分隔")
private String contractAttachment;
/** 负责人 */
@Excel(name = "负责人")
@ApiModelProperty(value = "负责人")
private String contractPerson;
@Excel(name = "区域名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "供应商名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "供应商名称")
private String supplierName;
private List<PurchaseContractDetailVO> purchaseContractDetailList;
}

View File

@ -0,0 +1,99 @@
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;
import java.math.BigDecimal;
/**
* 采购计划详情对象 ims_purchase_plan_detail
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanDetailVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 采购计划详情id */
private Long detailId;
/** 采购计划单id */
@Excel(name = "采购计划单id")
@ApiModelProperty(value = "采购计划单id")
private Long planId;
/** 采购计划单编号 */
@Excel(name = "采购计划单编号")
@ApiModelProperty(value = "采购计划单编号")
private String planCode;
/** 原料id */
@Excel(name = "原料id")
@ApiModelProperty(value = "原料id")
private Long materialId;
/** 计量单位id */
@Excel(name = "计量单位id")
@ApiModelProperty(value = "计量单位id")
private Long unitId;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long unitPrice;
/** 规格 */
@Excel(name = "规格")
@ApiModelProperty(value = "规格")
private String size;
/** 采购数量 */
@Excel(name = "采购数量")
@ApiModelProperty(value = "采购数量")
private BigDecimal purchaseNum;
/** 生产计划数量 */
@Excel(name = "生产计划数量")
@ApiModelProperty(value = "生产计划数量")
private BigDecimal productionPlanNum;
/** 当前库存数 */
@Excel(name = "当前库存数")
@ApiModelProperty(value = "当前库存数")
private BigDecimal inventoryNum;
/** 预计采购金额 */
@Excel(name = "预计采购金额")
@ApiModelProperty(value = "预计采购金额")
private Long purchaseBudgetPrice;
/** 档口ID */
@Excel(name = "档口ID")
@ApiModelProperty(value = "档口ID")
private Long stallId;
/** 原始数量 */
@Excel(name = "原始数量")
@ApiModelProperty(value = "原始数量")
private BigDecimal originalQuantity;
@Excel(name = "材料名称")
@ApiModelProperty(value = "材料名称")
private String materialName;
@Excel(name = "材料单位名称")
@ApiModelProperty(value = "材料单位名称")
private String unitName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "材料名称")
private String stallName;
}

View File

@ -0,0 +1,141 @@
package com.bonus.canteen.core.ims.domain.vo;
import com.bonus.canteen.core.ims.domain.PurchasePlanDetail;
import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
/**
* 采购计划对象 ims_purchase_plan
*
* @author xsheng
* @date 2025-06-30
*/
@Data
@ToString
public class PurchasePlanVO extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 计划id */
private Long planId;
/** 采购计划单号 */
@Excel(name = "采购计划单号")
@ApiModelProperty(value = "采购计划单号")
private String planCode;
/** 采购计划状态(1-待发布,2-已发布) */
@Excel(name = "采购计划状态(1-待发布,2-已发布)")
@ApiModelProperty(value = "采购计划状态(1-待发布,2-已发布)")
private Long status;
/** 采购计划时间 */
@ApiModelProperty(value = "采购计划时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "采购计划时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime purchaseDate;
/** 采购员id */
@Excel(name = "采购员id")
@ApiModelProperty(value = "采购员id")
private Long purchaseUserId;
/** 采购计划Id,逗号分隔存储 */
@Excel(name = "采购计划Id,逗号分隔存储")
@ApiModelProperty(value = "采购计划Id,逗号分隔存储")
private String productionPlanId;
/** 采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝) */
@Excel(name = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
@ApiModelProperty(value = "采购审批状态(1待审批,2审批中,3审批同意,4审批拒绝)")
private Long approveStatus;
/** 审批流程id */
@Excel(name = "审批流程id")
@ApiModelProperty(value = "审批流程id")
private Long processInstanceId;
/** 关联采购订单号 */
@Excel(name = "关联采购订单号")
@ApiModelProperty(value = "关联采购订单号")
private String relatePlanIds;
/** 区域ID */
@Excel(name = "区域ID")
@ApiModelProperty(value = "区域ID")
private Long areaId;
/** 食堂id */
@Excel(name = "食堂id")
@ApiModelProperty(value = "食堂id")
private Long canteenId;
/** 档口id */
@Excel(name = "档口id")
@ApiModelProperty(value = "档口id")
private String stallId;
/** 预计采购预算 */
@Excel(name = "预计采购预算")
@ApiModelProperty(value = "预计采购预算")
private Long purchaseBudgetTotal;
/** 供应商ID */
@Excel(name = "供应商ID")
@ApiModelProperty(value = "供应商ID")
private String supplierIds;
/** 审批人 */
@Excel(name = "审批人")
@ApiModelProperty(value = "审批人")
private String approveBy;
/** 审批时间 */
@ApiModelProperty(value = "审批时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime approveTime;
/** 审批备注 */
@Excel(name = "审批备注")
@ApiModelProperty(value = "审批备注")
private String approveRemark;
/** 是否合并(1是2否) */
@Excel(name = "是否合并(1是2否)")
@ApiModelProperty(value = "是否合并(1是2否)")
private Long ifMerge;
/** 交货日期 */
@ApiModelProperty(value = "交货日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "交货日期", width = 30, dateFormat = "yyyy-MM-dd")
private LocalDate deliverGoodsDate;
@Excel(name = "区域名称", type = Excel.Type.EXPORT)
@ApiModelProperty(value = "区域名称")
private String areaName;
@Excel(name = "食堂名称")
@ApiModelProperty(value = "食堂名称")
private String canteenName;
@Excel(name = "档口名称")
@ApiModelProperty(value = "档口名称")
private String stallName;
@Excel(name = "供应商名称")
@ApiModelProperty(value = "供应商名称")
private String supplierNames;
private List<PurchasePlanDetailVO> purchasePlanDetailList;
}

View File

@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.ImsUnit;
/**
* 计量单位Mapper接口
*
*
* @author xsheng
* @date 2025-06-19
*/
public interface ImsUnitMapper {
/**
* 查询计量单位
*
*
* @param unitId 计量单位主键
* @return 计量单位
*/
@ -20,7 +20,7 @@ public interface ImsUnitMapper {
/**
* 查询计量单位列表
*
*
* @param imsUnit 计量单位
* @return 计量单位集合
*/
@ -28,7 +28,7 @@ public interface ImsUnitMapper {
/**
* 新增计量单位
*
*
* @param imsUnit 计量单位
* @return 结果
*/
@ -36,7 +36,7 @@ public interface ImsUnitMapper {
/**
* 修改计量单位
*
*
* @param imsUnit 计量单位
* @return 结果
*/
@ -44,7 +44,7 @@ public interface ImsUnitMapper {
/**
* 删除计量单位
*
*
* @param unitId 计量单位主键
* @return 结果
*/
@ -52,9 +52,11 @@ public interface ImsUnitMapper {
/**
* 批量删除计量单位
*
*
* @param unitIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteImsUnitByUnitIds(Long[] unitIds);
public List<ImsUnit> selectImsUnitByUnitIds(Long[] unitIds);
}

View File

@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
/**
* 验货单明细Mapper接口
*
*
* @author xsheng
* @date 2025-06-30
*/
public interface InspectGoodsDetailMapper {
/**
* 查询验货单明细
*
*
* @param inspectGoodsDetailId 验货单明细主键
* @return 验货单明细
*/
@ -20,7 +20,7 @@ public interface InspectGoodsDetailMapper {
/**
* 查询验货单明细列表
*
*
* @param inspectGoodsDetail 验货单明细
* @return 验货单明细集合
*/
@ -28,7 +28,7 @@ public interface InspectGoodsDetailMapper {
/**
* 新增验货单明细
*
*
* @param inspectGoodsDetail 验货单明细
* @return 结果
*/
@ -36,7 +36,7 @@ public interface InspectGoodsDetailMapper {
/**
* 修改验货单明细
*
*
* @param inspectGoodsDetail 验货单明细
* @return 结果
*/
@ -44,7 +44,7 @@ public interface InspectGoodsDetailMapper {
/**
* 删除验货单明细
*
*
* @param inspectGoodsDetailId 验货单明细主键
* @return 结果
*/
@ -52,9 +52,11 @@ public interface InspectGoodsDetailMapper {
/**
* 批量删除验货单明细
*
*
* @param inspectGoodsDetailIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteInspectGoodsDetailByInspectGoodsDetailIds(Long[] inspectGoodsDetailIds);
public int deleteInspectGoodsDetailByInspectGoodsId(Long inspectGoodsId);
}

View File

@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
/**
* 采购订单明细Mapper接口
*
*
* @author xsheng
* @date 2025-06-30
*/
public interface OrderGoodsDetailMapper {
/**
* 查询采购订单明细
*
*
* @param orderGoodsDetailId 采购订单明细主键
* @return 采购订单明细
*/
@ -20,7 +20,7 @@ public interface OrderGoodsDetailMapper {
/**
* 查询采购订单明细列表
*
*
* @param orderGoodsDetail 采购订单明细
* @return 采购订单明细集合
*/
@ -28,7 +28,7 @@ public interface OrderGoodsDetailMapper {
/**
* 新增采购订单明细
*
*
* @param orderGoodsDetail 采购订单明细
* @return 结果
*/
@ -36,7 +36,7 @@ public interface OrderGoodsDetailMapper {
/**
* 修改采购订单明细
*
*
* @param orderGoodsDetail 采购订单明细
* @return 结果
*/
@ -44,7 +44,7 @@ public interface OrderGoodsDetailMapper {
/**
* 删除采购订单明细
*
*
* @param orderGoodsDetailId 采购订单明细主键
* @return 结果
*/
@ -52,9 +52,11 @@ public interface OrderGoodsDetailMapper {
/**
* 批量删除采购订单明细
*
*
* @param orderGoodsDetailIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteOrderGoodsDetailByOrderGoodsDetailIds(Long[] orderGoodsDetailIds);
public int deleteOrderGoodsDetailByOrderGoodsId(Long orderGoodsId);
}

View File

@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.PurchaseContractDetail;
/**
* 采购合同明细Mapper接口
*
*
* @author xsheng
* @date 2025-06-30
*/
public interface PurchaseContractDetailMapper {
/**
* 查询采购合同明细
*
*
* @param contractDetailId 采购合同明细主键
* @return 采购合同明细
*/
@ -20,7 +20,7 @@ public interface PurchaseContractDetailMapper {
/**
* 查询采购合同明细列表
*
*
* @param purchaseContractDetail 采购合同明细
* @return 采购合同明细集合
*/
@ -28,7 +28,7 @@ public interface PurchaseContractDetailMapper {
/**
* 新增采购合同明细
*
*
* @param purchaseContractDetail 采购合同明细
* @return 结果
*/
@ -36,7 +36,7 @@ public interface PurchaseContractDetailMapper {
/**
* 修改采购合同明细
*
*
* @param purchaseContractDetail 采购合同明细
* @return 结果
*/
@ -44,7 +44,7 @@ public interface PurchaseContractDetailMapper {
/**
* 删除采购合同明细
*
*
* @param contractDetailId 采购合同明细主键
* @return 结果
*/
@ -52,9 +52,13 @@ public interface PurchaseContractDetailMapper {
/**
* 批量删除采购合同明细
*
*
* @param contractDetailIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePurchaseContractDetailByContractDetailIds(Long[] contractDetailIds);
public int deletePurchaseContractDetailByContractId(Long contractId);
public int deletePurchaseContractDetailByContractIds(Long[] contractIds);
}

View File

@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.PurchasePlanDetail;
/**
* 采购计划详情Mapper接口
*
*
* @author xsheng
* @date 2025-06-30
*/
public interface PurchasePlanDetailMapper {
/**
* 查询采购计划详情
*
*
* @param detailId 采购计划详情主键
* @return 采购计划详情
*/
@ -20,7 +20,7 @@ public interface PurchasePlanDetailMapper {
/**
* 查询采购计划详情列表
*
*
* @param purchasePlanDetail 采购计划详情
* @return 采购计划详情集合
*/
@ -28,7 +28,7 @@ public interface PurchasePlanDetailMapper {
/**
* 新增采购计划详情
*
*
* @param purchasePlanDetail 采购计划详情
* @return 结果
*/
@ -36,7 +36,7 @@ public interface PurchasePlanDetailMapper {
/**
* 修改采购计划详情
*
*
* @param purchasePlanDetail 采购计划详情
* @return 结果
*/
@ -44,7 +44,7 @@ public interface PurchasePlanDetailMapper {
/**
* 删除采购计划详情
*
*
* @param detailId 采购计划详情主键
* @return 结果
*/
@ -52,9 +52,11 @@ public interface PurchasePlanDetailMapper {
/**
* 批量删除采购计划详情
*
*
* @param detailIds 需要删除的数据主键集合
* @return 结果
*/
public int deletePurchasePlanDetailByDetailIds(Long[] detailIds);
public int deletePurchasePlanDetailByPlanId(Long planId);
}

View File

@ -18,6 +18,14 @@ public interface IImsUnitService {
*/
public ImsUnit selectImsUnitByUnitId(Long unitId);
/**
* 查询计量单位
*
* @param unitIds 计量单位主键
* @return 计量单位
*/
public List<ImsUnit> selectImsUnitByUnitIds(Long[] unitIds);
/**
* 查询计量单位列表
*

View File

@ -57,4 +57,6 @@ public interface IInspectGoodsDetailService {
* @return 结果
*/
public int deleteInspectGoodsDetailByInspectGoodsDetailId(Long inspectGoodsDetailId);
public int deleteInspectGoodsDetailByInspectGoodsId(Long inspectGoodsId);
}

View File

@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service;
import java.util.List;
import com.bonus.canteen.core.ims.domain.InspectGoods;
import com.bonus.canteen.core.ims.domain.vo.InspectGoodsVO;
/**
* 验货单Service接口
@ -16,7 +17,7 @@ public interface IInspectGoodsService {
* @param inspectGoodsId 验货单主键
* @return 验货单
*/
public InspectGoods selectInspectGoodsByInspectGoodsId(Long inspectGoodsId);
public InspectGoodsVO selectInspectGoodsByInspectGoodsId(Long inspectGoodsId);
/**
* 查询验货单列表
@ -24,7 +25,7 @@ public interface IInspectGoodsService {
* @param inspectGoods 验货单
* @return 验货单集合
*/
public List<InspectGoods> selectInspectGoodsList(InspectGoods inspectGoods);
public List<InspectGoodsVO> selectInspectGoodsList(InspectGoods inspectGoods);
/**
* 新增验货单

View File

@ -57,4 +57,6 @@ public interface IOrderGoodsDetailService {
* @return 结果
*/
public int deleteOrderGoodsDetailByOrderGoodsDetailId(Long orderGoodsDetailId);
public int deleteOrderGoodsDetailByOrderGoodsId(Long orderGoodsId);
}

View File

@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service;
import java.util.List;
import com.bonus.canteen.core.ims.domain.OrderGoods;
import com.bonus.canteen.core.ims.domain.vo.OrderGoodsVO;
/**
* 采购订单主Service接口
@ -16,7 +17,7 @@ public interface IOrderGoodsService {
* @param orderGoodsId 采购订单主主键
* @return 采购订单主
*/
public OrderGoods selectOrderGoodsByOrderGoodsId(Long orderGoodsId);
public OrderGoodsVO selectOrderGoodsByOrderGoodsId(Long orderGoodsId);
/**
* 查询采购订单主列表
@ -24,7 +25,7 @@ public interface IOrderGoodsService {
* @param orderGoods 采购订单主
* @return 采购订单主集合
*/
public List<OrderGoods> selectOrderGoodsList(OrderGoods orderGoods);
public List<OrderGoodsVO> selectOrderGoodsList(OrderGoods orderGoods);
/**
* 新增采购订单主

View File

@ -57,4 +57,8 @@ public interface IPurchaseContractDetailService {
* @return 结果
*/
public int deletePurchaseContractDetailByContractDetailId(Long contractDetailId);
public int deletePurchaseContractDetailByContractId(Long contractId);
public int deletePurchaseContractDetailByContractIds(Long[] contractIds);
}

View File

@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service;
import java.util.List;
import com.bonus.canteen.core.ims.domain.PurchaseContract;
import com.bonus.canteen.core.ims.domain.vo.PurchaseContractVO;
/**
* 采购合同主Service接口
@ -16,7 +17,7 @@ public interface IPurchaseContractService {
* @param contractId 采购合同主主键
* @return 采购合同主
*/
public PurchaseContract selectPurchaseContractByContractId(Long contractId);
public PurchaseContractVO selectPurchaseContractByContractId(Long contractId);
/**
* 查询采购合同主列表
@ -24,7 +25,7 @@ public interface IPurchaseContractService {
* @param purchaseContract 采购合同主
* @return 采购合同主集合
*/
public List<PurchaseContract> selectPurchaseContractList(PurchaseContract purchaseContract);
public List<PurchaseContractVO> selectPurchaseContractList(PurchaseContract purchaseContract);
/**
* 新增采购合同主

View File

@ -57,4 +57,6 @@ public interface IPurchasePlanDetailService {
* @return 结果
*/
public int deletePurchasePlanDetailByDetailId(Long detailId);
public int deletePurchasePlanDetailByPlanId(Long planId);
}

View File

@ -2,6 +2,7 @@ package com.bonus.canteen.core.ims.service;
import java.util.List;
import com.bonus.canteen.core.ims.domain.PurchasePlan;
import com.bonus.canteen.core.ims.domain.vo.PurchasePlanVO;
/**
* 采购计划Service接口
@ -16,7 +17,7 @@ public interface IPurchasePlanService {
* @param planId 采购计划主键
* @return 采购计划
*/
public PurchasePlan selectPurchasePlanByPlanId(Long planId);
public PurchasePlanVO selectPurchasePlanByPlanId(Long planId);
/**
* 查询采购计划列表
@ -24,7 +25,7 @@ public interface IPurchasePlanService {
* @param purchasePlan 采购计划
* @return 采购计划集合
*/
public List<PurchasePlan> selectPurchasePlanList(PurchasePlan purchasePlan);
public List<PurchasePlanVO> selectPurchasePlanList(PurchasePlan purchasePlan);
/**
* 新增采购计划

View File

@ -1,5 +1,6 @@
package com.bonus.canteen.core.ims.service.impl;
import java.util.Collections;
import java.util.List;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
@ -31,6 +32,11 @@ public class ImsUnitServiceImpl implements IImsUnitService {
return imsUnitMapper.selectImsUnitByUnitId(unitId);
}
@Override
public List<ImsUnit> selectImsUnitByUnitIds(Long[] unitIds) {
return imsUnitMapper.selectImsUnitByUnitIds(unitIds);
}
/**
* 查询计量单位列表
*

View File

@ -95,4 +95,9 @@ public class InspectGoodsDetailServiceImpl implements IInspectGoodsDetailService
public int deleteInspectGoodsDetailByInspectGoodsDetailId(Long inspectGoodsDetailId) {
return inspectGoodsDetailMapper.deleteInspectGoodsDetailByInspectGoodsDetailId(inspectGoodsDetailId);
}
@Override
public int deleteInspectGoodsDetailByInspectGoodsId(Long inspectGoodsId) {
return inspectGoodsDetailMapper.deleteInspectGoodsDetailByInspectGoodsId(inspectGoodsId);
}
}

View File

@ -1,13 +1,24 @@
package com.bonus.canteen.core.ims.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.ims.domain.InspectGoodsDetail;
import com.bonus.canteen.core.ims.domain.vo.InspectGoodsVO;
import com.bonus.canteen.core.ims.service.IInspectGoodsDetailService;
import com.bonus.canteen.core.ims.utils.NoGenerateUtils;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.ims.mapper.InspectGoodsMapper;
import com.bonus.canteen.core.ims.domain.InspectGoods;
import com.bonus.canteen.core.ims.service.IInspectGoodsService;
import org.springframework.transaction.annotation.Transactional;
/**
* 验货单Service业务层处理
@ -20,6 +31,9 @@ public class InspectGoodsServiceImpl implements IInspectGoodsService {
@Autowired
private InspectGoodsMapper inspectGoodsMapper;
@Autowired
private IInspectGoodsDetailService inspectGoodsDetailService;
/**
* 查询验货单
*
@ -27,8 +41,17 @@ public class InspectGoodsServiceImpl implements IInspectGoodsService {
* @return 验货单
*/
@Override
public InspectGoods selectInspectGoodsByInspectGoodsId(Long inspectGoodsId) {
return inspectGoodsMapper.selectInspectGoodsByInspectGoodsId(inspectGoodsId);
public InspectGoodsVO selectInspectGoodsByInspectGoodsId(Long inspectGoodsId) {
InspectGoods inspectGoods = inspectGoodsMapper.selectInspectGoodsByInspectGoodsId(inspectGoodsId);
InspectGoodsVO inspectGoodsVO = null;
if(Objects.nonNull(inspectGoods)) {
InspectGoodsDetail inspectGoodsDetail = new InspectGoodsDetail();
inspectGoodsDetail.setInspectGoodsId(inspectGoodsId);
inspectGoods.setInspectGoodsDetails(inspectGoodsDetailService.selectInspectGoodsDetailList(inspectGoodsDetail));
inspectGoodsVO = new InspectGoodsVO();
BeanUtils.copyProperties(inspectGoods, inspectGoodsVO);
}
return inspectGoodsVO;
}
/**
@ -38,8 +61,20 @@ public class InspectGoodsServiceImpl implements IInspectGoodsService {
* @return 验货单
*/
@Override
public List<InspectGoods> selectInspectGoodsList(InspectGoods inspectGoods) {
return inspectGoodsMapper.selectInspectGoodsList(inspectGoods);
public List<InspectGoodsVO> selectInspectGoodsList(InspectGoods inspectGoods) {
List<InspectGoods> inspectGoodsList = inspectGoodsMapper.selectInspectGoodsList(inspectGoods);
List<InspectGoodsVO> inspectGoodsVOList = new ArrayList<>();
if(CollUtil.isNotEmpty(inspectGoodsList)) {
for(InspectGoods goods : inspectGoodsList) {
InspectGoodsDetail inspectGoodsDetail = new InspectGoodsDetail();
inspectGoodsDetail.setInspectGoodsId(goods.getInspectGoodsId());
goods.setInspectGoodsDetails(inspectGoodsDetailService.selectInspectGoodsDetailList(inspectGoodsDetail));
InspectGoodsVO inspectGoodsVO = new InspectGoodsVO();
BeanUtils.copyProperties(inspectGoods, inspectGoodsVO);
inspectGoodsVOList.add(inspectGoodsVO);
}
}
return inspectGoodsVOList;
}
/**
@ -49,10 +84,24 @@ public class InspectGoodsServiceImpl implements IInspectGoodsService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertInspectGoods(InspectGoods inspectGoods) {
inspectGoods.setInspectGoodsId(null);
inspectGoods.setCreateTime(DateUtils.getNowDate());
inspectGoods.setCreateBy(SecurityUtils.getUsername());
try {
return inspectGoodsMapper.insertInspectGoods(inspectGoods);
String inspectGoodsCode = NoGenerateUtils.generateInspectGoodsCode();
inspectGoods.setInspectGoodsCode(inspectGoodsCode);
int result = inspectGoodsMapper.insertInspectGoods(inspectGoods);
List<InspectGoodsDetail> inspectGoodsDetailList = inspectGoods.getInspectGoodsDetails();
if(CollUtil.isNotEmpty(inspectGoodsDetailList)) {
for(InspectGoodsDetail inspectGoodsDetail : inspectGoodsDetailList) {
inspectGoodsDetail.setInspectGoodsId(inspectGoods.getInspectGoodsId());
inspectGoodsDetail.setInspectGoodsCode(inspectGoodsCode);
inspectGoodsDetailService.insertInspectGoodsDetail(inspectGoodsDetail);
}
}
return result;
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
@ -65,9 +114,30 @@ public class InspectGoodsServiceImpl implements IInspectGoodsService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateInspectGoods(InspectGoods inspectGoods) {
if(Objects.isNull(inspectGoods.getInspectGoodsId())) {
throw new ServiceException("验货单ID不能为空");
}
InspectGoodsVO inspectGoodsVO = selectInspectGoodsByInspectGoodsId(inspectGoods.getInspectGoodsId());
if(Objects.isNull(inspectGoodsVO)) {
throw new ServiceException("验货单不存在");
}
if(inspectGoodsVO.getStatus() == 2) {
throw new ServiceException("验货单已提交,不能修改");
}
inspectGoods.setUpdateTime(DateUtils.getNowDate());
inspectGoods.setUpdateBy(SecurityUtils.getUsername());
try {
inspectGoodsDetailService.deleteInspectGoodsDetailByInspectGoodsId(inspectGoods.getInspectGoodsId());
List<InspectGoodsDetail> inspectGoodsDetailList = inspectGoods.getInspectGoodsDetails();
if(CollUtil.isNotEmpty(inspectGoodsDetailList)) {
for(InspectGoodsDetail inspectGoodsDetail : inspectGoodsDetailList) {
inspectGoodsDetail.setInspectGoodsId(inspectGoods.getInspectGoodsId());
inspectGoodsDetail.setInspectGoodsCode(inspectGoodsVO.getInspectGoodsCode());
inspectGoodsDetailService.insertInspectGoodsDetail(inspectGoodsDetail);
}
}
return inspectGoodsMapper.updateInspectGoods(inspectGoods);
} catch (Exception e) {
throw new ServiceException(e.getMessage());

View File

@ -95,4 +95,9 @@ public class OrderGoodsDetailServiceImpl implements IOrderGoodsDetailService {
public int deleteOrderGoodsDetailByOrderGoodsDetailId(Long orderGoodsDetailId) {
return orderGoodsDetailMapper.deleteOrderGoodsDetailByOrderGoodsDetailId(orderGoodsDetailId);
}
@Override
public int deleteOrderGoodsDetailByOrderGoodsId(Long orderGoodsId) {
return orderGoodsDetailMapper.deleteOrderGoodsDetailByOrderGoodsId(orderGoodsId);
}
}

View File

@ -1,13 +1,25 @@
package com.bonus.canteen.core.ims.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
import com.bonus.canteen.core.ims.domain.constants.ApproveStatusEnum;
import com.bonus.canteen.core.ims.domain.vo.OrderGoodsVO;
import com.bonus.canteen.core.ims.service.IOrderGoodsDetailService;
import com.bonus.canteen.core.ims.utils.NoGenerateUtils;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.ims.mapper.OrderGoodsMapper;
import com.bonus.canteen.core.ims.domain.OrderGoods;
import com.bonus.canteen.core.ims.service.IOrderGoodsService;
import org.springframework.transaction.annotation.Transactional;
/**
* 采购订单主Service业务层处理
@ -19,6 +31,8 @@ import com.bonus.canteen.core.ims.service.IOrderGoodsService;
public class OrderGoodsServiceImpl implements IOrderGoodsService {
@Autowired
private OrderGoodsMapper orderGoodsMapper;
@Autowired
private IOrderGoodsDetailService inspectGoodsDetailService;
/**
* 查询采购订单主
@ -27,8 +41,17 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
* @return 采购订单主
*/
@Override
public OrderGoods selectOrderGoodsByOrderGoodsId(Long orderGoodsId) {
return orderGoodsMapper.selectOrderGoodsByOrderGoodsId(orderGoodsId);
public OrderGoodsVO selectOrderGoodsByOrderGoodsId(Long orderGoodsId) {
OrderGoods orderGoods = orderGoodsMapper.selectOrderGoodsByOrderGoodsId(orderGoodsId);
OrderGoodsVO orderGoodsVO = null;
if(Objects.nonNull(orderGoods)) {
OrderGoodsDetail orderGoodsDetail = new OrderGoodsDetail();
orderGoodsDetail.setOrderGoodsId(orderGoods.getOrderGoodsId());
orderGoods.setOrderGoodsDetailList(inspectGoodsDetailService.selectOrderGoodsDetailList(orderGoodsDetail));
orderGoodsVO = new OrderGoodsVO();
BeanUtils.copyProperties(orderGoods, orderGoodsVO);
}
return orderGoodsVO;
}
/**
@ -38,8 +61,20 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
* @return 采购订单主
*/
@Override
public List<OrderGoods> selectOrderGoodsList(OrderGoods orderGoods) {
return orderGoodsMapper.selectOrderGoodsList(orderGoods);
public List<OrderGoodsVO> selectOrderGoodsList(OrderGoods orderGoods) {
List<OrderGoods> orderGoodsList = orderGoodsMapper.selectOrderGoodsList(orderGoods);
List<OrderGoodsVO> orderGoodsVOList = new ArrayList<>();
if(CollUtil.isNotEmpty(orderGoodsList)) {
for(OrderGoods goods : orderGoodsList) {
OrderGoodsDetail orderGoodsDetail = new OrderGoodsDetail();
orderGoodsDetail.setOrderGoodsId(goods.getOrderGoodsId());
goods.setOrderGoodsDetailList(inspectGoodsDetailService.selectOrderGoodsDetailList(orderGoodsDetail));
OrderGoodsVO orderGoodsVO = new OrderGoodsVO();
BeanUtils.copyProperties(orderGoods, orderGoodsVO);
orderGoodsVOList.add(orderGoodsVO);
}
}
return orderGoodsVOList;
}
/**
@ -49,10 +84,24 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertOrderGoods(OrderGoods orderGoods) {
orderGoods.setOrderGoodsId(null);
orderGoods.setCreateTime(DateUtils.getNowDate());
orderGoods.setCreateBy(SecurityUtils.getUsername());
try {
return orderGoodsMapper.insertOrderGoods(orderGoods);
String orderGoodsCode = NoGenerateUtils.generateOrderGoodsCode();
orderGoods.setOrderGoodsCode(orderGoodsCode);
orderGoods.setApproveStatus(ApproveStatusEnum.APPROVED.getKey());
int result = orderGoodsMapper.insertOrderGoods(orderGoods);
List<OrderGoodsDetail> orderGoodsDetails = orderGoods.getOrderGoodsDetailList();
if(CollUtil.isNotEmpty(orderGoodsDetails)) {
for(OrderGoodsDetail orderGoodsDetail : orderGoodsDetails) {
orderGoodsDetail.setOrderGoodsId(orderGoods.getOrderGoodsId());
inspectGoodsDetailService.insertOrderGoodsDetail(orderGoodsDetail);
}
}
return result;
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
@ -65,9 +114,29 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updateOrderGoods(OrderGoods orderGoods) {
if(Objects.isNull(orderGoods.getOrderGoodsId())) {
throw new ServiceException("订单ID不能为空");
}
OrderGoodsVO orderGoodsVO = selectOrderGoodsByOrderGoodsId(orderGoods.getOrderGoodsId());
if(Objects.isNull(orderGoodsVO)) {
throw new ServiceException("采购订单不存在");
}
if(orderGoodsVO.getOrderStatus() == 2) {
throw new ServiceException("采购订单已提交,不能修改");
}
orderGoods.setUpdateTime(DateUtils.getNowDate());
orderGoods.setUpdateBy(SecurityUtils.getUsername());
try {
inspectGoodsDetailService.deleteOrderGoodsDetailByOrderGoodsId(orderGoods.getOrderGoodsId());
List<OrderGoodsDetail> orderGoodsDetails = orderGoods.getOrderGoodsDetailList();
if(CollUtil.isNotEmpty(orderGoodsDetails)) {
for(OrderGoodsDetail orderGoodsDetail : orderGoodsDetails) {
orderGoodsDetail.setOrderGoodsId(orderGoods.getOrderGoodsId());
inspectGoodsDetailService.insertOrderGoodsDetail(orderGoodsDetail);
}
}
return orderGoodsMapper.updateOrderGoods(orderGoods);
} catch (Exception e) {
throw new ServiceException(e.getMessage());

View File

@ -95,4 +95,14 @@ public class PurchaseContractDetailServiceImpl implements IPurchaseContractDetai
public int deletePurchaseContractDetailByContractDetailId(Long contractDetailId) {
return purchaseContractDetailMapper.deletePurchaseContractDetailByContractDetailId(contractDetailId);
}
@Override
public int deletePurchaseContractDetailByContractId(Long contractId) {
return purchaseContractDetailMapper.deletePurchaseContractDetailByContractId(contractId);
}
@Override
public int deletePurchaseContractDetailByContractIds(Long[] contractIds) {
return purchaseContractDetailMapper.deletePurchaseContractDetailByContractIds(contractIds);
}
}

View File

@ -1,13 +1,27 @@
package com.bonus.canteen.core.ims.service.impl;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.ims.domain.PurchaseContractDetail;
import com.bonus.canteen.core.ims.domain.constants.ApproveStatusEnum;
import com.bonus.canteen.core.ims.domain.constants.PurchaseContractStatusEnum;
import com.bonus.canteen.core.ims.domain.vo.PurchaseContractVO;
import com.bonus.canteen.core.ims.service.IPurchaseContractDetailService;
import com.bonus.canteen.core.ims.utils.NoGenerateUtils;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.ims.mapper.PurchaseContractMapper;
import com.bonus.canteen.core.ims.domain.PurchaseContract;
import com.bonus.canteen.core.ims.service.IPurchaseContractService;
import org.springframework.transaction.annotation.Transactional;
/**
* 采购合同主Service业务层处理
@ -19,6 +33,8 @@ import com.bonus.canteen.core.ims.service.IPurchaseContractService;
public class PurchaseContractServiceImpl implements IPurchaseContractService {
@Autowired
private PurchaseContractMapper purchaseContractMapper;
@Autowired
private IPurchaseContractDetailService inspectGoodsDetailService;
/**
* 查询采购合同主
@ -27,8 +43,18 @@ public class PurchaseContractServiceImpl implements IPurchaseContractService {
* @return 采购合同主
*/
@Override
public PurchaseContract selectPurchaseContractByContractId(Long contractId) {
return purchaseContractMapper.selectPurchaseContractByContractId(contractId);
public PurchaseContractVO selectPurchaseContractByContractId(Long contractId) {
PurchaseContract purchaseContract = purchaseContractMapper.selectPurchaseContractByContractId(contractId);
PurchaseContractVO purchaseContractVO = null;
if(Objects.nonNull(purchaseContract)) {
PurchaseContractDetail purchaseContractDetail = new PurchaseContractDetail();
purchaseContractDetail.setContractId(contractId);
purchaseContract.setPurchaseContractDetailList(inspectGoodsDetailService.selectPurchaseContractDetailList(purchaseContractDetail));
calContractStatus(purchaseContract);
purchaseContractVO = new PurchaseContractVO();
BeanUtils.copyProperties(purchaseContract, purchaseContractVO);
}
return purchaseContractVO;
}
/**
@ -38,8 +64,36 @@ public class PurchaseContractServiceImpl implements IPurchaseContractService {
* @return 采购合同主
*/
@Override
public List<PurchaseContract> selectPurchaseContractList(PurchaseContract purchaseContract) {
return purchaseContractMapper.selectPurchaseContractList(purchaseContract);
public List<PurchaseContractVO> selectPurchaseContractList(PurchaseContract purchaseContract) {
List<PurchaseContract> purchaseContracts = purchaseContractMapper.selectPurchaseContractList(purchaseContract);
List<PurchaseContractVO> purchaseContractVOList = new ArrayList<>();
if(CollUtil.isNotEmpty(purchaseContracts)) {
for(PurchaseContract contract : purchaseContracts) {
PurchaseContractDetail purchaseContractDetail = new PurchaseContractDetail();
purchaseContractDetail.setContractId(contract.getContractId());
contract.setPurchaseContractDetailList(inspectGoodsDetailService.selectPurchaseContractDetailList(purchaseContractDetail));
calContractStatus(contract);
PurchaseContractVO purchaseContractVO = new PurchaseContractVO();
BeanUtils.copyProperties(contract, purchaseContractVO);
purchaseContractVOList.add(purchaseContractVO);
}
}
return purchaseContractVOList;
}
private static void calContractStatus(PurchaseContract contract) {
if (PurchaseContractStatusEnum.END.getKey().equals(contract.getContractStatus())) {
contract.setContractStatus(PurchaseContractStatusEnum.END.getKey());
}else {
if(!LocalDateTime.now().isBefore(contract.getContractStartTime())
&& !LocalDateTime.now().isAfter(contract.getContractEndTime())) {
contract.setContractStatus(PurchaseContractStatusEnum.TAKE_EFFECT.getKey());
} else if(LocalDateTime.now().isBefore(contract.getContractStartTime())) {
contract.setContractStatus(PurchaseContractStatusEnum.WAIT_EFFECT.getKey());
} else if (LocalDateTime.now().isAfter(contract.getContractEndTime())) {
contract.setContractStatus(PurchaseContractStatusEnum.EXPIRED.getKey());
}
}
}
/**
@ -49,10 +103,25 @@ public class PurchaseContractServiceImpl implements IPurchaseContractService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertPurchaseContract(PurchaseContract purchaseContract) {
purchaseContract.setContractId(null);
purchaseContract.setCreateTime(DateUtils.getNowDate());
purchaseContract.setCreateBy(SecurityUtils.getUsername());
try {
return purchaseContractMapper.insertPurchaseContract(purchaseContract);
String contractCode = NoGenerateUtils.generateContractCode();
purchaseContract.setContractCode(contractCode);
purchaseContract.setApproveStatus(ApproveStatusEnum.APPROVED.getKey());
int result = purchaseContractMapper.insertPurchaseContract(purchaseContract);
List<PurchaseContractDetail> purchaseContractDetails = purchaseContract.getPurchaseContractDetailList();
if(CollUtil.isNotEmpty(purchaseContractDetails)) {
for(PurchaseContractDetail purchaseContractDetail : purchaseContractDetails) {
purchaseContractDetail.setContractId(purchaseContract.getContractId());
purchaseContractDetail.setContractCode(contractCode);
inspectGoodsDetailService.insertPurchaseContractDetail(purchaseContractDetail);
}
}
return result;
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
@ -65,9 +134,30 @@ public class PurchaseContractServiceImpl implements IPurchaseContractService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updatePurchaseContract(PurchaseContract purchaseContract) {
if(Objects.isNull(purchaseContract.getContractId())) {
throw new ServiceException("采购合同ID不能为空");
}
PurchaseContractVO purchaseContractVO = selectPurchaseContractByContractId(purchaseContract.getContractId());
if(Objects.isNull(purchaseContractVO)) {
throw new ServiceException("采购合同不存在");
}
if(purchaseContractVO.getCommitStatus() == 2) {
throw new ServiceException("采购合同已提交,不能修改");
}
purchaseContract.setUpdateTime(DateUtils.getNowDate());
purchaseContract.setUpdateBy(SecurityUtils.getUsername());
try {
inspectGoodsDetailService.deletePurchaseContractDetailByContractId(purchaseContract.getContractId());
List<PurchaseContractDetail> purchaseContractDetails = purchaseContract.getPurchaseContractDetailList();
if(CollUtil.isNotEmpty(purchaseContractDetails)) {
for(PurchaseContractDetail purchaseContractDetail : purchaseContractDetails) {
purchaseContractDetail.setContractId(purchaseContract.getContractId());
purchaseContractDetail.setContractCode(purchaseContractVO.getContractCode());
inspectGoodsDetailService.insertPurchaseContractDetail(purchaseContractDetail);
}
}
return purchaseContractMapper.updatePurchaseContract(purchaseContract);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
@ -81,7 +171,9 @@ public class PurchaseContractServiceImpl implements IPurchaseContractService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int deletePurchaseContractByContractIds(Long[] contractIds) {
inspectGoodsDetailService.deletePurchaseContractDetailByContractIds(contractIds);
return purchaseContractMapper.deletePurchaseContractByContractIds(contractIds);
}

View File

@ -95,4 +95,9 @@ public class PurchasePlanDetailServiceImpl implements IPurchasePlanDetailService
public int deletePurchasePlanDetailByDetailId(Long detailId) {
return purchasePlanDetailMapper.deletePurchasePlanDetailByDetailId(detailId);
}
@Override
public int deletePurchasePlanDetailByPlanId(Long planId) {
return purchasePlanDetailMapper.deletePurchasePlanDetailByPlanId(planId);
}
}

View File

@ -1,13 +1,31 @@
package com.bonus.canteen.core.ims.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import com.bonus.canteen.core.ims.domain.ImsUnit;
import com.bonus.canteen.core.ims.domain.PurchasePlanDetail;
import com.bonus.canteen.core.ims.domain.constants.ApproveStatusEnum;
import com.bonus.canteen.core.ims.domain.vo.PurchasePlanVO;
import com.bonus.canteen.core.ims.service.IImsUnitService;
import com.bonus.canteen.core.ims.service.IPurchasePlanDetailService;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.security.utils.SecurityUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.canteen.core.ims.mapper.PurchasePlanMapper;
import com.bonus.canteen.core.ims.domain.PurchasePlan;
import com.bonus.canteen.core.ims.service.IPurchasePlanService;
import org.springframework.transaction.annotation.Transactional;
import static com.bonus.canteen.core.ims.utils.NoGenerateUtils.generatePurchasePlanCode;
/**
* 采购计划Service业务层处理
@ -19,6 +37,10 @@ import com.bonus.canteen.core.ims.service.IPurchasePlanService;
public class PurchasePlanServiceImpl implements IPurchasePlanService {
@Autowired
private PurchasePlanMapper purchasePlanMapper;
@Autowired
private IPurchasePlanDetailService inspectGoodsDetailService;
@Autowired
private IImsUnitService imsUnitService;
/**
* 查询采购计划
@ -27,8 +49,18 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService {
* @return 采购计划
*/
@Override
public PurchasePlan selectPurchasePlanByPlanId(Long planId) {
return purchasePlanMapper.selectPurchasePlanByPlanId(planId);
public PurchasePlanVO selectPurchasePlanByPlanId(Long planId) {
PurchasePlan purchasePlan = purchasePlanMapper.selectPurchasePlanByPlanId(planId);
PurchasePlanVO purchasePlanVO = null;
if(Objects.nonNull(purchasePlan)) {
PurchasePlanDetail purchasePlanDetail = new PurchasePlanDetail();
purchasePlanDetail.setPlanId(purchasePlan.getPlanId());
getSupplierNames(purchasePlan);
purchasePlan.setPurchasePlanDetailList(inspectGoodsDetailService.selectPurchasePlanDetailList(purchasePlanDetail));
purchasePlanVO = new PurchasePlanVO();
BeanUtils.copyProperties(purchasePlan, purchasePlanVO);
}
return purchasePlanVO;
}
/**
@ -38,8 +70,41 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService {
* @return 采购计划
*/
@Override
public List<PurchasePlan> selectPurchasePlanList(PurchasePlan purchasePlan) {
return purchasePlanMapper.selectPurchasePlanList(purchasePlan);
public List<PurchasePlanVO> selectPurchasePlanList(PurchasePlan purchasePlan) {
List<PurchasePlan> purchasePlans = purchasePlanMapper.selectPurchasePlanList(purchasePlan);
List<PurchasePlanVO> purchasePlanVOList = new ArrayList<>();
if(CollUtil.isNotEmpty(purchasePlans)) {
for(PurchasePlan plan : purchasePlans) {
getSupplierNames(plan);
PurchasePlanDetail purchasePlanDetail = new PurchasePlanDetail();
purchasePlanDetail.setPlanId(plan.getPlanId());
plan.setPurchasePlanDetailList(inspectGoodsDetailService.selectPurchasePlanDetailList(purchasePlanDetail));
PurchasePlanVO purchasePlanVO = new PurchasePlanVO();
BeanUtils.copyProperties(purchasePlan, purchasePlanVO);
purchasePlanVOList.add(purchasePlanVO);
}
}
return purchasePlanVOList;
}
private void getSupplierNames(PurchasePlan plan) {
if(StringUtils.isNotBlank(plan.getSupplierIds())) {
String[] supplierIdStrs = plan.getSupplierIds().split(",");
Long[] supplierIds = Arrays.stream(supplierIdStrs)
.map(String::trim)
.filter(s -> !s.isEmpty())
.map(Long::valueOf)
.toArray(Long[]::new);
List<ImsUnit> supplierUnits = imsUnitService.selectImsUnitByUnitIds(supplierIds);
String supplierNames = "";
if(CollUtil.isNotEmpty(supplierUnits)) {
supplierNames = supplierUnits.stream()
.map(ImsUnit::getUnitName)
.filter(Objects::nonNull)
.collect(Collectors.joining(","));
}
plan.setSupplierNames(supplierNames);
}
}
/**
@ -49,10 +114,25 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertPurchasePlan(PurchasePlan purchasePlan) {
purchasePlan.setPlanId(null);
purchasePlan.setCreateTime(DateUtils.getNowDate());
purchasePlan.setCreateBy(SecurityUtils.getUsername());
try {
return purchasePlanMapper.insertPurchasePlan(purchasePlan);
String purchasePlanCode = generatePurchasePlanCode();
purchasePlan.setPlanCode(purchasePlanCode);
purchasePlan.setApproveStatus(ApproveStatusEnum.APPROVED.getKey());
int result = purchasePlanMapper.insertPurchasePlan(purchasePlan);
List<PurchasePlanDetail> purchasePlanDetails = purchasePlan.getPurchasePlanDetailList();
if(CollUtil.isNotEmpty(purchasePlanDetails)) {
for(PurchasePlanDetail purchasePlanDetail : purchasePlanDetails) {
purchasePlanDetail.setPlanId(purchasePlan.getPlanId());
purchasePlanDetail.setPlanCode(purchasePlanCode);
inspectGoodsDetailService.insertPurchasePlanDetail(purchasePlanDetail);
}
}
return result;
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
@ -65,9 +145,30 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService {
* @return 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int updatePurchasePlan(PurchasePlan purchasePlan) {
if(Objects.isNull(purchasePlan.getPlanId())) {
throw new ServiceException("采购计划ID不能为空");
}
PurchasePlanVO purchasePlanVO = selectPurchasePlanByPlanId(purchasePlan.getPlanId());
if(Objects.isNull(purchasePlanVO)) {
throw new ServiceException("采购计划不存在");
}
if(purchasePlanVO.getStatus() == 2) {
throw new ServiceException("采购计划已发布,不能修改");
}
purchasePlan.setUpdateTime(DateUtils.getNowDate());
purchasePlan.setUpdateBy(SecurityUtils.getUsername());
try {
inspectGoodsDetailService.deletePurchasePlanDetailByPlanId(purchasePlan.getPlanId());
List<PurchasePlanDetail> purchasePlanDetails = purchasePlan.getPurchasePlanDetailList();
if(CollUtil.isNotEmpty(purchasePlanDetails)) {
for(PurchasePlanDetail purchasePlanDetail : purchasePlanDetails) {
purchasePlanDetail.setPlanId(purchasePlan.getPlanId());
purchasePlanDetail.setPlanCode(purchasePlanVO.getPlanCode());
inspectGoodsDetailService.insertPurchasePlanDetail(purchasePlanDetail);
}
}
return purchasePlanMapper.updatePurchasePlan(purchasePlan);
} catch (Exception e) {
throw new ServiceException(e.getMessage());

View File

@ -0,0 +1,87 @@
package com.bonus.canteen.core.ims.utils;
import cn.hutool.core.date.DateUtil;
import com.bonus.canteen.core.common.utils.RedisUtil;
import com.bonus.canteen.core.common.utils.SpringContextHolder;
import com.bonus.common.houqin.constant.GlobalConstants;
import org.springframework.data.redis.core.RedisTemplate;
import java.time.LocalDateTime;
public class NoGenerateUtils {
public static String generatePurchasePlanCode() {
return generateCode("ims:purchaseOrderId:", "CGJH", 4);
}
public static String generateIntoId() {
return generateCode("ims:intoId:", "RKD", 4);
}
public static String generateOutId() {
return generateCode("ims:outId:", "CKD", 4);
}
public static String generateCheckId() {
return generateCode("ims:checkId:", "PDD", 4);
}
public static String generateInquiryId() {
return generateCode("ims:inquiryId:", "XJD", 4);
}
public static String generateProductionId() {
return generateCode("ims:productionId:", "SCJH", 4);
}
public static String generateDeliveryGoodsId() {
return generateCode("ims:deliveryGoodsId:", "SHD", 4);
}
public static String generateOrderGoodsCode() {
return generateCode("ims:orderGoodsId:", "CGD", 4);
}
public static String generateMaterialInquiryId() {
return generateCode("ims:materialInquiryId:", "HPXJD", 4);
}
public static String generateInspectGoodsCode() {
return generateCode("ims:inspectGoodsId:", "YHD", 4);
}
public static String generateRefundGoodsId() {
return generateCode("ims:refundGoodsId:", "THD", 4);
}
public static String generateFetchMaterialId() {
return generateCode("ims:fetchMaterialId:", "LLD", 4);
}
public static String generateGoodsAllocationId() {
return generateCode("ims:goodsAllocationId", "HPDB", 4);
}
public static String generateContractCode() {
return generateCode("ims:ContractId:", "HT", 4);
}
public static String generateAdjustmentOrderId() {
return generateCode("drpAdjustmentOrderId:", "TJD", 4);
}
public static String generateMarketPriceId() {
return generateCode("drpAdjustmentOrderId:", "SCJ", 4);
}
public static String generateCode(String redisKey, String prefix, Integer length) {
Long tenantId = GlobalConstants.TENANT_ID;
redisKey = "sc:" + tenantId + ":" + redisKey;
Long incr = RedisUtil.getIncr(redisTemplate(), redisKey);
return prefix + "-" + DateUtil.format(LocalDateTime.now(), "yyyyMMdd") + "-" + String.format("%0" + length + "d", incr);
}
private static RedisTemplate<Object, Object> redisTemplate() {
return SpringContextHolder.getBean("redisTemplate");
}
}

View File

@ -31,6 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectImsUnitVo"/>
where unit_id = #{unitId}
</select>
<select id="selectImsUnitByUnitIds" resultMap="ImsUnitResult">
<include refid="selectImsUnitVo"/>
where unit_id in
<foreach item="unitId" collection="array" open="(" separator="," close=")">
#{unitId}
</foreach>
</select>
<insert id="insertImsUnit" parameterType="com.bonus.canteen.core.ims.domain.ImsUnit" useGeneratedKeys="true" keyProperty="unitId">
insert into ims_unit

View File

@ -20,32 +20,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="materialName" column="material_name" />
</resultMap>
<sql id="selectInspectGoodsDetailVo">
select inspect_goods_detail_id, inspect_goods_id, inspect_goods_code, delivery_goods_detail_id, material_id, unit_price, order_num, delivery_num, total_qualified_num, qualified_num, unqualified_reason, check_pic_urls, create_by, create_time, update_by, update_time from ims_inspect_goods_detail
select inspect_goods_detail_id, inspect_goods_id, inspect_goods_code, delivery_goods_detail_id,
iigd.material_id, iigd.unit_price, order_num, delivery_num, total_qualified_num, qualified_num,
unqualified_reason, check_pic_urls, iigd.create_by, iigd.create_time, iigd.update_by, iigd.update_time,
cm.material_name
from ims_inspect_goods_detail iigd
left join cook_material cm on cm.material_id = iigd.material_id
</sql>
<select id="selectInspectGoodsDetailList" parameterType="com.bonus.canteen.core.ims.domain.InspectGoodsDetail" resultMap="InspectGoodsDetailResult">
<include refid="selectInspectGoodsDetailVo"/>
<where>
<if test="inspectGoodsId != null "> and inspect_goods_id = #{inspectGoodsId}</if>
<if test="inspectGoodsCode != null and inspectGoodsCode != ''"> and inspect_goods_code = #{inspectGoodsCode}</if>
<if test="deliveryGoodsDetailId != null "> and delivery_goods_detail_id = #{deliveryGoodsDetailId}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="deliveryNum != null "> and delivery_num = #{deliveryNum}</if>
<if test="totalQualifiedNum != null "> and total_qualified_num = #{totalQualifiedNum}</if>
<if test="qualifiedNum != null "> and qualified_num = #{qualifiedNum}</if>
<if test="unqualifiedReason != null and unqualifiedReason != ''"> and unqualified_reason = #{unqualifiedReason}</if>
<if test="checkPicUrls != null and checkPicUrls != ''"> and check_pic_urls = #{checkPicUrls}</if>
<where>
<if test="inspectGoodsId != null "> and iigd.inspect_goods_id = #{inspectGoodsId}</if>
<if test="inspectGoodsCode != null and inspectGoodsCode != ''"> and iigd.inspect_goods_code = #{inspectGoodsCode}</if>
<if test="deliveryGoodsDetailId != null "> and iigd.delivery_goods_detail_id = #{deliveryGoodsDetailId}</if>
<if test="materialId != null "> and iigd.material_id = #{materialId}</if>
<if test="unitPrice != null "> and iigd.unit_price = #{unitPrice}</if>
<if test="orderNum != null "> and iigd.order_num = #{orderNum}</if>
<if test="deliveryNum != null "> and iigd.delivery_num = #{deliveryNum}</if>
<if test="totalQualifiedNum != null "> and iigd.total_qualified_num = #{totalQualifiedNum}</if>
<if test="qualifiedNum != null "> and iigd.qualified_num = #{qualifiedNum}</if>
<if test="unqualifiedReason != null and unqualifiedReason != ''"> and iigd.unqualified_reason = #{unqualifiedReason}</if>
<if test="checkPicUrls != null and checkPicUrls != ''"> and iigd.check_pic_urls = #{checkPicUrls}</if>
</where>
</select>
<select id="selectInspectGoodsDetailByInspectGoodsDetailId" parameterType="Long" resultMap="InspectGoodsDetailResult">
<include refid="selectInspectGoodsDetailVo"/>
where inspect_goods_detail_id = #{inspectGoodsDetailId}
where iigd.inspect_goods_detail_id = #{inspectGoodsDetailId}
</select>
<insert id="insertInspectGoodsDetail" parameterType="com.bonus.canteen.core.ims.domain.InspectGoodsDetail" useGeneratedKeys="true" keyProperty="inspectGoodsDetailId">
@ -100,8 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="qualifiedNum != null">qualified_num = #{qualifiedNum},</if>
<if test="unqualifiedReason != null">unqualified_reason = #{unqualifiedReason},</if>
<if test="checkPicUrls != null">check_pic_urls = #{checkPicUrls},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -112,6 +118,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from ims_inspect_goods_detail where inspect_goods_detail_id = #{inspectGoodsDetailId}
</delete>
<delete id="deleteInspectGoodsDetailByInspectGoodsId" parameterType="Long">
delete from ims_inspect_goods_detail where inspect_goods_id = #{inspectGoodsId}
</delete>
<delete id="deleteInspectGoodsDetailByInspectGoodsDetailIds" parameterType="String">
delete from ims_inspect_goods_detail where inspect_goods_detail_id in
<foreach item="inspectGoodsDetailId" collection="array" open="(" separator="," close=")">

View File

@ -25,36 +25,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="deliverySupplierName" column="delivery_supplier_name" />
</resultMap>
<sql id="selectInspectGoodsVo">
select inspect_goods_id, inspect_goods_code, inspect_date, inspector, status, relate_delivery_goods_id, delivery_supplier_id, delivery_man, delivery_phone, delivery_warehouse_id, delivery_total_num, delivery_date, inspect_qualified_num, total_qualified_num, relate_order_goods_id, if_into, signature_pic_url, create_by, create_time, update_by, update_time from ims_inspect_goods
select inspect_goods_id, inspect_goods_code, inspect_date, inspector, iig.status,
relate_delivery_goods_id, delivery_supplier_id, delivery_man, delivery_phone,
delivery_warehouse_id, delivery_total_num, delivery_date, inspect_qualified_num,
total_qualified_num, relate_order_goods_id, if_into, signature_pic_url,
iig.create_by, iig.create_time, iig.update_by, iig.update_time,
isr.supplier_name as delivery_supplier_name
from ims_inspect_goods iig
left join ims_supplier isr on isr.supplier_id = iig.delivery_supplier_id
</sql>
<select id="selectInspectGoodsList" parameterType="com.bonus.canteen.core.ims.domain.InspectGoods" resultMap="InspectGoodsResult">
<include refid="selectInspectGoodsVo"/>
<where>
<if test="inspectDate != null "> and inspect_date = #{inspectDate}</if>
<if test="inspector != null and inspector != ''"> and inspector = #{inspector}</if>
<if test="status != null "> and status = #{status}</if>
<if test="relateDeliveryGoodsId != null and relateDeliveryGoodsId != ''"> and relate_delivery_goods_id = #{relateDeliveryGoodsId}</if>
<if test="deliverySupplierId != null "> and delivery_supplier_id = #{deliverySupplierId}</if>
<if test="deliveryMan != null and deliveryMan != ''"> and delivery_man = #{deliveryMan}</if>
<if test="deliveryPhone != null and deliveryPhone != ''"> and delivery_phone = #{deliveryPhone}</if>
<if test="deliveryWarehouseId != null "> and delivery_warehouse_id = #{deliveryWarehouseId}</if>
<if test="deliveryTotalNum != null "> and delivery_total_num = #{deliveryTotalNum}</if>
<if test="deliveryDate != null "> and delivery_date = #{deliveryDate}</if>
<if test="inspectQualifiedNum != null "> and inspect_qualified_num = #{inspectQualifiedNum}</if>
<if test="totalQualifiedNum != null "> and total_qualified_num = #{totalQualifiedNum}</if>
<if test="relateOrderGoodsId != null and relateOrderGoodsId != ''"> and relate_order_goods_id = #{relateOrderGoodsId}</if>
<if test="ifInto != null "> and if_into = #{ifInto}</if>
<if test="signaturePicUrl != null and signaturePicUrl != ''"> and signature_pic_url = #{signaturePicUrl}</if>
<if test="inspectDate != null "> and iig.inspect_date = #{inspectDate}</if>
<if test="inspector != null and inspector != ''"> and iig.inspector = #{inspector}</if>
<if test="status != null "> and iig.status = #{status}</if>
<if test="relateDeliveryGoodsId != null and relateDeliveryGoodsId != ''"> and iig.relate_delivery_goods_id = #{relateDeliveryGoodsId}</if>
<if test="deliverySupplierId != null "> and iig.delivery_supplier_id = #{deliverySupplierId}</if>
<if test="deliveryMan != null and deliveryMan != ''"> and iig.delivery_man = #{deliveryMan}</if>
<if test="deliveryPhone != null and deliveryPhone != ''"> and iig.delivery_phone = #{deliveryPhone}</if>
<if test="deliveryWarehouseId != null "> and iig.delivery_warehouse_id = #{deliveryWarehouseId}</if>
<if test="deliveryTotalNum != null "> and iig.delivery_total_num = #{deliveryTotalNum}</if>
<if test="deliveryDate != null "> and iig.delivery_date = #{deliveryDate}</if>
<if test="inspectQualifiedNum != null "> and iig.inspect_qualified_num = #{inspectQualifiedNum}</if>
<if test="totalQualifiedNum != null "> and iig.total_qualified_num = #{totalQualifiedNum}</if>
<if test="relateOrderGoodsId != null and relateOrderGoodsId != ''"> and iig.relate_order_goods_id = #{relateOrderGoodsId}</if>
<if test="ifInto != null "> and iig.if_into = #{ifInto}</if>
<if test="signaturePicUrl != null and signaturePicUrl != ''"> and iig.signature_pic_url = #{signaturePicUrl}</if>
<if test="inspectGoodsCode != null and inspectGoodsCode != ''">
and iig.inspect_goods_code like CONCAT('%',#{inspectGoodsCode},'%')
</if>
<if test="startDateTime != null">
and iig.inspect_date <![CDATA[ >= ]]> #{startDateTime}
</if>
<if test="endDateTime != null">
and iig.inspect_date <![CDATA[ <= ]]> #{endDateTime}
</if>
</where>
</select>
<select id="selectInspectGoodsByInspectGoodsId" parameterType="Long" resultMap="InspectGoodsResult">
<include refid="selectInspectGoodsVo"/>
where inspect_goods_id = #{inspectGoodsId}
where iig.inspect_goods_id = #{inspectGoodsId}
</select>
<insert id="insertInspectGoods" parameterType="com.bonus.canteen.core.ims.domain.InspectGoods" useGeneratedKeys="true" keyProperty="inspectGoodsId">
@ -108,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateInspectGoods" parameterType="com.bonus.canteen.core.ims.domain.InspectGoods">
update ims_inspect_goods
<trim prefix="SET" suffixOverrides=",">
<if test="inspectGoodsCode != null">inspect_goods_code = #{inspectGoodsCode},</if>
<!-- <if test="inspectGoodsCode != null">inspect_goods_code = #{inspectGoodsCode},</if>-->
<if test="inspectDate != null">inspect_date = #{inspectDate},</if>
<if test="inspector != null and inspector != ''">inspector = #{inspector},</if>
<if test="status != null">status = #{status},</if>
@ -124,8 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relateOrderGoodsId != null">relate_order_goods_id = #{relateOrderGoodsId},</if>
<if test="ifInto != null">if_into = #{ifInto},</if>
<if test="signaturePicUrl != null">signature_pic_url = #{signaturePicUrl},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>

View File

@ -22,32 +22,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="materialName" column="material_name" />
<result property="unitName" column="unit_name" />
</resultMap>
<sql id="selectOrderGoodsDetailVo">
select order_goods_detail_id, order_goods_id, material_id, unit_id, size, order_num, single_price, total_price, into_num, unqualified_num, unqualified_reason, if_all_inspect, remark, del_flag, create_by, create_time, update_by, update_time from ims_order_goods_detail
select order_goods_detail_id, order_goods_id, iogd.material_id, iogd.unit_id, iogd.size,
order_num, single_price, total_price, into_num, unqualified_num,
unqualified_reason, if_all_inspect, remark, del_flag, iogd.create_by,
iogd.create_time, iogd.update_by, iogd.update_time, cm.material_name, iu.unit_name
from ims_order_goods_detail iogd
left join cook_material cm on cm.material_id = iogd.material_id
left join ims_unit iu on iu.unit_id = iogd.unit_id
</sql>
<select id="selectOrderGoodsDetailList" parameterType="com.bonus.canteen.core.ims.domain.OrderGoodsDetail" resultMap="OrderGoodsDetailResult">
<include refid="selectOrderGoodsDetailVo"/>
<where>
<if test="orderGoodsId != null "> and order_goods_id = #{orderGoodsId}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="unitId != null "> and unit_id = #{unitId}</if>
<if test="size != null and size != ''"> and size = #{size}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="singlePrice != null "> and single_price = #{singlePrice}</if>
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
<if test="intoNum != null "> and into_num = #{intoNum}</if>
<if test="unqualifiedNum != null "> and unqualified_num = #{unqualifiedNum}</if>
<if test="unqualifiedReason != null and unqualifiedReason != ''"> and unqualified_reason = #{unqualifiedReason}</if>
<if test="ifAllInspect != null "> and if_all_inspect = #{ifAllInspect}</if>
<where>
iogd.del_flag = '0'
<if test="orderGoodsId != null "> and iogd.order_goods_id = #{orderGoodsId}</if>
<if test="materialId != null "> and iogd.material_id = #{materialId}</if>
<if test="unitId != null "> and iogd.unit_id = #{unitId}</if>
<if test="size != null and size != ''"> and iogd.size = #{size}</if>
<if test="orderNum != null "> and iogd.order_num = #{orderNum}</if>
<if test="singlePrice != null "> and iogd.single_price = #{singlePrice}</if>
<if test="totalPrice != null "> and iogd.total_price = #{totalPrice}</if>
<if test="intoNum != null "> and iogd.into_num = #{intoNum}</if>
<if test="unqualifiedNum != null "> and iogd.unqualified_num = #{unqualifiedNum}</if>
<if test="unqualifiedReason != null and unqualifiedReason != ''"> and iogd.unqualified_reason = #{unqualifiedReason}</if>
<if test="ifAllInspect != null "> and iogd.if_all_inspect = #{ifAllInspect}</if>
</where>
</select>
<select id="selectOrderGoodsDetailByOrderGoodsDetailId" parameterType="Long" resultMap="OrderGoodsDetailResult">
<include refid="selectOrderGoodsDetailVo"/>
where order_goods_detail_id = #{orderGoodsDetailId}
where iogd.del_flag = '0' and iogd.order_goods_detail_id = #{orderGoodsDetailId}
</select>
<insert id="insertOrderGoodsDetail" parameterType="com.bonus.canteen.core.ims.domain.OrderGoodsDetail" useGeneratedKeys="true" keyProperty="orderGoodsDetailId">
@ -107,9 +116,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unqualifiedReason != null">unqualified_reason = #{unqualifiedReason},</if>
<if test="ifAllInspect != null">if_all_inspect = #{ifAllInspect},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -117,11 +126,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteOrderGoodsDetailByOrderGoodsDetailId" parameterType="Long">
delete from ims_order_goods_detail where order_goods_detail_id = #{orderGoodsDetailId}
update ims_order_goods_detail set del_flag = '2' where order_goods_detail_id = #{orderGoodsDetailId}
</delete>
<delete id="deleteOrderGoodsDetailByOrderGoodsId" parameterType="Long">
update ims_order_goods_detail set del_flag = '2' where order_goods_id = #{orderGoodsId}
</delete>
<delete id="deleteOrderGoodsDetailByOrderGoodsDetailIds" parameterType="String">
delete from ims_order_goods_detail where order_goods_detail_id in
update ims_order_goods_detail set del_flag = '2' where order_goods_detail_id in
<foreach item="orderGoodsDetailId" collection="array" open="(" separator="," close=")">
#{orderGoodsDetailId}
</foreach>

View File

@ -5,6 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.bonus.canteen.core.ims.mapper.OrderGoodsMapper">
<resultMap type="com.bonus.canteen.core.ims.domain.OrderGoods" id="OrderGoodsResult">
<result property="orderGoodsId" column="order_goods_id" />
<result property="orderGoodsCode" column="order_goods_code" />
<result property="supplierId" column="supplier_id" />
<result property="orderStatus" column="order_status" />
<result property="orderAmount" column="order_amount" />
@ -33,48 +34,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="supplierName" column="supplier_name" />
<result property="warehouseName" column="warehouse_name" />
<result property="areaName" column="area_name" />
<result property="canteenName" column="canteen_name" />
<result property="stallName" column="stall_name" />
</resultMap>
<sql id="selectOrderGoodsVo">
select order_goods_id, supplier_id, order_status, order_amount, request_arrival_time, supply_address, warehouse_id, if_dismantle, order_title, approve_status, process_instance_id, supplier_confirm_status, approve_by, approve_remark, total_num, total_into_num, approve_time, stall_id, canteen_id, area_id, confirm_time, confirm_remark, if_all_inspect, remark, del_flag, create_by, create_time, update_by, update_time from ims_order_goods
select order_goods_id, order_goods_code, iog.supplier_id, order_status, order_amount, request_arrival_time,
supply_address, iog.warehouse_id, if_dismantle, order_title, approve_status,
process_instance_id, supplier_confirm_status, approve_by, approve_remark,
total_num, total_into_num, approve_time, iog.stall_id, iog.canteen_id, iog.area_id,
confirm_time, confirm_remark, if_all_inspect, iog.remark, iog.del_flag, iog.create_by,
iog.create_time, iog.update_by, iog.update_time, isr.supplier_name, iwi.warehouse_name,
ba.area_name, bc.canteen_name, bs.stall_name
from ims_order_goods iog
left join ims_supplier isr on isr.supplier_id = iog.supplier_id
left join ims_warehouse_info iwi on iwi.warehouse_id = iog.warehouse_id
left join basic_area ba on ba.area_id = iog.area_id
left join basic_canteen bc on bc.canteen_id = iog.canteen_id
left join basic_stall bs on bs.stall_id = iog.stall_id
</sql>
<select id="selectOrderGoodsList" parameterType="com.bonus.canteen.core.ims.domain.OrderGoods" resultMap="OrderGoodsResult">
<include refid="selectOrderGoodsVo"/>
<where>
<if test="supplierId != null "> and supplier_id = #{supplierId}</if>
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
<if test="orderAmount != null "> and order_amount = #{orderAmount}</if>
<if test="requestArrivalTime != null "> and request_arrival_time = #{requestArrivalTime}</if>
<if test="supplyAddress != null and supplyAddress != ''"> and supply_address = #{supplyAddress}</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="ifDismantle != null "> and if_dismantle = #{ifDismantle}</if>
<if test="orderTitle != null and orderTitle != ''"> and order_title = #{orderTitle}</if>
<if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and process_instance_id = #{processInstanceId}</if>
<if test="supplierConfirmStatus != null "> and supplier_confirm_status = #{supplierConfirmStatus}</if>
<if test="approveBy != null and approveBy != ''"> and approve_by = #{approveBy}</if>
<if test="approveRemark != null and approveRemark != ''"> and approve_remark = #{approveRemark}</if>
<if test="totalNum != null "> and total_num = #{totalNum}</if>
<if test="totalIntoNum != null "> and total_into_num = #{totalIntoNum}</if>
<if test="approveTime != null "> and approve_time = #{approveTime}</if>
<if test="stallId != null and stallId != ''"> and stall_id = #{stallId}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="areaId != null "> and area_id = #{areaId}</if>
<if test="confirmTime != null "> and confirm_time = #{confirmTime}</if>
<if test="confirmRemark != null and confirmRemark != ''"> and confirm_remark = #{confirmRemark}</if>
<if test="ifAllInspect != null "> and if_all_inspect = #{ifAllInspect}</if>
<where>
iog.del_flag = '0'
<if test="supplierId != null "> and iog.supplier_id = #{supplierId}</if>
<if test="orderStatus != null "> and iog.order_status = #{orderStatus}</if>
<if test="orderAmount != null "> and iog.order_amount = #{orderAmount}</if>
<if test="requestArrivalTime != null "> and iog.request_arrival_time = #{requestArrivalTime}</if>
<if test="supplyAddress != null and supplyAddress != ''"> and iog.supply_address = #{supplyAddress}</if>
<if test="warehouseId != null "> and iog.warehouse_id = #{warehouseId}</if>
<if test="ifDismantle != null "> and iog.if_dismantle = #{ifDismantle}</if>
<if test="orderTitle != null and orderTitle != ''"> and iog.order_title = #{orderTitle}</if>
<if test="approveStatus != null "> and iog.approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and iog.process_instance_id = #{processInstanceId}</if>
<if test="supplierConfirmStatus != null "> and iog.supplier_confirm_status = #{supplierConfirmStatus}</if>
<if test="approveBy != null and approveBy != ''"> and iog.approve_by = #{approveBy}</if>
<if test="approveRemark != null and approveRemark != ''"> and iog.approve_remark = #{approveRemark}</if>
<if test="totalNum != null "> and iog.total_num = #{totalNum}</if>
<if test="totalIntoNum != null "> and iog.total_into_num = #{totalIntoNum}</if>
<if test="approveTime != null "> and iog.approve_time = #{approveTime}</if>
<if test="stallId != null and stallId != ''"> and iog.stall_id = #{stallId}</if>
<if test="canteenId != null "> and iog.canteen_id = #{canteenId}</if>
<if test="areaId != null "> and iog.area_id = #{areaId}</if>
<if test="confirmTime != null "> and iog.confirm_time = #{confirmTime}</if>
<if test="confirmRemark != null and confirmRemark != ''"> and iog.confirm_remark = #{confirmRemark}</if>
<if test="ifAllInspect != null "> and iog.if_all_inspect = #{ifAllInspect}</if>
<if test="orderGoodsCode != null and orderGoodsCode != ''">
and iog.order_goods_code like CONCAT('%',#{orderGoodsCode},'%')
</if>
<if test="startDateTime != null">
and iog.create_time <![CDATA[ >= ]]> #{startDateTime}
</if>
<if test="endDateTime != null">
and iog.create_time <![CDATA[ <= ]]> #{endDateTime}
</if>
</where>
</select>
<select id="selectOrderGoodsByOrderGoodsId" parameterType="Long" resultMap="OrderGoodsResult">
<include refid="selectOrderGoodsVo"/>
where order_goods_id = #{orderGoodsId}
where iog.del_flag = '0' and iog.order_goods_id = #{orderGoodsId}
</select>
<insert id="insertOrderGoods" parameterType="com.bonus.canteen.core.ims.domain.OrderGoods" useGeneratedKeys="true" keyProperty="orderGoodsId">
insert into ims_order_goods
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderGoodsCode != null">order_goods_code,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="orderStatus != null">order_status,</if>
<if test="orderAmount != null">order_amount,</if>
@ -105,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderGoodsCode != null">#{orderGoodsCode},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="orderStatus != null">#{orderStatus},</if>
<if test="orderAmount != null">#{orderAmount},</if>
@ -162,9 +192,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="confirmRemark != null">confirm_remark = #{confirmRemark},</if>
<if test="ifAllInspect != null">if_all_inspect = #{ifAllInspect},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -172,11 +202,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteOrderGoodsByOrderGoodsId" parameterType="Long">
delete from ims_order_goods where order_goods_id = #{orderGoodsId}
update ims_order_goods set del_flag = '2' where order_goods_id = #{orderGoodsId}
</delete>
<delete id="deleteOrderGoodsByOrderGoodsIds" parameterType="String">
delete from ims_order_goods where order_goods_id in
update ims_order_goods set del_flag = '2' where order_goods_id in
<foreach item="orderGoodsId" collection="array" open="(" separator="," close=")">
#{orderGoodsId}
</foreach>

View File

@ -19,28 +19,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="materialName" column="material_name" />
<result property="unitName" column="unit_name" />
</resultMap>
<sql id="selectPurchaseContractDetailVo">
select contract_detail_id, contract_id, contract_code, material_id, unit_id, size, order_num, single_price, total_price, remark, del_flag, create_by, create_time, update_by, update_time from ims_purchase_contract_detail
select contract_detail_id, contract_id, contract_code, ipcd.material_id, ipcd.unit_id, ipcd.size,
order_num, single_price, total_price, remark, del_flag, ipcd.create_by,
ipcd.create_time, ipcd.update_by, ipcd.update_time, cm.material_name, iu.unit_name
from ims_purchase_contract_detail ipcd
left join cook_material cm on ipcd.material_id = cm.material_id
left join ims_unit iu on ipcd.unit_id = iu.unit_id
</sql>
<select id="selectPurchaseContractDetailList" parameterType="com.bonus.canteen.core.ims.domain.PurchaseContractDetail" resultMap="PurchaseContractDetailResult">
<include refid="selectPurchaseContractDetailVo"/>
<where>
<if test="contractCode != null and contractCode != ''"> and contract_code = #{contractCode}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="unitId != null "> and unit_id = #{unitId}</if>
<if test="size != null and size != ''"> and size = #{size}</if>
<if test="orderNum != null "> and order_num = #{orderNum}</if>
<if test="singlePrice != null "> and single_price = #{singlePrice}</if>
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
<where>
ipcd.del_flag = '0'
<if test="contractCode != null and contractCode != ''"> and ipcd.contract_code = #{contractCode}</if>
<if test="materialId != null "> and ipcd.material_id = #{materialId}</if>
<if test="unitId != null "> and ipcd.unit_id = #{unitId}</if>
<if test="size != null and size != ''"> and ipcd.size = #{size}</if>
<if test="orderNum != null "> and ipcd.order_num = #{orderNum}</if>
<if test="singlePrice != null "> and ipcd.single_price = #{singlePrice}</if>
<if test="totalPrice != null "> and ipcd.total_price = #{totalPrice}</if>
</where>
</select>
<select id="selectPurchaseContractDetailByContractDetailId" parameterType="Long" resultMap="PurchaseContractDetailResult">
<include refid="selectPurchaseContractDetailVo"/>
where contract_detail_id = #{contractDetailId}
where del_flag = '0' and ipcd.contract_detail_id = #{contractDetailId}
</select>
<insert id="insertPurchaseContractDetail" parameterType="com.bonus.canteen.core.ims.domain.PurchaseContractDetail" useGeneratedKeys="true" keyProperty="contractDetailId">
@ -91,9 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="singlePrice != null">single_price = #{singlePrice},</if>
<if test="totalPrice != null">total_price = #{totalPrice},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -101,11 +109,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deletePurchaseContractDetailByContractDetailId" parameterType="Long">
delete from ims_purchase_contract_detail where contract_detail_id = #{contractDetailId}
update ims_purchase_contract_detail set del_flag = '2' where contract_detail_id = #{contractDetailId}
</delete>
<delete id="deletePurchaseContractDetailByContractId" parameterType="Long">
update ims_purchase_contract_detail set del_flag = '2' where contract_id = #{contractId}
</delete>
<delete id="deletePurchaseContractDetailByContractIds" >
update ims_purchase_contract_detail set del_flag = '2' where contract_id in
<foreach item="contractId" collection="array" open="(" separator="," close=")">
#{contractId}
</foreach>
</delete>
<delete id="deletePurchaseContractDetailByContractDetailIds" parameterType="String">
delete from ims_purchase_contract_detail where contract_detail_id in
update ims_purchase_contract_detail set del_flag = '2' where contract_detail_id in
<foreach item="contractDetailId" collection="array" open="(" separator="," close=")">
#{contractDetailId}
</foreach>

View File

@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="orderGoodsAmount" column="order_goods_amount" />
<result property="contractSigningTime" column="contract_signing_time" />
<result property="remark" column="remark" />
<result property="areaId" column="area_id" />
<result property="canteenId" column="canteen_id" />
<result property="contractTitle" column="contract_title" />
<result property="contractStartTime" column="contract_start_time" />
@ -37,46 +38,87 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="areaName" column="area_name" />
<result property="canteenName" column="canteen_name" />
<result property="supplierName" column="supplier_name" />
</resultMap>
<sql id="selectPurchaseContractVo">
select contract_id, contract_code, supplier_id, commit_status, contract_status, contract_amount, order_goods_amount, contract_signing_time, remark, canteen_id, contract_title, contract_start_time, contract_end_time, approve_status, process_instance_id, approve_by, approve_time, approve_remark, total_num, category_num, pay_money_style, pay_money_date, collect_money_bank, collect_money_account, collect_money_account_name, pay_remark, contract_attachment, contract_person, del_flag, create_by, create_time, update_by, update_time from ims_purchase_contract
select contract_id, contract_code, ipc.supplier_id, commit_status, contract_status,
contract_amount, order_goods_amount, contract_signing_time, ipc.remark, ipc.area_id,
ipc.canteen_id, contract_title, contract_start_time, contract_end_time,
approve_status, process_instance_id, approve_by, approve_time, approve_remark,
total_num, category_num, pay_money_style, pay_money_date, collect_money_bank,
collect_money_account, collect_money_account_name, pay_remark, contract_attachment,
contract_person, ipc.del_flag, ipc.create_by, ipc.create_time, ipc.update_by, ipc.update_time,
bc.canteen_name, isr.supplier_name, ba.area_name
from ims_purchase_contract ipc
left join basic_canteen bc on bc.canteen_id = ipc.canteen_id
left join basic_area ba on ba.area_id = ipc.area_id
left join ims_supplier isr on isr.supplier_id = ipc.supplier_id
</sql>
<select id="selectPurchaseContractList" parameterType="com.bonus.canteen.core.ims.domain.PurchaseContract" resultMap="PurchaseContractResult">
<include refid="selectPurchaseContractVo"/>
<where>
<if test="supplierId != null "> and supplier_id = #{supplierId}</if>
<if test="commitStatus != null "> and commit_status = #{commitStatus}</if>
<if test="contractStatus != null "> and contract_status = #{contractStatus}</if>
<if test="contractAmount != null "> and contract_amount = #{contractAmount}</if>
<if test="orderGoodsAmount != null "> and order_goods_amount = #{orderGoodsAmount}</if>
<if test="contractSigningTime != null "> and contract_signing_time = #{contractSigningTime}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="contractTitle != null and contractTitle != ''"> and contract_title = #{contractTitle}</if>
<if test="contractStartTime != null "> and contract_start_time = #{contractStartTime}</if>
<if test="contractEndTime != null "> and contract_end_time = #{contractEndTime}</if>
<if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and process_instance_id = #{processInstanceId}</if>
<if test="approveBy != null and approveBy != ''"> and approve_by = #{approveBy}</if>
<if test="approveTime != null "> and approve_time = #{approveTime}</if>
<if test="approveRemark != null and approveRemark != ''"> and approve_remark = #{approveRemark}</if>
<if test="totalNum != null "> and total_num = #{totalNum}</if>
<if test="categoryNum != null "> and category_num = #{categoryNum}</if>
<if test="payMoneyStyle != null "> and pay_money_style = #{payMoneyStyle}</if>
<if test="payMoneyDate != null "> and pay_money_date = #{payMoneyDate}</if>
<if test="collectMoneyBank != null and collectMoneyBank != ''"> and collect_money_bank = #{collectMoneyBank}</if>
<if test="collectMoneyAccount != null and collectMoneyAccount != ''"> and collect_money_account = #{collectMoneyAccount}</if>
<if test="collectMoneyAccountName != null and collectMoneyAccountName != ''"> and collect_money_account_name like concat('%', #{collectMoneyAccountName}, '%')</if>
<if test="payRemark != null and payRemark != ''"> and pay_remark = #{payRemark}</if>
<if test="contractAttachment != null and contractAttachment != ''"> and contract_attachment = #{contractAttachment}</if>
<if test="contractPerson != null and contractPerson != ''"> and contract_person = #{contractPerson}</if>
<where>
ipc.del_flag = '0'
<if test="supplierId != null "> and ipc.supplier_id = #{supplierId}</if>
<if test="commitStatus != null "> and ipc.commit_status = #{commitStatus}</if>
<if test="contractAmount != null "> and ipc.contract_amount = #{contractAmount}</if>
<if test="orderGoodsAmount != null "> and ipc.order_goods_amount = #{orderGoodsAmount}</if>
<if test="contractSigningTime != null "> and ipc.contract_signing_time = #{contractSigningTime}</if>
<if test="areaId != null "> and ipc.area_id = #{areaId}</if>
<if test="canteenId != null "> and ipc.canteen_id = #{canteenId}</if>
<if test="contractTitle != null and contractTitle != ''"> and ipc.contract_title = #{contractTitle}</if>
<if test="contractStartTime != null "> and ipc.contract_start_time = #{contractStartTime}</if>
<if test="contractEndTime != null "> and ipc.contract_end_time = #{contractEndTime}</if>
<if test="approveStatus != null "> and ipc.approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and ipc.process_instance_id = #{processInstanceId}</if>
<if test="approveBy != null and approveBy != ''"> and ipc.approve_by = #{approveBy}</if>
<if test="approveTime != null "> and ipc.approve_time = #{approveTime}</if>
<if test="approveRemark != null and approveRemark != ''"> and ipc.approve_remark = #{approveRemark}</if>
<if test="totalNum != null "> and ipc.total_num = #{totalNum}</if>
<if test="categoryNum != null "> and ipc.category_num = #{categoryNum}</if>
<if test="payMoneyStyle != null "> and ipc.pay_money_style = #{payMoneyStyle}</if>
<if test="payMoneyDate != null "> and ipc.pay_money_date = #{payMoneyDate}</if>
<if test="collectMoneyBank != null and collectMoneyBank != ''"> and ipc.collect_money_bank = #{collectMoneyBank}</if>
<if test="collectMoneyAccount != null and collectMoneyAccount != ''"> and ipc.collect_money_account = #{collectMoneyAccount}</if>
<if test="collectMoneyAccountName != null and collectMoneyAccountName != ''"> and ipc.collect_money_account_name like concat('%', #{collectMoneyAccountName}, '%')</if>
<if test="payRemark != null and payRemark != ''"> and ipc.pay_remark = #{payRemark}</if>
<if test="contractAttachment != null and contractAttachment != ''"> and ipc.contract_attachment = #{contractAttachment}</if>
<if test="contractPerson != null and contractPerson != ''"> and ipc.contract_person = #{contractPerson}</if>
<if test="contractStatus != null ">
<if test="contractStatus == 1 ">
and NOW() <![CDATA[ < ]]> ipc.contract_start_time and contract_status != 4
</if>
<if test="contractStatus == 2 ">
and (NOW() BETWEEN ipc.contract_start_time and ipc.contract_end_time) and contract_status != 4
</if>
<if test="contractStatus == 3 ">
and NOW() <![CDATA[ > ]]> ipc.contract_end_time and contract_status != 4
</if>
<if test="contractStatus == 4 ">
and ipc.contract_status = 4
</if>
</if>
<if test="searchValue != null and searchValue != ''">
and (ipc.contract_code like CONCAT('%',#{searchValue},'%')
or ipc.contract_title like CONCAT('%',#{searchValue},'%')
or isr.supplier_name like CONCAT('%',#{searchValue},'%')
)
</if>
<if test="startDateTime != null">
and ipc.contract_start_time <![CDATA[ >= ]]> #{startDateTime}
</if>
<if test="endDateTime != null">
and ipc.contract_end_time <![CDATA[ <= ]]> #{endDateTime}
</if>
</where>
</select>
<select id="selectPurchaseContractByContractId" parameterType="Long" resultMap="PurchaseContractResult">
<include refid="selectPurchaseContractVo"/>
where contract_id = #{contractId}
where ipc.del_flag = '0' and contract_id = #{contractId}
</select>
<insert id="insertPurchaseContract" parameterType="com.bonus.canteen.core.ims.domain.PurchaseContract" useGeneratedKeys="true" keyProperty="contractId">
@ -90,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="orderGoodsAmount != null">order_goods_amount,</if>
<if test="contractSigningTime != null">contract_signing_time,</if>
<if test="remark != null">remark,</if>
<if test="areaId != null">area_id,</if>
<if test="canteenId != null">canteen_id,</if>
<if test="contractTitle != null">contract_title,</if>
<if test="contractStartTime != null">contract_start_time,</if>
@ -124,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="orderGoodsAmount != null">#{orderGoodsAmount},</if>
<if test="contractSigningTime != null">#{contractSigningTime},</if>
<if test="remark != null">#{remark},</if>
<if test="areaId != null">#{areaId},</if>
<if test="canteenId != null">#{canteenId},</if>
<if test="contractTitle != null">#{contractTitle},</if>
<if test="contractStartTime != null">#{contractStartTime},</if>
@ -154,7 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updatePurchaseContract" parameterType="com.bonus.canteen.core.ims.domain.PurchaseContract">
update ims_purchase_contract
<trim prefix="SET" suffixOverrides=",">
<if test="contractCode != null">contract_code = #{contractCode},</if>
<!-- <if test="contractCode != null">contract_code = #{contractCode},</if>-->
<if test="supplierId != null">supplier_id = #{supplierId},</if>
<if test="commitStatus != null">commit_status = #{commitStatus},</if>
<if test="contractStatus != null">contract_status = #{contractStatus},</if>
@ -162,6 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="orderGoodsAmount != null">order_goods_amount = #{orderGoodsAmount},</if>
<if test="contractSigningTime != null">contract_signing_time = #{contractSigningTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="areaId != null">area_id = #{areaId},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="contractTitle != null">contract_title = #{contractTitle},</if>
<if test="contractStartTime != null">contract_start_time = #{contractStartTime},</if>
@ -181,9 +226,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="payRemark != null">pay_remark = #{payRemark},</if>
<if test="contractAttachment != null">contract_attachment = #{contractAttachment},</if>
<if test="contractPerson != null">contract_person = #{contractPerson},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -191,11 +236,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deletePurchaseContractByContractId" parameterType="Long">
delete from ims_purchase_contract where contract_id = #{contractId}
update ims_purchase_contract set del_flag = '2' where contract_id = #{contractId}
</delete>
<delete id="deletePurchaseContractByContractIds" parameterType="String">
delete from ims_purchase_contract where contract_id in
update ims_purchase_contract set del_flag = '2' where contract_id in
<foreach item="contractId" collection="array" open="(" separator="," close=")">
#{contractId}
</foreach>

View File

@ -23,33 +23,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="materialName" column="material_name" />
<result property="unitName" column="unit_name" />
<result property="stallName" column="stall_name" />
</resultMap>
<sql id="selectPurchasePlanDetailVo">
select detail_id, plan_id, plan_code, material_id, unit_id, unit_price, size, purchase_num, production_plan_num, inventory_num, purchase_budget_price, stall_id, original_quantity, remark, del_flag, create_by, create_time, update_by, update_time from ims_purchase_plan_detail
select detail_id, plan_id, plan_code, ippd.material_id, ippd.unit_id, ippd.unit_price, ippd.size,
purchase_num, production_plan_num, inventory_num, purchase_budget_price,
ippd.stall_id, original_quantity, remark, ippd.del_flag, ippd.create_by, ippd.create_time,
ippd.update_by, ippd.update_time, cm.material_name, iu.unit_name, bs.stall_name
from ims_purchase_plan_detail ippd
left join cook_material cm on cm.material_id = ippd.material_id
left join ims_unit iu on iu.unit_id = ippd.unit_id
left join basic_stall bs on bs.stall_id = ippd.stall_id
</sql>
<select id="selectPurchasePlanDetailList" parameterType="com.bonus.canteen.core.ims.domain.PurchasePlanDetail" resultMap="PurchasePlanDetailResult">
<include refid="selectPurchasePlanDetailVo"/>
<where>
<if test="planId != null "> and plan_id = #{planId}</if>
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
<if test="materialId != null "> and material_id = #{materialId}</if>
<if test="unitId != null "> and unit_id = #{unitId}</if>
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
<if test="size != null and size != ''"> and size = #{size}</if>
<if test="purchaseNum != null "> and purchase_num = #{purchaseNum}</if>
<if test="productionPlanNum != null "> and production_plan_num = #{productionPlanNum}</if>
<if test="inventoryNum != null "> and inventory_num = #{inventoryNum}</if>
<if test="purchaseBudgetPrice != null "> and purchase_budget_price = #{purchaseBudgetPrice}</if>
<if test="stallId != null "> and stall_id = #{stallId}</if>
<if test="originalQuantity != null "> and original_quantity = #{originalQuantity}</if>
<where>
ippd.del_flag = '0'
<if test="planId != null "> and ippd.plan_id = #{planId}</if>
<if test="planCode != null and planCode != ''"> and ippd.plan_code = #{planCode}</if>
<if test="materialId != null "> and ippd.material_id = #{materialId}</if>
<if test="unitId != null "> and ippd.unit_id = #{unitId}</if>
<if test="unitPrice != null "> and ippd.unit_price = #{unitPrice}</if>
<if test="size != null and size != ''"> and ippd.size = #{size}</if>
<if test="purchaseNum != null "> and ippd.purchase_num = #{purchaseNum}</if>
<if test="productionPlanNum != null "> and ippd.production_plan_num = #{productionPlanNum}</if>
<if test="inventoryNum != null "> and ippd.inventory_num = #{inventoryNum}</if>
<if test="purchaseBudgetPrice != null "> and ippd.purchase_budget_price = #{purchaseBudgetPrice}</if>
<if test="stallId != null "> and ippd.stall_id = #{stallId}</if>
<if test="originalQuantity != null "> and ippd.original_quantity = #{originalQuantity}</if>
</where>
</select>
<select id="selectPurchasePlanDetailByDetailId" parameterType="Long" resultMap="PurchasePlanDetailResult">
<include refid="selectPurchasePlanDetailVo"/>
where detail_id = #{detailId}
where ippd.del_flag = '0' and ippd.detail_id = #{detailId}
</select>
<insert id="insertPurchasePlanDetail" parameterType="com.bonus.canteen.core.ims.domain.PurchasePlanDetail" useGeneratedKeys="true" keyProperty="detailId">
@ -112,9 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="stallId != null">stall_id = #{stallId},</if>
<if test="originalQuantity != null">original_quantity = #{originalQuantity},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -122,11 +133,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deletePurchasePlanDetailByDetailId" parameterType="Long">
delete from ims_purchase_plan_detail where detail_id = #{detailId}
update ims_purchase_plan_detail set del_flag = '2' where detail_id = #{detailId}
</delete>
<delete id="deletePurchasePlanDetailByPlanId" parameterType="Long">
update ims_purchase_plan_detail set del_flag = '2' where plan_id = #{planId}
</delete>
<delete id="deletePurchasePlanDetailByDetailIds" parameterType="String">
delete from ims_purchase_plan_detail where detail_id in
update ims_purchase_plan_detail set del_flag = '2' where detail_id in
<foreach item="detailId" collection="array" open="(" separator="," close=")">
#{detailId}
</foreach>

View File

@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="approveStatus" column="approve_status" />
<result property="processInstanceId" column="process_instance_id" />
<result property="relatePlanIds" column="relate_plan_ids" />
<result property="areaId" column="area_id" />
<result property="canteenId" column="canteen_id" />
<result property="stallId" column="stall_id" />
<result property="purchaseBudgetTotal" column="purchase_budget_total" />
@ -28,38 +29,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="areaName" column="area_name" />
<result property="canteenName" column="canteen_name" />
<result property="stallName" column="stall_name" />
</resultMap>
<sql id="selectPurchasePlanVo">
select plan_id, plan_code, status, purchase_date, purchase_user_id, production_plan_id, approve_status, process_instance_id, relate_plan_ids, canteen_id, stall_id, purchase_budget_total, supplier_ids, approve_by, approve_time, approve_remark, if_merge, deliver_goods_date, remark, del_flag, create_by, create_time, update_by, update_time from ims_purchase_plan
select plan_id, plan_code, ipp.status, purchase_date, purchase_user_id, production_plan_id,
approve_status, process_instance_id, relate_plan_ids, ipp.area_id, ipp.canteen_id, ipp.stall_id,
purchase_budget_total, supplier_ids, approve_by, approve_time, approve_remark,
if_merge, deliver_goods_date, ipp.remark, ipp.del_flag, ipp.create_by, ipp.create_time,
ipp.update_by, ipp.update_time, bc.canteen_name, bs.stall_name, ba.area_name
from ims_purchase_plan ipp
left join sys_user su on ipp.purchase_user_id = su.user_id
left join basic_area ba on ba.area_id = ipp.area_id
left join basic_canteen bc on bc.canteen_id = ipp.canteen_id
left join basic_stall bs on bs.stall_id = ipp.stall_id
</sql>
<select id="selectPurchasePlanList" parameterType="com.bonus.canteen.core.ims.domain.PurchasePlan" resultMap="PurchasePlanResult">
<include refid="selectPurchasePlanVo"/>
<where>
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
<if test="status != null "> and status = #{status}</if>
<if test="purchaseDate != null "> and purchase_date = #{purchaseDate}</if>
<if test="purchaseUserId != null "> and purchase_user_id = #{purchaseUserId}</if>
<if test="productionPlanId != null and productionPlanId != ''"> and production_plan_id = #{productionPlanId}</if>
<if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and process_instance_id = #{processInstanceId}</if>
<if test="relatePlanIds != null and relatePlanIds != ''"> and relate_plan_ids = #{relatePlanIds}</if>
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
<if test="stallId != null and stallId != ''"> and stall_id = #{stallId}</if>
<if test="purchaseBudgetTotal != null "> and purchase_budget_total = #{purchaseBudgetTotal}</if>
<if test="supplierIds != null and supplierIds != ''"> and supplier_ids = #{supplierIds}</if>
<if test="approveBy != null and approveBy != ''"> and approve_by = #{approveBy}</if>
<if test="approveTime != null "> and approve_time = #{approveTime}</if>
<if test="approveRemark != null and approveRemark != ''"> and approve_remark = #{approveRemark}</if>
<if test="ifMerge != null "> and if_merge = #{ifMerge}</if>
<if test="deliverGoodsDate != null "> and deliver_goods_date = #{deliverGoodsDate}</if>
<where>
ipp.del_flag = '0'
<if test="planCode != null and planCode != ''"> and ipp.plan_code like CONCAT('%',#{planCode},'%')</if>
<if test="status != null "> and ipp.status = #{status}</if>
<if test="purchaseDate != null "> and ipp.purchase_date = #{purchaseDate}</if>
<if test="purchaseUserId != null "> and ipp.purchase_user_id = #{purchaseUserId}</if>
<if test="productionPlanId != null and productionPlanId != ''"> and ipp.production_plan_id = #{productionPlanId}</if>
<if test="approveStatus != null "> and ipp.approve_status = #{approveStatus}</if>
<if test="processInstanceId != null "> and ipp.process_instance_id = #{processInstanceId}</if>
<if test="relatePlanIds != null and relatePlanIds != ''"> and ipp.relate_plan_ids = #{relatePlanIds}</if>
<if test="areaId != null "> and ipp.area_id = #{areaId}</if>
<if test="canteenId != null "> and ipp.canteen_id = #{canteenId}</if>
<if test="stallId != null and stallId != ''"> and ipp.stall_id = #{stallId}</if>
<if test="purchaseBudgetTotal != null "> and ipp.purchase_budget_total = #{purchaseBudgetTotal}</if>
<if test="supplierIds != null and supplierIds != ''"> and ipp.supplier_ids = #{supplierIds}</if>
<if test="approveBy != null and approveBy != ''"> and ipp.approve_by = #{approveBy}</if>
<if test="approveTime != null "> and ipp.approve_time = #{approveTime}</if>
<if test="approveRemark != null and approveRemark != ''"> and ipp.approve_remark = #{approveRemark}</if>
<if test="ifMerge != null "> and ipp.if_merge = #{ifMerge}</if>
<if test="deliverGoodsDate != null "> and ipp.deliver_goods_date = #{deliverGoodsDate}</if>
<if test="startDateTime != null">
and ipp.purchase_date <![CDATA[ >= ]]> #{startDateTime}
</if>
<if test="endDateTime != null">
and ipp.purchase_date <![CDATA[ <= ]]> #{endDateTime}
</if>
</where>
</select>
<select id="selectPurchasePlanByPlanId" parameterType="Long" resultMap="PurchasePlanResult">
<include refid="selectPurchasePlanVo"/>
where plan_id = #{planId}
where ipp.del_flag = '0' and ipp.plan_id = #{planId}
</select>
<insert id="insertPurchasePlan" parameterType="com.bonus.canteen.core.ims.domain.PurchasePlan" useGeneratedKeys="true" keyProperty="planId">
@ -73,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approveStatus != null">approve_status,</if>
<if test="processInstanceId != null">process_instance_id,</if>
<if test="relatePlanIds != null">relate_plan_ids,</if>
<if test="areaId != null">area_id,</if>
<if test="canteenId != null">canteen_id,</if>
<if test="stallId != null">stall_id,</if>
<if test="purchaseBudgetTotal != null">purchase_budget_total,</if>
@ -98,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approveStatus != null">#{approveStatus},</if>
<if test="processInstanceId != null">#{processInstanceId},</if>
<if test="relatePlanIds != null">#{relatePlanIds},</if>
<if test="areaId != null">#{areaId},</if>
<if test="canteenId != null">#{canteenId},</if>
<if test="stallId != null">#{stallId},</if>
<if test="purchaseBudgetTotal != null">#{purchaseBudgetTotal},</if>
@ -119,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updatePurchasePlan" parameterType="com.bonus.canteen.core.ims.domain.PurchasePlan">
update ims_purchase_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>
<!-- <if test="planCode != null and planCode != ''">plan_code = #{planCode},</if>-->
<if test="status != null">status = #{status},</if>
<if test="purchaseDate != null">purchase_date = #{purchaseDate},</if>
<if test="purchaseUserId != null">purchase_user_id = #{purchaseUserId},</if>
@ -127,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
<if test="processInstanceId != null">process_instance_id = #{processInstanceId},</if>
<if test="relatePlanIds != null">relate_plan_ids = #{relatePlanIds},</if>
<if test="areaId != null">area_id = #{areaId},</if>
<if test="canteenId != null">canteen_id = #{canteenId},</if>
<if test="stallId != null">stall_id = #{stallId},</if>
<if test="purchaseBudgetTotal != null">purchase_budget_total = #{purchaseBudgetTotal},</if>
@ -137,9 +161,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ifMerge != null">if_merge = #{ifMerge},</if>
<if test="deliverGoodsDate != null">deliver_goods_date = #{deliverGoodsDate},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<!-- <if test="delFlag != null">del_flag = #{delFlag},</if>-->
<!-- <if test="createBy != null">create_by = #{createBy},</if>-->
<!-- <if test="createTime != null">create_time = #{createTime},</if>-->
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
@ -147,11 +171,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deletePurchasePlanByPlanId" parameterType="Long">
delete from ims_purchase_plan where plan_id = #{planId}
update ims_purchase_plan set del_flag = '2' where plan_id = #{planId}
</delete>
<delete id="deletePurchasePlanByPlanIds" parameterType="String">
delete from ims_purchase_plan where plan_id in
update ims_purchase_plan_detail set del_flag = '2' where plan_id in
<foreach item="planId" collection="array" open="(" separator="," close=")">
#{planId}
</foreach>