pad接口-退货单-入库操作:增加退货信息、护理单元出入库信息相关物料信息
This commit is contained in:
parent
1cd81cba9b
commit
4a67a6a0a0
|
|
@ -78,4 +78,41 @@ public class NuInvoicingThdInfo implements Serializable {
|
|||
@Excel(name = "长者id nu_biz_elder_info.id", width = 15)
|
||||
@ApiModelProperty(value = "长者id nu_biz_elder_info.id")
|
||||
private java.lang.String elderId;
|
||||
|
||||
/**物料类别名称*/
|
||||
@Excel(name = "物料类别名称", width = 15)
|
||||
@ApiModelProperty(value = "物料类别名称")
|
||||
private java.lang.String materialCategoryName;
|
||||
/**物料类型名称*/
|
||||
@Excel(name = "物料类型名称", width = 15)
|
||||
@ApiModelProperty(value = "物料类型名称")
|
||||
private java.lang.String materialTypeName;
|
||||
/**用药类型名称*/
|
||||
@Excel(name = "用药类型名称", width = 15)
|
||||
@ApiModelProperty(value = "用药类型名称")
|
||||
private java.lang.String materialMedicationName;
|
||||
/**物料名称*/
|
||||
@Excel(name = "物料名称", width = 15)
|
||||
@ApiModelProperty(value = "物料名称")
|
||||
private java.lang.String materialName;
|
||||
/**物料单位*/
|
||||
@Excel(name = "物料单位", width = 15)
|
||||
@ApiModelProperty(value = "物料单位")
|
||||
private java.lang.String materialUnits;
|
||||
/**物料编码*/
|
||||
@Excel(name = "物料编码", width = 15)
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private java.lang.String materialNo;
|
||||
/**规格型号*/
|
||||
@Excel(name = "规格型号", width = 15)
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
private java.lang.String specificationModel;
|
||||
/**物料图片*/
|
||||
@Excel(name = "物料图片", width = 15)
|
||||
@ApiModelProperty(value = "物料图片")
|
||||
private java.lang.String materialImg;
|
||||
/**物料销售单价*/
|
||||
@Excel(name = "物料销售单价", width = 15)
|
||||
@ApiModelProperty(value = "物料销售单价")
|
||||
private java.math.BigDecimal salesUnitPrice;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import com.nu.entity.InvoicingThdGwcEntity;
|
|||
import com.nu.entity.InvoicingThdLogEntity;
|
||||
import com.nu.entity.InvoicingThdMainEntity;
|
||||
import com.nu.entity.NuKcslEntity;
|
||||
import com.nu.modules.ConfigMaterial.entity.ConfigMaterialInfo;
|
||||
import com.nu.modules.ConfigMaterial.mapper.ConfigMaterialInfoMapper;
|
||||
import com.nu.modules.cgd.entity.NuWarehouseMaterialCrkInfo;
|
||||
import com.nu.modules.cgd.service.INuWarehouseMaterialCrkInfoService;
|
||||
import com.nu.modules.invoicing.api.ITuiHuoApi;
|
||||
|
|
@ -18,6 +20,7 @@ import com.nu.modules.nu.entity.NuInvoicingNuKcsl;
|
|||
import com.nu.modules.nu.mapper.NuInvoicingNuKcslMapper;
|
||||
import com.nu.modules.nu.service.INuInvoicingNuCrkLogService;
|
||||
import com.nu.modules.nu.service.INuInvoicingNuKcslService;
|
||||
import com.nu.modules.qld.entity.NuInvoicingQldGwc;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdGwc;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdInfo;
|
||||
import com.nu.modules.thd.entity.NuInvoicingThdLog;
|
||||
|
|
@ -72,6 +75,8 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
private IBlWarehouseMaterialInfoService warehouseMaterialInfoService;
|
||||
@Autowired
|
||||
private INuWarehouseMaterialCrkInfoService warehouseMaterialCrkInfoService;
|
||||
@Autowired
|
||||
private ConfigMaterialInfoMapper configMaterialInfoMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InvoicingThdMainEntity> thdList(Integer pageNo, Integer pageSize, InvoicingThdMainEntity dto) {
|
||||
|
|
@ -321,6 +326,11 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
List<NuInvoicingThdGwc> gwcList = thdGwcMapper.selectList(gwcQW);
|
||||
wlList = gwcList.stream().map(NuInvoicingThdGwc::getWlId).collect(Collectors.toList());
|
||||
|
||||
//查出对应物料信息存储到info表和日志表中
|
||||
List<String> gwcWlStrs = gwcList.stream().map(NuInvoicingThdGwc::getWlId).collect(Collectors.toList());
|
||||
List<ConfigMaterialInfo> maList = configMaterialInfoMapper.queryByWlids(gwcWlStrs);
|
||||
Map<String, ConfigMaterialInfo> maMap = maList.stream().collect(Collectors.toMap(ConfigMaterialInfo::getId, item -> item));
|
||||
|
||||
//移除购物车数据
|
||||
InvoicingThdGwcEntity t_ = new InvoicingThdGwcEntity();
|
||||
t_.setPkId(dto.getId());
|
||||
|
|
@ -337,6 +347,16 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
info.setThNum(gwc.getThNum());//退货数量
|
||||
info.setNuId(gwc.getNuId());//护理单元id
|
||||
info.setElderId(gwc.getElderId());//长者id
|
||||
|
||||
info.setMaterialCategoryName(maMap.get(gwc.getWlId()).getCategoryName());//物料类别名称
|
||||
info.setMaterialTypeName(maMap.get(gwc.getWlId()).getTypeName());//物料类型名称
|
||||
info.setMaterialMedicationName(maMap.get(gwc.getWlId()).getMedicationName());//物料类型名称
|
||||
info.setMaterialName(maMap.get(gwc.getWlId()).getMaterialName());//物料名称
|
||||
info.setMaterialUnits(maMap.get(gwc.getWlId()).getMaterialUnits());//物料单位
|
||||
info.setMaterialNo(maMap.get(gwc.getWlId()).getMaterialNo());//物料编码
|
||||
info.setSpecificationModel(maMap.get(gwc.getWlId()).getSpecificationModel());//规格型号
|
||||
info.setMaterialImg(maMap.get(gwc.getWlId()).getMaterialImg());//物料图片
|
||||
info.setSalesUnitPrice(maMap.get(gwc.getWlId()).getSalesUnitPrice());//物料销售单价
|
||||
infoList.add(info);
|
||||
}
|
||||
thdInfoService.saveBatch(infoList);
|
||||
|
|
@ -408,6 +428,16 @@ public class ThdServiceImpl implements ITuiHuoApi {
|
|||
nuInvoicingNuCrkLog.setOrderNumber(item.getThdNo());//单号
|
||||
nuInvoicingNuCrkLog.setOrderType("thd");//单子类型: thd退货单
|
||||
nuInvoicingNuCrkLog.setContent("退货单:" + item.getThdNo());//备注
|
||||
|
||||
nuInvoicingNuCrkLog.setMaterialCategoryName(item.getMaterialCategoryName());//物料类别名称
|
||||
nuInvoicingNuCrkLog.setMaterialTypeName(item.getMaterialTypeName());//物料类型名称
|
||||
nuInvoicingNuCrkLog.setMaterialMedicationName(item.getMaterialMedicationName());//物料类型名称
|
||||
nuInvoicingNuCrkLog.setMaterialName(item.getMaterialName());//物料名称
|
||||
nuInvoicingNuCrkLog.setMaterialUnits(item.getMaterialUnits());//物料单位
|
||||
nuInvoicingNuCrkLog.setMaterialNo(item.getMaterialNo());//物料编码
|
||||
nuInvoicingNuCrkLog.setSpecificationModel(item.getSpecificationModel());//规格型号
|
||||
nuInvoicingNuCrkLog.setMaterialImg(item.getMaterialImg());//物料图片
|
||||
nuInvoicingNuCrkLog.setSalesUnitPrice(item.getSalesUnitPrice());//物料销售单价
|
||||
nuCrkLogList.add(nuInvoicingNuCrkLog);
|
||||
});
|
||||
invoicingNuCrkLogService.saveBatch(nuCrkLogList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue