update code
parent
8f9df2d47a
commit
530c96e094
|
@ -552,11 +552,15 @@
|
|||
|
||||
<el-row>
|
||||
<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>
|
||||
<div style="display: inline-block; margin-left: 12px">
|
||||
({{ form.longitude }},{{ form.latitude }})
|
||||
{{ form.projectAddress }}
|
||||
</div>
|
||||
<div style="margin-left: 12px;flex-grow: 1;">
|
||||
|
||||
<el-input type="textarea" :rows="3" placeholder="请输入地址" v-model="form.projectAddress">
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -1191,6 +1195,11 @@ export default {
|
|||
.prj-suprj-edit-dialog {
|
||||
.el-dialog__body {
|
||||
padding-bottom: 0px;
|
||||
.fi-longitude{
|
||||
.el-form-item__content{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
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.domain.AjaxResult;
|
||||
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.utils.StringUtils;
|
||||
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.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 项目保险Conller
|
||||
*/
|
||||
|
@ -20,7 +26,8 @@ public class ProjectInsuranceController extends BaseController {
|
|||
|
||||
@Autowired
|
||||
private ISurProjectInsuranceService surProjectInsuranceService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
/**
|
||||
* 根据条件查询项目保险
|
||||
* @param deptId
|
||||
|
@ -39,4 +46,21 @@ public class ProjectInsuranceController extends BaseController {
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -84,4 +84,11 @@ public interface SurProjectInsuranceMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int findInsuranceByParams(SurProjectInsurance surProjectInsurance);
|
||||
|
||||
/**
|
||||
* 按项目获取保险信息
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId);
|
||||
}
|
||||
|
|
|
@ -76,4 +76,11 @@ public interface ISurProjectInsuranceService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectInsuranceById(Long id);
|
||||
|
||||
/**
|
||||
* 按项目获取保险信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long id);
|
||||
}
|
||||
|
|
|
@ -133,4 +133,14 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
|
|||
{
|
||||
return surProjectInsuranceMapper.deleteSurProjectInsuranceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按项目获取保险信息
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectInsurance> selectProjectInsuranceListByProjectId(Long projectId) {
|
||||
return surProjectInsuranceMapper.selectProjectInsuranceListByProjectId(projectId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
</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
|
||||
spi.id,
|
||||
|
|
Loading…
Reference in New Issue