Merge remote-tracking branch 'origin/glj' into glj

This commit is contained in:
qqGroup0 2023-04-12 13:45:58 +08:00
commit 6b3056fd08
4 changed files with 68 additions and 110 deletions

View File

@ -11,7 +11,7 @@ import org.springframework.cloud.client.SpringCloudApplication;
@SpringCloudApplication @SpringCloudApplication
public class VoRdmApplication { public class VoRdmApplication {
public static void main(String[] args) { public static void main(String[] args) {
BladeApplication.run(CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args); BladeApplication.run("glj-"+CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
// BladeApplication.run("zqq-" + CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args); // BladeApplication.run("zqq-" + CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
} }
} }

View File

@ -50,6 +50,7 @@ public class DisasterInfoController {
private final DownloadRecordService downloadRecordService; private final DownloadRecordService downloadRecordService;
private final DisasterInfoVoService disasterInfoVoService; private final DisasterInfoVoService disasterInfoVoService;
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "分页", notes = "传入Tool") @ApiOperation(value = "分页", notes = "传入Tool")
@ApiImplicitParams({ @ApiImplicitParams({
@ -61,8 +62,10 @@ public class DisasterInfoController {
IPage<CallForHelpVo> pages = disasterInfoService.page(Condition.getPage(query), CallForHelpVo); IPage<CallForHelpVo> pages = disasterInfoService.page(Condition.getPage(query), CallForHelpVo);
return R.data(pages); return R.data(pages);
} }
/** /**
* 首页数据轮播和定位相关 * 首页数据轮播和定位相关
*
* @return * @return
*/ */
@GetMapping("/indexData") @GetMapping("/indexData")
@ -79,6 +82,7 @@ public class DisasterInfoController {
/** /**
* 灾害查询条件时间类型灾害联动 * 灾害查询条件时间类型灾害联动
*
* @param disasterInfo * @param disasterInfo
* @return * @return
*/ */
@ -129,8 +133,6 @@ public class DisasterInfoController {
} }
/** /**
* 灾害信息统计 国家/灾害类型 左边栏 * 灾害信息统计 国家/灾害类型 左边栏
* *
@ -293,6 +295,7 @@ public class DisasterInfoController {
/** /**
* 获取用户所以得机构 * 获取用户所以得机构
*
* @return * @return
*/ */
@GetMapping("/getUserTenant") @GetMapping("/getUserTenant")
@ -302,7 +305,6 @@ public class DisasterInfoController {
/** /**
* call for help * call for help
*
*/ */
@PostMapping("Call-for-help") @PostMapping("Call-for-help")
public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo ){ public R<Boolean> insertRespondInfo(@RequestBody CallForHelpVo callForHelpVo ){
@ -316,21 +318,20 @@ public class DisasterInfoController {
GuestManageDisasterRef GuestManageDisasterRef = new GuestManageDisasterRef(); GuestManageDisasterRef GuestManageDisasterRef = new GuestManageDisasterRef();
GuestManageDisasterRef.setId(IdWorker.getId()); GuestManageDisasterRef.setId(IdWorker.getId());
GuestManageDisasterRef.setSponsorId(guestInfo.getId()); GuestManageDisasterRef.setSponsorId(guestInfo.getId());
String vordm_id="test";
GuestManageDisasterRef.setDisasterId(disasterInfo.getId()); GuestManageDisasterRef.setDisasterId(disasterInfo.getId());
Boolean flag1 = guestInfoService.save(guestInfo); Boolean flag1 = guestInfoService.save(guestInfo);
Boolean flag2 = guestManageDisasterRefService.save(GuestManageDisasterRef); Boolean flag2 = guestManageDisasterRefService.save(GuestManageDisasterRef);
Boolean flag3 = disasterInfoService.save(disasterInfo); Boolean flag3 = disasterInfoService.save(disasterInfo);
Boolean callForHelp= flag1&flag2&flag3; Boolean callForHelp = flag1 && flag2 && flag3;
// callForHelpVo.setId(IdWorker.getId());
// Boolean insertFlag=accountInfoService.save(accountInfo);
return R.data(callForHelp); return R.data(callForHelp);
} }
@PostMapping("review") @PostMapping("review")
public R<Boolean> review(String id) { public R<Boolean> review(String id) {
DisasterInfo disasterInfo = new DisasterInfo(); DisasterInfo disasterInfo = new DisasterInfo();
disasterInfo.setId(Long.valueOf(id)); disasterInfo.setId(Long.valueOf(id));
disasterInfo.setRespondStatus(1); disasterInfo.setRespondStatus(2);
Boolean flag=disasterInfoService.updateById(disasterInfo); Boolean flag=disasterInfoService.updateById(disasterInfo);
return R.data(flag); return R.data(flag);
} }

View File

@ -44,14 +44,13 @@
gi.username AS sponsorName, gi.username AS sponsorName,
gi.organization AS sponsorOrganization, gi.organization AS sponsorOrganization,
bu.name AS managerName, bu.name AS managerName,
bt.tenant_name AS managerOrganization, bu.organization AS managerOrganization,
bdb.dict_value AS dictValue bdb.dict_value AS dictValue
from disaster_info di from disaster_info di
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type left join blade_dict_biz bdb on bdb.dict_key = di.disaster_type
left join guest_info gi on gi.id = gmdr.sponsor_id left join guest_info gi on gi.id = gmdr.sponsor_id
left join blade_user bu on bu.id = gmdr.manager_id left join blade_user bu on bu.id = gmdr.manager_id
left join blade_tenant bt on bt.id = bu.organization
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
di.id = #{id} di.id = #{id}
@ -130,6 +129,7 @@
group by t.disaster_country group by t.disaster_country
order by cnt desc limit 7) b on c.flagname = b.`name` order by cnt desc limit 7) b on c.flagname = b.`name`
</select> </select>
<select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo"> <select id="page" parameterType="com.kening.vordm.vo.CallForHelpVo" resultType="com.kening.vordm.vo.CallForHelpVo">
SELECT SELECT
u.username , u.username ,
@ -149,6 +149,7 @@
guest_info u on u.id = ud.sponsor_id JOIN guest_info u on u.id = ud.sponsor_id JOIN
disaster_info d on d.id = ud.disaster_id disaster_info d on d.id = ud.disaster_id
<where> <where>
d.respond_status = #{callForHelpVo.respondStatus}
<if test="callForHelpVo.disasterType != null and callForHelpVo.disasterType != ''"> <if test="callForHelpVo.disasterType != null and callForHelpVo.disasterType != ''">
d.disaster_type = #{callForHelpVo.disasterType} d.disaster_type = #{callForHelpVo.disasterType}
</if> </if>
@ -164,9 +165,7 @@
<if test="callForHelpVo.uploadTime != null and callForHelpVo.uploadTime != ''"> <if test="callForHelpVo.uploadTime != null and callForHelpVo.uploadTime != ''">
and d.upload_time = #{callForHelpVo.uploadTime} and d.upload_time = #{callForHelpVo.uploadTime}
</if> </if>
<if test="callForHelpVo.geometry != null and callForHelpVo.geometry != ''">
and d.geometry = #{callForHelpVo.geometry}
</if>
</where> </where>
order by d.upload_time desc
</select> </select>
</mapper> </mapper>

View File

@ -1,42 +0,0 @@
<?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.kening.vordm.mapper.DisasterInfoVoMapper">
<resultMap id="BaseResultMap" type="com.kening.vordm.vo.DisasterInfoVo">
<result property="id" column="id" jdbcType="BIGINT"/>
<result property="disasterType" column="disaster_type" jdbcType="VARCHAR"/>
<result property="disasterKeyword" column="disaster_keyword" jdbcType="VARCHAR"/>
<result property="disasterTime" column="disaster_time" jdbcType="DATE"/>
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
<result property="geometry" column="geometry" jdbcType="VARCHAR"/>
<result property="disasterLevel" column="disaster_level" jdbcType="VARCHAR"/>
<result property="disasterCountry" column="disaster_country" jdbcType="VARCHAR"/>
<result property="respondStatus" column="respond_status" jdbcType="SMALLINT"/>
<result property="visitCount" column="visit_count" jdbcType="INTEGER"/>
<result property="downloadCount" column="download_count" jdbcType="INTEGER"/>
<result property="spiderType" column="spider_type" jdbcType="INTEGER"/>
<result property="tempendTime" column="tempend_time" jdbcType="TIMESTAMP"/>
<result property="tempStartTime" column="temp_start_time" jdbcType="TIMESTAMP"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="VARCHAR"/>
<result property="disasterImg" column="disaster_img" jdbcType="VARCHAR"/>
<result property="dictValue" column="dict_value" jdbcType="VARCHAR"/>
<result property="size" column="size" jdbcType="DECIMAL"/>
<result property="news" column="news" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,disaster_type,disaster_keyword,
disaster_time,upload_time,geometry,
disaster_level,disaster_country,respond_status,
visit_count,download_count,spider_type,
tempend_time,temp_start_time,create_time,
vordm_id,respond_time,sponsor_organization,
disaster_img,dict_value,size,
news
</sql>
</mapper>