update
This commit is contained in:
parent
4a94919d54
commit
1aecc6692f
@ -39,6 +39,7 @@ class ApplyWithSealLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['num'],
|
'=' => ['num'],
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +56,6 @@ class ApplyWithSealLists extends BaseAdminDataLists implements ListsSearchInterf
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return ApplyWithSeal::where($this->searchWhere)
|
return ApplyWithSeal::where($this->searchWhere)
|
||||||
->field(['id', 'dataid', 'num', 'types', 'filetype', 'ridingseam', 'name', 'frequency', 'limit', 'depar', 'stampman', 'project', 'principal', 'content', 'loan', 'borrow', 'returndate', 'applicant', 'date', 'sjborrow', 'sjborrower', 'sjreturn', 'returnee', 'annex'])
|
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
|
@ -41,8 +41,8 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
ApplyWithSeal::create([
|
ApplyWithSeal::create([
|
||||||
'dataid' => $params['dataid'],
|
'dataid' => generate_sn(ApplyWithSeal::class, 'dataid'),
|
||||||
'num' => $params['num'],
|
'num' => generate_sn(ApplyWithSeal::class, 'num'),
|
||||||
'types' => $params['types'],
|
'types' => $params['types'],
|
||||||
'filetype' => $params['filetype'],
|
'filetype' => $params['filetype'],
|
||||||
'ridingseam' => $params['ridingseam'],
|
'ridingseam' => $params['ridingseam'],
|
||||||
@ -63,7 +63,7 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
'sjborrower' => $params['sjborrower'],
|
'sjborrower' => $params['sjborrower'],
|
||||||
'sjreturn' => $params['sjreturn'],
|
'sjreturn' => $params['sjreturn'],
|
||||||
'returnee' => $params['returnee'],
|
'returnee' => $params['returnee'],
|
||||||
'annex' => $params['annex'],
|
'annex' => json_encode($params['annex']),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
@ -88,8 +88,6 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
ApplyWithSeal::where('id', $params['id'])->update([
|
ApplyWithSeal::where('id', $params['id'])->update([
|
||||||
'dataid' => $params['dataid'],
|
|
||||||
'num' => $params['num'],
|
|
||||||
'types' => $params['types'],
|
'types' => $params['types'],
|
||||||
'filetype' => $params['filetype'],
|
'filetype' => $params['filetype'],
|
||||||
'ridingseam' => $params['ridingseam'],
|
'ridingseam' => $params['ridingseam'],
|
||||||
@ -110,7 +108,7 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
'sjborrower' => $params['sjborrower'],
|
'sjborrower' => $params['sjborrower'],
|
||||||
'sjreturn' => $params['sjreturn'],
|
'sjreturn' => $params['sjreturn'],
|
||||||
'returnee' => $params['returnee'],
|
'returnee' => $params['returnee'],
|
||||||
'annex' => $params['annex'],
|
'annex' => json_encode($params['annex'])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
@ -145,6 +143,8 @@ class ApplyWithSealLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
return ApplyWithSeal::findOrEmpty($params['id'])->toArray();
|
$data = ApplyWithSeal::findOrEmpty($params['id'])->toArray();
|
||||||
|
$data['annex'] = json_decode($params['annex'], true);
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user