// 一、系统自动创建新增单据
DynamicObject frigWarnForm = BusinessDataServiceHelper.newDynamicObject("pre_frig_warn_form");
frigWarnForm.set("billno", "LC-" + new Date().getTime());
frigWarnForm.set("wens_org", org); //组织
frigWarnForm.set("wens_create_date", new Date().getTime()); //创建时间
frigWarnForm.set("wens_device_name", deviceName); //设备名称
frigWarnForm.set("wens_detail_address", deviceDetailAddress); //探头地址
OperationResult result = SaveServiceHelper.saveOperate ("save", "pre_frig_warn_form",
new DynamicObject[]{frigWarnForm});
*****************************************************************************************************
// 二、系统自动创建新增单据分录
DynamicObject dy = BusinessDataServiceHelper.loadSingle("pre_frig_warn_form", filterFormAll.toArray());//单据
DynamicObjectCollection docEntryTer = dy.getDynamicObjectCollection("pre_temperature_data");//分录
DynamicObject newEntry = docEntryTer.addNew();
newEntry.set("wens_warn_date", new Date().getTime());
newEntry.set("wens_temperature", nowTemperature);
SaveServiceHelper.save(new DynamicObject[]{dy});