采购单选择商品接口开发完成
采购审核商品明细接口开发完成 采购订单审核管理接口开发完成 采购单提交接口开发完成 操作日期保存接口开发完成 采购单审核接口开发完成 操作日志列表接口开发完成
This commit is contained in:
@@ -50,6 +50,14 @@ public class PurchaseBillRest {
|
|||||||
return rb.success().setData(pv);
|
return rb.success().setData(pv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("采购订单审核管理")
|
||||||
|
@PostMapping("/exlistPage")
|
||||||
|
public ResultBean<PagerVo<PurchaseBillExVo>> exlistPage(@RequestBody PagerQuery<PurchaseBillQuery> pq){
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
PagerVo<PurchaseBillExVo> pv = purchaseBillService.exlistPage(pq);
|
||||||
|
return rb.success().setData(pv);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("新增或修改")
|
@ApiOperation("新增或修改")
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
public ResultBean<String> save(@RequestBody PurchaseBillDto dto){
|
public ResultBean<String> save(@RequestBody PurchaseBillDto dto){
|
||||||
@@ -58,6 +66,22 @@ public class PurchaseBillRest {
|
|||||||
return rb.success().setData(sid);
|
return rb.success().setData(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("采购单提交")
|
||||||
|
@PostMapping("/submit")
|
||||||
|
public ResultBean submit(@RequestBody PurchaseBillDto dto){
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
purchaseBillService.submit(dto);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("采购单审核")
|
||||||
|
@PostMapping("/examine")
|
||||||
|
public ResultBean examine(@RequestParam("sid") String sid,@RequestParam("state") String state,@RequestParam("remarks") String remarks){
|
||||||
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
purchaseBillService.examine(sid,state,remarks);
|
||||||
|
return rb.success();
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("根据sid批量删除")
|
@ApiOperation("根据sid批量删除")
|
||||||
@DeleteMapping("/delBySids")
|
@DeleteMapping("/delBySids")
|
||||||
public ResultBean delBySids(@RequestBody String[] sids){
|
public ResultBean delBySids(@RequestBody String[] sids){
|
||||||
|
|||||||
@@ -55,19 +55,11 @@ public class PurchaseFlowNodeRest {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PurchaseFlowNodeService purchaseFlowNodeService;
|
private PurchaseFlowNodeService purchaseFlowNodeService;
|
||||||
|
|
||||||
@ApiOperation("根据sid批量删除")
|
@ApiOperation("根据条件分页查询数据的列表")
|
||||||
@DeleteMapping("/delBySids")
|
@PostMapping("/listPage")
|
||||||
public ResultBean delBySids(@RequestBody String[] sids){
|
public ResultBean<PagerVo<PurchaseFlowNodeVo>> listPage(@RequestBody PagerQuery<PurchaseFlowNodeQuery> pq){
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
purchaseFlowNodeService.delBySids(sids);
|
PagerVo<PurchaseFlowNodeVo> pv = purchaseFlowNodeService.listPageVo(pq);
|
||||||
return rb.success();
|
return rb.success().setData(pv);
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation("根据SID获取一条记录")
|
|
||||||
@GetMapping("/fetchDetailsBySid/{sid}")
|
|
||||||
public ResultBean<PurchaseFlowNodeDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
|
|
||||||
ResultBean rb = ResultBean.fireFail();
|
|
||||||
PurchaseFlowNodeDetailsVo vo = purchaseFlowNodeService.fetchDetailsVoBySid(sid);
|
|
||||||
return rb.success().setData(vo);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
/*********************************************************
|
||||||
|
*********************************************************
|
||||||
|
******************** *******************
|
||||||
|
************* ************
|
||||||
|
******* _oo0oo_ *******
|
||||||
|
*** o8888888o ***
|
||||||
|
* 88" . "88 *
|
||||||
|
* (| -_- |) *
|
||||||
|
* 0\ = /0 *
|
||||||
|
* ___/`---'\___ *
|
||||||
|
* .' \\| |// '. *
|
||||||
|
* / \\||| : |||// \ *
|
||||||
|
* / _||||| -:- |||||- \ *
|
||||||
|
* | | \\\ - /// | | *
|
||||||
|
* | \_| ''\---/'' |_/ | *
|
||||||
|
* \ .-\__ '-' ___/-. / *
|
||||||
|
* ___'. .' /--.--\ `. .'___ *
|
||||||
|
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||||
|
* `=---=' *
|
||||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||||
|
*********************************************************/
|
||||||
|
package com.yxt.purchase.biz.purchasebill;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "采购单 视图数据对象", description = "采购单 视图数据对象")
|
||||||
|
public class PurchaseBillExVo implements Vo {
|
||||||
|
|
||||||
|
private String sid; // sid
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||||
|
@ApiModelProperty("业务日期")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("单据编号")
|
||||||
|
private String billNo;
|
||||||
|
@ApiModelProperty("供应商名称")
|
||||||
|
private String supplierName;
|
||||||
|
@ApiModelProperty("采购员姓名")
|
||||||
|
private String purchaserName;
|
||||||
|
@ApiModelProperty("仓库名称")
|
||||||
|
private String wareHouseName;
|
||||||
|
@ApiModelProperty("审核状态")
|
||||||
|
private String state;
|
||||||
|
@ApiModelProperty("商品总额")
|
||||||
|
private String amountTotal;
|
||||||
|
@ApiModelProperty("本次付款")
|
||||||
|
private BigDecimal thisPayAmount;
|
||||||
|
@ApiModelProperty("税额汇总")
|
||||||
|
private BigDecimal taxAmount;
|
||||||
|
@ApiModelProperty("总采购数量")
|
||||||
|
private String countTotal;
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remarks;
|
||||||
|
@ApiModelProperty("制单人姓名")
|
||||||
|
private String createByName;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
@ApiModelProperty("最后修改时间")
|
||||||
|
private Date modifyTime;
|
||||||
|
}
|
||||||
@@ -26,11 +26,13 @@
|
|||||||
package com.yxt.purchase.biz.purchasebill;
|
package com.yxt.purchase.biz.purchasebill;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PurchaseBillMapper extends BaseMapper<PurchaseBill> {
|
public interface PurchaseBillMapper extends BaseMapper<PurchaseBill> {
|
||||||
@@ -38,4 +40,9 @@ public interface PurchaseBillMapper extends BaseMapper<PurchaseBill> {
|
|||||||
IPage<PurchaseBillVo> selectPageVo(IPage<PurchaseBill> page, @Param(Constants.WRAPPER) Wrapper<PurchaseBill> qw);
|
IPage<PurchaseBillVo> selectPageVo(IPage<PurchaseBill> page, @Param(Constants.WRAPPER) Wrapper<PurchaseBill> qw);
|
||||||
|
|
||||||
String selectNum(String billNo);
|
String selectNum(String billNo);
|
||||||
|
|
||||||
|
@Update("update purchase_bill set state = #{state} where sid = #{sid}")
|
||||||
|
void updateState(@Param("sid") String sid,@Param("state") String state);
|
||||||
|
|
||||||
|
IPage<PurchaseBillExVo> exlistPage(IPage<PurchaseBill> page, @Param(Constants.WRAPPER) Wrapper<PurchaseBill> qw);
|
||||||
}
|
}
|
||||||
@@ -37,6 +37,36 @@
|
|||||||
<where> ${ew.sqlSegment} </where>
|
<where> ${ew.sqlSegment} </where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="exlistPage" resultType="com.yxt.purchase.biz.purchasebill.PurchaseBillExVo">
|
||||||
|
SELECT
|
||||||
|
pb.sid,
|
||||||
|
pb.createTime,
|
||||||
|
pb.billNo,
|
||||||
|
pb.supplierName,
|
||||||
|
pb.purchaserName,
|
||||||
|
pb.wareHouseName,
|
||||||
|
case pb.state
|
||||||
|
when 1 then '审核中'
|
||||||
|
when 2 then '已审核'
|
||||||
|
when 3 then '审核未通过' end as state,
|
||||||
|
SUM(pbd.amount) AS amountTotal,
|
||||||
|
pba.thisPayAmount,
|
||||||
|
SUM(pbd.taxAmount) AS taxAmount,
|
||||||
|
SUM(pbd.count) AS countTotal,
|
||||||
|
pb.`remarks`,
|
||||||
|
pb.`createByName`,
|
||||||
|
pb.`modifyTime`
|
||||||
|
FROM
|
||||||
|
purchase_bill pb
|
||||||
|
LEFT JOIN purchase_bill_detail pbd
|
||||||
|
ON pbd.`billSid` = pb.`sid`
|
||||||
|
LEFT JOIN purchase_bill_extend pbe
|
||||||
|
ON pbe.billSid = pb.`sid`
|
||||||
|
LEFT JOIN purchase_bill_amount pba
|
||||||
|
ON pba.`billSid` = pb.`sid`
|
||||||
|
<where> ${ew.sqlSegment} </where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectNum" resultType="java.lang.String">
|
<select id="selectNum" resultType="java.lang.String">
|
||||||
select RIGHT (billNo, 4)
|
select RIGHT (billNo, 4)
|
||||||
from pms_purchase_bill
|
from pms_purchase_bill
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ import com.yxt.purchase.biz.purchasebilldetail.PurchaseBillDetailService;
|
|||||||
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendDetailsVo;
|
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendDetailsVo;
|
||||||
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendDto;
|
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendDto;
|
||||||
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendService;
|
import com.yxt.purchase.biz.purchasebillextend.PurchaseBillExtendService;
|
||||||
|
import com.yxt.purchase.biz.purchaseflownode.PurchaseFlowNodeDto;
|
||||||
|
import com.yxt.purchase.biz.purchaseflownode.PurchaseFlowNodeService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -67,6 +69,8 @@ public class PurchaseBillService extends MybatisBaseService<PurchaseBillMapper,
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PurchaseAppendixService purchaseAppendixService;
|
private PurchaseAppendixService purchaseAppendixService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private PurchaseFlowNodeService purchaseFlowNodeService;
|
||||||
|
@Autowired
|
||||||
private FileUploadComponent fileUploadComponent;
|
private FileUploadComponent fileUploadComponent;
|
||||||
|
|
||||||
public PagerVo<PurchaseBillVo> listPageVo(PagerQuery<PurchaseBillQuery> pq) {
|
public PagerVo<PurchaseBillVo> listPageVo(PagerQuery<PurchaseBillQuery> pq) {
|
||||||
@@ -112,6 +116,50 @@ public class PurchaseBillService extends MybatisBaseService<PurchaseBillMapper,
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PagerVo<PurchaseBillExVo> exlistPage(PagerQuery<PurchaseBillQuery> pq) {
|
||||||
|
PurchaseBillQuery query = pq.getParams();
|
||||||
|
QueryWrapper<PurchaseBill> qw = new QueryWrapper<>();
|
||||||
|
qw.ne("state","0");
|
||||||
|
if (StringUtils.isNotBlank(query.getSupplierSid())) {
|
||||||
|
qw.eq("pb.supplierSid", query.getSupplierSid());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getWareHouseSid())) {
|
||||||
|
qw.eq("pb.wareHouseSid", query.getWareHouseSid());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getReceiveStateKey())) {
|
||||||
|
qw.eq("pbe.receiveStateValue", query.getReceiveStateKey());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getLogisticsNum())) {
|
||||||
|
qw.like("pbe.logisticsNum", query.getLogisticsNum());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getDeliveryStateKey())) {
|
||||||
|
qw.eq("pbe.deliveryStateValue", query.getDeliveryStateKey());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getBillNo())) {
|
||||||
|
qw.like("pb.billNo", query.getBillNo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getPurchaserSid())) {
|
||||||
|
qw.like("pb.purchaserSid", query.getPurchaserSid());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getRemarks())) {
|
||||||
|
qw.like("pb.remarks", query.getRemarks());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(query.getGoodsSid())) {
|
||||||
|
qw.like("pbd.goodsSkuSid", query.getGoodsSid());
|
||||||
|
}
|
||||||
|
String createStartTime = query.getCreateStartTime();
|
||||||
|
String createEndTime = query.getCreateEndTime();
|
||||||
|
qw.apply(StringUtils.isNotEmpty(createStartTime), "date_format (pb.createTime,'%Y-%m-%d') >= date_format('" + createStartTime + "','%Y-%m-%d')").
|
||||||
|
apply(StringUtils.isNotEmpty(createEndTime), "date_format (pb.createTime,'%Y-%m-%d') <= date_format('" + createEndTime + "','%Y-%m-%d')"
|
||||||
|
);
|
||||||
|
qw.orderByDesc("pb.createTime");
|
||||||
|
qw.groupBy("pb.sid");
|
||||||
|
IPage<PurchaseBill> page = PagerUtil.queryToPage(pq);
|
||||||
|
IPage<PurchaseBillExVo> pagging = baseMapper.exlistPage(page, qw);
|
||||||
|
PagerVo<PurchaseBillExVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
public String saveOrUpdateDto(PurchaseBillDto dto) {
|
public String saveOrUpdateDto(PurchaseBillDto dto) {
|
||||||
String dtoSid = dto.getSid();
|
String dtoSid = dto.getSid();
|
||||||
PurchaseBillAmountDto purchaseBillAmount = dto.getPurchaseBillAmount();
|
PurchaseBillAmountDto purchaseBillAmount = dto.getPurchaseBillAmount();
|
||||||
@@ -149,6 +197,12 @@ public class PurchaseBillService extends MybatisBaseService<PurchaseBillMapper,
|
|||||||
purchaseAppendixDto.setFilePath(filePath);
|
purchaseAppendixDto.setFilePath(filePath);
|
||||||
purchaseAppendixService.insertByDto(purchaseAppendixDto);
|
purchaseAppendixService.insertByDto(purchaseAppendixDto);
|
||||||
}
|
}
|
||||||
|
//保存操作日志
|
||||||
|
PurchaseFlowNodeDto purchaseFlowNodeDto = new PurchaseFlowNodeDto();
|
||||||
|
purchaseFlowNodeDto.setBillSid(sid);
|
||||||
|
purchaseFlowNodeDto.setCreateByName(dto.getCreateByName());
|
||||||
|
purchaseFlowNodeDto.setResult("成功");
|
||||||
|
purchaseFlowNodeService.insertByDto(purchaseFlowNodeDto);
|
||||||
return sid;
|
return sid;
|
||||||
}
|
}
|
||||||
this.updateByDto(dto);
|
this.updateByDto(dto);
|
||||||
@@ -188,6 +242,17 @@ public class PurchaseBillService extends MybatisBaseService<PurchaseBillMapper,
|
|||||||
return dtoSid;
|
return dtoSid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void submit(PurchaseBillDto dto) {
|
||||||
|
String sid = saveOrUpdateDto(dto);
|
||||||
|
baseMapper.updateState(sid,"1");
|
||||||
|
//保存操作日志
|
||||||
|
PurchaseFlowNodeDto purchaseFlowNodeDto = new PurchaseFlowNodeDto();
|
||||||
|
purchaseFlowNodeDto.setBillSid(sid);
|
||||||
|
purchaseFlowNodeDto.setCreateByName(dto.getCreateByName());
|
||||||
|
purchaseFlowNodeDto.setResult("审核等级0->1[提交],提交");
|
||||||
|
purchaseFlowNodeService.insertByDto(purchaseFlowNodeDto);
|
||||||
|
}
|
||||||
|
|
||||||
public String insertByDto(PurchaseBillDto dto) {
|
public String insertByDto(PurchaseBillDto dto) {
|
||||||
PurchaseBill entity = new PurchaseBill();
|
PurchaseBill entity = new PurchaseBill();
|
||||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||||
@@ -244,4 +309,16 @@ public class PurchaseBillService extends MybatisBaseService<PurchaseBillMapper,
|
|||||||
}
|
}
|
||||||
return rb.success();
|
return rb.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void examine(String sid,String state,String remarks) {
|
||||||
|
baseMapper.updateState(sid,state);
|
||||||
|
PurchaseBill purchaseBill = fetchBySid(sid);
|
||||||
|
//保存操作日志
|
||||||
|
PurchaseFlowNodeDto purchaseFlowNodeDto = new PurchaseFlowNodeDto();
|
||||||
|
purchaseFlowNodeDto.setBillSid(sid);
|
||||||
|
purchaseFlowNodeDto.setCreateByName(purchaseBill.getCreateByName());
|
||||||
|
purchaseFlowNodeDto.setResult("审核等级1->" + state + "[审核],审核");
|
||||||
|
purchaseFlowNodeDto.setRemarks(remarks);
|
||||||
|
purchaseFlowNodeService.insertByDto(purchaseFlowNodeDto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,14 +64,28 @@ public class PurchaseBillDetailDetailsVo implements Vo {
|
|||||||
private String unit; // 计量单位
|
private String unit; // 计量单位
|
||||||
@ApiModelProperty("单价")
|
@ApiModelProperty("单价")
|
||||||
private BigDecimal cost; // 单价
|
private BigDecimal cost; // 单价
|
||||||
@ApiModelProperty("采购数量")
|
@ApiModelProperty("数量")
|
||||||
private BigDecimal count; // 采购数量
|
private BigDecimal count;
|
||||||
|
@ApiModelProperty("数量1")
|
||||||
|
private BigDecimal count1;
|
||||||
|
@ApiModelProperty("已入库数量")
|
||||||
|
private BigDecimal inCount;
|
||||||
|
@ApiModelProperty("已发货数量")
|
||||||
|
private BigDecimal outCount;
|
||||||
|
@ApiModelProperty("已入库数量1")
|
||||||
|
private BigDecimal inCount1;
|
||||||
|
@ApiModelProperty("待入库数量")
|
||||||
|
private BigDecimal notInCount;
|
||||||
|
@ApiModelProperty("待入库数量1")
|
||||||
|
private BigDecimal notInCount1;
|
||||||
@ApiModelProperty("折扣率")
|
@ApiModelProperty("折扣率")
|
||||||
private BigDecimal discountRate; // 折扣率
|
private BigDecimal discountRate; // 折扣率
|
||||||
@ApiModelProperty("折后单价")
|
@ApiModelProperty("折后单价")
|
||||||
private BigDecimal discountPrice; // 折后单价
|
private BigDecimal discountPrice; // 折后单价
|
||||||
@ApiModelProperty("分摊金额")
|
@ApiModelProperty("分摊金额")
|
||||||
private BigDecimal shareAmount; // 分摊金额
|
private BigDecimal shareAmount; // 分摊金额
|
||||||
|
@ApiModelProperty("总价")
|
||||||
|
private BigDecimal costTotal;
|
||||||
@ApiModelProperty("分配比例")
|
@ApiModelProperty("分配比例")
|
||||||
private BigDecimal shareRate; // 分配比例
|
private BigDecimal shareRate; // 分配比例
|
||||||
@ApiModelProperty("采购金额")
|
@ApiModelProperty("采购金额")
|
||||||
|
|||||||
@@ -65,14 +65,28 @@ public class PurchaseBillDetailDto implements Dto {
|
|||||||
private String unit; // 计量单位
|
private String unit; // 计量单位
|
||||||
@ApiModelProperty("单价")
|
@ApiModelProperty("单价")
|
||||||
private BigDecimal cost; // 单价
|
private BigDecimal cost; // 单价
|
||||||
@ApiModelProperty("采购数量")
|
@ApiModelProperty("数量")
|
||||||
private BigDecimal count; // 采购数量
|
private BigDecimal count;
|
||||||
|
@ApiModelProperty("数量1")
|
||||||
|
private BigDecimal count1;
|
||||||
|
@ApiModelProperty("已入库数量")
|
||||||
|
private BigDecimal inCount;
|
||||||
|
@ApiModelProperty("已发货数量")
|
||||||
|
private BigDecimal outCount;
|
||||||
|
@ApiModelProperty("已入库数量1")
|
||||||
|
private BigDecimal inCount1;
|
||||||
|
@ApiModelProperty("待入库数量")
|
||||||
|
private BigDecimal notInCount;
|
||||||
|
@ApiModelProperty("待入库数量1")
|
||||||
|
private BigDecimal notInCount1;
|
||||||
@ApiModelProperty("折扣率")
|
@ApiModelProperty("折扣率")
|
||||||
private BigDecimal discountRate; // 折扣率
|
private BigDecimal discountRate; // 折扣率
|
||||||
@ApiModelProperty("折后单价")
|
@ApiModelProperty("折后单价")
|
||||||
private BigDecimal discountPrice; // 折后单价
|
private BigDecimal discountPrice; // 折后单价
|
||||||
@ApiModelProperty("分摊金额")
|
@ApiModelProperty("分摊金额")
|
||||||
private BigDecimal shareAmount; // 分摊金额
|
private BigDecimal shareAmount; // 分摊金额
|
||||||
|
@ApiModelProperty("总价")
|
||||||
|
private BigDecimal costTotal;
|
||||||
@ApiModelProperty("分配比例")
|
@ApiModelProperty("分配比例")
|
||||||
private BigDecimal shareRate; // 分配比例
|
private BigDecimal shareRate; // 分配比例
|
||||||
@ApiModelProperty("采购金额")
|
@ApiModelProperty("采购金额")
|
||||||
|
|||||||
@@ -51,6 +51,8 @@ public class PurchaseFlowNodeDto implements Dto {
|
|||||||
|
|
||||||
private String sid; // sid
|
private String sid; // sid
|
||||||
|
|
||||||
|
@ApiModelProperty("意见")
|
||||||
|
private String remarks;
|
||||||
@ApiModelProperty("操作人姓名")
|
@ApiModelProperty("操作人姓名")
|
||||||
private String createByName; // 操作人姓名
|
private String createByName; // 操作人姓名
|
||||||
@ApiModelProperty("busSid")
|
@ApiModelProperty("busSid")
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
package com.yxt.purchase.biz.purchaseflownode;
|
package com.yxt.purchase.biz.purchaseflownode;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
@@ -51,4 +52,5 @@ import java.util.List;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface PurchaseFlowNodeMapper extends BaseMapper<PurchaseFlowNode> {
|
public interface PurchaseFlowNodeMapper extends BaseMapper<PurchaseFlowNode> {
|
||||||
|
|
||||||
|
IPage<PurchaseFlowNodeVo> selectPageVo(IPage<PurchaseFlowNode> page, @Param(Constants.WRAPPER) Wrapper<PurchaseFlowNode> qw);
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,10 @@
|
|||||||
<mapper namespace="com.yxt.purchase.biz.purchaseflownode.PurchaseFlowNodeMapper">
|
<mapper namespace="com.yxt.purchase.biz.purchaseflownode.PurchaseFlowNodeMapper">
|
||||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||||
<!-- ${ew.customSqlSegment} -->
|
<!-- ${ew.customSqlSegment} -->
|
||||||
|
<select id="selectPageVo" resultType="com.yxt.purchase.biz.purchaseflownode.PurchaseFlowNodeVo">
|
||||||
|
SELECT * FROM purchase_flow_node
|
||||||
|
<where>
|
||||||
|
${ew.sqlSegment}
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -49,15 +49,5 @@ import lombok.Data;
|
|||||||
@ApiModel(value = "工单-环节 查询条件", description = "工单-环节 查询条件")
|
@ApiModel(value = "工单-环节 查询条件", description = "工单-环节 查询条件")
|
||||||
public class PurchaseFlowNodeQuery implements Query {
|
public class PurchaseFlowNodeQuery implements Query {
|
||||||
|
|
||||||
@ApiModelProperty("操作人姓名")
|
private String billSid;
|
||||||
private String createByName; // 操作人姓名
|
|
||||||
@ApiModelProperty("busSid")
|
|
||||||
private String billSid; // busSid
|
|
||||||
@ApiModelProperty("环节编码")
|
|
||||||
private String nodeCode; // 环节编码
|
|
||||||
@ApiModelProperty("环节名称")
|
|
||||||
private String nodeName; // 环节名称
|
|
||||||
@ApiModelProperty("结果(通过/不通过)")
|
|
||||||
private String result; // 结果(通过/不通过)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,16 +52,19 @@ import org.springframework.stereotype.Service;
|
|||||||
@Service
|
@Service
|
||||||
public class PurchaseFlowNodeService extends MybatisBaseService<PurchaseFlowNodeMapper, PurchaseFlowNode> {
|
public class PurchaseFlowNodeService extends MybatisBaseService<PurchaseFlowNodeMapper, PurchaseFlowNode> {
|
||||||
|
|
||||||
|
public PagerVo<PurchaseFlowNodeVo> listPageVo(PagerQuery<PurchaseFlowNodeQuery> pq) {
|
||||||
|
PurchaseFlowNodeQuery query = pq.getParams();
|
||||||
|
QueryWrapper<PurchaseFlowNode> qw = new QueryWrapper<>();
|
||||||
|
qw.eq("billSid", query.getBillSid());
|
||||||
|
IPage<PurchaseFlowNode> page = PagerUtil.queryToPage(pq);
|
||||||
|
IPage<PurchaseFlowNodeVo> pagging = baseMapper.selectPageVo(page, qw);
|
||||||
|
PagerVo<PurchaseFlowNodeVo> p = PagerUtil.pageToVo(pagging, null);
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
public void insertByDto(PurchaseFlowNodeDto dto) {
|
public void insertByDto(PurchaseFlowNodeDto dto) {
|
||||||
PurchaseFlowNode entity = new PurchaseFlowNode();
|
PurchaseFlowNode entity = new PurchaseFlowNode();
|
||||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||||
baseMapper.insert(entity);
|
baseMapper.insert(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PurchaseFlowNodeDetailsVo fetchDetailsVoBySid(String sid){
|
|
||||||
PurchaseFlowNode entity = fetchBySid(sid);
|
|
||||||
PurchaseFlowNodeDetailsVo vo = new PurchaseFlowNodeDetailsVo();
|
|
||||||
BeanUtil.copyProperties(entity, vo);
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -26,12 +26,15 @@
|
|||||||
package com.yxt.purchase.biz.purchaseflownode;
|
package com.yxt.purchase.biz.purchaseflownode;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.yxt.common.core.vo.Vo;
|
import com.yxt.common.core.vo.Vo;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Project: ss-purchase(采购单) <br/>
|
* Project: ss-purchase(采购单) <br/>
|
||||||
* File: PurchaseFlowNodeVo.java <br/>
|
* File: PurchaseFlowNodeVo.java <br/>
|
||||||
@@ -51,12 +54,13 @@ public class PurchaseFlowNodeVo implements Vo {
|
|||||||
|
|
||||||
private String sid; // sid
|
private String sid; // sid
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("意见")
|
||||||
|
private String remarks;
|
||||||
@ApiModelProperty("操作人姓名")
|
@ApiModelProperty("操作人姓名")
|
||||||
private String createByName; // 操作人姓名
|
private String createByName; // 操作人姓名
|
||||||
@ApiModelProperty("busSid")
|
|
||||||
private String billSid; // busSid
|
|
||||||
@ApiModelProperty("环节编码")
|
|
||||||
private String nodeCode; // 环节编码
|
|
||||||
@ApiModelProperty("环节名称")
|
@ApiModelProperty("环节名称")
|
||||||
private String nodeName; // 环节名称
|
private String nodeName; // 环节名称
|
||||||
@ApiModelProperty("结果(通过/不通过)")
|
@ApiModelProperty("结果(通过/不通过)")
|
||||||
|
|||||||
Reference in New Issue
Block a user