复核逻辑修改;
This commit is contained in:
+11
-1
@@ -78,6 +78,7 @@ import org.apache.poi.ss.usermodel.*;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -569,17 +570,26 @@ public class StockInOrderApplicationService {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean updateQuantity( BigDecimal quantity, Long materialDetailId){
|
public Boolean updateQuantity( BigDecimal quantity, Long materialDetailId,BigDecimal area,
|
||||||
|
BigDecimal volume,BigDecimal weight){
|
||||||
Boolean result = false;
|
Boolean result = false;
|
||||||
InMaterialDetail inMaterialDetail = inMaterialDetailService.getById(materialDetailId);
|
InMaterialDetail inMaterialDetail = inMaterialDetailService.getById(materialDetailId);
|
||||||
if (inMaterialDetail != null) {
|
if (inMaterialDetail != null) {
|
||||||
inMaterialDetail.setQuantity(quantity);
|
inMaterialDetail.setQuantity(quantity);
|
||||||
|
inMaterialDetail.setTotalArea(area);
|
||||||
|
inMaterialDetail.setTotalVolume(volume);
|
||||||
|
inMaterialDetail.setTotalNetWeight(weight);
|
||||||
|
inMaterialDetail.setTotalGrossWeight(weight);
|
||||||
boolean b = inMaterialDetailService.updateById(inMaterialDetail);
|
boolean b = inMaterialDetailService.updateById(inMaterialDetail);
|
||||||
Long uniqueId = inMaterialDetail.getUniqueId();
|
Long uniqueId = inMaterialDetail.getUniqueId();
|
||||||
ReceiptMaterialDetail one = receiptMaterialDetailService.getOne(new LambdaQueryWrapper<ReceiptMaterialDetail>()
|
ReceiptMaterialDetail one = receiptMaterialDetailService.getOne(new LambdaQueryWrapper<ReceiptMaterialDetail>()
|
||||||
.eq(ReceiptMaterialDetail::getInUniqueId, uniqueId)
|
.eq(ReceiptMaterialDetail::getInUniqueId, uniqueId)
|
||||||
.eq(ReceiptMaterialDetail::getDelFlag, 1));
|
.eq(ReceiptMaterialDetail::getDelFlag, 1));
|
||||||
one.setQuantity(quantity);
|
one.setQuantity(quantity);
|
||||||
|
one.setTotalArea(area);
|
||||||
|
one.setTotalVolume(volume);
|
||||||
|
one.setTotalNetWeight(weight);
|
||||||
|
one.setTotalGrossWeight(weight);
|
||||||
boolean b1 = receiptMaterialDetailService.updateById(one);
|
boolean b1 = receiptMaterialDetailService.updateById(one);
|
||||||
result = b && b1;
|
result = b && b1;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -221,8 +221,12 @@ public class StockInOrderApi extends BaseController {
|
|||||||
|
|
||||||
@ApiOperation("pda简易模式修改计划数量")
|
@ApiOperation("pda简易模式修改计划数量")
|
||||||
@GetMapping(value = "/updateQuantity")
|
@GetMapping(value = "/updateQuantity")
|
||||||
public AjaxResult updateQuantity(@RequestParam BigDecimal quantity, @RequestParam Long materialDetailId) {
|
public AjaxResult updateQuantity(@RequestParam BigDecimal quantity,
|
||||||
return AjaxResult.success(stockInOrderApplicationService.updateQuantity(quantity, materialDetailId));
|
@RequestParam Long materialDetailId,
|
||||||
|
@RequestParam BigDecimal area,
|
||||||
|
@RequestParam BigDecimal volume
|
||||||
|
,@RequestParam BigDecimal weight) {
|
||||||
|
return AjaxResult.success(stockInOrderApplicationService.updateQuantity(quantity, materialDetailId, area, volume, weight));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user