|
@@ -41,33 +41,33 @@ def getWage(user,start_time,end_time,percentPass):
|
|
|
|
|
|
print(user,start_time,current_begin,end_time)
|
|
print(user,start_time,current_begin,end_time)
|
|
|
|
|
|
- sql = " select count(1) from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s'"%(user,end_time,start_time)
|
|
|
|
|
|
+ sql = " select count(1) from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s'"%(user,end_time,start_time)
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
doc_count = cursor.fetchall()[0][0]
|
|
doc_count = cursor.fetchall()[0][0]
|
|
print("doc_count",doc_count)
|
|
print("doc_count",doc_count)
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"T%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"T%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
t_count = cursor.fetchall()[0][0]
|
|
t_count = cursor.fetchall()[0][0]
|
|
print("t_count",t_count)
|
|
print("t_count",t_count)
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"R%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s' order by edittime desc limit 1200) and value like '%s' "%(user,end_time,current_begin,"R%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
r_count = cursor.fetchall()[0][0]
|
|
r_count = cursor.fetchall()[0][0]
|
|
print("r_count",r_count)
|
|
print("r_count",r_count)
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,end_time,current_begin,"T%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s') and value like '%s' "%(user,end_time,current_begin,"T%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
all_t_count = cursor.fetchall()[0][0]
|
|
all_t_count = cursor.fetchall()[0][0]
|
|
print("all_t_count",all_t_count)
|
|
print("all_t_count",all_t_count)
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,end_time,current_begin,"R%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s') and value like '%s' "%(user,end_time,current_begin,"R%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
all_r_count = cursor.fetchall()[0][0]
|
|
all_r_count = cursor.fetchall()[0][0]
|
|
print("all_r_count",all_r_count)
|
|
print("all_r_count",all_r_count)
|
|
|
|
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,current_begin,start_time,"T%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s') and value like '%s' "%(user,current_begin,start_time,"T%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
other_t_count = cursor.fetchall()[0][0]
|
|
other_t_count = cursor.fetchall()[0][0]
|
|
print("other_t_count",other_t_count)
|
|
print("other_t_count",other_t_count)
|
|
|
|
|
|
- sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and to_char(edittime,'yyyy-mm-dd')<='%s' and to_char(edittime,'yyyy-mm-dd')>'%s') and value like '%s' "%(user,current_begin,start_time,"R%")
|
|
|
|
|
|
+ sql = " select count(1) from brat_bratannotation where document_id in (select human_identifier from corpus_iedocument where edituser='%s' and edittime<='%s' and edittime>'%s') and value like '%s' "%(user,current_begin,start_time,"R%")
|
|
cursor.execute(sql)
|
|
cursor.execute(sql)
|
|
other_r_count = cursor.fetchall()[0][0]
|
|
other_r_count = cursor.fetchall()[0][0]
|
|
print("other_r_count",other_r_count)
|
|
print("other_r_count",other_r_count)
|
|
@@ -414,8 +414,8 @@ def makeCheck():
|
|
if __name__=="__main__":
|
|
if __name__=="__main__":
|
|
settle = Settlement()
|
|
settle = Settlement()
|
|
# settle.makeMigrate("test","2020-08-01","2020-08-31")
|
|
# settle.makeMigrate("test","2020-08-01","2020-08-31")
|
|
- settle_end = "2021-07-25"
|
|
|
|
- settle.makePayroll(["test2","test9","test10","test11","test12","test16","test20","test25","test19","test22","test1","test7","test8","test17","test21","test26"],"2020-08-01",settle_end)
|
|
|
|
|
|
+ settle_end = "2021-09-25"
|
|
|
|
+ settle.makePayroll(["test1","test7","test8","test21","test27","test2","test9","test10","test11","test12","test25","test22","test29"],"2020-08-01",settle_end)
|
|
settle.exportPayroll(begin_time=None,end_time=settle_end)
|
|
settle.exportPayroll(begin_time=None,end_time=settle_end)
|
|
|
|
|
|
# settle.createUser_batch(batch_size=102)
|
|
# settle.createUser_batch(batch_size=102)
|