Compare commits
2 Commits
3a4b474c1f
...
136875d6c0
| Author | SHA1 | Date |
|---|---|---|
|
|
136875d6c0 | |
|
|
5294bd89a4 |
|
|
@ -343,14 +343,14 @@ public class InvoicingApi {
|
|||
@ApiOperation(value="拣货物料", notes="拣货物料")
|
||||
@AutoLog(value = "拣货物料")
|
||||
@PostMapping(value = "/pickingInfo")
|
||||
public Result<String> pickingInfo(@RequestBody CgdInfoEntity cgdInfoEntityDto) {
|
||||
String result = invoicingApi.pickingInfo(cgdInfoEntityDto);
|
||||
if(StringUtils.equals("2",result)){
|
||||
public Result<Map<String,Object>> pickingInfo(@RequestBody CgdInfoEntity cgdInfoEntityDto) {
|
||||
Map<String,Object> result = invoicingApi.pickingInfo(cgdInfoEntityDto);
|
||||
if(StringUtils.equals("2",result.get("status").toString())){
|
||||
return Result.error("入库数量错误,超过请购数量");
|
||||
}else if(StringUtils.equals("3",result)){
|
||||
}else if(StringUtils.equals("3",result.get("status").toString())){
|
||||
return Result.error("销账数量错误,超过请购数量");
|
||||
}
|
||||
return Result.OK("操作成功!");
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public interface IInvoicingApi {
|
|||
|
||||
String addWaringAll(CgdInfoEntity cgdInfoEntityDto, Integer maxCount);
|
||||
|
||||
String pickingInfo(CgdInfoEntity cgdInfoEntityDto);
|
||||
Map<String,Object> pickingInfo(CgdInfoEntity cgdInfoEntityDto);
|
||||
|
||||
Map<String,String> editPrice(CgdInfoEntity cgdInfoEntityDto);
|
||||
|
||||
|
|
|
|||
|
|
@ -927,8 +927,9 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String pickingInfo(CgdInfoEntity cgdInfoEntityDto) {
|
||||
public Map<String,Object> pickingInfo(CgdInfoEntity cgdInfoEntityDto) {
|
||||
|
||||
Map<String,Object> result = new HashMap<>();
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<NuInvoicingCgdInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id",cgdInfoEntityDto.getJhId());
|
||||
|
|
@ -971,9 +972,11 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
|
||||
if(jhNum > cgsl - rksl - xzsl){
|
||||
if(StringUtils.equals("0",jhType)) {//入库操作
|
||||
return "2";//入库数量错误,超过请购数量
|
||||
result.put("status","2");
|
||||
return result;//入库数量错误,超过请购数量
|
||||
}else{
|
||||
return "3";//销账数量错误,超过请购数量
|
||||
result.put("status","3");
|
||||
return result;//销账数量错误,超过请购数量
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1053,7 +1056,10 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
|||
cgdMainMapper.updateById(cgdMain);
|
||||
}
|
||||
|
||||
return "1";
|
||||
result.put("status","1");
|
||||
result.put("cgdInfo",cgdMain);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue