Browse Source

fix: 修复剩余数量为负数;

test-20240527
龚宝雄 7 months ago
parent
commit
74380d2bc5
  1. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java
  2. 4
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java
  3. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java
  4. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java
  5. 2
      nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java
  6. 6
      nlsso-server/src/main/java/org/nl/wms/ext/eas/WmsToEasService.java
  7. 3
      nlsso-server/src/main/java/org/nl/wms/ext/srm/WmsToSrmService.java
  8. 8
      nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

2
nlsso-server/src/main/java/org/nl/wms/database/eas/controller/EasOutInBillController.java

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

4
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillDetailMapper.java

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

2
nlsso-server/src/main/java/org/nl/wms/database/eas/dao/mapper/EasOutInBillMapper.java

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

2
nlsso-server/src/main/java/org/nl/wms/database/eas/service/IeasOutInBillService.java

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

2
nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java

@ -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不能为空!");
}

6
nlsso-server/src/main/java/org/nl/wms/ext/eas/WmsToEasService.java

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

3
nlsso-server/src/main/java/org/nl/wms/ext/srm/WmsToSrmService.java

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

8
nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java

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

Loading…
Cancel
Save