|
|
@@ -191,4 +191,43 @@ public class PurchaseProdInOutTask extends AbstractTask {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @TaskMapping(title = "批量更新采购验退单明细单价", fixedDelay = 60000)
|
|
|
+ public void uploadUpdatePurcReturnPriceByBatch() {
|
|
|
+ List<ProdInOutRefreshPrice> prods = jdbcTemplate.queryForBeanList("select pbu_pdno,pbu_inoutno,pbu_orderprice,pbu_id from PriceBatchUpdate where pbu_piclass = '采购验退单' and pbu_status = '99' and pbu_sendstatus = '待上传' and rownum < 200",
|
|
|
+ ProdInOutRefreshPrice.class);
|
|
|
+ if (!CollectionUtils.isEmpty(prods)) {
|
|
|
+ ContextHolder.setDataSize(prods.size());
|
|
|
+ post("/erp/purchase/prodInOut/refreshPrice/purc/return", dataWrap(prods));
|
|
|
+ // 更新状态
|
|
|
+ String idStr = CollectionUtil.getKeyString(prods);
|
|
|
+ jdbcTemplate.execute("update PriceBatchUpdate set pbu_sendstatus='已上传' where pbu_id in (" + idStr + ")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @TaskMapping(title = "批量更新委外验收单明细单价", fixedDelay = 60000)
|
|
|
+ public void uploadUpdateMakeAcceptPriceByBatch() {
|
|
|
+ List<ProdInOutRefreshPrice> prods = jdbcTemplate.queryForBeanList("select pbu_pdno,pbu_inoutno,pbu_orderprice,pbu_id from PriceBatchUpdate where pbu_piclass = '委外验收单' and pbu_status = '99' and pbu_sendstatus = '待上传' and rownum < 200",
|
|
|
+ ProdInOutRefreshPrice.class);
|
|
|
+ if (!CollectionUtils.isEmpty(prods)) {
|
|
|
+ ContextHolder.setDataSize(prods.size());
|
|
|
+ post("/erp/purchase/prodInOut/refreshPrice/make/accept", dataWrap(prods));
|
|
|
+ // 更新状态
|
|
|
+ String idStr = CollectionUtil.getKeyString(prods);
|
|
|
+ jdbcTemplate.execute("update PriceBatchUpdate set pbu_sendstatus='已上传' where pbu_id in (" + idStr + ")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @TaskMapping(title = "批量更新委外验退单明细单价", fixedDelay = 60000)
|
|
|
+ public void uploadUpdateMakeReutrnPriceByBatch() {
|
|
|
+ List<ProdInOutRefreshPrice> prods = jdbcTemplate.queryForBeanList("select pbu_pdno,pbu_inoutno,pbu_orderprice,pbu_id from PriceBatchUpdate where pbu_piclass = '委外验退单' and pbu_status = '99' and pbu_sendstatus = '待上传' and rownum < 200",
|
|
|
+ ProdInOutRefreshPrice.class);
|
|
|
+ if (!CollectionUtils.isEmpty(prods)) {
|
|
|
+ ContextHolder.setDataSize(prods.size());
|
|
|
+ post("/erp/purchase/prodInOut/refreshPrice/make/return", dataWrap(prods));
|
|
|
+ // 更新状态
|
|
|
+ String idStr = CollectionUtil.getKeyString(prods);
|
|
|
+ jdbcTemplate.execute("update PriceBatchUpdate set pbu_sendstatus='已上传' where pbu_id in (" + idStr + ")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|