|
|
@@ -11,6 +11,7 @@ import com.usoftchina.saas.transfers.mapper.ApcheckMapper;
|
|
|
import com.usoftchina.saas.transfers.service.ApCheckService;
|
|
|
import com.usoftchina.saas.utils.BeanMapper;
|
|
|
import com.usoftchina.saas.utils.CollectionUtils;
|
|
|
+import com.usoftchina.saas.utils.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -41,6 +42,16 @@ public class ApCheckServiceImpl implements ApCheckService{
|
|
|
for (ApcheckFormDTO form : forms) {
|
|
|
Apcheck main = BeanMapper.map(form.getMain(), Apcheck.class);
|
|
|
List<ApcheckDetail> details = BeanMapper.mapList(form.getItems(), ApcheckDetail.class);
|
|
|
+ //检测单据是否存在
|
|
|
+ if (StringUtils.isEmpty(main.getAc_b2bid())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Integer count = apcheckMapper.count(main.getAc_b2bid());
|
|
|
+ if (count > 0) {
|
|
|
+ ids.append(main.getAc_b2bid());
|
|
|
+ ids.append(",");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
//供应商获取
|
|
|
Vendor vendor = apcheckMapper.getVendorByuu(main.getAc_venduu(), companyId);
|