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 {
// @ExcelIgnore
//@ExplicitConstraint(indexNum =11,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ExcelProperty(value = "现居住地", index = 10)
@ExcelProperty(value = "居住地详情", index = 10)
@ApiModelProperty(value = "居住地详情")
private String residenceDetails;
@ExplicitConstraint(indexNum =9,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ExcelProperty(value = "现居住地", index = 9)
@ApiModelProperty(value = "现居住地详细地址")
@ApiModelProperty(value = "现居住地")
private String residenceDetailVal;
@ExcelProperty(value = "办公电话", index = 11)
......
......@@ -113,7 +113,7 @@ public class FirefightersZhDto extends BaseDto {
@ApiModelProperty(value = "机构名称")
private String companyName;
@ApiModelProperty(value = "专家领域")
@ApiModelProperty(value = "station领域")
private String areasExpertise;
@ApiModelProperty(value = "消防专家领域字典code")
......
......@@ -96,7 +96,7 @@ public class ExcelController extends BaseController {
e.printStackTrace();
throw new BadRequest("文件格式不正确或excel 模板不匹配"); // BUG 2821 by litw 2021年9月16日
}catch (Exception e){
throw new RuntimeException("系统异常!");
throw new BadRequest("文件格式不正确或excel 模板不匹配!");
}
......
......@@ -358,19 +358,30 @@ public class DataSourcesImpl implements DataSources {
FeignClientResult<java.util.Collection<RegionModel>> region = Systemctl.regionClient.queryForTreeParent(null);
java.util.Collection<RegionModel> regions = region.getResult();// 以及地址
List<String> address = new ArrayList<>();
setAddress(address,regions);
setAddress("",address,regions);
String[] str = address.toArray(new String[address.size()]);
return str;
}
private void setAddress(List<String> address, Collection<RegionModel> regions) {
regions.stream().forEach(item -> {
private void setAddress(String name,List<String> address, Collection<RegionModel> regions) {
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) {
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() {
......
......@@ -39,9 +39,9 @@ public interface IPointDao extends BaseDao<Point, Long> {
@Modifying
@Transactional
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE point_no = (?1)", nativeQuery = true)
void delPointByPointNo(Long id);
@Query(value = "UPDATE p_point SET is_delete = 1 WHERE original_id = (?1)", nativeQuery = true)
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);
}
......@@ -1187,11 +1187,11 @@ public class PointServiceImpl implements IPointService {
}
@Override
public void delPointByPointNo(Long id) {
List<Long> idLists = new ArrayList<>();
idLists = iPointDao.findPointByPointNo(String.valueOf(id));
iPointInputItemDao.deleteByPointId(idLists);
iPointDao.delPointByPointNo(id);
public void delPointByOriginalId(Long id) {
// List<Long> idLists = new ArrayList<>();
// idLists = iPointDao.findPointByPointNo(String.valueOf(id));
// iPointInputItemDao.deleteByPointId(idLists);
iPointDao.delPointByOriginalId(id);
}
@Override
......
......@@ -325,7 +325,7 @@ public interface IPointService {
*
* @param
*/
void delPointByPointNo(Long id);
void delPointByOriginalId(Long id);
List<Map<String, Object>> queryItemDetailByPointId(Long id, Long routeId, Long planId);
......
......@@ -4,13 +4,12 @@ import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto;
import com.yeejoin.amos.supervision.business.service.intfc.IPointService;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.component.emq.EmqxListener;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* @author keyong
......@@ -30,12 +29,12 @@ public class AmosMqttListener extends EmqxListener {
@Override
public void processMessage(String topic, MqttMessage message) {
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)) {
OrgUsrFormDto usrFormDto = JSON.parseObject(str, OrgUsrFormDto.class);
iPointService.syncSavePoint(usrFormDto);
} else {
iPointService.delPointByPointNo(Long.valueOf(str));
iPointService.delPointByOriginalId(Long.valueOf(str));
}
try {
} catch (Exception e) {
......
......@@ -1599,4 +1599,43 @@
update cb_data_dictionary set sort_num = 15 where sequence_nbr = 1201 ;
</sql>
</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>
......@@ -82,6 +82,7 @@
count(1) AS total_num
FROM
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'
<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>
......@@ -117,13 +118,13 @@
a.item_classify,
a.item_type_classify,
a.item_level,
a.item_start,
IF
( i.input_item_id IS NULL, 0, 1 ) AS ext
a.item_start
-- IF
-- ( i.input_item_id IS NULL, 0, 1 ) AS ext
FROM
p_input_item a
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
a.is_delete = '0'
AND a.input_type != '1'
......@@ -348,7 +349,7 @@
<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="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="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>
......@@ -367,7 +368,7 @@
<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="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="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>
......
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