优化商品成本价的计算逻辑,解决计算查询的bug
This commit is contained in:
@@ -1062,7 +1062,8 @@ public class DepotItemService {
|
|||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||||
public void updateCurrentUnitPrice(DepotItem depotItem) throws Exception {
|
public void updateCurrentUnitPrice(DepotItem depotItem) throws Exception {
|
||||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||||
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
//此处给出入库管理的传值默认为false,不然会导致查询不到销售相关的单据
|
||||||
|
Boolean inOutManageFlag = false;
|
||||||
//查询多单位信息
|
//查询多单位信息
|
||||||
Unit unitInfo = materialService.findUnit(depotItem.getMaterialId());
|
Unit unitInfo = materialService.findUnit(depotItem.getMaterialId());
|
||||||
List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(),
|
List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(),
|
||||||
|
|||||||
@@ -184,7 +184,7 @@
|
|||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="forceFlag">
|
<if test="forceFlag">
|
||||||
and dh.status = '1'
|
and (dh.status = '1' or dh.status = '2' or dh.status = '3')
|
||||||
</if>
|
</if>
|
||||||
<if test="sku != null and sku !=''">
|
<if test="sku != null and sku !=''">
|
||||||
and di.sku = #{sku}
|
and di.sku = #{sku}
|
||||||
|
|||||||
Reference in New Issue
Block a user