手动装箱编辑判定

Šī revīzija ir iekļauta:
闫阳 2023-03-08 10:42:33 +08:00
vecāks 10c2414204
revīzija 4e932a09fd
3 mainīti faili ar 40 papildinājumiem un 0 dzēšanām

Parādīt failu

@ -168,4 +168,15 @@ public class WoPackagingBoxController {
}
@PostMapping("editSubstrateManual")
@ApiOperation("手动编辑包装箱")
@LogOperation("手动编辑包装箱")
public Result editSubstrateManual(@RequestBody WoPackagingBoxDTO dto){
woPackagingBoxService.editSubstrateManual(dto);
return new Result();
}
}

Parādīt failu

@ -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);

Parādīt failu

@ -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);