提交 9b637b94 作者: 张小凤

PilotAuditStatusQO(update)

上级 9709bb0a
...@@ -27,7 +27,7 @@ public class PilotAuditStatusQO { ...@@ -27,7 +27,7 @@ public class PilotAuditStatusQO {
private Integer auditStatus; private Integer auditStatus;
@ApiModelProperty(value = "2不通过的原因", required = false, example = "信息不完善") @ApiModelProperty(value = "原因id", required = false, example = "1")
private String reasonId; private String reasonId;
@ApiModelProperty(value = "审批人", required = false, example = "信息不完善", hidden = true) @ApiModelProperty(value = "审批人", required = false, example = "信息不完善", hidden = true)
......
...@@ -56,4 +56,6 @@ public interface PilotCertificationDao { ...@@ -56,4 +56,6 @@ public interface PilotCertificationDao {
List<PilotCertificationLogDO> backPilotLogList(PilotCertificationLogQO param); List<PilotCertificationLogDO> backPilotLogList(PilotCertificationLogQO param);
List<PilotReasonDO> backListReason(); List<PilotReasonDO> backListReason();
PilotReasonDO selectPilotReason(String reasonId);
} }
package com.mmc.iuav.user.entity.dronepilot;
/**
* @Author small
* @Date 2023/8/4 17:05
* @Version 1.0
*/
public enum SendCertificationMessage {
COMMITTED(0, "已提交"),
ALREADY_PASSED(1, "已通过"),
NOT_PASS(2, "不通过");
private int code;
private String message;
private SendCertificationMessage(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static SendCertificationMessage match(int key) {
SendCertificationMessage result = null;
for (SendCertificationMessage s : values()) {
if (s.getCode() == key) {
result = s;
break;
}
}
return result;
}
public static SendCertificationMessage catchMessage(String msg) {
SendCertificationMessage result = null;
for (SendCertificationMessage s : values()) {
if (s.getMessage().equals(msg)) {
result = s;
break;
}
}
return result;
}
}
...@@ -209,13 +209,14 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -209,13 +209,14 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
PilotCertificationLogDO pilotCertificationLog = new PilotCertificationLogDO(userAccountDO.getId(), userLoginInfoFromRedis.getUserAccountId(), CertificationMessage.match(param.getAuditStatus())); PilotCertificationLogDO pilotCertificationLog = new PilotCertificationLogDO(userAccountDO.getId(), userLoginInfoFromRedis.getUserAccountId(), CertificationMessage.match(param.getAuditStatus()));
certificationDao.insertPilotLog(pilotCertificationLog); certificationDao.insertPilotLog(pilotCertificationLog);
CertificationMessage match = CertificationMessage.match(param.getAuditStatus()); SendCertificationMessage match = SendCertificationMessage.match(param.getAuditStatus());
this.sendMsgFlyerInfoAuth(userAccountDO, match.getMessage());
this.sendMsgFlyerInfoAuth(userAccountDO, match.getMessage(), param);
return ResultBody.success(); return ResultBody.success();
} }
private void sendMsgFlyerInfoAuth(UserAccountDO userAccountDO, String message) { private void sendMsgFlyerInfoAuth(UserAccountDO userAccountDO, String message, PilotAuditStatusQO param) {
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm");// 设置日期格式 SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm");// 设置日期格式
String date = df.format(new Date()); String date = df.format(new Date());
JSONObject value1 = new JSONObject(); JSONObject value1 = new JSONObject();
...@@ -225,8 +226,16 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -225,8 +226,16 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
JSONObject value3 = new JSONObject(); JSONObject value3 = new JSONObject();
value3.put("value", message); value3.put("value", message);
JSONObject value4 = new JSONObject(); JSONObject value4 = new JSONObject();
String userName = userAccountDO.getUserName() + message; //不通过原因
value4.put("value", userName); String reason = null;
if (param.getAuditStatus() == 1) {
reason = userAccountDO.getUserName() + message;
}
if (param.getAuditStatus() == 2) {
PilotReasonDO pilotReasonDO = certificationDao.selectPilotReason(param.getReasonId());
reason = pilotReasonDO.getReason();
}
value4.put("value", reason);
JSONObject datad = new JSONObject(); JSONObject datad = new JSONObject();
datad.put("date2", value1); datad.put("date2", value1);
datad.put("name3", value2); datad.put("name3", value2);
......
...@@ -268,10 +268,10 @@ ...@@ -268,10 +268,10 @@
</update> </update>
<select id="selectUserAccountId" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="selectUserAccountId" resultType="com.mmc.iuav.user.entity.UserAccountDO">
SELECT pc.user_account_id, SELECT pc.user_account_id as id,
ua.union_id, ua.union_id,
ua.open_id, ua.open_id,
bua.user_name AS operatorUserName, bua.user_name AS operatorUserName,
rna.user_name rna.user_name
FROM pilot_certification pc FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
...@@ -311,4 +311,10 @@ ...@@ -311,4 +311,10 @@
select id, reason select id, reason
from pilot_reason from pilot_reason
</select> </select>
<select id="selectPilotReason" resultType="com.mmc.iuav.user.entity.dronepilot.PilotReasonDO">
select id, reason
from pilot_reason
where id = #{reasonId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论