fix: 修复剩余数量为负数;
This commit is contained in:
@@ -52,7 +52,7 @@ public class EasOutInBillController {
|
||||
@Log("审核")
|
||||
@SaIgnore
|
||||
//@SaCheckPermission("@el.check(EasOutInBill:edit')")
|
||||
public CommonResult audit(@RequestBody Set<String> ids) {
|
||||
public CommonResult audit(@RequestBody List<String> ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return CommonResult.failed(ResultCode.FAILED);
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ public interface EasOutInBillDetailMapper extends BaseMapper<EasOutInBillDetail>
|
||||
|
||||
List<EasOutInBillDetail> queryInventoryInfo(@Param("params") EasOutInBillDetailVO params);
|
||||
|
||||
List<EasOutInBillDetailDto> queryBillDetailList(@Param("ids") Set<String> ids);
|
||||
List<EasOutInBillDetailDto> queryBillDetailList(@Param("ids") List<String> ids);
|
||||
|
||||
List<EasBillDetailDto> queryDetailList(@Param("ids") Set<String> ids);
|
||||
List<EasBillDetailDto> queryDetailList(@Param("ids") List<String> ids);
|
||||
|
||||
|
||||
void insertBatch(List<EasOutInBillDetail> entities);
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface EasOutInBillMapper extends BaseMapper<EasOutInBill> {
|
||||
|
||||
|
||||
|
||||
List<EasOutInBillDto> queryBillList(@Param("ids") Set<String> ids);
|
||||
List<EasOutInBillDto> queryBillList(@Param("ids") List<String> ids);
|
||||
|
||||
List<HomeBillCounts> getBillsCount();
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ public interface IeasOutInBillService extends IService<EasOutInBill> {
|
||||
*
|
||||
* @param ids /
|
||||
*/
|
||||
void audit(Set<String> ids, boolean isDetail);
|
||||
void audit(List<String> ids, boolean isDetail);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -391,7 +391,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void audit(Set<String> ids, boolean isDetail) {
|
||||
public void audit(List<String> ids, boolean isDetail) {
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new BadRequestException("id不能为空!");
|
||||
}
|
||||
|
||||
@@ -46,8 +46,6 @@ public class WmsToEasService {
|
||||
private String operationName;
|
||||
|
||||
public MsgDto sendWebService(String json) throws ServiceException, RemoteException {
|
||||
log.error("Eas同步接口开始请求,请求json为:"+json);
|
||||
MsgDto msgDto =new MsgDto();
|
||||
Service s = new Service();
|
||||
Call call = (Call) s.createCall();
|
||||
call.setOperationName("login");
|
||||
@@ -90,8 +88,6 @@ public class WmsToEasService {
|
||||
log.error("Eas同步接口invoke调用结果:" + invoke.toString());
|
||||
log.error("Eas同步接口调用结果:" + results);
|
||||
System.out.println(invoke);
|
||||
MsgDto d2 = JSON.parseObject(String.valueOf(invoke), MsgDto.class);
|
||||
MsgDto d1 = JSON.toJavaObject(JSON.parseObject((String) invoke), MsgDto.class);
|
||||
return d1;
|
||||
return JSON.toJavaObject(JSON.parseObject((String) invoke), MsgDto.class);
|
||||
}
|
||||
}
|
||||
@@ -32,16 +32,13 @@ public class WmsToSrmService {
|
||||
private String host;
|
||||
|
||||
public SrmMsgDto sendWebPostData(String json) throws ServiceException, RemoteException {
|
||||
log.error("Srm同步接口开始请求,请求json为:"+json);
|
||||
SrmMsgDto srmMsgDto;
|
||||
com.alibaba.fastjson.JSONObject result;
|
||||
String resultMsg = HttpRequest.post(host)
|
||||
.body(json)
|
||||
.execute().body();
|
||||
log.error("Srm同步接口请求成功,输出参数为:-------------------" +resultMsg);
|
||||
srmMsgDto= JSON.parseObject(String.valueOf(resultMsg), SrmMsgDto.class);
|
||||
return srmMsgDto;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -121,12 +121,10 @@ public class EasBillSchedule {
|
||||
|
||||
private void updateBillInBatch(List<String> djIdList1, List<String> djIdList2) {
|
||||
if (!djIdList1.isEmpty() || !djIdList2.isEmpty()) {
|
||||
//修改主表
|
||||
EasOutInBill easOutInBills = new EasOutInBill();
|
||||
easOutInBills.setDjzt("审核");
|
||||
//单据审核
|
||||
djIdList1.addAll(djIdList2);
|
||||
easOutInBillService.update(easOutInBills, new LambdaQueryWrapper<EasOutInBill>().in(EasOutInBill::getDjid, djIdList1));
|
||||
//修改明细表
|
||||
easOutInBillService.audit(djIdList1,true);
|
||||
//修改明细表审核状态
|
||||
EasOutInBillDetail easOutInBillDetail = new EasOutInBillDetail();
|
||||
easOutInBillDetail.setDjzt("审核");
|
||||
easOutInBillDetailMapper.update(easOutInBillDetail, new LambdaQueryWrapper<EasOutInBillDetail>()
|
||||
|
||||
Reference in New Issue
Block a user