手动装箱编辑判定
This commit is contained in:
parent
10c2414204
commit
4e932a09fd
@ -168,4 +168,15 @@ public class WoPackagingBoxController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("editSubstrateManual")
|
||||||
|
@ApiOperation("手动编辑包装箱")
|
||||||
|
@LogOperation("手动编辑包装箱")
|
||||||
|
public Result editSubstrateManual(@RequestBody WoPackagingBoxDTO dto){
|
||||||
|
|
||||||
|
woPackagingBoxService.editSubstrateManual(dto);
|
||||||
|
|
||||||
|
return new Result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -42,6 +42,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
|
|||||||
|
|
||||||
IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
|
IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
|
||||||
|
|
||||||
|
void editSubstrateManual(WoPackagingBoxDTO dto);
|
||||||
|
|
||||||
|
|
||||||
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
||||||
|
|
||||||
|
@ -189,6 +189,33 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
|||||||
return IdVo.builder().id(box.getId()).build();
|
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
|
@Override
|
||||||
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
||||||
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
||||||
|
Loading…
Reference in New Issue
Block a user