Join 或 derive 本地正常生产报错

报错信息:Error in cell A39 Error in cell A39 null: Duplicated primary keys

写法一:
A39 >rs1=mainTableListAddAmount.derive(baseCorps.select(.corpId==mainTableListAddAmount.corpId).corpCode:shopCode,baseCorps.select(.corpId==mainTableListAddAmount.corpId).corpName:corpName,baseproducts.select(.productId==mainTableListAddAmount.productId).productCode:productCode,baseproducts.select(.productId==mainTableListAddAmount.productId).productName:productName)

写法二:

A39 rs1=mainTableListAddAmount.join(.corpId,baseCorps:corpId,corpCode:shopCode,corpName;.productId,baseproducts:productId,productCode,productName)

上面两种写法都报上面的错