Commit b0b8c2bc authored by kongfm's avatar kongfm

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

parents 88d5fce8 16352e4d
......@@ -107,11 +107,13 @@ public class FireExpertsDto extends BaseDto {
@ApiModelProperty(value = "消防专家领域code")
private String expertCode;
@ExcelProperty(value = "人员照片", index = 16)
// @ExcelProperty(value = "人员照片", index = 16)
@ExcelIgnore
@ApiModelProperty(value = "人员照片")
private String personnelPhotos;
@ExcelProperty(value = "资质证书", index = 17)
// @ExcelProperty(value = "资质证书", index = 17)
@ExcelIgnore
@ApiModelProperty(value = "资质证书")
private String qualificationCertificate;
......@@ -131,7 +133,7 @@ public class FireExpertsDto extends BaseDto {
@ApiModelProperty(value = "消防机构name")
private Long fireTeamName;
@ExcelProperty(value = "备注", index = 18)
@ExcelProperty(value = "备注", index = 16)
@ApiModelProperty(value = "备注")
private String note;
......
......@@ -127,7 +127,7 @@
cb_dynamic_form_instance m GROUP BY m.instance_id) b
on
b.instance_id=a.instance_id where a.unit_name is not null
b.instance_id=a.instance_id where a.unit_name is not null and a.is_delete=0
</select>
<!--联动单位列表按时间倒叙排列add order by clu.rec_date desc 同时处理单位根节点-1时查询全部数据问题 2021-09-08 by kongfm -->
......
......@@ -41,6 +41,9 @@
<if test="bizOrgCode != null and bizOrgCode != '-1'">
AND u.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
<if test="parentId != null and parentId != '-1'">
AND u.parent_id like concat(#{map.parentId}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
......@@ -82,6 +85,9 @@
<if test="map.bizOrgCode != null and map.bizOrgCode != '-1'">
AND u.biz_org_code like concat(#{map.bizOrgCode}, '%')
</if>
<if test="map.parentId != null and map.parentId != '-1'">
AND u.parent_id like concat(#{map.parentId}, '%')
</if>
GROUP BY
u.sequence_nbr ,
u.biz_org_name ,
......
......@@ -139,17 +139,15 @@ public class KeySiteController extends BaseController {
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/page")
@ApiOperation(httpMethod = "POST",value = "重点部位分页查询", notes = "重点部位分页查询")
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "重点部位分页查询", notes = "重点部位分页查询")
public ResponseModel<IPage<KeySiteDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size,KeySiteDto KeySiteDto
// @RequestParam(required = false) String name,@RequestParam(required = false) Long buildingId,@RequestParam(required = false) String fireEnduranceRate,
// @RequestParam(required = false) String useNature,@RequestParam(required = false) String fireFacilitiesInfo,@RequestParam(required = false) Long belongId
) {
(value = "size") int size,@RequestParam(required = false) String name,@RequestParam(required = false) Long buildingId,@RequestParam(required = false) String fireEnduranceRate,
@RequestParam(required = false) String useNature,@RequestParam(required = false) String fireFacilitiesInfo,@RequestParam(required = false) Long belongId) {
Page<KeySiteDto> page = new Page<KeySiteDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(keySiteServiceImpl.getPageList(page,KeySiteDto.getName(),KeySiteDto.getBuildingId(),KeySiteDto.getFireEnduranceRate(),KeySiteDto.getUseNature(),KeySiteDto.getFireFacilitiesInfo(),KeySiteDto.getBelongId()));
return ResponseHelper.buildResponse(keySiteServiceImpl.getPageList(page,name,buildingId,fireEnduranceRate,useNature,fireFacilitiesInfo,belongId));
}
/**
......
......@@ -364,8 +364,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
if (req.get("parentId") != null && req.get("parentId") != ""){
OrgUsr parent = this.getById(req.get("parentId").toString());
map.put("bizOrgCode", ObjectUtils.isEmpty(parent) ? null : parent.getBizOrgCode());
// OrgUsr parent = this.getById(req.get("parentId").toString());
map.put("parentId", req.get("parentId"));
// map.put("bizOrgCode", ObjectUtils.isEmpty(parent) ? null : parent.getBizOrgCode());
}
/*BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始*/
......
......@@ -10,11 +10,9 @@ import com.yeejoin.amos.supervision.business.vo.RoutePointItemVo;
import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import com.yeejoin.amos.supervision.core.common.request.CommonRequest;
import com.yeejoin.amos.supervision.dao.entity.Plan;
import com.yeejoin.amos.supervision.dao.entity.RoutePointItem;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -57,11 +55,7 @@ public class RoutePointItemController extends AbstractBaseController {
try {
String userId = getUserId();
if (StringUtils.isNotBlank(userId)) {
List<RoutePointItem> list = routePointItemService.addRoutePointItemList(plan, inputItemIds, status, userId);
if (CollectionUtils.isNotEmpty(list)) {
return CommonResponseUtil.success();
}
return CommonResponseUtil.failure("路线点或检查项为空!");
return CommonResponseUtil.success(routePointItemService.addRoutePointItemList(plan, inputItemIds, status, userId));
}
return CommonResponseUtil.failure("创建用户为空!");
} catch (Exception e) {
......
......@@ -48,32 +48,33 @@ public class RoutePointItemServiceImpl implements IRoutePointItemService {
public List<RoutePointItem> addRoutePointItemList(Plan plan, List<Long> inputItemIds, Boolean status, String userId) {
Long planId = plan.getId();
Long routeId = plan.getRouteId();
if (CollectionUtils.isNotEmpty(inputItemIds) && routeId != null && planId != null) {
if (routeId != null && planId != null) {
if (status) {
planDao.updatePlanStatus(PlanStatusEnum.EXAMINE_DEVELOPED.getValue(), planId);
} else {
List<InputItem> inputItemList = inputItemMapper.findByIdIn(inputItemIds);
List<RoutePoint> routePointList = routePointDao.findByRouteId(routeId);
if (CollectionUtils.isNotEmpty(inputItemList) && CollectionUtils.isNotEmpty(routePointList)) {
List<RoutePointItem> list = new ArrayList<>();
routePointList.stream().forEach(route -> {
Long routePointId = route.getId();
inputItemList.stream().forEach(item -> {
RoutePointItem routePointItem = new RoutePointItem();
routePointItem.setPlanId(planId);
routePointItem.setInputItemId(item.getId());
routePointItem.setBasisJson(item.getBasisJson());
routePointItem.setOrderNo(item.getOrderNo());
routePointItem.setRoutePointId(routePointId);
routePointItem.setCreatorId(userId);
routePointItem.setCreateDate(new Date());
list.add(routePointItem);
if (CollectionUtils.isNotEmpty(inputItemIds)) {
List<InputItem> inputItemList = inputItemMapper.findByIdIn(inputItemIds);
List<RoutePoint> routePointList = routePointDao.findByRouteId(routeId);
if (CollectionUtils.isNotEmpty(inputItemList) && CollectionUtils.isNotEmpty(routePointList)) {
List<RoutePointItem> list = new ArrayList<>();
routePointList.stream().forEach(route -> {
Long routePointId = route.getId();
inputItemList.stream().forEach(item -> {
RoutePointItem routePointItem = new RoutePointItem();
routePointItem.setPlanId(planId);
routePointItem.setInputItemId(item.getId());
routePointItem.setBasisJson(item.getBasisJson());
routePointItem.setOrderNo(item.getOrderNo());
routePointItem.setRoutePointId(routePointId);
routePointItem.setCreatorId(userId);
routePointItem.setCreateDate(new Date());
list.add(routePointItem);
});
});
});
return routePointItemDao.saveAll(list);
return routePointItemDao.saveAll(list);
}
}
}
// routePointItemDao.deleteByPlanId(planId);
}
return Lists.newArrayList();
}
......
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