QMS报废品汇总新增责任人

tags/yfai-pcn-ext-v1.0
gsz 1 year ago
parent 3e29148f92
commit 35a1928c78

@ -91,6 +91,8 @@ public class MesNcProcessingService implements IMesNcProcessingService {
@Autowired @Autowired
private MesDefectTypeRepository defectTypeRepository; private MesDefectTypeRepository defectTypeRepository;
@Autowired
private MesOrgRepository mesOrgRDao;
@Override @Override
public ListPager<MesPartInspection> queryPartInspectionByPager(MesPartInspection partInspection, Pager pager) { public ListPager<MesPartInspection> queryPartInspectionByPager(MesPartInspection partInspection, Pager pager) {
@ -401,6 +403,11 @@ public class MesNcProcessingService implements IMesNcProcessingService {
produceSnRepository.save(sn); produceSnRepository.save(sn);
//更新检验单 //更新检验单
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
DdlPreparedPack.getStringEqualPack(areaCode, "inventoryLocationCode", packBean);
MesOrg mesOrg = mesOrgRDao.getByProperty(packBean);
//报废时设置责任人
model.getPartInspection().setResponsibleParty(StringUtil.isEmpty(mesOrg)?areaCode:mesOrg.getResponsibleParty());
model.getPartInspection().setDefectTypeId(person.getId()); model.getPartInspection().setDefectTypeId(person.getId());
model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue()); model.getPartInspection().setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SCRAP.getValue());
model.getPartInspection().setRejectQty(model.getPartInspection().getQty()); model.getPartInspection().setRejectQty(model.getPartInspection().getQty());

Loading…
Cancel
Save