手动装箱编辑判定
This commit is contained in:
@@ -42,6 +42,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
|
||||
|
||||
IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
|
||||
|
||||
void editSubstrateManual(WoPackagingBoxDTO dto);
|
||||
|
||||
|
||||
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
||||
|
||||
|
||||
@@ -189,6 +189,33 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
return IdVo.builder().id(box.getId()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void editSubstrateManual(WoPackagingBoxDTO dto) {
|
||||
//获取模组
|
||||
List<WoPackagingBoxSubstrate> substrateList = dto.getSubstrateList();
|
||||
for(WoPackagingBoxSubstrate substrate : substrateList){
|
||||
//新增:id为空 模组非空
|
||||
if(ObjectUtils.isEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
|
||||
substrate.setPackagingBoxId(dto.getBoxNo());
|
||||
substrate.setPowerLevel(dto.getPowerLevel());
|
||||
substrate.setSapMaterial(dto.getSapMaterial());
|
||||
substrate.setLineBody(dto.getLineBody());
|
||||
BaseSupportUtils.setCommonField(substrate);
|
||||
woPackagingBoxSubstrateServiceBiz.insert(substrate);
|
||||
}
|
||||
//编辑:id非空 模组非空
|
||||
if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
|
||||
BaseSupportUtils.setUpdateCommonField(substrate);
|
||||
woPackagingBoxSubstrateServiceBiz.updateById(substrate);
|
||||
}
|
||||
//删除:id非空 模组为空
|
||||
if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isBlank(substrate.getWoSubstrateId())) {
|
||||
woPackagingBoxSubstrateServiceBiz.deleteById(substrate.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
||||
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
||||
|
||||
Reference in New Issue
Block a user