|
|
@@ -66,7 +66,7 @@ public class InquiryTask extends AbstractTask {
|
|
|
private Integer uploadProduct() {
|
|
|
return jdbcTemplate.count("select count(1) from product where exists (select 1 from inquirydetail left join vendor on id_vendcode=ve_code " +
|
|
|
"left join inquiry on in_id=id_inid where (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' " +
|
|
|
- "and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传'");
|
|
|
+ "and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and id_prodcode=pr_code) and nvl(pr_sendstatus,' ')<>'已上传'");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -75,11 +75,11 @@ public class InquiryTask extends AbstractTask {
|
|
|
* @return
|
|
|
*/
|
|
|
private List<Inquiry> getInquiryUpload() {
|
|
|
- List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select Inquiry.*,em_uu in_recorderuu from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0) and rowNum <= 200 order by in_code ",
|
|
|
+ List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select Inquiry.*,em_uu in_recorderuu from Inquiry left join employee on in_recorderid = em_id where in_statuscode='AUDITED' and (IN_SENDSTATUS='待上传' or IN_SENDSTATUS='上传中') and nvl(in_class,' ')<>'主动报价' and exists (select 1 from InquiryDetail left join vendor on id_vendcode=ve_code where id_inid=in_id and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1) and rowNum <= 200 order by in_code ",
|
|
|
Inquiry.class);
|
|
|
for (Inquiry inquiry : inquiries) {
|
|
|
// 获取询价单明细
|
|
|
- List<InquiryDetail> details = jdbcTemplate.queryForBeanList("select InquiryDetail.*,ve_uu,nvl(id_vendcontact,ve_contact) ve_contact,nvl(id_vendcontactuu,ve_contactuu) ve_contactuu,em_uu ve_buyeruu from InquiryDetail left join vendor on id_vendcode=ve_code left join employee on ve_buyercode=em_code where id_inid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0",
|
|
|
+ List<InquiryDetail> details = jdbcTemplate.queryForBeanList("select InquiryDetail.*,ve_uu,nvl(id_vendcontact,ve_contact) ve_contact,nvl(id_vendcontactuu,ve_contactuu) ve_contactuu,em_uu ve_buyeruu from InquiryDetail left join vendor on id_vendcode=ve_code left join employee on ve_buyercode=em_code where id_inid=? and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1",
|
|
|
InquiryDetail.class, inquiry.getIn_id());
|
|
|
for (InquiryDetail detail : details) {
|
|
|
// 获取询价单明细的价格分段
|
|
|
@@ -201,7 +201,7 @@ public class InquiryTask extends AbstractTask {
|
|
|
|
|
|
@TaskMapping(title = "上传买家对报价信息是否采纳的决策到平台", fixedDelay = 60000)
|
|
|
public void uploadInquiryDecide() {
|
|
|
- List<InquiryDecide> replies = jdbcTemplate.queryForBeanList("select id_id,in_code,id_detno,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_class,' ')<>'主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum < 100 order by in_code,id_detno",
|
|
|
+ List<InquiryDecide> replies = jdbcTemplate.queryForBeanList("select id_id,in_code,id_detno,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and nvl(in_class,' ')<>'主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum < 100 order by in_code,id_detno",
|
|
|
InquiryDecide.class);
|
|
|
if (!CollectionUtils.isEmpty(replies)) {
|
|
|
ContextHolder.setDataSize(replies.size());
|
|
|
@@ -213,7 +213,7 @@ public class InquiryTask extends AbstractTask {
|
|
|
|
|
|
@TaskMapping(title = "上传买家对报价信息作废的决策到平台", fixedDelay = 60000)
|
|
|
public void uploadInquiryInvalid() {
|
|
|
- List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum <= 100 order by in_code",
|
|
|
+ List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')<>'主动报价' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum <= 100 order by in_code",
|
|
|
Inquiry.class);
|
|
|
if (!CollectionUtils.isEmpty(inquiries)) {
|
|
|
ContextHolder.setDataSize(inquiries.size());
|
|
|
@@ -297,7 +297,7 @@ public class InquiryTask extends AbstractTask {
|
|
|
|
|
|
@TaskMapping(title = "上传买家对主动报价询价单的报价信息作废的决策到平台", fixedDelay = 60000)
|
|
|
public void uploadQuotationInvalid() {
|
|
|
- List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')='主动报价' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and rownum <= 100 order by in_code",
|
|
|
+ List<Inquiry> inquiries = jdbcTemplate.queryForBeanList("select * from Inquiry left join InquiryDetail on id_inid=in_id left join vendor on id_vendcode=ve_code where in_status = '已作废' and in_sendstatus <> '作废已上传' and nvl(in_class,' ')='主动报价' and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and rownum <= 100 order by in_code",
|
|
|
Inquiry.class);
|
|
|
if (!CollectionUtils.isEmpty(inquiries)) {
|
|
|
ContextHolder.setDataSize(inquiries.size());
|
|
|
@@ -309,7 +309,7 @@ public class InquiryTask extends AbstractTask {
|
|
|
|
|
|
@TaskMapping(title = "上传买家对主动报价信息是否采纳的决策到平台", fixedDelay = 60000)
|
|
|
public void uploadQuotationDecide() {
|
|
|
- List<InquiryDecide> decides = jdbcTemplate.queryForBeanList("select id_id,id_detno,b2b_qu_id,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and in_class='主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)<>0 and b2b_qu_id is not null order by in_code,id_detno",
|
|
|
+ List<InquiryDecide> decides = jdbcTemplate.queryForBeanList("select id_id,id_detno,b2b_qu_id,id_isagreed id_agreed from InquiryDetail left join Inquiry on id_inid=in_id left join vendor on id_vendcode=ve_code where IN_SENDSTATUS='已上传' and in_class='主动报价' and ID_SENDSTATUS='待上传' and id_isagreed is not null and coalesce(ve_uu, '0') <> '0' and nvl(ve_b2benable,0)=1 and b2b_qu_id is not null order by in_code,id_detno",
|
|
|
InquiryDecide.class);
|
|
|
if (!CollectionUtils.isEmpty(decides)) {
|
|
|
ContextHolder.setDataSize(decides.size());
|