数据审核功能老出现重复记录
LOCAL K1 , JLHYN = MESSAGEBOX('基础数据审核前,请确定考勤已输入完毕?',36,'Are you sure?')
IF .NOT. YN = 6
RETURN
ENDIF
CLOSE ALL
SELECT 3
USE SYS(5) - '\gzgl\dbf\cwda.dbf'
ZAP
SELECT 1
USE SYS(5) - '\gzgl\dbf\cs.dbf'
SELECT 2
USE SYS(5) - '\gzgl\dbf\cxda.dbf'
ZAP
APPEND FROM SYS(5) - '\gzgl\dbf\gzda.dbf' FOR D14 <> '其它'
APPEND FROM SYS(5) - '\gzgl\yjdbf\yj_gzda.dbf'
APPEND FROM SYS(5) - '\gzgl\htdbf\ht_gzda.dbf'
SELECT 8
USE SYS(5) - '\gzgl\dbf\sebaobz.dbf'
INDEX ON D11A TO a1
SELECT 2
SET RELATION TO D11A INTO sebaobz
REPLACE YLJJ_D WITH H.YLJJ FOR D11A = H.D11A
REPLACE GRCXBX_D WITH H.GRCXBX FOR D11A = H.D11A
REPLACE FHFFN_D WITH H.FHFFN FOR D11A = H.D11A
REPLACE FHZU_D WITH H.FHZU FOR D11A = H.D11A
REPLACE FHZU2_D WITH H.FHZU2 FOR D11A = H.D11A
REPLACE SY_D WITH H.SY FOR D11A = H.D11A
SELECT 9
USE SYS(5) - '\gzgl\htdbf\ht_zj.dbf'
INDEX ON D11A TO a11
SELECT 2
SET RELATION TO D11A INTO ht_zj
REPLACE CBD_D WITH I.CBD FOR D11A = I.D11A
SELECT 2
REPLACE CW WITH (' ')
REPLACE CW WITH '参保地错误,“' - ALLTRIM(CBD) - '”应改为“' - ALLTRIM(CBD_D) - '”' ;
FOR B.CBD <> B.CBD_D
REPLACE CW WITH '参保地错误,全公司合同工档案库无该条记录!' FOR ;
B.CBD_D = ' ' AND ZGLB = '合同'
SELECT 3
APPEND FROM SYS(5) - '\gzgl\dbf\cxda.dbf' FOR .NOT. CW = ' '
SELECT 2
REPLACE CW WITH (' ')
REPLACE CW WITH '未输考勤或工资计算错误' FOR ;
HJGZ <> D43A + D43B + D45 + KHGZ + D47 + D48 + ZFBTA + GZBT + JBGZ + SGJT - FJKK - BJKK - ;
QQKK + BFGZ - YKGZ .OR. ;
SDGZ <> HJGZ - YLJJ - GRCXBX - FHFFN - FHZU - FHZU2 - SY
REPLACE CW WITH ' ' FOR ;
HJGZ = D43A + D43B + D45 + KHGZ + D47 + D48 + ZFBTA + GZBT + JBGZ + SGJT - QQKK + BFGZ - ;
YKGZ AND ZGLB = '合同'