diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/OrderGoodsPayStyleController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/OrderGoodsPayStyleController.java new file mode 100644 index 0000000..9062ec0 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/controller/OrderGoodsPayStyleController.java @@ -0,0 +1,119 @@ +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 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 list = orderGoodsPayStyleService.selectOrderGoodsPayStyleList(orderGoodsPayStyle); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/domain/OrderGoodsPayStyle.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/domain/OrderGoodsPayStyle.java new file mode 100644 index 0000000..21812c7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/domain/OrderGoodsPayStyle.java @@ -0,0 +1,59 @@ +package com.bonus.canteen.core.ims.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.bonus.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.ToString; +import com.bonus.common.core.web.domain.BaseEntity; + +/** + * 采购订单付款方式对象 ims_order_goods_pay_style + * + * @author xsheng + * @date 2025-07-22 + */ + + +@Data +@ToString +public class OrderGoodsPayStyle extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 采购订单号 */ + @Excel(name = "采购订单号") + @ApiModelProperty(value = "采购订单号") + private String orderGoodsId; + + /** 付款方式(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 Date payMoneyDate; + + /** 收款银行 */ + @Excel(name = "收款银行") + @ApiModelProperty(value = "收款银行") + private String collectMoneyBank; + + /** 收款账号 */ + @Excel(name = "收款账号") + @ApiModelProperty(value = "收款账号") + private String collectMoneyAccount; + + /** 账户名称 */ + @Excel(name = "账户名称") + @ApiModelProperty(value = "账户名称") + private String collectMoneyAccountName; + + +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/mapper/OrderGoodsPayStyleMapper.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/mapper/OrderGoodsPayStyleMapper.java new file mode 100644 index 0000000..3063e24 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/mapper/OrderGoodsPayStyleMapper.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.ims.mapper; + +import java.util.List; +import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle; + +/** + * 采购订单付款方式Mapper接口 + * + * @author xsheng + * @date 2025-07-22 + */ +public interface OrderGoodsPayStyleMapper { + /** + * 查询采购订单付款方式 + * + * @param id 采购订单付款方式主键 + * @return 采购订单付款方式 + */ + public OrderGoodsPayStyle selectOrderGoodsPayStyleById(Long id); + + /** + * 查询采购订单付款方式列表 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 采购订单付款方式集合 + */ + public List selectOrderGoodsPayStyleList(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 新增采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + public int insertOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 修改采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + public int updateOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 删除采购订单付款方式 + * + * @param id 采购订单付款方式主键 + * @return 结果 + */ + public int deleteOrderGoodsPayStyleById(Long id); + + /** + * 批量删除采购订单付款方式 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOrderGoodsPayStyleByIds(Long[] ids); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/IOrderGoodsPayStyleService.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/IOrderGoodsPayStyleService.java new file mode 100644 index 0000000..1b08ca7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/IOrderGoodsPayStyleService.java @@ -0,0 +1,60 @@ +package com.bonus.canteen.core.ims.service; + +import java.util.List; +import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle; + +/** + * 采购订单付款方式Service接口 + * + * @author xsheng + * @date 2025-07-22 + */ +public interface IOrderGoodsPayStyleService { + /** + * 查询采购订单付款方式 + * + * @param id 采购订单付款方式主键 + * @return 采购订单付款方式 + */ + public OrderGoodsPayStyle selectOrderGoodsPayStyleById(Long id); + + /** + * 查询采购订单付款方式列表 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 采购订单付款方式集合 + */ + public List selectOrderGoodsPayStyleList(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 新增采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + public int insertOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 修改采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + public int updateOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle); + + /** + * 批量删除采购订单付款方式 + * + * @param ids 需要删除的采购订单付款方式主键集合 + * @return 结果 + */ + public int deleteOrderGoodsPayStyleByIds(Long[] ids); + + /** + * 删除采购订单付款方式信息 + * + * @param id 采购订单付款方式主键 + * @return 结果 + */ + public int deleteOrderGoodsPayStyleById(Long id); +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsPayStyleServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsPayStyleServiceImpl.java new file mode 100644 index 0000000..0d368cc --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/ims/service/impl/OrderGoodsPayStyleServiceImpl.java @@ -0,0 +1,98 @@ +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 org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.bonus.canteen.core.ims.mapper.OrderGoodsPayStyleMapper; +import com.bonus.canteen.core.ims.domain.OrderGoodsPayStyle; +import com.bonus.canteen.core.ims.service.IOrderGoodsPayStyleService; + +/** + * 采购订单付款方式Service业务层处理 + * + * @author xsheng + * @date 2025-07-22 + */ +@Service +public class OrderGoodsPayStyleServiceImpl implements IOrderGoodsPayStyleService { + @Autowired + private OrderGoodsPayStyleMapper orderGoodsPayStyleMapper; + + /** + * 查询采购订单付款方式 + * + * @param id 采购订单付款方式主键 + * @return 采购订单付款方式 + */ + @Override + public OrderGoodsPayStyle selectOrderGoodsPayStyleById(Long id) { + return orderGoodsPayStyleMapper.selectOrderGoodsPayStyleById(id); + } + + /** + * 查询采购订单付款方式列表 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 采购订单付款方式 + */ + @Override + public List selectOrderGoodsPayStyleList(OrderGoodsPayStyle orderGoodsPayStyle) { + return orderGoodsPayStyleMapper.selectOrderGoodsPayStyleList(orderGoodsPayStyle); + } + + /** + * 新增采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + @Override + public int insertOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle) { + orderGoodsPayStyle.setCreateTime(DateUtils.getNowDate()); + try { + return orderGoodsPayStyleMapper.insertOrderGoodsPayStyle(orderGoodsPayStyle); + } catch (Exception e) { + throw new ServiceException(e.getMessage()); + } + } + + /** + * 修改采购订单付款方式 + * + * @param orderGoodsPayStyle 采购订单付款方式 + * @return 结果 + */ + @Override + public int updateOrderGoodsPayStyle(OrderGoodsPayStyle orderGoodsPayStyle) { + orderGoodsPayStyle.setUpdateTime(DateUtils.getNowDate()); + try { + return orderGoodsPayStyleMapper.updateOrderGoodsPayStyle(orderGoodsPayStyle); + } catch (Exception e) { + throw new ServiceException(e.getMessage()); + } + } + + /** + * 批量删除采购订单付款方式 + * + * @param ids 需要删除的采购订单付款方式主键 + * @return 结果 + */ + @Override + public int deleteOrderGoodsPayStyleByIds(Long[] ids) { + return orderGoodsPayStyleMapper.deleteOrderGoodsPayStyleByIds(ids); + } + + /** + * 删除采购订单付款方式信息 + * + * @param id 采购订单付款方式主键 + * @return 结果 + */ + @Override + public int deleteOrderGoodsPayStyleById(Long id) { + return orderGoodsPayStyleMapper.deleteOrderGoodsPayStyleById(id); + } +} diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/ims/OrderGoodsPayStyleMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/ims/OrderGoodsPayStyleMapper.xml new file mode 100644 index 0000000..d8541d7 --- /dev/null +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/ims/OrderGoodsPayStyleMapper.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + select id, order_goods_id, pay_money_style, pay_money_date, collect_money_bank, collect_money_account, collect_money_account_name, remark, create_by, create_time, update_by, update_time from ims_order_goods_pay_style + + + + + + + + insert into ims_order_goods_pay_style + + order_goods_id, + pay_money_style, + pay_money_date, + collect_money_bank, + collect_money_account, + collect_money_account_name, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{orderGoodsId}, + #{payMoneyStyle}, + #{payMoneyDate}, + #{collectMoneyBank}, + #{collectMoneyAccount}, + #{collectMoneyAccountName}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update ims_order_goods_pay_style + + order_goods_id = #{orderGoodsId}, + pay_money_style = #{payMoneyStyle}, + pay_money_date = #{payMoneyDate}, + collect_money_bank = #{collectMoneyBank}, + collect_money_account = #{collectMoneyAccount}, + collect_money_account_name = #{collectMoneyAccountName}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from ims_order_goods_pay_style where id = #{id} + + + + delete from ims_order_goods_pay_style where id in + + #{id} + + + \ No newline at end of file