采购订单
This commit is contained in:
parent
a1d13d3e15
commit
ecb0070233
|
|
@ -1,119 +0,0 @@
|
|||
package com.bonus.canteen.core.ims.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle;
|
||||
import com.bonus.canteen.core.ims.service.IOrderGoodsPayStyleService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 采购订单付款方式Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
@Api(tags = "采购订单付款方式接口")
|
||||
@RestController
|
||||
@RequestMapping("/ims_order_goods_pay_style")
|
||||
public class OrderGoodsPayStyleController extends BaseController {
|
||||
@Autowired
|
||||
private IOrderGoodsPayStyleService orderGoodsPayStyleService;
|
||||
|
||||
/**
|
||||
* 查询采购订单付款方式列表
|
||||
*/
|
||||
@ApiOperation(value = "查询采购订单付款方式列表")
|
||||
//@RequiresPermissions("ims:style:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
startPage();
|
||||
List<OrderGoodsPayStyle> list = orderGoodsPayStyleService.selectOrderGoodsPayStyleList(orderGoodsPayStyle);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购订单付款方式列表
|
||||
*/
|
||||
@ApiOperation(value = "导出采购订单付款方式列表")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("ims:style:export")
|
||||
@SysLog(title = "采购订单付款方式", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出采购订单付款方式")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
List<OrderGoodsPayStyle> list = orderGoodsPayStyleService.selectOrderGoodsPayStyleList(orderGoodsPayStyle);
|
||||
ExcelUtil<OrderGoodsPayStyle> util = new ExcelUtil<OrderGoodsPayStyle>(OrderGoodsPayStyle.class);
|
||||
util.exportExcel(response, list, "采购订单付款方式数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购订单付款方式详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取采购订单付款方式详细信息")
|
||||
//@RequiresPermissions("ims:style:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(orderGoodsPayStyleService.selectOrderGoodsPayStyleById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购订单付款方式
|
||||
*/
|
||||
@ApiOperation(value = "新增采购订单付款方式")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("ims:style:add")
|
||||
@SysLog(title = "采购订单付款方式", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增采购订单付款方式")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
try {
|
||||
return toAjax(orderGoodsPayStyleService.insertOrderGoodsPayStyle(orderGoodsPayStyle));
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购订单付款方式
|
||||
*/
|
||||
@ApiOperation(value = "修改采购订单付款方式")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("ims:style:edit")
|
||||
@SysLog(title = "采购订单付款方式", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改采购订单付款方式")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
try {
|
||||
return toAjax(orderGoodsPayStyleService.updateOrderGoodsPayStyle(orderGoodsPayStyle));
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购订单付款方式
|
||||
*/
|
||||
@ApiOperation(value = "删除采购订单付款方式")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("ims:style:remove")
|
||||
@SysLog(title = "采购订单付款方式", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除采购订单付款方式")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(orderGoodsPayStyleService.deleteOrderGoodsPayStyleByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ import java.io.Serializable;
|
|||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -147,6 +148,26 @@ public class OrderGoodsAdd implements Serializable {
|
|||
@ApiModelProperty(value = "采购合同编号")
|
||||
private String contractCode;
|
||||
|
||||
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
|
||||
private Long payMoneyStyle;
|
||||
|
||||
/** 付款日期 */
|
||||
@ApiModelProperty(value = "付款日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date payMoneyDate;
|
||||
|
||||
/** 收款银行 */
|
||||
@ApiModelProperty(value = "收款银行")
|
||||
private String collectMoneyBank;
|
||||
|
||||
/** 收款账号 */
|
||||
@ApiModelProperty(value = "收款账号")
|
||||
private String collectMoneyAccount;
|
||||
|
||||
/** 账户名称 */
|
||||
@ApiModelProperty(value = "账户名称")
|
||||
private String collectMoneyAccountName;
|
||||
|
||||
private List<OrderGoodsDetailAdd> orderGoodsDetailList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import java.io.Serializable;
|
|||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -152,6 +153,26 @@ public class OrderGoodsUpdate implements Serializable {
|
|||
@ApiModelProperty(value = "采购计划编号,逗号分隔存储")
|
||||
private String purchasePlanCode;
|
||||
|
||||
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
|
||||
private Long payMoneyStyle;
|
||||
|
||||
/** 付款日期 */
|
||||
@ApiModelProperty(value = "付款日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date payMoneyDate;
|
||||
|
||||
/** 收款银行 */
|
||||
@ApiModelProperty(value = "收款银行")
|
||||
private String collectMoneyBank;
|
||||
|
||||
/** 收款账号 */
|
||||
@ApiModelProperty(value = "收款账号")
|
||||
private String collectMoneyAccount;
|
||||
|
||||
/** 账户名称 */
|
||||
@ApiModelProperty(value = "账户名称")
|
||||
private String collectMoneyAccountName;
|
||||
|
||||
private List<OrderGoodsDetailUpdate> orderGoodsDetailList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import lombok.ToString;
|
|||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -184,6 +185,26 @@ public class OrderGoodsVO extends BaseEntity {
|
|||
@ApiModelProperty(value = "采购计划编号,逗号分隔存储")
|
||||
private String purchasePlanCode;
|
||||
|
||||
@ApiModelProperty(value = "付款方式(1一次性付款,2分期付款)")
|
||||
private Long payMoneyStyle;
|
||||
|
||||
/** 付款日期 */
|
||||
@ApiModelProperty(value = "付款日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date payMoneyDate;
|
||||
|
||||
/** 收款银行 */
|
||||
@ApiModelProperty(value = "收款银行")
|
||||
private String collectMoneyBank;
|
||||
|
||||
/** 收款账号 */
|
||||
@ApiModelProperty(value = "收款账号")
|
||||
private String collectMoneyAccount;
|
||||
|
||||
/** 账户名称 */
|
||||
@ApiModelProperty(value = "账户名称")
|
||||
private String collectMoneyAccountName;
|
||||
|
||||
private List<OrderGoodsDetailVO> orderGoodsDetailList;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle;
|
|||
|
||||
/**
|
||||
* 采购订单付款方式Mapper接口
|
||||
*
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-07-22
|
||||
*/
|
||||
public interface OrderGoodsPayStyleMapper {
|
||||
/**
|
||||
* 查询采购订单付款方式
|
||||
*
|
||||
*
|
||||
* @param id 采购订单付款方式主键
|
||||
* @return 采购订单付款方式
|
||||
*/
|
||||
|
|
@ -20,7 +20,7 @@ public interface OrderGoodsPayStyleMapper {
|
|||
|
||||
/**
|
||||
* 查询采购订单付款方式列表
|
||||
*
|
||||
*
|
||||
* @param orderGoodsPayStyle 采购订单付款方式
|
||||
* @return 采购订单付款方式集合
|
||||
*/
|
||||
|
|
@ -28,7 +28,7 @@ public interface OrderGoodsPayStyleMapper {
|
|||
|
||||
/**
|
||||
* 新增采购订单付款方式
|
||||
*
|
||||
*
|
||||
* @param orderGoodsPayStyle 采购订单付款方式
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -36,7 +36,7 @@ public interface OrderGoodsPayStyleMapper {
|
|||
|
||||
/**
|
||||
* 修改采购订单付款方式
|
||||
*
|
||||
*
|
||||
* @param orderGoodsPayStyle 采购订单付款方式
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -44,7 +44,7 @@ public interface OrderGoodsPayStyleMapper {
|
|||
|
||||
/**
|
||||
* 删除采购订单付款方式
|
||||
*
|
||||
*
|
||||
* @param id 采购订单付款方式主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
@ -52,9 +52,11 @@ public interface OrderGoodsPayStyleMapper {
|
|||
|
||||
/**
|
||||
* 批量删除采购订单付款方式
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderGoodsPayStyleByIds(Long[] ids);
|
||||
|
||||
public int deleteOrderGoodsPayStyleByCode(String orderGoodsCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,6 @@ public interface IOrderGoodsPayStyleService {
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderGoodsPayStyleById(Long id);
|
||||
|
||||
public int deleteOrderGoodsPayStyleByCode(String orderGoodsCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.ims.service.impl;
|
|||
import java.util.List;
|
||||
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.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.ims.mapper.OrderGoodsPayStyleMapper;
|
||||
|
|
@ -51,6 +52,7 @@ public class OrderGoodsPayStyleServiceImpl implements IOrderGoodsPayStyleService
|
|||
@Override
|
||||
public int insertOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
orderGoodsPayStyle.setCreateTime(DateUtils.getNowDate());
|
||||
orderGoodsPayStyle.setCreateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return orderGoodsPayStyleMapper.insertOrderGoodsPayStyle(orderGoodsPayStyle);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -67,6 +69,7 @@ public class OrderGoodsPayStyleServiceImpl implements IOrderGoodsPayStyleService
|
|||
@Override
|
||||
public int updateOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle) {
|
||||
orderGoodsPayStyle.setUpdateTime(DateUtils.getNowDate());
|
||||
orderGoodsPayStyle.setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return orderGoodsPayStyleMapper.updateOrderGoodsPayStyle(orderGoodsPayStyle);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -95,4 +98,9 @@ public class OrderGoodsPayStyleServiceImpl implements IOrderGoodsPayStyleService
|
|||
public int deleteOrderGoodsPayStyleById(Long id) {
|
||||
return orderGoodsPayStyleMapper.deleteOrderGoodsPayStyleById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteOrderGoodsPayStyleByCode(String orderGoodsCode) {
|
||||
return orderGoodsPayStyleMapper.deleteOrderGoodsPayStyleByCode(orderGoodsCode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.ims.domain.OrderGoodsDetail;
|
||||
import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle;
|
||||
import com.bonus.canteen.core.ims.domain.ProductionPurchaseOrder;
|
||||
import com.bonus.canteen.core.ims.domain.constants.ApproveStatusEnum;
|
||||
import com.bonus.canteen.core.ims.domain.param.OrderGoodsAdd;
|
||||
|
|
@ -18,9 +19,7 @@ import com.bonus.canteen.core.ims.domain.vo.InspectGoodsSum;
|
|||
import com.bonus.canteen.core.ims.domain.vo.OrderGoodsDetailVO;
|
||||
import com.bonus.canteen.core.ims.domain.vo.OrderGoodsVO;
|
||||
import com.bonus.canteen.core.ims.enums.SupplierOrderGenerateTypeEnum;
|
||||
import com.bonus.canteen.core.ims.service.IInspectGoodsService;
|
||||
import com.bonus.canteen.core.ims.service.IOrderGoodsDetailService;
|
||||
import com.bonus.canteen.core.ims.service.IProductionPurchaseOrderService;
|
||||
import com.bonus.canteen.core.ims.service.*;
|
||||
import com.bonus.canteen.core.ims.utils.NoGenerateUtils;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
|
|
@ -31,7 +30,6 @@ 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;
|
||||
|
||||
/**
|
||||
|
|
@ -50,6 +48,8 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
|
|||
private IProductionPurchaseOrderService productionPurchaseOrderService;
|
||||
@Autowired
|
||||
private IInspectGoodsService inspectGoodsService;
|
||||
@Autowired
|
||||
private IOrderGoodsPayStyleService orderGoodsPayStyleService;
|
||||
|
||||
/**
|
||||
* 查询采购订单主
|
||||
|
|
@ -188,6 +188,10 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
|
|||
productionPurchaseOrderService.insertProductionPurchaseOrder(productionPurchaseOrder);
|
||||
}
|
||||
}
|
||||
OrderGoodsPayStyle orderGoodsPayStyle = new OrderGoodsPayStyle();
|
||||
BeanUtils.copyProperties(orderGoodsAdd, orderGoodsPayStyle);
|
||||
orderGoodsPayStyle.setOrderGoodsId(orderGoodsCode);
|
||||
orderGoodsPayStyleService.insertOrderGoodsPayStyle(orderGoodsPayStyle);
|
||||
return orderGoods.getOrderGoodsId();
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
|
|
@ -243,6 +247,11 @@ public class OrderGoodsServiceImpl implements IOrderGoodsService {
|
|||
productionPurchaseOrderService.insertProductionPurchaseOrder(productionPurchaseOrder);
|
||||
}
|
||||
}
|
||||
orderGoodsPayStyleService.deleteOrderGoodsPayStyleByCode(orderGoodsVO.getOrderGoodsCode());
|
||||
OrderGoodsPayStyle orderGoodsPayStyle = new OrderGoodsPayStyle();
|
||||
BeanUtils.copyProperties(orderGoodsUpdate, orderGoodsPayStyle);
|
||||
orderGoodsPayStyle.setOrderGoodsId(orderGoodsVO.getOrderGoodsCode());
|
||||
orderGoodsPayStyleService.insertOrderGoodsPayStyle(orderGoodsPayStyle);
|
||||
return orderGoodsMapper.updateOrderGoods(orderGoods);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(e.getMessage());
|
||||
|
|
|
|||
|
|
@ -43,14 +43,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectOrderGoodsVo">
|
||||
select order_goods_id, order_goods_code, iog.supplier_id, order_status, order_amount, request_arrival_time,
|
||||
select iog.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, contract_code
|
||||
ba.area_name, bc.canteen_name, bs.stall_name, contract_code, iogps.pay_money_date,
|
||||
iogps.pay_money_style, iogps.collect_money_account, iogps.collect_money_account_name,
|
||||
iogps.collect_money_bank, iog.supplier_id, iog.warehouse_id
|
||||
from ims_order_goods iog
|
||||
left join ims_order_goods_pay_style iogps on iogps.order_goods_id = iog.order_goods_code
|
||||
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
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from ims_order_goods_pay_style where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderGoodsPayStyleByCode" parameterType="String">
|
||||
delete from ims_order_goods_pay_style where order_goods_id = #{orderGoodsCode}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderGoodsPayStyleByIds" parameterType="String">
|
||||
delete from ims_order_goods_pay_style where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
Loading…
Reference in New Issue