|
@@ -178,6 +178,7 @@ public class VoucherAdd {
|
|
|
List<Map<String,Object>> entryDebit = new ArrayList<>(); //voucher > debit > entryDebit
|
|
|
|
|
|
String bm = map.get("申请人所属部门").toString();
|
|
|
+
|
|
|
String sqr = map.get("申请人").toString();
|
|
|
String[] a = sqr.split("提交的");
|
|
|
if(a.length > 1){
|
|
@@ -295,7 +296,7 @@ public class VoucherAdd {
|
|
|
BigDecimal jinE = new BigDecimal(object.get("未税金额").toString());
|
|
|
BigDecimal sl = new BigDecimal(object.get("次数").toString());
|
|
|
|
|
|
- if(object.get("税额") != null){
|
|
|
+ if(object.get("税额") != null && Double.valueOf(object.get("税额").toString()) > 0){
|
|
|
BigDecimal se = new BigDecimal(object.get("税额").toString());
|
|
|
Map<String,Object> entryDebitMap = new HashMap<>(); //voucher > debit > entryDebit > entryDebitMap
|
|
|
|
|
@@ -399,7 +400,7 @@ public class VoucherAdd {
|
|
|
BigDecimal jinE = new BigDecimal(object.get("未税金额").toString());
|
|
|
BigDecimal sl = new BigDecimal(object.get("次数").toString());
|
|
|
|
|
|
- if(object.get("税额") != null){
|
|
|
+ if(object.get("税额") != null && Double.valueOf(object.get("税额").toString()) > 0){
|
|
|
BigDecimal se = new BigDecimal(object.get("税额").toString());
|
|
|
Map<String,Object> entryDebitMap = new HashMap<>(); //voucher > debit > entryDebit > entryDebitMap
|
|
|
|
|
@@ -538,7 +539,7 @@ public class VoucherAdd {
|
|
|
try {
|
|
|
JSONObject record = voucherService.add(jsonBody, biz_id,type);
|
|
|
logger.info(record.toString());
|
|
|
- return record.toString();
|
|
|
+ return "正常:"+record.toString();
|
|
|
} catch (OpenAPIException e) {
|
|
|
e.printStackTrace();
|
|
|
StringWriter sw = new StringWriter();
|
|
@@ -547,7 +548,7 @@ public class VoucherAdd {
|
|
|
if(StringUtils.isNullOrEmpty(str)){
|
|
|
str = "数据异常,未进行同步";
|
|
|
}
|
|
|
- return str;
|
|
|
+ return "数据异常:"+str;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -575,7 +576,7 @@ public class VoucherAdd {
|
|
|
*/
|
|
|
public static String getCode(String dept,String type){
|
|
|
|
|
|
- if(dept.equals("营销设计中心-销售部")){
|
|
|
+ if(dept.contains("营销设计中心-销售部")){
|
|
|
//OA差旅报销
|
|
|
if("飞机、火车、出租车、轮渡".contains(type)){
|
|
|
return "6601070101";
|
|
@@ -595,12 +596,24 @@ public class VoucherAdd {
|
|
|
return "6601070102";
|
|
|
}
|
|
|
//OA其他报销科目
|
|
|
- else if("零星采买、文件打印费".contains(type)){
|
|
|
+ else if("办公费".contains(type)){
|
|
|
return "660110";
|
|
|
- }else if("展会宣传、展位布置".contains(type)){
|
|
|
+ }else if("广告宣传费".contains(type)){
|
|
|
return "66011802";
|
|
|
+ }else if("广告物料费".contains(type)){
|
|
|
+ return "66011803";
|
|
|
}else if("邮寄/物流".contains(type)){
|
|
|
return "66012003";
|
|
|
+ }else if("交际应酬费".contains(type)){
|
|
|
+ return "660106";
|
|
|
+ }else if("样品费".contains(type)){
|
|
|
+ return "660116";
|
|
|
+ }else if("市场拓展费".contains(type)){
|
|
|
+ return "660118";
|
|
|
+ }else if("公出打车费".contains(type)){
|
|
|
+ return "6601070102";
|
|
|
+ }else if("设计费".contains(type)){
|
|
|
+ return "66010903";
|
|
|
}else if("全员聚餐费".contains(type)){
|
|
|
return "66010205";
|
|
|
}else if("其他费用".contains(type)){
|
|
@@ -613,7 +626,7 @@ public class VoucherAdd {
|
|
|
else{
|
|
|
return "66010208";
|
|
|
}
|
|
|
- }else if(dept.equals("营销设计中心-设计部")){
|
|
|
+ }else if(dept.contains("营销设计中心-设计部")){
|
|
|
//OA差旅报销
|
|
|
if("飞机、火车、出租车、轮渡".contains(type)){
|
|
|
return "66040701";
|
|
@@ -635,23 +648,31 @@ public class VoucherAdd {
|
|
|
//OA其他报销科目
|
|
|
else if("零星采买、文件打印费".contains(type)){
|
|
|
return "660423";
|
|
|
+ }else if("办公费".contains(type)){
|
|
|
+ return "660423";
|
|
|
}else if("展会宣传、展位布置".contains(type)){
|
|
|
return "66041801";
|
|
|
}else if("邮寄/物流".contains(type)){
|
|
|
return "66042003";
|
|
|
}else if("全员聚餐费".contains(type)){
|
|
|
return "66040205";
|
|
|
+ }else if("交际应酬费".contains(type)){
|
|
|
+ return "660406";
|
|
|
}else if("其他费用".contains(type)){
|
|
|
return "66040113";
|
|
|
}else if("公出打车费".contains(type)){
|
|
|
return "66040701";
|
|
|
}else if("移动开发费".contains(type)){
|
|
|
return "66042001";
|
|
|
+ }else if("样品费".contains(type)){
|
|
|
+ return "660416";
|
|
|
+ }else if("市场拓展费".contains(type)){
|
|
|
+ return "66041801";
|
|
|
}
|
|
|
else{//OA差旅报销-其他
|
|
|
return "66040113";
|
|
|
}
|
|
|
- }else if(dept.equals("营销设计中心-项目部") || dept.equals("营销设计中心-市场部")){
|
|
|
+ }else if(dept.contains("营销设计中心-项目部") || dept.contains("营销设计中心-市场部")){
|
|
|
//OA差旅报销
|
|
|
if("飞机、火车、出租车、轮渡".contains(type)){
|
|
|
return "6601070101";
|
|
@@ -661,9 +682,9 @@ public class VoucherAdd {
|
|
|
return "6601070104";
|
|
|
}else if("餐饮费".contains(type)){
|
|
|
return "66010201";
|
|
|
- }else if("宴客费".contains(type)){
|
|
|
+ }else if("宴客费、交际应酬费".contains(type)){
|
|
|
return "660106";
|
|
|
- }else if("误餐补贴".contains(type)){
|
|
|
+ }else if("误餐补贴、出差补助".contains(type)){
|
|
|
return "6601070105";
|
|
|
}
|
|
|
//OA私车公用报销
|
|
@@ -671,20 +692,28 @@ public class VoucherAdd {
|
|
|
return "6601070102";
|
|
|
}
|
|
|
//OA其他报销科目
|
|
|
- else if("零星采买、文件打印费".contains(type)){
|
|
|
+ else if("零星采买、文件打印费、办公费".contains(type)){
|
|
|
return "660110";
|
|
|
- }else if("展会宣传、展位布置".contains(type)){
|
|
|
+ }else if("展会宣传、展位布置、广告宣传费".contains(type)){
|
|
|
return "66011802";
|
|
|
+ }else if("广告物料费".contains(type)){
|
|
|
+ return "66011803";
|
|
|
}else if("邮寄/物流".contains(type)){
|
|
|
return "66012003";
|
|
|
}else if("全员聚餐费".contains(type)){
|
|
|
return "66010205";
|
|
|
+ }else if("交际应酬费".contains(type)){
|
|
|
+ return "660106";
|
|
|
}else if("其他费用".contains(type)){
|
|
|
return "660124";
|
|
|
}else if("公出打车费".contains(type)){
|
|
|
return "6601070102";
|
|
|
}else if("移动开发费".contains(type)){
|
|
|
return "66012001";
|
|
|
+ }else if("样品费".contains(type)){
|
|
|
+ return "660116";
|
|
|
+ }else if("市场拓展费".contains(type)){
|
|
|
+ return "660118";
|
|
|
}
|
|
|
else{//OA差旅报销-其他
|
|
|
return "66010208";
|
|
@@ -717,12 +746,18 @@ public class VoucherAdd {
|
|
|
return "66022003";
|
|
|
}else if("全员聚餐费".contains(type)){
|
|
|
return "66020205";
|
|
|
+ }else if("交际应酬费".contains(type)){
|
|
|
+ return "660206";
|
|
|
}else if("其他费用".contains(type)){
|
|
|
return "66020208";
|
|
|
}else if("公出打车费".contains(type)){
|
|
|
return "66020701";
|
|
|
+ }else if("新品开发费".contains(type)){
|
|
|
+ return "660217";
|
|
|
}else if("移动开发费".contains(type)){
|
|
|
return "66021801";
|
|
|
+ }else if("样品费".contains(type)){
|
|
|
+ return "660216";
|
|
|
}
|
|
|
else{//OA差旅报销-其他
|
|
|
return "66020706";
|
|
@@ -738,8 +773,8 @@ public class VoucherAdd {
|
|
|
*/
|
|
|
public static String getCodeSD(String dept,String type){
|
|
|
|
|
|
- if(dept.equals("营销设计中心-总经理室") || dept.equals("营销设计中心-采购部") || dept.equals("共享中心-财务部")
|
|
|
- || dept.equals("共享中心-人事行政部")){
|
|
|
+ if(dept.contains("营销设计中心-总经理室") || dept.contains("营销设计中心-采购部") || dept.contains("共享中心-财务部")
|
|
|
+ || dept.contains("共享中心-人事行政部")){
|
|
|
|
|
|
//OA差旅报销
|
|
|
if("飞机、火车、出租车、租车费、轮渡".contains(type)){
|