|
|
@@ -26,14 +26,19 @@ public class icstockbill extends CrmBase {
|
|
|
@Override
|
|
|
public void autoAction() throws YosException {
|
|
|
//到期自动收货确认
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.add(Calendar.DATE, -30);
|
|
|
- String enddate = getDate_Str(calendar.getTime());
|
|
|
+ Calendar startcalendar = Calendar.getInstance();
|
|
|
+ startcalendar.add(Calendar.DATE, -60);
|
|
|
+ String startdate = getDate_Str(startcalendar.getTime());
|
|
|
+
|
|
|
+ Calendar endcalendar = Calendar.getInstance();
|
|
|
+ endcalendar.add(Calendar.DATE, -30);
|
|
|
+ String enddate = getDate_Str(endcalendar.getTime());
|
|
|
+
|
|
|
|
|
|
Rows billRows = dbConnect.runSqlQuery("select t1.st_stockbillid,count(t2.sku) mcodeqty from st_stockbill t1 \n" +
|
|
|
"inner join st_stockbill_items_sku t2 on t1.st_stockbillid=t2.st_stockbillid\n" +
|
|
|
"inner join sa_agents t3 on t1.sys_enterpriseid=t3.sys_enterpriseid and t3.type='普通'\n" +
|
|
|
- "where t1.siteid='MD' and t1.type='销售出库'and t1.rb = 1 and t1.isreceiver = 0 and t1.status = '审核' and t1.iswx=0 and t1.autoreceiveerrtimes<10 and t1.checkdate>='2022-01-01' and t1.checkdate<'" + enddate + "' \n" +
|
|
|
+ "where t1.siteid='MD' and t1.type='销售出库'and t1.rb = 1 and t1.isreceiver = 0 and t1.status = '审核' and t1.iswx=0 and t1.autoreceiveerrtimes<10 and t1.checkdate>='" + startdate + "' and t1.checkdate<'" + enddate + "' \n" +
|
|
|
"group by t1.st_stockbillid\n" +
|
|
|
"order by t1.autoreceiveerrtimes,t1.st_stockbillid desc\n" +
|
|
|
"limit 100");
|