Commit 2bd57061 authored by chenhao's avatar chenhao

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

parents 9bb1742a b6685aaf
......@@ -11,8 +11,8 @@ public enum RuleTypeEnum {
// 防火监督
计划提交("计划提交", "addPlan","auditPage", RuleConstant.WEB, RuleConstant.TASK),
计划审核("计划审核", "planAudit", "auditPage", RuleConstant.APP_WEB, RuleConstant.TASK),
计划审核完成("计划审核完成", "planAuditAll", "formulatePage", RuleConstant.APP_WEB, RuleConstant.NOTIFY),
计划审核("计划审核", "planAudit", "auditPage", RuleConstant.APP_WEB, RuleConstant.NOTIFY),
计划审核完成("计划审核完成", "planAuditAll", "formulatePage", RuleConstant.APP_WEB, RuleConstant.TASK),
计划生成("计划生成", "addPlanTask", null, RuleConstant.APP, RuleConstant.TASK),
计划完成("计划完成", "planCompleted", null, RuleConstant.APP_WEB, RuleConstant.NOTIFY),
......
......@@ -29,10 +29,6 @@ public interface IFirefightersService {
void saveFirefighters(FirefightersInfoDto firefighters);
Firefighters selectByAmosOrgId(Long id);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
/**
* 企业信息变更表接口类
*
......@@ -9,4 +11,5 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
*/
public interface IUnitInfoChangeService {
UnitInfoDto findLastChangInfo(Long sourceId);
}
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange;
/**
* 企业信息表接口类
......@@ -21,5 +23,13 @@ public interface IUnitInfoService {
UnitInfoDto getDtoById(Long sequenceNbr);
UnitInfoDto getUnItDtoById(Long sequenceNbr);
UnitInfoDto unitInfoToDto(UnitInfo source);
UnitInfoDto unitChangeInfoToDto(UnitInfoChange source);
UnitInfoDto getDtoByOrgId(Long sequenceNbr);
UnitInfoDto changeUnInfo(UnitInfoDto model);
}
......@@ -89,14 +89,13 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
@Override
public Firefighters selectByAmosOrgId(Long id) {
QueryWrapper<Firefighters> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("amos_user_id", id);
Firefighters firefighters = firefightersMapper.selectOne(queryWrapper);
return firefighters;
}
/**
* 导出列表
*/
......
......@@ -15,7 +15,7 @@ import java.util.Map;
@RuleFact(value = "消防巡查", project = "消息规则")
public class MsgRo implements Serializable {
private static final long serialVersionUID = -4210693601552557441L;
private static final long serialVersionUID = -2766051871044757100L;
@Label("名称")
private String name;
......@@ -47,4 +47,7 @@ public class MsgRo implements Serializable {
@Label(value = "扩展参数")
private Map<String, String> extras;
@Label(value = "类别")
private Integer category;
}
package com.yeejoin.amos.patrol.business.service.impl;
import com.yeejoin.amos.boot.biz.common.constants.RuleConstant;
import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.patrol.business.dto.MsgRo;
import com.yeejoin.amos.patrol.business.param.PushMsgParam;
......@@ -38,6 +39,7 @@ public class RulePlanService {
msgRo.setExtras(pushMsgParam.getExtras());
msgRo.setIsSendApp(true);
msgRo.setIsSendWeb(true);
msgRo.setCategory(RuleConstant.NOTIFY);
//触发规则
try {
ruleTrigger.publish(msgRo, packageId, new String[0]);
......
......@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.ElevatorInsure;
import com.yeejoin.amos.boot.module.tzs.api.entity.ElevatorInsureRelation;
import com.yeejoin.amos.boot.module.tzs.api.entity.EquipmentCategory;
import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam;
import com.yeejoin.amos.boot.module.tzs.api.mapper.ElevatorMapper;
import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorInsureRelationService;
import com.yeejoin.amos.boot.module.tzs.api.service.IElevatorService;
......@@ -209,8 +210,8 @@ public class ElevatorServiceImpl extends BaseService<ElevatorDto, Elevator, Elev
temp.setType("image");
temp.setUrl(filePath);
qrCode.add(temp);
Map<String, List<AttachmentDto>> attachmentMap = new HashMap<>();
attachmentMap.put("qrCode",qrCode);
Map<String, List<AttachmentDto>> attachmentMap = sourceFileService.getAttachments(elevatorId);
attachmentMap.put(TzsCommonParam.QR_CODE,qrCode);
sourceFileService.saveAttachments(elevatorId,attachmentMap);
return filePath;
}
......
......@@ -267,6 +267,7 @@ public class BeanDtoVoUtils {
}
target.setFullAddress(item.getProvince() + item.getCity() + item.getDistrict() + item.getStree() + item.getCommunity() + item.getAddress());
target.setAdminLoginPwd(null);
return target;
} catch (Exception e) {
return null;
......
......@@ -14,6 +14,7 @@ import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoChangeServiceImpl;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.UnitInfoServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -81,6 +82,9 @@ public class UnitInfoController extends BaseController {
@Autowired
OrgUsrServiceImpl iOrgUsrService;
@Autowired
UnitInfoChangeServiceImpl unitInfoChangeServiceImpl;
/**
* 获取组织机构树
*
......@@ -256,7 +260,7 @@ public class UnitInfoController extends BaseController {
if (ValidationUtil.isEmpty(sequenceNbr) ) {
throw new BadRequest("参数校验失败.");
}
return ResponseHelper.buildResponse(unitInfoServiceImpl.getDtoById(sequenceNbr));
return ResponseHelper.buildResponse(unitInfoServiceImpl.getUnItDtoById(sequenceNbr));
}
......@@ -395,7 +399,14 @@ public class UnitInfoController extends BaseController {
for(CompanyModel c : companys) {
OrgUsr temp = iOrgUsrService.getOne(new LambdaQueryWrapper<OrgUsr>().eq(OrgUsr::getIsDelete,false).eq(OrgUsr::getAmosOrgId,c.getSequenceNbr()));
if(temp != null) {
return ResponseHelper.buildResponse(unitInfoServiceImpl.getDtoByOrgId(temp.getSequenceNbr()));
// 企业信息查看判断是否变更 如果变更信息则返回变更中信息
result = unitInfoServiceImpl.getDtoByOrgId(temp.getSequenceNbr());
if(result.getIsChange() && result.getUnitStatus() == 0) {
result = unitInfoChangeServiceImpl.findLastChangInfo(temp.getSequenceNbr());
}
return ResponseHelper.buildResponse(result);
}
}
return ResponseHelper.buildResponse(result);
......@@ -403,4 +414,38 @@ public class UnitInfoController extends BaseController {
/**
* 变更企业表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/change")
@ApiOperation(httpMethod = "POST", value = "变更企业表", notes = "变更企业表")
public ResponseModel<UnitInfoDto> change(@RequestBody UnitInfoDto model) {
model = unitInfoServiceImpl.changeUnInfo(model);
return ResponseHelper.buildResponse(model);
}
/**
* 查询审批数据
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/approve/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "查询审批数据", notes = "查询审批数据")
public ResponseModel<UnitInfoDto> getApproveInfo(@PathVariable Long sequenceNbr) {
if (ValidationUtil.isEmpty(sequenceNbr) ) {
throw new BadRequest("参数校验失败.");
}
return ResponseHelper.buildResponse(unitInfoServiceImpl.getDtoById(sequenceNbr));
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoChangeDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfoChange;
import com.yeejoin.amos.boot.module.tzs.flc.api.mapper.UnitInfoChangeMapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoChangeService;
import com.yeejoin.amos.boot.module.tzs.flc.api.service.IUnitInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.List;
......@@ -18,6 +23,10 @@ import java.util.List;
*/
@Service
public class UnitInfoChangeServiceImpl extends BaseService<UnitInfoChangeDto, UnitInfoChange, UnitInfoChangeMapper> implements IUnitInfoChangeService {
@Autowired
IUnitInfoService iUnitInfoService;
/**
* 分页查询
*/
......@@ -31,4 +40,22 @@ public class UnitInfoChangeServiceImpl extends BaseService<UnitInfoChangeDto, Un
public List<UnitInfoChangeDto> queryForFlcUnitInfoChangeList() {
return this.queryForList("", false);
}
/**
* 根据源码id 返回最新的变更记录
* @param sourceId
* @return
*/
@Override
public UnitInfoDto findLastChangInfo(Long sourceId) {
UnitInfoChange result;
List<UnitInfoChange> changInfoList = this.list(new LambdaQueryWrapper<UnitInfoChange>().eq(UnitInfoChange::getIsDelete,false).eq(UnitInfoChange::getSourceId,sourceId).orderByDesc(UnitInfoChange::getRecDate));
if(changInfoList != null && changInfoList.size() >0) {
result = changInfoList.get(0);
} else {
throw new BadRequest("未找到变更记录");
}
return iUnitInfoService.unitChangeInfoToDto(result);
}
}
\ No newline at end of file
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