Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eb04363076
@ -70,4 +70,7 @@ public class MaintenanceOrderSaveReqVO {
|
|||||||
@Schema(description = "点检方案")
|
@Schema(description = "点检方案")
|
||||||
private String patrolPlan;
|
private String patrolPlan;
|
||||||
|
|
||||||
|
@Schema(description = "维修工单提交标识,报警提交时为0")
|
||||||
|
private String submitFlag;
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package com.inspur.module.system.service.alarm;
|
package com.inspur.module.system.service.alarm;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.inspur.framework.tenant.core.aop.TenantIgnore;
|
import com.inspur.framework.tenant.core.aop.TenantIgnore;
|
||||||
@ -103,11 +104,14 @@ public class AlarmDataServiceImpl implements AlarmDataService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public int closeAllAlarmDataByEquipAlarmId(String equipAlarmId){
|
public int closeAllAlarmDataByEquipAlarmId(String equipAlarmId){
|
||||||
List<AlarmDataDO> alarmDataList = alarmDataMapper.selectAlarmDatas(new AlarmDataPageReqVO().setEquipAlarmId(equipAlarmId));
|
List<AlarmDataDO> alarmDataList = alarmDataMapper.selectAlarmDatas(new AlarmDataPageReqVO().setEquipAlarmId(equipAlarmId));
|
||||||
List<Long> alarmDataIdList = alarmDataList.stream().map(AlarmDataDO::getAlarmDataId).collect(Collectors.toList());
|
|
||||||
EquipAlarmDataSaveReqVO equipAlarmDataSaveReqVO = new EquipAlarmDataSaveReqVO();
|
EquipAlarmDataSaveReqVO equipAlarmDataSaveReqVO = new EquipAlarmDataSaveReqVO();
|
||||||
equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId);
|
equipAlarmDataSaveReqVO.setEquipAlarmId(equipAlarmId);
|
||||||
equipAlarmDataSaveReqVO.setStatus(1);//关闭
|
equipAlarmDataSaveReqVO.setStatus(1);//关闭
|
||||||
equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO);
|
equipAlarmDataService.updateEquipAlarmData(equipAlarmDataSaveReqVO);
|
||||||
|
if (CollUtil.isEmpty(alarmDataList)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
List<Long> alarmDataIdList = alarmDataList.stream().map(AlarmDataDO::getAlarmDataId).collect(Collectors.toList());
|
||||||
return alarmDataMapper.batchUpdateAlarmDataStatus(alarmDataIdList);
|
return alarmDataMapper.batchUpdateAlarmDataStatus(alarmDataIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ import com.inspur.module.system.dal.dataobject.user.AdminUserDO;
|
|||||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper;
|
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper;
|
||||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderRecordMapper;
|
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderRecordMapper;
|
||||||
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceReportMapper;
|
import com.inspur.module.system.dal.mysql.maintenance.MaintenanceReportMapper;
|
||||||
|
import com.inspur.module.system.service.alarm.AlarmDataService;
|
||||||
import com.inspur.module.system.service.baseData.CustomerInfoService;
|
import com.inspur.module.system.service.baseData.CustomerInfoService;
|
||||||
import com.inspur.module.system.service.equip.ComponentInfoService;
|
import com.inspur.module.system.service.equip.ComponentInfoService;
|
||||||
import com.inspur.module.system.service.equip.EquipInfoService;
|
import com.inspur.module.system.service.equip.EquipInfoService;
|
||||||
@ -77,6 +78,9 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
|||||||
@Resource
|
@Resource
|
||||||
private TaskService taskService;
|
private TaskService taskService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AlarmDataService alarmDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OA 请假对应的流程定义 KEY
|
* OA 请假对应的流程定义 KEY
|
||||||
*/
|
*/
|
||||||
@ -116,11 +120,15 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateRemoteMaintenanceOrder(MaintenanceOrderSaveReqVO updateReqVO) {
|
public void updateRemoteMaintenanceOrder(MaintenanceOrderSaveReqVO updateReqVO) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateRemoteMaintenanceOrderExists(updateReqVO.getMaintenanceOrderId());
|
validateRemoteMaintenanceOrderExists(updateReqVO.getMaintenanceOrderId());
|
||||||
// 更新
|
// 更新
|
||||||
MaintenanceOrderDO updateObj = BeanUtils.toBean(updateReqVO, MaintenanceOrderDO.class);
|
MaintenanceOrderDO updateObj = BeanUtils.toBean(updateReqVO, MaintenanceOrderDO.class);
|
||||||
|
if ("0".equals(updateReqVO.getSubmitFlag()) && StrUtil.isNotBlank(updateReqVO.getAlarmId())) {
|
||||||
|
alarmDataService.closeAllAlarmDataByEquipAlarmId(updateReqVO.getAlarmId());
|
||||||
|
}
|
||||||
maintenanceOrderMapper.updateById(updateObj);
|
maintenanceOrderMapper.updateById(updateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,15 +5,17 @@
|
|||||||
<select id="equipInfoList"
|
<select id="equipInfoList"
|
||||||
resultType="com.inspur.module.system.controller.largeScreen.vo.LargeScreenEquipInfoListVO">
|
resultType="com.inspur.module.system.controller.largeScreen.vo.LargeScreenEquipInfoListVO">
|
||||||
SELECT
|
SELECT
|
||||||
ici.customer_id as customerId,
|
ici.customer_id AS customerId,
|
||||||
ici.customer_name as customerName,
|
ici.customer_name AS customerName,
|
||||||
COUNT( iei.equip_id ) as equipNum,
|
COUNT( DISTINCT iei.equip_id ) AS equipNum,
|
||||||
0 as equipRun,
|
0 AS equipRun,
|
||||||
0 as alarmNum
|
COUNT( iad.alarm_data_id ) AS alarmNum
|
||||||
FROM
|
FROM
|
||||||
imt_customer_info AS ici
|
imt_customer_info AS ici
|
||||||
LEFT JOIN imt_equip_info AS iei ON ici.customer_id = iei.customer_id
|
LEFT JOIN imt_equip_info AS iei ON ici.customer_id = iei.customer_id
|
||||||
AND iei.deleted = '0'
|
AND iei.deleted = '0'
|
||||||
|
LEFT JOIN imt_alarm_data AS iad ON iei.equip_id = iad.equip_id
|
||||||
|
AND iad.deleted = '0'
|
||||||
WHERE
|
WHERE
|
||||||
ici.deleted = '0'
|
ici.deleted = '0'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
@ -519,8 +519,8 @@
|
|||||||
style="height:500px"
|
style="height:500px"
|
||||||
></div>
|
></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<alarm-submit-maintenance-order-form ref="submitOrderForm" />
|
<alarm-submit-maintenance-order-form ref="submitOrderForm" @child-event="showSubmitButton" />
|
||||||
<alarm-submit-maintenance-patrol-plan-form ref="submitPatrolPlanForm" />
|
<alarm-submit-maintenance-patrol-plan-form ref="submitPatrolPlanForm" @child-event="showSubmitButton"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -540,6 +540,7 @@ export default {
|
|||||||
name: "AlarmData",
|
name: "AlarmData",
|
||||||
components: {
|
components: {
|
||||||
AlarmSubmitMaintenanceOrderForm,
|
AlarmSubmitMaintenanceOrderForm,
|
||||||
|
AlarmSubmitMaintenancePatrolPlanForm,
|
||||||
AlarmDataForm,
|
AlarmDataForm,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -633,7 +634,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//判断显示维修工单提交还是显示点检方案提交
|
//判断显示维修工单提交还是显示点检方案提交
|
||||||
showSubmitButton() {
|
showSubmitButton(flag) {
|
||||||
|
if (flag === "0"){
|
||||||
|
this.$store.dispatch("tagsView/delView", this.$router.currentRoute);
|
||||||
|
//跳转到前一个页面
|
||||||
|
this.$router.push("/alarm/equipalarm");
|
||||||
|
}else {
|
||||||
EquipAlarmDataApi.isSubmitPatrolPlan(this.$route.query.equipAlarmId).then(
|
EquipAlarmDataApi.isSubmitPatrolPlan(this.$route.query.equipAlarmId).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
this.showPatrolPlanSubmit = res.data;
|
this.showPatrolPlanSubmit = res.data;
|
||||||
@ -642,11 +648,14 @@ export default {
|
|||||||
EquipAlarmDataApi.isSubmitOrder(
|
EquipAlarmDataApi.isSubmitOrder(
|
||||||
this.$route.query.equipAlarmId
|
this.$route.query.equipAlarmId
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
|
if(res.data !== null){
|
||||||
this.maintenanceOrderId = res.data;
|
this.maintenanceOrderId = res.data;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cardChange(e) {
|
cardChange(e) {
|
||||||
// console.log("选择:", e);
|
// console.log("选择:", e);
|
||||||
@ -764,7 +773,7 @@ export default {
|
|||||||
* 维修工单
|
* 维修工单
|
||||||
*/
|
*/
|
||||||
handelMaintanence() {
|
handelMaintanence() {
|
||||||
this.$refs.submitOrderForm.open(this.$route.query.equipAlarmId);
|
this.$refs.submitOrderForm.open(this.$route.query.equipAlarmId,this.maintenanceOrderId);
|
||||||
},
|
},
|
||||||
handelPatrolPlan() {
|
handelPatrolPlan() {
|
||||||
this.$refs.submitPatrolPlanForm.open(this.$route.query.equipAlarmId);
|
this.$refs.submitPatrolPlanForm.open(this.$route.query.equipAlarmId);
|
||||||
|
@ -293,6 +293,14 @@ import {
|
|||||||
getEquipSelection,
|
getEquipSelection,
|
||||||
} from "@/api/system/equip/equipInfo";
|
} from "@/api/system/equip/equipInfo";
|
||||||
export default {
|
export default {
|
||||||
|
beforeRouteEnter(to, from, next) {
|
||||||
|
// 在导航确认前调用, 但是此时组件实例还未被创建
|
||||||
|
next(vm => {
|
||||||
|
// 在组件实例被创建后执行
|
||||||
|
vm.getList();
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
name: "EquipAlarmData",
|
name: "EquipAlarmData",
|
||||||
components: {
|
components: {
|
||||||
EquipAlarmDataForm,
|
EquipAlarmDataForm,
|
||||||
@ -333,9 +341,9 @@ export default {
|
|||||||
equipSelection: [],
|
equipSelection: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
// created() {
|
||||||
this.getList();
|
// this.getList();
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
cascaderChange(value) {
|
cascaderChange(value) {
|
||||||
if (value.length > 0) {
|
if (value.length > 0) {
|
||||||
@ -346,6 +354,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
async getList() {
|
async getList() {
|
||||||
|
console.log("getList!!!!!!!!!")
|
||||||
try {
|
try {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
|
const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
|
||||||
|
@ -128,6 +128,7 @@ export default {
|
|||||||
this.submitFormData.status = -1;
|
this.submitFormData.status = -1;
|
||||||
await MaintenanceOrderApi.createRemoteMaintenanceOrder(this.submitFormData)
|
await MaintenanceOrderApi.createRemoteMaintenanceOrder(this.submitFormData)
|
||||||
this.$modal.msgSuccess("提交成功");
|
this.$modal.msgSuccess("提交成功");
|
||||||
|
this.$emit('child-event');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.submitFormLoading = false;
|
this.submitFormLoading = false;
|
||||||
},
|
},
|
||||||
|
@ -148,8 +148,10 @@ export default {
|
|||||||
this.submitFormData.customerId = this.alarmFormData.customerId;
|
this.submitFormData.customerId = this.alarmFormData.customerId;
|
||||||
this.submitFormData.alarmId = this.alarmFormData.equipAlarmId;
|
this.submitFormData.alarmId = this.alarmFormData.equipAlarmId;
|
||||||
this.submitFormData.status = 0;
|
this.submitFormData.status = 0;
|
||||||
|
this.submitFormData.submitFlag = "0";
|
||||||
await MaintenanceOrderApi.updateRemoteMaintenanceOrder(this.submitFormData)
|
await MaintenanceOrderApi.updateRemoteMaintenanceOrder(this.submitFormData)
|
||||||
this.$modal.msgSuccess("提交成功");
|
this.$modal.msgSuccess("提交成功");
|
||||||
|
this.$emit('child-event','0');
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.submitFormLoading = false;
|
this.submitFormLoading = false;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user