增加相关接口,VO,D等
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
ac32bf3edc
commit
ce6b4097b2
132
.cursor/rules/review.mdc
Normal file
132
.cursor/rules/review.mdc
Normal file
@ -0,0 +1,132 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
# AI Agent Protocol: Self-Contained Mandatory Interactive Final Review Loop with Auto-Script Creation (Version 3)
|
||||
|
||||
## 0. User Advisory & Safety:
|
||||
This is an advanced, experimental rule. It instructs the AI Agent to check for, potentially create, and then execute a Python script (`final_review_gate.py`) in your project's root directory to facilitate an interactive review loop. By using this rule, you acknowledge that the AI will attempt file system operations (read, write, execute) as directed. Ensure the AI's execution environment has appropriate permissions if you expect script auto-creation to work, and be aware of the security implications.
|
||||
|
||||
## 1. Core Principle & Context:
|
||||
Your primary task processing includes a **mandatory final interactive review stage** driven by user input through a specific Python script (`final_review_gate.py`). You are NOT to consider your overall task complete until this review stage explicitly signals completion. This protocol leverages your known capability to run commands in a sub-terminal (displayed within the chat interface) and read their output.
|
||||
|
||||
## Phase 0: Ensure `final_review_gate.py` Script Exists
|
||||
(This phase is executed ONCE per user request that triggers this overall protocol, or if the script is missing or its content is incorrect.)
|
||||
|
||||
1. **Define Script Details:**
|
||||
* **Script Name:** `final_review_gate.py`
|
||||
* **Target Location:** Directly in the root of the current project/workspace.
|
||||
* **Python Script Content (ensure this exact content is used):**
|
||||
```python
|
||||
# final_review_gate.py
|
||||
import sys
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Try to make stdout unbuffered for more responsive interaction.
|
||||
# This might not work on all platforms or if stdout is not a TTY,
|
||||
# but it's a good practice for this kind of interactive script.
|
||||
try:
|
||||
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', buffering=1)
|
||||
except Exception:
|
||||
pass # Ignore if unbuffering fails, e.g., in certain environments
|
||||
|
||||
try:
|
||||
sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', buffering=1)
|
||||
except Exception:
|
||||
pass # Ignore
|
||||
|
||||
print("--- FINAL REVIEW GATE ACTIVE ---", flush=True)
|
||||
print("AI has completed its primary actions. Awaiting your review or further sub-prompts.", flush=True)
|
||||
print("Type your sub-prompt, or one of: 'TASK_COMPLETE', 'Done', 'Quit', 'q' to signal completion.", flush=True) # MODIFIED
|
||||
|
||||
active_session = True
|
||||
while active_session:
|
||||
try:
|
||||
# Signal that the script is ready for input.
|
||||
# The AI doesn't need to parse this, but it's good for user visibility.
|
||||
print("REVIEW_GATE_AWAITING_INPUT:", end="", flush=True)
|
||||
|
||||
line = sys.stdin.readline()
|
||||
|
||||
if not line: # EOF
|
||||
print("--- REVIEW GATE: STDIN CLOSED (EOF), EXITING SCRIPT ---", flush=True)
|
||||
active_session = False
|
||||
break
|
||||
|
||||
user_input = line.strip()
|
||||
|
||||
# Check for exit conditions
|
||||
if user_input.upper() in ['TASK_COMPLETE', 'DONE', 'QUIT', 'Q']: # MODIFIED: Empty string no longer exits
|
||||
print(f"--- REVIEW GATE: USER SIGNALED COMPLETION WITH '{user_input.upper()}' ---", flush=True)
|
||||
active_session = False
|
||||
break
|
||||
elif user_input: # If there's any other non-empty input (and not a completion command)
|
||||
# This is the critical line the AI will "listen" for.
|
||||
print(f"USER_REVIEW_SUB_PROMPT: {user_input}", flush=True)
|
||||
# If user_input was empty (and not a completion command),
|
||||
# the loop simply continues, and "REVIEW_GATE_AWAITING_INPUT:" will be printed again.
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("--- REVIEW GATE: SESSION INTERRUPTED BY USER (KeyboardInterrupt) ---", flush=True)
|
||||
active_session = False
|
||||
break
|
||||
except Exception as e:
|
||||
print(f"--- REVIEW GATE SCRIPT ERROR: {e} ---", flush=True)
|
||||
active_session = False
|
||||
break
|
||||
|
||||
print("--- FINAL REVIEW GATE SCRIPT EXITED ---", flush=True)
|
||||
```
|
||||
|
||||
2. **Ensure Script Existence and Correctness:**
|
||||
a. Use your file system tools to check if the file `final_review_gate.py` exists in the project root.
|
||||
b. **If the file `final_review_gate.py` does NOT exist OR if its content does not EXACTLY match the Python script provided in section "Phase 0.1.Python Script Content" (you may need to read the existing file and compare):**
|
||||
i. You MUST create or overwrite the `final_review_gate.py` file in the project root.
|
||||
ii. The content of this file MUST be *exactly* the Python script content provided above. Ensure all indentation, comments, and lines are preserved perfectly. Use your "create file" or "edit file" tool.
|
||||
iii. After creating/overwriting it, announce: "The `final_review_gate.py` script has been created/updated in the project root with the latest interaction enhancements."
|
||||
c. **If the file `final_review_gate.py` already exists and its content is correct:** You may skip announcing its creation.
|
||||
d. If you encounter any errors checking for, reading, or creating/writing the file (e.g., permission issues), you MUST report this to the user. State clearly: "Error managing `final_review_gate.py`: [specific error]. Cannot proceed with interactive review." and then conclude the interaction for the main task as best as you can without this interactive step.
|
||||
|
||||
## Phase 1: Primary Task Execution
|
||||
1. Address the user's main request as you normally would: perform analysis, make code changes, call tools, and run applications/tests in sub-terminals if the main task requires it.
|
||||
* **Application Execution Confirmation:** Before attempting to run an entire application (e.g., a web server, a full front-end build, a long-running background process), you MUST ask the user for explicit confirmation. For example: "I am about to run the [application name/command]. Is it okay to proceed, or is it possibly already running?"
|
||||
* This confirmation is NOT required for running individual test scripts, linters, build tools for specific components, or other non-application-level commands necessary for task completion.
|
||||
* If the user indicates an application is already running or denies permission, adapt your strategy accordingly (e.g., focus on tests or specific file executions).
|
||||
2. Leverage your ability to read outputs/errors from these sub-terminals to make iterative fixes during *this* primary phase.
|
||||
|
||||
## Phase 2: Mandatory Final Interactive Review Script Execution
|
||||
1. **Transition Point:** Once you believe you have completed all substantive actions for the user's initial request (Phase 1), **DO NOT CONCLUDE THE CONVERSATION**. You MUST now transition to this Final Interactive Review phase.
|
||||
2. **Action:** Execute the `final_review_gate.py` script (which you ensured exists and is correct in Phase 0) from the project root.
|
||||
* Determine the correct Python interpreter command (e.g., `python`, `python3`) available in the execution environment. A robust command attempt would be `python3 ./final_review_gate.py` and if that fails, try `python ./final_review_gate.py`.
|
||||
* **Crucially, the terminal for this script MUST run directly within the chat window, and its output MUST be continuously visible to the user as it is generated.** It must NOT pop open as a separate window or run hidden in the background. You MUST wait for the script (and its terminal interaction) to fully complete and exit before you proceed with any further actions or attempt to conclude the overall task. Your processing will be blocked by this script's execution.
|
||||
3. **Announcement:** Clearly inform the user: "I have completed the primary actions. Now initiating the mandatory Final Interactive Review by running `./final_review_gate.py`. The review terminal is now active **in this chat window, and its output will be displayed live**. Please provide any sub-prompts directly into that script's input area, or type 'TASK_COMPLETE', 'Done', 'Quit', or 'q' when satisfied." (MODIFIED: Removed "or simply press Enter")
|
||||
|
||||
## Phase 3: Interactive Review Loop (Monitoring Script Output)
|
||||
1. **Active Monitoring & Display:** Continuously monitor the standard output (stdout) of the launched `final_review_gate.py` script **as it appears live in the chat window**. Ensure the user sees all script output, including the `REVIEW_GATE_AWAITING_INPUT:` prompt. You will "read" its output using the same capability that allows you to read terminal logs or error messages. The script will loop and re-prompt if an empty input is given.
|
||||
2. **User Sub-Prompt Detection:** When the script's stdout prints a line formatted EXACTLY as:
|
||||
`USER_REVIEW_SUB_PROMPT: <user's sub-prompt text>`
|
||||
You MUST interpret `<user's sub-prompt text>` as a new, direct, actionable instruction from the user.
|
||||
3. **Processing Sub-Prompts:**
|
||||
a. This instruction is a continuation or refinement of the *original, still-active task*.
|
||||
b. Analyze the sub-prompt. Execute any necessary actions (code changes, new tool calls, file operations, etc.). **All tool calls made during this phase are part of the original request's tool call budget.** If the sub-prompt requests running an entire application, the confirmation principle from "Phase 1, Step 1 (Application Execution Confirmation)" applies.
|
||||
c. Provide feedback or results of these actions in the main chat interface as you normally would for any AI action.
|
||||
d. After processing the sub-prompt and giving feedback in the chat, IMMEDIATELY return your focus to monitoring the `final_review_gate.py` script's terminal output (which remains live and visible in the chat) for the next user instruction or completion signal. This loop is critical.
|
||||
4. **Completion Signal Detection:** The interactive review loop continues until the script's stdout (visible in the chat window) prints a line containing:
|
||||
* `--- REVIEW GATE: USER SIGNALED COMPLETION WITH 'TASK_COMPLETE' ---` (or 'DONE', 'QUIT', 'Q' as per script logic)
|
||||
* OR `--- FINAL REVIEW GATE SCRIPT EXITED ---` (or any other script exit/error message like `REVIEW GATE: STDIN CLOSED` or `REVIEW GATE SCRIPT ERROR:`)
|
||||
(MODIFIED: Removed specific "EMPTY INPUT RECEIVED" as a completion signal, as the script no longer behaves this way for completion.)
|
||||
|
||||
## Phase 4: True Task Conclusion
|
||||
1. Only after the `final_review_gate.py` script has terminated (as observed by its terminal session in the chat window closing and its final exit messages being printed and visible) are you permitted to consider the user's original request fully satisfied.
|
||||
2. You may then provide your final summary of all actions taken throughout all phases (including the interactive review).
|
||||
|
||||
## Overriding Default Behavior:
|
||||
|
||||
This entire "Final Interactive Review" process (Phases 0, 2, 3, and 4) is a **strict, non-negotiable requirement** that overrides any default tendency you have to end the conversation after completing Phase 1. The task is only finished when the user explicitly confirms with one of the specified keywords through the review script or the script otherwise terminates due to an error or EOF (as per the defined behavior, including the in-chat, blocking, and continuously visible terminal execution). Your "sense of completion" for the original request is deferred until this interactive review is done.
|
||||
@ -163,9 +163,13 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode NOTIFY_TEMPLATE_NOT_EXISTS = new ErrorCode(1_002_026_000, "站内信模版不存在");
|
||||
ErrorCode NOTIFY_TEMPLATE_CODE_DUPLICATE = new ErrorCode(1_002_026_001, "已经存在编码为【{}】的站内信模板");
|
||||
|
||||
// ========== 站内信模版 1-002-027-000 ==========
|
||||
|
||||
// ========== 站内信发送 1-002-028-000 ==========
|
||||
ErrorCode NOTIFY_SEND_TEMPLATE_PARAM_MISS = new ErrorCode(1_002_028_000, "模板参数({})缺失");
|
||||
|
||||
// ========== 人员档案 1-002-029-000 ==========
|
||||
ErrorCode PERSON_ARCHIVE_NOT_EXISTS = new ErrorCode(1_002_029_000, "人员档案不存在");
|
||||
|
||||
// ========== 人员档案 1-002-030-000 ==========
|
||||
ErrorCode PERSON_NOT_EXISTS = new ErrorCode(1_002_030_000, "用户不存在");
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.person;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.person.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.person.PersonDO;
|
||||
import cn.iocoder.yudao.module.system.service.person.PersonService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户基本信息")
|
||||
@RestController
|
||||
@RequestMapping("/system/person")
|
||||
@Validated
|
||||
public class PersonController {
|
||||
|
||||
@Resource
|
||||
private PersonService personService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户基本信息")
|
||||
public CommonResult<Integer> createPerson(@Valid @RequestBody PersonSaveReqVO createReqVO) {
|
||||
return success(personService.createPerson(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户基本信息")
|
||||
public CommonResult<Boolean> updatePerson(@Valid @RequestBody PersonSaveReqVO updateReqVO) {
|
||||
personService.updatePerson(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户基本信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<Boolean> deletePerson(@RequestParam("id") Integer id) {
|
||||
personService.deletePerson(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户基本信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<PersonRespVO> getPerson(@RequestParam("id") Integer id) {
|
||||
PersonDO person = personService.getPerson(id);
|
||||
return success(BeanUtils.toBean(person, PersonRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户基本信息分页")
|
||||
public CommonResult<PageResult<PersonRespVO>> getPersonPage(@Valid PersonPageReqVO pageReqVO) {
|
||||
PageResult<PersonDO> pageResult = personService.getPersonPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PersonRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户基本信息 Excel")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPersonExcel(@Valid PersonPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PersonDO> list = personService.getPersonPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户基本信息.xls", "数据", PersonRespVO.class,
|
||||
BeanUtils.toBean(list, PersonRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.person.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户基本信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PersonPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "手机号(登录账号)")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "姓名", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "机构ID", example = "25685")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", example = "张三")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "家庭组号", example = "5946")
|
||||
private String familyid;
|
||||
|
||||
@Schema(description = "家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他")
|
||||
private Integer familyrelation;
|
||||
|
||||
@Schema(description = "是否会员:0-否,1-是")
|
||||
private Integer isvip;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.person.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户基本信息 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PersonRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8797")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "手机号(登录账号)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("手机号(登录账号)")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "机构ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25685")
|
||||
@ExcelProperty("机构ID")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("机构名称")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "家庭组号", example = "5946")
|
||||
@ExcelProperty("家庭组号")
|
||||
private String familyid;
|
||||
|
||||
@Schema(description = "家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他")
|
||||
@ExcelProperty("家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他")
|
||||
private Integer familyrelation;
|
||||
|
||||
@Schema(description = "是否会员:0-否,1-是")
|
||||
@ExcelProperty("是否会员:0-否,1-是")
|
||||
private Integer isvip;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
@ExcelProperty("身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@ExcelProperty("更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.person.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户基本信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class PersonSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8797")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "手机号(登录账号)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "手机号(登录账号)不能为空")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "机构ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25685")
|
||||
@NotNull(message = "机构ID不能为空")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "机构名称不能为空")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "家庭组号", example = "5946")
|
||||
private String familyid;
|
||||
|
||||
@Schema(description = "家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他")
|
||||
private Integer familyrelation;
|
||||
|
||||
@Schema(description = "是否会员:0-否,1-是")
|
||||
private Integer isvip;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.personarchive;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.system.controller.admin.personarchive.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.personarchive.PersonArchiveDO;
|
||||
import cn.iocoder.yudao.module.system.service.personarchive.PersonArchiveService;
|
||||
|
||||
@Tag(name = "管理后台 - 人员档案")
|
||||
@RestController
|
||||
@RequestMapping("/system/person-archive")
|
||||
@Validated
|
||||
public class PersonArchiveController {
|
||||
|
||||
@Resource
|
||||
private PersonArchiveService personArchiveService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建人员档案")
|
||||
public CommonResult<Integer> createPersonArchive(@Valid @RequestBody PersonArchiveSaveReqVO createReqVO) {
|
||||
return success(personArchiveService.createPersonArchive(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新人员档案")
|
||||
public CommonResult<Boolean> updatePersonArchive(@Valid @RequestBody PersonArchiveSaveReqVO updateReqVO) {
|
||||
personArchiveService.updatePersonArchive(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除人员档案")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
public CommonResult<Boolean> deletePersonArchive(@RequestParam("id") Integer id) {
|
||||
personArchiveService.deletePersonArchive(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得人员档案")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
public CommonResult<PersonArchiveRespVO> getPersonArchive(@RequestParam("id") Integer id) {
|
||||
PersonArchiveDO personArchive = personArchiveService.getPersonArchive(id);
|
||||
return success(BeanUtils.toBean(personArchive, PersonArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得人员档案分页")
|
||||
public CommonResult<PageResult<PersonArchiveRespVO>> getPersonArchivePage(@Valid PersonArchivePageReqVO pageReqVO) {
|
||||
PageResult<PersonArchiveDO> pageResult = personArchiveService.getPersonArchivePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PersonArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出人员档案 Excel")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPersonArchiveExcel(@Valid PersonArchivePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PersonArchiveDO> list = personArchiveService.getPersonArchivePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "人员档案.xls", "数据", PersonArchiveRespVO.class,
|
||||
BeanUtils.toBean(list, PersonArchiveRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.personarchive.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 人员档案分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PersonArchivePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "人员表ID", example = "7862")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "机构ID", example = "12776")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", example = "赵六")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "姓名", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "户籍住址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "血型", example = "1")
|
||||
private String bloodtype;
|
||||
|
||||
@Schema(description = "睡眠情况")
|
||||
private String sleepsituation;
|
||||
|
||||
@Schema(description = "身高cm")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "体重kg")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "腰围cm")
|
||||
private BigDecimal waist;
|
||||
|
||||
@Schema(description = "臀围cm")
|
||||
private BigDecimal hip;
|
||||
|
||||
@Schema(description = "饮酒情况")
|
||||
private String drinking;
|
||||
|
||||
@Schema(description = "残疾情况 0无 1有")
|
||||
private Integer disability;
|
||||
|
||||
@Schema(description = "药物过敏史 0无 1有")
|
||||
private Integer drugallergy;
|
||||
|
||||
@Schema(description = "暴露史 0无 1有")
|
||||
private Integer exposure;
|
||||
|
||||
@Schema(description = "疾病史 0无 1有")
|
||||
private Integer diseasehistory;
|
||||
|
||||
@Schema(description = "手术史 0无 1有")
|
||||
private Integer surgeryhistory;
|
||||
|
||||
@Schema(description = "外伤史 0无 1有")
|
||||
private Integer traumahistory;
|
||||
|
||||
@Schema(description = "输血史 0无 1有")
|
||||
private Integer transfusionhistory;
|
||||
|
||||
@Schema(description = "残疾情况描述")
|
||||
private String disabilitydesc;
|
||||
|
||||
@Schema(description = "药物过敏史描述")
|
||||
private String drugallergydesc;
|
||||
|
||||
@Schema(description = "暴露史描述")
|
||||
private String exposuredesc;
|
||||
|
||||
@Schema(description = "疾病史描述")
|
||||
private String diseasehistorydesc;
|
||||
|
||||
@Schema(description = "手术史描述")
|
||||
private String surgeryhistorydesc;
|
||||
|
||||
@Schema(description = "外伤史描述")
|
||||
private String traumahistorydesc;
|
||||
|
||||
@Schema(description = "输血史描述")
|
||||
private String transfusionhistorydesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.personarchive.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 人员档案 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PersonArchiveRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3315")
|
||||
@ExcelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "人员表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7862")
|
||||
@ExcelProperty("人员表ID")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "机构ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
|
||||
@ExcelProperty("机构ID")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("机构名称")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
@ExcelProperty("性别 1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "年龄")
|
||||
@ExcelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
@ExcelProperty("身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "户籍住址")
|
||||
@ExcelProperty("户籍住址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
@ExcelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "血型", example = "1")
|
||||
@ExcelProperty("血型")
|
||||
private String bloodtype;
|
||||
|
||||
@Schema(description = "睡眠情况")
|
||||
@ExcelProperty("睡眠情况")
|
||||
private String sleepsituation;
|
||||
|
||||
@Schema(description = "身高cm")
|
||||
@ExcelProperty("身高cm")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "体重kg")
|
||||
@ExcelProperty("体重kg")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "腰围cm")
|
||||
@ExcelProperty("腰围cm")
|
||||
private BigDecimal waist;
|
||||
|
||||
@Schema(description = "臀围cm")
|
||||
@ExcelProperty("臀围cm")
|
||||
private BigDecimal hip;
|
||||
|
||||
@Schema(description = "饮酒情况")
|
||||
@ExcelProperty("饮酒情况")
|
||||
private String drinking;
|
||||
|
||||
@Schema(description = "残疾情况 0无 1有")
|
||||
@ExcelProperty("残疾情况 0无 1有")
|
||||
private Integer disability;
|
||||
|
||||
@Schema(description = "药物过敏史 0无 1有")
|
||||
@ExcelProperty("药物过敏史 0无 1有")
|
||||
private Integer drugallergy;
|
||||
|
||||
@Schema(description = "暴露史 0无 1有")
|
||||
@ExcelProperty("暴露史 0无 1有")
|
||||
private Integer exposure;
|
||||
|
||||
@Schema(description = "疾病史 0无 1有")
|
||||
@ExcelProperty("疾病史 0无 1有")
|
||||
private Integer diseasehistory;
|
||||
|
||||
@Schema(description = "手术史 0无 1有")
|
||||
@ExcelProperty("手术史 0无 1有")
|
||||
private Integer surgeryhistory;
|
||||
|
||||
@Schema(description = "外伤史 0无 1有")
|
||||
@ExcelProperty("外伤史 0无 1有")
|
||||
private Integer traumahistory;
|
||||
|
||||
@Schema(description = "输血史 0无 1有")
|
||||
@ExcelProperty("输血史 0无 1有")
|
||||
private Integer transfusionhistory;
|
||||
|
||||
@Schema(description = "残疾情况描述")
|
||||
@ExcelProperty("残疾情况描述")
|
||||
private String disabilitydesc;
|
||||
|
||||
@Schema(description = "药物过敏史描述")
|
||||
@ExcelProperty("药物过敏史描述")
|
||||
private String drugallergydesc;
|
||||
|
||||
@Schema(description = "暴露史描述")
|
||||
@ExcelProperty("暴露史描述")
|
||||
private String exposuredesc;
|
||||
|
||||
@Schema(description = "疾病史描述")
|
||||
@ExcelProperty("疾病史描述")
|
||||
private String diseasehistorydesc;
|
||||
|
||||
@Schema(description = "手术史描述")
|
||||
@ExcelProperty("手术史描述")
|
||||
private String surgeryhistorydesc;
|
||||
|
||||
@Schema(description = "外伤史描述")
|
||||
@ExcelProperty("外伤史描述")
|
||||
private String traumahistorydesc;
|
||||
|
||||
@Schema(description = "输血史描述")
|
||||
@ExcelProperty("输血史描述")
|
||||
private String transfusionhistorydesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@ExcelProperty("更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@ExcelProperty("更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.personarchive.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 人员档案新增/修改 Request VO")
|
||||
@Data
|
||||
public class PersonArchiveSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3315")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "人员表ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7862")
|
||||
@NotNull(message = "人员表ID不能为空")
|
||||
private Integer userid;
|
||||
|
||||
@Schema(description = "机构ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
|
||||
@NotNull(message = "机构ID不能为空")
|
||||
private Integer orgid;
|
||||
|
||||
@Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "机构名称不能为空")
|
||||
private String orgname;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@Schema(description = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String idcard;
|
||||
|
||||
@Schema(description = "户籍住址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "血型", example = "1")
|
||||
private String bloodtype;
|
||||
|
||||
@Schema(description = "睡眠情况")
|
||||
private String sleepsituation;
|
||||
|
||||
@Schema(description = "身高cm")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "体重kg")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(description = "腰围cm")
|
||||
private BigDecimal waist;
|
||||
|
||||
@Schema(description = "臀围cm")
|
||||
private BigDecimal hip;
|
||||
|
||||
@Schema(description = "饮酒情况")
|
||||
private String drinking;
|
||||
|
||||
@Schema(description = "残疾情况 0无 1有")
|
||||
private Integer disability;
|
||||
|
||||
@Schema(description = "药物过敏史 0无 1有")
|
||||
private Integer drugallergy;
|
||||
|
||||
@Schema(description = "暴露史 0无 1有")
|
||||
private Integer exposure;
|
||||
|
||||
@Schema(description = "疾病史 0无 1有")
|
||||
private Integer diseasehistory;
|
||||
|
||||
@Schema(description = "手术史 0无 1有")
|
||||
private Integer surgeryhistory;
|
||||
|
||||
@Schema(description = "外伤史 0无 1有")
|
||||
private Integer traumahistory;
|
||||
|
||||
@Schema(description = "输血史 0无 1有")
|
||||
private Integer transfusionhistory;
|
||||
|
||||
@Schema(description = "残疾情况描述")
|
||||
private String disabilitydesc;
|
||||
|
||||
@Schema(description = "药物过敏史描述")
|
||||
private String drugallergydesc;
|
||||
|
||||
@Schema(description = "暴露史描述")
|
||||
private String exposuredesc;
|
||||
|
||||
@Schema(description = "疾病史描述")
|
||||
private String diseasehistorydesc;
|
||||
|
||||
@Schema(description = "手术史描述")
|
||||
private String surgeryhistorydesc;
|
||||
|
||||
@Schema(description = "外伤史描述")
|
||||
private String traumahistorydesc;
|
||||
|
||||
@Schema(description = "输血史描述")
|
||||
private String transfusionhistorydesc;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createtime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatetime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createby;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.person;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 用户基本信息 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("tb_user")
|
||||
@KeySequence("tb_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PersonDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 手机号(登录账号)
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@TableField("password")
|
||||
private String password;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@TableField("orgid")
|
||||
private Integer orgid;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@TableField("orgname")
|
||||
private String orgname;
|
||||
/**
|
||||
* 家庭组号
|
||||
*/
|
||||
@TableField("familyid")
|
||||
private String familyid;
|
||||
/**
|
||||
* 家庭关系:1-本人,2-兄弟,3-父亲,4-母亲,5-子女,6-其他
|
||||
*/
|
||||
@TableField("familyrelation")
|
||||
private Integer familyrelation;
|
||||
/**
|
||||
* 是否会员:0-否,1-是
|
||||
*/
|
||||
@TableField("isvip")
|
||||
private Integer isvip;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@TableField("idcard")
|
||||
private String idcard;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("createtime")
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("updatetime")
|
||||
private LocalDateTime updatetime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("createby")
|
||||
private String createby;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updateby")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.personarchive;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 人员档案 DO
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@TableName("tb_person_archive")
|
||||
@KeySequence("tb_person_archive_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PersonArchiveDO {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 人员表ID
|
||||
*/
|
||||
@TableField("userid")
|
||||
private Integer userid;
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@TableField("orgid")
|
||||
private Integer orgid;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@TableField("orgname")
|
||||
private String orgname;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
/**
|
||||
* 性别 1男 2女
|
||||
*/
|
||||
@TableField("gender")
|
||||
private Integer gender;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@TableField("age")
|
||||
private Integer age;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@TableField("idcard")
|
||||
private String idcard;
|
||||
/**
|
||||
* 户籍住址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
/**
|
||||
* 血型
|
||||
*/
|
||||
@TableField("bloodtype")
|
||||
private String bloodtype;
|
||||
/**
|
||||
* 睡眠情况
|
||||
*/
|
||||
@TableField("sleepsituation")
|
||||
private String sleepsituation;
|
||||
/**
|
||||
* 身高cm
|
||||
*/
|
||||
@TableField("height")
|
||||
private BigDecimal height;
|
||||
/**
|
||||
* 体重kg
|
||||
*/
|
||||
@TableField("weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 腰围cm
|
||||
*/
|
||||
@TableField("waist")
|
||||
private BigDecimal waist;
|
||||
/**
|
||||
* 臀围cm
|
||||
*/
|
||||
@TableField("hip")
|
||||
private BigDecimal hip;
|
||||
/**
|
||||
* 饮酒情况
|
||||
*/
|
||||
@TableField("drinking")
|
||||
private String drinking;
|
||||
/**
|
||||
* 残疾情况 0无 1有
|
||||
*/
|
||||
@TableField("disability")
|
||||
private Integer disability;
|
||||
/**
|
||||
* 药物过敏史 0无 1有
|
||||
*/
|
||||
@TableField("drugallergy")
|
||||
private Integer drugallergy;
|
||||
/**
|
||||
* 暴露史 0无 1有
|
||||
*/
|
||||
@TableField("exposure")
|
||||
private Integer exposure;
|
||||
/**
|
||||
* 疾病史 0无 1有
|
||||
*/
|
||||
@TableField("diseasehistory")
|
||||
private Integer diseasehistory;
|
||||
/**
|
||||
* 手术史 0无 1有
|
||||
*/
|
||||
@TableField("surgeryhistory")
|
||||
private Integer surgeryhistory;
|
||||
/**
|
||||
* 外伤史 0无 1有
|
||||
*/
|
||||
@TableField("traumahistory")
|
||||
private Integer traumahistory;
|
||||
/**
|
||||
* 输血史 0无 1有
|
||||
*/
|
||||
@TableField("transfusionhistory")
|
||||
private Integer transfusionhistory;
|
||||
/**
|
||||
* 残疾情况描述
|
||||
*/
|
||||
@TableField("disabilitydesc")
|
||||
private String disabilitydesc;
|
||||
/**
|
||||
* 药物过敏史描述
|
||||
*/
|
||||
@TableField("drugallergydesc")
|
||||
private String drugallergydesc;
|
||||
/**
|
||||
* 暴露史描述
|
||||
*/
|
||||
@TableField("exposuredesc")
|
||||
private String exposuredesc;
|
||||
/**
|
||||
* 疾病史描述
|
||||
*/
|
||||
@TableField("diseasehistorydesc")
|
||||
private String diseasehistorydesc;
|
||||
/**
|
||||
* 手术史描述
|
||||
*/
|
||||
@TableField("surgeryhistorydesc")
|
||||
private String surgeryhistorydesc;
|
||||
/**
|
||||
* 外伤史描述
|
||||
*/
|
||||
@TableField("traumahistorydesc")
|
||||
private String traumahistorydesc;
|
||||
/**
|
||||
* 输血史描述
|
||||
*/
|
||||
@TableField("transfusionhistorydesc")
|
||||
private String transfusionhistorydesc;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("createtime")
|
||||
private LocalDateTime createtime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("updatetime")
|
||||
private LocalDateTime updatetime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("createby")
|
||||
private String createby;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updateby")
|
||||
private String updateby;
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.person;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.person.PersonDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.person.vo.*;
|
||||
|
||||
/**
|
||||
* 用户基本信息 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface PersonMapper extends BaseMapperX<PersonDO> {
|
||||
|
||||
default PageResult<PersonDO> selectPage(PersonPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PersonDO>()
|
||||
.eqIfPresent(PersonDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(PersonDO::getPassword, reqVO.getPassword())
|
||||
.likeIfPresent(PersonDO::getName, reqVO.getName())
|
||||
.eqIfPresent(PersonDO::getAddress, reqVO.getAddress())
|
||||
.eqIfPresent(PersonDO::getOrgid, reqVO.getOrgid())
|
||||
.likeIfPresent(PersonDO::getOrgname, reqVO.getOrgname())
|
||||
.eqIfPresent(PersonDO::getFamilyid, reqVO.getFamilyid())
|
||||
.eqIfPresent(PersonDO::getFamilyrelation, reqVO.getFamilyrelation())
|
||||
.eqIfPresent(PersonDO::getIsvip, reqVO.getIsvip())
|
||||
.eqIfPresent(PersonDO::getIdcard, reqVO.getIdcard())
|
||||
.betweenIfPresent(PersonDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(PersonDO::getUpdatetime, reqVO.getUpdatetime())
|
||||
.eqIfPresent(PersonDO::getCreateby, reqVO.getCreateby())
|
||||
.eqIfPresent(PersonDO::getUpdateby, reqVO.getUpdateby())
|
||||
.orderByDesc(PersonDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.iocoder.yudao.module.system.dal.mysql.personarchive;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.personarchive.PersonArchiveDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.personarchive.vo.*;
|
||||
|
||||
/**
|
||||
* 人员档案 Mapper
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Mapper
|
||||
public interface PersonArchiveMapper extends BaseMapperX<PersonArchiveDO> {
|
||||
|
||||
default PageResult<PersonArchiveDO> selectPage(PersonArchivePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PersonArchiveDO>()
|
||||
.eqIfPresent(PersonArchiveDO::getUserid, reqVO.getUserid())
|
||||
.eqIfPresent(PersonArchiveDO::getOrgid, reqVO.getOrgid())
|
||||
.likeIfPresent(PersonArchiveDO::getOrgname, reqVO.getOrgname())
|
||||
.likeIfPresent(PersonArchiveDO::getName, reqVO.getName())
|
||||
.eqIfPresent(PersonArchiveDO::getGender, reqVO.getGender())
|
||||
.eqIfPresent(PersonArchiveDO::getAge, reqVO.getAge())
|
||||
.eqIfPresent(PersonArchiveDO::getIdcard, reqVO.getIdcard())
|
||||
.eqIfPresent(PersonArchiveDO::getAddress, reqVO.getAddress())
|
||||
.eqIfPresent(PersonArchiveDO::getPhone, reqVO.getPhone())
|
||||
.eqIfPresent(PersonArchiveDO::getBloodtype, reqVO.getBloodtype())
|
||||
.eqIfPresent(PersonArchiveDO::getSleepsituation, reqVO.getSleepsituation())
|
||||
.eqIfPresent(PersonArchiveDO::getHeight, reqVO.getHeight())
|
||||
.eqIfPresent(PersonArchiveDO::getWeight, reqVO.getWeight())
|
||||
.eqIfPresent(PersonArchiveDO::getWaist, reqVO.getWaist())
|
||||
.eqIfPresent(PersonArchiveDO::getHip, reqVO.getHip())
|
||||
.eqIfPresent(PersonArchiveDO::getDrinking, reqVO.getDrinking())
|
||||
.eqIfPresent(PersonArchiveDO::getDisability, reqVO.getDisability())
|
||||
.eqIfPresent(PersonArchiveDO::getDrugallergy, reqVO.getDrugallergy())
|
||||
.eqIfPresent(PersonArchiveDO::getExposure, reqVO.getExposure())
|
||||
.eqIfPresent(PersonArchiveDO::getDiseasehistory, reqVO.getDiseasehistory())
|
||||
.eqIfPresent(PersonArchiveDO::getSurgeryhistory, reqVO.getSurgeryhistory())
|
||||
.eqIfPresent(PersonArchiveDO::getTraumahistory, reqVO.getTraumahistory())
|
||||
.eqIfPresent(PersonArchiveDO::getTransfusionhistory, reqVO.getTransfusionhistory())
|
||||
.eqIfPresent(PersonArchiveDO::getDisabilitydesc, reqVO.getDisabilitydesc())
|
||||
.eqIfPresent(PersonArchiveDO::getDrugallergydesc, reqVO.getDrugallergydesc())
|
||||
.eqIfPresent(PersonArchiveDO::getExposuredesc, reqVO.getExposuredesc())
|
||||
.eqIfPresent(PersonArchiveDO::getDiseasehistorydesc, reqVO.getDiseasehistorydesc())
|
||||
.eqIfPresent(PersonArchiveDO::getSurgeryhistorydesc, reqVO.getSurgeryhistorydesc())
|
||||
.eqIfPresent(PersonArchiveDO::getTraumahistorydesc, reqVO.getTraumahistorydesc())
|
||||
.eqIfPresent(PersonArchiveDO::getTransfusionhistorydesc, reqVO.getTransfusionhistorydesc())
|
||||
.betweenIfPresent(PersonArchiveDO::getCreatetime, reqVO.getCreatetime())
|
||||
.betweenIfPresent(PersonArchiveDO::getUpdatetime, reqVO.getUpdatetime())
|
||||
.eqIfPresent(PersonArchiveDO::getCreateby, reqVO.getCreateby())
|
||||
.eqIfPresent(PersonArchiveDO::getUpdateby, reqVO.getUpdateby())
|
||||
.orderByDesc(PersonArchiveDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.person;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.person.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.person.PersonDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 用户基本信息 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface PersonService {
|
||||
|
||||
/**
|
||||
* 创建用户基本信息
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createPerson(@Valid PersonSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新用户基本信息
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePerson(@Valid PersonSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除用户基本信息
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePerson(Integer id);
|
||||
|
||||
/**
|
||||
* 获得用户基本信息
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 用户基本信息
|
||||
*/
|
||||
PersonDO getPerson(Integer id);
|
||||
|
||||
/**
|
||||
* 获得用户基本信息分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 用户基本信息分页
|
||||
*/
|
||||
PageResult<PersonDO> getPersonPage(PersonPageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.system.service.person;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.person.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.person.PersonDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.person.PersonMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 用户基本信息 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PersonServiceImpl implements PersonService {
|
||||
|
||||
@Resource
|
||||
private PersonMapper personMapper;
|
||||
|
||||
@Override
|
||||
public Integer createPerson(PersonSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PersonDO person = BeanUtils.toBean(createReqVO, PersonDO.class);
|
||||
personMapper.insert(person);
|
||||
// 返回
|
||||
return person.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePerson(PersonSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePersonExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PersonDO updateObj = BeanUtils.toBean(updateReqVO, PersonDO.class);
|
||||
personMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePerson(Integer id) {
|
||||
// 校验存在
|
||||
validatePersonExists(id);
|
||||
// 删除
|
||||
personMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatePersonExists(Integer id) {
|
||||
if (personMapper.selectById(id) == null) {
|
||||
throw exception(PERSON_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonDO getPerson(Integer id) {
|
||||
return personMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PersonDO> getPersonPage(PersonPageReqVO pageReqVO) {
|
||||
return personMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.system.service.personarchive;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.personarchive.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.personarchive.PersonArchiveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 人员档案 Service 接口
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
public interface PersonArchiveService {
|
||||
|
||||
/**
|
||||
* 创建人员档案
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Integer createPersonArchive(@Valid PersonArchiveSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新人员档案
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePersonArchive(@Valid PersonArchiveSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除人员档案
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePersonArchive(Integer id);
|
||||
|
||||
/**
|
||||
* 获得人员档案
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 人员档案
|
||||
*/
|
||||
PersonArchiveDO getPersonArchive(Integer id);
|
||||
|
||||
/**
|
||||
* 获得人员档案分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 人员档案分页
|
||||
*/
|
||||
PageResult<PersonArchiveDO> getPersonArchivePage(PersonArchivePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package cn.iocoder.yudao.module.system.service.personarchive;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.personarchive.vo.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.personarchive.PersonArchiveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.personarchive.PersonArchiveMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 人员档案 Service 实现类
|
||||
*
|
||||
* @author 全智安
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PersonArchiveServiceImpl implements PersonArchiveService {
|
||||
|
||||
@Resource
|
||||
private PersonArchiveMapper personArchiveMapper;
|
||||
|
||||
@Override
|
||||
public Integer createPersonArchive(PersonArchiveSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
PersonArchiveDO personArchive = BeanUtils.toBean(createReqVO, PersonArchiveDO.class);
|
||||
personArchiveMapper.insert(personArchive);
|
||||
// 返回
|
||||
return personArchive.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePersonArchive(PersonArchiveSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePersonArchiveExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PersonArchiveDO updateObj = BeanUtils.toBean(updateReqVO, PersonArchiveDO.class);
|
||||
personArchiveMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePersonArchive(Integer id) {
|
||||
// 校验存在
|
||||
validatePersonArchiveExists(id);
|
||||
// 删除
|
||||
personArchiveMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validatePersonArchiveExists(Integer id) {
|
||||
if (personArchiveMapper.selectById(id) == null) {
|
||||
throw exception(PERSON_ARCHIVE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonArchiveDO getPersonArchive(Integer id) {
|
||||
return personArchiveMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PersonArchiveDO> getPersonArchivePage(PersonArchivePageReqVO pageReqVO) {
|
||||
return personArchiveMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.person.PersonMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.system.dal.mysql.personarchive.PersonArchiveMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
@ -278,6 +278,8 @@ yudao:
|
||||
- /admin-api/system/user/profile/**
|
||||
- /admin-api/system/auth/**
|
||||
ignore-tables:
|
||||
- tb_person_archive # 忽略人员档案表
|
||||
- tb_user # 忽略小程序用户表
|
||||
ignore-caches:
|
||||
- user_role_ids
|
||||
- permission_menu_ids
|
||||
|
||||
Loading…
Reference in New Issue
Block a user