|
|
|
@ -29,6 +29,7 @@ import com.op.system.api.RemoteQualityService;
|
|
|
|
import com.op.system.api.RemoteSapService;
|
|
|
|
import com.op.system.api.RemoteSapService;
|
|
|
|
import com.op.system.api.domain.quality.QcCheckTaskIncomeDTO;
|
|
|
|
import com.op.system.api.domain.quality.QcCheckTaskIncomeDTO;
|
|
|
|
import com.op.system.api.domain.sap.SapBackflushMPQuery;
|
|
|
|
import com.op.system.api.domain.sap.SapBackflushMPQuery;
|
|
|
|
|
|
|
|
import com.op.system.api.domain.sap.SapMaterialEntry;
|
|
|
|
import com.op.system.api.domain.sap.SapMaterialPosting;
|
|
|
|
import com.op.system.api.domain.sap.SapMaterialPosting;
|
|
|
|
import com.op.system.api.domain.sap.SapPurchaseOrderQuery;
|
|
|
|
import com.op.system.api.domain.sap.SapPurchaseOrderQuery;
|
|
|
|
import com.op.wms.domain.wcs.WcsOutBoundRequestParams;
|
|
|
|
import com.op.wms.domain.wcs.WcsOutBoundRequestParams;
|
|
|
|
@ -41,6 +42,7 @@ import okhttp3.Response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
|
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
|
@ -4145,4 +4147,45 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
|
|
|
|
String result = HttpUtils.sendPostWechart(OutboundUrl,requestParam);
|
|
|
|
String result = HttpUtils.sendPostWechart(OutboundUrl,requestParam);
|
|
|
|
return AjaxResult.success(result);
|
|
|
|
return AjaxResult.success(result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public List<WmsStockAreaEntry> getStockAreaEntryList(WmsStockAreaEntry params) {
|
|
|
|
|
|
|
|
return odsProcureOutOrderMapper.getStockAreaEntryList(params);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public void submitMaterialEntry(List<WmsStockAreaEntry> list) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SapMaterialEntry> sapList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<WmsStockAreaEntry> duplicationList = odsProcureOutOrderMapper.batchCheckDuplication(list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!duplicationList.isEmpty()){
|
|
|
|
|
|
|
|
List<String> materialCodeList = duplicationList.stream().map(WmsStockAreaEntry::getMaterialCode).collect(Collectors.toList());
|
|
|
|
|
|
|
|
throw new RuntimeException("物料:"+materialCodeList+"存在重复数据");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (WmsStockAreaEntry item : list){
|
|
|
|
|
|
|
|
SapMaterialEntry entry = new SapMaterialEntry();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entry.setMaterialCode(item.getMaterialCode());
|
|
|
|
|
|
|
|
entry.setBatchCode(item.getBatchCode());
|
|
|
|
|
|
|
|
entry.setFactoryCode(item.getFactoryCode());
|
|
|
|
|
|
|
|
entry.setAreaCode(item.getAreaCode());
|
|
|
|
|
|
|
|
entry.setStatus(item.getStatus());
|
|
|
|
|
|
|
|
entry.setUserCode(item.getCreateBy());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sapList.add(entry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交记录
|
|
|
|
|
|
|
|
odsProcureOutOrderMapper.batchInsertMaterialEntry(list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交到sap
|
|
|
|
|
|
|
|
remoteSapService.updateMaterialEntry(sapList,"1");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|