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