加1|自制;2|外协;3|采购

This commit is contained in:
大米 2024-01-24 11:06:57 +08:00
parent 4a9d9b5385
commit bc17c0cd3a
5 changed files with 23 additions and 16 deletions

View File

@ -16,6 +16,8 @@ public class AddVirtrualMaterialDTO {
private String materialDesc ; private String materialDesc ;
private String materialCategoryCode; private String materialCategoryCode;
private String projectType;
@ApiModelProperty("申请后返回的物料编码") @ApiModelProperty("申请后返回的物料编码")
private String materialNo; private String materialNo;
} }

View File

@ -418,6 +418,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
toM.setDrawingNo(drawingNo); toM.setDrawingNo(drawingNo);
toM.setMaterialDesc(materialDesc); toM.setMaterialDesc(materialDesc);
toM.setMaterialCategoryCode("201201"); toM.setMaterialCategoryCode("201201");
toM.setProjectType(packageParam.getProjectType());
Map<String, AddVirtrualMaterialDTO> mMap = materialService.batchAddMaterial(ImmutableList.of(toM)); Map<String, AddVirtrualMaterialDTO> mMap = materialService.batchAddMaterial(ImmutableList.of(toM));
// String materialNo = materialService.addMaterial(drawingNo, materialName, materialDesc, "201201"); // String materialNo = materialService.addMaterial(drawingNo, materialName, materialDesc, "201201");
String materialNo=mMap.get(key).getMaterialNo(); String materialNo=mMap.get(key).getMaterialNo();
@ -437,6 +438,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
throw new NflgBusinessException(STATE.BusinessError, "单条物料时,请选择上下级"); throw new NflgBusinessException(STATE.BusinessError, "单条物料时,请选择上下级");
} }
TechnologyPackageParamBuilder builder = new TechnologyPackageParamBuilder(technologyPackageParam); TechnologyPackageParamBuilder builder = new TechnologyPackageParamBuilder(technologyPackageParam);
builder.builder();
if (CollUtil.isNotEmpty(builder.getPackageParent())) { if (CollUtil.isNotEmpty(builder.getPackageParent())) {
this.saveOrUpdateBatch(builder.getPackageParent()); this.saveOrUpdateBatch(builder.getPackageParent());
} }

View File

@ -187,6 +187,9 @@ public class MaterialService {
ma.setApplyUserCode(SessionUtil.getRealName()); ma.setApplyUserCode(SessionUtil.getRealName());
ma.setMaterialUnit("PC"); ma.setMaterialUnit("PC");
ma.setProcessState(10); ma.setProcessState(10);
if(StrUtil.isNotBlank(md.getProjectType())){
ma.setProjectType(md.getProjectType());
}
resultList.add(ma); resultList.add(ma);
AddMaterialMainDTO ent=new AddMaterialMainDTO(); AddMaterialMainDTO ent=new AddMaterialMainDTO();

View File

@ -146,7 +146,7 @@ public abstract class VirtualPackageBase {
parent.setSourceRowId(0L); parent.setSourceRowId(0L);
parent.setLastVersionIs(1); parent.setLastVersionIs(1);
parent.setNum(new BigDecimal(1)); parent.setNum(new BigDecimal(1));
parent.setDeviseName(SessionUtil.getUserCode()); parent.setDeviseUserCode(SessionUtil.getUserCode());
parent.setDeviseName(SessionUtil.getRealName()); parent.setDeviseName(SessionUtil.getRealName());
parent.setCreatedBy(SessionUtil.getUserCode()); parent.setCreatedBy(SessionUtil.getUserCode());
parent.setDeptName(SessionUtil.getDepartName()); parent.setDeptName(SessionUtil.getDepartName());