修改bug
parent
c64b690560
commit
a9a7313d53
@ -0,0 +1,37 @@
|
||||
package com.glxp.sale.admin.service.basic;
|
||||
|
||||
|
||||
import com.glxp.sale.admin.entity.inout.WarehouseEntity;
|
||||
import com.glxp.sale.admin.res.basic.UdiRelevanceResponse;
|
||||
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class CustomService {
|
||||
|
||||
@Resource
|
||||
UdiRelevanceService udiRelevanceService;
|
||||
|
||||
public int getActCount(WarehouseEntity warehouseEntity) {
|
||||
UdiRelevanceResponse udiInfoBean;
|
||||
if (warehouseEntity.getRelId() != null) {
|
||||
udiInfoBean = udiRelevanceService.selectGroupById(warehouseEntity.getRelId());
|
||||
} else
|
||||
udiInfoBean = udiRelevanceService.selectByNameCode(warehouseEntity.getNameCode());
|
||||
if (udiInfoBean != null) {
|
||||
if (udiInfoBean.getIsUseDy() == 1 && udiInfoBean.getDiType() != 2) {
|
||||
if (udiInfoBean.getBhzxxsbzsl() == 0)
|
||||
return udiInfoBean.getZxxsbzbhsydysl();
|
||||
else
|
||||
return udiInfoBean.getZxxsbzbhsydysl() * udiInfoBean.getBhzxxsbzsl();
|
||||
} else {
|
||||
return udiInfoBean.getBhzxxsbzsl();
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue