diff --git a/generate/php/app/adminapi/controller/financial/FinancialExpenseReimbursementController.php b/generate/php/app/adminapi/controller/financial/FinancialExpenseReimbursementController.php deleted file mode 100644 index f5ca67b..0000000 --- a/generate/php/app/adminapi/controller/financial/FinancialExpenseReimbursementController.php +++ /dev/null @@ -1,108 +0,0 @@ -dataLists(new FinancialExpenseReimbursementLists()); - } - - - /** - * @notes 添加财务管理--费用报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function add() - { - $params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('add'); - $result = FinancialExpenseReimbursementLogic::add($params); - if (true === $result) { - return $this->success('添加成功', [], 1, 1); - } - return $this->fail(FinancialExpenseReimbursementLogic::getError()); - } - - - /** - * @notes 编辑财务管理--费用报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function edit() - { - $params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('edit'); - $result = FinancialExpenseReimbursementLogic::edit($params); - if (true === $result) { - return $this->success('编辑成功', [], 1, 1); - } - return $this->fail(FinancialExpenseReimbursementLogic::getError()); - } - - - /** - * @notes 删除财务管理--费用报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function delete() - { - $params = (new FinancialExpenseReimbursementValidate())->post()->goCheck('delete'); - FinancialExpenseReimbursementLogic::delete($params); - return $this->success('删除成功', [], 1, 1); - } - - - /** - * @notes 获取财务管理--费用报销单详情 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function detail() - { - $params = (new FinancialExpenseReimbursementValidate())->goCheck('detail'); - $result = FinancialExpenseReimbursementLogic::detail($params); - return $this->data($result); - } - - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/controller/financial/FinancialTravelReimbursementController.php b/generate/php/app/adminapi/controller/financial/FinancialTravelReimbursementController.php deleted file mode 100644 index e378058..0000000 --- a/generate/php/app/adminapi/controller/financial/FinancialTravelReimbursementController.php +++ /dev/null @@ -1,108 +0,0 @@ -dataLists(new FinancialTravelReimbursementLists()); - } - - - /** - * @notes 添加财务管理--差旅费报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function add() - { - $params = (new FinancialTravelReimbursementValidate())->post()->goCheck('add'); - $result = FinancialTravelReimbursementLogic::add($params); - if (true === $result) { - return $this->success('添加成功', [], 1, 1); - } - return $this->fail(FinancialTravelReimbursementLogic::getError()); - } - - - /** - * @notes 编辑财务管理--差旅费报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function edit() - { - $params = (new FinancialTravelReimbursementValidate())->post()->goCheck('edit'); - $result = FinancialTravelReimbursementLogic::edit($params); - if (true === $result) { - return $this->success('编辑成功', [], 1, 1); - } - return $this->fail(FinancialTravelReimbursementLogic::getError()); - } - - - /** - * @notes 删除财务管理--差旅费报销单 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function delete() - { - $params = (new FinancialTravelReimbursementValidate())->post()->goCheck('delete'); - FinancialTravelReimbursementLogic::delete($params); - return $this->success('删除成功', [], 1, 1); - } - - - /** - * @notes 获取财务管理--差旅费报销单详情 - * @return \think\response\Json - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function detail() - { - $params = (new FinancialTravelReimbursementValidate())->goCheck('detail'); - $result = FinancialTravelReimbursementLogic::detail($params); - return $this->data($result); - } - - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/lists/financial/FinancialExpenseReimbursementLists.php b/generate/php/app/adminapi/lists/financial/FinancialExpenseReimbursementLists.php deleted file mode 100644 index 51fac3c..0000000 --- a/generate/php/app/adminapi/lists/financial/FinancialExpenseReimbursementLists.php +++ /dev/null @@ -1,78 +0,0 @@ - ['contract_id', 'fee_application_id', 'pay_type'], - '%like%' => ['theme', 'code', 'create_user'], - ]; - } - - - /** - * @notes 获取财务管理--费用报销单列表 - * @return array - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function lists(): array - { - return FinancialExpenseReimbursement::where($this->searchWhere) - ->field(['id', 'contract_id', 'fee_application_id', 'theme', 'code', 'bill_num', 'pay_type', 'content', 'create_user', 'create_time']) - ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) - ->select() - ->toArray(); - } - - - /** - * @notes 获取财务管理--费用报销单数量 - * @return int - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function count(): int - { - return FinancialExpenseReimbursement::where($this->searchWhere)->count(); - } - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/lists/financial/FinancialTravelReimbursementLists.php b/generate/php/app/adminapi/lists/financial/FinancialTravelReimbursementLists.php deleted file mode 100644 index 6021314..0000000 --- a/generate/php/app/adminapi/lists/financial/FinancialTravelReimbursementLists.php +++ /dev/null @@ -1,77 +0,0 @@ - ['code', 'approve_dept', 'cost_type', 'pay_type', 'create_user'], - ]; - } - - - /** - * @notes 获取财务管理--差旅费报销单列表 - * @return array - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function lists(): array - { - return FinancialTravelReimbursement::where($this->searchWhere) - ->field(['id', 'code', 'approve_dept', 'cost_type', 'pay_type', 'tax_deductible_amount', 'bill_num', 'fee_application_id', 'content', 'create_user', 'create_time']) - ->limit($this->limitOffset, $this->limitLength) - ->order(['id' => 'desc']) - ->select() - ->toArray(); - } - - - /** - * @notes 获取财务管理--差旅费报销单数量 - * @return int - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function count(): int - { - return FinancialTravelReimbursement::where($this->searchWhere)->count(); - } - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/logic/financial/FinancialExpenseReimbursementLogic.php b/generate/php/app/adminapi/logic/financial/FinancialExpenseReimbursementLogic.php deleted file mode 100644 index 8d8accb..0000000 --- a/generate/php/app/adminapi/logic/financial/FinancialExpenseReimbursementLogic.php +++ /dev/null @@ -1,124 +0,0 @@ - $params['contract_id'], - 'fee_application_id' => $params['fee_application_id'], - 'theme' => $params['theme'], - 'code' => $params['code'], - 'bill_num' => $params['bill_num'], - 'pay_type' => $params['pay_type'], - 'content' => $params['content'], - 'annex' => $params['annex'], - 'create_user' => $params['create_user'], - 'create_time' => $params['create_time'] - ]); - - Db::commit(); - return true; - } catch (\Exception $e) { - Db::rollback(); - self::setError($e->getMessage()); - return false; - } - } - - - /** - * @notes 编辑财务管理--费用报销单 - * @param array $params - * @return bool - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function edit(array $params): bool - { - Db::startTrans(); - try { - FinancialExpenseReimbursement::where('id', $params['id'])->update([ - 'contract_id' => $params['contract_id'], - 'fee_application_id' => $params['fee_application_id'], - 'theme' => $params['theme'], - 'code' => $params['code'], - 'bill_num' => $params['bill_num'], - 'pay_type' => $params['pay_type'], - 'content' => $params['content'], - 'annex' => $params['annex'], - 'create_user' => $params['create_user'], - 'create_time' => $params['create_time'] - ]); - - Db::commit(); - return true; - } catch (\Exception $e) { - Db::rollback(); - self::setError($e->getMessage()); - return false; - } - } - - - /** - * @notes 删除财务管理--费用报销单 - * @param array $params - * @return bool - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function delete(array $params): bool - { - return FinancialExpenseReimbursement::destroy($params['id']); - } - - - /** - * @notes 获取财务管理--费用报销单详情 - * @param $params - * @return array - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function detail($params): array - { - return FinancialExpenseReimbursement::findOrEmpty($params['id'])->toArray(); - } -} \ No newline at end of file diff --git a/generate/php/app/adminapi/logic/financial/FinancialTravelReimbursementLogic.php b/generate/php/app/adminapi/logic/financial/FinancialTravelReimbursementLogic.php deleted file mode 100644 index ff63e0d..0000000 --- a/generate/php/app/adminapi/logic/financial/FinancialTravelReimbursementLogic.php +++ /dev/null @@ -1,124 +0,0 @@ - $params['code'], - 'approve_dept' => $params['approve_dept'], - 'cost_type' => $params['cost_type'], - 'pay_type' => $params['pay_type'], - 'tax_deductible_amount' => $params['tax_deductible_amount'], - 'bill_num' => $params['bill_num'], - 'fee_application_id' => $params['fee_application_id'], - 'content' => $params['content'], - 'create_user' => $params['create_user'], - 'create_time' => $params['create_time'] - ]); - - Db::commit(); - return true; - } catch (\Exception $e) { - Db::rollback(); - self::setError($e->getMessage()); - return false; - } - } - - - /** - * @notes 编辑财务管理--差旅费报销单 - * @param array $params - * @return bool - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function edit(array $params): bool - { - Db::startTrans(); - try { - FinancialTravelReimbursement::where('id', $params['id'])->update([ - 'code' => $params['code'], - 'approve_dept' => $params['approve_dept'], - 'cost_type' => $params['cost_type'], - 'pay_type' => $params['pay_type'], - 'tax_deductible_amount' => $params['tax_deductible_amount'], - 'bill_num' => $params['bill_num'], - 'fee_application_id' => $params['fee_application_id'], - 'content' => $params['content'], - 'create_user' => $params['create_user'], - 'create_time' => $params['create_time'] - ]); - - Db::commit(); - return true; - } catch (\Exception $e) { - Db::rollback(); - self::setError($e->getMessage()); - return false; - } - } - - - /** - * @notes 删除财务管理--差旅费报销单 - * @param array $params - * @return bool - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function delete(array $params): bool - { - return FinancialTravelReimbursement::destroy($params['id']); - } - - - /** - * @notes 获取财务管理--差旅费报销单详情 - * @param $params - * @return array - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public static function detail($params): array - { - return FinancialTravelReimbursement::findOrEmpty($params['id'])->toArray(); - } -} \ No newline at end of file diff --git a/generate/php/app/adminapi/validate/financial/FinancialExpenseReimbursementValidate.php b/generate/php/app/adminapi/validate/financial/FinancialExpenseReimbursementValidate.php deleted file mode 100644 index 836608d..0000000 --- a/generate/php/app/adminapi/validate/financial/FinancialExpenseReimbursementValidate.php +++ /dev/null @@ -1,112 +0,0 @@ - 'require', - 'contract_id' => 'require', - 'fee_application_id' => 'require', - 'theme' => 'require', - 'code' => 'require', - 'bill_num' => 'require', - 'pay_type' => 'require', - 'content' => 'require', - 'create_user' => 'require', - 'create_time' => 'require', - ]; - - - /** - * 参数描述 - * @var string[] - */ - protected $field = [ - 'id' => 'id', - 'contract_id' => '合同id', - 'fee_application_id' => '费用申请id', - 'theme' => '单据主题', - 'code' => '单据编号', - 'bill_num' => '单据张数', - 'pay_type' => '支付方式', - 'content' => '事由', - 'create_user' => '申请人员', - 'create_time' => '报销日期', - ]; - - - /** - * @notes 添加场景 - * @return FinancialExpenseReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneAdd() - { - return $this->only(['contract_id','fee_application_id','theme','code','bill_num','pay_type','content','create_user','create_time']); - } - - - /** - * @notes 编辑场景 - * @return FinancialExpenseReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneEdit() - { - return $this->only(['id','contract_id','fee_application_id','theme','code','bill_num','pay_type','content','create_user','create_time']); - } - - - /** - * @notes 删除场景 - * @return FinancialExpenseReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneDelete() - { - return $this->only(['id']); - } - - - /** - * @notes 详情场景 - * @return FinancialExpenseReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneDetail() - { - return $this->only(['id']); - } - -} \ No newline at end of file diff --git a/generate/php/app/adminapi/validate/financial/FinancialTravelReimbursementValidate.php b/generate/php/app/adminapi/validate/financial/FinancialTravelReimbursementValidate.php deleted file mode 100644 index ca4911d..0000000 --- a/generate/php/app/adminapi/validate/financial/FinancialTravelReimbursementValidate.php +++ /dev/null @@ -1,114 +0,0 @@ - 'require', - 'code' => 'require', - 'approve_dept' => 'require', - 'cost_type' => 'require', - 'pay_type' => 'require', - 'tax_deductible_amount' => 'require', - 'bill_num' => 'require', - 'fee_application_id' => 'require', - 'content' => 'require', - 'create_user' => 'require', - 'create_time' => 'require', - ]; - - - /** - * 参数描述 - * @var string[] - */ - protected $field = [ - 'id' => 'id', - 'code' => '单据编号', - 'approve_dept' => '审批部门', - 'cost_type' => '费用类别', - 'pay_type' => '支付方式', - 'tax_deductible_amount' => '可抵扣税额', - 'bill_num' => '附单据张数', - 'fee_application_id' => '关联费用申请', - 'content' => '事由', - 'create_user' => '申请人', - 'create_time' => '申请日期', - ]; - - - /** - * @notes 添加场景 - * @return FinancialTravelReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneAdd() - { - return $this->only(['code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']); - } - - - /** - * @notes 编辑场景 - * @return FinancialTravelReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneEdit() - { - return $this->only(['id','code','approve_dept','cost_type','pay_type','tax_deductible_amount','bill_num','fee_application_id','content','create_user','create_time']); - } - - - /** - * @notes 删除场景 - * @return FinancialTravelReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneDelete() - { - return $this->only(['id']); - } - - - /** - * @notes 详情场景 - * @return FinancialTravelReimbursementValidate - * @author likeadmin - * @date 2024/03/28 14:45 - */ - public function sceneDetail() - { - return $this->only(['id']); - } - -} \ No newline at end of file diff --git a/generate/php/app/common/model/financial/FinancialExpenseReimbursement.php b/generate/php/app/common/model/financial/FinancialExpenseReimbursement.php deleted file mode 100644 index 86659b3..0000000 --- a/generate/php/app/common/model/financial/FinancialExpenseReimbursement.php +++ /dev/null @@ -1,34 +0,0 @@ - -