Commit 5aebac3f by 李小惠

修改盘库申请单接口

parent a6030e79
package com.junmp.jyzb.controller;
import cn.hutool.core.util.ObjectUtil;
import com.junmp.jyzb.api.bean.dto.StocktakeDto;
import com.junmp.jyzb.api.bean.query.StocktakeReq;
import com.junmp.jyzb.api.bean.req.UpdateOrderReq;
import com.junmp.jyzb.api.bean.req.UpdateStocktakeReq;
import com.junmp.jyzb.entity.OrderNum;
import com.junmp.jyzb.entity.Stocktake;
import com.junmp.jyzb.service.StocktakeService;
import com.junmp.v2.common.bean.request.ValidationApi;
......@@ -56,7 +53,7 @@ public class StocktakeController {
//修改单据
@PostMapping("/UpdateStocktakeOrder")
@ApiOperation("修改务单")
@ApiOperation("修改盘库业务单")
public ApiRes<Boolean> UpdateStocktakeOrder(@RequestBody @Validated(ValidationApi.edit.class) UpdateStocktakeReq req) {
return ApiRes.success(stocktakeService.UpdateStocktakeOrder(req));
}
......
......@@ -75,10 +75,22 @@ public class Stocktake implements Serializable {
private String shelfId;
/**
* 货架位置(类型为1时特有)
*
*/
@TableField(value = "shelf_location")
private String shelfLocation;
@TableField(value = "shelf_ranges")
private Integer shelfRanges;
/**
* 列
*/
@TableField(value = "shelf_columns")
private Integer shelfColumns;
/**
* 行
*/
@TableField(value = "shelf_rows")
private Integer shelfRows;
/**
* 号型id(类型为2时特有)
......
......@@ -54,22 +54,6 @@ public class StocktakeServiceImpl extends ServiceImpl<StocktakeMapper, Stocktake
String codeValue=String.format("%04d",orderNum.getNum());
stocktake.setOrderCode(orderNum.getBussinessType()+"-"+orderNum.getYear()+"-"+
LocalDateTime.now().getMonth().getValue()+"-"+LocalDateTime.now().getDayOfMonth()+"-"+codeValue);
//如果盘库类型为1:根据货架进行盘点,判断参数排列行是否进行传递,如果传递则需要进行一个参数拼接
String shelfLocation="";
if (ObjectUtil.isNotNull(req.getShelfRanges()) && !req.getShelfRanges().toString().trim().isEmpty()) {
shelfLocation += req.getShelfRanges()+"/";
stocktake.setShelfLocation(shelfLocation);
}
if (ObjectUtil.isNotNull(req.getShelfColumns()) && !req.getShelfColumns().toString().trim().isEmpty()) {
shelfLocation += req.getShelfColumns()+"/";
stocktake.setShelfLocation(shelfLocation);
}
if (ObjectUtil.isNotNull(req.getShelfRows()) && !req.getShelfRows().toString().trim().isEmpty()) {
shelfLocation += req.getShelfRows();
stocktake.setShelfLocation(shelfLocation);
}
stocktake.setCreateTime(DateTimeUtil.getCurrentDateTime());
stocktake.setApplyTime(DateTimeUtil.getCurrentDateTime());
this.save(stocktake);
......@@ -120,7 +104,6 @@ public class StocktakeServiceImpl extends ServiceImpl<StocktakeMapper, Stocktake
public OrderNum setOrderCode(String bussinessType,Long orgId){
//设置采购单号,需要先判断该组织机构的采购单号是否存在,如果存在则将数量进行增加,如果不存在则新增一条对应的数据
OrderNum orderNum = new OrderNum();
//获取年,月,日,获取组织机构id,获取业务类型
orderNum.setYear(LocalDateTime.now().getYear());
orderNum.setBussinessType(bussinessType);
orderNum.setOrgId(orgId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论