dev_xds
姜玉琦 2023-08-25 23:22:40 +08:00
commit dfd9ae0c62
6 changed files with 76 additions and 5 deletions

View File

@ -552,11 +552,15 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="经纬度" prop="longitude"> <el-form-item label="经纬度" prop="longitude" class="fi-longitude">
<div>
<div>({{ form.longitude }},{{ form.latitude }}) </div>
<el-button @click="getMapInfo"></el-button> <el-button @click="getMapInfo"></el-button>
<div style="display: inline-block; margin-left: 12px"> </div>
({{ form.longitude }},{{ form.latitude }}) <div style="margin-left: 12px;flex-grow: 1;">
{{ form.projectAddress }}
<el-input type="textarea" :rows="3" placeholder="请输入地址" v-model="form.projectAddress">
</el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1191,6 +1195,11 @@ export default {
.prj-suprj-edit-dialog { .prj-suprj-edit-dialog {
.el-dialog__body { .el-dialog__body {
padding-bottom: 0px; padding-bottom: 0px;
.fi-longitude{
.el-form-item__content{
display: flex;
}
}
} }
} }
</style> </style>

View File

@ -1,7 +1,10 @@
package com.yanzhu.jh.bigscreen.web.controller; package com.yanzhu.jh.bigscreen.web.controller;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.yanzhu.jh.project.domain.SurProjectInsurance; import com.yanzhu.jh.project.domain.SurProjectInsurance;
@ -11,6 +14,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.concurrent.TimeUnit;
/** /**
* Conller * Conller
*/ */
@ -20,7 +26,8 @@ public class ProjectInsuranceController extends BaseController {
@Autowired @Autowired
private ISurProjectInsuranceService surProjectInsuranceService; private ISurProjectInsuranceService surProjectInsuranceService;
@Autowired
private RedisCache redisCache;
/** /**
* *
* @param deptId * @param deptId
@ -39,4 +46,21 @@ public class ProjectInsuranceController extends BaseController {
return getDataTable(surProjectInsuranceService.selectBgscreenInsuranceList(surProjectInsurance)); return getDataTable(surProjectInsuranceService.selectBgscreenInsuranceList(surProjectInsurance));
} }
/**
*
* @param id
* @return
*/
@GetMapping("/getProjectInsurance")
public AjaxResult getProjectInsurance(Long id){
String key="bgscreen_insurance_getProjectInsurance_"+id;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
List list=surProjectInsuranceService.selectProjectInsuranceListByProjectId(id);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
}
} }

View File

@ -84,4 +84,11 @@ public interface SurProjectInsuranceMapper
* @return * @return
*/ */
public int findInsuranceByParams(SurProjectInsurance surProjectInsurance); public int findInsuranceByParams(SurProjectInsurance surProjectInsurance);
/**
*
* @param projectId
* @return
*/
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId);
} }

View File

@ -76,4 +76,11 @@ public interface ISurProjectInsuranceService
* @return * @return
*/ */
public int deleteSurProjectInsuranceById(Long id); public int deleteSurProjectInsuranceById(Long id);
/**
*
* @param id
* @return
*/
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long id);
} }

View File

@ -133,4 +133,14 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
{ {
return surProjectInsuranceMapper.deleteSurProjectInsuranceById(id); return surProjectInsuranceMapper.deleteSurProjectInsuranceById(id);
} }
/**
*
* @param projectId
* @return
*/
@Override
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId) {
return surProjectInsuranceMapper.selectProjectInsuranceListByProjectId(projectId);
}
} }

View File

@ -30,6 +30,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, project_id, dept_id, insurance_type, insurance_number, insurance_file, insurance_state, begin_date, end_date, company_name, is_del, create_by, create_time, update_by, update_time, remark from sur_project_insurance select id, project_id, dept_id, insurance_type, insurance_number, insurance_file, insurance_state, begin_date, end_date, company_name, is_del, create_by, create_time, update_by, update_time, remark from sur_project_insurance
</sql> </sql>
<select id="selectProjectInsuranceListByProjectId" parameterType="Long" resultMap="SurProjectInsuranceResult">
SELECT x.*,y.dict_label AS insurance_type_name FROM (
SELECT * FROM sys_dict_data WHERE dict_type = 'sur_project_insurance_type' AND STATUS=0
) Y
LEFT JOIN
(
SELECT a.*,b.projectName project_name, c.dept_name FROM sur_project_insurance a,sur_project b,sys_dept c
WHERE a.project_id=b.id AND a.dept_id=c.dept_id AND IF(a.is_del IS NULL ,0,a.is_del) =0 AND a.project_id=#{projectId}
) AS X
ON x.insurance_type=y.dict_value
</select>
<select id="selectSurProjectInsuranceList" parameterType="SurProjectInsurance" resultMap="SurProjectInsuranceResult"> <select id="selectSurProjectInsuranceList" parameterType="SurProjectInsurance" resultMap="SurProjectInsuranceResult">
SELECT SELECT
spi.id, spi.id,