|
|
@@ -9,7 +9,6 @@ import com.usoftchina.saas.commons.dto.ListReqDTO;
|
|
|
import com.usoftchina.saas.commons.exception.BizExceptionCode;
|
|
|
import com.usoftchina.saas.commons.po.Status;
|
|
|
import com.usoftchina.saas.context.BaseContextHolder;
|
|
|
-import com.usoftchina.saas.context.SpringContextHolder;
|
|
|
import com.usoftchina.saas.exception.BizException;
|
|
|
import com.usoftchina.saas.money.b2b.dto.APCheck;
|
|
|
import com.usoftchina.saas.money.mapper.ApcheckMapper;
|
|
|
@@ -18,6 +17,8 @@ import com.usoftchina.saas.money.po.ApcheckDetail;
|
|
|
import com.usoftchina.saas.money.po.ApcheckForm;
|
|
|
import com.usoftchina.saas.money.service.ApcheckService;
|
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
|
+import com.usoftchina.saas.purchase.api.ProdInOutApi;
|
|
|
+import com.usoftchina.saas.purchase.dto.ProdInOutStatusDTO;
|
|
|
import com.usoftchina.saas.utils.JsonUtils;
|
|
|
import com.usoftchina.saas.utils.StringUtils;
|
|
|
import com.usoftchina.saas.utils.http.HttpUtil;
|
|
|
@@ -26,9 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* @author: guq
|
|
|
@@ -42,9 +41,10 @@ public class ApcheckServiceImpl implements ApcheckService{
|
|
|
|
|
|
@Autowired
|
|
|
private ApcheckMapper apcheckMapper;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CompanyApi companyApi;
|
|
|
+ @Autowired
|
|
|
+ private ProdInOutApi prodInOutApi;
|
|
|
|
|
|
private static final String URI = "/erp/sale/APCheck/reply?access_id=";
|
|
|
|
|
|
@@ -106,7 +106,19 @@ public class ApcheckServiceImpl implements ApcheckService{
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ //更新采购验收、验退单的对账状态
|
|
|
+ List<ApcheckDetail> apcheckDetailList = apcheckMapper.selectByFK(id);
|
|
|
+ List<ProdInOutStatusDTO> prodInOutStatusDTOList = new ArrayList<ProdInOutStatusDTO>();
|
|
|
+ for (ApcheckDetail apcheckDetail : apcheckDetailList) {
|
|
|
+ ProdInOutStatusDTO prodInOutStatusDTO = new ProdInOutStatusDTO(
|
|
|
+ apcheckDetail.getAd_inoutno(),
|
|
|
+ apcheckDetail.getAd_pdno().longValue(),
|
|
|
+ apcheckDetail.getCompanyId(),
|
|
|
+ "已对账"
|
|
|
+ );
|
|
|
+ prodInOutStatusDTOList.add(prodInOutStatusDTO);
|
|
|
+ }
|
|
|
+ prodInOutApi.updateApcheckStatus(prodInOutStatusDTOList);
|
|
|
}
|
|
|
}
|
|
|
|