Commit efca1f5a by java-李谡

修改论证类型

parent 0e81751d
......@@ -188,7 +188,34 @@
)
</insert>
<insert id="insertVerified">
<select id="getAssessment" resultType="com.ejweb.modules.verify.entity.RouteverifyEntity">
select
id,
verif_id as verifyId,
assessment_status as assessmentStatus,
depart_id as deportId,
create_date as createDate,
create_by as createBy,
update_by as updateBy,
update_date as updateDate
from foc_risk_assessment
where verif_id = #{verifyId}
and depart_id = #{deportId}
</select>
<update id="updateAssessment">
update foc_risk_assessment
set verif_id = #{verifyId} ,
assessment_status = #{assessmentStatus} ,
depart_id = #{deportId} ,
create_date = #{createDate} ,
create_by = #{createBy} ,
update_by = #{updateBy} ,
update_date = #{updateDate}
where id = #{id}
</update>
<insert id="insertVerified">
insert into foc_airline_verified (
id,
verif_id,
......
......@@ -220,6 +220,11 @@
delete from foc_conclusion_file
where verif_id=#{verifId}
</delete>
<delete id="deleteConclusion">
delete from foc_airline_conclusion
where verif_id=#{verifId}
</delete>
<insert id="insertConclusionFile">
INSERT INTO foc_conclusion_file(
id,
......
......@@ -324,12 +324,13 @@ public class UserService extends CurdService<UserDao, UserEntity> {
@Transactional(readOnly = false)
public boolean validateServerPassword(LoginBean loginBean) {
long startTime = System.nanoTime();// 开始计时时间
long startTime = System.nanoTime();
try {
if (GConstants.getBoolean("use.new.login.api", false)) {// 使用新的登录地址,默认使用旧地址
boolean isSuccess = HTTPClientUtil.callLogin(loginBean.getLoginName(), loginBean.getPassword());// 进行秘密校验
long endTime = System.nanoTime();// 结束计时时间
// 使用新的登录地址,默认使用旧地址
if (GConstants.getBoolean("use.new.login.api", false)) {
// 进行秘密校验
boolean isSuccess = HTTPClientUtil.callLogin(loginBean.getLoginName(), loginBean.getPassword());
long endTime = System.nanoTime();
long duration = endTime - startTime;
LOG.info("[UserService login][validateServerPassword][" + isSuccess + "]总共用时:" + Util.getDurationTime(duration));
return isSuccess;
......@@ -337,16 +338,25 @@ public class UserService extends CurdService<UserDao, UserEntity> {
StringBuilder buf = new StringBuilder(GConstants.getValue("hn.api.base.url", "https://dsp.jdair.net"));
buf.append("/flightinterface/uss/json/hnauser/hnauserLoginWithInfo.json?");
buf.append(GConstants.getValue("hn.api.base.param", "ai.cc=7&ai.cp=10.68.26.52"));
buf.append("&loginId=");
buf.append(URLEncoder.encode(loginBean.getLoginName(), "UTF-8"));
buf.append("&password=");
buf.append(URLEncoder.encode(loginBean.getPassword(), "UTF-8"));
LOG.info("密码encode后;"+URLEncoder.encode(loginBean.getPassword(),"UTF-8"));
//用户名密码使用DESPlus中的加密方法加密后,再urlencode
DESPlus plus = new DESPlus();
String loginName = plus.encrypt(loginBean.getLoginName());
String password = plus.encrypt(loginBean.getPassword());
LOG.info("账号encrypt后;" + loginName);
LOG.info("密码encrypt后;" + password);
LOG.info("[UserService login][validateServerPassword][URL]:" + buf.toString());
buf.append("&loginIdSecure=");
buf.append(URLEncoder.encode(loginName, "UTF-8"));
buf.append("&passwordSecure=");
buf.append(URLEncoder.encode(password, "UTF-8"));
LOG.info("密码encode后;" + URLEncoder.encode(loginBean.getPassword(), "UTF-8"));
LOG.info("[UserService login][validateServerPassword][URL]:" + buf.toString());
HCFetcher fetcher = HCFetcher.getInstance();
FetchEntity entity = fetcher.get(buf.toString());
if (entity == null) {// 再次重新尝试获取内容
// 再次重新尝试获取内容
if (entity == null) {
entity = fetcher.get(buf.toString());
}
......@@ -361,7 +371,8 @@ public class UserService extends CurdService<UserDao, UserEntity> {
return false;
}
JSONObject result = response.getJSONObject("result");
if ("1000".equals(result.getString("resultCode"))) { // 远程服务器登陆成功,更改数据库密码
// 远程服务器登陆成功,更改数据库密码
if ("1000".equals(result.getString("resultCode"))) {
long endTime = System.nanoTime();
long duration = endTime - startTime;
......@@ -552,68 +563,6 @@ public class UserService extends CurdService<UserDao, UserEntity> {
return dao.getUserSeatList(bean);
}
public static void main(String[] args) {
try {
// 先默认写死URL,后期通过配置读取
// StringBuilder buf = new
// StringBuilder(GConstants.JDAIR_BASE_API+"/flightinterface/uss/json/mobile/messSend.json?"+GConstants.JDAIR_BASE_PARAM+"&loginId=");
// DESPlus desPlus = new DESPlus();
// String pass = "5127340@q";
// //String test="123456789@"+System.currentTimeMillis();
// DESPlus dess;
// try
// {
// dess = new DESPlus( );//定义密钥
// System.out.println( "加密前的字符:" + pass );
// String pass1 = dess.encrypt( pass );
// String pass2 = dess.decrypt(pass1);
//// String miwen = "9affe36dba5385c41ac289290d7f86f8";
// System.out.println( "加密后的字符 pass1:" + pass1 );
// System.out.println( "加密后的字符 pass2:" + pass2 );
//
//// DESPlus des1 = new DESPlus();//定义密钥
//// System.out.println( "解密后的字符:" + des1.decrypt( pass2 ));
// } catch ( Exception e )
// {
// e.printStackTrace();
// }
// System.exit(0);
StringBuilder buf = new StringBuilder("https://10.72.32.251:8443/crm/BaseUrl/uss/json/login/userLogin.json?" + GConstants.JDAIR_BASE_PARAM);
DESPlus des = new DESPlus();// 定义密钥
String miwen = des.encrypt("5127340@q");
buf.append("&loginId=").append("yan_zhang3").append("&password=").append(miwen);
System.out.println(buf.toString());
// FetchEntity entity = HCFetcher.getInstance().post(buf.toString(), null);
// if (entity.isSuccess()) {
// System.out.println(entity.getContent("UTF-8"));
//
// Map<String, Object> response = JSON.parseObject(entity.getContent("UTF-8"),
// new TypeReference<Map<String, Object>>() {
// });
// if (response.get("result") == null) {
// System.out.println("false");
// return;
// }
// @SuppressWarnings("unchecked")
// Map<String, String> result = (Map<String, String>) response.get("result");
// if (result.get("resultCode") != null && result.get("resultCode").equals("1000")) { // 远程服务器登陆成功,更改数据库密码
// System.out.println("true");
// return;
// }
// }
} catch (Exception e) {
} finally {
// if (fetcher != null) {fetcher.shutdown();}
}
System.out.println("false");
}
@Transactional(readOnly = false)
public void addOuterUser(OuterUserAddBean bean) {
bean.setId(IdWorker.getNextNumId());
......
......@@ -333,6 +333,7 @@ public class AirlineVerifyController {
case "03":
case "04":
case "05":
case "09":
airlineVerifyEntity.setDepIataLabel(airLineVerifyService.getConnetList(airlineVerifyEntity.getVerifId()));
......
......@@ -41,7 +41,7 @@ public interface AirlineConclusionDao extends BaseDao {
List<Map<String, String>> getVerifyFile(AirlineConclusionDetailBean bean);
void updateXZRS(AirlineConclusionUpdateBean bean);
void deleteConclusion(AirlineConclusionDetailBean bean);
void deleteConclusionFile(ConclusionFileBean conclusionBean);
}
......@@ -33,7 +33,11 @@ public interface AirlineVerifiedDao extends BaseDao {
void insertRouteverify(RouteverifyEntity entity);
void insertAssessment(RouteverifyEntity entity);
RouteverifyEntity getAssessment(RouteverifyEntity entity);
void updateAssessment(RouteverifyEntity entity);
String findDepartId(AirlineVerifiedAddBean bean);
List<AirlineVerifiedEntity> findFormText(AirlineVerifiedDetailBean bean);
......
......@@ -459,6 +459,9 @@ public List<com.ejweb.modules.route.entity.AirlineVerifyEntity> getRiskAssessmen
if("01".equals(bean.getVerifStatus())){
NotifyAddBean addbean=new NotifyAddBean();
addbean.setConId(bean.getVerifId());
AirlineConclusionDetailBean detailBean = new AirlineConclusionDetailBean();
detailBean.setVerifId(bean.getVerifId());
conclusionDao.deleteConclusion(detailBean);
notifyDao.NotifyComplete(addbean);
// 增加论证终止操作履历
......
......@@ -405,7 +405,7 @@ public VerifyManageAddBean ConnectChange(VerifyManageDetailEntity entity, String
case "02":
case "03":
case "04":
{
case "09": {
List<Connect> connects = new ArrayList<>();
Connect connect = new Connect();
connect.setId(IdWorker.getNextId());
......
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