first commit

This commit is contained in:
annnj-company
2026-04-17 18:29:53 +08:00
parent e49fa5a215
commit 130c1026c4
5615 changed files with 1639145 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<?php
namespace app\model;
use think\Db;
use think\Log;
/**
* Class 宗地表
* @package app\model
* @author: bordon
*/
class ZongdiInfo extends Base
{
/**
* 数据来源 0 正常1 批量上传
*
* @var integer
*/
public static $SRC_TYPE_NORMAL = 0; // 正常类
public static $SRC_TYPE_BATCH = 1; // 批量上传类
/**
* 保存宗地信息
*
* @param [type] $data 宗地表结构一致
* @return void
*/
public function AddorUpdateByZdbh( $data )
{
// 构建查询条件
//$map['id'] = $data['id'];
$map['parcel_no'] = $data['parcel_no'];
$zd_id = isset($data['zd_id'])?$data['zd_id']:null;
// 查询是否存在符合条件的记录
$record = $this->where($map)->find();
$r = null;
if ($record&&$zd_id != null ) {
// 符合条件的记录已存在,做更新操作
$r = $this->where($map)->update($data);
} else {
$r = $this->save($data);
$zd_id = $this->id;
}
return ['res'=>$r,'id'=>$zd_id];
}
}