Commit 32991ef6 authored by chenzhao's avatar chenzhao

修改代码

parent 76d63469
......@@ -6,6 +6,8 @@ import java.util.List;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.module.common.api.excel.CommonExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -47,6 +49,11 @@ public class DutyFirstAidExcleDto implements Serializable{
@ApiModelProperty(value = "120急救站")
private String firstAid;
@ExplicitConstraint(indexNum = 5, sourceClass = CommonExplicitConstraint.class, method = "getDutyArea") //固定下拉内容
@ExcelProperty(value = "值班区域", index = 5)
@ApiModelProperty(value = "值班区域")
private String dutyArea;
@ExcelIgnore
@ApiModelProperty(value = "120急救站Id")
private String firstAidId;
......
......@@ -90,7 +90,7 @@
<select id="getPowerTransferInfo" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto">
select
pt.sequence_nbr,
pt.rescue_grid
pt.address
from jc_power_transfer pt LEFT JOIN jc_alert_called a ON pt.alert_called_id = a.sequence_nbr
<where>
a.alert_type_code <![CDATA[ <> ]]> 1214
......
......@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -39,6 +40,9 @@ public class DutyPersonController extends BaseController {
@Autowired
IDutyPersonService iDutyPersonService;
@Value("${logic}")
private String logic;
/**
* 值班列表视图--分页
*
......@@ -113,6 +117,9 @@ public class DutyPersonController extends BaseController {
@ApiParam(value = "结束日期", required = true) @RequestParam String endDate,
@ApiParam(value = "属性编码") @RequestParam(required = false) String fieldCode
) throws ParseException {
if (logic.equals("true")){
fieldCode="";
}
return ResponseHelper.buildResponse(iDutyPersonService.newStatisticsDay(beginDate, endDate, fieldCode));
}
......@@ -196,6 +203,9 @@ public class DutyPersonController extends BaseController {
@ApiParam(value = "班次id") @RequestParam(required = false) Long shiftId,
@ApiParam(value = "岗位") @RequestParam(required = false) String postType,
@ApiParam(value = "属性编码") @RequestParam(required = false) String fieldCode) {
if (logic.equals("true")){
fieldCode="";
}
return ResponseHelper.buildResponse(iDutyPersonService.getSchedulingDutyForSpecifyDate(dutyDay, shiftId, postType, fieldCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -85,7 +85,7 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
// BUG2168 居住地户籍所在地为空判断 bykongfm
if (ObjectUtils.isNotEmpty(firefighter.getResidenceDetails())) {
FeignClientResult<RegionModel> region = Systemctl.regionClient
.getRegion(Long.parseLong(firefighter.getResidenceDetails()));
.getRegion(Long.parseLong(firefighter.getResidenceDetailsCode()));
firefighter.setResidence(region.getResult().getRegionName());
}
if (ObjectUtils.isNotEmpty(firefighter.getNativePlace())) {
......
......@@ -2303,6 +2303,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper.eq(OrgUsr::getIsDelete, false);
wrapper.eq(OrgUsr::getBizOrgType, OrgPersonEnum.人员.getKey());
wrapper.in(OrgUsr::getParentId, ids);
wrapper.isNotNull(OrgUsr::getAmosOrgId);
List<OrgUsr> orgPersonList = this.baseMapper.selectList(wrapper);
List<String> fireStationSimpleList = new ArrayList<String>();
......@@ -3108,6 +3109,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if ("peopleType".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(dynamicFormInstance.getFieldValue()).getName());
}
if ("positionType".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel(peopleInfoDto.getFirefighters().getJobTitle());
}
String fieldCode = dynamicFormInstance.getFieldCode();
if (map1.containsKey(fieldCode) && fieldCode.contains("Code") ){
......
......@@ -499,11 +499,17 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
// 主表增加备注字段
if (alertCalled.getAddress() != null) {
JSONObject address = WaterResourceServiceImpl.getLongLatFromAddress(alertCalled.getAddress());
alertCalled.setAddress(address.getString(BizConstant.ADDRESS));
alertCalled.setCoordinateX(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
alertCalled.setCoordinateY(Double.valueOf(address.getString(BizConstant.LATITUDE)));
String[] addressArr = alertCalled.getAddress().split("@address@");
JSONObject jsonObject = JSONObject.parseObject(addressArr[1]);
alertCalled.setAddress(addressArr[0]);
if (StringUtils.isNotEmpty(jsonObject.getString(BizConstant.LONGITUDE))) {
alertCalled.setCoordinateX(Double.valueOf(jsonObject.getString(BizConstant.LONGITUDE)));
}
if (StringUtils.isNotEmpty(jsonObject.getString(BizConstant.LATITUDE))) {
alertCalled.setCoordinateY(Double.valueOf(jsonObject.getString(BizConstant.LATITUDE)));
}
}
alertCalled.setCallTime(new Date());
if (AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())
|| AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())) {
......@@ -700,7 +706,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
List<AlertCalled> alertCalledList = this.list(new LambdaQueryWrapper<AlertCalled>()
.apply(!ValidationUtil.isEmpty(beginDate), "call_time >= '" + beginDate + "'")
.le(true, AlertCalled::getCallTime, endDate));
.le(true, AlertCalled::getCallTime, endDate).notIn(AlertCalled::getAlertTypeCode,"1214"));
Map<String, String> queryParams = Maps.newHashMap();
queryParams.put("beginDate", beginDate);
queryParams.put("endDate", endDate);
......
......@@ -181,6 +181,10 @@ public class ExcelServiceImpl {
IDutyFirstAidService dutyFirstAidService;
@Autowired
DataDictionaryServiceImpl dataDictionaryService;
@Autowired
DynamicFormInstanceServiceImpl dynamicFormInstanceService;
@Autowired
......@@ -861,6 +865,9 @@ public class ExcelServiceImpl {
if ("gender".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel("346".equals(String.valueOf(dynamicFormInstance.getFieldValue()))?"男":"女");
}
if ("positionType".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(dynamicFormInstance.getFieldValue()).getName());
}
String fieldCode = dynamicFormInstance.getFieldCode();
if (map1.containsKey(fieldCode) && fieldCode.contains("Code") ){
String[] split = map1.get(fieldCode).toString().split("@");
......@@ -1617,9 +1624,16 @@ public class ExcelServiceImpl {
dutyFirstAidDto.setFirstAid(splitStr[0]);
dutyFirstAidDto.setFirstAidId(splitStr[1]);
}
// 需求958 添加值班区域 导入 by kongfm 2021-09-15
cell = row.getCell(5);
if (cell != null) {
String[] dutyArea = cell.toString().split("@");
dutyFirstAidDto.setDutyArea(dutyArea[0]);
dutyFirstAidDto.setDutyAreaId(dutyArea[1]);
}
List<DutyPersonShiftDto> dutyShift = new ArrayList<>();
for (int j = 0; j < dayByMonth.size(); j++) {
cell = row.getCell(5 + j);
cell = row.getCell(6 + j);
String dutyType = cell == null ? "" : cell.toString();
if (!StringUtils.isEmpty(dutyType)) {
DutyPersonShiftDto dutyPersonShiftDto = new DutyPersonShiftDto();
......
......@@ -658,7 +658,7 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
powerTransferInfo.forEach(pt -> {
StringBuilder transferDetail = new StringBuilder();
Long powerTransferId = pt.getSequenceNbr();
String rescueGrid = pt.getRescueGrid();
String rescueGrid = pt.getAddress();
powerTransferCompanyInfo.forEach(ptc -> {
if (powerTransferId.equals(ptc.getPowerTransferId())) {
transferDetail.append(ptc.getCompanyName());
......
......@@ -1794,8 +1794,11 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if (ValidationUtil.isEmpty(taskJson.get("data"))) {
return null;
}
JSONObject dataJson = (JSONObject) taskJson.get("data");
taskId = (String) dataJson.get("id");
String data = JSONObject.toJSONString(taskJson.get("data"));
taskId= JSONObject.parseObject(data, Map.class).get("id").toString();
/* JSONObject dataJson = (JSONObject) taskJson.get("data");
taskId = (String) dataJson.get("id");*/
}
return taskId;
}
......
......@@ -42,10 +42,9 @@
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="bizOrgCode!=null"> and a.org_Code like concat (#{bizOrgCode},"%")</if>
<if test="searchDay!=null and searchDay != '' searchDay == 1">
<if test="searchDay!=null and searchDay != ''and searchDay == 1">
and a.`check_date` = curdate()
</if>
</where>
order by b.id) t
</select>
......@@ -125,7 +124,7 @@
<if test="orgCode!=null">
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="searchDay!=null and searchDay != '' searchDay == 1">
<if test="searchDay!=null and searchDay != '' and searchDay == 1">
and a.`check_date` = curdate()
</if>
</where>
......
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