Commit 2b968a44 authored by tianhongyang's avatar tianhongyang

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 9d78a339 ead4131e
......@@ -170,7 +170,8 @@ tenant:
- d_subcontract
- advisory_body
- advisory_body_project
- advisory_body_custom_form
- advisory_body_custom_form_data
- advisory_body_custom_form_template
- dim_area
- biz_dict_data
- push_monitor_rules
......
......@@ -5,13 +5,14 @@ import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.AdvisoryBodyCustomForm;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormData;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormTemplate;
import com.dsk.cscec.domain.bo.*;
import com.dsk.cscec.domain.vo.*;
import com.dsk.cscec.service.AdvisoryBodyCustomFormService;
import com.dsk.cscec.service.AdvisoryBodyCustomFormDataService;
import com.dsk.cscec.service.AdvisoryBodyCustomFormTemplateService;
import com.dsk.cscec.service.AdvisoryBodyService;
import com.dsk.cscec.service.IDProjectService;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -33,7 +34,9 @@ public class AdvisoryBodyManageController extends BaseController {
@Resource
private AdvisoryBodyService advisoryBodyService;
@Resource
private AdvisoryBodyCustomFormService advisoryBodyCustomFormService;
private AdvisoryBodyCustomFormDataService customFormDataService;
@Resource
private AdvisoryBodyCustomFormTemplateService templateService;
/**
* 获取项目列表
......@@ -95,28 +98,36 @@ public class AdvisoryBodyManageController extends BaseController {
}
/**
* 获取咨询机构自定义表单
* 获取自定义表单模板
*/
@GetMapping("/getCustomFormTemplate")
public R<AdvisoryBodyCustomFormTemplate> getCustomFormTemplate() {
//业务上确定只有一个模板
List<AdvisoryBodyCustomFormTemplate> templates = templateService.list();
return R.ok(templates.isEmpty() ? null : templates.get(0));
}
/**
* 编辑自定义表单模板
*/
@GetMapping("/getAdvisoryBodyCustomForm")
public R<List<AdvisoryBodyCustomForm>> getAdvisoryBodyCustomForm() {
return R.ok(advisoryBodyCustomFormService.list());
@PostMapping("/editCustomFormTemplate")
public R<Void> editCustomFormTemplate(@Validated @RequestBody AdvisoryBodyCustomFormTemplate customFormTemplate) {
return toAjax(templateService.editCustomFormTemplate(customFormTemplate));
}
/**
* 新增咨询机构自定义表单
* 根据项目主键查询自定义表单数据表数据
*/
@PostMapping("/addAdvisoryBodyCustomForm")
@Transactional(rollbackFor = Exception.class)
public R<Void> addAdvisoryBodyCustomForm(@Validated @RequestBody AdvisoryBodyCustomForm advisoryBodyCustomForm) {
return toAjax(advisoryBodyCustomFormService.save(advisoryBodyCustomForm));
@GetMapping("/getCustomFormDataByProjectKey/{projectKey}")
public R<AdvisoryBodyCustomFormData> getCustomFormDataByProjectKey(@PathVariable Long projectKey) {
return R.ok(customFormDataService.getById(projectKey));
}
/**
* 更新咨询机构自定义表单
* 编辑自定义表单数据表数据
*/
@PutMapping("/updateAdvisoryBodyCustomForm")
@Transactional(rollbackFor = Exception.class)
public R<Void> updateAdvisoryBodyCustomForm(@Validated @RequestBody EditAdvisoryBodyCustomFormBo editBo) {
return toAjax(advisoryBodyCustomFormService.updateById(editBo));
@PostMapping("/editCustomFormData")
public R<Void> editCustomFormData(@Validated @RequestBody AdvisoryBodyCustomFormData customFormData) {
return toAjax(customFormDataService.editCustomFormData(customFormData));
}
}
\ No newline at end of file
package com.dsk.cscec.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 咨询机构自定义表单数据表(AdvisoryBodyCustomFormData)实体类
*
* @author sxk
* @since 2023-12-20 16:39:43
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AdvisoryBodyCustomFormData extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 项目主键
*/
@TableId(value = "project_key")
@NotNull(message = "项目主键不能为空")
private Long projectKey;
/**
* 模板ID
*/
@NotNull(message = "模板ID不能为空")
private Long templateId;
/**
* json数据
*/
@NotBlank(message = "json数据不能为空")
private String jsonData;
}
......@@ -9,20 +9,20 @@ import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 咨询机构自定义表单(AdvisoryBodyCustomForm)实体类
* 咨询机构自定义表单模板表(AdvisoryBodyCustomFormTemplate)实体类
*
* @author sxk
* @since 2023-12-20 16:39:43
* @since 2024-01-15 16:53:19
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class AdvisoryBodyCustomForm extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
public class AdvisoryBodyCustomFormTemplate extends BaseEntity implements Serializable {
private static final long serialVersionUID = 324906245942046585L;
/**
* 项目主键
* 模板ID
*/
@TableId(value = "ab_custom_form_id")
private Long abCustomFormId;
@TableId(value = "template_id")
private Long templateId;
/**
* json数据
*/
......
package com.dsk.cscec.domain.bo;
import com.dsk.cscec.domain.AdvisoryBodyCustomForm;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author sxk
* @date 2024.01.09
* @time 11:24
*/
@Data
public class EditAdvisoryBodyCustomFormBo extends AdvisoryBodyCustomForm {
/**
* 项目主键
*/
@NotNull(message = "自定义表单ID不能为空")
private Long abCustomFormId;
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.AdvisoryBodyCustomForm;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormData;
/**
* 咨询机构自定义表单(AdvisoryBodyCustomForm)表数据库访问层
* 咨询机构自定义表单数据表(AdvisoryBodyCustomFormData)表数据库访问层
*
* @author sxk
* @since 2023-12-20 16:39:37
*/
public interface AdvisoryBodyCustomFormMapper extends BaseMapper<AdvisoryBodyCustomForm> {
public interface AdvisoryBodyCustomFormDataMapper extends BaseMapper<AdvisoryBodyCustomFormData> {
}
package com.dsk.cscec.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormTemplate;
/**
* 咨询机构自定义表单模板表(AdvisoryBodyCustomFormTemplate)表数据库访问层
*
* @author sxk
* @since 2024-01-15 16:53:17
*/
public interface AdvisoryBodyCustomFormTemplateMapper extends BaseMapper<AdvisoryBodyCustomFormTemplate> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormData;
/**
* 咨询机构自定义表单数据表(AdvisoryBodyCustomFormData)表服务接口
*
* @author sxk
* @since 2023-12-20 17:33:31
*/
public interface AdvisoryBodyCustomFormDataService extends IService<AdvisoryBodyCustomFormData> {
/**
* 编辑自定义表单数据表数据
*
* @param customFormData 编辑信息
* @return 编辑结果
*/
Integer editCustomFormData(AdvisoryBodyCustomFormData customFormData);
}
\ No newline at end of file
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.AdvisoryBodyCustomForm;
/**
* 咨询机构自定义表单(AdvisoryBodyCustomForm)表服务接口
*
* @author makejava
* @since 2023-12-20 17:33:31
*/
public interface AdvisoryBodyCustomFormService extends IService<AdvisoryBodyCustomForm> {
}
package com.dsk.cscec.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormTemplate;
/**
* 咨询机构自定义表单模板表(AdvisoryBodyCustomFormTemplate)表服务接口
*
* @author sxk
* @since 2024-01-15 16:53:20
*/
public interface AdvisoryBodyCustomFormTemplateService extends IService<AdvisoryBodyCustomFormTemplate> {
/**
* 编辑自定义表单模板
*
* @param customFormTemplate 编辑对象
* @return 编辑结果
*/
Integer editCustomFormTemplate(AdvisoryBodyCustomFormTemplate customFormTemplate);
}
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.exception.ServiceException;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormData;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormTemplate;
import com.dsk.cscec.mapper.AdvisoryBodyCustomFormDataMapper;
import com.dsk.cscec.mapper.AdvisoryBodyCustomFormTemplateMapper;
import com.dsk.cscec.service.AdvisoryBodyCustomFormDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* 咨询机构自定义表单数据表(AdvisoryBodyCustomFormData)表服务实现类
*
* @author sxk
* @since 2023-12-20 17:33:31
*/
@Slf4j
@Service("advisoryBodyCustomFormService")
public class AdvisoryBodyCustomFormDataServiceImpl extends ServiceImpl<AdvisoryBodyCustomFormDataMapper, AdvisoryBodyCustomFormData> implements AdvisoryBodyCustomFormDataService {
@Resource
private AdvisoryBodyCustomFormDataMapper baseMapper;
@Resource
private AdvisoryBodyCustomFormTemplateMapper templateMapper;
/**
* 编辑自定义表单数据表数据
*
* @param customFormData 编辑信息
* @return 编辑结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer editCustomFormData(AdvisoryBodyCustomFormData customFormData) {
//校验自定义表单模板是否存在
if (!templateMapper.exists(new LambdaQueryWrapper<AdvisoryBodyCustomFormTemplate>()
.eq(AdvisoryBodyCustomFormTemplate::getTemplateId, customFormData.getTemplateId()))) {
throw new ServiceException("自定义表单模板不存在");
}
//数据存在,走更新覆盖;否则走新增
if (baseMapper.exists(new LambdaQueryWrapper<AdvisoryBodyCustomFormData>()
.eq(AdvisoryBodyCustomFormData::getProjectKey, customFormData.getProjectKey()))) {
log.info("项目{}更新自定义表单数据", customFormData.getTemplateId());
return baseMapper.updateById(customFormData);
} else {
log.info("项目{}新增自定义表单数据", customFormData.getTemplateId());
return baseMapper.insert(customFormData);
}
}
}
package com.dsk.cscec.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.cscec.domain.AdvisoryBodyCustomForm;
import com.dsk.cscec.mapper.AdvisoryBodyCustomFormMapper;
import com.dsk.cscec.service.AdvisoryBodyCustomFormService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* 咨询机构自定义表单(AdvisoryBodyCustomForm)表服务实现类
*
* @author sxk
* @since 2023-12-20 17:33:31
*/
@Service("advisoryBodyCustomFormService")
public class AdvisoryBodyCustomFormServiceImpl extends ServiceImpl<AdvisoryBodyCustomFormMapper, AdvisoryBodyCustomForm> implements AdvisoryBodyCustomFormService {
@Resource
private AdvisoryBodyCustomFormMapper baseMapper;
}
package com.dsk.cscec.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsk.common.exception.ServiceException;
import com.dsk.cscec.domain.AdvisoryBodyCustomFormTemplate;
import com.dsk.cscec.mapper.AdvisoryBodyCustomFormTemplateMapper;
import com.dsk.cscec.service.AdvisoryBodyCustomFormTemplateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* 咨询机构自定义表单模板表(AdvisoryBodyCustomFormTemplate)表服务实现类
*
* @author sxk
* @since 2024-01-15 16:53:20
*/
@Slf4j
@Service("advisoryBodyCustomFormTemplateService")
public class AdvisoryBodyCustomFormTemplateServiceImpl extends ServiceImpl<AdvisoryBodyCustomFormTemplateMapper, AdvisoryBodyCustomFormTemplate> implements AdvisoryBodyCustomFormTemplateService {
@Resource
private AdvisoryBodyCustomFormTemplateMapper baseMapper;
/**
* 编辑自定义表单模板
*
* @param customFormTemplate 编辑对象
* @return 编辑结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Integer editCustomFormTemplate(AdvisoryBodyCustomFormTemplate customFormTemplate) {
//模板ID为空,则为新增,否则为更新覆盖
Long templateId = customFormTemplate.getTemplateId();
if (ObjectUtil.isNull(templateId)) {
templateId = IdUtil.getSnowflakeNextId();
customFormTemplate.setTemplateId(templateId);
log.info("新增自定义表单模板,模板ID:{}", templateId);
return baseMapper.insert(customFormTemplate);
} else {
//校验模板是否存在
if (!baseMapper.exists(new LambdaQueryWrapper<AdvisoryBodyCustomFormTemplate>()
.eq(AdvisoryBodyCustomFormTemplate::getTemplateId, customFormTemplate.getTemplateId()))) {
throw new ServiceException("该自定义表单模板不存在");
}
log.info("更新自定义表单模板{}", templateId);
return baseMapper.updateById(customFormTemplate);
}
}
}
......@@ -2,6 +2,6 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsk.cscec.mapper.AdvisoryBodyCustomFormMapper">
<mapper namespace="com.dsk.cscec.mapper.AdvisoryBodyCustomFormDataMapper">
</mapper>
\ No newline at end of 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.dsk.cscec.mapper.AdvisoryBodyCustomFormTemplateMapper">
</mapper>
......@@ -34,7 +34,6 @@
<div class="table-item">
<div v-if="tableDataTotal > 0 && !isSkeleton">
<el-table
class="fixed-table"
element-loading-text="Loading"
:data="tableData"
border
......@@ -93,7 +92,7 @@
<div class="enterprise">
<div class="label">企业名称</div>
<el-input class="name" placeholder="请输入企业名称" v-model="companyName">
<el-button slot="append" @click="handleKeyword()">搜索</el-button>
<span slot="append" @click="handleKeyword()">搜索</span>
</el-input>
</div>
<div class="companyList">
......@@ -668,6 +667,13 @@
background: #F5F5F5;
width: 60px;
color: #0081FF;
padding: 0;
text-align: center;
cursor: pointer;
}
.el-input-group__append:hover{
background: #F5F5F5 !important;
color: #0081FF;
}
}
}
......
......@@ -69,7 +69,6 @@
<div class="table-item">
<div v-if="tableDataTotal > 0 && !isSkeleton">
<el-table
class="fixed-table"
:data="tableData"
element-loading-text="Loading"
border
......
......@@ -77,7 +77,6 @@
<div class="table-item">
<div v-if="tableDataTotal > 0 && !isSkeleton">
<el-table
class="fixed-table"
:data="tableData"
element-loading-text="Loading"
border
......@@ -125,7 +124,14 @@
<el-dialog :visible.sync="dialogVisible" custom-class='dialog-claim' :title="title" width="720px" :close-on-click-modal="false">
<div class="dialog-content">
<template v-if="title=='开庭公告详情'">
<info-table class="info-tab" :list="defaultList0" :obj="detail" :labelWidth="labelWidth"></info-table>
<info-table class="info-tab" :list="defaultList0" :obj="detail" :labelWidth="labelWidth">
<template v-slot:relatedCompanies="row">
<p v-for="i in row.data.relatedCompanies">
{{i.role}}:<br/>
{{i.name}}
</p>
</template>
</info-table>
</template>
<template v-if="title=='失信被执行人详情'">
<info-table class="info-tab" :list="defaultList1" :obj="detail" :labelWidth="labelWidth"></info-table>
......@@ -140,7 +146,14 @@
<info-table class="info-tab" :list="defaultList4" :obj="detail" :labelWidth="labelWidth"></info-table>
</template>
<template v-if="title=='裁判文书详情'">
<info-table class="info-tab" :list="defaultList5" :obj="detail" :labelWidth="labelWidth"></info-table>
<info-table class="info-tab" :list="defaultList5" :obj="detail" :labelWidth="labelWidth">
<template v-slot:relatedCompanies="row">
<p v-for="i in row.data.relatedCompanies">
{{i.role}}:<br/>
{{i.name}}
</p>
</template>
</info-table>
</template>
</div>
</el-dialog>
......
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