Commit a852115a authored by kongfm's avatar kongfm

特种设备相关BUG修复

parent 33efc059
......@@ -24,4 +24,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
@Param("address") String address,
@Param("orgName") String orgName,
@Param("organizationCode") String organizationCode);
List<UnitInfo> getUnitWithoutQrcode();
}
......@@ -40,4 +40,6 @@ public interface IUnitInfoService {
List<UnitInfoDto> getAllUnit();
List<UnitInfoDto> getUseUnit(String unitType, String address, String orgName, String organizationCode);
Boolean addQRcode();
}
......@@ -51,4 +51,21 @@
</select>
<select id="getUnitWithoutQrcode" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo">
SELECT
a.*
FROM
tz_flc_unit_info a
LEFT JOIN cb_source_file f on f.source_id = a.sequence_nbr and f.file_category = 'qrCode'
WHERE
a.is_delete = 0
AND (
a.unit_status = '1'
OR a.is_change = 1)
and f.sequence_nbr is null
</select>
</mapper>
......@@ -592,7 +592,23 @@ public class AlertCalledController extends BaseController {
updateWrapper.set(AlertCalled::getForzenResult, alertCalledDto.getForzenResult());
updateWrapper.set(AlertCalled::getAlertStatus, true);
updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
Boolean flag = iAlertCalledService.update(updateWrapper);
if(flag) {
AlertCalledDto alertCalledVo = iAlertCalledService.queryBySeq(alertCalledDto.getSequenceNbr());
try {
redisUtils.del(RedisKey.TZS_ALERTCALLED_ID+alertCalledVo.getSequenceNbr());
} catch (Exception e) {
e.printStackTrace();
logger.error("删除redis失败:" + e.getMessage());
}
try {
eSAlertCalledService.updateEsAlertCalled(alertCalledVo);
} catch (Exception e) {
e.printStackTrace();
logger.error("更新es失败:" + e.getMessage());
}
}
return ResponseHelper.buildResponse(flag);
}
/**
......@@ -612,7 +628,23 @@ public class AlertCalledController extends BaseController {
updateWrapper.set(AlertCalled::getFinalReason, alertCalledDto.getFinalReason());
updateWrapper.set(AlertCalled::getAlertStatus, true);
updateWrapper.eq(AlertCalled::getSequenceNbr, alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
Boolean flag = iAlertCalledService.update(updateWrapper);
if(flag) {
AlertCalledDto alertCalledVo = iAlertCalledService.queryBySeq(alertCalledDto.getSequenceNbr());
try {
redisUtils.del(RedisKey.TZS_ALERTCALLED_ID+alertCalledVo.getSequenceNbr());
} catch (Exception e) {
e.printStackTrace();
logger.error("删除redis失败:" + e.getMessage());
}
try {
eSAlertCalledService.updateEsAlertCalled(alertCalledVo);
} catch (Exception e) {
e.printStackTrace();
logger.error("更新es失败:" + e.getMessage());
}
}
return ResponseHelper.buildResponse(flag);
}
/**
......
......@@ -533,5 +533,33 @@ public class UnitInfoController extends BaseController {
}
/**
* 判断用户号码是否存在
*
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/hasExistPhone/{phone}")
@ApiOperation(httpMethod = "GET", value = "判断用户号码是否存在", notes = "判断用户号码是否存在")
public ResponseModel<Boolean> hasExistPhone( @PathVariable(value = "phone") String phone) {
Boolean flag = Privilege.agencyUserClient.checkLoginId(phone).getResult();
return ResponseHelper.buildResponse(flag);
}
/**
* 手动生成已通过企业的二维码
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/addQRcode")
@ApiOperation(httpMethod = "GET", value = "手动生成已通过企业的二维码", notes = "手动生成已通过企业的二维码")
public ResponseModel<Boolean> addQRcode() {
Boolean flag = unitInfoServiceImpl.addQRcode();
return ResponseHelper.buildResponse(flag);
}
}
......@@ -558,6 +558,16 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto, UnitInfo, Unit
}
@Override
public Boolean addQRcode() {
// 获取所有已经通过的且没有二维码的企业信息
List<UnitInfo> list = baseMapper.getUnitWithoutQrcode();
list.stream().forEach(t -> {
this.saveUnitInfoQrCode(t);
});
return true;
}
@Override
public List<UnitInfoDto> getAllUnit() {
return baseMapper.getAllUnit();
}
......
......@@ -47,19 +47,19 @@ tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000
tzs.wechat.url=https://api.weixin.qq.com
tzs.wechat.appid=wx79aca5bb1cb4af92
tzs.wechat.secret=f3a12323ba731d282c3d4698c27c3e97
tzs.wechat.appid=wx8918c1aaad956617
tzs.wechat.secret=337c3d8f3e749140d4f9aedc8311033b
##wechatToken
tzs.wechat.token=yeejoin_2021
##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
tzs.wechat.tempId.wx=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM
tzs.wechat.tempId.wx=ofBIZS8Bup9s0zKbrGa8BfhVhS18H_hyC_OYXuBN6hI
tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
tzs.wechat.tempId.ts=rags-expfNSBB-h2WenuBI2c6pCEndH4uwTtOqlHqDM
tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask
......
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