|
|
@ -2,6 +2,7 @@ package com.aucma.base.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.aucma.base.utils.MaterialConstants;
|
|
|
|
import com.aucma.common.utils.DateUtils;
|
|
|
|
import com.aucma.common.utils.DateUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@ -54,6 +55,22 @@ public class BaseMaterialInfoServiceImpl implements IBaseMaterialInfoService
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int insertBaseMaterialInfo(BaseMaterialInfo baseMaterialInfo)
|
|
|
|
public int insertBaseMaterialInfo(BaseMaterialInfo baseMaterialInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//维护物料型号
|
|
|
|
|
|
|
|
String materialName = baseMaterialInfo.getMaterialName();
|
|
|
|
|
|
|
|
String materialSubclass = baseMaterialInfo.getMaterialSubclass();
|
|
|
|
|
|
|
|
if (materialSubclass.equals(MaterialConstants.FP_MATERIAL_TYPE)){
|
|
|
|
|
|
|
|
String[] split = materialName.split(",");
|
|
|
|
|
|
|
|
if (split.length > 0 && split[0].startsWith("BC")){
|
|
|
|
|
|
|
|
baseMaterialInfo.setMaterialSpecifications(split[0]);
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
baseMaterialInfo.setMaterialSpecifications(split[0].substring(1));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
String[] split = materialName.split(",");
|
|
|
|
|
|
|
|
if (split.length > 1){
|
|
|
|
|
|
|
|
baseMaterialInfo.setMaterialSpecifications(split[1]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
baseMaterialInfo.setCreatedTime(DateUtils.getNowDate());
|
|
|
|
baseMaterialInfo.setCreatedTime(DateUtils.getNowDate());
|
|
|
|
return baseMaterialInfoMapper.insertBaseMaterialInfo(baseMaterialInfo);
|
|
|
|
return baseMaterialInfoMapper.insertBaseMaterialInfo(baseMaterialInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|