长泰集采非集采拆单

dev
anthonywj 1 year ago
parent 19d6023f34
commit 17491a6e7a

@ -28,7 +28,6 @@ import com.glxp.mipsdl.dao.thrsys.ThrProductsDao;
import com.glxp.mipsdl.dao.thrsys.ThrSystemBusApiDao;
import com.glxp.mipsdl.entity.auth.AuthUserEntity;
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
import com.glxp.mipsdl.entity.auth.AuthWarehouseUser;
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
import com.glxp.mipsdl.entity.basic.BasicProductsEntity;
@ -38,7 +37,6 @@ import com.glxp.mipsdl.entity.ctqyy.MaterialDictEntity;
import com.glxp.mipsdl.entity.ctqyy.PriceClassEntity;
import com.glxp.mipsdl.entity.ctqyy.ThrHslbEntity;
import com.glxp.mipsdl.entity.inout.*;
import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrProductsEntity;
import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity;
@ -70,8 +68,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Slf4j
@ -548,6 +545,7 @@ public class CtqyyClient extends CommonHttpClient {
return ResultVOUtils.error(500, "产品信息对照异常,无法上传");
}
for (UdiwmsOrderDetailRequest i : items) {
String fphm = "";
String fprq = null;
@ -565,6 +563,8 @@ public class CtqyyClient extends CommonHttpClient {
i.setSecSalesInvNo(fphm);
i.setInvoiceDate(fprq);
}
//构造诏安接口参数
ZzzyyRequest zaZyRequest = new ZzzyyRequest();
@ -579,9 +579,26 @@ public class CtqyyClient extends CommonHttpClient {
// zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
// }
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
return submitOrder(orderEntity, zaZyRequest);
Map<String, List<UdiwmsOrderDetailRequest>> splitMap = items.stream()
.collect(Collectors.groupingBy(UdiwmsOrderDetailRequest::getFirstSalesInvNo));
BaseResponse baseResponse = null;
int index = 1;
if (splitMap.size() > 1) {
for (List<UdiwmsOrderDetailRequest> splitItems : splitMap.values()) {
zaxzyyOrderRequest.setItem(splitItems);
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
orderEntity.setBillNo(orderEntity.getBillNo() + "-" + index);
baseResponse = submitOrder(orderEntity, zaZyRequest);
}
return baseResponse;
} else {
zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
return submitOrder(orderEntity, zaZyRequest);
}
} else if (thrSystemBusApiEntity.getUrl().equals("saveMaterialHight")) {
// 1.先提交到物资

Loading…
Cancel
Save