|
@ -754,31 +754,36 @@ public class ErpMaterialServiceImpl implements IErpMaterialService |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*审核通过添加库存物料信息*/ |
|
|
/** |
|
|
|
|
|
* |
|
|
|
|
|
* 审核通过添加物料库存查询记录 |
|
|
|
|
|
* */ |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public Integer addStockMaterial(ErpMaterialVo erpMaterialVo) { |
|
|
public void addInventoryInquiry(ErpMaterialVo erpMaterialVo) { |
|
|
|
|
|
|
|
|
|
|
|
String materialNo = erpMaterialVo.getMaterialNo(); |
|
|
|
|
|
ErpMaterialVo oldErpMaterialVo = erpMaterialMapper.selectErpMaterialByMaterialNo(materialNo); |
|
|
|
|
|
|
|
|
WarehouseInventoryInquiry warehouseInventoryInquiry = new WarehouseInventoryInquiry(); |
|
|
WarehouseInventoryInquiry warehouseInventoryInquiry = new WarehouseInventoryInquiry(); |
|
|
warehouseInventoryInquiry.setMaterialNo(erpMaterialVo.getMaterialNo()); |
|
|
warehouseInventoryInquiry.setMaterialNo(oldErpMaterialVo.getMaterialNo()); |
|
|
warehouseInventoryInquiry.setMaterialName(erpMaterialVo.getMaterialName()); |
|
|
warehouseInventoryInquiry.setMaterialName(oldErpMaterialVo.getMaterialName()); |
|
|
warehouseInventoryInquiry.setMaterialDescribe(erpMaterialVo.getDescribe()); |
|
|
warehouseInventoryInquiry.setMaterialDescribe(oldErpMaterialVo.getDescribe()); |
|
|
warehouseInventoryInquiry.setMaterialBrand(erpMaterialVo.getBrand()); |
|
|
warehouseInventoryInquiry.setMaterialBrand(oldErpMaterialVo.getBrand()); |
|
|
warehouseInventoryInquiry.setMaterialProcessMethod(erpMaterialVo.getProcessMethod()); |
|
|
warehouseInventoryInquiry.setMaterialProcessMethod(oldErpMaterialVo.getProcessMethod()); |
|
|
warehouseInventoryInquiry.setMaterialUnit(erpMaterialVo.getUnit()); |
|
|
warehouseInventoryInquiry.setMaterialModel(oldErpMaterialVo.getMaterialModel()); |
|
|
warehouseInventoryInquiry.setMaterialPhotourl(erpMaterialVo.getPhotoUrl()); |
|
|
warehouseInventoryInquiry.setMaterialUnit(oldErpMaterialVo.getUnit()); |
|
|
warehouseInventoryInquiry.setMaterialType(erpMaterialVo.getMaterialType()); |
|
|
warehouseInventoryInquiry.setMaterialPhotourl(oldErpMaterialVo.getPhotoUrl()); |
|
|
|
|
|
warehouseInventoryInquiry.setMaterialType(oldErpMaterialVo.getMaterialType()); |
|
|
warehouseInventoryInquiry.setMaterialUseStatus(erpMaterialVo.getUseStatus()); |
|
|
warehouseInventoryInquiry.setMaterialUseStatus(erpMaterialVo.getUseStatus()); |
|
|
warehouseInventoryInquiry.setWarehouseDept(erpMaterialVo.getWarehouseDept()); |
|
|
warehouseInventoryInquiry.setWarehouseDept(oldErpMaterialVo.getWarehouseDept()); |
|
|
if(erpMaterialVo.getDescribe().contains(",")){ |
|
|
String loginName = ShiroUtils.getLoginName(); |
|
|
warehouseInventoryInquiry.setMaterialSpecification(erpMaterialVo.getDescribe().split(" ")[0]); |
|
|
warehouseInventoryInquiry.setCreateBy(loginName); |
|
|
warehouseInventoryInquiry.setMaterialModel(erpMaterialVo.getDescribe().split(",")[1]); |
|
|
|
|
|
} |
|
|
|
|
|
String user = ShiroUtils.getLoginName(); |
|
|
|
|
|
warehouseInventoryInquiry.setCreateBy(user); |
|
|
|
|
|
warehouseInventoryInquiry.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseInventoryInquiry.setCreateTime(DateUtils.getNowDate()); |
|
|
warehouseInventoryInquiry.setUpdateBy(user); |
|
|
int insertResult = inventoryInquiryMapper.insertWarehouseInventoryInquiry(warehouseInventoryInquiry); |
|
|
warehouseInventoryInquiry.setUpdateTime(DateUtils.getNowDate()); |
|
|
if (insertResult <= 0){ |
|
|
return inventoryInquiryMapper.insertWarehouseInventoryInquiry(warehouseInventoryInquiry); |
|
|
throw new BusinessException("添加物料库存查询记录失败"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|