liujie
1 天以前 a89ba5357d7e1958d0b51b914358a5e2152ec7e2
诊所erp
2个文件已修改
11 ■■■■■ 已修改文件
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpSupplierWarehousingServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
@@ -21,6 +21,8 @@
import com.ruoyi.system.service.TErpSupplierInventoryGoodsService;
import com.ruoyi.system.vo.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
@@ -479,6 +481,7 @@
    }
    @Override
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public void inventoryGoods(InventoryDto dto, SysUser user) {
        Integer roleType = user.getRoleType();
        String supplierClinicId = null;
@@ -520,8 +523,8 @@
                tErpSupplierWarehousing.setGoodsId(tErpSupplierWarehousing1.getGoodsId());
                tErpSupplierWarehousing.setGoodsName(erpGoods.getGoodsName());
                tErpSupplierWarehousing.setGoodsCount(inventoryGoodsDto.getInventoryCount() - inventoryGoodsDto.getNum());
                tErpSupplierWarehousing.setUnitAmount(erpGoods.getSalesAmount());
                tErpSupplierWarehousing.setTotalPrice(erpGoods.getSalesAmount().multiply(new BigDecimal(tErpSupplierWarehousing.getGoodsCount())));
                tErpSupplierWarehousing.setUnitAmount(tErpSupplierWarehousing1.getUnitAmount());
                tErpSupplierWarehousing.setTotalPrice(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(tErpSupplierWarehousing.getGoodsCount())));
                // 当前年月日时分秒
                String time = DateUtils.dateTimeNow();
                tErpSupplierWarehousing.setWarehouseNo("G" + time);
@@ -567,7 +570,7 @@
                tErpSupplierOutboundGoods.setWarehousingId(tErpSupplierWarehousing1.getId());
                tErpSupplierOutboundGoods.setWarehousingBatchId(tErpSupplierWarehousingBatch.getId());
                tErpSupplierOutboundGoods.setOutboundCount(count);
                tErpSupplierOutboundGoods.setTotalPrice(erpGoods.getSalesAmount().multiply(new BigDecimal(count)));
                tErpSupplierOutboundGoods.setTotalPrice(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(count)));
                erpSupplierOutboundGoodsMapper.insert(tErpSupplierOutboundGoods);
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpSupplierWarehousingServiceImpl.java
@@ -297,7 +297,7 @@
                tErpSupplierWarehousingBatch.setExpiryDate(warehousingGoodsNextDto.getExpiryDate().atStartOfDay());
                erpSupplierWarehousingBatchMapper.insert(tErpSupplierWarehousingBatch);
                if(goods.getMaintenanceInterval()!=null){
                if(goods.getMaintenanceInterval()!=null && !goods.getMaintenanceInterval().isEmpty()){
                    TErpMaintenanceReminder tErpMaintenanceReminder = new TErpMaintenanceReminder();
                    tErpMaintenanceReminder.setClinicSupplierId(supplierClinicId);
                    tErpMaintenanceReminder.setMaintenanceType(1);