diff --git a/src/main/java/com/gszc/controller/CountController.java b/src/main/java/com/gszc/controller/CountController.java index 7f3bb55..51f3be0 100644 --- a/src/main/java/com/gszc/controller/CountController.java +++ b/src/main/java/com/gszc/controller/CountController.java @@ -25,13 +25,19 @@ public class CountController { /** * 增值税 + * proprietorship 个人独资 + * limit 有限责任公司 + * partner 合伙人企业 + * individual 个体工商户 * + * smallScale 小规模 + * taxpayer 一般纳税人 * @return */ @PostMapping("/VATCount") @ApiOperation(value = "增值税计算器", notes = "增值税计算器") @ApiImplicitParams({ - @ApiImplicitParam(name = "companyType", value = "公司类型(1-有限公司 2-个人独资企业 3-合伙人企业 4-个体工商户)", dataType = "string", paramType = "query"), + @ApiImplicitParam(name = "companyType", value = "公司类型(limit-有限公司 proprietorship-个人独资企业 partner-合伙人企业 individual-个体工商户)", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "invoiceType", value = "开票类型(1-普通发票 2-专用发票)", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "taxType", value = "纳税性质,个体工商户不必填写(1-小规模纳税人 2-一般纳税人(服务业)3-一般纳税人(商业)", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "oneMoney", value = "第一季度开票金额", dataType = "string", paramType = "query"), diff --git a/src/main/java/com/gszc/service/CountService.java b/src/main/java/com/gszc/service/CountService.java index 24493fb..56fd841 100644 --- a/src/main/java/com/gszc/service/CountService.java +++ b/src/main/java/com/gszc/service/CountService.java @@ -13,12 +13,12 @@ public class CountService { JSONObject result = new JSONObject(); switch (companyType){ - case "1": //有限公司 - case "2": //个人独资企业 - case "3": //合伙人企业 + case "limit": //有限公司 + case "proprietorship": //个人独资企业 + case "partner": //合伙人企业 result = VATCountDetail(invoiceType,taxType, money); break; - case "4": //个体工商户,纳税性质只有小规模纳税人 + case "individual": //个体工商户,纳税性质只有小规模纳税人 result = VATCountDetail(invoiceType,"1", money); break; default: diff --git a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java index aa0930c..2980f12 100644 --- a/src/main/java/com/gszc/service/impl/CustomServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/CustomServiceImpl.java @@ -103,7 +103,7 @@ public class CustomServiceImpl extends ServiceImpl impleme public JSONArray customList(String userId,String type){ JSONArray jsonArray = new JSONArray(); - Wrapper miniUserId = new EntityWrapper().eq("mini_user_id", userId); + Wrapper miniUserId = new EntityWrapper().eq("mini_user_id", userId).ne("status_code","logout"); if(null==type){ }else if(type.equals("todo")){ @@ -115,7 +115,7 @@ public class CustomServiceImpl extends ServiceImpl impleme } List customs = customMapper.selectList(miniUserId); for(Custom custom:customs){ - List customSupports = customSupportMapper.selectList(new EntityWrapper().eq("custom_id", custom.getId()).ne("status_code","logout")); + List customSupports = customSupportMapper.selectList(new EntityWrapper().eq("custom_id", custom.getId())); JSONObject jsonObject = new JSONObject(); jsonObject.put("custom",custom); jsonObject.put("customSupports",customSupports); diff --git a/src/main/java/com/gszc/service/impl/InvoiceServiceImpl.java b/src/main/java/com/gszc/service/impl/InvoiceServiceImpl.java index 0941a2b..2b80d39 100644 --- a/src/main/java/com/gszc/service/impl/InvoiceServiceImpl.java +++ b/src/main/java/com/gszc/service/impl/InvoiceServiceImpl.java @@ -69,7 +69,7 @@ public class InvoiceServiceImpl extends ServiceImpl impl String invoiceType; String taxType; - JSONObject jsonObject = countService.VATCount("4", "1", "1", money.doubleValue()); + JSONObject jsonObject = countService.VATCount(custom.getRegisterType(), invoice.getInvoiceType(), "1", money.doubleValue()); BigDecimal money1 = jsonObject.getBigDecimal("money"); invoice.setTaxMoney(money1.toString()); } catch (Exception e) {