| | |
| | | |
| | | List<TestScheme> getList(); |
| | | |
| | | void insertNum(); |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Integer pc; |
| | | private Integer num; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private BigDecimal pa; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Double value; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public List<ResultDto> getResult(ConditionDto dto) { |
| | | this.insertNum(); |
| | | List<ResultDto> result = new ArrayList<>(); |
| | | switch (dto.getTjlx()) { |
| | | case "按风险名义值查询": |
| | |
| | | return result; |
| | | } |
| | | |
| | | private void insertNum() { |
| | | baseDao.insertNum(); |
| | | } |
| | | |
| | | private List<ResultDto> getCondition1(ConditionDto dto) { |
| | | List<ResultDto> result = new ArrayList<>(); |
| | | int C = 1; |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.controller; |
| | | |
| | | |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.life.modules.mainPart.basicInfo.dto.StatisticsDto; |
| | | import com.zt.life.modules.mainPart.basicInfo.service.StatisticsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/basicInfo/Statistics/") |
| | | public class StatisticsController { |
| | | @Autowired |
| | | StatisticsService statisticsService; |
| | | |
| | | @GetMapping("getStatisticsInfo") |
| | | public Result<StatisticsDto> getStatisticsInfo() { |
| | | StatisticsDto data = statisticsService.getStatisticsInfo(); |
| | | return Result.ok(data); |
| | | } |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.BaseReliabData; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.TaskReliabData; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @Mapper |
| | | public interface StatisticsDao extends BaseDao<TaskReliabData> { |
| | | |
| | | List<TaskReliabData> getTaskReliabList(); |
| | | |
| | | List<BaseReliabData> getBaseReliabList(); |
| | | |
| | | Integer getPlanMakeNum(); |
| | | |
| | | Integer getLoginNum(); |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.dto; |
| | | |
| | | import com.zt.life.modules.mainPart.basicInfo.model.BaseReliabData; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.TaskReliabData; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class StatisticsDto { |
| | | private List<BaseReliabData> baseReliabList; |
| | | private List<TaskReliabData> taskReliabList; |
| | | private Integer planMakeNum; |
| | | private Integer loginNum; |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.model; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | public class BaseReliabData { |
| | | private String name; |
| | | private String xtNum; |
| | | private String sbNum; |
| | | private Double mtbf; |
| | | private Double mttr; |
| | | private Double availability; |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.model; |
| | | |
| | | import com.zt.common.entity.BaseEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | public class TaskReliabData extends BaseEntity { |
| | | private String name; |
| | | private Integer taskNum; |
| | | private Integer operatConNum; |
| | | private Integer modelNum; |
| | | private Integer simulatNum; |
| | | private Integer testData; |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.basicInfo.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.modules.mainPart.basicInfo.dao.StatisticsDao; |
| | | import com.zt.life.modules.mainPart.basicInfo.dto.StatisticsDto; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.BaseReliabData; |
| | | import com.zt.life.modules.mainPart.basicInfo.model.TaskReliabData; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class StatisticsService extends BaseService<StatisticsDao, TaskReliabData> { |
| | | |
| | | public StatisticsDto getStatisticsInfo() { |
| | | StatisticsDto dto =new StatisticsDto(); |
| | | List<TaskReliabData> taskReliabDataList = baseDao.getTaskReliabList(); |
| | | List<BaseReliabData> baseDaoTaskReliabList = baseDao.getBaseReliabList(); |
| | | Integer planMakeNum = baseDao.getPlanMakeNum(); |
| | | Integer loginNum = baseDao.getLoginNum(); |
| | | dto.setBaseReliabList(baseDaoTaskReliabList); |
| | | dto.setTaskReliabList(taskReliabDataList); |
| | | dto.setPlanMakeNum(planMakeNum); |
| | | dto.setLoginNum(loginNum); |
| | | return dto; |
| | | } |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.mainPart.taskReliability.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @Data |
| | | public class AssessResult extends BusiEntity { |
| | | private Long id; |
| | | private Long taskId; |
| | | private Long productId; |
| | | private Long itemId; |
| | | private Double confidence; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private Long pid; |
| | | private Long shipId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String modelTag; |
| | |
| | | |
| | | String name = ImportUtil.getCellValue(row, 1, pattern); //节点名称 |
| | | String type = ImportUtil.getCellValue(row, 2, pattern);//节点类型 |
| | | String runTime = ImportUtil.getCellValue(row, 3, pattern); //运行时长 |
| | | String runNum = ImportUtil.getCellValue(row, 4, pattern); //运行次数 |
| | | String runNum = ImportUtil.getCellValue(row, 3, pattern); //运行时长 |
| | | String runTime = ImportUtil.getCellValue(row, 4, pattern); //运行次数 |
| | | String failNum = ImportUtil.getCellValue(row, 5, pattern); //失败次数 |
| | | |
| | | if (StringUtils.isBlank(name) || StringUtils.isBlank(type)) |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | |
| | | <mapper namespace="com.zt.life.modules.mainPart.TestScheme.dao.TestSchemeDao"> |
| | | <update id="insertNum"> |
| | | update test_scheme |
| | | set num = num + 1 |
| | | where is_delete = 0 |
| | | and id = 10000 |
| | | </update> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.mainPart.TestScheme.model.TestScheme"> |
| | | select a.* |
New file |
| | |
| | | <?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="com.zt.life.modules.mainPart.basicInfo.dao.StatisticsDao"> |
| | | |
| | | <select id="getTaskReliabList" resultType="com.zt.life.modules.mainPart.basicInfo.model.TaskReliabData"> |
| | | SELECT |
| | | a.name, |
| | | count(distinct b.id) AS taskNum, |
| | | count(distinct c.id) AS operatConNum, |
| | | count(distinct d.id) AS modelNum, |
| | | count(distinct e.id) AS simulatNum, |
| | | count(distinct f.id) AS testData |
| | | FROM product_model a |
| | | left join task b on b.product_id = a.id and b.IS_DELETE=0 |
| | | left join operat_condit c on c.product_id = a.id and c.IS_DELETE=0 |
| | | left join model_rbd d on d.ship_id = a.id and d.IS_DELETE=0 |
| | | left join simulat_assess e on e.product_id = a.id and e.IS_DELETE=0 |
| | | left join assess_item f on f.product_id = a.id and f.IS_DELETE=0 |
| | | where a.product_type = 2 and a.IS_DELETE =0 |
| | | group by a.id,a.name |
| | | order by a.name |
| | | </select> |
| | | <select id="getBaseReliabList" resultType="com.zt.life.modules.mainPart.basicInfo.model.BaseReliabData"> |
| | | SELECT |
| | | a.name, |
| | | count(distinct b.id) AS xtNum, |
| | | count(distinct c.id) AS sbNum, |
| | | d.basic_mtbf_regulate AS mtbf, |
| | | d.repair_mttcr AS mttr, |
| | | d.ai AS availability |
| | | FROM product_model a |
| | | left join (SELECT id,ship_id FROM product_model WHERE product_type=3 and IS_DELETE=0) b on b.ship_id = a.id |
| | | left join (SELECT id,ship_id FROM product_model WHERE product_type=5 and IS_DELETE=0) c on c.ship_id = a.id |
| | | left join param_data d on d.product_id = a.id and d.is_delete =0 |
| | | where a.product_type = 2 and a.IS_DELETE =0 |
| | | group by a.id,a.name |
| | | order by a.name |
| | | </select> |
| | | <select id="getPlanMakeNum" resultType="java.lang.Integer"> |
| | | SELECT num FROM `test_scheme` WHERE id = 10000 |
| | | </select> |
| | | <select id="getLoginNum" resultType="java.lang.Integer"> |
| | | SELECT count(*) FROM sys_log_login WHERE operation = 0 and status = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | // name: 'SYS_MENU', |
| | | // meta: {title: '菜单管理', isTab: true} |
| | | // }, |
| | | {path: '/home', |
| | | component: () => import('./views/modules/sys/task/taskCenter'), |
| | | name: 'home', |
| | | meta: {title: '首页', isTab: true} |
| | | }, |
| | | { |
| | | path: '/home', |
| | | component: () => import('./views/modules/home2'), |
| | | component: () => import('./views/modules/home'), |
| | | name: 'home', |
| | | meta: {title: '首页',isRefresh: 1, isTab: true} |
| | | }, |
New file |
| | |
| | | <template> |
| | | <div class="fa-card-b"> |
| | | <span class="size">系统登录次数:{{dataForm.loginNum}}</span> |
| | | <span class="size">试验方案制定次数:{{dataForm.planMakeNum}}</span> |
| | | <el-table ref="taskTable" class="DataTable" :data="dataForm.taskReliabList" height="330px" border> |
| | | <el-table-column label="任务可靠性数据" align="center"> |
| | | <el-table-column align="center" prop="name" label="名称"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="taskNum" label="任务"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="operatConNum" label="总体工况"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="modelNum" label="模型"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="simulatNum" label="仿真评估(次)"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="testData" label="试验数据(套)"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="assessNum" label="评定次数"> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <el-table ref="baseTable" class="DataTable" height="230px" :data="dataForm.baseReliabList" border |
| | | v-adaptive="{bottomOffset:30}"> |
| | | <el-table-column label="基本可靠性数据" align="center"> |
| | | <el-table-column align="center" prop="name" label="名称"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="xtNum" label="系统"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="sbNum" label="设备"> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="mtbf" label="MTBF"> |
| | | <template slot-scope="scope"> |
| | | <span>{{keepNumber(scope.row.mtbf) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="mttr" label="MTTR"> |
| | | <template slot-scope="scope"> |
| | | <span>{{keepNumber(scope.row.mttr) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" prop="availability" label="可用度"> |
| | | <template slot-scope="scope"> |
| | | <span>{{keepNumber(scope.row.availability) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | taskReliabList: [], |
| | | baseReliabList: [], |
| | | loginNum: '', |
| | | planMakeNum: '' |
| | | } |
| | | } |
| | | }, |
| | | components: {}, |
| | | mounted() { |
| | | this.init() |
| | | }, |
| | | computed: { |
| | | keepNumber() { //过滤器保留4为小数 |
| | | return function (val) { // 对计算属性进行传参 |
| | | const numM = Number(val).toFixed(5); |
| | | return numM.substring(0, numM.length - 1); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.getInfo2() |
| | | }, |
| | | async getInfo2() { |
| | | let res = await this.$http.get('/basicInfo/Statistics/getStatisticsInfo') |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-table .select-row { |
| | | background: rgba(23, 179, 163, 0.2) !important; |
| | | } |
| | | |
| | | .DataTable.el-table thead.is-group th { |
| | | background: #edf6ff; |
| | | } |
| | | |
| | | .size{ |
| | | font-size: 20px; |
| | | margin: 10px; |
| | | color: #0aa0bf; |
| | | } |
| | | </style> |
| | |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | pid: '', |
| | | shipId: '', |
| | | modelId: '', |
| | | modelName: '', |
| | | productId: '', |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id, productId) { |
| | | this.dataForm.productId = productId |
| | | init(id, params) { |
| | | this.dataForm.productId = params.productId |
| | | this.dataForm.shipId = params.shipId |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | |
| | | modelState:'', |
| | | productId: '', |
| | | modelTag: '', |
| | | shipId: '', |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, this.dataForm.productId) |
| | | this.$refs.AddOrUpdate.$refs.dialog.init(null, {productId:this.dataForm.productId,shipId:this.dataForm.shipId}) |
| | | }, |
| | | onProductSelected(data) { |
| | | this.dataForm.productId = data.id |
| | | this.dataForm.shipId = data.shipId |
| | | console.log(data, 'onProductSelected(data)') |
| | | this.$refs.tableObj.query() |
| | | }, |
| | |
| | | methods: { |
| | | async check(row) { |
| | | let flag = true; |
| | | if (row.specifiedValue < row.minAccepValue && row.specifiedValue) { |
| | | this.$tip.alert("最低可接受值不能大于规定值") |
| | | console.log(row) |
| | | if (parseInt(row.specifiedValue) && parseInt(row.specifiedValue) < row.minAccepValue) { |
| | | this.$tip.alert("检验下限不能大于检验上限") |
| | | flag =false |
| | | } |
| | | if (row.tjlx === "按风险名义值查询"){ |
| | |
| | | <zt-form-item label="置信度" prop="confidence"> |
| | | <el-input v-model="dataForm.confidence" placeholder="置信度" clearable></el-input> |
| | | </zt-form-item> |
| | | <el-button type="primary">评定</el-button> |
| | | <el-button type="primary" @click="">评定</el-button> |
| | | <el-button type="primary" @click="add()">新增评定数据</el-button> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" |
| | |
| | | :header-cell-style="{'text-align':'center'}" |
| | | border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column prop="name" label="名称"/> |
| | | <el-table-column prop="runTimes" label="运行时长" align="right"> |
| | | <el-table-column prop="runNum" label="试验次数(成败型)" align="right"> |
| | | </el-table-column> |
| | | <el-table-column prop="runNum" label="运行次数" align="right"> |
| | | <el-table-column prop="runTimes" label="试验时长(非成败型)" align="right"> |
| | | </el-table-column> |
| | | <el-table-column prop="failNum" label="失败次数" align="right"> |
| | | </el-table-column> |
| | |
| | | <zt-form-item label="总体" prop="shipName"> |
| | | <el-input v-model="dataForm.shipName"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item label="名称" prop="name" rules="required"> |
| | | <zt-form-item label="评定数据名称" prop="name" rules="required"> |
| | | <el-input v-model="dataForm.name"></el-input> |
| | | </zt-form-item> |
| | | <zt-form-item style="width:100%;" label=""> |
| | |
| | | // |
| | | // throw new RenException(ErrorCode.ACCOUNT_DISABLE); |
| | | // } |
| | | /* sysUserService.updateLogin(user.getId(), 0, 0, null);//修改用户 |
| | | // sysUserService.updateLogin(user.getId(), 0, 0, null);//修改用户 |
| | | // 登录成功 |
| | | log.setStatus(LoginStatusEnum.SUCCESS.value()); |
| | | log.setCreator(user.getId()); |
| | | log.setCreatorName(user.getUsername()); |
| | | sysLogLoginService.insert(log);*/ |
| | | sysLogLoginService.insert(log); |
| | | |
| | | sysUserTokenService.logout(user.getId()); |
| | | Result a = sysUserTokenService.createToken(user.getId(),login.getSystemMarker(),login.getToken()); |