|
|
|
@ -19,6 +19,7 @@ import com.dxhy.order.consumer.constant.RespStatusEnum; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.CheckResult; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.CommonRequestParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.EsOutput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.IsInput; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonRequestParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.po.PoCommonResponseParam; |
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v4.fpyl.FpylcxReqBO; |
|
|
|
@ -56,10 +57,7 @@ import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
import static org.joda.time.DateTime.now; |
|
|
|
|
|
|
|
|
@ -417,45 +415,43 @@ public class InvoiceRestApiV6 { |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
//20230426客户说不同步更新组织名称
|
|
|
|
|
// else if(ConfigurerInfo.SYNC_DEPT_INFO.equals(interfaceName)) {
|
|
|
|
|
// // /itaxAdmin/api/sys/dept/batchUpdate
|
|
|
|
|
// log.info("同步组织信息请求报文:{}",reqStr);
|
|
|
|
|
// PoCommonRequestParam requestParam = JsonUtils.getInstance().parseObject(reqStr, PoCommonRequestParam.class);
|
|
|
|
|
// IsInput isInput = requestParam.getIS_INPUT();
|
|
|
|
|
// //JSONObject jsonObject2 = JSONObject.parseObject(reqStr); 正常、注销、划转、下线
|
|
|
|
|
// String zdata = isInput.getZDATA();//jsonObject2.getString("ZDATA");
|
|
|
|
|
// String bskey = isInput.getBSKEY();//jsonObject2.getString("BSKEY");
|
|
|
|
|
// String sapkey = isInput.getSAPKEY();//jsonObject2.getString("SAPKEY");
|
|
|
|
|
// String s = "";
|
|
|
|
|
// JSONObject result = new JSONObject();
|
|
|
|
|
//
|
|
|
|
|
// JSONObject jsonObject = new JSONObject();
|
|
|
|
|
// jsonObject.put("BSKEY",UUID.randomUUID().toString().replaceAll("-",""));
|
|
|
|
|
// jsonObject.put("SAPKEY",sapkey);
|
|
|
|
|
// jsonObject.put("ZTYPE","E");
|
|
|
|
|
// jsonObject.put("ZMESSAGE","处理失败");
|
|
|
|
|
// try {
|
|
|
|
|
// if(StringUtils.isNotBlank(zdata)){
|
|
|
|
|
// String sysUrl = invoiceConfig.getSysUrl() + "/itax/batchUpdate";
|
|
|
|
|
// //String sysUrl = "http://localhost:18100/itax/batchUpdate";
|
|
|
|
|
// s = HttpUtils.doPost(sysUrl, zdata);
|
|
|
|
|
// JSONObject jsonObject1 = JSONObject.parseObject(s);
|
|
|
|
|
// if(CollectionUtils.isEmpty(jsonObject1.getJSONArray("data"))){
|
|
|
|
|
// jsonObject.put("ZTYPE","S");
|
|
|
|
|
// jsonObject.put("ZMESSAGE","处理成功");
|
|
|
|
|
// jsonObject.put("ZDATA",jsonObject1.getString("data"));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// jsonObject.put("ZTYPE","E");
|
|
|
|
|
// jsonObject.put("ZMESSAGE","处理失败");
|
|
|
|
|
// }
|
|
|
|
|
// log.info("同步组织信息返回报文:{}",jsonObject.toJSONString());
|
|
|
|
|
// result.put("ES_OUTPUT",jsonObject);
|
|
|
|
|
// return result.toJSONString();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
else{ |
|
|
|
|
else if(ConfigurerInfo.SYNC_DEPT_INFO.equals(interfaceName)) { |
|
|
|
|
// /itaxAdmin/api/sys/dept/batchUpdate
|
|
|
|
|
log.info("同步组织信息请求报文:{}",reqStr); |
|
|
|
|
PoCommonRequestParam requestParam = JsonUtils.getInstance().parseObject(reqStr, PoCommonRequestParam.class); |
|
|
|
|
IsInput isInput = requestParam.getIS_INPUT(); |
|
|
|
|
//JSONObject jsonObject2 = JSONObject.parseObject(reqStr); 正常、注销、划转、下线
|
|
|
|
|
String zdata = isInput.getZDATA();//jsonObject2.getString("ZDATA");
|
|
|
|
|
String bskey = isInput.getBSKEY();//jsonObject2.getString("BSKEY");
|
|
|
|
|
String sapkey = isInput.getSAPKEY();//jsonObject2.getString("SAPKEY");
|
|
|
|
|
String s = ""; |
|
|
|
|
JSONObject result = new JSONObject(); |
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("BSKEY", UUID.randomUUID().toString().replaceAll("-","")); |
|
|
|
|
jsonObject.put("SAPKEY",sapkey); |
|
|
|
|
jsonObject.put("ZTYPE","E"); |
|
|
|
|
jsonObject.put("ZMESSAGE","处理失败"); |
|
|
|
|
try { |
|
|
|
|
if(StringUtils.isNotBlank(zdata)){ |
|
|
|
|
String sysUrl = invoiceConfig.getSysUrl() + "/itax/batchUpdate"; |
|
|
|
|
//String sysUrl = "http://localhost:18100/itax/batchUpdate";
|
|
|
|
|
s = HttpUtils.doPost(sysUrl, zdata); |
|
|
|
|
JSONObject jsonObject1 = JSONObject.parseObject(s); |
|
|
|
|
if(CollectionUtils.isEmpty(jsonObject1.getJSONArray("data"))){ |
|
|
|
|
jsonObject.put("ZTYPE","S"); |
|
|
|
|
jsonObject.put("ZMESSAGE","处理成功"); |
|
|
|
|
jsonObject.put("ZDATA",jsonObject1.getString("data")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
jsonObject.put("ZTYPE","E"); |
|
|
|
|
jsonObject.put("ZMESSAGE","处理失败"); |
|
|
|
|
} |
|
|
|
|
log.info("同步组织信息返回报文:{}",jsonObject.toJSONString()); |
|
|
|
|
result.put("ES_OUTPUT",jsonObject); |
|
|
|
|
return result.toJSONString(); |
|
|
|
|
}else{ |
|
|
|
|
returnJsonString = ""; |
|
|
|
|
} |
|
|
|
|
return returnJsonString; |
|
|
|
|