提交 3606667e 作者: guofeng
...@@ -52,12 +52,15 @@ import com.huazheng.project.greenplum.source.hana.VbpaSource; ...@@ -52,12 +52,15 @@ import com.huazheng.project.greenplum.source.hana.VbpaSource;
import com.huazheng.project.greenplum.source.hana.VbrkSource; import com.huazheng.project.greenplum.source.hana.VbrkSource;
import com.huazheng.project.greenplum.source.hana.VbrpSource; import com.huazheng.project.greenplum.source.hana.VbrpSource;
import com.huazheng.project.greenplum.source.hana.VbukSource; import com.huazheng.project.greenplum.source.hana.VbukSource;
import com.huazheng.project.greenplum.source.hana.VbupSource;
import com.huazheng.project.greenplum.source.hana.ZmdpcSource; import com.huazheng.project.greenplum.source.hana.ZmdpcSource;
import com.huazheng.project.greenplum.source.hana.ZpoeditSource; import com.huazheng.project.greenplum.source.hana.ZpoeditSource;
import com.huazheng.project.greenplum.source.hana.Zsd06Source; import com.huazheng.project.greenplum.source.hana.Zsd06Source;
import com.huazheng.project.greenplum.source.hana.ZsdfhzlSource; import com.huazheng.project.greenplum.source.hana.ZsdfhzlSource;
import com.huazheng.project.greenplum.source.mssql.SalesContractProcessSource; import com.huazheng.project.greenplum.source.mssql.SalesContractProcessSource;
import com.huazheng.project.greenplum.source.mssql.SalesForecastProcessSource; import com.huazheng.project.greenplum.source.mssql.SalesForecastProcessSource;
import com.huazheng.project.greenplum.source.mssql.SalesInquiryProcessMXSource;
import com.huazheng.project.greenplum.source.mssql.SalesInquiryProcessSource;
import com.huazheng.project.greenplum.source.mssql.SampleApplicationProcessMingXiSource; import com.huazheng.project.greenplum.source.mssql.SampleApplicationProcessMingXiSource;
import com.huazheng.project.greenplum.source.mssql.SampleApplicationProcessSource; import com.huazheng.project.greenplum.source.mssql.SampleApplicationProcessSource;
import com.huazheng.project.greenplum.source.mssql.SampleClosingProcessMingXiSource; import com.huazheng.project.greenplum.source.mssql.SampleClosingProcessMingXiSource;
...@@ -107,6 +110,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -107,6 +110,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -115,6 +119,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -115,6 +119,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -199,6 +205,7 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -199,6 +205,7 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
private static S066Source s066Source; private static S066Source s066Source;
private static S067Source s067Source; private static S067Source s067Source;
private static VbukSource vbukSource; private static VbukSource vbukSource;
private static VbupSource vbupSource;
private static LikpSource likpSource; private static LikpSource likpSource;
private static KonvSource konvSource; private static KonvSource konvSource;
private static LipsSource lipsSource; private static LipsSource lipsSource;
...@@ -235,6 +242,8 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -235,6 +242,8 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
private static SampleApplicationProcessMingXiSource sampleApplicationProcessMingXiSource; private static SampleApplicationProcessMingXiSource sampleApplicationProcessMingXiSource;
private static SampleClosingProcessSource sampleClosingProcessSource; private static SampleClosingProcessSource sampleClosingProcessSource;
private static SampleClosingProcessMingXiSource sampleClosingProcessMingXiSource; private static SampleClosingProcessMingXiSource sampleClosingProcessMingXiSource;
private static SalesInquiryProcessSource salesInquiryProcessSource;
private static SalesInquiryProcessMXSource salesInquiryProcessMXSource;
private static TransformHistoryNodeSource transformHistoryNodeSource; private static TransformHistoryNodeSource transformHistoryNodeSource;
private static TransformNewNodeSource transformNewNodeSource; private static TransformNewNodeSource transformNewNodeSource;
...@@ -269,6 +278,7 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -269,6 +278,7 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
s066Source = (S066Source) context.getBean("s066Source"); s066Source = (S066Source) context.getBean("s066Source");
s067Source = (S067Source) context.getBean("s067Source"); s067Source = (S067Source) context.getBean("s067Source");
vbukSource = (VbukSource) context.getBean("vbukSource"); vbukSource = (VbukSource) context.getBean("vbukSource");
vbupSource = (VbupSource) context.getBean("vbupSource");
likpSource = (LikpSource) context.getBean("likpSource"); likpSource = (LikpSource) context.getBean("likpSource");
konvSource = (KonvSource) context.getBean("konvSource"); konvSource = (KonvSource) context.getBean("konvSource");
lipsSource = (LipsSource) context.getBean("lipsSource"); lipsSource = (LipsSource) context.getBean("lipsSource");
...@@ -305,6 +315,8 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -305,6 +315,8 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
sampleApplicationProcessMingXiSource = (SampleApplicationProcessMingXiSource) context.getBean("sampleApplicationProcessMingXiSource"); sampleApplicationProcessMingXiSource = (SampleApplicationProcessMingXiSource) context.getBean("sampleApplicationProcessMingXiSource");
sampleClosingProcessSource = (SampleClosingProcessSource) context.getBean("sampleClosingProcessSource"); sampleClosingProcessSource = (SampleClosingProcessSource) context.getBean("sampleClosingProcessSource");
sampleClosingProcessMingXiSource = (SampleClosingProcessMingXiSource) context.getBean("sampleClosingProcessMingXiSource"); sampleClosingProcessMingXiSource = (SampleClosingProcessMingXiSource) context.getBean("sampleClosingProcessMingXiSource");
salesInquiryProcessSource = (SalesInquiryProcessSource) context.getBean("salesInquiryProcessSource");
salesInquiryProcessMXSource = (SalesInquiryProcessMXSource) context.getBean("salesInquiryProcessMXSource");
transformHistoryNodeSource = (TransformHistoryNodeSource) context.getBean("transformHistoryNodeSource"); transformHistoryNodeSource = (TransformHistoryNodeSource) context.getBean("transformHistoryNodeSource");
transformNewNodeSource = (TransformNewNodeSource) context.getBean("transformNewNodeSource"); transformNewNodeSource = (TransformNewNodeSource) context.getBean("transformNewNodeSource");
...@@ -385,6 +397,19 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -385,6 +397,19 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
} }
}).setParallelism(1).name("拉取SampleApplicationProcess数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SampleApplicationProcess数据"); }).setParallelism(1).name("拉取SampleApplicationProcess数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SampleApplicationProcess数据");
// ================= SalesInquiryProcessSource 队列 =================
DataStream<String> salesInquiryProcessSourceRedis = env.addSource(salesInquiryProcessSource).setParallelism(1).name("输入SalesInquiryProcessSource队列");
// 数据处理
salesInquiryProcessSourceRedis.flatMap(new FlatMapFunction<String, SalesInquiryProcess>() {
private static final long serialVersionUID = 1L;
@Override
public void flatMap(String value, Collector<SalesInquiryProcess> out) throws Exception {
gpserviceImpl.processSalesInquiryProcess(value, out);
}
}).setParallelism(1).name("拉取SalesInquiryProcess数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SalesInquiryProcess数据");
// ================= SampleApplicationProcessMingXiSource 队列 ================= // ================= SampleApplicationProcessMingXiSource 队列 =================
DataStream<String> sampleApplicationProcessMingXiRedis = env.addSource(sampleApplicationProcessMingXiSource).setParallelism(1).name("输入SampleApplicationProcessMingXi队列"); DataStream<String> sampleApplicationProcessMingXiRedis = env.addSource(sampleApplicationProcessMingXiSource).setParallelism(1).name("输入SampleApplicationProcessMingXi队列");
...@@ -398,6 +423,18 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -398,6 +423,18 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
} }
}).setParallelism(1).name("拉取SampleApplicationProcessMingXi数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SampleApplicationProcessMingXi数据"); }).setParallelism(1).name("拉取SampleApplicationProcessMingXi数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SampleApplicationProcessMingXi数据");
// ================= SalesInquiryProcessMXSource 队列 =================
DataStream<String> salesInquiryProcessMXSourceRedis = env.addSource(salesInquiryProcessMXSource).setParallelism(1).name("输入SalesInquiryProcessMXSource队列");
// 数据处理
salesInquiryProcessMXSourceRedis.flatMap(new FlatMapFunction<String, SalesInquiryProcessMX>() {
private static final long serialVersionUID = 1L;
@Override
public void flatMap(String value, Collector<SalesInquiryProcessMX> out) throws Exception {
gpserviceImpl.processSalesInquiryProcessMX(value, out);
}
}).setParallelism(1).name("拉取SalesInquiryProcessMX数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出SalesInquiryProcessMX数据");
// ================= SampleClosingProcessSource 队列 ================= // ================= SampleClosingProcessSource 队列 =================
DataStream<String> sampleClosingProcessRedis = env.addSource(sampleClosingProcessSource).setParallelism(1).name("输入SampleClosingProcess队列"); DataStream<String> sampleClosingProcessRedis = env.addSource(sampleClosingProcessSource).setParallelism(1).name("输入SampleClosingProcess队列");
...@@ -882,6 +919,17 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del ...@@ -882,6 +919,17 @@ redis-cli -n 1 --raw keys "huazheng*ikp*" | xargs redis-cli -n 1 del
} }
}).setParallelism(1).name("拉取Vbuk数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出Vbuk数据"); }).setParallelism(1).name("拉取Vbuk数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出Vbuk数据");
// ================= VbupRedis 队列 =================
// 销售凭证 : 项目状态
DataStream<String> vbupRedis = env.addSource(vbupSource).setParallelism(1).name("输入Vbup队列");
vbupRedis.flatMap(new FlatMapFunction<String, Vbup>() {
private static final long serialVersionUID = 1L;
@Override
public void flatMap(String value, Collector<Vbup> out) throws Exception {
gpserviceImpl.processVbup(value, out);
}
}).setParallelism(1).name("拉取Vbup数据").addSink(greenPlumRichSinkFunction).setParallelism(1).name("输出Vbup数据");
// =========================================== mysql =========================================== // =========================================== mysql ===========================================
// Handover // Handover
DataStream<String> handoverRedis = env.addSource(handoverSource).setParallelism(1).name("输入Handover队列"); DataStream<String> handoverRedis = env.addSource(handoverSource).setParallelism(1).name("输入Handover队列");
......
...@@ -46,6 +46,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -46,6 +46,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -54,6 +55,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -54,6 +55,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -375,6 +378,15 @@ public interface GPMapper { ...@@ -375,6 +378,15 @@ public interface GPMapper {
public List<Vbuk> selectVbukCheck(Vbuk build); public List<Vbuk> selectVbukCheck(Vbuk build);
@Cacheable(key = "#root.method.name+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt", unless="#result == null") @Cacheable(key = "#root.method.name+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt", unless="#result == null")
public Vbup selectVbup(Vbup vbup); // 查询替代删除
public void insertVbup(Vbup element);
@CacheEvict(key = "'selectVbup'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt")
public void updateVbup(Vbup vbup);
@CacheEvict(key = "'selectVbup'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt")
public void deleteVbup(Vbup vbup);
public List<Vbup> selectVbupCheck(Vbup build);
@Cacheable(key = "#root.method.name+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt", unless="#result == null")
public Zmdpc selectZmdpc(Zmdpc zmdpc); // 查询替代删除 public Zmdpc selectZmdpc(Zmdpc zmdpc); // 查询替代删除
public void insertZmdpc(Zmdpc element); public void insertZmdpc(Zmdpc element);
@CacheEvict(key = "'selectZmdpc'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt") @CacheEvict(key = "'selectZmdpc'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt")
...@@ -391,6 +403,8 @@ public interface GPMapper { ...@@ -391,6 +403,8 @@ public interface GPMapper {
@CacheEvict(key = "'selectZsd06'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt") @CacheEvict(key = "'selectZsd06'+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt")
public void deleteZsd06(Zsd06 item); public void deleteZsd06(Zsd06 item);
public List<Zsd06> selectZsd06Check(Zsd06 build); public List<Zsd06> selectZsd06Check(Zsd06 build);
public Long selectZsd06MaxRowNum();
@Cacheable(key = "#root.method.name+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt", unless="#result == null") @Cacheable(key = "#root.method.name+':'+#p0.vbeln+','+#p0.posnr+','+#p0.mandt", unless="#result == null")
public Zsdfhzl selectZsdfhzl(Zsdfhzl zsdfhzl); // 查询替代删除 public Zsdfhzl selectZsdfhzl(Zsdfhzl zsdfhzl); // 查询替代删除
...@@ -632,6 +646,25 @@ public interface GPMapper { ...@@ -632,6 +646,25 @@ public interface GPMapper {
public List<SampleApplicationProcessMingXi> selectSampleApplicationProcessMingXiCheck(SampleApplicationProcessMingXi build); public List<SampleApplicationProcessMingXi> selectSampleApplicationProcessMingXiCheck(SampleApplicationProcessMingXi build);
public Long selectSampleApplicationProcessMingXiMaxRowNum(); public Long selectSampleApplicationProcessMingXiMaxRowNum();
@Cacheable(key = "#root.method.name+':'+#p0.id", unless="#result == null")
public SalesInquiryProcess selectSalesInquiryProcess(SalesInquiryProcess sfp); // 查询替代删除
public void insertSalesInquiryProcess(SalesInquiryProcess element);
@CacheEvict(key = "'selectSalesInquiryProcess'+':'+#p0.id")
public void updateSalesInquiryProcess(SalesInquiryProcess element); // 配合redis中的reset标签进行更新
@CacheEvict(key = "'selectSalesInquiryProcess'+':'+#p0.id")
public void deleteSalesInquiryProcess(SalesInquiryProcess item);
public List<SalesInquiryProcess> selectSalesInquiryProcessCheck(SalesInquiryProcess build);
@Cacheable(key = "#root.method.name+':'+#p0.id", unless="#result == null")
public SalesInquiryProcessMX selectSalesInquiryProcessMX(SalesInquiryProcessMX sfp); // 查询替代删除
public void insertSalesInquiryProcessMX(SalesInquiryProcessMX element);
@CacheEvict(key = "'selectSalesInquiryProcessMX'+':'+#p0.id")
public void updateSalesInquiryProcessMX(SalesInquiryProcessMX element); //配合redis中的reset标签进行更新
@CacheEvict(key = "'selectSalesInquiryProcessMX'+':'+#p0.id")
public void deleteSalesInquiryProcessMX(SalesInquiryProcessMX item);
public List<SalesInquiryProcessMX> selectSalesInquiryProcessMXCheck(SalesInquiryProcessMX build);
@Cacheable(key = "#root.method.name+':'+#p0.id", unless="#result == null") @Cacheable(key = "#root.method.name+':'+#p0.id", unless="#result == null")
public SampleClosingProcess selectSampleClosingProcess(SampleClosingProcess sfp); // 查询替代删除 public SampleClosingProcess selectSampleClosingProcess(SampleClosingProcess sfp); // 查询替代删除
...@@ -651,7 +684,7 @@ public interface GPMapper { ...@@ -651,7 +684,7 @@ public interface GPMapper {
@CacheEvict(key = "'selectSampleClosingProcessMingXi'+':'+#p0.id") @CacheEvict(key = "'selectSampleClosingProcessMingXi'+':'+#p0.id")
public void deleteSampleClosingProcessMingXi(SampleClosingProcessMingXi item); public void deleteSampleClosingProcessMingXi(SampleClosingProcessMingXi item);
public List<SampleClosingProcessMingXi> selectSampleClosingProcessMingXiCheck(SampleClosingProcessMingXi build); public List<SampleClosingProcessMingXi> selectSampleClosingProcessMingXiCheck(SampleClosingProcessMingXi build);
public Long selectSampleClosingProcessMingXiMaxRowNum();
......
...@@ -32,6 +32,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -32,6 +32,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -41,6 +42,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -41,6 +42,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -539,6 +542,37 @@ public class CheckDeleteServiceImpl { ...@@ -539,6 +542,37 @@ public class CheckDeleteServiceImpl {
redis1Template.opsForValue().set("huazheng:checkDeleteError:Vbuk:rowNum", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkDeleteError:Vbuk:rowNum", SomeUtils.getErrorInfoFromException(e));
} }
} }
public void selectVbupCheckByDelete() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:checkDelete:Vbup:rowNum", "0");
String rowNum = opsForValue.get("huazheng:checkDelete:Vbup:rowNum");
Vbup build = Vbup.builder().rowNum(rowNum).build();
List<Vbup> list = gpMapper.selectVbupCheck(build); // 从数仓中查询一组数据
if (list.size() == 0) {
redis1Template.opsForValue().set("huazheng:checkDelete:Vbup:rowNum", "0"); // 计数器复位
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
list.forEach(target -> { // 遍历要检查的数据
Vbup source = sapMapper.selectVbupById(target); // 根据主键查询源库中的数据
String operator = "none";
if (source == null) { // 如果源库中没有数据
gpMapper.deleteVbup(target); // 删除数仓中的数据
operator = "delete";
}
redis1Template.opsForValue().set("huazheng:checkDelete:Vbup:rowNum", target.getRowNum());
if (!operator.equals("none")) {
log.info(String.format("selectVbupcheckDelete --> rowNum:%s, operator:%s", target.getRowNum(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkDeleteError:Vbup:rowNum", SomeUtils.getErrorInfoFromException(e));
}
}
public void selectZpoeditCheckByDelete() { public void selectZpoeditCheckByDelete() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
...@@ -894,6 +928,36 @@ public class CheckDeleteServiceImpl { ...@@ -894,6 +928,36 @@ public class CheckDeleteServiceImpl {
redis1Template.opsForValue().set("huazheng:checkDeleteError:SampleApplicationProcess:rowNum", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkDeleteError:SampleApplicationProcess:rowNum", SomeUtils.getErrorInfoFromException(e));
} }
} }
public void selectSalesInquiryProcessCheckByDelete() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:checkDelete:SalesInquiryProcess:rowNum", "0");
String rowNum = opsForValue.get("huazheng:checkDelete:SalesInquiryProcess:rowNum");
SalesInquiryProcess build = SalesInquiryProcess.builder().rowNum(rowNum).build();
List<SalesInquiryProcess> list = gpMapper.selectSalesInquiryProcessCheck(build); // 从数仓中查询一组数据
if (list.size() == 0) {
redis1Template.opsForValue().set("huazheng:checkDelete:SalesInquiryProcess:rowNum", "0"); // 计数器复位
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
list.forEach(target -> { // 遍历要检查的数据
SalesInquiryProcess source = crmMapper.selectSalesInquiryProcessById(target); // 根据主键查询源库中的数据
String operator = "none";
if (source == null) { // 如果源库中没有数据
gpMapper.deleteSalesInquiryProcess(target); // 删除数仓中的数据
operator = "delete";
}
redis1Template.opsForValue().set("huazheng:checkDelete:SalesInquiryProcess:rowNum", target.getRowNum());
if (!operator.equals("none")) {
log.info(String.format("selectSalesInquiryProcesscheckDelete --> rowNum:%s, operator:%s", target.getRowNum(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkDeleteError:SalesInquiryProcess:rowNum", SomeUtils.getErrorInfoFromException(e));
}
}
public void selectSampleClosingProcessCheckByDelete() { public void selectSampleClosingProcessCheckByDelete() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
...@@ -981,6 +1045,36 @@ public class CheckDeleteServiceImpl { ...@@ -981,6 +1045,36 @@ public class CheckDeleteServiceImpl {
redis1Template.opsForValue().set("huazheng:checkDeleteError:SampleApplicationProcessMingXi:rowNum", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkDeleteError:SampleApplicationProcessMingXi:rowNum", SomeUtils.getErrorInfoFromException(e));
} }
} }
public void selectSalesInquiryProcessMXCheckByDelete() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:checkDelete:SalesInquiryProcessMX:rowNum", "0");
String rowNum = opsForValue.get("huazheng:checkDelete:SalesInquiryProcessMX:rowNum");
SalesInquiryProcessMX build = SalesInquiryProcessMX.builder().rowNum(rowNum).build();
List<SalesInquiryProcessMX> list = gpMapper.selectSalesInquiryProcessMXCheck(build); // 从数仓中查询一组数据
if (list.size() == 0) {
redis1Template.opsForValue().set("huazheng:checkDelete:SalesInquiryProcessMX:rowNum", "0"); // 计数器复位
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
list.forEach(target -> { // 遍历要检查的数据
SalesInquiryProcessMX source = crmMapper.selectSalesInquiryProcessMXById(target); // 根据主键查询源库中的数据
String operator = "none";
if (source == null) { // 如果源库中没有数据
gpMapper.deleteSalesInquiryProcessMX(target); // 删除数仓中的数据
operator = "delete";
}
redis1Template.opsForValue().set("huazheng:checkDelete:SalesInquiryProcessMX:rowNum", target.getRowNum());
if (!operator.equals("none")) {
log.info(String.format("selectSalesInquiryProcessMXcheckDelete --> rowNum:%s, operator:%s", target.getRowNum(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkDeleteError:SalesInquiryProcessMX:rowNum", SomeUtils.getErrorInfoFromException(e));
}
}
public void selectSampleClosingProcessMingXiCheckByDelete() { public void selectSampleClosingProcessMingXiCheckByDelete() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
......
...@@ -40,6 +40,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -40,6 +40,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -49,6 +50,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -49,6 +50,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -420,8 +423,25 @@ public class CheckUpdateServiceImpl { ...@@ -420,8 +423,25 @@ public class CheckUpdateServiceImpl {
Date date = DateUtil.parse(erdat2); Date date = DateUtil.parse(erdat2);
source.setDatum1(date); source.setDatum1(date);
} }
source.setCrt_datum1(SomeUtils.caDate(source.getCrt_datum())); // source.setCrt_datum1(SomeUtils.caDate(source.getCrt_datum()));
source.setCha_datum1(SomeUtils.caDate(source.getCha_datum())); // source.setCha_datum1(SomeUtils.caDate(source.getCha_datum()));
String crtdatum = source.getCrt_datum();
String crttime = source.getCrt_time();
if ("00000000".equals(crtdatum)) {
source.setCrt_datum1(null);
} else {
Date date = DateUtil.parse(crtdatum+crttime, "yyyyMMddHHmmss");
source.setCrt_datum1(date);
}
String chadatum = source.getCha_datum();
String chatime = source.getCha_time();
if ("00000000".equals(chadatum)) {
source.setCha_datum1(null);
} else {
Date date = DateUtil.parse(chadatum+chatime, "yyyyMMddHHmmss");
source.setCha_datum1(date);
}
// =============================== // ===============================
while (true) { while (true) {
try { try {
...@@ -761,6 +781,30 @@ public class CheckUpdateServiceImpl { ...@@ -761,6 +781,30 @@ public class CheckUpdateServiceImpl {
} }
} }
} }
// 所属selectLipsCheckUpdate的级联
private void cascadeVbupCheckByUpdate(Vbup source, Vbup target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateVbup(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());
ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
// 所属selectMaraCheckUpdate的级联 // 所属selectMaraCheckUpdate的级联
private void cascadeMaktCheckByUpdate(Makt source, Makt target) { private void cascadeMaktCheckByUpdate(Makt source, Makt target) {
if (target != null) { // 目标库有数据 if (target != null) { // 目标库有数据
...@@ -1107,7 +1151,28 @@ public class CheckUpdateServiceImpl { ...@@ -1107,7 +1151,28 @@ public class CheckUpdateServiceImpl {
} }
} }
} }
// 所属selectSalesInquiryProcessCheckUpdate的级联
private void cascadeSalesInquiryProcessMXCheckByUpdate(SalesInquiryProcessMX source, SalesInquiryProcessMX target) {
if (target != null) { // 目标库有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateSalesInquiryProcessMX(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());
ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
}
public void selectHandoverCheckUpdate() { public void selectHandoverCheckUpdate() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
...@@ -1690,6 +1755,12 @@ public class CheckUpdateServiceImpl { ...@@ -1690,6 +1755,12 @@ public class CheckUpdateServiceImpl {
Vbuk tVbuk = gpMapper.selectVbuk(sVbuk); // 查询目标库中afko表 Vbuk tVbuk = gpMapper.selectVbuk(sVbuk); // 查询目标库中afko表
cascadeVbukCheckByUpdate(sVbuk, tVbuk); // 级联更新afko表 cascadeVbukCheckByUpdate(sVbuk, tVbuk); // 级联更新afko表
} }
// 级联更新业务
List<Vbup> sVbupList = sapMapper.cascadeVbupByLips(source); // 级联查询源库vbup表
for (Vbup sVbup : sVbupList) {
Vbup tVbup = gpMapper.selectVbup(sVbup); // 查询目标库中vbup表
cascadeVbupCheckByUpdate(sVbup, tVbup); // 级联更新vbup表
}
ThreadUtil.safeSleep(500); ThreadUtil.safeSleep(500);
} }
...@@ -1938,6 +2009,61 @@ public class CheckUpdateServiceImpl { ...@@ -1938,6 +2009,61 @@ public class CheckUpdateServiceImpl {
redis1Template.opsForValue().set("huazheng:checkUpdateError:SampleApplicationProcess:rowids", SomeUtils.getErrorInfoFromException(e)); redis1Template.opsForValue().set("huazheng:checkUpdateError:SampleApplicationProcess:rowids", SomeUtils.getErrorInfoFromException(e));
} }
} }
public void selectSalesInquiryProcessCheckUpdate() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:checkUpdate:SalesInquiryProcess:rowids", "0");
String rowids = opsForValue.get("huazheng:checkUpdate:SalesInquiryProcess:rowids");
SalesInquiryProcess build = SalesInquiryProcess.builder().id(rowids).build();
List<SalesInquiryProcess> slist = crmMapper.selectSalesInquiryProcessCheckByUpdate(build); // 从数仓中查询一组数据
if (slist.size() == 0) {
redis1Template.opsForValue().set("huazheng:checkUpdate:SalesInquiryProcess:rowids", "0"); // 计数器复位
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
slist.forEach(source -> { // 遍历要检查的数据
SalesInquiryProcess target = gpMapper.selectSalesInquiryProcess(source); // 根据主键查询源库中的数据
String operator = "none";
String srowids = source.getId();
if (target != null) {
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
// ===============================
// ===============================
while (true) {
try {
gpMapper.updateSalesInquiryProcess(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
// 级联更新业务
List<SalesInquiryProcessMX> sSalesInquiryProcessMXList = crmMapper.cascadeSalesInquiryProcessMXBySalesInquiryProcess(source); // 级联查询源库
for (SalesInquiryProcessMX sSalesInquiryProcessMX : sSalesInquiryProcessMXList) {
SalesInquiryProcessMX tSalesInquiryProcessMX = gpMapper.selectSalesInquiryProcessMX(sSalesInquiryProcessMX); // 查询目标库中
cascadeSalesInquiryProcessMXCheckByUpdate(sSalesInquiryProcessMX, tSalesInquiryProcessMX); // 级联更新
}
ThreadUtil.safeSleep(500);
}
}
redis1Template.opsForValue().set("huazheng:checkUpdate:SalesInquiryProcess:rowids", srowids.toString());
if (!operator.equals("none")) {
log.info(String.format("selectSalesInquiryProcesscheckUpdate --> rowids:%s, operator:%s", srowids.toString(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkUpdateError:SalesInquiryProcess:rowids", SomeUtils.getErrorInfoFromException(e));
}
}
public void selectSampleClosingProcessCheckUpdate() { public void selectSampleClosingProcessCheckUpdate() {
try { try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue(); ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
......
...@@ -13,6 +13,7 @@ import org.springframework.data.redis.core.ValueOperations; ...@@ -13,6 +13,7 @@ import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.huazheng.project.greenplum.mapper.GPMapper; import com.huazheng.project.greenplum.mapper.GPMapper;
import com.huazheng.project.greenplum.utils.SomeUtils;
import com.huazheng.project.hana.mapper.SapMapper; import com.huazheng.project.hana.mapper.SapMapper;
import com.huazheng.project.hana.model.Afru; import com.huazheng.project.hana.model.Afru;
import com.huazheng.project.hana.model.Afvc; import com.huazheng.project.hana.model.Afvc;
...@@ -30,11 +31,13 @@ import com.huazheng.project.hana.model.Tspat; ...@@ -30,11 +31,13 @@ import com.huazheng.project.hana.model.Tspat;
import com.huazheng.project.hana.model.Tvkbt; import com.huazheng.project.hana.model.Tvkbt;
import com.huazheng.project.hana.model.Vbak; import com.huazheng.project.hana.model.Vbak;
import com.huazheng.project.hana.model.Vbap; import com.huazheng.project.hana.model.Vbap;
import com.huazheng.project.hana.model.Zsd06;
import com.huazheng.project.mssql.mapper.CrmMapper; import com.huazheng.project.mssql.mapper.CrmMapper;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
import com.huazheng.project.mssql.model.SampleClosingProcessMingXi;
import com.huazheng.project.mssql2.mapper.HzcrmMapper; import com.huazheng.project.mssql2.mapper.HzcrmMapper;
import com.huazheng.project.mssql2.model.SysSAPreturnNo; import com.huazheng.project.mssql2.model.SysSAPreturnNo;
import com.huazheng.project.mssql2.model.TKeHu; import com.huazheng.project.mssql2.model.TKeHu;
...@@ -46,6 +49,7 @@ import com.huazheng.project.mssql3.model.PersonComp; ...@@ -46,6 +49,7 @@ import com.huazheng.project.mssql3.model.PersonComp;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil; import cn.hutool.crypto.SecureUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
...@@ -1203,6 +1207,15 @@ public class DeleteUpdateJobServiceImpl { ...@@ -1203,6 +1207,15 @@ public class DeleteUpdateJobServiceImpl {
source.setHashResult(shash); source.setHashResult(shash);
while (true) { while (true) {
try { try {
String erdat = source.getErdat();
String erzet = source.getErzet();
if ("00000000".equals(erdat)) {
source.setErdat2erzet(null);
} else {
Date date = DateUtil.parse(erdat+erzet, "yyyyMMddHHmmss");
source.setErdat2erzet(date);
}
source.setAudat1(SomeUtils.caDate(source.getAudat()));
gpMapper.updateVbak(source); // 更新数据到数仓中 gpMapper.updateVbak(source); // 更新数据到数仓中
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
...@@ -1487,6 +1500,10 @@ public class DeleteUpdateJobServiceImpl { ...@@ -1487,6 +1500,10 @@ public class DeleteUpdateJobServiceImpl {
source.setHashResult(shash); source.setHashResult(shash);
while (true) { while (true) {
try { try {
if (NumberUtil.isNumber(source.getYangPinSQSLH())) {
int yangPinSQSLHi = Integer.parseInt(source.getYangPinSQSLH());
source.setYangPinSQSLHi(yangPinSQSLHi);
}
gpMapper.updateSampleClosingProcess(source); // 更新数据到数仓中 gpMapper.updateSampleClosingProcess(source); // 更新数据到数仓中
break; break;
} catch (RuntimeException e) { } catch (RuntimeException e) {
...@@ -1506,4 +1523,139 @@ public class DeleteUpdateJobServiceImpl { ...@@ -1506,4 +1523,139 @@ public class DeleteUpdateJobServiceImpl {
} }
} }
public void selectSampleClosingProcessMingXiCheck() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:check:SampleClosingProcessMingXi:rowNum", "0");
String rowNum = opsForValue.get("huazheng:check:SampleClosingProcessMingXi:rowNum");
// 一次性任务的终止位
if (redis1Template.hasKey("huazheng:check:SampleClosingProcessMingXi:stopNum") == false) {
// 查询最大计数器
String maxRowNum = gpMapper.selectSampleClosingProcessMingXiMaxRowNum().toString();
opsForValue.setIfAbsent("huazheng:check:SampleClosingProcessMingXi:stopNum", maxRowNum);
}
Long stopNum = Long.parseLong(opsForValue.get("huazheng:check:SampleClosingProcessMingXi:stopNum"));
if (stopNum < Long.parseLong(rowNum)) {
JobKey jobKey = JobKey.jobKey("selectSampleClosingProcessMingXiCheck_once", "DEFAULT"); // 删除任务
quartzScheduler.deleteJob(jobKey);
return;
}
SampleClosingProcessMingXi build = SampleClosingProcessMingXi.builder().rowNum(rowNum).build();
List<SampleClosingProcessMingXi> list = gpMapper.selectSampleClosingProcessMingXiCheck(build); // 从数仓中查询一组数据
if (list.size() == 0) {
JobKey jobKey = JobKey.jobKey("selectSampleClosingProcessMingXiCheck_once", "DEFAULT"); // 删除任务
quartzScheduler.deleteJob(jobKey);
return;
}
list.forEach(target -> { // 遍历要检查的数据
SampleClosingProcessMingXi source = crmMapper.selectSampleClosingProcessMingXiById(target); // 根据主键查询源库中的数据
String operator = "none";
if (source == null) { // 如果源库中没有数据
gpMapper.deleteSampleClosingProcessMingXi(target); // 删除数仓中的数据
operator = "delete";
} else { // 源库中有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
while (true) {
try {
gpMapper.updateSampleClosingProcessMingXi(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
redis1Template.opsForValue().set("huazheng:check:SampleClosingProcessMingXi:rowNum", target.getRowNum());
if (!operator.equals("none")) {
log.info(String.format("selectSampleClosingProcessMingXiCheck --> rowNum:%s, operator:%s", target.getRowNum(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkError:SampleClosingProcessMingXi:rowNum", getErrorInfoFromException(e));
}
}
public void selectZsd06Check() {
try {
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:check:Zsd06:rowNum", "0");
String rowNum = opsForValue.get("huazheng:check:Zsd06:rowNum");
// 一次性任务的终止位
if (redis1Template.hasKey("huazheng:check:Zsd06:stopNum") == false) {
// 查询最大计数器
String maxRowNum = gpMapper.selectZsd06MaxRowNum().toString();
opsForValue.setIfAbsent("huazheng:check:Zsd06:stopNum", maxRowNum);
}
Long stopNum = Long.parseLong(opsForValue.get("huazheng:check:Zsd06:stopNum"));
if (stopNum < Long.parseLong(rowNum)) {
JobKey jobKey = JobKey.jobKey("selectZsd06Check_once", "DEFAULT"); // 删除任务
quartzScheduler.deleteJob(jobKey);
return;
}
Zsd06 build = Zsd06.builder().rowNum(rowNum).build();
List<Zsd06> list = gpMapper.selectZsd06Check(build); // 从数仓中查询一组数据
if (list.size() == 0) {
JobKey jobKey = JobKey.jobKey("selectZsd06Check_once", "DEFAULT"); // 删除任务
quartzScheduler.deleteJob(jobKey);
return;
}
list.forEach(target -> { // 遍历要检查的数据
Zsd06 source = sapMapper.selectZsd06ById(target); // 根据主键查询源库中的数据
String operator = "none";
if (source == null) { // 如果源库中没有数据
gpMapper.deleteZsd06(target); // 删除数仓中的数据
operator = "delete";
} else { // 源库中有数据
String shash = SecureUtil.md5(JSONUtil.toJsonStr(source)); // 源库中数据的hash结果
String thash = target.getHashResult(); // 数仓中数据的hash结果
if (!shash.equals(thash)) { // 如果hash结果不一致
source.setHashResult(shash);
while (true) {
try {
if (source.getDatum() != null) {
String erdat2 = new StringBuffer(source.getDatum()).insert(4, "-").insert(7, "-").toString();
Date date = DateUtil.parse(erdat2);
source.setDatum1(date);
}
String crtdatum = source.getCrt_datum();
String crttime = source.getCrt_time();
if ("00000000".equals(crtdatum)) {
source.setCrt_datum1(null);
} else {
Date date = DateUtil.parse(crtdatum+crttime, "yyyyMMddHHmmss");
source.setCrt_datum1(date);
}
String chadatum = source.getCha_datum();
String chatime = source.getCha_time();
if ("00000000".equals(chadatum)) {
source.setCha_datum1(null);
} else {
Date date = DateUtil.parse(chadatum+chatime, "yyyyMMddHHmmss");
source.setCha_datum1(date);
}
gpMapper.updateZsd06(source); // 更新数据到数仓中
break;
} catch (RuntimeException e) {
log.error(e.getMessage());ThreadUtil.safeSleep(500);
}
}
ThreadUtil.safeSleep(500);
}
}
redis1Template.opsForValue().set("huazheng:check:Zsd06:rowNum", target.getRowNum());
if (!operator.equals("none")) {
log.info(String.format("selectZsd06Check --> rowNum:%s, operator:%s", target.getRowNum(), operator));
}
});
} catch (Exception e) {
redis1Template.opsForValue().set("huazheng:checkError:Zsd06:rowNum", getErrorInfoFromException(e));
}
}
} }
...@@ -49,6 +49,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -49,6 +49,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -58,6 +59,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -58,6 +59,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -359,6 +362,61 @@ public class GPServiceImpl { ...@@ -359,6 +362,61 @@ public class GPServiceImpl {
log.error(e.getMessage()); log.error(e.getMessage());
} }
} }
public void processSalesInquiryProcess(String value, Collector<SalesInquiryProcess> arg2) {
try {
SalesInquiryProcess data = JSONUtil.toBean(value, SalesInquiryProcess.class);
SalesInquiryProcess exist = gpMapper.selectSalesInquiryProcess(data);
if (exist != null) {
data.setExist(true); // 已经在库
}
arg2.collect(data);
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcess:error", "processSalesInquiryProcess", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void sinkSalesInquiryProcess(SalesInquiryProcess element) {
try {
if (element.isExist() == false) {
log.debug("GPServiceImpl.sinkSalesInquiryProcess()");
gpMapper.insertSalesInquiryProcess(element);
}
} catch (RuntimeException e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcess:error", "sinkSalesInquiryProcess", getErrorInfoFromException(e));
log.error(e.getMessage());
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcess:error", "sinkSalesInquiryProcess", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void processSalesInquiryProcessMX(String value, Collector<SalesInquiryProcessMX> arg2) {
try {
SalesInquiryProcessMX data = JSONUtil.toBean(value, SalesInquiryProcessMX.class);
SalesInquiryProcessMX exist = gpMapper.selectSalesInquiryProcessMX(data);
if (exist != null) {
data.setExist(true); // 已经在库
}
arg2.collect(data);
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcessMX:error", "processSalesInquiryProcessMX", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void sinkSalesInquiryProcessMX(SalesInquiryProcessMX element) {
try {
if (element.isExist() == false) {
log.debug("GPServiceImpl.sinkSalesInquiryProcessMX()");
gpMapper.insertSalesInquiryProcessMX(element);
}
} catch (RuntimeException e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcessMX:error", "sinkSalesInquiryProcessMX", getErrorInfoFromException(e));
log.error(e.getMessage());
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:SalesInquiryProcessMX:error", "sinkSalesInquiryProcessMX", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void processSampleApplicationProcess(String value, Collector<SampleApplicationProcess> arg2) { public void processSampleApplicationProcess(String value, Collector<SampleApplicationProcess> arg2) {
try { try {
...@@ -394,7 +452,6 @@ public class GPServiceImpl { ...@@ -394,7 +452,6 @@ public class GPServiceImpl {
log.error(e.getMessage()); log.error(e.getMessage());
} }
} }
public void processSampleApplicationProcessMingXi(String value, Collector<SampleApplicationProcessMingXi> arg2) { public void processSampleApplicationProcessMingXi(String value, Collector<SampleApplicationProcessMingXi> arg2) {
try { try {
SampleApplicationProcessMingXi data = JSONUtil.toBean(value, SampleApplicationProcessMingXi.class); SampleApplicationProcessMingXi data = JSONUtil.toBean(value, SampleApplicationProcessMingXi.class);
...@@ -408,7 +465,6 @@ public class GPServiceImpl { ...@@ -408,7 +465,6 @@ public class GPServiceImpl {
log.error(e.getMessage()); log.error(e.getMessage());
} }
} }
public void sinkSampleApplicationProcessMingXi(SampleApplicationProcessMingXi element) { public void sinkSampleApplicationProcessMingXi(SampleApplicationProcessMingXi element) {
try { try {
if (element.isExist() == false) { if (element.isExist() == false) {
...@@ -844,8 +900,26 @@ public class GPServiceImpl { ...@@ -844,8 +900,26 @@ public class GPServiceImpl {
redis1Template.opsForHash().put("huazheng:Zsd06:error", "processZsd061", getErrorInfoFromException(e)); redis1Template.opsForHash().put("huazheng:Zsd06:error", "processZsd061", getErrorInfoFromException(e));
log.error(e.getMessage()); log.error(e.getMessage());
} }
data.setCrt_datum1(caDate(data.getCrt_datum())); // data.setCrt_datum1(caDate(data.getCrt_datum()));
data.setCha_datum1(caDate(data.getCha_datum())); // data.setCha_datum1(caDate(data.getCha_datum()));
String crtdatum = data.getCrt_datum();
String crttime = data.getCrt_time();
if ("00000000".equals(crtdatum)) {
data.setCrt_datum1(null);
} else {
Date date = DateUtil.parse(crtdatum+crttime, "yyyyMMddHHmmss");
data.setCrt_datum1(date);
}
String chadatum = data.getCha_datum();
String chatime = data.getCha_time();
if ("00000000".equals(chadatum)) {
data.setCha_datum1(null);
} else {
Date date = DateUtil.parse(chadatum+chatime, "yyyyMMddHHmmss");
data.setCha_datum1(date);
}
} }
out.collect(data); out.collect(data);
} catch (Exception e) { } catch (Exception e) {
...@@ -1065,6 +1139,35 @@ public class GPServiceImpl { ...@@ -1065,6 +1139,35 @@ public class GPServiceImpl {
log.error(e.getMessage()); log.error(e.getMessage());
} }
} }
public void processVbup(String value, Collector<Vbup> out) {
try {
Vbup data = JSONUtil.toBean(value, Vbup.class);
Vbup exist = gpMapper.selectVbup(data);
if (exist != null) {
data.setExist(true); // 已经在库
}
out.collect(data);
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:Vbup:error", "processVbup", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void sinkVbup(Vbup element) {
try {
if (element.isExist() == false) {
log.debug("GPServiceImpl.sinkVbup()");
gpMapper.insertVbup(element);
}
} catch (RuntimeException e) {
redis1Template.opsForHash().put("huazheng:Vbup:error", "sinkVbup", getErrorInfoFromException(e));
log.error(e.getMessage());
} catch (Exception e) {
redis1Template.opsForHash().put("huazheng:Vbup:error", "sinkVbup", getErrorInfoFromException(e));
log.error(e.getMessage());
}
}
public void processHandover(String value, Collector<Handover> out) { public void processHandover(String value, Collector<Handover> out) {
try { try {
......
...@@ -52,6 +52,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -52,6 +52,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -59,6 +60,8 @@ import com.huazheng.project.hana.model.Zsdfhzl; ...@@ -59,6 +60,8 @@ import com.huazheng.project.hana.model.Zsdfhzl;
import com.huazheng.project.mssql.mapper.CrmMapper; import com.huazheng.project.mssql.mapper.CrmMapper;
import com.huazheng.project.mssql.model.SalesContractProcess; import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -1003,6 +1006,32 @@ public class JobServiceImpl { ...@@ -1003,6 +1006,32 @@ public class JobServiceImpl {
} }
} }
} }
public void selectVbupNew() {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap4send.lua")));
List<String> keys = Arrays.asList("huazheng:Vbup:sendcount", "huazheng:Vbup:rowids", "huazheng:list:Vbup");
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:Vbup:sendcount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:Vbup:receivecount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:Vbup:rowids", "0"); // 不存在则创建,存在则么有操作
Long sendcount = Long.valueOf(opsForValue.get("huazheng:Vbup:sendcount"));
Long receivecount = Long.valueOf(opsForValue.get("huazheng:Vbup:receivecount"));
if (sendcount - receivecount <= 20) { // 如果发送数和消费数的差小于5则往队列中写数据
String rowids = opsForValue.get("huazheng:Vbup:rowids"); // 标记id
Vbup vbup = Vbup.builder().rowids(Long.valueOf(rowids)).build();
List<Vbup> list = sapMapper.selectVbupNew(vbup);
if (!list.isEmpty()) {
list.forEach(item -> {
JSONObject json = JSONUtil.parseObj(item, false);
String execute = redis1Template.execute(script, keys, item.getRowids().toString(), json.toString());
log.info("标记时间回写 --> " + execute);
});
}
}
}
public void selectVbapNew() { public void selectVbapNew() {
DefaultRedisScript<String> script = new DefaultRedisScript<String>(); DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class); script.setResultType(String.class);
...@@ -1254,6 +1283,58 @@ public class JobServiceImpl { ...@@ -1254,6 +1283,58 @@ public class JobServiceImpl {
} }
} }
} }
public void selectSalesInquiryProcessNew() {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap4send.lua")));
List<String> keys = Arrays.asList("huazheng:SalesInquiryProcess:sendcount", "huazheng:SalesInquiryProcess:id", "huazheng:list:SalesInquiryProcess");
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:SalesInquiryProcess:sendcount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:SalesInquiryProcess:receivecount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:SalesInquiryProcess:id", "0"); // 不存在则创建,存在则么有操作
Long sendcount = Long.valueOf(opsForValue.get("huazheng:SalesInquiryProcess:sendcount"));
Long receivecount = Long.valueOf(opsForValue.get("huazheng:SalesInquiryProcess:receivecount"));
if (sendcount - receivecount <= 20) { // 如果发送数和消费数的差小于5则往队列中写数据
String id = opsForValue.get("huazheng:SalesInquiryProcess:id"); // 标记id
SalesInquiryProcess scp = SalesInquiryProcess.builder().id(id).build();
List<SalesInquiryProcess> list = crmMapper.selectSalesInquiryProcessNew(scp);
if (!list.isEmpty()) {
list.forEach(item -> {
JSONObject json = JSONUtil.parseObj(item, false);
String execute = redis1Template.execute(script, keys, item.getId(), json.toString());
log.info("标记时间回写 --> " + execute);
});
}
}
}
public void selectSalesInquiryProcessMXNew() {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap4send.lua")));
List<String> keys = Arrays.asList("huazheng:SalesInquiryProcessMX:sendcount", "huazheng:SalesInquiryProcessMX:id", "huazheng:list:SalesInquiryProcessMX");
ValueOperations<String, String> opsForValue = redis1Template.opsForValue();
opsForValue.setIfAbsent("huazheng:SalesInquiryProcessMX:sendcount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:SalesInquiryProcessMX:receivecount", "0"); // 不存在则创建,存在则么有操作
opsForValue.setIfAbsent("huazheng:SalesInquiryProcessMX:id", "0"); // 不存在则创建,存在则么有操作
Long sendcount = Long.valueOf(opsForValue.get("huazheng:SalesInquiryProcessMX:sendcount"));
Long receivecount = Long.valueOf(opsForValue.get("huazheng:SalesInquiryProcessMX:receivecount"));
if (sendcount - receivecount <= 20) { // 如果发送数和消费数的差小于5则往队列中写数据
String id = opsForValue.get("huazheng:SalesInquiryProcessMX:id"); // 标记id
SalesInquiryProcessMX scp = SalesInquiryProcessMX.builder().id(id).build();
List<SalesInquiryProcessMX> list = crmMapper.selectSalesInquiryProcessMXNew(scp);
if (!list.isEmpty()) {
list.forEach(item -> {
JSONObject json = JSONUtil.parseObj(item, false);
String execute = redis1Template.execute(script, keys, item.getId(), json.toString());
log.info("标记时间回写 --> " + execute);
});
}
}
}
public void selectSampleApplicationProcessNew() { public void selectSampleApplicationProcessNew() {
DefaultRedisScript<String> script = new DefaultRedisScript<String>(); DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class); script.setResultType(String.class);
......
package com.huazheng.project.greenplum.source.hana;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.List;
import org.apache.flink.streaming.api.functions.source.SourceFunction;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.scripting.support.ResourceScriptSource;
import org.springframework.stereotype.Service;
import com.huazheng.project.HZDataStream;
import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.log4j.Log4j2;
@Log4j2
@Service
public class VbupSource implements SourceFunction<String> {
private static final long serialVersionUID = 1L;
public String getErrorInfoFromException(Exception e) {
try {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
return "\r\n" + sw.toString() + "\r\n";
} catch (Exception e2) {
return "bad getErrorInfoFromException";
}
}
@Override
public void run(SourceContext<String> ctx) throws Exception {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap.lua")));
List<String> keys = Arrays.asList("huazheng:Vbup:sendcount", "huazheng:Vbup:id", "huazheng:list:Vbup", "huazheng:Vbup:receivecount");
while (true) {
try {
String value = HZDataStream.redis1Template.execute(script, keys, "");
String[] values = value.toString().split("==========");
String checkString = values[0];
String[] split = checkString.split(", ");
boolean check = split[0].split(":")[1].equals(split[1].split(":")[1]);
if (values.length > 1) { // 有数据字符串
// log.info(msg + " " + value.toString() + " " + check);
log.info(checkString + " " + check);
ctx.collect(values[1]);
} else { // 没有数据字符串
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
} catch (Exception e) {
HZDataStream.redis1Template.opsForHash().put("huazheng:Vbup:error", "receivecount_elseerror", getErrorInfoFromException(e));
}
}
}
@Override
public void cancel() {
}
}
package com.huazheng.project.greenplum.source.mssql;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.List;
import org.apache.flink.streaming.api.functions.source.SourceFunction;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.scripting.support.ResourceScriptSource;
import org.springframework.stereotype.Service;
import com.huazheng.project.HZDataStream;
import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.log4j.Log4j2;
@Log4j2
@Service
public class SalesInquiryProcessMXSource implements SourceFunction<String> {
private static final long serialVersionUID = 1L;
public String getErrorInfoFromException(Exception e) {
try {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
return "\r\n" + sw.toString() + "\r\n";
} catch (Exception e2) {
return "bad getErrorInfoFromException";
}
}
@Override
public void run(SourceContext<String> ctx) throws Exception {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap.lua")));
List<String> keys = Arrays.asList("huazheng:SalesInquiryProcessMX:sendcount", "huazheng:SalesInquiryProcessMX:id", "huazheng:list:SalesInquiryProcessMX", "huazheng:SalesInquiryProcessMX:receivecount");
while (true) {
try {
String value = HZDataStream.redis1Template.execute(script, keys, "");
String[] values = value.toString().split("==========");
String checkString = values[0];
String[] split = checkString.split(", ");
boolean check = split[0].split(":")[1].equals(split[1].split(":")[1]);
if (values.length > 1) { // 有数据字符串
// log.info(msg + " " + value.toString() + " " + check);
log.info(checkString + " " + check);
ctx.collect(values[1]);
} else { // 没有数据字符串
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
} catch (Exception e) {
HZDataStream.redis1Template.opsForHash().put("huazheng:SalesInquiryProcessMX:error", "receivecount_elseerror", getErrorInfoFromException(e));
}
}
}
@Override
public void cancel() {
}
}
package com.huazheng.project.greenplum.source.mssql;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Arrays;
import java.util.List;
import org.apache.flink.streaming.api.functions.source.SourceFunction;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.core.script.DefaultRedisScript;
import org.springframework.scripting.support.ResourceScriptSource;
import org.springframework.stereotype.Service;
import com.huazheng.project.HZDataStream;
import cn.hutool.core.thread.ThreadUtil;
import lombok.extern.log4j.Log4j2;
@Log4j2
@Service
public class SalesInquiryProcessSource implements SourceFunction<String> {
private static final long serialVersionUID = 1L;
public String getErrorInfoFromException(Exception e) {
try {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
return "\r\n" + sw.toString() + "\r\n";
} catch (Exception e2) {
return "bad getErrorInfoFromException";
}
}
@Override
public void run(SourceContext<String> ctx) throws Exception {
DefaultRedisScript<String> script = new DefaultRedisScript<String>();
script.setResultType(String.class);
script.setScriptSource(new ResourceScriptSource(new ClassPathResource("luascript/vbap.lua")));
List<String> keys = Arrays.asList("huazheng:SalesInquiryProcess:sendcount", "huazheng:SalesInquiryProcess:id", "huazheng:list:SalesInquiryProcess", "huazheng:SalesInquiryProcess:receivecount");
while (true) {
try {
String value = HZDataStream.redis1Template.execute(script, keys, "");
String[] values = value.toString().split("==========");
String checkString = values[0];
String[] split = checkString.split(", ");
boolean check = split[0].split(":")[1].equals(split[1].split(":")[1]);
if (values.length > 1) { // 有数据字符串
// log.info(msg + " " + value.toString() + " " + check);
log.info(checkString + " " + check);
ctx.collect(values[1]);
} else { // 没有数据字符串
ThreadUtil.sleep(1000); // 没有数据了,休眠一下
}
} catch (Exception e) {
HZDataStream.redis1Template.opsForHash().put("huazheng:SalesInquiryProcess:error", "receivecount_elseerror", getErrorInfoFromException(e));
}
}
}
@Override
public void cancel() {
}
}
...@@ -39,6 +39,7 @@ import com.huazheng.project.hana.model.Vbpa; ...@@ -39,6 +39,7 @@ import com.huazheng.project.hana.model.Vbpa;
import com.huazheng.project.hana.model.Vbrk; import com.huazheng.project.hana.model.Vbrk;
import com.huazheng.project.hana.model.Vbrp; import com.huazheng.project.hana.model.Vbrp;
import com.huazheng.project.hana.model.Vbuk; import com.huazheng.project.hana.model.Vbuk;
import com.huazheng.project.hana.model.Vbup;
import com.huazheng.project.hana.model.Zmdpc; import com.huazheng.project.hana.model.Zmdpc;
import com.huazheng.project.hana.model.Zpoedit; import com.huazheng.project.hana.model.Zpoedit;
import com.huazheng.project.hana.model.Zsd06; import com.huazheng.project.hana.model.Zsd06;
...@@ -58,6 +59,7 @@ public interface SapMapper { ...@@ -58,6 +59,7 @@ public interface SapMapper {
public List<S066> selectS066New(S066 s066); public List<S066> selectS066New(S066 s066);
public List<S067> selectS067New(S067 s067); public List<S067> selectS067New(S067 s067);
public List<Vbuk> selectVbukNew(Vbuk vbuk); public List<Vbuk> selectVbukNew(Vbuk vbuk);
public List<Vbup> selectVbupNew(Vbup vbup);
public List<Likp> selectLikpNew(Likp likp); public List<Likp> selectLikpNew(Likp likp);
public List<Konv> selectKonvNew(Konv konv); public List<Konv> selectKonvNew(Konv konv);
public List<Lips> selectLipsNew(Lips lips); public List<Lips> selectLipsNew(Lips lips);
...@@ -112,6 +114,7 @@ public interface SapMapper { ...@@ -112,6 +114,7 @@ public interface SapMapper {
public List<Konv> cascadeKonvByVbak(Vbak vbak); public List<Konv> cascadeKonvByVbak(Vbak vbak);
public List<Makt> cascadeMaktByMara(Mara mara); public List<Makt> cascadeMaktByMara(Mara mara);
public List<Vbuk> cascadeVbukByLips(Lips lips); public List<Vbuk> cascadeVbukByLips(Lips lips);
public List<Vbup> cascadeVbupByLips(Lips lips);
public List<Zpoedit> cascadeZpoeditByAufk(Aufk aufk); public List<Zpoedit> cascadeZpoeditByAufk(Aufk aufk);
public List<Bsad> cascadeBsadByBkpf(Bkpf bkpf); public List<Bsad> cascadeBsadByBkpf(Bkpf bkpf);
public List<Bsid> cascadeBsidByBkpf(Bkpf bkpf); public List<Bsid> cascadeBsidByBkpf(Bkpf bkpf);
...@@ -149,6 +152,7 @@ public interface SapMapper { ...@@ -149,6 +152,7 @@ public interface SapMapper {
public Vbrk selectVbrkById(Vbrk target); public Vbrk selectVbrkById(Vbrk target);
public Vbrp selectVbrpById(Vbrp target); public Vbrp selectVbrpById(Vbrp target);
public Vbuk selectVbukById(Vbuk target); public Vbuk selectVbukById(Vbuk target);
public Vbup selectVbupById(Vbup target);
public Zmdpc selectZmdpcById(Zmdpc target); public Zmdpc selectZmdpcById(Zmdpc target);
public Zsd06 selectZsd06ById(Zsd06 target); public Zsd06 selectZsd06ById(Zsd06 target);
public Zsdfhzl selectZsdfhzlById(Zsdfhzl target); public Zsdfhzl selectZsdfhzlById(Zsdfhzl target);
......
package com.huazheng.project.hana.model;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* 销售凭证 : 项目状态
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
public class Vbup implements Serializable {
private static final long serialVersionUID = 1L;
private String mandt; // 集团
private String vbeln; // 销售和分销凭证号
private String posnr; // 销售和分销凭证的项目号
private String besta; // 凭证项目的确认状态
private String lfsta; // 交货状态
private String lfgsa; // 项目的总交货状态
private String wbsta; // 货物移动状态
private Long rowids; // sap那边的rowid
private boolean exist; // 用于标记,不是字段
private String hashResult; // 数据hash标记
private String rowNum; // 用于标记,不是字段
}
...@@ -6,6 +6,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess; ...@@ -6,6 +6,8 @@ import com.huazheng.project.mssql.model.SalesContractProcess;
import com.huazheng.project.mssql.model.SalesContractProcessMX; import com.huazheng.project.mssql.model.SalesContractProcessMX;
import com.huazheng.project.mssql.model.SalesForecastProcess; import com.huazheng.project.mssql.model.SalesForecastProcess;
import com.huazheng.project.mssql.model.SalesForecastProcessMX; import com.huazheng.project.mssql.model.SalesForecastProcessMX;
import com.huazheng.project.mssql.model.SalesInquiryProcess;
import com.huazheng.project.mssql.model.SalesInquiryProcessMX;
import com.huazheng.project.mssql.model.SampleApplicationProcess; import com.huazheng.project.mssql.model.SampleApplicationProcess;
import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi; import com.huazheng.project.mssql.model.SampleApplicationProcessMingXi;
import com.huazheng.project.mssql.model.SampleClosingProcess; import com.huazheng.project.mssql.model.SampleClosingProcess;
...@@ -17,6 +19,10 @@ public interface CrmMapper { ...@@ -17,6 +19,10 @@ public interface CrmMapper {
public List<SalesForecastProcess> selectSalesForecastProcessNew(SalesForecastProcess sfp); public List<SalesForecastProcess> selectSalesForecastProcessNew(SalesForecastProcess sfp);
public List<SampleApplicationProcess> selectSampleApplicationProcessNew(SampleApplicationProcess scp); public List<SampleApplicationProcess> selectSampleApplicationProcessNew(SampleApplicationProcess scp);
public List<SampleApplicationProcessMingXi> selectSampleApplicationProcessMingXiNew(SampleApplicationProcessMingXi scp); public List<SampleApplicationProcessMingXi> selectSampleApplicationProcessMingXiNew(SampleApplicationProcessMingXi scp);
public List<SalesInquiryProcess> selectSalesInquiryProcessNew(SalesInquiryProcess sip);
public List<SalesInquiryProcessMX> selectSalesInquiryProcessMXNew(SalesInquiryProcessMX sip);
public List<SampleClosingProcess> selectSampleClosingProcessNew(SampleClosingProcess scp); public List<SampleClosingProcess> selectSampleClosingProcessNew(SampleClosingProcess scp);
public List<SampleClosingProcessMingXi> selectSampleClosingProcessMingXiNew(SampleClosingProcessMingXi scp); public List<SampleClosingProcessMingXi> selectSampleClosingProcessMingXiNew(SampleClosingProcessMingXi scp);
...@@ -28,12 +34,14 @@ public interface CrmMapper { ...@@ -28,12 +34,14 @@ public interface CrmMapper {
public List<SalesContractProcess> selectSalesContractProcessCheckByUpdate(SalesContractProcess scp); public List<SalesContractProcess> selectSalesContractProcessCheckByUpdate(SalesContractProcess scp);
public List<SalesForecastProcess> selectSalesForecastProcessCheckByUpdate(SalesForecastProcess sfp); public List<SalesForecastProcess> selectSalesForecastProcessCheckByUpdate(SalesForecastProcess sfp);
public List<SampleApplicationProcess> selectSampleApplicationProcessCheckByUpdate(SampleApplicationProcess scp); public List<SampleApplicationProcess> selectSampleApplicationProcessCheckByUpdate(SampleApplicationProcess scp);
public List<SalesInquiryProcess> selectSalesInquiryProcessCheckByUpdate(SalesInquiryProcess sip);
public List<SampleClosingProcess> selectSampleClosingProcessCheckByUpdate(SampleClosingProcess scp); public List<SampleClosingProcess> selectSampleClosingProcessCheckByUpdate(SampleClosingProcess scp);
// 按天更新的级联 // 按天更新的级联
public List<SalesContractProcessMX> cascadeSalesContractProcessMXBySalesContractProcess(SalesContractProcess source); public List<SalesContractProcessMX> cascadeSalesContractProcessMXBySalesContractProcess(SalesContractProcess source);
public List<SalesForecastProcessMX> cascadeSalesForecastProcessMXBySalesForecastProcess(SalesForecastProcess source); public List<SalesForecastProcessMX> cascadeSalesForecastProcessMXBySalesForecastProcess(SalesForecastProcess source);
public List<SampleApplicationProcessMingXi> cascadeSampleApplicationProcessMingXiBySampleApplicationProcess(SampleApplicationProcess source); public List<SampleApplicationProcessMingXi> cascadeSampleApplicationProcessMingXiBySampleApplicationProcess(SampleApplicationProcess source);
public List<SalesInquiryProcessMX> cascadeSalesInquiryProcessMXBySalesInquiryProcess(SalesInquiryProcess source);
public List<SampleClosingProcessMingXi> cascadeSampleClosingProcessMingXiBySampleClosingProcess(SampleClosingProcess source); public List<SampleClosingProcessMingXi> cascadeSampleClosingProcessMingXiBySampleClosingProcess(SampleClosingProcess source);
...@@ -48,7 +56,7 @@ public interface CrmMapper { ...@@ -48,7 +56,7 @@ public interface CrmMapper {
public SampleApplicationProcessMingXi selectSampleApplicationProcessMingXiById(SampleApplicationProcessMingXi target); public SampleApplicationProcessMingXi selectSampleApplicationProcessMingXiById(SampleApplicationProcessMingXi target);
public SampleClosingProcess selectSampleClosingProcessById(SampleClosingProcess target); public SampleClosingProcess selectSampleClosingProcessById(SampleClosingProcess target);
public SampleClosingProcessMingXi selectSampleClosingProcessMingXiById(SampleClosingProcessMingXi target); public SampleClosingProcessMingXi selectSampleClosingProcessMingXiById(SampleClosingProcessMingXi target);
public SalesInquiryProcess selectSalesInquiryProcessById(SalesInquiryProcess target);
public SalesInquiryProcessMX selectSalesInquiryProcessMXById(SalesInquiryProcessMX target);
} }
...@@ -30,6 +30,8 @@ public class SalesContractProcessMX implements Serializable { ...@@ -30,6 +30,8 @@ public class SalesContractProcessMX implements Serializable {
private String wuliaoh; // 物料号 private String wuliaoh; // 物料号
private String hetongmll; //合同毛利率
private Vbap vbap; private Vbap vbap;
private boolean exist; // 用于标记,不是字段 private boolean exist; // 用于标记,不是字段
......
package com.huazheng.project.mssql.model;
import java.io.Serializable;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* 销售询报价流程
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
public class SalesInquiryProcess implements Serializable {
private static final long serialVersionUID = 1L;
private String id; // 主键
private String sys_processname; // 流程名称
private Integer sys_incident; // 实例号
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // 页面写入数据库时格式化
@JSONField(format="yyyy-MM-dd HH:mm:ss") // 数据库导出页面时json格式化
private String sys_starttime; // 发起时间
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // 页面写入数据库时格式化
@JSONField(format="yyyy-MM-dd HH:mm:ss") // 数据库导出页面时json格式化
private String sys_updatetime; // 办结时间
private Integer sys_incstatus; // 状态
private String kehubm; // 客户编码
private String bibiev; // 货币类型
private boolean exist; // 用于标记,不是字段
private String hashResult; // 数据hash标记
private String rowNum; // 用于标记,不是字段
}
package com.huazheng.project.mssql.model;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* 销售询报价流程明细
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
public class SalesInquiryProcessMX implements Serializable {
private static final long serialVersionUID = 1L;
private String id; // 主键
private Integer sys_incident; // 实例号
private String wuliaoh; // 物料号
private String chicun; // 尺寸
private String chengben; // 成本
private String baojiamll; // 报价毛利率
private String biaozhunml; // 标准毛利率
private boolean exist; // 用于标记,不是字段
private String hashResult; // 数据hash标记
private String rowNum; // 用于标记,不是字段
}
...@@ -3,6 +3,10 @@ package com.huazheng.project.mssql.model; ...@@ -3,6 +3,10 @@ package com.huazheng.project.mssql.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -42,6 +46,10 @@ public class SampleApplicationProcess implements Serializable { ...@@ -42,6 +46,10 @@ public class SampleApplicationProcess implements Serializable {
private String ziSHiYBv; // 子事业部 private String ziSHiYBv; // 子事业部
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // 页面写入数据库时格式化
@JSONField(format="yyyy-MM-dd HH:mm:ss") // 数据库导出页面时json格式化
private String sys_starttime;// 发起时间
private boolean exist; // 用于标记,不是字段 private boolean exist; // 用于标记,不是字段
private String hashResult; // 数据hash标记 private String hashResult; // 数据hash标记
private String rowNum; // 用于标记,不是字段 private String rowNum; // 用于标记,不是字段
......
...@@ -29,7 +29,7 @@ public class SampleClosingProcess implements Serializable { ...@@ -29,7 +29,7 @@ public class SampleClosingProcess implements Serializable {
private Integer sYS_INCIDENT ; // 流程编号 private Integer sYS_INCIDENT ; // 流程编号
private String yangPinSQSLH ; // 样品申请实例号 private String yangPinSQSLH ; // 样品申请实例号
private Integer yangPinSQSLHi; // 不从源库种读取,处理过程中转换 private Integer yangPinSQSLHi;
private Integer sYS_INCSTATUS; private Integer sYS_INCSTATUS;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // 页面写入数据库时格式化 @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // 页面写入数据库时格式化
......
...@@ -25,6 +25,7 @@ public class SampleClosingProcessMingXi implements Serializable { ...@@ -25,6 +25,7 @@ public class SampleClosingProcessMingXi implements Serializable {
private Integer sYS_INCIDENT; // 流程编号 private Integer sYS_INCIDENT; // 流程编号
private String shiFouTGv ; // 样品结果(数字值) private String shiFouTGv ; // 样品结果(数字值)
private String shiFouTGt ; // 样品结果(文本值) private String shiFouTGt ; // 样品结果(文本值)
private String hangxiangmh; // 行项目号
private boolean exist; // 用于标记,不是字段 private boolean exist; // 用于标记,不是字段
private String hashResult; // 数据hash标记 private String hashResult; // 数据hash标记
......
drop table vbup;
CREATE TABLE vbup (
mandt text,
vbeln text,
posnr text,
besta text,
lfsta text,
lfgsa text,
wbsta text,
PRIMARY KEY (mandt, vbeln, posnr)
)
Distributed by (mandt, vbeln, posnr);
alter table vbuk add column hashResult text;
alter table vbuk add column rowNum serial;
drop table SalesInquiryProcess;
CREATE TABLE SalesInquiryProcess (
id text,
sys_processname text,
sys_incident integer,
sys_starttime timestamp,
sys_updatetime timestamp,
sys_incstatus integer,
kehubm text,
bibiev text,
hashResult text,
rowNum serial,
PRIMARY KEY (id)
)
Distributed by (id);
drop table SalesInquiryProcessMX;
CREATE TABLE SalesInquiryProcessMX (
id text,
sys_incident integer,
wuliaoh text,
chicun text,
chengben text,
baojiamll text,
biaozhunml text,
hashResult text,
rowNum serial,
PRIMARY KEY (id)
)
Distributed by (id);
...@@ -23,3 +23,5 @@ alter table SampleApplicationProcess add column pCBCS2chanPinYY text; ...@@ -23,3 +23,5 @@ alter table SampleApplicationProcess add column pCBCS2chanPinYY text;
alter table SampleApplicationProcess add column ziSHiYBv text; alter table SampleApplicationProcess add column ziSHiYBv text;
alter table SampleApplicationProcess add column sys_incstatus text; alter table SampleApplicationProcess add column sys_incstatus text;
alter table SampleApplicationProcess add column xiaoShouBMv text; alter table SampleApplicationProcess add column xiaoShouBMv text;
alter table SampleApplicationProcess add column sys_starttime timestamp;
...@@ -9,3 +9,5 @@ rowNum serial, ...@@ -9,3 +9,5 @@ rowNum serial,
PRIMARY KEY (id) PRIMARY KEY (id)
) )
Distributed by (id); Distributed by (id);
alter table SampleClosingProcessMingXi add column hangxiangmh text;
\ No newline at end of file
...@@ -13,3 +13,4 @@ alter table SalesContractProcessMX add column rowNum serial; ...@@ -13,3 +13,4 @@ alter table SalesContractProcessMX add column rowNum serial;
alter table SalesContractProcessMX add column zongjia text; alter table SalesContractProcessMX add column zongjia text;
alter table SalesContractProcessMX add column maolibz text; alter table SalesContractProcessMX add column maolibz text;
alter table SalesContractProcessMX add column wuliaoh text; alter table SalesContractProcessMX add column wuliaoh text;
alter table SalesContractProcessMX add column hetongmll text;
...@@ -233,14 +233,14 @@ ...@@ -233,14 +233,14 @@
select * from SalesContractProcessMX where id = #{id} select * from SalesContractProcessMX where id = #{id}
</select> </select>
<insert id="insertSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX"> <insert id="insertSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX">
insert into SalesContractProcessMX (id, chengben, sysIncident, zongjia, maolibz, wuliaoh, hashResult) values(#{id}, #{chengben}, #{sysIncident}, #{zongjia}, #{maolibz}, #{wuliaoh}, #{hashResult}) insert into SalesContractProcessMX (id, chengben, sysIncident, zongjia, maolibz, wuliaoh, hetongmll, hashResult) values(#{id}, #{chengben}, #{sysIncident}, #{zongjia}, #{maolibz}, #{wuliaoh}, #{hetongmll}, #{hashResult})
</insert> </insert>
<delete id="deleteSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX"> <delete id="deleteSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX">
delete from SalesContractProcessMX where id = #{id} delete from SalesContractProcessMX where id = #{id}
</delete> </delete>
<update id="updateSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX"> <update id="updateSalesContractProcessMX" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX">
update SalesContractProcessMX set update SalesContractProcessMX set
id = #{id}, chengben = #{chengben}, sysIncident = #{sysIncident}, zongjia = #{zongjia}, maolibz = #{maolibz}, wuliaoh = #{wuliaoh}, hashResult = #{hashResult} id = #{id}, chengben = #{chengben}, sysIncident = #{sysIncident}, zongjia = #{zongjia}, maolibz = #{maolibz}, wuliaoh = #{wuliaoh}, hetongmll = #{hetongmll}, hashResult = #{hashResult}
where id = #{id} where id = #{id}
</update> </update>
<select id="selectSalesContractProcessMXCheck" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX" resultType="com.huazheng.project.mssql.model.SalesContractProcessMX"> <select id="selectSalesContractProcessMXCheck" parameterType="com.huazheng.project.mssql.model.SalesContractProcessMX" resultType="com.huazheng.project.mssql.model.SalesContractProcessMX">
...@@ -300,9 +300,9 @@ ...@@ -300,9 +300,9 @@
</select> </select>
<insert id="insertSampleApplicationProcess" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess"> <insert id="insertSampleApplicationProcess" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess">
insert into SampleApplicationProcess (id, dingDanLXv, dingDanLXt, sYS_INCIDENT, yeWuYID, xuFangGS, xuFangGSID, insert into SampleApplicationProcess (id, dingDanLXv, dingDanLXt, sYS_INCIDENT, yeWuYID, xuFangGS, xuFangGSID,
yangPinLXv, yangPinLXt, pCBCS, chanPinYY, jiFuBZ, sYS_UPDATETIME,pCBCS2chanPinYY, ziSHiYBv, sys_incstatus, xiaoShouBMv, hashResult) yangPinLXv, yangPinLXt, pCBCS, chanPinYY, jiFuBZ, sYS_UPDATETIME,pCBCS2chanPinYY, ziSHiYBv, sys_incstatus, xiaoShouBMv, sys_starttime, hashResult)
values(#{id}, #{dingDanLXv}, #{dingDanLXt}, #{sYS_INCIDENT}, #{yeWuYID}, #{xuFangGS}, #{xuFangGSID}, values(#{id}, #{dingDanLXv}, #{dingDanLXt}, #{sYS_INCIDENT}, #{yeWuYID}, #{xuFangGS}, #{xuFangGSID},
#{yangPinLXv}, #{yangPinLXt}, #{pCBCS}, #{chanPinYY}, #{jiFuBZ}, #{sYS_UPDATETIME},#{pCBCS2chanPinYY},#{ziSHiYBv},#{sys_incstatus},#{xiaoShouBMv},#{hashResult}) #{yangPinLXv}, #{yangPinLXt}, #{pCBCS}, #{chanPinYY}, #{jiFuBZ}, #{sYS_UPDATETIME},#{pCBCS2chanPinYY},#{ziSHiYBv},#{sys_incstatus},#{xiaoShouBMv},#{sys_starttime},#{hashResult})
</insert> </insert>
<delete id="deleteSampleApplicationProcess" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess"> <delete id="deleteSampleApplicationProcess" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess">
delete from SampleApplicationProcess where id = #{id} delete from SampleApplicationProcess where id = #{id}
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
update SampleApplicationProcess set update SampleApplicationProcess set
dingDanLXv = #{dingDanLXv}, dingDanLXt = #{dingDanLXt}, sYS_INCIDENT = #{sYS_INCIDENT}, yeWuYID = #{yeWuYID}, xuFangGS = #{xuFangGS}, xuFangGSID = #{xuFangGSID}, dingDanLXv = #{dingDanLXv}, dingDanLXt = #{dingDanLXt}, sYS_INCIDENT = #{sYS_INCIDENT}, yeWuYID = #{yeWuYID}, xuFangGS = #{xuFangGS}, xuFangGSID = #{xuFangGSID},
yangPinLXv = #{yangPinLXv}, yangPinLXt = #{yangPinLXt}, pCBCS = #{pCBCS}, chanPinYY = #{chanPinYY}, jiFuBZ = #{jiFuBZ}, yangPinLXv = #{yangPinLXv}, yangPinLXt = #{yangPinLXt}, pCBCS = #{pCBCS}, chanPinYY = #{chanPinYY}, jiFuBZ = #{jiFuBZ},
sYS_UPDATETIME = #{sYS_UPDATETIME},pCBCS2chanPinYY=#{pCBCS2chanPinYY},ziSHiYBv=#{ziSHiYBv}, sys_incstatus=#{sys_incstatus}, xiaoShouBMv=#{xiaoShouBMv}, hashResult = #{hashResult} sYS_UPDATETIME = #{sYS_UPDATETIME},pCBCS2chanPinYY=#{pCBCS2chanPinYY},ziSHiYBv=#{ziSHiYBv}, sys_incstatus=#{sys_incstatus}, xiaoShouBMv=#{xiaoShouBMv}, sys_starttime=#{sys_starttime}, hashResult = #{hashResult}
where id = #{id} where id = #{id}
</update> </update>
<select id="selectSampleApplicationProcessCheck" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess" resultType="com.huazheng.project.mssql.model.SampleApplicationProcess"> <select id="selectSampleApplicationProcessCheck" parameterType="com.huazheng.project.mssql.model.SampleApplicationProcess" resultType="com.huazheng.project.mssql.model.SampleApplicationProcess">
...@@ -349,6 +349,48 @@ ...@@ -349,6 +349,48 @@
select max(rowNum) from SampleApplicationProcessMingXi select max(rowNum) from SampleApplicationProcessMingXi
</select> </select>
<select id="selectSalesInquiryProcess" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcess" resultType="com.huazheng.project.mssql.model.SalesInquiryProcess">
select * from SalesInquiryProcess where id = #{id}
</select>
<insert id="insertSalesInquiryProcess" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcess">
insert into SalesInquiryProcess (id, sys_processname, sys_incident, sys_starttime, sys_updatetime, sys_incstatus, kehubm,
bibiev, hashResult)
values(#{id}, #{sys_processname}, #{sys_incident}, #{sys_starttime}, #{sys_updatetime}, #{sys_incstatus}, #{kehubm},
#{bibiev},#{hashResult})
</insert>
<delete id="deleteSalesInquiryProcess" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcess">
delete from SalesInquiryProcess where id = #{id}
</delete>
<update id="updateSalesInquiryProcess" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcess">
update SalesInquiryProcess set
sys_processname = #{sys_processname}, sys_incident = #{sys_incident}, sys_starttime = #{sys_starttime}, sys_updatetime = #{sys_updatetime}, sys_incstatus = #{sys_incstatus},
kehubm = #{kehubm}, bibiev = #{bibiev}, hashResult = #{hashResult}
where id = #{id}
</update>
<select id="selectSalesInquiryProcessCheck" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcess" resultType="com.huazheng.project.mssql.model.SalesInquiryProcess">
select * from SalesInquiryProcess where rownum &gt; #{rowNum} order by rownum limit 20
</select>
<select id="selectSalesInquiryProcessMX" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcessMX" resultType="com.huazheng.project.mssql.model.SalesInquiryProcessMX">
select * from SalesInquiryProcessMX where id = #{id}
</select>
<insert id="insertSalesInquiryProcessMX" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcessMX">
insert into SalesInquiryProcessMX (id,sys_incident,wuliaoh,chicun,chengben,baojiamll,biaozhunml,hashResult)
values(#{id},#{sys_incident},#{wuliaoh},#{chicun},#{chengben},#{baojiamll},#{biaozhunml},#{hashResult})
</insert>
<delete id="deleteSalesInquiryProcessMX" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcessMX">
delete from SalesInquiryProcessMX where id = #{id}
</delete>
<update id="updateSalesInquiryProcessMX" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcessMX">
update SalesInquiryProcessMX set
sys_incident=#{sys_incident},wuliaoh=#{wuliaoh},chicun=#{chicun},chengben=#{chengben},baojiamll=#{baojiamll},
biaozhunml=#{biaozhunml},hashResult=#{hashResult}
where id = #{id}
</update>
<select id="selectSalesInquiryProcessMXCheck" parameterType="com.huazheng.project.mssql.model.SalesInquiryProcessMX" resultType="com.huazheng.project.mssql.model.SalesInquiryProcessMX">
select * from SalesInquiryProcessMX where rownum &gt; #{rowNum} order by rownum limit 20
</select>
...@@ -386,20 +428,25 @@ ...@@ -386,20 +428,25 @@
select * from SampleClosingProcessMingXi where id = #{id} select * from SampleClosingProcessMingXi where id = #{id}
</select> </select>
<insert id="insertSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi"> <insert id="insertSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi">
insert into SampleClosingProcessMingXi (id,sYS_INCIDENT,shiFouTGv,shiFouTGt,hashResult) insert into SampleClosingProcessMingXi (id,sYS_INCIDENT,shiFouTGv,shiFouTGt,hangxiangmh,hashResult)
values(#{id},#{sYS_INCIDENT},#{shiFouTGv},#{shiFouTGt},#{hashResult}) values(#{id},#{sYS_INCIDENT},#{shiFouTGv},#{shiFouTGt},#{hangxiangmh},#{hashResult})
</insert> </insert>
<delete id="deleteSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi"> <delete id="deleteSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi">
delete from SampleClosingProcessMingXi where id = #{id} delete from SampleClosingProcessMingXi where id = #{id}
</delete> </delete>
<update id="updateSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi"> <update id="updateSampleClosingProcessMingXi" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi">
update SampleClosingProcessMingXi set update SampleClosingProcessMingXi set
sYS_INCIDENT=#{sYS_INCIDENT},shiFouTGv=#{shiFouTGv},shiFouTGt=#{shiFouTGt},hashResult=#{hashResult} sYS_INCIDENT=#{sYS_INCIDENT},shiFouTGv=#{shiFouTGv},shiFouTGt=#{shiFouTGt},hangxiangmh=#{hangxiangmh},hashResult=#{hashResult}
where id = #{id} where id = #{id}
</update> </update>
<select id="selectSampleClosingProcessMingXiCheck" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi" resultType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi"> <select id="selectSampleClosingProcessMingXiCheck" parameterType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi" resultType="com.huazheng.project.mssql.model.SampleClosingProcessMingXi">
select * from SampleClosingProcessMingXi where rownum &gt; #{rowNum} order by rownum limit 20 select * from SampleClosingProcessMingXi where rownum &gt; #{rowNum} order by rownum limit 20
</select> </select>
<select id="selectSampleClosingProcessMingXiMaxRowNum" resultType="long">
select max(rowNum) from SampleClosingProcessMingXi
</select>
<select id="selectTKeHu" parameterType="com.huazheng.project.mssql2.model.TKeHu" resultType="com.huazheng.project.mssql2.model.TKeHu"> <select id="selectTKeHu" parameterType="com.huazheng.project.mssql2.model.TKeHu" resultType="com.huazheng.project.mssql2.model.TKeHu">
select * from TKeHu where keHuID = #{keHuID} select * from TKeHu where keHuID = #{keHuID}
...@@ -1220,6 +1267,25 @@ ...@@ -1220,6 +1267,25 @@
select * from Vbuk where rownum &gt; #{rowNum} order by rownum limit 20 select * from Vbuk where rownum &gt; #{rowNum} order by rownum limit 20
</select> </select>
<select id="selectVbup" parameterType="com.huazheng.project.hana.model.Vbup" resultType="com.huazheng.project.hana.model.Vbup">
select * from Vbup where vbeln = #{vbeln} and posnr = #{posnr} and mandt = #{mandt}
</select>
<insert id="insertVbup" parameterType="com.huazheng.project.hana.model.Vbup">
insert into Vbup (mandt, vbeln, posnr, besta, lfsta, lfgsa, wbsta, hashResult)
values(#{mandt}, #{vbeln}, #{posnr}, #{besta}, #{lfsta}, #{lfgsa}, #{wbsta}, #{hashResult})
</insert>
<delete id="deleteVbup" parameterType="com.huazheng.project.hana.model.Vbup">
delete from Vbup where vbeln = #{vbeln} and posnr = #{posnr} and mandt = #{mandt}
</delete>
<update id="updateVbup" parameterType="com.huazheng.project.hana.model.Vbup">
update Vbup set
mandt = #{mandt}, vbeln = #{vbeln}, posnr = #{posnr}, besta = #{besta}, lfsta = #{lfsta}, lfgsa = #{lfgsa}, wbsta = #{wbsta}, hashResult = #{hashResult}
where vbeln = #{vbeln} and posnr = #{posnr} and mandt = #{mandt}
</update>
<select id="selectVbupCheck" parameterType="com.huazheng.project.hana.model.Vbup" resultType="com.huazheng.project.hana.model.Vbup">
select * from Vbup where rownum &gt; #{rowNum} order by rownum limit 20
</select>
<select id="selectZmdpc" parameterType="com.huazheng.project.hana.model.Zmdpc" resultType="com.huazheng.project.hana.model.Zmdpc"> <select id="selectZmdpc" parameterType="com.huazheng.project.hana.model.Zmdpc" resultType="com.huazheng.project.hana.model.Zmdpc">
select * from Zmdpc select * from Zmdpc
where vbeln = #{vbeln} and posnr = #{posnr} and mandt = #{mandt} where vbeln = #{vbeln} and posnr = #{posnr} and mandt = #{mandt}
...@@ -1266,6 +1332,11 @@ ...@@ -1266,6 +1332,11 @@
<select id="selectZsd06Check" parameterType="com.huazheng.project.hana.model.Zsd06" resultType="com.huazheng.project.hana.model.Zsd06"> <select id="selectZsd06Check" parameterType="com.huazheng.project.hana.model.Zsd06" resultType="com.huazheng.project.hana.model.Zsd06">
select * from Zsd06 where rownum &gt; #{rowNum} order by rownum limit 20 select * from Zsd06 where rownum &gt; #{rowNum} order by rownum limit 20
</select> </select>
<select id="selectZsd06MaxRowNum" resultType="long">
select max(rowNum) from Zsd06
</select>
<select id="selectZsdfhzl" parameterType="com.huazheng.project.hana.model.Zsdfhzl" resultType="com.huazheng.project.hana.model.Zsdfhzl"> <select id="selectZsdfhzl" parameterType="com.huazheng.project.hana.model.Zsdfhzl" resultType="com.huazheng.project.hana.model.Zsdfhzl">
select * from Zsdfhzl select * from Zsdfhzl
......
...@@ -105,6 +105,15 @@ ...@@ -105,6 +105,15 @@
where "$rowid$" &gt; #{rowids} ${hana_mandt} where "$rowid$" &gt; #{rowids} ${hana_mandt}
order by "$rowid$" order by "$rowid$"
</select> </select>
<select id="selectVbupNew" parameterType="Vbup" resultType="Vbup">
select top 20 "$rowid$" as rowids,
mandt, vbeln, posnr, besta, lfsta, lfgsa, wbsta
from ${hana_user}.vbup
where "$rowid$" &gt; #{rowids} ${hana_mandt}
order by "$rowid$"
</select>
<select id="selectLikpNew" parameterType="Likp" resultType="Likp"> <select id="selectLikpNew" parameterType="Likp" resultType="Likp">
select top 20 "$rowid$" as rowids, select top 20 "$rowid$" as rowids,
vbeln, mandt, erdat, wadat_ist, ctlpc, kunnr, aedat,lfuhr vbeln, mandt, erdat, wadat_ist, ctlpc, kunnr, aedat,lfuhr
...@@ -481,6 +490,14 @@ ...@@ -481,6 +490,14 @@
from ${hana_user}.vbuk from ${hana_user}.vbuk
where vbeln = #{vbeln} ${hana_mandt} where vbeln = #{vbeln} ${hana_mandt}
</select> </select>
<select id="cascadeVbupByLips" parameterType="Lips" resultType="Vbup">
select
mandt, vbeln, posnr, besta, lfsta, lfgsa, wbsta
from ${hana_user}.vbup
where vbeln=#{vbeln} and posnr=#{posnr} ${hana_mandt}
</select>
<select id="cascadeZpoeditByAufk" parameterType="Aufk" resultType="Zpoedit"> <select id="cascadeZpoeditByAufk" parameterType="Aufk" resultType="Zpoedit">
select select
mandt, pwerk, aufnr, reason mandt, pwerk, aufnr, reason
...@@ -699,6 +716,13 @@ ...@@ -699,6 +716,13 @@
from ${hana_user}.vbuk from ${hana_user}.vbuk
where vbeln = #{vbeln} and mandt = '800' where vbeln = #{vbeln} and mandt = '800'
</select> </select>
<select id="selectVbupById" parameterType="Vbup" resultType="Vbup">
select mandt, vbeln, posnr, besta, lfsta, lfgsa, wbsta
from ${hana_user}.vbup
where vbeln = #{vbeln} and posnr = #{posnr} and mandt = '800'
</select>
<select id="selectZmdpcById" parameterType="Zmdpc" resultType="Zmdpc"> <select id="selectZmdpcById" parameterType="Zmdpc" resultType="Zmdpc">
select vbeln,posnr,f_plant,plant,x_plant,mandt select vbeln,posnr,f_plant,plant,x_plant,mandt
from ${hana_user}.Zmdpc from ${hana_user}.Zmdpc
......
...@@ -28,13 +28,22 @@ ...@@ -28,13 +28,22 @@
<select id="selectSampleApplicationProcessNew" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess"> <select id="selectSampleApplicationProcessNew" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess">
select top 20 select top 20
id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID, id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID,
yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv,sys_starttime
from "Biz_样品申请流程" from "Biz_样品申请流程"
where id &gt; #{id} where id &gt; #{id}
</select> </select>
<select id="selectSalesInquiryProcessNew" parameterType="SalesInquiryProcess" resultType="SalesInquiryProcess">
select top 20
id,sys_processname,sys_incident,sys_starttime,sys_updatetime,sys_incstatus,kehubm,bibiev
from "Biz_销售询报价流程"
where id &gt; #{id}
</select>
<select id="selectSampleClosingProcessNew" parameterType="SampleClosingProcess" resultType="SampleClosingProcess"> <select id="selectSampleClosingProcessNew" parameterType="SampleClosingProcess" resultType="SampleClosingProcess">
select top 20 select top 20
id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime, CASE
WHEN yangPinSQSLH = '' THEN null
ELSE yangPinSQSLH
END AS yangPinSQSLH1
from "Biz_样品结案流程" from "Biz_样品结案流程"
where id &gt; #{id} where id &gt; #{id}
</select> </select>
...@@ -45,15 +54,21 @@ ...@@ -45,15 +54,21 @@
from "Biz_样品申请流程_MingXi" from "Biz_样品申请流程_MingXi"
where id &gt; #{id} where id &gt; #{id}
</select> </select>
<select id="selectSalesInquiryProcessMXNew" parameterType="SalesInquiryProcessMX" resultType="SalesInquiryProcessMX">
select top 20
id,sys_incident,wuliaoh,chicun,chengben,baojiamll, biaozhunml
from "Biz_销售询报价流程_MX"
where id &gt; #{id}
</select>
<select id="selectSampleClosingProcessMingXiNew" parameterType="SampleClosingProcessMingXi" resultType="SampleClosingProcessMingXi"> <select id="selectSampleClosingProcessMingXiNew" parameterType="SampleClosingProcessMingXi" resultType="SampleClosingProcessMingXi">
select top 20 select top 20
id,sYS_INCIDENT,shiFouTGv,shiFouTGt id,sYS_INCIDENT,shiFouTGv,shiFouTGt,hangxiangmh
from "Biz_样品结案流程_MingXi" from "Biz_样品结案流程_MingXi"
where id &gt; #{id} where id &gt; #{id}
</select> </select>
<!-- process中的关联查询 --> <!-- process中的关联查询 -->
<select id="selectSalesContractProcessMX" parameterType="SalesContractProcess" resultType="SalesContractProcessMX"> <select id="selectSalesContractProcessMX" parameterType="SalesContractProcess" resultType="SalesContractProcessMX">
select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh, convert(varchar(50),Round(hetongmll,2)) + '%' as hetongmll
from "Biz_销售合同流程_MX" from "Biz_销售合同流程_MX"
where SYS_INCIDENT = #{sysIncident} where SYS_INCIDENT = #{sysIncident}
</select> </select>
...@@ -93,14 +108,24 @@ ...@@ -93,14 +108,24 @@
<select id="selectSampleApplicationProcessCheckByUpdate" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess"> <select id="selectSampleApplicationProcessCheckByUpdate" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess">
select top 20 select top 20
id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID, id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID,
yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv,sys_starttime
from "Biz_样品申请流程" from "Biz_样品申请流程"
where id &gt; #{id} where id &gt; #{id}
and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120) and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
</select> </select>
<select id="selectSalesInquiryProcessCheckByUpdate" parameterType="SalesInquiryProcess" resultType="SalesInquiryProcess">
select top 20
id,sys_processname,sys_incident,sys_starttime,sys_updatetime,sys_incstatus,kehubm,bibiev
from "Biz_销售询报价流程"
where id &gt; #{id}
and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
</select>
<select id="selectSampleClosingProcessCheckByUpdate" parameterType="SampleClosingProcess" resultType="SampleClosingProcess"> <select id="selectSampleClosingProcessCheckByUpdate" parameterType="SampleClosingProcess" resultType="SampleClosingProcess">
select top 20 select top 20
id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime, CASE
WHEN yangPinSQSLH = '' THEN null
ELSE yangPinSQSLH
END AS yangPinSQSLH1
from "Biz_样品结案流程" from "Biz_样品结案流程"
where id &gt; #{id} where id &gt; #{id}
and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120) and sys_updatetime is not null and CONVERT(varchar(10),sys_updatetime,120) = CONVERT(varchar(10),GETDATE(),120)
...@@ -109,7 +134,7 @@ ...@@ -109,7 +134,7 @@
<select id="cascadeSalesContractProcessMXBySalesContractProcess" parameterType="SalesContractProcess" resultType="SalesContractProcessMX"> <select id="cascadeSalesContractProcessMXBySalesContractProcess" parameterType="SalesContractProcess" resultType="SalesContractProcessMX">
select top 20 select top 20
id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh, convert(varchar(50),Round(hetongmll,2)) + '%' as hetongmll
from "Biz_销售合同流程_MX" from "Biz_销售合同流程_MX"
where SYS_INCIDENT = #{sysIncident} where SYS_INCIDENT = #{sysIncident}
</select> </select>
...@@ -125,9 +150,15 @@ ...@@ -125,9 +150,15 @@
from "Biz_样品申请流程_MingXi" from "Biz_样品申请流程_MingXi"
where SYS_INCIDENT = #{sYS_INCIDENT} where SYS_INCIDENT = #{sYS_INCIDENT}
</select> </select>
<select id="cascadeSalesInquiryProcessMXBySalesInquiryProcess" parameterType="SalesInquiryProcess" resultType="SalesInquiryProcessMX">
select top 20
id,sys_incident,wuliaoh,chicun,chengben,baojiamll, biaozhunml
from "Biz_销售询报价流程_MX"
where sys_incident = #{sys_incident}
</select>
<select id="cascadeSampleClosingProcessMingXiBySampleClosingProcess" parameterType="SampleClosingProcess" resultType="SampleClosingProcessMingXi"> <select id="cascadeSampleClosingProcessMingXiBySampleClosingProcess" parameterType="SampleClosingProcess" resultType="SampleClosingProcessMingXi">
select top 20 select top 20
id,sYS_INCIDENT,shiFouTGv,shiFouTGt id,sYS_INCIDENT,shiFouTGv,shiFouTGt,hangxiangmh
from "Biz_样品结案流程_MingXi" from "Biz_样品结案流程_MingXi"
where SYS_INCIDENT = #{sYS_INCIDENT} where SYS_INCIDENT = #{sYS_INCIDENT}
</select> </select>
...@@ -154,12 +185,20 @@ ...@@ -154,12 +185,20 @@
</select> </select>
<select id="selectSampleApplicationProcessById" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess"> <select id="selectSampleApplicationProcessById" parameterType="SampleApplicationProcess" resultType="SampleApplicationProcess">
select id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID, select id,dingDanLXv,dingDanLXt,sYS_INCIDENT,yeWuYID,xuFangGS,xuFangGSID,
yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv yangPinLXv,yangPinLXt,pCBCS,chanPinYY,jiFuBZ,sYS_UPDATETIME,concat(pCBCS,'层/',chanPinYY) as pCBCS2chanPinYY,ziSHiYBv,sys_incstatus,xiaoShouBMv,sys_starttime
from "Biz_样品申请流程" from "Biz_样品申请流程"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectSalesInquiryProcessById" parameterType="SalesInquiryProcess" resultType="SalesInquiryProcess">
select id,sys_processname,sys_incident,sys_starttime,sys_updatetime,sys_incstatus,kehubm,bibiev
from "Biz_销售询报价流程"
where id = #{id}
</select>
<select id="selectSampleClosingProcessById" parameterType="SampleClosingProcess" resultType="SampleClosingProcess"> <select id="selectSampleClosingProcessById" parameterType="SampleClosingProcess" resultType="SampleClosingProcess">
select id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime select id,sYS_INCIDENT,yangPinSQSLH,sYS_INCSTATUS,sys_updatetime,sys_starttime, CASE
WHEN yangPinSQSLH = '' THEN null
ELSE yangPinSQSLH
END AS yangPinSQSLH1
from "Biz_样品结案流程" from "Biz_样品结案流程"
where id = #{id} where id = #{id}
</select> </select>
...@@ -169,14 +208,19 @@ ...@@ -169,14 +208,19 @@
from "Biz_样品申请流程_MingXi" from "Biz_样品申请流程_MingXi"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectSalesInquiryProcessMXById" parameterType="SalesInquiryProcessMX" resultType="SalesInquiryProcessMX">
select id,sys_incident,wuliaoh,chicun,chengben,baojiamll, biaozhunml
from "Biz_销售询报价流程_MX"
where id = #{id}
</select>
<select id="selectSampleClosingProcessMingXiById" parameterType="SampleClosingProcessMingXi" resultType="SampleClosingProcessMingXi"> <select id="selectSampleClosingProcessMingXiById" parameterType="SampleClosingProcessMingXi" resultType="SampleClosingProcessMingXi">
select id,sYS_INCIDENT,shiFouTGv,shiFouTGt select id,sYS_INCIDENT,shiFouTGv,shiFouTGt,hangxiangmh
from "Biz_样品结案流程_MingXi" from "Biz_样品结案流程_MingXi"
where id = #{id} where id = #{id}
</select> </select>
<select id="selectSalesContractProcessMXById" parameterType="SalesContractProcessMX" resultType="SalesContractProcessMX"> <select id="selectSalesContractProcessMXById" parameterType="SalesContractProcessMX" resultType="SalesContractProcessMX">
select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh select id, chengben, SYS_INCIDENT as sysIncident, zongjia, maolibz, wuliaoh, convert(varchar(50),Round(hetongmll,2)) + '%' as hetongmll
from "Biz_销售合同流程_MX" from "Biz_销售合同流程_MX"
where id = #{id} where id = #{id}
</select> </select>
......
...@@ -595,6 +595,15 @@ ...@@ -595,6 +595,15 @@
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
<property name="targetObject" ref="jobServiceImpl" /> <property name="targetObject" ref="jobServiceImpl" />
<property name="targetMethod" value="selectVbupNew" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="jobServiceImpl" />
<property name="targetMethod" value="selectVbpaNew" /> <property name="targetMethod" value="selectVbpaNew" />
</bean> </bean>
</property> </property>
...@@ -690,6 +699,24 @@ ...@@ -690,6 +699,24 @@
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
<property name="targetObject" ref="jobServiceImpl" /> <property name="targetObject" ref="jobServiceImpl" />
<property name="targetMethod" value="selectSalesInquiryProcessNew" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="jobServiceImpl" />
<property name="targetMethod" value="selectSalesInquiryProcessMXNew" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="jobServiceImpl" />
<property name="targetMethod" value="selectSampleApplicationProcessNew" /> <property name="targetMethod" value="selectSampleApplicationProcessNew" />
</bean> </bean>
</property> </property>
...@@ -955,6 +982,15 @@ ...@@ -955,6 +982,15 @@
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
<property name="targetObject" ref="checkUpdateServiceImpl" /> <property name="targetObject" ref="checkUpdateServiceImpl" />
<property name="targetMethod" value="selectSalesInquiryProcessCheckUpdate" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="checkUpdateServiceImpl" />
<property name="targetMethod" value="selectSampleClosingProcessCheckUpdate" /> <property name="targetMethod" value="selectSampleClosingProcessCheckUpdate" />
</bean> </bean>
</property> </property>
...@@ -1190,6 +1226,17 @@ ...@@ -1190,6 +1226,17 @@
</property> </property>
<property name="cronExpression" value="* * * * * ?" /> <property name="cronExpression" value="* * * * * ?" />
</bean> --> </bean> -->
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="checkDeleteServiceImpl" />
<property name="targetMethod" value="selectVbupCheckByDelete" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<!-- <bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean"> <!-- <bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
...@@ -1249,6 +1296,15 @@ ...@@ -1249,6 +1296,15 @@
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
<property name="targetObject" ref="checkDeleteServiceImpl" /> <property name="targetObject" ref="checkDeleteServiceImpl" />
<property name="targetMethod" value="selectSalesInquiryProcessCheckByDelete" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="checkDeleteServiceImpl" />
<property name="targetMethod" value="selectSampleClosingProcessCheckByDelete" /> <property name="targetMethod" value="selectSampleClosingProcessCheckByDelete" />
</bean> </bean>
</property> </property>
...@@ -1323,6 +1379,15 @@ ...@@ -1323,6 +1379,15 @@
<property name="jobDetail"> <property name="jobDetail">
<bean parent="methodJobDetail"> <bean parent="methodJobDetail">
<property name="targetObject" ref="checkDeleteServiceImpl" /> <property name="targetObject" ref="checkDeleteServiceImpl" />
<property name="targetMethod" value="selectSalesInquiryProcessMXCheckByDelete" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="targetObject" ref="checkDeleteServiceImpl" />
<property name="targetMethod" value="selectSampleClosingProcessMingXiCheckByDelete" /> <property name="targetMethod" value="selectSampleClosingProcessMingXiCheckByDelete" />
</bean> </bean>
</property> </property>
...@@ -1386,7 +1451,7 @@ ...@@ -1386,7 +1451,7 @@
<property name="cronExpression" value="* * * * * ?" /> <property name="cronExpression" value="* * * * * ?" />
</bean> </bean>
<!-- 以上68个任务 --> <!-- 以上75个任务 -->
...@@ -1501,6 +1566,26 @@ ...@@ -1501,6 +1566,26 @@
</property> </property>
<property name="cronExpression" value="* * * * * ?" /> <property name="cronExpression" value="* * * * * ?" />
</bean> </bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="name" value="selectSampleClosingProcessMingXiCheck_once"/>
<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
<property name="targetMethod" value="selectSampleClosingProcessMingXiCheck" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
<property name="jobDetail">
<bean parent="methodJobDetail">
<property name="name" value="selectZsd06Check_once"/>
<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
<property name="targetMethod" value="selectZsd06Check" />
</bean>
</property>
<property name="cronExpression" value="* * * * * ?" />
</bean>
</list> </list>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论