Commit 447cf67d authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents 1a2a5d18 e0f4a158
...@@ -39,7 +39,7 @@ public class FireTeamDto extends BaseDto { ...@@ -39,7 +39,7 @@ public class FireTeamDto extends BaseDto {
@ApiModelProperty(value = "机构code") @ApiModelProperty(value = "机构code")
private String companyCode; private String companyCode;
@ExplicitConstraint(indexNum = 1, sourceClass = CommonExplicitConstraint.class,method="getFireTeam") //动态下拉内容 @ExplicitConstraint(indexNum = 1, sourceClass = CommonExplicitConstraint.class,method="getFireTeamList") //动态下拉内容
@ExcelProperty(value = "上级队伍", index = 1) @ExcelProperty(value = "上级队伍", index = 1)
@ApiModelProperty(value = "父级名称") @ApiModelProperty(value = "父级名称")
private String parentName; private String parentName;
......
...@@ -75,6 +75,9 @@ public class OrgPersonFormDto extends BaseEntity{ ...@@ -75,6 +75,9 @@ public class OrgPersonFormDto extends BaseEntity{
private String orgExpandAttr8; private String orgExpandAttr8;
//当前登录人id
private String userId;
public OrgPersonFormDto() { public OrgPersonFormDto() {
} }
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
and t.type_code = #{typeCode} and t.type_code = #{typeCode}
</if> </if>
<if test='bizOrgCode!=null and bizOrgCode!=""'> <if test='bizOrgCode!=null and bizOrgCode!=""'>
and t.biz_org_code = #{bizOrgCode} and t.biz_org_code like CONCAT( '%', #{bizOrgCode},'%')
</if> </if>
</select> </select>
<select id="listFireTeamDtoTree" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto"> <select id="listFireTeamDtoTree" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto">
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
c.rec_date AS recDate, c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName, c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName, c.use_nature_name as useNatureName,
c.charge_person_code chargePersonCode,
c.biz_org_name as bizOrgName, c.biz_org_name as bizOrgName,
c.biz_org_code as bizOrgCode c.biz_org_code as bizOrgCode
FROM cb_key_site c FROM cb_key_site c
......
...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service; ...@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import org.typroject.tyboot.core.foundation.exception.BaseException;
import java.util.List; import java.util.List;
...@@ -41,7 +42,7 @@ public interface IEquipmentInformService { ...@@ -41,7 +42,7 @@ public interface IEquipmentInformService {
Boolean acceptInform(Long sequenceNbr); Boolean acceptInform(Long sequenceNbr);
EquipmentInformDto updateEquipmentInform(EquipmentInformDto model, ReginParams userInfo); EquipmentInformDto updateEquipmentInform(EquipmentInformDto model, ReginParams userInfo) throws BaseException;
EquipmentInformDto queryDtoBySeq(Long sequenceNbr); EquipmentInformDto queryDtoBySeq(Long sequenceNbr);
......
...@@ -58,7 +58,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -58,7 +58,7 @@ import io.swagger.annotations.ApiOperation;
@RestController @RestController
@Api(tags = "人员Api") @Api(tags = "人员Api")
@RequestMapping(value = "/org-person") @RequestMapping(value = "/org-person")
public class OrgPersonController { public class OrgPersonController extends BaseController {
@Autowired @Autowired
OrgUsrServiceImpl iOrgUsrService; OrgUsrServiceImpl iOrgUsrService;
@Autowired @Autowired
...@@ -124,11 +124,15 @@ public class OrgPersonController { ...@@ -124,11 +124,15 @@ public class OrgPersonController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情") @ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel<OrgPersonFormDto> selectById(HttpServletRequest request, @PathVariable Long id) throws Exception { public ResponseModel<OrgPersonFormDto> selectById(HttpServletRequest request, @PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectPersonById(id));
OrgPersonFormDto orgPersonFormDto=iOrgUsrService.selectPersonById(id);
AgencyUserModel user = getUserInfo();
orgPersonFormDto.setUserId(user.getUserId());
return ResponseHelper.buildResponse(orgPersonFormDto);
} }
/** /**
......
...@@ -99,10 +99,19 @@ public class OrgUsrController extends BaseController { ...@@ -99,10 +99,19 @@ public class OrgUsrController extends BaseController {
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除") @ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public ResponseModel<String> deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<String> deleteById(HttpServletRequest request, @PathVariable Long id) {
// 删除时,只作逻辑删除 // 删除时,只作逻辑删除
// BUG 2741 首先判断是否为公司 如果公司底下有人员不可直接删除 bykongfm // BUG 2741 首先判断是否为公司 如果公司底下有人员不可直接删除 bykongfm
//bug 2882 判断是否为部门 如果部门底下有人员不可直接删除 chenzhao 2021-09-27 start //bug 2882 判断是否为部门 如果部门底下有人员不可直接删除 chenzhao 2021-09-27 start
OrgUsr tempOrg = iOrgUsrService.getById(id.toString()); OrgUsr tempOrg = iOrgUsrService.getById(id.toString());
//当前登录人不能删除自己
AgencyUserModel user = getUserInfo();
if(tempOrg.getAmosOrgId()!=null&&tempOrg.getAmosOrgId().equals(user.getUserId())){
return ResponseHelper.buildResponse("-1");
}
if (tempOrg.getBizOrgType().equals("COMPANY") || tempOrg.getBizOrgType().equals("DEPARTMENT")) { if (tempOrg.getBizOrgType().equals("COMPANY") || tempOrg.getBizOrgType().equals("DEPARTMENT")) {
List<OrgUsr> tempList = iOrgUsrService.list(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getParentId, id).eq(OrgUsr::getIsDelete, false)); List<OrgUsr> tempList = iOrgUsrService.list(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getParentId, id).eq(OrgUsr::getIsDelete, false));
/*bug3031 删除机场单位后,队伍所属单位字段数据未清空 2021-10-13 start*/ /*bug3031 删除机场单位后,队伍所属单位字段数据未清空 2021-10-13 start*/
......
...@@ -465,8 +465,18 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa ...@@ -465,8 +465,18 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public Map<String, Object> checkExcuteTaskAuthMap(Long sequenceNbr, ReginParams userInfo) { public Map<String, Object> checkExcuteTaskAuthMap(Long sequenceNbr, ReginParams userInfo) {
// 获取当前登录用户的角色 // 获取当前登录用户的角色
String currentLoginUserRole = null;
String currentLoginUserRole = userInfo.getRole().getRoleName(); // String currentLoginUserRole = userInfo.getRole().getRoleName();
if (userInfo.getUserModel().getOrgNames().contains(roleName[0])) {
currentLoginUserRole = roleName[0];
}else if (userInfo.getUserModel().getOrgNames().contains(roleName[1])) {
currentLoginUserRole = roleName[1];
}else if (userInfo.getUserModel().getOrgNames().contains(roleName[2])) {
currentLoginUserRole = roleName[2];
}else if (userInfo.getUserModel().getOrgNames().contains(roleName[3])) {
currentLoginUserRole = roleName[3];
}
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
map.put("checkFlag", false); map.put("checkFlag", false);
FailureDetailsDto failureDetailsDto = this.queryBySeq(sequenceNbr); FailureDetailsDto failureDetailsDto = this.queryBySeq(sequenceNbr);
......
...@@ -1002,6 +1002,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -1002,6 +1002,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsrMapper.updatelistByParentId(orgUsr.getBizOrgCode(), oriOrgUsr.getBizOrgCode()); orgUsrMapper.updatelistByParentId(orgUsr.getBizOrgCode(), oriOrgUsr.getBizOrgCode());
// saveOrgUsr(orgUsr, oriOrgUsr); // saveOrgUsr(orgUsr, oriOrgUsr);
// 保存动态表单数据 // 保存动态表单数据
updateById(orgUsr);
updateDynamicFormInstance(orgUsr.getSequenceNbr(), OrgDepartmentVo.getDynamicFormValue()); updateDynamicFormInstance(orgUsr.getSequenceNbr(), OrgDepartmentVo.getDynamicFormValue());
OrgDepartmentVo.setBizOrgCode(orgUsr.getBizOrgCode()); OrgDepartmentVo.setBizOrgCode(orgUsr.getBizOrgCode());
return OrgDepartmentVo; return OrgDepartmentVo;
......
package com.yeejoin.amos.boot.module.common.biz.utils;
import org.springframework.http.HttpStatus;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
public class CommonResponseUtil
{
public static ResponseModel success()
{
ResponseModel res = new ResponseModel();
res.setDevMessage("SUCCESS");
res.setStatus(HttpStatus.OK.value());
return res;
}
public static ResponseModel success(Object obj)
{
ResponseModel res = new ResponseModel();
res.setResult(obj);
res.setDevMessage("SUCCESS");
res.setStatus(HttpStatus.OK.value());
return res;
}
public static ResponseModel success(Object obj, String message)
{
ResponseModel res = new ResponseModel();
res.setResult(obj);
res.setDevMessage(message);
res.setStatus(HttpStatus.OK.value());
return res;
}
public static ResponseModel failure()
{
ResponseModel res = new ResponseModel();
res.setDevMessage("FAILURE");
res.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return res;
}
public static ResponseModel failure(String message)
{
ResponseModel res = new ResponseModel();
res.setDevMessage("FAILURE");
res.setMessage(message);
res.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return res;
}
public static ResponseModel failure(Object obj, String message)
{
ResponseModel res = new ResponseModel();
res.setResult(obj);
res.setDevMessage("FAILURE");
res.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
return res;
}
}
...@@ -1292,7 +1292,7 @@ public class CarController extends AbstractBaseController { ...@@ -1292,7 +1292,7 @@ public class CarController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTreeByUserAndType", method = RequestMethod.GET) @RequestMapping(value = "/user/companyTreeByUserAndType", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据登录人及类型获取公司部门树", notes = "根据登录人及类型获取公司部门树") @ApiOperation(httpMethod = "GET", value = "根据登录人及类型获取公司部门树", notes = "根据登录人及类型获取公司部门树")
public ResponseModel<Object> companyTreeByUserAndType() throws Exception { public ResponseModel<Object> companyTreeByUserAndType() throws Exception {
FeignClientResult<List<OrgMenuDto>> menusList = jcsFeign.getCompanyDeptTreeWithAuth(carAuthKey, null); FeignClientResult<List<OrgMenuDto>> menusList = jcsFeign.getCompanyDeptTreeWithAuth(carAuthKey, null);
......
package com.yeejoin.equipmanage.service.impl; package com.yeejoin.equipmanage.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.equipmanage.common.entity.dto.MonitorEventDto; import com.yeejoin.equipmanage.common.entity.dto.MonitorEventDto;
import com.yeejoin.equipmanage.common.enums.VideoEventEnum; import com.yeejoin.equipmanage.common.enums.VideoEventEnum;
import com.yeejoin.equipmanage.service.MqttEventReceiveService; import com.yeejoin.equipmanage.service.MqttEventReceiveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -13,6 +17,7 @@ import java.util.ArrayList; ...@@ -13,6 +17,7 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@Slf4j
@Service @Service
public class MqttEventReceiveServiceImpl implements MqttEventReceiveService { public class MqttEventReceiveServiceImpl implements MqttEventReceiveService {
...@@ -23,8 +28,9 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService { ...@@ -23,8 +28,9 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void handlerMqttIncrementMessage(String topic, String message) { public void handlerMqttIncrementMessage(String topic, String message) {
JSONObject json = JSONObject.parseObject(message);
try { try {
log.debug(message);
JSONObject json = JSON.parseObject(message);
String deviceCode = json.getString("deviceCode"); String deviceCode = json.getString("deviceCode");
String event = json.getString("event"); String event = json.getString("event");
JSONObject eventJson = JSONObject.parseObject(event); JSONObject eventJson = JSONObject.parseObject(event);
...@@ -60,4 +66,9 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService { ...@@ -60,4 +66,9 @@ public class MqttEventReceiveServiceImpl implements MqttEventReceiveService {
e.printStackTrace(); e.printStackTrace();
} }
} }
// public static void main(String[] args) {
// MqttEventReceiveServiceImpl m = new MqttEventReceiveServiceImpl();
// m.handlerMqttIncrementMessage("", "{\"deviceCode\":\"13485741871310161013\",\"traceId\":\"-1202608724639988142\",\"event\":{\"pic\":\"upload/iot/1433672253282881537/752F8D2FCC745F218EE936C673DAB.jpg\",\"eventContent\":\"人数变化事件 \",\"eventType\":15}}");
// }
} }
...@@ -176,7 +176,7 @@ public class TopographyService ...@@ -176,7 +176,7 @@ public class TopographyService
} }
if (!ValidationUtil.isEmpty(nodeDetailList)){ if (!ValidationUtil.isEmpty(nodeDetailList)){
Map<String, String> createDateMap = new HashMap<>(); Map<String, String> createDateMap = new HashMap<>();
createDateMap.put("name", "创建时间"); createDateMap.put("name", "更新时间");
createDateMap.put("value", DateUtils.date2LongStr(new Date())); createDateMap.put("value", DateUtils.date2LongStr(new Date()));
nodeDetail.add(createDateMap); nodeDetail.add(createDateMap);
} }
......
...@@ -184,6 +184,10 @@ public class DataSourcesImpl implements DataSources { ...@@ -184,6 +184,10 @@ public class DataSourcesImpl implements DataSources {
case "getFireStationContactUser": case "getFireStationContactUser":
str = getFireStationContactUser(); str = getFireStationContactUser();
break; break;
case "getFireTeamList":
str = getFireTeamList();
break;
} }
} }
return str; return str;
...@@ -269,6 +273,23 @@ public class DataSourcesImpl implements DataSources { ...@@ -269,6 +273,23 @@ public class DataSourcesImpl implements DataSources {
return str; return str;
} }
private String[] getFireTeamList() {
// Page<FireTeamCardDto> pageBean = new Page<>(0, Integer.MAX_VALUE);
// IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean,
// new FireTeamListDto());
// List<FireTeamCardDto> records = fireTeamCardDtoIPage.getRecords();
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_team_info");
List<FireTeam> records = fireTeamService.getFireTeamList(reginParams.getPersonIdentity().getBizOrgCode());
List<String> names = records.stream().map(item -> {
return item.getName() + "@" + item.getSequenceNbr();
}).collect(Collectors.toList());
String[] str = names.toArray(new String[names.size()]);
return str;
}
private String[] getEquipFireTeam() { private String[] getEquipFireTeam() {
// Page<FireTeamCardDto> pageBean = new Page<>(0, Integer.MAX_VALUE); // Page<FireTeamCardDto> pageBean = new Page<>(0, Integer.MAX_VALUE);
// IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean, // IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean,
......
...@@ -723,6 +723,7 @@ public class ExcelServiceImpl { ...@@ -723,6 +723,7 @@ public class ExcelServiceImpl {
if (item.getFireTeam() != null) { if (item.getFireTeam() != null) {
Long fireTeamId = Long.valueOf(item.getFireTeam().split("@")[1]); Long fireTeamId = Long.valueOf(item.getFireTeam().split("@")[1]);
firefighters.setFireTeamId(fireTeamId); firefighters.setFireTeamId(fireTeamId);
firefighters.setFireTeamName(item.getFireTeam().split("@")[0]);
} }
if (firefighters.getCertificatesType() != null) { if (firefighters.getCertificatesType() != null) {
String[] certificates = firefighters.getCertificatesType().split("@"); String[] certificates = firefighters.getCertificatesType().split("@");
...@@ -748,7 +749,7 @@ public class ExcelServiceImpl { ...@@ -748,7 +749,7 @@ public class ExcelServiceImpl {
firefighters.setCompanyName(tempCompany[0]); firefighters.setCompanyName(tempCompany[0]);
firefighters.setCompany(tempCompany[1]); firefighters.setCompany(tempCompany[1]);
firefighters.setBizOrgName(tempCompany[0]); firefighters.setBizOrgName(tempCompany[0]);
firefighters.setBizOrgCode(tempCompany[1]); firefighters.setBizOrgCode(tempCompany[2]);
} }
if (firefighters.getNativePlaceValue() != null) { if (firefighters.getNativePlaceValue() != null) {
String[] tempCity = firefighters.getNativePlaceValue().split("@"); String[] tempCity = firefighters.getNativePlaceValue().split("@");
...@@ -1793,7 +1794,7 @@ public class ExcelServiceImpl { ...@@ -1793,7 +1794,7 @@ public class ExcelServiceImpl {
ReginParams params = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(keyString, token)).toString(), ReginParams params = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(keyString, token)).toString(),
ReginParams.class); ReginParams.class);
userModel.setRecUserId(params.getUserModel().getUserId()); userModel.setRecUserId(params.getUserModel().getUserId());
userModel.setRecUserName(params.getUserModel().getUserName()); userModel.setRecUserName(params.getUserModel().getRealName());
userModel.setRecDate(new Date()); userModel.setRecDate(new Date());
return userModel; return userModel;
} }
......
...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; ...@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService; import com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto; import com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledQueryDto;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils; import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformEquipmentDto;
...@@ -95,11 +96,15 @@ public class EquipmentInformController extends BaseController { ...@@ -95,11 +96,15 @@ public class EquipmentInformController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/submit") @PostMapping(value = "/submit")
@ApiOperation(httpMethod = "POST", value = "提交设备告知单", notes = "提交设备告知单") @ApiOperation(httpMethod = "POST", value = "提交设备告知单", notes = "提交设备告知单")
public ResponseModel<EquipmentInformDto> submit(@RequestBody EquipmentInformDto model) { public ResponseModel submit(@RequestBody EquipmentInformDto model) {
if (ValidationUtil.isEmpty(model.getSequenceNbr())) { if (ValidationUtil.isEmpty(model.getSequenceNbr())) {
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
return ResponseHelper.buildResponse(equipmentInformServiceImpl.updateEquipmentInform(model,getSelectedOrgInfo())); try {
return CommonResponseUtil.success(equipmentInformServiceImpl.updateEquipmentInform(model,getSelectedOrgInfo()));
} catch (Exception e) {
return CommonResponseUtil.failure(e.getMessage());
}
} }
......
...@@ -44,6 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -44,6 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
......
...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo; ...@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoMapper; import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService; import com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -306,7 +307,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit ...@@ -306,7 +307,14 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
orgRoles.put(companyInfo.getSequenceNbr(),userRoleList); orgRoles.put(companyInfo.getSequenceNbr(),userRoleList);
agencyUserModel.setOrgRoles(orgRoles); agencyUserModel.setOrgRoles(orgRoles);
agencyUserModel.setOrgRoleSeqs(roleSeqsMap); agencyUserModel.setOrgRoleSeqs(roleSeqsMap);
FeignClientResult<AgencyUserModel> userResult = Privilege.agencyUserClient.create(agencyUserModel); FeignClientResult<AgencyUserModel> userResult = null;
try {
userResult = Privilege.agencyUserClient.create(agencyUserModel);
} catch (InnerInvokException e) {
// 删除已经创建的 企业信息
Privilege.companyClient.deleteCompany(companyInfo.getSequenceNbr() + "");
throw new BadRequest("注册失败");
}
if(userResult == null || userResult.getResult() == null) { if(userResult == null || userResult.getResult() == null) {
throw new BadRequest("注册失败"); throw new BadRequest("注册失败");
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
<if test="param.endDate!=null">AND d.createDate <![CDATA[<=]]> #{param.endDate}</if> <if test="param.endDate!=null">AND d.createDate <![CDATA[<=]]> #{param.endDate}</if>
<if test="param.alarmType == 'BREAKDOWN'">AND d.type = #{param.alarmType}</if> <if test="param.alarmType == 'BREAKDOWN'">AND d.type = #{param.alarmType}</if>
<if test="param.alarmType == 'FIREALARM'">AND d.type = #{param.alarmType}</if> <if test="param.alarmType == 'FIREALARM'">AND d.type = #{param.alarmType}</if>
<if test="param.orgCode != null and param.orgCode != ''">AND d.org_code = #{param.orgCode}</if> <if test="param.orgCode != null and param.orgCode != ''">AND d.org_code LIKE CONCAT (#{param.orgCode},'%') </if>
<if test="param.type != null and param.type != ''">AND d.type = #{param.type}</if> <if test="param.type != null and param.type != ''">AND d.type = #{param.type}</if>
<if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 1">AND <if test="param.handleStatus != null and param.handleStatus != '' and param.handleStatus == 1">AND
d.handleStatus = '已处理' d.handleStatus = '已处理'
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
IF ( IF (
wlesal.confirm_type <![CDATA[<>]]> '', wlesal.confirm_type <![CDATA[<>]]> '',
'已处理', '已处理',
'去确认' '未处理'
) handleStatus, ) handleStatus,
IF ( IF (
wlesal.clean_time IS NOT NULL, wlesal.clean_time IS NOT NULL,
......
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