Commit 6050bf07 by 伍思炜

智能平台对接更新

parent 2ee9b5cd
...@@ -635,7 +635,7 @@ public class IntelligenceSendOrders { ...@@ -635,7 +635,7 @@ public class IntelligenceSendOrders {
try { try {
log.info("提交参数:" + order_dataJSON); log.info("提交参数:" + order_dataJSON);
Constant.trustEveryone(); Constant.trustEveryone();
responese = Unirest.post("https://applet.mini189.cn/prod/generate") responese = Unirest.post("http://132.97.20.20/function/id-generator-snowflake.prod-fn?turbo=1")
.header("Content-Type", "application/json;charset=UTF-8") .header("Content-Type", "application/json;charset=UTF-8")
.header("X-Sign", sign) .header("X-Sign", sign)
.body(order_dataJSON) .body(order_dataJSON)
...@@ -744,7 +744,7 @@ public class IntelligenceSendOrders { ...@@ -744,7 +744,7 @@ public class IntelligenceSendOrders {
try { try {
log.info("提交参数:" + data); log.info("提交参数:" + data);
Constant.trustEveryone(); Constant.trustEveryone();
kong.unirest.HttpResponse<String> responese = Unirest.get("https://applet.mini189.cn/prod/query/query-order-info?" + url_data) kong.unirest.HttpResponse<String> responese = Unirest.get("http://132.97.20.21/query/query-order-info?" + url_data)
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.header("X-Sign", sign) .header("X-Sign", sign)
.asString(); .asString();
...@@ -1007,7 +1007,7 @@ public class IntelligenceSendOrders { ...@@ -1007,7 +1007,7 @@ public class IntelligenceSendOrders {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
log.info("提交参数:" + data); log.info("提交参数:" + data);
Constant.trustEveryone(); Constant.trustEveryone();
responese = Unirest.get("https://applet.mini189.cn/prod/query/query-order-info?" + url_data) responese = Unirest.get("http://132.97.20.21/query/query-order-info?" + url_data)
.header("Content-Type", "application/json") .header("Content-Type", "application/json")
.header("X-Sign", sign) .header("X-Sign", sign)
.asString(); .asString();
......
...@@ -14,6 +14,7 @@ import com.winsun.mapper.SchoolMapper; ...@@ -14,6 +14,7 @@ import com.winsun.mapper.SchoolMapper;
import com.winsun.utils.MD5Util; import com.winsun.utils.MD5Util;
import com.winsun.utils.RSAUtils; import com.winsun.utils.RSAUtils;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest; import kong.unirest.Unirest;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
...@@ -36,8 +37,10 @@ import org.springframework.web.client.RestTemplate; ...@@ -36,8 +37,10 @@ import org.springframework.web.client.RestTemplate;
import sun.misc.BASE64Encoder; import sun.misc.BASE64Encoder;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -75,7 +78,6 @@ public class sendSms { ...@@ -75,7 +78,6 @@ public class sendSms {
String business_iccid = orderData.getBusinessIccid(); String business_iccid = orderData.getBusinessIccid();
Map<String, Object> partnerById = orderMapper.findPartnerById(hehuoren_id); Map<String, Object> partnerById = orderMapper.findPartnerById(hehuoren_id);
Map<String, String> schoolMap = schoolMapper.selectByHeHuorenId(hehuoren_id); Map<String, String> schoolMap = schoolMapper.selectByHeHuorenId(hehuoren_id);
String name = orderData.getHehuorenName();
Map<String, Object> map1 = new HashMap<>(); Map<String, Object> map1 = new HashMap<>();
int ysm = Integer.parseInt(String.valueOf(partnerById.get("ysm"))); int ysm = Integer.parseInt(String.valueOf(partnerById.get("ysm")));
...@@ -176,6 +178,7 @@ public class sendSms { ...@@ -176,6 +178,7 @@ public class sendSms {
attachment.put("身份证照4", map.get("imgUrl4")); attachment.put("身份证照4", map.get("imgUrl4"));
order_data.put("附件", attachment); order_data.put("附件", attachment);
order_data.put("代理商账号", "hyoujian"); order_data.put("代理商账号", "hyoujian");
order_data.put("使用人姓名", "黄友健"); order_data.put("使用人姓名", "黄友健");
order_data.put("使用人证件号", "440802199006080830"); order_data.put("使用人证件号", "440802199006080830");
...@@ -307,4 +310,17 @@ public class sendSms { ...@@ -307,4 +310,17 @@ public class sendSms {
return responese; return responese;
} }
@Test
public void send(){
String s = "{\"order_data\":{\"客户信息\":{\"联系人\":\"赖欣怡\",\"客户类型\":\"普通客户\",\"客户证件号码\":\"441781200204103526\",\"客户证件姓名\":\"赖欣怡\",\"联系电话\":\"18126766003\",\"装机联系电话\":\"18126766003\",\"装机联系人\":\"赖欣怡\",\"客户证件类型\":\"身份证\",\"通讯地址\":\"广州市从化区江埔街道办沿江南路302号广州工程技术职业学院从化校区学生宿舍楼4栋2层201房\"},\"装机详细地址\":\"广州市从化区江埔街道办沿江南路302号广州工程技术职业学院从化校区学生宿舍楼4栋2层201房\",\"代理商账号\":\"hyoujian\",\"订单来源单号\":\"zbaybzpmdwgss4vb7i49\",\"订单备注\":\"\",\"办理类型\":\"新宽旧移\",\"付费类型\":\"预付费\",\"揽装信息\":{\"揽装人联系电话\":\"\",\"揽装姓名\":\"马鸣泽\",\"机构ID\":\"441100000000001113343304\",\"四级机构\":\"\",\"三级机构\":\"\",\"二级机构\":\"\",\"揽装工号\":\"16001425\",\"协销工号\":\"\",\"一级机构\":\"\",\"企微号码\":\"\",\"五级机构\":\"\"},\"发票信息\":{\"发票抬头\":\"\",\"发票投递方式\":\"不需要\",\"电子邮箱\":\"\"},\"接口下单账号\":\"xiaoyuan\",\"订购产品\":{\"产品名称\":\"校园融合套餐\",\"受理内容\":\"\",\"付费类型\":\"预付费\",\"属性列表\":[{\"属性值\":\"4M\",\"属性名\":\"宽带速率\"},{\"属性值\":\"20M\",\"属性名\":\"宽带体验速率\"},{\"属性值\":\"441100000000001113343304\",\"属性名\":\"地址ID\"},{\"属性值\":\"PC+手机\",\"属性名\":\"允许上网终端类型\"},{\"属性值\":\"学生\",\"属性名\":\"用户类别\"},{\"属性值\":\"广州工程技术职业学院\",\"属性名\":\"学校名称\"},{\"属性值\":\"18126766003\",\"属性名\":\"关联移动号码\"},{\"属性值\":\"211328000604\",\"属性名\":\"学生证号\"},{\"属性值\":\"校园天翼宽带用户\",\"属性名\":\"用户类型\"},{\"属性值\":\"包月30元\",\"属性名\":\"月租类型\"},{\"属性值\":\"普通\",\"属性名\":\"计费属性\"},{\"属性值\":\"18126766003@CHGDGCZY\",\"属性名\":\"多媒体账号\"},{\"属性值\":\"l18126766003\",\"属性名\":\"多媒体账号密码\"},{\"属性值\":\"2\",\"属性名\":\"最大在线数\"},{\"属性值\":\"是\",\"属性名\":\"一人一号多终端\"},{\"属性值\":\"否\",\"属性名\":\"是否FTTH+HUB\"},{\"属性值\":\"(FTTB)光缆大楼\",\"属性名\":\"外线方式\"},{\"属性值\":\"首月按天收费\",\"属性名\":\"宽带首月费用类型\"}],\"AI编码\":\"4B90FBDD2A1A43EE8A4C963115C52F14\"},\"业务类型\":\"融合业务\",\"使用人证件号\":\"440802199006080830\",\"宽带装机\":{\"装机详细地址\":\"广州市从化区江埔街道办沿江南路302号广州工程技术职业学院从化校区学生宿舍楼4栋2层201房\",\"省\":\"广东省\",\"市\":\"广州市\",\"区\":\"从化区\",\"装机地址ID\":\"441100000000001113343304\"},\"使用人姓名\":\"黄友健\",\"一次性费用项\":{\"费用项列表\":[{\"费用项名称\":\"校园融合套餐\",\"费用项金额\":\"0.0000\"}],\"缴费方式\":\"现金支付\"},\"月租费用项\":{\"费用项列表\":[{\"费用项名称\":\"校园融合套餐\",\"费用项金额\":\"00.0000\",\"费用项类型\":\"月租\"}],\"缴费方式\":\"现金支付\"}}}";
String sign = "FiGuWp3q0rW9s/Kz6Nt8UrLovkJDuaxOulVrWd34xWndydo91TjCxpKHr2Ma27lWFRL/Kd8qy3R8DYGN3SN7zEJJfIyN59OtJm0O97oZu9ur0PbEuEuzsr7LvfPR983I1hDKN9rbIa6X9C4/F+wjWwnZ8nsw/Q+YznoSKECwnjhCQzzUfHchwTb9JIOXng1HRW68+UyT0YQa1Y7Ld+HV0UmOisHuMJR4KifzwC/UcoBEDAPPWEmd5Zo+PM2wdg/xBRZ6Rev6qBHh5WZ+jXQN6o/3ulAotS3rgY8w0nyGB8uX05qSMClprxqGjejPHwmVRK1/O2A0Ox+DfX/of8R9Hg==";
HttpResponse<String> response = Unirest.post("https://applet.mini189.cn/prod/generate")
.header("Content-Type", "application/json;charset=UTF-8")
.header("X-Sign", sign)
.body(s)
.asString();
System.out.println(response.getStatus());
System.out.println(response.getBody());
}
} }
...@@ -299,17 +299,22 @@ public class OrderController extends BaseController { ...@@ -299,17 +299,22 @@ public class OrderController extends BaseController {
map1.put("lzUser", "黄友健"); map1.put("lzUser", "黄友健");
} }
/*map1.put("idCardUrl1", order.getIdCardz());
map1.put("idCardUrl2", order.getIdCardf());
map1.put("idCardUrl3", order.getIdCardzs());*/
map1.put("idCardUrl1", order.getIdCardz().replace("manager", "app")); map1.put("idCardUrl1", order.getIdCardz().replace("manager", "app"));
map1.put("idCardUrl2", order.getIdCardf().replace("manager", "app")); map1.put("idCardUrl2", order.getIdCardf().replace("manager", "app"));
map1.put("idCardUrl3", order.getIdCardzs().replace("manager", "app")); map1.put("idCardUrl3", order.getIdCardzs().replace("manager", "app"));
map1.put("cardType", order.getKapin()); map1.put("cardType", order.getKapin());
if (order.getPackageId().equals("49")) { if (order.getPackageId().equals("49")) {
map1.put("userName", order.getParentName()); //map1.put("userName", order.getParentName());
map1.put("idCardUrl4", order.getIdCardzs().replace("manager", "app")); map1.put("idCardUrl4", order.getIdCardzs().replace("manager", "app"));
map1.put("idCardUrl4", order.getIdCardzs());
} else { } else {
map1.put("userName", order.getCustomerName()); //map1.put("userName", order.getCustomerName());
map1.put("idCardUrl4", order.getStudenCard().replace("manager", "app")); map1.put("idCardUrl4", order.getStudenCard().replace("manager", "app"));
map1.put("idCardUrl4", order.getStudenCard());
} }
map1.put("linkPhone", order.getContactNumber()); map1.put("linkPhone", order.getContactNumber());
map1.put("idCard", order.getIdCard()); map1.put("idCard", order.getIdCard());
...@@ -1781,11 +1786,13 @@ public class OrderController extends BaseController { ...@@ -1781,11 +1786,13 @@ public class OrderController extends BaseController {
map1.put("cardType", orderData.getKapin()); map1.put("cardType", orderData.getKapin());
if ("49".equals(orderData.getPackageId())) { if ("49".equals(orderData.getPackageId())) {
map1.put("userName", orderData.getParentName()); //map1.put("userName", orderData.getParentName());
map1.put("idCardUrl4", orderData.getIdCardzs().replace("manager", "app")); map1.put("idCardUrl4", orderData.getIdCardzs().replace("manager", "app"));
map1.put("idCardUrl4", orderData.getIdCardzs());
} else { } else {
map1.put("userName", orderData.getCustomerName()); map1.put("userName", orderData.getCustomerName());
map1.put("idCardUrl4", orderData.getStudenCard().replace("manager", "app")); map1.put("idCardUrl4", orderData.getStudenCard().replace("manager", "app"));
//map1.put("idCardUrl4", orderData.getStudenCard());
} }
map1.put("linkPhone", orderData.getContactNumber()); map1.put("linkPhone", orderData.getContactNumber());
map1.put("idCard", orderData.getIdCard()); map1.put("idCard", orderData.getIdCard());
...@@ -2377,7 +2384,7 @@ public class OrderController extends BaseController { ...@@ -2377,7 +2384,7 @@ public class OrderController extends BaseController {
try { try {
log.info("提交参数:" + order_dataJSON); log.info("提交参数:" + order_dataJSON);
com.winsun.constant.Constant.trustEveryone(); com.winsun.constant.Constant.trustEveryone();
responese = Unirest.post("https://applet.mini189.cn/prod/generate") responese = Unirest.post("http://132.97.20.20/function/id-generator-snowflake.prod-fn?turbo=1")
.header("Content-Type", "application/json;charset=UTF-8") .header("Content-Type", "application/json;charset=UTF-8")
.header("X-Sign", sign) .header("X-Sign", sign)
.body(order_dataJSON) .body(order_dataJSON)
...@@ -2399,301 +2406,301 @@ public class OrderController extends BaseController { ...@@ -2399,301 +2406,301 @@ public class OrderController extends BaseController {
} }
// public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException { // public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException {
//// HttpHost proxy = new HttpHost("172.18.101.170", 3128); ////// HttpHost proxy = new HttpHost("172.18.101.170", 3128);
// RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000) //// RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000)
// .setConnectionRequestTimeout(600000) //// .setConnectionRequestTimeout(600000)
//// .setProxy(proxy) ////// .setProxy(proxy)
// .build(); //// .build();
// ////
// CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); //// CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
// ////
// log.info("移动下单前已有参数:" + JSONObject.fromObject(map).toString()); //// log.info("移动下单前已有参数:" + JSONObject.fromObject(map).toString());
// String resultStr = ""; //// String resultStr = "";
// ////
// HttpEntity entity = null; //// HttpEntity entity = null;
// // https://icloud.mini189.cn/api/create-order.action //// // https://icloud.mini189.cn/api/create-order.action
// // https://ismarttest.mini189.cn/api/create-order.action //// // https://ismarttest.mini189.cn/api/create-order.action
// HttpPost httpPost = new HttpPost("https://icloud.mini189.cn/api/create-order.action"); //// HttpPost httpPost = new HttpPost("https://icloud.mini189.cn/api/create-order.action");
// ////
// RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig).build(); //// RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig).build();
// httpPost.setConfig(requestConfig); //// httpPost.setConfig(requestConfig);
// ////
// Map<String, String> signMap = new HashMap<String, String>(); //// Map<String, String> signMap = new HashMap<String, String>();
// MultipartEntityBuilder builder = MultipartEntityBuilder.create(); //// MultipartEntityBuilder builder = MultipartEntityBuilder.create();
// ContentType contentType = ContentType.create(HTTP.PLAIN_TEXT_TYPE, Charset.forName("UTF-8")); //// ContentType contentType = ContentType.create(HTTP.PLAIN_TEXT_TYPE, Charset.forName("UTF-8"));
// ////
// builder.addTextBody("service", "order.prepaidgift.create", contentType);// api标识,必填且唯一 //// builder.addTextBody("service", "order.prepaidgift.create", contentType);// api标识,必填且唯一
// signMap.put("service", "order.prepaidgift.create"); //// signMap.put("service", "order.prepaidgift.create");
// ////
// ////
// builder.addTextBody("userName", (String) map.get("ysmUser"), contentType);// 用户名,必填 //// builder.addTextBody("userName", (String) map.get("ysmUser"), contentType);// 用户名,必填
// signMap.put("userName", (String) map.get("ysmUser")); //// signMap.put("userName", (String) map.get("ysmUser"));
// ////
// ////
// builder.addTextBody("timeStamp", (String) map.get("timeStr"), contentType);// 时间戳(YYYYMMDDHHMMSS),必填 //// builder.addTextBody("timeStamp", (String) map.get("timeStr"), contentType);// 时间戳(YYYYMMDDHHMMSS),必填
// ////
// signMap.put("timeStamp", (String) map.get("timeStr")); //// signMap.put("timeStamp", (String) map.get("timeStr"));
// ////
// builder.addTextBody("productCategory", "预付费礼包", contentType);// 业务类型,必填且唯一 //// builder.addTextBody("productCategory", "预付费礼包", contentType);// 业务类型,必填且唯一
// ////
// signMap.put("productCategory", "预付费礼包"); //// signMap.put("productCategory", "预付费礼包");
// ////
// builder.addTextBody("govEntCustomer", "0", contentType);// 是否政企客户下单:0:否,1:是,必填 //// builder.addTextBody("govEntCustomer", "0", contentType);// 是否政企客户下单:0:否,1:是,必填
// ////
// signMap.put("govEntCustomer", "0"); //// signMap.put("govEntCustomer", "0");
// ////
// builder.addTextBody("agentName", "", contentType);// 代办人姓名(若是政企客户下单必填) //// builder.addTextBody("agentName", "", contentType);// 代办人姓名(若是政企客户下单必填)
// signMap.put("agentName", ""); //// signMap.put("agentName", "");
// ////
// builder.addTextBody("agentCardNum", "", contentType);// 代办人身份证号码(若是政企客户下单必填) //// builder.addTextBody("agentCardNum", "", contentType);// 代办人身份证号码(若是政企客户下单必填)
// signMap.put("agentCardNum", ""); //// signMap.put("agentCardNum", "");
// ////
// builder.addTextBody("customerName", (String) map.get("userName"), contentType);// 客户姓名,必填 //// builder.addTextBody("customerName", (String) map.get("userName"), contentType);// 客户姓名,必填
// signMap.put("customerName", (String) map.get("userName")); //// signMap.put("customerName", (String) map.get("userName"));
// ////
// builder.addTextBody("customerPhone", (String) map.get("linkPhone"), contentType);// 客户(代办人)电话,必填 //// builder.addTextBody("customerPhone", (String) map.get("linkPhone"), contentType);// 客户(代办人)电话,必填
// signMap.put("customerPhone", (String) map.get("linkPhone")); //// signMap.put("customerPhone", (String) map.get("linkPhone"));
// ////
// builder.addTextBody("customerCardType", "身份证", contentType);// 证件类型,必填 //// builder.addTextBody("customerCardType", "身份证", contentType);// 证件类型,必填
// signMap.put("customerCardType", "身份证"); //// signMap.put("customerCardType", "身份证");
// ////
// builder.addTextBody("customerCardNum", (String) map.get("idCard"), contentType);// 证件号码,必填 //// builder.addTextBody("customerCardNum", (String) map.get("idCard"), contentType);// 证件号码,必填
// signMap.put("customerCardNum", (String) map.get("idCard")); //// signMap.put("customerCardNum", (String) map.get("idCard"));
// ////
// builder.addTextBody("landId", "44094951", contentType);// 揽装工号,必填 //// builder.addTextBody("landId", "44094951", contentType);// 揽装工号,必填
// signMap.put("landId", "44094951"); //// signMap.put("landId", "44094951");
// ////
// builder.addTextBody("comarketingLanId", "", contentType);// 协销工号,选填 //// builder.addTextBody("comarketingLanId", "", contentType);// 协销工号,选填
// signMap.put("comarketingLanId", ""); //// signMap.put("comarketingLanId", "");
// ////
// builder.addTextBody("groupComarketingLanId", "", contentType);//集团协销工号,选填 //// builder.addTextBody("groupComarketingLanId", "", contentType);//集团协销工号,选填
// signMap.put("groupComarketingLanId", ""); //// signMap.put("groupComarketingLanId", "");
// ////
// builder.addTextBody("orderOutNum", (String) map.get("orderNum"), contentType);//外部订单编号,选填!; //// builder.addTextBody("orderOutNum", (String) map.get("orderNum"), contentType);//外部订单编号,选填!;
// //通过API接口下单,必须传入一个外部接入商的订单编号,该编号与智能营销系统编号一一对应 //// //通过API接口下单,必须传入一个外部接入商的订单编号,该编号与智能营销系统编号一一对应
// signMap.put("orderOutNum", (String) map.get("orderNum")); //// signMap.put("orderOutNum", (String) map.get("orderNum"));
// ////
// builder.addTextBody("orderSource", "", contentType);// 订单来源 ,选填 //// builder.addTextBody("orderSource", "", contentType);// 订单来源 ,选填
// signMap.put("orderSource", ""); //// signMap.put("orderSource", "");
// ////
// builder.addTextBody("orderSourceNum", "", contentType);// //// builder.addTextBody("orderSourceNum", "", contentType);//
// //订单来源单号,选填;与订单来源对应,用于业务上记录订单的来源订单编号 //// //订单来源单号,选填;与订单来源对应,用于业务上记录订单的来源订单编号
// signMap.put("orderSourceNum", ""); //// signMap.put("orderSourceNum", "");
// ////
// builder.addTextBody("salePointCode", "", contentType);// 销售点编码,选填 //// builder.addTextBody("salePointCode", "", contentType);// 销售点编码,选填
// signMap.put("salePointCode", ""); //// signMap.put("salePointCode", "");
// ////
// builder.addTextBody("personCode", "", contentType);// 人员编码,选填 //// builder.addTextBody("personCode", "", contentType);// 人员编码,选填
// signMap.put("personCode", ""); //// signMap.put("personCode", "");
// ////
// builder.addTextBody("distributorSmsReceive", "", contentType);// 分销商短信接收号码,选填 //// builder.addTextBody("distributorSmsReceive", "", contentType);// 分销商短信接收号码,选填
// signMap.put("distributorSmsReceive", ""); //// signMap.put("distributorSmsReceive", "");
// ////
// ////
// builder.addTextBody("batchPickUp", "0", contentType);// 是否批量提货,必填 //// builder.addTextBody("batchPickUp", "0", contentType);// 是否批量提货,必填
// // 0:否,1:是 //// // 0:否,1:是
// signMap.put("batchPickUp", "0"); //// signMap.put("batchPickUp", "0");
// ////
// builder.addTextBody("deliveryProvince", (String) map.get("sheng"), contentType);// 配送地址-省,必填 //// builder.addTextBody("deliveryProvince", (String) map.get("sheng"), contentType);// 配送地址-省,必填
// signMap.put("deliveryProvince", (String) map.get("sheng")); //// signMap.put("deliveryProvince", (String) map.get("sheng"));
// ////
// builder.addTextBody("deliveryCity", (String) map.get("shi"), contentType);// 配送地址-市,必填 //// builder.addTextBody("deliveryCity", (String) map.get("shi"), contentType);// 配送地址-市,必填
// signMap.put("deliveryCity", (String) map.get("shi")); //// signMap.put("deliveryCity", (String) map.get("shi"));
// ////
// builder.addTextBody("deliveryDistrict", (String) map.get("xian"), contentType);// 配送地址-区,必填 //// builder.addTextBody("deliveryDistrict", (String) map.get("xian"), contentType);// 配送地址-区,必填
// signMap.put("deliveryDistrict", (String) map.get("xian")); //// signMap.put("deliveryDistrict", (String) map.get("xian"));
// ////
// builder.addTextBody("deliveryAddress", (String) map.get("address"), contentType);// 配送地址-详细地址,必填 //// builder.addTextBody("deliveryAddress", (String) map.get("address"), contentType);// 配送地址-详细地址,必填
// signMap.put("deliveryAddress", (String) map.get("address")); //// signMap.put("deliveryAddress", (String) map.get("address"));
// ////
// builder.addTextBody("deliveryContact", (String) map.get("userName"), contentType);// 联系人,必填 //// builder.addTextBody("deliveryContact", (String) map.get("userName"), contentType);// 联系人,必填
// signMap.put("deliveryContact", (String) map.get("userName")); //// signMap.put("deliveryContact", (String) map.get("userName"));
// ////
// builder.addTextBody("deliveryContactPhone", (String) map.get("linkPhone"), contentType);// 联系电话,必填 //// builder.addTextBody("deliveryContactPhone", (String) map.get("linkPhone"), contentType);// 联系电话,必填
// signMap.put("deliveryContactPhone", (String) map.get("linkPhone")); //// signMap.put("deliveryContactPhone", (String) map.get("linkPhone"));
// ////
// builder.addTextBody("deliveryContactPhone2", "", contentType);// 联系电话2,选填 //// builder.addTextBody("deliveryContactPhone2", "", contentType);// 联系电话2,选填
// signMap.put("deliveryContactPhone2", ""); //// signMap.put("deliveryContactPhone2", "");
// ////
// builder.addTextBody("invoiced", "0", contentType);// 是否需要发票,必填 0:不需要;1:一次性发票;2:分月发票 //// builder.addTextBody("invoiced", "0", contentType);// 是否需要发票,必填 0:不需要;1:一次性发票;2:分月发票
// ////
// signMap.put("invoiced", "0"); //// signMap.put("invoiced", "0");
// ////
// builder.addTextBody("invoiceTitle", "", contentType);// 发票抬头,若需要发票必填 //// builder.addTextBody("invoiceTitle", "", contentType);// 发票抬头,若需要发票必填
// signMap.put("invoiceTitle", ""); //// signMap.put("invoiceTitle", "");
// ////
// builder.addTextBody("invoiceDeliveryAddress", "", contentType);// 电子邮箱,若需要发票必填 //// builder.addTextBody("invoiceDeliveryAddress", "", contentType);// 电子邮箱,若需要发票必填
// signMap.put("invoiceDeliveryAddress", ""); //// signMap.put("invoiceDeliveryAddress", "");
// ////
// builder.addTextBody("deliveryType", "代理商自行发货", contentType);// 发货类型,必填,填写只能填同德仓发货或者代理商自行发货或者 现场派卡(其它信息的要求与代理商自行发货类似) //// builder.addTextBody("deliveryType", "代理商自行发货", contentType);// 发货类型,必填,填写只能填同德仓发货或者代理商自行发货或者 现场派卡(其它信息的要求与代理商自行发货类似)
// signMap.put("deliveryType", "代理商自行发货");// 若填写代理商自行发货或现场派卡,则下单时有几个产品,就需要填写多少个实物串号 //// signMap.put("deliveryType", "代理商自行发货");// 若填写代理商自行发货或现场派卡,则下单时有几个产品,就需要填写多少个实物串号
// ////
// builder.addTextBody("deliveryCompany", "", contentType);// 配送公司,必填,填写只能填顺丰速运或者如风达或者京东快递或者EMS //// builder.addTextBody("deliveryCompany", "", contentType);// 配送公司,必填,填写只能填顺丰速运或者如风达或者京东快递或者EMS
// signMap.put("deliveryCompany", "");// 若发货类型选择代理商自行发货,则不用填写(填写也无效) //// signMap.put("deliveryCompany", "");// 若发货类型选择代理商自行发货,则不用填写(填写也无效)
// ////
// builder.addTextBody("collection", "", contentType);// 回收资料,选填,若填写只能填写1(表示身份证复印件) //// builder.addTextBody("collection", "", contentType);// 回收资料,选填,若填写只能填写1(表示身份证复印件)
// signMap.put("collection", ""); //// signMap.put("collection", "");
// ////
// builder.addTextBody("gift", "", contentType);// 礼品,选填,请通过礼品列表接口获取 //// builder.addTextBody("gift", "", contentType);// 礼品,选填,请通过礼品列表接口获取
// signMap.put("gift", ""); //// signMap.put("gift", "");
// ////
// builder.addTextBody("giftNum", "", contentType);// 礼品数量,选填,若礼品填写则必填且为正整数 //// builder.addTextBody("giftNum", "", contentType);// 礼品数量,选填,若礼品填写则必填且为正整数
// signMap.put("giftNum", ""); //// signMap.put("giftNum", "");
// ////
// List<Map<String, Object>> productList = new ArrayList<Map<String, Object>>();// 产品信息 //// List<Map<String, Object>> productList = new ArrayList<Map<String, Object>>();// 产品信息
// List<Map<String, Object>> paymentList = new ArrayList<Map<String, Object>>();// 销售品信息(费用项) //// List<Map<String, Object>> paymentList = new ArrayList<Map<String, Object>>();// 销售品信息(费用项)
// List<Map<String, Object>> inPropertyList = new ArrayList<Map<String, Object>>();// 产品属性 //// List<Map<String, Object>> inPropertyList = new ArrayList<Map<String, Object>>();// 产品属性
// List<Map<String, Object>> appendPropertyList = new ArrayList<Map<String, Object>>();// 产品附加扩展属性 //// List<Map<String, Object>> appendPropertyList = new ArrayList<Map<String, Object>>();// 产品附加扩展属性
// List<Map<String, Object>> addPropertyList = new ArrayList<Map<String, Object>>();// 自定义产品属性 //// List<Map<String, Object>> addPropertyList = new ArrayList<Map<String, Object>>();// 自定义产品属性
// // 下单产品(如有多个请建立多个map,但产品总数不能超过5个) //// // 下单产品(如有多个请建立多个map,但产品总数不能超过5个)
// Map<String, Object> productMap = new HashMap<String, Object>(); //// Map<String, Object> productMap = new HashMap<String, Object>();
// // 产品 //// // 产品
// productMap.put("productId", map.get("productId"));// 产品id,必填,请通过产品列表接口获取 //// productMap.put("productId", map.get("productId"));// 产品id,必填,请通过产品列表接口获取
// productMap.put("count", "");// 产品数量,选填(若不填默认为1) //// productMap.put("count", "");// 产品数量,选填(若不填默认为1)
// // 该数量仅供发货类型为同德仓发货且批量提货为否时填写,若选择代理商自行发货或批量提货为是,则填写无效 //// // 该数量仅供发货类型为同德仓发货且批量提货为否时填写,若选择代理商自行发货或批量提货为是,则填写无效
// productMap.put("count2", "");// 产品数量,选填(若不填默认为1);该数量仅供批量提货为是时使用 //// productMap.put("count2", "");// 产品数量,选填(若不填默认为1);该数量仅供批量提货为是时使用
// // 若选择批量提货为否时,则填写无效 //// // 若选择批量提货为否时,则填写无效
// productMap.put("sn", map.get("iccId"));// 实物串号,选填(若选择代理商自行发货,必填;其他情况填写无效) //// productMap.put("sn", map.get("iccId"));// 实物串号,选填(若选择代理商自行发货,必填;其他情况填写无效)
// ////
// // 销售品信息(费用项)必填,若有终端,请将费用项填写在此 //// // 销售品信息(费用项)必填,若有终端,请将费用项填写在此
// Map<String, Object> paymentListMap = new HashMap<String, Object>(); //// Map<String, Object> paymentListMap = new HashMap<String, Object>();
// paymentListMap.put("id", map.get("salesId"));// 收费项ID,选填;请通过销售品列表接口获取,若不填表示终端补收款 //// paymentListMap.put("id", map.get("salesId"));// 收费项ID,选填;请通过销售品列表接口获取,若不填表示终端补收款
// paymentListMap.put("saleName", "");// 销售品名称,选填,若id不填写此项必填写,且只能为终端补收款 //// paymentListMap.put("saleName", "");// 销售品名称,选填,若id不填写此项必填写,且只能为终端补收款
//// paymentListMap.put("saleAmount", "");// 售价,选填 ////// paymentListMap.put("saleAmount", "");// 售价,选填
// paymentListMap.put("payType", "3");// 缴费方式,必填(例:payType:3)3:代理商打款4:穗易付7:货到付款9:第三方托收 //// paymentListMap.put("payType", "3");// 缴费方式,必填(例:payType:3)3:代理商打款4:穗易付7:货到付款9:第三方托收
// paymentListMap.put("payAmount", "0");// 打款金额(支付金额),若选择代理商打款或者穗易付,此项必填 //// paymentListMap.put("payAmount", "0");// 打款金额(支付金额),若选择代理商打款或者穗易付,此项必填
// paymentListMap.put("saleAmount", "");// 打款金额,若选择货到付款,此项必填 //// paymentListMap.put("saleAmount", "");// 打款金额,若选择货到付款,此项必填
// paymentListMap.put("payPlatform", "");// 支付平台,若选择穗易付,此项必填 //// paymentListMap.put("payPlatform", "");// 支付平台,若选择穗易付,此项必填
// paymentListMap.put("electronicPayNumber", "");// 支付流水号,若选择穗易付,此项必填 //// paymentListMap.put("electronicPayNumber", "");// 支付流水号,若选择穗易付,此项必填
// paymentListMap.put("payOrderNumber", "");// 穗易付订单号,若选择穗易付,此项必填 //// paymentListMap.put("payOrderNumber", "");// 穗易付订单号,若选择穗易付,此项必填
// paymentListMap.put("monthUserid", "");//用户ID,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthUserid", "");//用户ID,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthPlatform", "");//签约平台,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthPlatform", "");//签约平台,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthFlowno", "");//签约流水号,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthFlowno", "");//签约流水号,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthNumber", "");//签约协议号,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthNumber", "");//签约协议号,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthTime", "");//签约时间,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthTime", "");//签约时间,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthEffectiveTime", "");//签约生效时间,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthEffectiveTime", "");//签约生效时间,缴费方式为“第三方托收”时必填
// paymentListMap.put("monthUneffectiveTime", "");//签约失效时间,缴费方式为“第三方托收”时必填 //// paymentListMap.put("monthUneffectiveTime", "");//签约失效时间,缴费方式为“第三方托收”时必填
// ////
// paymentList.add(paymentListMap); //// paymentList.add(paymentListMap);
// ////
// productMap.put("payment", paymentList); //// productMap.put("payment", paymentList);
// ////
// // 产品属性 必填业务号码属性,name=业务号码,value=11位数字或者随机;若还有其他属性可建立多个map添加 //// // 产品属性 必填业务号码属性,name=业务号码,value=11位数字或者随机;若还有其他属性可建立多个map添加
// // 若发货类型选择代理商自行发货,则该value值必须填写11位数字 //// // 若发货类型选择代理商自行发货,则该value值必须填写11位数字
// Map<String, Object> inPropertyListMap = new HashMap<String, Object>(); //// Map<String, Object> inPropertyListMap = new HashMap<String, Object>();
// inPropertyListMap.put("name", "业务号码"); //// inPropertyListMap.put("name", "业务号码");
// inPropertyListMap.put("value", map.get("orderPhone")); //// inPropertyListMap.put("value", map.get("orderPhone"));
// inPropertyList.add(inPropertyListMap); //// inPropertyList.add(inPropertyListMap);
// productMap.put("inpProperties", inPropertyList); //// productMap.put("inpProperties", inPropertyList);
// ////
// // 产品自定义属性;选填,没有则为null //// // 产品自定义属性;选填,没有则为null
// // 注:若填写请属性名和属性值都填写,若只填写其中一项则无效 //// // 注:若填写请属性名和属性值都填写,若只填写其中一项则无效
// Map<String, Object> addPropertyListMap = new HashMap<String, Object>(); //// Map<String, Object> addPropertyListMap = new HashMap<String, Object>();
// addPropertyListMap.put("name", null); //// addPropertyListMap.put("name", null);
// addPropertyListMap.put("value", null); //// addPropertyListMap.put("value", null);
// addPropertyList.add(addPropertyListMap); //// addPropertyList.add(addPropertyListMap);
// productMap.put("addProperties", addPropertyList); //// productMap.put("addProperties", addPropertyList);
// ////
// productList.add(productMap); //// productList.add(productMap);
// ////
// // 将对象装换为json字符串 //// // 将对象装换为json字符串
// String productJson = JSONArray.fromObject(productList).toString(); //// String productJson = JSONArray.fromObject(productList).toString();
// ////
// log.info("移动下单产品参数:" + productJson); //// log.info("移动下单产品参数:" + productJson);
// ////
// try { //// try {
// builder.addTextBody("productJson", URLEncoder.encode(productJson, "UTF-8"), contentType);// 产品信息,必填 //// builder.addTextBody("productJson", URLEncoder.encode(productJson, "UTF-8"), contentType);// 产品信息,必填
// signMap.put("productJson", URLEncoder.encode(productJson, "UTF-8")); //// signMap.put("productJson", URLEncoder.encode(productJson, "UTF-8"));
// } catch (UnsupportedEncodingException e1) { //// } catch (UnsupportedEncodingException e1) {
// e1.printStackTrace(); //// e1.printStackTrace();
// } //// }
// ////
// //身份证正面,选填 //// //身份证正面,选填
// File file1 = new File(map.get("imgUrl1").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/")); //// File file1 = new File(map.get("imgUrl1").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/"));
// //身份证背面,选填 //// //身份证背面,选填
// File file2 = new File(map.get("imgUrl2").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/")); //// File file2 = new File(map.get("imgUrl2").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/"));
// //手持证件,选填 //// //手持证件,选填
// File file3 = new File(map.get("imgUrl3").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/")); //// File file3 = new File(map.get("imgUrl3").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/"));
// //手持证件2,选填 //// //手持证件2,选填
// File file4 = new File(map.get("imgUrl4").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/")); //// File file4 = new File(map.get("imgUrl4").toString().replace("manager/ciop", FilePath.BACKGROUNDIMG.getValue()).replace("\\", "/"));
// ////
// if (file1 != null) { //// if (file1 != null) {
// ContentBody sfzzmFile = new FileBody(file1); //// ContentBody sfzzmFile = new FileBody(file1);
// builder.addPart("sfzzmFile", sfzzmFile); //// builder.addPart("sfzzmFile", sfzzmFile);
// } //// }
// if (file2 != null) { //// if (file2 != null) {
// ContentBody sfzbmFile = new FileBody(file2); //// ContentBody sfzbmFile = new FileBody(file2);
// builder.addPart("sfzbmFile", sfzbmFile); //// builder.addPart("sfzbmFile", sfzbmFile);
// } //// }
// if (file3 != null) { //// if (file3 != null) {
// ContentBody sfzscFile = new FileBody(file3); //// ContentBody sfzscFile = new FileBody(file3);
// builder.addPart("sfzscFile", sfzscFile); //// builder.addPart("sfzscFile", sfzscFile);
// } //// }
// if (file4 != null) { //// if (file4 != null) {
// ContentBody sfzsc2File = new FileBody(file4); //// ContentBody sfzsc2File = new FileBody(file4);
// builder.addPart("sfzsc2File", sfzsc2File); //// builder.addPart("sfzsc2File", sfzsc2File);
// } //// }
// ////
// List<String> keys = new ArrayList<String>(); //// List<String> keys = new ArrayList<String>();
// keys.addAll(signMap.keySet()); //// keys.addAll(signMap.keySet());
// Collections.sort(keys);// key按字符串升序 //// Collections.sort(keys);// key按字符串升序
// String value, plaintext = ""; //// String value, plaintext = "";
// ////
// for (String key : keys) { //// for (String key : keys) {
// value = signMap.get(key); //// value = signMap.get(key);
// plaintext = plaintext.concat(value); //// plaintext = plaintext.concat(value);
// } //// }
// ////
// plaintext = plaintext.concat((String) map.get("sign")); //// plaintext = plaintext.concat((String) map.get("sign"));
// ////
// String sign = CommonMd5.encryption(plaintext);// md5加密 //// String sign = CommonMd5.encryption(plaintext);// md5加密
// builder.addTextBody("sign", sign, contentType);// 签名,必填 //// builder.addTextBody("sign", sign, contentType);// 签名,必填
// ////
// log.info("移动智能平台下单参数:" + plaintext); //// log.info("移动智能平台下单参数:" + plaintext);
// ////
// try { //// try {
// ////
// //httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8"); //// //httpPost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
// httpPost.setEntity(builder.build()); //// httpPost.setEntity(builder.build());
// //System.out.println("[CREATE_ORDER]移动产品下单接口,提交参数" + EntityUtils.toString(httpPost.getEntity(), "UTF-8")); //// //System.out.println("[CREATE_ORDER]移动产品下单接口,提交参数" + EntityUtils.toString(httpPost.getEntity(), "UTF-8"));
// ////
// long startTime = System.currentTimeMillis(); //// long startTime = System.currentTimeMillis();
// Constant.trustEveryone(); //// Constant.trustEveryone();
// HttpResponse response = httpclient.execute(httpPost); //// HttpResponse response = httpclient.execute(httpPost);
// long endTime = System.currentTimeMillis(); //// long endTime = System.currentTimeMillis();
// log.info("接口调用时间:" + (endTime - startTime) + "ms"); //// log.info("接口调用时间:" + (endTime - startTime) + "ms");
// ////
// ////
// entity = response.getEntity(); //// entity = response.getEntity();
// ////
// String httpResult = EntityUtils.toString(entity, "UTF-8"); //// String httpResult = EntityUtils.toString(entity, "UTF-8");
// resultStr = httpResult; //// resultStr = httpResult;
// ////
// log.info("[CREATE_ORDER]预付费下单接口,返回信息:" + httpResult); //// log.info("[CREATE_ORDER]预付费下单接口,返回信息:" + httpResult);
// httpclient.close(); //// httpclient.close();
// JSONObject resultDataJson = JSONObject.fromObject(httpResult); //// JSONObject resultDataJson = JSONObject.fromObject(httpResult);
// ////
// String isSuccess = resultDataJson.getString("status"); //// String isSuccess = resultDataJson.getString("status");
// String orderNum = resultDataJson.getString("orderNumber"); //// String orderNum = resultDataJson.getString("orderNumber");
// if ("000001".equals(isSuccess)) { //// if ("000001".equals(isSuccess)) {
// log.info("[CREATE_ORDER]下单成功,orderNum=" + orderNum); //// log.info("[CREATE_ORDER]下单成功,orderNum=" + orderNum);
// } //// }
// } catch (SSLHandshakeException s) { //// } catch (SSLHandshakeException s) {
// count++; //// count++;
// if (count < 20) { //// if (count < 20) {
// resultStr = sendAitransOrder(map, count); //// resultStr = sendAitransOrder(map, count);
// } else { //// } else {
// log.error("[HTTP] [CREATE_ORDER] 预付费下单接口异常20次"); //// log.error("[HTTP] [CREATE_ORDER] 预付费下单接口异常20次");
// } //// }
// } catch (Exception e) { //// } catch (Exception e) {
// log.error("[HTTP] [CREATE_ORDER] 预付费下单接口异常"); //// log.error("[HTTP] [CREATE_ORDER] 预付费下单接口异常");
// e.printStackTrace(); //// e.printStackTrace();
// } finally { //// } finally {
// httpPost.releaseConnection(); //// httpPost.releaseConnection();
// } //// }
// ////
// return resultStr; //// return resultStr;
// } //// }
@Permission(menuname = "更新存量升级订单状态", value = "setUpgradeStatus", method = RequestMethod.POST) @Permission(menuname = "更新存量升级订单状态", value = "setUpgradeStatus", method = RequestMethod.POST)
public ResponseData setUpgradeStatus(@RequestParam("orderId") String orderId, @RequestParam("auditType") String auditType, @RequestParam("contentMsg") String contentMsg) { public ResponseData setUpgradeStatus(@RequestParam("orderId") String orderId, @RequestParam("auditType") String auditType, @RequestParam("contentMsg") String contentMsg) {
......
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.mapper.Wrapper; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.mapper.Wrapper;
import com.winsun.auth.core.common.model.ResponseData; import com.winsun.auth.core.common.model.ResponseData;
import com.winsun.bean.*; import com.winsun.bean.*;
import com.winsun.mapper.*; import com.winsun.mapper.*;
import com.winsun.outSideSystem.IntelligenceSendOrder;
import com.winsun.outSideSystem.IntelligenceSendOrders; import com.winsun.outSideSystem.IntelligenceSendOrders;
import com.winsun.service.ISalesListService; import com.winsun.service.ISalesListService;
import com.winsun.smsUtils.SendSmsAndMail; import com.winsun.smsUtils.SendSmsAndMail;
...@@ -33,8 +34,8 @@ import java.util.*; ...@@ -33,8 +34,8 @@ import java.util.*;
public class OrderTask { public class OrderTask {
private static OrderMapper orderMapper; private static OrderMapper orderMapper;
/*@Autowired @Autowired
private IntelligenceSendOrder intelligenceSendOrder;*/ private IntelligenceSendOrder intelligenceSendOrder;
@Autowired @Autowired
private IntelligenceSendOrders intelligenceSendOrders; private IntelligenceSendOrders intelligenceSendOrders;
...@@ -138,7 +139,9 @@ public class OrderTask { ...@@ -138,7 +139,9 @@ public class OrderTask {
} }
log.info("更新预制卡状态完成"); log.info("更新预制卡状态完成");
} }
/*public void updateMobileCardStatus() {
@Scheduled(cron = "0 0/4 * * * ?")
public void updateMobileCardStatus2() {
log.info("更新预制卡状态开始"); log.info("更新预制卡状态开始");
// 有卡品id,并且未审核中的状态 // 有卡品id,并且未审核中的状态
Wrapper<Order> wrapper = new EntityWrapper<>(); Wrapper<Order> wrapper = new EntityWrapper<>();
...@@ -185,7 +188,7 @@ public class OrderTask { ...@@ -185,7 +188,7 @@ public class OrderTask {
} }
} }
log.info("更新预制卡状态完成"); log.info("更新预制卡状态完成");
}*/ }
/** /**
* 定时器更新智能平台状态 * 定时器更新智能平台状态
...@@ -256,7 +259,9 @@ public class OrderTask { ...@@ -256,7 +259,9 @@ public class OrderTask {
} }
} }
} }
/*public void updateStatus() {
@Scheduled(cron = "0 0/5 * * * ?")
public void updateStatus2() throws Exception {
// 获取审核中的订单 // 获取审核中的订单
Wrapper<Order> wrapper = new EntityWrapper<>(); Wrapper<Order> wrapper = new EntityWrapper<>();
...@@ -301,7 +306,7 @@ public class OrderTask { ...@@ -301,7 +306,7 @@ public class OrderTask {
} }
// 下发短信 // 下发短信
SendSmsAndMail.sendSms2(order.getContactNumber(), SendSmsAndMail.sendSms(order.getContactNumber(),
order.getNetNumber(), order.getNetNumber(),
order.getNetPassword(), "12"); order.getNetPassword(), "12");
}else if("作废".equals(json.get("orderStatus")) || "受理异常".equals(json.get("orderStatus"))){ }else if("作废".equals(json.get("orderStatus")) || "受理异常".equals(json.get("orderStatus"))){
...@@ -316,7 +321,7 @@ public class OrderTask { ...@@ -316,7 +321,7 @@ public class OrderTask {
} }
} }
} }
}*/ }
@Scheduled(cron = "0 0 * * * ? ") @Scheduled(cron = "0 0 * * * ? ")
//@Scheduled(cron = "0/5 * * * * ? ") //@Scheduled(cron = "0/5 * * * * ? ")
......
...@@ -130,7 +130,7 @@ public class RhZhiNenTask { ...@@ -130,7 +130,7 @@ public class RhZhiNenTask {
//每五分钟调用一次 //每五分钟调用一次
// @Scheduled(cron = "0 0/5 0 * * ? ") // @Scheduled(cron = "0 0/5 0 * * ? ")
//@Scheduled(fixedRate=1000*60) //@Scheduled(fixedRate=1000*60)
/* @PostMapping("/rhZhiNenTask") @PostMapping("/rhZhiNenTask")
public void general() throws Exception { public void general() throws Exception {
Wrapper<Order> wrapper = new EntityWrapper<>(); Wrapper<Order> wrapper = new EntityWrapper<>();
...@@ -279,7 +279,7 @@ public class RhZhiNenTask { ...@@ -279,7 +279,7 @@ public class RhZhiNenTask {
qParams.add(new BasicNameValuePair("transactType", "新宽旧移"));// 办理类型,必填[新宽新移][新宽旧移][旧宽新移][旧宽旧移] qParams.add(new BasicNameValuePair("transactType", "新宽旧移"));// 办理类型,必填[新宽新移][新宽旧移][旧宽新移][旧宽旧移]
signMap.put("transactType", "新宽旧移"); signMap.put("transactType", "新宽旧移");
*//* if(orderMap.get("webOrderAmount").toString().equals("0")){ if(orderMap.get("webOrderAmount").toString().equals("0")){
qParams.add(new BasicNameValuePair("ctNumber", (String) order.get("businessNumber")));// 电信号码,办理类型,若选择[新宽旧移]或[旧宽旧移],此项必填 qParams.add(new BasicNameValuePair("ctNumber", (String) order.get("businessNumber")));// 电信号码,办理类型,若选择[新宽旧移]或[旧宽旧移],此项必填
signMap.put("ctNumber", (String) order.get("businessNumber")); signMap.put("ctNumber", (String) order.get("businessNumber"));
...@@ -291,7 +291,7 @@ public class RhZhiNenTask { ...@@ -291,7 +291,7 @@ public class RhZhiNenTask {
qParams.add(new BasicNameValuePair("ctNumber", (String) order.get("businessNumber")));// 电信号码,办理类型,若选择[新宽旧移]或[旧宽旧移],此项必填 qParams.add(new BasicNameValuePair("ctNumber", (String) order.get("businessNumber")));// 电信号码,办理类型,若选择[新宽旧移]或[旧宽旧移],此项必填
signMap.put("ctNumber", (String) order.get("businessNumber")); signMap.put("ctNumber", (String) order.get("businessNumber"));
*//*
qParams.add(new BasicNameValuePair("addressProvince", "广东省"));// 报装地址-省 办理类型,若选择[新宽新移][新宽旧移],此项必填 qParams.add(new BasicNameValuePair("addressProvince", "广东省"));// 报装地址-省 办理类型,若选择[新宽新移][新宽旧移],此项必填
signMap.put("addressProvince", "广东省"); signMap.put("addressProvince", "广东省");
...@@ -655,7 +655,7 @@ public class RhZhiNenTask { ...@@ -655,7 +655,7 @@ public class RhZhiNenTask {
if (StringUtils.isNotBlank(orderNum)) { if (StringUtils.isNotBlank(orderNum)) {
queryOrderJsonObject = getQueryOrderInfo(orderNum, currentTimeStr); queryOrderJsonObject = getQueryOrderInfo(orderNum, currentTimeStr);
log.info("----------调用查询智能订单接口并返回参数信息:" + queryOrderJsonObject); log.info("----------调用查询智能订单接口并返回参数信息:" + queryOrderJsonObject);
*//* 5、插入数据到数据库 *//* // 5、插入数据到数据库
String state = queryOrderJsonObject.getString("state"); String state = queryOrderJsonObject.getString("state");
String order_id = queryOrderJsonObject.getString("bizEntity"); String order_id = queryOrderJsonObject.getString("bizEntity");
String th_status = queryOrderJsonObject.getString("stateName"); String th_status = queryOrderJsonObject.getString("stateName");
...@@ -680,7 +680,7 @@ public class RhZhiNenTask { ...@@ -680,7 +680,7 @@ public class RhZhiNenTask {
if (StringUtils.isNotBlank(orderNum)) { if (StringUtils.isNotBlank(orderNum)) {
queryOrderJsonObject = getQueryOrderInfo(orderNum, currentTimeStr); queryOrderJsonObject = getQueryOrderInfo(orderNum, currentTimeStr);
log.info("----------调用查询智能订单接口并返回参数信息:" + queryOrderJsonObject); log.info("----------调用查询智能订单接口并返回参数信息:" + queryOrderJsonObject);
*//* 5、更新数据库 *//* //5、更新数据库
String state = queryOrderJsonObject.getString("state"); String state = queryOrderJsonObject.getString("state");
HashMap<String, Object> hashMap = new HashMap<>(); HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("order_id",orderNum); hashMap.put("order_id",orderNum);
...@@ -705,9 +705,9 @@ public class RhZhiNenTask { ...@@ -705,9 +705,9 @@ public class RhZhiNenTask {
} }
} }
}*/ }
/*private String QueOrderNum(String orderNum) { private String QueOrderNum(String orderNum) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
if (orderNum.equals("12")) { if (orderNum.equals("12")) {
return "1"; // 待提交 return "1"; // 待提交
...@@ -725,9 +725,9 @@ public class RhZhiNenTask { ...@@ -725,9 +725,9 @@ public class RhZhiNenTask {
return "2"; // 待受理(未受理、未受理【待跟进】、待疑难支撑审核、待分局审核、待分销商审核) return "2"; // 待受理(未受理、未受理【待跟进】、待疑难支撑审核、待分局审核、待分销商审核)
} }
}*/ }
/*private net.sf.json.JSONObject getQueryOrderInfo(String orderNum, String currentTimeStr) throws Exception { private net.sf.json.JSONObject getQueryOrderInfo(String orderNum, String currentTimeStr) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(50000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(50000)
.setConnectTimeout(50000).setConnectionRequestTimeout(50000).build(); .setConnectTimeout(50000).setConnectionRequestTimeout(50000).build();
...@@ -776,7 +776,7 @@ public class RhZhiNenTask { ...@@ -776,7 +776,7 @@ public class RhZhiNenTask {
httpPost.releaseConnection(); httpPost.releaseConnection();
} }
return resultDataJson; return resultDataJson;
}*/ }
private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception { private static JSONObject getSaleId(String productId, String currentTimeStr) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
...@@ -787,7 +787,7 @@ public class RhZhiNenTask { ...@@ -787,7 +787,7 @@ public class RhZhiNenTask {
.build(); .build();
HttpEntity entity = null; HttpEntity entity = null;
HttpPost httpPost = new HttpPost(Constant.ZHANGSHIURL + "query.action"); HttpPost httpPost = new HttpPost();
RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig).build(); RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig).build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
qParams.add(new BasicNameValuePair("service", "sale.query"));//api标识,必填 qParams.add(new BasicNameValuePair("service", "sale.query"));//api标识,必填
......
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