Browse Source

计划bug处理

dev-v1.0.2
庄锐波 2 months ago
parent
commit
87c1b50d34
  1. 23
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/EfcodeCpReserveVo.java
  2. 10
      zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/EfcodeCpReserveMapper.xml
  3. 16
      zdxt-modules/zdxt-enforcement-nos/src/main/java/com/zdxt/enforcementnos/service/impl/NosLawEnforcementTaskServiceImpl.java
  4. 9
      zdxt-web-client/zdxt-efcode-enforcement-app/src/router/enforcement-app/enf-main-router.js
  5. 293
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_detail.vue
  6. 11
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_list.vue
  7. 10
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue
  8. 121
      zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/reserve/cp_reserve_manual.vue

23
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/domain/vo/EfcodeCpReserveVo.java

@ -130,9 +130,30 @@ public class EfcodeCpReserveVo implements Serializable {
/** 执法事项 */
private String enforceContent;
/** 执法单位名称 */
/** 执法单位名称(发起方) */
private String bureauDeptName;
/** 被约方执法单位名称 */
private String targetBureauDeptName;
/** 被约方计划日期 */
private Date targetPlanDate;
/** 被约方执行时段 */
private Long targetPlanTime;
/** 被约方企业名称 */
private String targetEnterpriseName;
/** 被约方执法事项 */
private String targetEnforceContent;
/** 被约方执法人员姓名 */
private String targetEnforceUserNames;
/** 被约方执法人员电话 */
private String targetEnforceUserTels;
/** 执法人员姓名 */
private String enforceUserNames;

10
zdxt-modules/zdxt-enforcement-code/src/main/resources/mapper/enforcementcode/EfcodeCpReserveMapper.xml

@ -27,9 +27,17 @@
p.enforce_content,
p.bureau_dept_name,
p.enforce_user_names,
p.enforce_user_tels
p.enforce_user_tels,
p2.bureau_dept_name AS target_bureau_dept_name,
p2.plan_date AS target_plan_date,
p2.plan_time AS target_plan_time,
p2.enterprise_name AS target_enterprise_name,
p2.enforce_content AS target_enforce_content,
p2.enforce_user_names AS target_enforce_user_names,
p2.enforce_user_tels AS target_enforce_user_tels
FROM efcode_cp_reserve r
LEFT JOIN efcode_cp_plan p ON r.plan_id = p.id
LEFT JOIN efcode_cp_plan p2 ON r.plan_group_id = p2.id
<where>
r.sender_id != 'manual_system_sender'
<!-- 按来源过滤:0=手动预约,1=系统匹配 -->

16
zdxt-modules/zdxt-enforcement-nos/src/main/java/com/zdxt/enforcementnos/service/impl/NosLawEnforcementTaskServiceImpl.java

@ -88,9 +88,9 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
// 预定义状态转换函数
Function<Integer, String> statusConverter;
if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) {
if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType.longValue())) {
statusConverter = NosLawEnforcementTaskStatusEnum::getDescriptionByCode;
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) {
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType.longValue())) {
statusConverter = NosLawEnforcementTaskStatusEnum::getEntDescriptionByCode;
} else {
statusConverter = NosLawEnforcementTaskStatusEnum::getDescriptionByCode;
@ -135,7 +135,7 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
SysDeptVo userBureauDept = DataFilterUtil.getUserBureauDept(LoginHelper.getUserId());
log.info("非现场执法:当前用户所在执法单位:{}", platformType);
log.info("非现场执法:当前用户所在执法单位:{}", JSONObject.toJSONString(userBureauDept));
if(!PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType) && userBureauDept == null) {
if(!PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType.longValue()) && userBureauDept == null) {
throw new ServiceException("当前用户不属于执法端用户,无法创建任务");
}
@ -222,7 +222,7 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
Integer platformType = LoginHelper.getPlatformType();
NosLawEnforcementTask task;
if(PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) {
if(PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType.longValue())) {
// 企业端,只能查看自己企业的任务
// 获取当前登录用户企业id
String enterpriseId = LoginHelper.getDeptId();
@ -232,7 +232,7 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
.eq(NosLawEnforcementTask::getId, taskId);
task = this.getOne(taskQueryWrapper);
} else if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) {
} else if (PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType.longValue())) {
// 执法端,只能查看自己执法的任务
LambdaQueryWrapper<NosLawEnforcementTaskLawEnforcerRelation> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper
@ -257,10 +257,10 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
vo.setTaskTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskTypeId()));
vo.setTaskOriginalTypeName(NosLawEnforcementTaskTypeEnum.getNameByCode(task.getTaskOriginalTypeId()));
if(PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType)) {
if(PlatformTypeEnums.ENFORCEMENT.getKey().equals(platformType.longValue())) {
// 执法端
vo.setTaskStatusName(NosLawEnforcementTaskStatusEnum.getDescriptionByCode(task.getTaskStatus()));
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) {
} else if (PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType.longValue())) {
// 企业端
vo.setTaskStatusName(NosLawEnforcementTaskStatusEnum.getEntDescriptionByCode(task.getTaskStatus()));
} else {
@ -473,7 +473,7 @@ public class NosLawEnforcementTaskServiceImpl extends ServiceImpl<NosLawEnforcem
@Transactional(rollbackFor = Exception.class)
public Boolean commentTask(NosLawEnforcementTaskCommentBO bo) {
Integer platformType = LoginHelper.getPlatformType();
if(!PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType)) {
if(!PlatformTypeEnums.ENTERPRISE.getKey().equals(platformType.longValue())) {
throw new ServiceException("当前用户不是企业端用户,无法评价任务");
}

9
zdxt-web-client/zdxt-efcode-enforcement-app/src/router/enforcement-app/enf-main-router.js

@ -244,6 +244,15 @@ const routes = [
isKeepAlive: false,
},
},
// 执法端-预告详情(只读)
{
path: "/enforcement/notice/detail",
name: "cpNoticeDetail",
component: () => import("@/views/enforcement/my/notice/cp_notice_detail.vue"),
meta: {
isKeepAlive: false,
},
},
// 执法端-预告留言
{
path: "/enforcement/notice/message",

293
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_detail.vue

@ -0,0 +1,293 @@
<template>
<div class="notice-detail-page app_content">
<!-- 顶部导航 -->
<van-nav-bar
title="预告详情"
left-arrow
@click-left="onBack"
/>
<div class="content">
<div v-if="loading" class="loading-wrap">
<van-loading size="20" />&nbsp;加载中...
</div>
<template v-else-if="detail">
<!-- 基本信息 -->
<div class="form-card">
<div class="card-header">
<div class="status-tag" :class="'status-' + detail.status">
{{ getStatusText(detail.status) }}
</div>
<div class="card-date">{{ formatDate(detail.createTime) }}</div>
</div>
<div class="notice-title">{{ detail.enforceContent || '暂无执法事项' }}</div>
<div class="info-row">
<div class="label">执法日期</div>
<div class="value">{{ detail.enforceDate || '-' }} {{ getTimeText(detail.enforceTime) }}</div>
</div>
<div class="info-row">
<div class="label">执法单位</div>
<div class="value">{{ detail.bureauDeptName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">企业名称</div>
<div class="value">{{ detail.enterpriseName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">企业联系人</div>
<div class="value">{{ detail.contactPerson || '-' }}</div>
</div>
<div class="info-row">
<div class="label">联系电话</div>
<div class="value">{{ detail.contactPhone || '-' }}</div>
</div>
</div>
<!-- 执法人员 -->
<div class="form-card">
<div class="section-title">执法人员</div>
<div v-if="personList.length" class="person-list">
<div v-for="(person, index) in personList" :key="index" class="person-line">
<span class="person-name">{{ person.name }}</span>
<span class="person-phone">{{ person.phone }}</span>
</div>
</div>
<div v-else class="empty-text">暂无执法人员</div>
</div>
<!-- 执法事项 -->
<div class="form-card">
<div class="section-title">执法事项</div>
<div class="content-text">{{ detail.enforceContent || '-' }}</div>
</div>
<!-- 执法要求 -->
<div class="form-card">
<div class="section-title">执法要求</div>
<div class="content-text">{{ detail.enforceRequirement || '-' }}</div>
</div>
</template>
<van-empty v-else description="未查询到预告信息" />
</div>
</div>
</template>
<script setup name="cpNoticeDetail">
import { useRouter, useRoute } from 'vue-router';
import { getNoticeDetail } from '@/api/enforcement/notice';
const router = useRouter();
const route = useRoute();
const loading = ref(true);
const detail = ref(null);
const personList = ref([]);
const getStatusText = (status) => {
const map = { 0: '草稿', 1: '已发布', 2: '已取消', 3: '已执行' };
return map[status] || '未知';
};
const getTimeText = (time) => {
const map = { 1: '上午', 2: '下午', 3: '其他' };
return map[time] || '';
};
const formatDate = (dateStr) => {
if (!dateStr) return '';
return String(dateStr).substring(0, 16).replace('T', ' ');
};
const onBack = () => { router.back(); };
onMounted(() => {
const id = route.query.id;
if (!id) {
loading.value = false;
return;
}
getNoticeDetail(id, (res) => {
loading.value = false;
if (res.code === 200 && res.data) {
detail.value = res.data;
//
if (res.data.enforceUserNames) {
const names = res.data.enforceUserNames.split(',');
const tels = res.data.enforceUserTels ? res.data.enforceUserTels.split(',') : [];
personList.value = names.map((name, i) => ({
name,
phone: i < tels.length ? tels[i] : '',
}));
}
}
}, () => {
loading.value = false;
});
});
</script>
<style lang="less" scoped>
.notice-detail-page {
display: flex;
flex-direction: column;
height: 100%;
background: #eaf4ff;
overflow: hidden;
}
:deep(.van-nav-bar) {
background: #347bc3;
flex-shrink: 0;
.van-nav-bar__title {
color: #fff;
font-size: 18px;
font-weight: 600;
}
.van-icon {
color: #fff;
}
}
.content {
flex: 1;
overflow-y: auto;
padding: 12px;
}
.loading-wrap {
display: flex;
align-items: center;
justify-content: center;
padding: 40px 0;
color: #999;
font-size: 14px;
}
.form-card {
background: #fff;
border-radius: 14px;
padding: 16px;
margin-bottom: 12px;
box-shadow: 0 4px 14px rgba(44, 116, 190, 0.08);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.status-tag {
font-size: 12px;
font-weight: 500;
padding: 3px 10px;
border-radius: 10px;
}
.status-0 {
background: #f0f0f0;
color: #666;
}
.status-1 {
background: #e6f7ff;
color: #1890ff;
}
.status-2 {
background: #fff2e8;
color: #fa8c16;
}
.status-3 {
background: #f6ffed;
color: #52c41a;
}
.card-date {
font-size: 12px;
color: #999;
}
.notice-title {
font-size: 16px;
font-weight: 700;
color: #111;
line-height: 1.5;
margin-bottom: 14px;
}
.info-row {
display: flex;
align-items: flex-start;
margin-bottom: 8px;
font-size: 14px;
line-height: 1.5;
&:last-child {
margin-bottom: 0;
}
}
.label {
width: 80px;
flex-shrink: 0;
color: #333;
font-weight: 500;
}
.value {
flex: 1;
color: #8a8a8a;
word-break: break-all;
}
.section-title {
font-size: 15px;
font-weight: 600;
color: #333;
margin-bottom: 10px;
padding-bottom: 8px;
border-bottom: 1px solid #f0f0f0;
}
.person-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.person-line {
display: flex;
align-items: center;
font-size: 14px;
color: #666;
gap: 12px;
.person-name {
font-weight: 500;
}
.person-phone {
color: #999;
}
}
.empty-text {
font-size: 14px;
color: #ccc;
}
.content-text {
font-size: 14px;
color: #555;
line-height: 1.6;
word-break: break-all;
white-space: pre-wrap;
}
</style>

11
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_list.vue

@ -30,6 +30,7 @@
@publish="onPublish"
@edit="onEdit"
@delete="onDelete"
@detail="onDetail"
/>
</van-tab>
<van-tab title="待执法预告" name="pending">
@ -41,6 +42,7 @@
:can-message="true"
:can-reinitiate="false"
@message="onMessage"
@detail="onDetail"
/>
</van-tab>
<van-tab title="历史预告" name="history">
@ -54,12 +56,13 @@
:message-readonly="true"
@message="onMessage"
@reinitiate="onReinitiate"
@detail="onDetail"
/>
</van-tab>
</van-tabs>
<!-- 悬浮新增按钮仅草稿Tab显示 -->
<div v-if="activeTab === 'draft'" class="add-btn" @click="onAdd">
<!-- 悬浮新增按钮 -->
<div class="add-btn" @click="onAdd">
<van-icon name="plus" size="22" color="#fff" />
</div>
</div>
@ -123,6 +126,10 @@ const onReinitiate = (item) => {
});
};
const onDetail = (item) => {
router.push({ path: '/enforcement/notice/detail', query: { id: item.id } });
};
const onPublish = (item) => {
//
if (!item.enforceDate) { showToast('该预告缺少执法日期,请编辑后再发布'); return; }

10
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/notice/cp_notice_tab_content.vue

@ -12,6 +12,7 @@
v-for="item in noticeList"
:key="item.id"
class="notice-card"
@click="$emit('detail', item)"
>
<div class="card-header">
<div class="status-tag" :class="'status-' + item.status">
@ -53,7 +54,7 @@
</div>
<!-- 操作按钮 -->
<div class="card-actions" v-if="canPublish || canEdit || canDelete || canMessage || canReinitiate || item.planId">
<div class="card-actions" v-if="canPublish || canEdit || canDelete || canMessage || canReinitiate || item.planId" @click.stop>
<div v-if="item.planId" class="action-item blue-action" @click="onViewPlan(item.planId)">
<van-icon name="orders-o" />
<span>关联计划</span>
@ -153,7 +154,7 @@ const props = defineProps({
messageReadonly: { type: Boolean, default: false },
});
const emit = defineEmits(['publish', 'edit', 'delete', 'message', 'reinitiate']);
const emit = defineEmits(['publish', 'edit', 'delete', 'message', 'reinitiate', 'detail']);
const noticeList = ref([]);
const loading = ref(false);
@ -275,6 +276,11 @@ defineExpose({ refresh });
border-radius: 14px;
padding: 16px;
box-shadow: 0 4px 14px rgba(44, 116, 190, 0.08);
cursor: pointer;
&:active {
background: #fafcff;
}
}
.card-header {

121
zdxt-web-client/zdxt-efcode-enforcement-app/src/views/enforcement/my/reserve/cp_reserve_manual.vue

@ -37,31 +37,68 @@
</div>
</div>
<div class="plan-title">{{ item.enforceContent || '执法事项' }}</div>
<div class="info-row">
<div class="label">企业名称</div>
<div class="value">{{ item.enterpriseName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">计划时间</div>
<div class="value">{{ formatPlanDate(item.planDate) }} {{ getPlanTimeText(item.planTime) }}</div>
</div>
<div class="info-row">
<div class="label">执法人员</div>
<div class="value">{{ item.enforceUserNames || '-' }}</div>
</div>
<div class="info-row">
<div class="label">联系电话</div>
<div class="value">{{ item.enforceUserTels || '-' }}</div>
<!-- 预约单位信息 -->
<div class="unit-section">
<div class="unit-section-title">预约单位</div>
<div class="unit-info">
<div class="info-row">
<div class="label">执法单位</div>
<div class="value">{{ item.bureauDeptName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">执法人员</div>
<div class="value">{{ item.enforceUserNames || '-' }}</div>
</div>
<div class="info-row">
<div class="label">联系电话</div>
<div class="value">{{ item.enforceUserTels || '-' }}</div>
</div>
<div class="info-row">
<div class="label">计划时间</div>
<div class="value">{{ formatPlanDate(item.planDate) }} {{ getPlanTimeText(item.planTime) }}</div>
</div>
<div class="info-row">
<div class="label">企业名称</div>
<div class="value">{{ item.enterpriseName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">执法事项</div>
<div class="value">{{ item.enforceContent || '-' }}</div>
</div>
<div class="info-divider"></div>
</div>
</div>
<div class="info-row">
<div class="label">执法单位</div>
<div class="value">{{ item.bureauDeptName || '-' }}</div>
<!-- 被约单位信息 -->
<div class="unit-section">
<div class="unit-section-title">被约单位</div>
<div class="unit-info">
<div class="info-row">
<div class="label">执法单位</div>
<div class="value">{{ item.targetBureauDeptName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">执法人员</div>
<div class="value">{{ item.targetEnforceUserNames || '-' }}</div>
</div>
<div class="info-row">
<div class="label">联系电话</div>
<div class="value">{{ item.targetEnforceUserTels || '-' }}</div>
</div>
<div class="info-row">
<div class="label">计划时间</div>
<div class="value">{{ formatPlanDate(item.targetPlanDate) }} {{ getPlanTimeText(item.targetPlanTime) }}</div>
</div>
<div class="info-row">
<div class="label">企业名称</div>
<div class="value">{{ item.targetEnterpriseName || '-' }}</div>
</div>
<div class="info-row">
<div class="label">执法事项</div>
<div class="value">{{ item.targetEnforceContent || '-' }}</div>
</div>
<div class="info-divider"></div>
</div>
</div>
<div class="info-row">
@ -362,6 +399,19 @@ const afterOperate = (item, action) => {
}
}
.unit-section {
border-color: rgba(255, 255, 255, 0.15);
}
.unit-section-title {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.9);
}
.info-divider {
border-bottom-color: rgba(255, 255, 255, 0.15);
}
.card-actions {
border-top-color: rgba(255, 255, 255, 0.18);
}
@ -446,6 +496,31 @@ const afterOperate = (item, action) => {
}
}
.unit-section {
margin-bottom: 12px;
border: 1px solid #eef2f7;
border-radius: 10px;
overflow: hidden;
}
.unit-section-title {
font-size: 14px;
font-weight: 600;
color: #1f75c9;
background: #f0f7ff;
padding: 8px 12px;
border-bottom: 1px solid #eef2f7;
}
.unit-info {
padding: 10px 12px;
}
.info-divider {
margin-top: 8px;
border-bottom: 1px dashed #c0c4cc;
}
.card-actions {
margin-top: 14px;
padding-top: 12px;

Loading…
Cancel
Save