Commit edf6c1d6 authored by kongfm's avatar kongfm

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

parents 5d398163 997f6f24
...@@ -84,13 +84,13 @@ public class FireExpertsDto extends BaseDto { ...@@ -84,13 +84,13 @@ public class FireExpertsDto extends BaseDto {
// @ExcelIgnore // @ExcelIgnore
//@ExplicitConstraint(indexNum =11,sourceClass = CommonExplicitConstraint.class,method ="getCitys") //@ExplicitConstraint(indexNum =11,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ExcelProperty(value = "现居住地", index = 10) @ExcelProperty(value = "居住地详情", index = 10)
@ApiModelProperty(value = "居住地详情") @ApiModelProperty(value = "居住地详情")
private String residenceDetails; private String residenceDetails;
@ExplicitConstraint(indexNum =9,sourceClass = CommonExplicitConstraint.class,method ="getCitys") @ExplicitConstraint(indexNum =9,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ExcelProperty(value = "现居住地", index = 9) @ExcelProperty(value = "现居住地", index = 9)
@ApiModelProperty(value = "现居住地详细地址") @ApiModelProperty(value = "现居住地")
private String residenceDetailVal; private String residenceDetailVal;
@ExcelProperty(value = "办公电话", index = 11) @ExcelProperty(value = "办公电话", index = 11)
......
...@@ -113,7 +113,7 @@ public class FirefightersZhDto extends BaseDto { ...@@ -113,7 +113,7 @@ public class FirefightersZhDto extends BaseDto {
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "机构名称")
private String companyName; private String companyName;
@ApiModelProperty(value = "专家领域") @ApiModelProperty(value = "station领域")
private String areasExpertise; private String areasExpertise;
@ApiModelProperty(value = "消防专家领域字典code") @ApiModelProperty(value = "消防专家领域字典code")
......
...@@ -96,7 +96,7 @@ public class ExcelController extends BaseController { ...@@ -96,7 +96,7 @@ public class ExcelController extends BaseController {
e.printStackTrace(); e.printStackTrace();
throw new BadRequest("文件格式不正确或excel 模板不匹配"); // BUG 2821 by litw 2021年9月16日 throw new BadRequest("文件格式不正确或excel 模板不匹配"); // BUG 2821 by litw 2021年9月16日
}catch (Exception e){ }catch (Exception e){
throw new RuntimeException("系统异常!"); throw new BadRequest("文件格式不正确或excel 模板不匹配!");
} }
......
...@@ -358,19 +358,30 @@ public class DataSourcesImpl implements DataSources { ...@@ -358,19 +358,30 @@ public class DataSourcesImpl implements DataSources {
FeignClientResult<java.util.Collection<RegionModel>> region = Systemctl.regionClient.queryForTreeParent(null); FeignClientResult<java.util.Collection<RegionModel>> region = Systemctl.regionClient.queryForTreeParent(null);
java.util.Collection<RegionModel> regions = region.getResult();// 以及地址 java.util.Collection<RegionModel> regions = region.getResult();// 以及地址
List<String> address = new ArrayList<>(); List<String> address = new ArrayList<>();
setAddress(address,regions); setAddress("",address,regions);
String[] str = address.toArray(new String[address.size()]); String[] str = address.toArray(new String[address.size()]);
return str; return str;
} }
private void setAddress(List<String> address, Collection<RegionModel> regions) { private void setAddress(String name,List<String> address, Collection<RegionModel> regions) {
regions.stream().forEach(item -> {
for (RegionModel item : regions) {
//添加自己的 //添加自己的
address.add(item.getRegionName() + "@" + item.getSequenceNbr());
address.add(name+" "+item.getRegionName() + "@" + item.getSequenceNbr());
if(item.getChildren() != null && item.getChildren().size() > 0) { if(item.getChildren() != null && item.getChildren().size() > 0) {
setAddress(address,item.getChildren()); setAddress(name+" "+item.getRegionName() ,address,item.getChildren());
} }
}); }
// regions.stream().forEach(item -> {
// //添加自己的
// name =name+item.getRegionName();
// address.add(name + "@" + item.getSequenceNbr());
// if(item.getChildren() != null && item.getChildren().size() > 0) {
// setAddress(name ,address,item.getChildren());
// }
// });
} }
private String[] getDutyArea() { private String[] getDutyArea() {
......
...@@ -39,9 +39,9 @@ public interface IPointDao extends BaseDao<Point, Long> { ...@@ -39,9 +39,9 @@ public interface IPointDao extends BaseDao<Point, Long> {
@Modifying @Modifying
@Transactional @Transactional
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE point_no = (?1)", nativeQuery = true) @Query(value = "UPDATE p_point SET is_delete = 1 WHERE original_id = (?1)", nativeQuery = true)
void delPointByPointNo(Long id); void delPointByOriginalId(Long id);
@Query(value = "SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)", nativeQuery = true) @Query(value = "SELECT id FROM p_point p WHERE is_delete = 0 AND p.original_id = (?1)", nativeQuery = true)
List<Long> findPointByPointNo(String pointNo); List<Long> findPointByPointNo(String pointNo);
} }
...@@ -1187,11 +1187,11 @@ public class PointServiceImpl implements IPointService { ...@@ -1187,11 +1187,11 @@ public class PointServiceImpl implements IPointService {
} }
@Override @Override
public void delPointByPointNo(Long id) { public void delPointByOriginalId(Long id) {
List<Long> idLists = new ArrayList<>(); // List<Long> idLists = new ArrayList<>();
idLists = iPointDao.findPointByPointNo(String.valueOf(id)); // idLists = iPointDao.findPointByPointNo(String.valueOf(id));
iPointInputItemDao.deleteByPointId(idLists); // iPointInputItemDao.deleteByPointId(idLists);
iPointDao.delPointByPointNo(id); iPointDao.delPointByOriginalId(id);
} }
@Override @Override
......
...@@ -325,7 +325,7 @@ public interface IPointService { ...@@ -325,7 +325,7 @@ public interface IPointService {
* *
* @param * @param
*/ */
void delPointByPointNo(Long id); void delPointByOriginalId(Long id);
List<Map<String, Object>> queryItemDetailByPointId(Long id, Long routeId, Long planId); List<Map<String, Object>> queryItemDetailByPointId(Long id, Long routeId, Long planId);
......
...@@ -4,13 +4,12 @@ import com.alibaba.fastjson.JSON; ...@@ -4,13 +4,12 @@ import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto; import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto;
import com.yeejoin.amos.supervision.business.service.intfc.IPointService; import com.yeejoin.amos.supervision.business.service.intfc.IPointService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.eclipse.paho.client.mqttv3.MqttMessage; import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.typroject.tyboot.component.emq.EmqxListener; import org.typroject.tyboot.component.emq.EmqxListener;
import java.nio.charset.Charset; import java.nio.charset.StandardCharsets;
/** /**
* @author keyong * @author keyong
...@@ -30,12 +29,12 @@ public class AmosMqttListener extends EmqxListener { ...@@ -30,12 +29,12 @@ public class AmosMqttListener extends EmqxListener {
@Override @Override
public void processMessage(String topic, MqttMessage message) { public void processMessage(String topic, MqttMessage message) {
byte[] payload = message.getPayload(); byte[] payload = message.getPayload();
String str = new String(payload, Charset.forName("GBK")); String str = new String(payload, StandardCharsets.UTF_8);
if ("jcs/company/topic/add".equals(topic)) { if ("jcs/company/topic/add".equals(topic)) {
OrgUsrFormDto usrFormDto = JSON.parseObject(str, OrgUsrFormDto.class); OrgUsrFormDto usrFormDto = JSON.parseObject(str, OrgUsrFormDto.class);
iPointService.syncSavePoint(usrFormDto); iPointService.syncSavePoint(usrFormDto);
} else { } else {
iPointService.delPointByPointNo(Long.valueOf(str)); iPointService.delPointByOriginalId(Long.valueOf(str));
} }
try { try {
} catch (Exception e) { } catch (Exception e) {
......
...@@ -1599,4 +1599,43 @@ ...@@ -1599,4 +1599,43 @@
update cb_data_dictionary set sort_num = 15 where sequence_nbr = 1201 ; update cb_data_dictionary set sort_num = 15 where sequence_nbr = 1201 ;
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="tw" id="2021-10-12-001">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary"/>
</preConditions>
<comment>删除无用数据</comment>
<sql>
DELETE from cb_data_dictionary where cb_data_dictionary.sequence_nbr in ( 1,2,3,4,5,6)
</sql>
</changeSet>
<changeSet author="tw" id="2021-10-12-002">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary"/>
</preConditions>
<comment>修改数据</comment>
<sql>
UPDATE cb_data_dictionary set type ='GWMC' where type='XFRYGW'
</sql>
</changeSet>
<changeSet author="tw" id="2021-10-12-003">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary"/>
</preConditions>
<comment>修改数据</comment>
<sql>
UPDATE cb_data_dictionary set name ='财务军需类' where sequence_nbr=147
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
count(1) AS total_num count(1) AS total_num
FROM FROM
p_input_item a p_input_item a
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id
where a.is_delete = '0' and a.input_type != '1' where a.is_delete = '0' and a.input_type != '1'
<if test="name!=null and name!=''"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null and name!=''"> and a.name like concat(concat("%",#{name}),"%")</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if>
...@@ -117,13 +118,13 @@ ...@@ -117,13 +118,13 @@
a.item_classify, a.item_classify,
a.item_type_classify, a.item_type_classify,
a.item_level, a.item_level,
a.item_start, a.item_start
IF -- IF
( i.input_item_id IS NULL, 0, 1 ) AS ext -- ( i.input_item_id IS NULL, 0, 1 ) AS ext
FROM FROM
p_input_item a p_input_item a
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id
LEFT JOIN p_route_point_item i ON a.id = i.input_item_id -- LEFT JOIN p_route_point_item i ON a.id = i.input_item_id
WHERE WHERE
a.is_delete = '0' a.is_delete = '0'
AND a.input_type != '1' AND a.input_type != '1'
...@@ -348,7 +349,7 @@ ...@@ -348,7 +349,7 @@
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if> <if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if>
<if test="itemStart!=null"> and a.item_start = #{itemStart} </if> <if test="itemStart!=null"> and a.item_start = #{itemStart} </if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>--> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if> <if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if>
<if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if> <if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
<if test="planId != null">and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )</if> <if test="planId != null">and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )</if>
...@@ -367,7 +368,7 @@ ...@@ -367,7 +368,7 @@
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if> <if test="checkTypeId!=null and checkTypeId!=''"> and a.check_type_id = #{checkTypeId} </if>
<if test="itemStart!=null"> and a.item_start = #{itemStart} </if> <if test="itemStart!=null"> and a.item_start = #{itemStart} </if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>--> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if> <if test="itemClassify != null"> and a.item_classify = #{itemClassify}</if>
<if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if> <if test="itemTypeClassifyIds != null"> and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)</if>
<if test="planId != null">and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )</if> <if test="planId != null">and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )</if>
......
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