1.税控bug修改
This commit is contained in:
parent
4971c8676e
commit
bad162a262
@ -38,6 +38,10 @@
|
||||
|
||||
function createInvoice(){
|
||||
var ros = getCheckedRows(0);
|
||||
if(ros.length==0){
|
||||
alert("请至少选择一条数据!");
|
||||
return;
|
||||
}
|
||||
var jsonArr=[];
|
||||
var json={};
|
||||
for(var i = 0; i < ros.length; i++){
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
//{"true","","Button","返回","返回","returnList()","","","","btn_icon_return",""},
|
||||
{"true","","Button","开发票","开发票","createInvoice()","","","","",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
@ -32,5 +33,36 @@
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmList.jsp", "","_self","");
|
||||
}
|
||||
function createInvoice(){
|
||||
var ros = getCheckedRows(0);
|
||||
if(ros.length==0){
|
||||
alert("请至少选择一条数据!");
|
||||
return;
|
||||
}
|
||||
var jsonArr=[];
|
||||
var json={};
|
||||
for(var i = 0; i < ros.length; i++){
|
||||
var contract_no= getItemValue(0, ros[i], "contract_no");
|
||||
json["contract_no"] =getItemValue(0, ros[i], "contract_no");
|
||||
json["customer_name"] =getItemValue(0, ros[i], "customer_name");
|
||||
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
|
||||
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
|
||||
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
|
||||
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
|
||||
json["telephone"] =getItemValue(0, ros[i], "telephone");
|
||||
json["cert_id"] =getItemValue(0, ros[i], "cert_id");
|
||||
json["tax_ratio"] =getItemValue(0, ros[i], "tax_ratio");
|
||||
json["customer_type"] =getItemValue(0, ros[i], "customer_type");
|
||||
json["plan_list"] =getItemValue(0, ros[i], "plan_list");
|
||||
jsonArr.push(json);
|
||||
json={};
|
||||
}
|
||||
var param = JSON.stringify(jsonArr);
|
||||
param = "InvoiceParam="+param.replace(/,/g,'@')+",fpzl=00,fpzf=00";
|
||||
// alert(param);
|
||||
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice", param);
|
||||
alert(res);
|
||||
reloadSelf();
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -6,6 +6,7 @@
|
||||
dwTemp.Style="1"; //--设置为Grid风格--
|
||||
dwTemp.ReadOnly = "1"; //只读模式
|
||||
dwTemp.setPageSize(20);
|
||||
dwTemp.MultiSelect=true;
|
||||
dwTemp.genHTMLObjectWindow("");
|
||||
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格
|
||||
String sButtons[][] = {
|
||||
@ -13,6 +14,7 @@
|
||||
//{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
|
||||
//{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0,'alert(getRowCount(0))')","","","","btn_icon_delete",""},
|
||||
//{"true","","Button","返回","返回","returnList()","","","","btn_icon_return",""},
|
||||
{"true","","Button","开发票","开发票","createInvoice()","","","","",""},
|
||||
};
|
||||
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
|
||||
<script type="text/javascript">
|
||||
@ -32,5 +34,36 @@
|
||||
function returnList(){
|
||||
AsControl.OpenView("/Tenwa/Core/InvoiceManager/ConfirmInvoice/InvoiceConfirmList.jsp", "","_self","");
|
||||
}
|
||||
function createInvoice(){
|
||||
var ros = getCheckedRows(0);
|
||||
if(ros.length==0){
|
||||
alert("请至少选择一条数据!");
|
||||
return;
|
||||
}
|
||||
var jsonArr=[];
|
||||
var json={};
|
||||
for(var i = 0; i < ros.length; i++){
|
||||
var contract_no= getItemValue(0, ros[i], "contract_no");
|
||||
json["contract_no"] =getItemValue(0, ros[i], "contract_no");
|
||||
json["customer_name"] =getItemValue(0, ros[i], "customer_name");
|
||||
json["invoice_money"] =getItemValue(0, ros[i], "invoice_money");
|
||||
json["tax_type"] =getItemValue(0, ros[i], "tax_type");
|
||||
json["tax_no"] =getItemValue(0, ros[i], "tax_no");
|
||||
json["acc_number"] =getItemValue(0, ros[i], "acc_number");
|
||||
json["telephone"] =getItemValue(0, ros[i], "telephone");
|
||||
json["cert_id"] =getItemValue(0, ros[i], "cert_id");
|
||||
json["tax_ratio"] =getItemValue(0, ros[i], "tax_ratio");
|
||||
json["customer_type"] =getItemValue(0, ros[i], "customer_type");
|
||||
json["plan_list"] =getItemValue(0, ros[i], "plan_list");
|
||||
jsonArr.push(json);
|
||||
json={};
|
||||
}
|
||||
var param = JSON.stringify(jsonArr);
|
||||
param = "InvoiceParam="+param.replace(/,/g,'@')+",fpzl=02,fpzf=00";
|
||||
// alert(param);
|
||||
var res = AsControl.RunJavaMethod("com.tenwa.invoice.IAutokpDo", "invoice", param);
|
||||
alert(res);
|
||||
reloadSelf();
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
@ -67,9 +67,11 @@ public class IAutokpDo {
|
||||
}
|
||||
|
||||
} catch (RemoteException e) {
|
||||
flag = false;
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (ServiceException e) {
|
||||
flag = false;
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -288,30 +290,24 @@ public class IAutokpDo {
|
||||
hztzdh = ele_head.element("HZTZDH").getText();
|
||||
}
|
||||
List<Element> listItems = ele_items.elements();
|
||||
for(Element item : listItems){
|
||||
String mxxh = item.element("MXXH").getText();
|
||||
for(int i=1;i<=listItems.size();i++){
|
||||
String mxxh = listItems.get(i).element("MXXH").getText();
|
||||
String planList = "";
|
||||
String liti_id = "";
|
||||
String taxType = "";
|
||||
String contractNo = "";
|
||||
for(Map<String,String> map :lsm.getValue()){
|
||||
if(mxxh.equals(map.get("MXXH"))){
|
||||
planList = map.get("plan_list");
|
||||
taxType = map.get("tax_no");
|
||||
contractNo = map.get("contract_no");
|
||||
if("01".equals(fpzf)){
|
||||
liti_id = map.get("liti_id");
|
||||
String usql = "update li_invoice_tj_info O set O.status='R' where id='"+liti_id+"'";
|
||||
Sqlca.executeSQL(new SqlObject(usql));
|
||||
}
|
||||
break;
|
||||
}
|
||||
planList = lsm.getValue().get(i).get("plan_list");
|
||||
taxType = lsm.getValue().get(i).get("tax_no");
|
||||
contractNo = lsm.getValue().get(i).get("contract_no");
|
||||
if("01".equals(fpzf)){
|
||||
liti_id = lsm.getValue().get(i).get("liti_id");
|
||||
String usql = "update li_invoice_tj_info O set O.status='R' where id='"+liti_id+"'";
|
||||
Sqlca.executeSQL(new SqlObject(usql));
|
||||
}
|
||||
|
||||
String invoice_money = item.element("JE").getText();
|
||||
String taxRatio = item.element("SLV").getText();
|
||||
String taxMoney = item.element("shuier").getText();
|
||||
String sw_spbm = item.element("sw_spbm").getText();
|
||||
String invoice_money = listItems.get(i).element("JE").getText();
|
||||
String taxRatio = listItems.get(i).element("SLV").getText();
|
||||
String taxMoney = listItems.get(i).element("shuier").getText();
|
||||
String sw_spbm = listItems.get(i).element("sw_spbm").getText();
|
||||
String inputtime = StringFunction.getTodayNow();
|
||||
|
||||
ps.setString(1,contractNo);
|
||||
@ -367,6 +363,7 @@ public class IAutokpDo {
|
||||
Transaction Sqlca = null;
|
||||
Sqlca = Transaction.createTransaction(CacheLoaderFactory.getDataSource());
|
||||
Connection con;
|
||||
|
||||
try {
|
||||
con = Sqlca.getConnection();
|
||||
boolean autoCom = con.getAutoCommit();
|
||||
@ -375,6 +372,8 @@ public class IAutokpDo {
|
||||
}
|
||||
ps = con.prepareStatement(insertSql);
|
||||
Element ele_order = doc.getRootElement().element("Data").element("Order");
|
||||
System.out.println("==============================+++++++++"+doc.getText());
|
||||
System.out.println("=============================="+ele_order.getText());
|
||||
Element ele_head = ele_order.element("Head");
|
||||
Element ele_items = ele_order.element("Items");
|
||||
|
||||
@ -393,25 +392,19 @@ public class IAutokpDo {
|
||||
hztzdh = ele_head.element("HZTZDH").getText();
|
||||
}
|
||||
List<Element> listItems = ele_items.elements();
|
||||
for(Element item : listItems){
|
||||
String mxxh = item.element("MXXH").getText();
|
||||
for(int i=1;i<=listItems.size();i++){
|
||||
String mxxh = listItems.get(i).element("MXXH").getText();
|
||||
String planList = "";
|
||||
String taxType = "";
|
||||
String contractNo = "";
|
||||
String customerName = "";
|
||||
for(Map<String,String> map :lsm.getValue()){
|
||||
if(mxxh.equals(map.get("MXXH"))){
|
||||
planList = map.get("plan_list");
|
||||
taxType = map.get("tax_type");
|
||||
contractNo = map.get("contract_no");
|
||||
customerName = map.get("customer_name");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String invoice_money = item.element("JE").getText();
|
||||
String taxRatio = item.element("SLV").getText();
|
||||
String taxMoney = item.element("shuier").getText();
|
||||
planList = lsm.getValue().get(i).get("plan_list");
|
||||
taxType = lsm.getValue().get(i).get("tax_type");
|
||||
contractNo = lsm.getValue().get(i).get("contract_no");
|
||||
customerName = lsm.getValue().get(i).get("customer_name");
|
||||
String invoice_money = listItems.get(i).element("JE").getText();
|
||||
String taxRatio = listItems.get(i).element("SLV").getText();
|
||||
String taxMoney = listItems.get(i).element("shuier").getText();
|
||||
String inputtime = StringFunction.getTodayNow();
|
||||
|
||||
ps.setString(1,contractNo);
|
||||
|
||||
@ -23,15 +23,12 @@ public class IAutokpXML {
|
||||
|
||||
public Map<String,List<Map<String,String>>> getInvoiceParam (String param){
|
||||
JSONArray array =JSON.parseArray(param);
|
||||
|
||||
System.out.println(array.toString());
|
||||
Map<String,List<Map<String,String>>> map = new HashMap<String,List<Map<String,String>>>();
|
||||
List<Map<String,String>> ls = new ArrayList<Map<String,String>>();
|
||||
|
||||
for(int i=0;i<array.size();i++){
|
||||
JSONObject obj= (JSONObject) array.get(i);
|
||||
String contract_no= obj.getString("contract_no");
|
||||
Map<String,String> mapi = new HashMap<>();
|
||||
mapi.put("MXXH",i+1+"");
|
||||
mapi.put("tax_type", obj.getString("tax_type"));
|
||||
mapi.put("tax_no", obj.getString("tax_no"));
|
||||
mapi.put("invoice_money",obj.getString("invoice_money"));
|
||||
@ -43,15 +40,11 @@ public class IAutokpXML {
|
||||
mapi.put("customer_type",obj.getString("customer_type"));
|
||||
mapi.put("plan_list",obj.getString("plan_list"));
|
||||
mapi.put("contract_no", obj.getString("contract_no"));
|
||||
if(map.containsKey(contract_no)){
|
||||
map.get(contract_no).add(mapi);
|
||||
}else{
|
||||
ls.add(mapi);
|
||||
map.put(contract_no, ls);
|
||||
ls.clear();
|
||||
if(!map.containsKey(contract_no)){
|
||||
map.put(contract_no,new ArrayList<Map<String,String>>());
|
||||
}
|
||||
map.get(contract_no).add(mapi);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
public Map<String,List<Map<String,String>>> getRedbackInvoiceParam (String param){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user