|
|
|
@ -15,6 +15,8 @@ import jnpf.base.UserInfo;
|
|
|
|
|
import jnpf.base.vo.DownloadVO;
|
|
|
|
|
import jnpf.config.ConfigValueUtil;
|
|
|
|
|
import jnpf.exception.DataException;
|
|
|
|
|
import jnpf.materialvo.entity.MaterialEntity;
|
|
|
|
|
import jnpf.materialvo.service.MaterialService;
|
|
|
|
|
import jnpf.poundlist.entity.PoundlistEntity;
|
|
|
|
|
import jnpf.poundlist.service.PoundlistService;
|
|
|
|
|
import jnpf.purchaseback.entity.PurchaseorderEntity;
|
|
|
|
@ -24,8 +26,13 @@ import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
|
|
|
|
|
import jnpf.purchaseorder.service.PurchaseorderitemService;
|
|
|
|
|
import jnpf.reservoirarea.entity.ReservoirareaEntity;
|
|
|
|
|
import jnpf.reservoirarea.service.ReservoirareaService;
|
|
|
|
|
import jnpf.supplier.entity.SupplierEntity;
|
|
|
|
|
import jnpf.supplier.service.SupplierService;
|
|
|
|
|
import jnpf.vehicle.entity.VehicleEntity;
|
|
|
|
|
import jnpf.vehicle.service.VehicleService;
|
|
|
|
|
import jnpf.warehouse.entity.WareHouseEntity;
|
|
|
|
|
import jnpf.warehouse.service.WareHouseService;
|
|
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import jnpf.base.entity.ProvinceEntity;
|
|
|
|
@ -104,6 +111,12 @@ public class ReceiptinController {
|
|
|
|
|
private ReservoirareaService reservoirareaService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private WareHouseService wareHouseService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SupplierService supplierService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private VehicleService vehicleService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private MaterialService materialService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 列表
|
|
|
|
@ -334,6 +347,18 @@ public class ReceiptinController {
|
|
|
|
|
public ActionResult<ReceiptinInfoVO> info(@PathVariable("id") String id){
|
|
|
|
|
ReceiptinEntity entity= receiptinService.getInfo(id);
|
|
|
|
|
ReceiptinInfoVO vo=JsonUtil.getJsonToBean(entity, ReceiptinInfoVO.class);
|
|
|
|
|
if (vo.getSouceno() != null){
|
|
|
|
|
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(vo.getSouceno());
|
|
|
|
|
if (ObjectUtils.isNotEmpty(purchaseorderEntity) && StringUtils.isNotEmpty(purchaseorderEntity.getDocumentNo())){
|
|
|
|
|
vo.setSoucenoName(purchaseorderEntity.getDocumentNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (vo.getSupplierId() != null){
|
|
|
|
|
SupplierEntity supplierEntity = supplierService.getById(vo.getSupplierId());
|
|
|
|
|
if (ObjectUtils.isNotEmpty(supplierEntity) && StringUtils.isNotEmpty(supplierEntity.getSupplierName())){
|
|
|
|
|
vo.setSuppliername(supplierEntity.getSupplierName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(vo.getCreatorTime()!=null){
|
|
|
|
|
vo.setCreatorTime(vo.getCreatorTime());
|
|
|
|
|
}
|
|
|
|
@ -342,6 +367,18 @@ public class ReceiptinController {
|
|
|
|
|
//子表
|
|
|
|
|
List<Receiptin_item0Entity> Receiptin_item0List = receiptinService.GetReceiptin_item0List(id);
|
|
|
|
|
for(Receiptin_item0Entity receiptin_item0Entity : Receiptin_item0List) {
|
|
|
|
|
if (StringUtils.isNotEmpty(receiptin_item0Entity.getVehicleId())){
|
|
|
|
|
VehicleEntity vehicleEntity = vehicleService.getById(receiptin_item0Entity.getVehicleId());
|
|
|
|
|
if (vehicleEntity != null){
|
|
|
|
|
receiptin_item0Entity.setVehicleName(vehicleEntity.getTicketno());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(receiptin_item0Entity.getMaterialId())){
|
|
|
|
|
MaterialEntity materialEntity = materialService.getById(receiptin_item0Entity.getMaterialId());
|
|
|
|
|
if (materialEntity != null){
|
|
|
|
|
receiptin_item0Entity.setMaterialname(materialEntity.getItemName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotEmpty(receiptin_item0Entity.getReservoirareaId())) {
|
|
|
|
|
ReservoirareaEntity reservoirareaEntity = reservoirareaService.getById(receiptin_item0Entity.getReservoirareaId());
|
|
|
|
|
if (reservoirareaEntity != null) {
|
|
|
|
|