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