| | |
| | | return R.ok(duePayableService.addDuePayable(duePayableDto)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public R<IPage<DuePayableVo>> list(Page<DuePayable> page, SearchDuePurchaseVo vo) { |
| | | return R.ok(duePayableService.selectPayableList(page, vo)); |
| | | @PostMapping("/list") |
| | | public R<IPage<DuePayableVo>> list(@RequestBody SearchDuePurchaseVo vo) { |
| | | return R.ok(duePayableService.selectPayableList(new Page<>(vo.getCurrent(),vo.getSize()), vo)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField(value = "supplier_id") |
| | | private Long supplierId; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @TableField(value = "code") |
| | | private String code; |
| | | |
| | | /** |
| | | * 煤料类型 1-成品 2-原料 |
| | |
| | | */ |
| | | @TableField(value = "supplier_name") |
| | | private String supplierName; |
| | | |
| | | /** |
| | | * 供货商名称 |
| | | */ |
| | |
| | | */ |
| | | @TableField(value = "unit") |
| | | private String unit; |
| | | |
| | | /** |
| | | * 编码 |
| | | */ |
| | | @TableField(value = "code") |
| | | private String code; |
| | | /** |
| | | * 库存数量 |
| | | */ |
| | |
| | | officialInventory.setRegistrantId(1L); |
| | | officialInventory.setType(pendingInventory.getType()); |
| | | officialInventory.setSupplierId(pendingInventoryDto.getSupplierId()); |
| | | officialInventory.setCode(pendingInventory.getCode()); |
| | | officialInventoryMapper.insert(officialInventory); |
| | | } else { |
| | | OfficialInventory officialInventory = officialInventoryMapper.selectById(pendingInventoryDto.getOfficialId()); |
| | |
| | | |
| | | pending.setRegistrantId(p.getProducerId()); |
| | | pending.setRegistrationDate(LocalDate.now()); |
| | | |
| | | pending.setCode(generateCode(p.getType())); |
| | | pending.setType(p.getType()); |
| | | pendingInventoryMapper.insert(pending); |
| | | } |
| | | } |
| | | |
| | | private String generateCode(Integer type) { |
| | | LocalDate now = LocalDate.now(); |
| | | String year = now.format(DateTimeFormatter.ofPattern("yyyyMMdd")); |
| | | String s = ""; |
| | | //生成编码 |
| | | switch (type){ |
| | | case 1: |
| | | s = "CP"; |
| | | break; |
| | | case 2: |
| | | s = "YL"; |
| | | break; |
| | | } |
| | | // 查询当天待入库新增条数 |
| | | Long count = pendingInventoryMapper.selectCount(new LambdaQueryWrapper<PendingInventory>() |
| | | .apply("date_trunc('day', create_time) = date_trunc('day', now())")); |
| | | return s + year + String.format("%03d", count + 1); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int delByIds(Long[] ids) { |
| | |
| | | package com.ruoyi.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author buhuazhen |
| | |
| | | * @email 3038525872@qq.com |
| | | */ |
| | | @Data |
| | | public class SearchDuePurchaseVo { |
| | | public class SearchDuePurchaseVo extends Page implements Serializable { |
| | | |
| | | private String search; |
| | | } |
| | |
| | | registration_time TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP, -- 登记时间 |
| | | price_excluding_tax VARCHAR(255), -- 单价(不含税) |
| | | total_price_excluding_tax VARCHAR(255), -- 总价(不含税) |
| | | code VARCHAR(255), -- 编号 |
| | | registrant_id BIGINT, -- 登记人ID |
| | | registration_date DATE, -- 登记日期 |
| | | supplier_id BIGINT, -- 供货商ID |
| | |
| | | COMMENT ON COLUMN pending_inventory.price_including_tax IS '单价(含税)'; |
| | | COMMENT ON COLUMN pending_inventory.total_price_including_tax IS '总价(含税)'; |
| | | COMMENT ON COLUMN pending_inventory.registrant IS '登记人'; |
| | | COMMENT ON COLUMN pending_inventory.code IS '编号'; |
| | | COMMENT ON COLUMN pending_inventory.type IS '煤料类型 1-成品 2-原料'; |
| | | COMMENT ON COLUMN pending_inventory.registration_time IS '登记时间'; |
| | | COMMENT ON COLUMN pending_inventory.price_excluding_tax IS '单价(不含税)'; |
| | |
| | | pending_id BIGINT, -- 待入库id |
| | | coal_plan_id BIGINT, -- 煤质方案id |
| | | merge_id VARCHAR(255), -- 合并id |
| | | code VARCHAR(255), -- 编号 |
| | | registration_date TIMESTAMP WITHOUT TIME ZONE, |
| | | |
| | | deleted INT NOT NULL DEFAULT 0, -- 软删除标志:0=未删除,1=已删除 |
| | |
| | | COMMENT ON COLUMN official_inventory.coal_id IS '煤种id'; |
| | | COMMENT ON COLUMN official_inventory.unit IS '单位'; |
| | | COMMENT ON COLUMN official_inventory.inventory_quantity IS '库存数量'; |
| | | COMMENT ON COLUMN official_inventory.code IS '编号'; |
| | | COMMENT ON COLUMN official_inventory.price_including_tax IS '单价(含税)'; |
| | | COMMENT ON COLUMN official_inventory.total_price_including_tax IS '总价(含税)'; |
| | | COMMENT ON COLUMN official_inventory.pending_replenishment IS '待补库'; |