Commit 81fb02fb authored by 王蔡翾's avatar 王蔡翾
Browse files

初始化

parent b6478659
# operation_platform
## Getting started
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
## Add your files
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin http://gitlab.ruzhoukj.com/wangcaixuan/operation_platform.git
git branch -M master
git push -uf origin master
```
## Integrate with your tools
- [ ] [Set up project integrations](http://gitlab.ruzhoukj.com/wangcaixuan/operation_platform/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name
Choose a self-explaining name for your project.
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
......@@ -38,4 +38,11 @@ public class MessageController extends BaseController {
public Result<PeopleMessageVO> queryPeople(@RequestParam(name = "stationId")Long stationId) {
return Result.data(messageService.queryPeople(stationId));
}
@PostMapping("page/message")
public TableDataInfo pageMessage(@RequestBody MessageDTO messageDTO) {
startPage(messageDTO.getPageNum(), messageDTO.getPageSize());
return getDataTable(messageService.querymessageList(messageDTO));
}
}
package com.example.operation_platform.controller;
import com.example.operation_platform.model.dto.MessageDTO;
import com.example.operation_platform.model.dto.OperationJobDTO;
import com.example.operation_platform.service.OperationJobService;
import com.platform.controller.BaseController;
import com.platform.model.resp.Result;
import com.platform.page.TableDataInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -21,4 +23,10 @@ public class OperationJobController extends BaseController {
startPage(operationJobDTO.getPageNum(), operationJobDTO.getPageSize());
return getDataTable(operationJobService.queryJobList(operationJobDTO));
}
@PostMapping("/save")
public Result save(@RequestBody OperationJobDTO operationJobDTO) {
return toAjax(operationJobService.save(operationJobDTO));
}
}
......@@ -35,7 +35,7 @@ public class WorkerController extends BaseController {
return toAjax(success);
}
@GetMapping("/{workerId}")//人员查询
public Result<TermAndImgVO> queryById(@PathVariable Integer workerId) {
public Result<WorkerVO> queryById(@PathVariable Integer workerId) {
return Result.data(workerService.queryById(workerId));
}
......@@ -61,4 +61,10 @@ public class WorkerController extends BaseController {
public Result<List<WorkerVO>> queryByType(@PathVariable Integer typeId) {
return Result.data(workerService.queryByType(typeId));
}
@PutMapping("/password")
public Result<WorkerEntity> updatePassword(@RequestBody WorkerDTO workerDTO) {
workerService.updateById(workerDTO);
return Result.success("密码修改成功");
}
}
......@@ -29,5 +29,12 @@ public interface MessageMapper extends BaseMapper<MessageEntity> {
* @param stationId stationId
*/
PeopleMessageVO queryPeople(@Param("stationId") Long stationId);
/**
* 查询泵站人员信息列表
*
* @param messageDTO messageDTO
* @return List<PeopleMessageVO>
*/
List<PeopleMessageVO> querymessageList(MessageDTO messageDTO);
}
......@@ -22,7 +22,7 @@ public interface WorkerMapper extends BaseMapper<WorkerEntity> {
*
* @return WorkerEntity
*/
TermAndImgVO queryById(Integer id);
WorkerVO queryById(Integer id);
/*
* 登录验证
* @param WorkerDTO WorkerDTO
......
......@@ -30,4 +30,5 @@ public class OperationJob {
@TableField("finish_status")
private Integer finishStatus;
}
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.time.LocalDate;
import java.util.Date;
@Data
......@@ -28,8 +29,11 @@ public class TbOperationRecordEntity {
private String workerId;
@TableField("operation_date")//维保日期
private Date operationDate;
private LocalDate operationDate;
@TableField("operation_job_id")
private Integer operationJobId;
@TableField("note")
private String note;
}
package com.example.operation_platform.model.vo;
import com.example.operation_platform.model.entity.TbOperationRecordEntity;
import lombok.Data;
import java.time.LocalDate;
......@@ -16,6 +17,8 @@ public class OperationRecordVO {
private String workerName;
private LocalDate operationDate;
private Integer id;
private String note;
}
......@@ -4,6 +4,7 @@ import lombok.Data;
@Data
public class PeopleMessageVO {
private String peopleName;
private String softwareWorker;
private String hardwareWorker;
......
package com.example.operation_platform.model.vo;
import com.example.operation_platform.model.entity.WorkerEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
......@@ -11,4 +13,7 @@ public class WorkerVO {
private String type;
private String company;
private Integer id;
private String img;
private String password;
}
......@@ -24,9 +24,16 @@ public interface MessageService extends IService<MessageEntity> {
*/
void resetmessage(MessageDTO messageDTO);
/*
* 人员信息列表
* 根据泵站查询人员信息列表
* @param stationId stationId
*/
PeopleMessageVO queryPeople(Long stationId);
/**
* 查询泵站人员信息列表
*
* @param messageDTO messageDTO
* @return List<PeopleMessageVO>
*/
List<PeopleMessageVO> querymessageList(MessageDTO messageDTO);
}
......@@ -24,7 +24,7 @@ public interface WorkerService extends IService<WorkerEntity> {
* @param
* @return WorkerEntity
*/
TermAndImgVO queryById(Integer id);
WorkerVO queryById(Integer id);
/*
* 登录验证
* @param WorkerDTO WorkerDTO
......
......@@ -26,4 +26,8 @@ public class MessageServiceImpl extends ServiceImpl<MessageMapper, MessageEntity
public PeopleMessageVO queryPeople(Long stationId) {
return this.baseMapper.queryPeople(stationId);
}
@Override
public List<PeopleMessageVO> querymessageList(MessageDTO messageDTO) {
return this.baseMapper.querymessageList(messageDTO);
}
}
......@@ -20,7 +20,7 @@ public class WorkerServiceImpl extends ServiceImpl<WorkerMapper, WorkerEntity> i
return this.baseMapper.queryList(workerDTO);
}
@Override
public TermAndImgVO queryById(Integer id) {
public WorkerVO queryById(Integer id) {
return this.baseMapper.queryById(id);
}
@Override
......
......@@ -23,7 +23,10 @@
on tw.id = tm.people_id
<where>
<if test="robotName != null and robotName != ''">
and br.name like concat('%',#{stationName},'%')
and br.name like concat('%',#{robotName},'%')
</if>
<if test="stationName != null and stationName != ''">
and tor.name like concat('%',#{stationName},'%')
</if>
</where>
</select>
......@@ -39,6 +42,7 @@
</update>
<select id="queryPeople" resultType="com.example.operation_platform.model.vo.PeopleMessageVO">
SELECT
tm.id id,
tw.worker_name peopleName,
tp.worker_name softwareWorker,
ta.worker_name hardwareWorker,
......@@ -54,7 +58,32 @@
LEFT JOIN tb_worker ta ON tm.hardware_worker = ta.id
LEFT JOIN tb_worker tq ON tm.operation_worker = tq.id
where
<if test="stationId != null and stationId != ''">
tm.station_id = #{stationId}
</if>
</select>
<select id="querymessageList" resultType="com.example.operation_platform.model.vo.PeopleMessageVO">
SELECT
tm.id id,
tor.name stationName,
tw.worker_name peopleName,
tp.worker_name softwareWorker,
ta.worker_name hardwareWorker,
tq.worker_name operationWorker,
tw.phone_number peopleNumber,
tp.phone_number softwareNumber,
ta.phone_number hardwareNumber,
tq.phone_number operationNumber
FROM
tb_message tm
LEFT JOIN tb_worker tw ON tm.people_id = tw.id
LEFT JOIN tb_worker tp ON tm.software_worker = tp.id
LEFT JOIN tb_worker ta ON tm.hardware_worker = ta.id
LEFT JOIN tb_worker tq ON tm.operation_worker = tq.id
LEFT JOIN bs_station tor ON tm.station_id = tor.id
</select>
<select id="queryByworkerid" resultType="com.example.operation_platform.model.vo.PeopleMessageVO">
</select>
</mapper>
\ No newline at end of file
......@@ -11,7 +11,8 @@
tor.img img,
tk.worker_name workerName,
tor.operation_date operationDate,
bs.name stationName
bs.name stationName,
tor.note note
from
tb_operation_record tor
left join
......
......@@ -18,11 +18,14 @@
on
tw.type = typ.id
</select>
<select id="queryById" resultType="com.example.operation_platform.model.vo.TermAndImgVO">
<select id="queryById" resultType="com.example.operation_platform.model.vo.WorkerVO">
select
tw.term term,
tw.id id,
tw.worker_name workerName,
tw.img img,
tw.phone_number phoneNumber
tw.phone_number phoneNumber,
tw.company company,
tw.password password
from
tb_worker tw
where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment