
64 changed files with 6 additions and 1424 deletions
@ -1,64 +0,0 @@ |
|||||
package com.yxt.purchase.apiadmin; |
|
||||
|
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
|
|
||||
import com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailDto; |
|
||||
import com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailQuery; |
|
||||
import com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailService; |
|
||||
import com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailVo; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 15:49 |
|
||||
*/ |
|
||||
@Api(tags = "采购入库预约单") |
|
||||
@RestController |
|
||||
@RequestMapping("/apiadmin/purchasereceiptbilldetail") |
|
||||
public class PurchaseReceiptBillDetailRest { |
|
||||
|
|
||||
@Autowired |
|
||||
PurchaseReceiptBillDetailService baseBrandInfoService; |
|
||||
|
|
||||
@ApiOperation("分页列表") |
|
||||
@PostMapping("/listPage") |
|
||||
public ResultBean<PagerVo<PurchaseReceiptBillDetailVo>> listPage(@RequestBody PagerQuery<PurchaseReceiptBillDetailQuery> pq) { |
|
||||
ResultBean<PagerVo<PurchaseReceiptBillDetailVo>> rb = ResultBean.fireFail(); |
|
||||
PagerVo<PurchaseReceiptBillDetailVo> pv = baseBrandInfoService.listPage(pq); |
|
||||
return rb.success().setData(pv); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation("保存修改") |
|
||||
@PostMapping("/saveOrUpdate") |
|
||||
public ResultBean<String> saveOrUpdate(@RequestBody PurchaseReceiptBillDetailDto dto) { |
|
||||
return baseBrandInfoService.saveOrUpdate(dto); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("初始化") |
|
||||
@GetMapping("/initialization/{sid}") |
|
||||
public ResultBean<PurchaseReceiptBillDetailVo> initialization(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.initialization(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("删除") |
|
||||
@DeleteMapping("/delete/{sid}") |
|
||||
public ResultBean delete(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.delete(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("根据sid批量删除") |
|
||||
@DeleteMapping("/delBySids") |
|
||||
public ResultBean delBySids(@RequestBody String[] sids){ |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
baseBrandInfoService.delAll(sids); |
|
||||
return rb.success(); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,62 +0,0 @@ |
|||||
package com.yxt.purchase.apiadmin; |
|
||||
|
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import com.yxt.purchase.biz.purchasereceiptbill.*; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 15:49 |
|
||||
*/ |
|
||||
@Api(tags = "采购入库预约单") |
|
||||
@RestController |
|
||||
@RequestMapping("/apiadmin/purchasereceiptbill") |
|
||||
public class PurchaseReceiptBillRest { |
|
||||
|
|
||||
@Autowired |
|
||||
PurchaseReceiptBillService baseBrandInfoService; |
|
||||
|
|
||||
@ApiOperation("分页列表") |
|
||||
@PostMapping("/listPage") |
|
||||
public ResultBean<PagerVo<PurchaseReceiptBillVo>> listPage(@RequestBody PagerQuery<PurchaseReceiptBillQuery> pq) { |
|
||||
ResultBean<PagerVo<PurchaseReceiptBillVo>> rb = ResultBean.fireFail(); |
|
||||
PagerVo<PurchaseReceiptBillVo> pv = baseBrandInfoService.listPage(pq); |
|
||||
return rb.success().setData(pv); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation("保存修改") |
|
||||
@PostMapping("/saveOrUpdate") |
|
||||
public ResultBean<String> saveOrUpdate(@RequestBody PurchaseReceiptBillDto dto) { |
|
||||
return baseBrandInfoService.saveOrUpdate(dto); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("初始化") |
|
||||
@GetMapping("/initialization/{sid}") |
|
||||
public ResultBean<PurchaseReceiptBillVo> initialization(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.initialization(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("删除") |
|
||||
@DeleteMapping("/delete/{sid}") |
|
||||
public ResultBean delete(@PathVariable("sid") String sid) { |
|
||||
return baseBrandInfoService.delete(sid); |
|
||||
} |
|
||||
|
|
||||
@ApiOperation("根据sid批量删除") |
|
||||
@DeleteMapping("/delBySids") |
|
||||
public ResultBean delBySids(@RequestBody String[] sids){ |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
baseBrandInfoService.delAll(sids); |
|
||||
return rb.success(); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,13 +1,6 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.yxt.pms.biz.pms.pmspurchasebillinvoice.PmsPurchaseBillInvoiceMapper"> |
<mapper namespace="com.yxt.purchase.biz.purchasebillinvoice.PurchaseBillInvoiceMapper"> |
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
<!-- ${ew.customSqlSegment} --> |
<!-- ${ew.customSqlSegment} --> |
||||
<select id="selectPageVo" resultType="com.yxt.pms.biz.pms.pmspurchasebillinvoice.PmsPurchaseBillInvoiceVo"> |
|
||||
SELECT * FROM pms_purchase_bill_invoice <where> ${ew.sqlSegment} </where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectListAllVo" resultType="com.yxt.pms.biz.pms.pmspurchasebillinvoice.PmsPurchaseBillInvoiceVo"> |
|
||||
SELECT * FROM pms_purchase_bill_invoice <where> ${ew.sqlSegment} </where> |
|
||||
</select> |
|
||||
</mapper> |
</mapper> |
@ -1,40 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:36 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBill extends BaseEntity { |
|
||||
|
|
||||
|
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
} |
|
@ -1,51 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.dto.Dto; |
|
||||
import com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailDto; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.Date; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:38 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDto implements Dto { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
private List<PurchaseReceiptBillDetailDto> purchaseReceiptBillDetail=new ArrayList<>(); |
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:40 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface PurchaseReceiptBillMapper extends BaseMapper<PurchaseReceiptBill> { |
|
||||
|
|
||||
IPage<PurchaseReceiptBillVo> listPage(IPage<PurchaseReceiptBill> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseReceiptBill> qw); |
|
||||
PurchaseReceiptBillVo initialization (@Param("sid") String sid); |
|
||||
int updateBySidIsDelete(List<String> list); |
|
||||
} |
|
@ -1,29 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.yxt.purchase.biz.purchasereceiptbill.PurchaseReceiptBillMapper"> |
|
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
|
||||
<!-- ${ew.customSqlSegment} --> |
|
||||
|
|
||||
<select id="listPage" resultType="com.yxt.purchase.biz.purchasereceiptbill.PurchaseReceiptBillVo"> |
|
||||
select |
|
||||
* |
|
||||
from purchase_receipt_bill |
|
||||
<where> |
|
||||
${ew.sqlSegment} |
|
||||
</where> |
|
||||
</select> |
|
||||
<select id="initialization" resultType="com.yxt.purchase.biz.purchasereceiptbill.PurchaseReceiptBillVo"> |
|
||||
select |
|
||||
a.* |
|
||||
from purchase_receipt_bill a |
|
||||
where a.sid =#{sid} |
|
||||
</select> |
|
||||
<update id="updateBySidIsDelete"> |
|
||||
UPDATE purchase_receipt_bill |
|
||||
SET isDelete=1 |
|
||||
where sid in |
|
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
</mapper> |
|
@ -1,13 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillQuery implements Query { |
|
||||
private String name; |
|
||||
} |
|
@ -1,77 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.yxt.common.base.config.component.FileUploadComponent; |
|
||||
import com.yxt.common.base.service.MybatisBaseService; |
|
||||
import com.yxt.common.base.utils.PagerUtil; |
|
||||
import com.yxt.common.base.utils.StringUtils; |
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.Arrays; |
|
||||
import java.util.Collections; |
|
||||
import java.util.List; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:40 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class PurchaseReceiptBillService extends MybatisBaseService<PurchaseReceiptBillMapper, PurchaseReceiptBill> { |
|
||||
@Autowired |
|
||||
private FileUploadComponent fileUploadComponent; |
|
||||
|
|
||||
public PagerVo<PurchaseReceiptBillVo> listPage(PagerQuery<PurchaseReceiptBillQuery> pq) { |
|
||||
PurchaseReceiptBillQuery query = pq.getParams(); |
|
||||
QueryWrapper<PurchaseReceiptBill> qw = new QueryWrapper<>(); |
|
||||
IPage<PurchaseReceiptBill> page = PagerUtil.queryToPage(pq); |
|
||||
IPage<PurchaseReceiptBillVo> pagging = baseMapper.listPage(page, qw); |
|
||||
PagerVo<PurchaseReceiptBillVo> p = PagerUtil.pageToVo(pagging, null); |
|
||||
return p; |
|
||||
} |
|
||||
|
|
||||
public ResultBean<String> saveOrUpdate(PurchaseReceiptBillDto dto) { |
|
||||
ResultBean<String> rb = ResultBean.fireFail(); |
|
||||
String sid = dto.getSid(); |
|
||||
if (StringUtils.isBlank(sid)) { |
|
||||
PurchaseReceiptBill PurchaseReceiptBill = new PurchaseReceiptBill(); |
|
||||
BeanUtil.copyProperties(dto, PurchaseReceiptBill, "sid"); |
|
||||
sid = PurchaseReceiptBill.getSid(); |
|
||||
baseMapper.insert(PurchaseReceiptBill); |
|
||||
|
|
||||
} else { |
|
||||
PurchaseReceiptBill PurchaseReceiptBill = fetchBySid(sid); |
|
||||
if (PurchaseReceiptBill == null) { |
|
||||
return rb.setMsg("该单据不存在"); |
|
||||
} |
|
||||
BeanUtil.copyProperties(dto, PurchaseReceiptBill, "sid"); |
|
||||
baseMapper.updateById(PurchaseReceiptBill); |
|
||||
|
|
||||
} |
|
||||
return rb.success(); |
|
||||
} |
|
||||
|
|
||||
public ResultBean<PurchaseReceiptBillVo> initialization(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
PurchaseReceiptBillVo vo = baseMapper.initialization(sid); |
|
||||
return rb.success().setData(vo); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public ResultBean delete(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
return rb.success().setMsg("成功"); |
|
||||
} |
|
||||
public void delAll(String[] sids) { |
|
||||
baseMapper.updateBySidIsDelete(Arrays.stream(sids).collect(Collectors.toList())); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,52 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbill; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillVo implements Vo { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
private String lockVersion; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date modifyTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String state; |
|
||||
private String isDelete; |
|
||||
private String sourceBillSid;//来源单sid(工单sid)
|
|
||||
private String sourceBillNo;//来源单编号
|
|
||||
private String billNo;//单据编号
|
|
||||
private String createDate;//单据日期
|
|
||||
private String createUserSid;//制单人sid
|
|
||||
private String createByName;//制单人姓名
|
|
||||
private String purchaseType;//采购类型(厂家采购、外采)
|
|
||||
private String supplierSid;//供应商sid
|
|
||||
private String supplierName;//供应商名称
|
|
||||
private String supplierPhone;//供应商联系电话
|
|
||||
private String billType;//票据类型(不含税、增值税、普通税、已含增值税)
|
|
||||
private String markupType;//加价方式(统一加价率、区间加价率、仓库加价率)
|
|
||||
private String priceStrategy;//进价不同时的价格策略(加权平均、分别计价)
|
|
||||
private String isInvoicing;//是否需要开发票(是1,否0)
|
|
||||
private String invoiceCode;//发票号码
|
|
||||
private String tempMarkupRate;//临时加价率
|
|
||||
private String purchaserSid;//采购员sid(单选)
|
|
||||
private String purchaserName;//
|
|
||||
private String storekeeperSid;//库管员sid(单选)
|
|
||||
private String storekeeperName;//
|
|
||||
private String errorAmount;//误差调整金额
|
|
||||
private String freight;//运费
|
|
||||
private String discountAmount;//优惠金额
|
|
||||
private String payableAmount;//应付金额(=采购金额+运费-优惠金额)
|
|
||||
private String useOrgSid;//使用组织sid
|
|
||||
private String createOrgSid;//创建组织sid
|
|
||||
} |
|
@ -1,34 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.yxt.common.core.domain.BaseEntity; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:36 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetail extends BaseEntity { |
|
||||
|
|
||||
|
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,39 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.dto.Dto; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:38 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailDto implements Dto { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|
||||
import org.apache.ibatis.annotations.Mapper; |
|
||||
import org.apache.ibatis.annotations.Param; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:40 |
|
||||
*/ |
|
||||
@Mapper |
|
||||
public interface PurchaseReceiptBillDetailMapper extends BaseMapper<PurchaseReceiptBillDetail> { |
|
||||
|
|
||||
IPage<PurchaseReceiptBillDetailVo> listPage(IPage<PurchaseReceiptBillDetail> page, @Param(Constants.WRAPPER) QueryWrapper<PurchaseReceiptBillDetail> qw); |
|
||||
PurchaseReceiptBillDetailVo initialization (@Param("sid") String sid); |
|
||||
int updateBySidIsDelete(List<String> list); |
|
||||
} |
|
@ -1,29 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailMapper"> |
|
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
|
||||
<!-- ${ew.customSqlSegment} --> |
|
||||
|
|
||||
<select id="listPage" resultType="com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailVo"> |
|
||||
select |
|
||||
* |
|
||||
from purchase_receipt_bill_detail |
|
||||
<where> |
|
||||
${ew.sqlSegment} |
|
||||
</where> |
|
||||
</select> |
|
||||
<select id="initialization" resultType="com.yxt.purchase.biz.purchasereceiptbilldetail.PurchaseReceiptBillDetailVo"> |
|
||||
select |
|
||||
a.* |
|
||||
from purchase_receipt_bill_detail a |
|
||||
where a.sid =#{sid} |
|
||||
</select> |
|
||||
<update id="updateBySidIsDelete"> |
|
||||
UPDATE purchase_receipt_bill_detail |
|
||||
SET isDelete=1 |
|
||||
where sid in |
|
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
</mapper> |
|
@ -1,13 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.yxt.common.core.query.Query; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailQuery implements Query { |
|
||||
private String name; |
|
||||
} |
|
@ -1,75 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import cn.hutool.core.bean.BeanUtil; |
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
||||
import com.yxt.common.base.config.component.FileUploadComponent; |
|
||||
import com.yxt.common.base.service.MybatisBaseService; |
|
||||
import com.yxt.common.base.utils.PagerUtil; |
|
||||
import com.yxt.common.base.utils.StringUtils; |
|
||||
import com.yxt.common.core.query.PagerQuery; |
|
||||
import com.yxt.common.core.result.ResultBean; |
|
||||
import com.yxt.common.core.vo.PagerVo; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.Arrays; |
|
||||
import java.util.stream.Collectors; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:40 |
|
||||
*/ |
|
||||
@Service |
|
||||
public class PurchaseReceiptBillDetailService extends MybatisBaseService<PurchaseReceiptBillDetailMapper, PurchaseReceiptBillDetail> { |
|
||||
@Autowired |
|
||||
private FileUploadComponent fileUploadComponent; |
|
||||
|
|
||||
public PagerVo<PurchaseReceiptBillDetailVo> listPage(PagerQuery<PurchaseReceiptBillDetailQuery> pq) { |
|
||||
PurchaseReceiptBillDetailQuery query = pq.getParams(); |
|
||||
QueryWrapper<PurchaseReceiptBillDetail> qw = new QueryWrapper<>(); |
|
||||
IPage<PurchaseReceiptBillDetail> page = PagerUtil.queryToPage(pq); |
|
||||
IPage<PurchaseReceiptBillDetailVo> pagging = baseMapper.listPage(page, qw); |
|
||||
PagerVo<PurchaseReceiptBillDetailVo> p = PagerUtil.pageToVo(pagging, null); |
|
||||
return p; |
|
||||
} |
|
||||
|
|
||||
public ResultBean<String> saveOrUpdate(PurchaseReceiptBillDetailDto dto) { |
|
||||
ResultBean<String> rb = ResultBean.fireFail(); |
|
||||
String sid = dto.getSid(); |
|
||||
if (StringUtils.isBlank(sid)) { |
|
||||
PurchaseReceiptBillDetail PurchaseReceiptBill = new PurchaseReceiptBillDetail(); |
|
||||
BeanUtil.copyProperties(dto, PurchaseReceiptBill, "sid"); |
|
||||
sid = PurchaseReceiptBill.getSid(); |
|
||||
baseMapper.insert(PurchaseReceiptBill); |
|
||||
|
|
||||
} else { |
|
||||
PurchaseReceiptBillDetail PurchaseReceiptBill = fetchBySid(sid); |
|
||||
if (PurchaseReceiptBill == null) { |
|
||||
return rb.setMsg("该单据不存在"); |
|
||||
} |
|
||||
BeanUtil.copyProperties(dto, PurchaseReceiptBill, "sid"); |
|
||||
baseMapper.updateById(PurchaseReceiptBill); |
|
||||
|
|
||||
} |
|
||||
return rb.success(); |
|
||||
} |
|
||||
|
|
||||
public ResultBean<PurchaseReceiptBillDetailVo> initialization(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
PurchaseReceiptBillDetailVo vo = baseMapper.initialization(sid); |
|
||||
return rb.success().setData(vo); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
public ResultBean delete(String sid) { |
|
||||
ResultBean rb = ResultBean.fireFail(); |
|
||||
return rb.success().setMsg("成功"); |
|
||||
} |
|
||||
public void delAll(String[] sids) { |
|
||||
baseMapper.updateBySidIsDelete(Arrays.stream(sids).collect(Collectors.toList())); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,44 +0,0 @@ |
|||||
package com.yxt.purchase.biz.purchasereceiptbilldetail; |
|
||||
|
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
|
||||
import com.yxt.common.core.vo.Vo; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* @author wangpengfei |
|
||||
* @date 2024/2/26 13:37 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class PurchaseReceiptBillDetailVo implements Vo { |
|
||||
private String id; |
|
||||
private String sid; |
|
||||
private String lockVersion; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date createTime; |
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|
||||
private Date modifyTime; |
|
||||
private String remarks; |
|
||||
private String isEnable; |
|
||||
private String state; |
|
||||
private String isDelete; |
|
||||
private String billSid;//单据sid
|
|
||||
private String goodsSid;//商品sid
|
|
||||
private String goodsName;//商品名称
|
|
||||
private String goodsCode;//商品编码(图号)
|
|
||||
private String specification;//规格
|
|
||||
private String goodsModel;//型号
|
|
||||
private double currentCount;//当前库存数量
|
|
||||
private String unit;//计量单位
|
|
||||
private String warehouseSid;//仓库sid
|
|
||||
private String warehouseName;//仓库名称
|
|
||||
private String position;//货位
|
|
||||
private double cost;//单位成本(进货价)
|
|
||||
private double count;//采购数量
|
|
||||
private double taxAmount;//税额(
|
|
||||
private double taxPrice;//含税价
|
|
||||
private double amount;//采购金额
|
|
||||
private double price1;//销售价1
|
|
||||
private double price2;//销售价2
|
|
||||
} |
|
Loading…
Reference in new issue