nuonuo发票插件调用
This commit is contained in:
parent
f4cfdfd4c7
commit
792c2671e7
|
@ -178,7 +178,7 @@ public class NuoNuoServiceImpl extends BaseService<NuoNuoEntity, String> impleme
|
||||||
// 创建expenseList JSONArray
|
// 创建expenseList JSONArray
|
||||||
JSONObject expenseItem = new JSONObject();
|
JSONObject expenseItem = new JSONObject();
|
||||||
expenseItem.put("materialCode", "");
|
expenseItem.put("materialCode", "");
|
||||||
expenseItem.put("invoiceno", detailArray.getJSONObject(i).getString("field0150"));
|
expenseItem.put("invoiceno", mainData.getString("field0150"));
|
||||||
expenseItem.put("sklx", "");
|
expenseItem.put("sklx", "");
|
||||||
expenseItem.put("buysellflag", "1");
|
expenseItem.put("buysellflag", "1");
|
||||||
expenseItem.put("szxm", "");
|
expenseItem.put("szxm", "");
|
||||||
|
@ -195,7 +195,11 @@ public class NuoNuoServiceImpl extends BaseService<NuoNuoEntity, String> impleme
|
||||||
expenseItem.put("quantity", detailArray.getJSONObject(i).getString("field0157"));
|
expenseItem.put("quantity", detailArray.getJSONObject(i).getString("field0157"));
|
||||||
expenseItem.put("localAmount", detailArray.getJSONObject(i).getString("field0149"));
|
expenseItem.put("localAmount", detailArray.getJSONObject(i).getString("field0149"));
|
||||||
expenseItem.put("detailId", detailArray.getJSONObject(i).getString("field0192"));
|
expenseItem.put("detailId", detailArray.getJSONObject(i).getString("field0192"));
|
||||||
expenseItem.put("taxRate", detailArray.getJSONObject(i).getString("field0156"));
|
if(detailArray.getJSONObject(i).getString("field0156") != null && !"".equals(detailArray.getJSONObject(i).getString("field0156"))){
|
||||||
|
BigDecimal value = detailArray.getJSONObject(i).getBigDecimal("field0156");
|
||||||
|
int result = value.multiply(BigDecimal.valueOf(100)).intValue(); // 结果:5
|
||||||
|
expenseItem.put("taxRate", String.valueOf(result));
|
||||||
|
}
|
||||||
//expenseItem.put("kplx", "");
|
//expenseItem.put("kplx", "");
|
||||||
//expenseItem.put("areacl", "");
|
//expenseItem.put("areacl", "");
|
||||||
expenseItem.put("subjectCode", "1122");
|
expenseItem.put("subjectCode", "1122");
|
||||||
|
@ -709,7 +713,7 @@ public class NuoNuoServiceImpl extends BaseService<NuoNuoEntity, String> impleme
|
||||||
// 创建expenseList JSONArray
|
// 创建expenseList JSONArray
|
||||||
JSONObject expenseItem = new JSONObject();
|
JSONObject expenseItem = new JSONObject();
|
||||||
expenseItem.put("materialCode", "");
|
expenseItem.put("materialCode", "");
|
||||||
expenseItem.put("invoiceno", detailArray.getJSONObject(i).getString("field0150"));
|
expenseItem.put("invoiceno", mainData.getString("field0150"));
|
||||||
expenseItem.put("sklx", "");
|
expenseItem.put("sklx", "");
|
||||||
expenseItem.put("buysellflag", "1");
|
expenseItem.put("buysellflag", "1");
|
||||||
expenseItem.put("szxm", "");
|
expenseItem.put("szxm", "");
|
||||||
|
@ -726,7 +730,11 @@ public class NuoNuoServiceImpl extends BaseService<NuoNuoEntity, String> impleme
|
||||||
expenseItem.put("quantity", detailArray.getJSONObject(i).getString("field0157"));
|
expenseItem.put("quantity", detailArray.getJSONObject(i).getString("field0157"));
|
||||||
expenseItem.put("localAmount", detailArray.getJSONObject(i).getString("field0149") != null ? detailArray.getJSONObject(i).getBigDecimal("field0149") : "0");
|
expenseItem.put("localAmount", detailArray.getJSONObject(i).getString("field0149") != null ? detailArray.getJSONObject(i).getBigDecimal("field0149") : "0");
|
||||||
expenseItem.put("detailId", detailArray.getJSONObject(i).getString("field0197"));
|
expenseItem.put("detailId", detailArray.getJSONObject(i).getString("field0197"));
|
||||||
expenseItem.put("taxRate", detailArray.getJSONObject(i).getString("field0156"));
|
if(detailArray.getJSONObject(i).getString("field0156") != null && !"".equals(detailArray.getJSONObject(i).getString("field0156"))){
|
||||||
|
BigDecimal value = detailArray.getJSONObject(i).getBigDecimal("field0156");
|
||||||
|
int result = value.multiply(BigDecimal.valueOf(100)).intValue(); // 结果:5
|
||||||
|
expenseItem.put("taxRate", String.valueOf(result));
|
||||||
|
}
|
||||||
//expenseItem.put("kplx", "");
|
//expenseItem.put("kplx", "");
|
||||||
//expenseItem.put("areacl", "");
|
//expenseItem.put("areacl", "");
|
||||||
expenseItem.put("subjectCode", "1122");
|
expenseItem.put("subjectCode", "1122");
|
||||||
|
|
|
@ -245,6 +245,8 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
}
|
}
|
||||||
//表单模版ID
|
//表单模版ID
|
||||||
String formAppId = requestData.getString("formAppId");
|
String formAppId = requestData.getString("formAppId");
|
||||||
|
//表单模版ID
|
||||||
|
String affairId = requestData.getString("affairId");
|
||||||
//事件事件类型
|
//事件事件类型
|
||||||
String eventType = requestData.getString("eventType");
|
String eventType = requestData.getString("eventType");
|
||||||
//数据源编码
|
//数据源编码
|
||||||
|
@ -326,7 +328,7 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace {
|
||||||
object.put("formApp",formAppId);
|
object.put("formApp",formAppId);
|
||||||
object.put("eventType",eventType);
|
object.put("eventType",eventType);
|
||||||
object.put("businessDataStr",seeYonBean.toJSONString());
|
object.put("businessDataStr",seeYonBean.toJSONString());
|
||||||
object.put("affairId","");
|
object.put("affairId",affairId);
|
||||||
object.put("summaryId",requestData.getString("summaryId"));
|
object.put("summaryId",requestData.getString("summaryId"));
|
||||||
object.put("currentActivityId","");
|
object.put("currentActivityId","");
|
||||||
object.put("id",forMainId);
|
object.put("id",forMainId);
|
||||||
|
|
Loading…
Reference in New Issue