@ -1,6 +1,9 @@
package weaver.interfaces.aisin.cron ;
import weaver.common.DateUtil ;
import weaver.conn.RecordSet ;
import weaver.general.BaseBean ;
import weaver.general.TimeUtil ;
import weaver.general.Util ;
import weaver.interfaces.schedule.BaseCronJob ;
@ -18,6 +21,7 @@ public class KqCloseAccountCreateCrob extends BaseCronJob {
@Override
public void execute ( ) {
RecordSet rs = new RecordSet ( ) ;
BaseBean bb = new BaseBean ( ) ;
String kqMonth = getKqMonth ( ) ;
@ -26,14 +30,21 @@ public class KqCloseAccountCreateCrob extends BaseCronJob {
rs . next ( ) ;
int sums = Util . getIntValue ( rs . getString ( "sums" ) ) ;
String subcompanyid = bb . getPropValue ( "aisinsecond" , "subcompanyid" ) ;
String modeId = bb . getPropValue ( "aisinsecond" , "fzModeid" ) ;
String personId = bb . getPropValue ( "aisinsecond" , "personId" ) ;
String currentDate = TimeUtil . getCurrentDateString ( ) ;
String currentTime = TimeUtil . getOnlyCurrentTimeString ( ) ;
//2.若不存在
if ( sums = = 0 ) {
rs . executeUpdate ( "insert into uf_atbpkqfz(sjcjr,fzny,fb,kqjszt,modedatacreater,modedatacreatedate,modedatacreatetime,formmodeid) values(?,?,?,?,?,?,?,?)" ,
personId , kqMonth , subcompanyid , 0 , personId , currentDate , currentTime , modeId ) ;
}
}
private String getKqMonth ( ) {
LocalDate currentDate = LocalDate . now ( ) ;
LocalDate previousMonthDate = currentDate . minusMonths ( 1 ) ;