1
0

手动装箱编辑判定

Este cometimento está contido em:
闫阳 2023-03-08 10:42:33 +08:00
ascendente 10c2414204
cometimento 4e932a09fd
3 ficheiros modificados com 40 adições e 0 eliminações

Ver ficheiro

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

Ver ficheiro

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

Ver ficheiro

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