80 files update
parent
ebcd9a4fad
commit
24b0799939
@ -0,0 +1,207 @@
|
||||
package com.weaver.seconddev.interfaces.workflow.controller;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.interfaces.workflow.action.ZOA_FI_CUSTOMER_MAINTAIN;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: calyrex
|
||||
* @CreateTime: 2025-01-08
|
||||
* @Description: ZOA_FI_VENDOR_MAINTAIN的API调用
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping({"/papi/secondev/workflow/controller" })
|
||||
public class ZOA_FI_CUSTOMER_MAINTAIN_CONTROLLER {
|
||||
@GetMapping("/ZOA_FI_CUSTOMER_MAINTAIN")
|
||||
//@PostMapping("/post")
|
||||
public WeaResult<String> run(@RequestParam Map<String,Object> params) {
|
||||
log.info("ZOA_FI_CUSTOMER_MAINTAIN_CONTROLLER execute start");
|
||||
log.info("ZOA_FI_CUSTOMER_MAINTAIN_CONTROLLER execute params : " + params);
|
||||
try {
|
||||
String edit_flag = null2String(params.get("edit_flag")); //动作类型
|
||||
String bukrs = null2String(params.get("bukrs")); //公司代码
|
||||
String kunnr = null2String(params.get("kunnr")); //客户编号
|
||||
String ktokd = null2String(params.get("ktokd")); //科目组
|
||||
String anred = null2String(params.get("anred")); //称谓
|
||||
String name1 = null2String(params.get("name1")); //名称
|
||||
String sortl = null2String(params.get("sortl")); //简称-搜索项
|
||||
String telf1 = null2String(params.get("telf1")); //电话
|
||||
String smtp_addr = null2String(params.get("smtp_addr")); //邮件
|
||||
String telf2 = null2String(params.get("telf2")); //手机
|
||||
String telfx = null2String(params.get("telfx")); //传真
|
||||
String land1 = null2String(params.get("land1")); //国家
|
||||
String regio = null2String(params.get("regio")); //地区
|
||||
String spras = null2String(params.get("spras")); //语言
|
||||
String ort01 = null2String(params.get("ort01")); //城市
|
||||
String stras = null2String(params.get("stras")); //地址
|
||||
String pstlz = null2String(params.get("pstlz"));//邮政编号
|
||||
String bankl = null2String(params.get("bankl")); //开户行行号
|
||||
String banka = null2String(params.get("banka"));//开户行名称
|
||||
String banks = null2String(params.get("banks"));//开户行国家
|
||||
String koinh = null2String(params.get("koinh")); //开户行账号
|
||||
String stcd5 = null2String(params.get("stcd5"));//纳税登记证代码
|
||||
|
||||
String akont = null2String(params.get("akont")); //统驭科目
|
||||
String zterm = null2String(params.get("zterm"));//付款条件
|
||||
String zuawa = null2String(params.get("zuawa")); //排序码
|
||||
String zwels = null2String(params.get("zwels"));//付款方式
|
||||
String frgrp = null2String(params.get("frgrp"));//批准组
|
||||
String zahls = null2String(params.get("zahls")); //付款冻结
|
||||
|
||||
|
||||
|
||||
String estatus = "E";
|
||||
String emessage = "";
|
||||
String[] prdetail = new String[28];
|
||||
prdetail[0] = edit_flag; //动作类型
|
||||
prdetail[1] = bukrs; //公司代码
|
||||
prdetail[2] = kunnr; //客户编号
|
||||
prdetail[3] = ktokd; //科目组
|
||||
prdetail[4] = anred; //称谓
|
||||
prdetail[5] = name1; //名称
|
||||
prdetail[6] = sortl; //简称-搜索项
|
||||
prdetail[7] = telf1; //电话
|
||||
prdetail[8] = smtp_addr; //邮件
|
||||
prdetail[9] = telf2; //手机
|
||||
prdetail[10] = telfx; //传真
|
||||
prdetail[11] = land1; //国家
|
||||
prdetail[12] = regio; //地区
|
||||
prdetail[13] = spras; //语言
|
||||
prdetail[14] = ort01; //城市
|
||||
prdetail[15] = stras; //地址
|
||||
prdetail[16] = pstlz;//邮政编号
|
||||
prdetail[17] = bankl; //开户行行号
|
||||
prdetail[18] = banka;//开户行名称
|
||||
prdetail[19] = banks;//开户行国家
|
||||
prdetail[20] = koinh; //开户行账号
|
||||
prdetail[21] = stcd5;//纳税登记证代码
|
||||
|
||||
prdetail[22] = akont;//统驭科目
|
||||
prdetail[23] = zterm;//付款条件
|
||||
prdetail[24] = zuawa; //排序码
|
||||
prdetail[25] = zwels;//付款方式
|
||||
prdetail[26] = frgrp;//批准组
|
||||
|
||||
//付款冻结
|
||||
if(zahls.equals("X")){
|
||||
prdetail[27] = zahls;
|
||||
}else{
|
||||
prdetail[27] = "";
|
||||
}
|
||||
|
||||
ZOA_FI_CUSTOMER_MAINTAIN po=new ZOA_FI_CUSTOMER_MAINTAIN();
|
||||
String[][] fhz = po.Getexecute(prdetail);
|
||||
if(fhz[0][0].equals("S")){
|
||||
estatus = fhz[0][0];
|
||||
}
|
||||
emessage = fhz[0][1];
|
||||
Document document = DocumentHelper.createDocument();
|
||||
Element xml = document.addElement("xml");
|
||||
Element status = xml.addElement("estatus");
|
||||
status.setText(estatus);
|
||||
Element message = xml.addElement("emessage");
|
||||
message.setText(emessage);
|
||||
Element kunnr_ = xml.addElement("kunnr");
|
||||
kunnr_.setText(null2String(fhz[1][0]));
|
||||
Element bukrs_ = xml.addElement("bukrs");
|
||||
bukrs_.setText(null2String(fhz[1][1]));
|
||||
Element ktokd_ = xml.addElement("ktokd");
|
||||
ktokd_.setText(null2String(fhz[1][2]));
|
||||
Element txt30_ = xml.addElement("txt30");
|
||||
txt30_.setText(null2String(fhz[1][3]));
|
||||
Element anred_ = xml.addElement("anred");
|
||||
anred_.setText(null2String(fhz[1][4]));
|
||||
Element name1_ = xml.addElement("name1");
|
||||
name1_.setText(null2String(fhz[1][5]));
|
||||
Element sortl_ = xml.addElement("sortl");
|
||||
sortl_.setText(null2String(fhz[1][6]));
|
||||
Element telf1_ = xml.addElement("telf1");
|
||||
telf1_.setText(null2String(fhz[1][7]));
|
||||
Element smtp_addr_ = xml.addElement("smtp_addr");
|
||||
smtp_addr_.setText(null2String(fhz[1][8]));
|
||||
Element telf2_ = xml.addElement("telf2");
|
||||
telf2_.setText(null2String(fhz[1][9]));
|
||||
Element telfx_ = xml.addElement("telfx");
|
||||
telfx_.setText(null2String(fhz[1][10]));
|
||||
Element land1_ = xml.addElement("land1");
|
||||
land1_.setText(null2String(fhz[1][11]));
|
||||
Element landx50_ = xml.addElement("landx50");
|
||||
landx50_.setText(null2String(fhz[1][12]));
|
||||
Element bland_ = xml.addElement("bland");
|
||||
bland_.setText(null2String(fhz[1][13]));
|
||||
Element bezei_ = xml.addElement("bezei");
|
||||
bezei_.setText(null2String(fhz[1][14]));
|
||||
Element spras_ = xml.addElement("spras");
|
||||
spras_.setText(null2String(fhz[1][15]));
|
||||
Element sptxt_ = xml.addElement("sptxt");
|
||||
sptxt_.setText(null2String(fhz[1][16]));
|
||||
Element ort01_ = xml.addElement("ort01");
|
||||
ort01_.setText(null2String(fhz[1][17]));
|
||||
Element stras_ = xml.addElement("stras");
|
||||
stras_.setText(null2String(fhz[1][18]));
|
||||
Element pstlz_ = xml.addElement("pstlz");
|
||||
pstlz_.setText(null2String(fhz[1][19]));
|
||||
Element bankl_ = xml.addElement("bankl");
|
||||
bankl_.setText(null2String(fhz[1][20]));
|
||||
Element banka_ = xml.addElement("banka");
|
||||
banka_.setText(null2String(fhz[1][21]));
|
||||
Element banks_ = xml.addElement("banks");
|
||||
banks_.setText(null2String(fhz[1][22]));
|
||||
Element landx_ = xml.addElement("landx");
|
||||
landx_.setText(null2String(fhz[1][23]));
|
||||
Element koinh_ = xml.addElement("koinh");
|
||||
koinh_.setText(null2String(fhz[1][24]));
|
||||
Element stcd5_ = xml.addElement("stcd5");
|
||||
stcd5_.setText(null2String(fhz[1][25]));
|
||||
Element akont_ = xml.addElement("akont");
|
||||
akont_.setText(null2String(fhz[1][26]));
|
||||
Element txt20_ = xml.addElement("txt20");
|
||||
txt20_.setText(null2String(fhz[1][27]));
|
||||
Element zterm_ = xml.addElement("zterm");
|
||||
zterm_.setText(null2String(fhz[1][28]));
|
||||
Element text1_ = xml.addElement("text1");
|
||||
text1_.setText(null2String(fhz[1][29]));
|
||||
Element zuawa_ = xml.addElement("zuawa");
|
||||
zuawa_.setText(null2String(fhz[1][30]));
|
||||
Element ttext_ = xml.addElement("ttext");
|
||||
ttext_.setText(null2String(fhz[1][31]));
|
||||
Element zwels_ = xml.addElement("zwels");
|
||||
zwels_.setText(null2String(fhz[1][32]));
|
||||
Element text2_ = xml.addElement("text2");
|
||||
text2_.setText(null2String(fhz[1][33]));
|
||||
Element frgrp_ = xml.addElement("frgrp");
|
||||
frgrp_.setText(null2String(fhz[1][34]));
|
||||
Element frgrt_ = xml.addElement("frgrt");
|
||||
frgrt_.setText(null2String(fhz[1][35]));
|
||||
Element zahls_ = xml.addElement("zahls");
|
||||
zahls_.setText(null2String(fhz[1][36]));
|
||||
return WeaResult.success(document.asXML());
|
||||
}catch (Exception e){
|
||||
log.error("ZOA_FI_VENDOR_MAINTAIN_CONTROLLER error--" , e);
|
||||
return WeaResult.fail(500, "执行异常", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static String null2String(String s){
|
||||
return s == null ? "" : s;
|
||||
}
|
||||
|
||||
public static String null2String(Object o){
|
||||
return o == null ? "" : o.toString();
|
||||
}
|
||||
|
||||
public static String null2String(String s1,String s2){
|
||||
return s1 == null ? (s2 == null ? "" : s2) : s1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue