ky 6 years ago
parent 93a89c902b
commit 4f49c52463

@ -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"),

@ -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:

@ -103,7 +103,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
public JSONArray customList(String userId,String type){
JSONArray jsonArray = new JSONArray();
Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().eq("mini_user_id", userId);
Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().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<CustomMapper, Custom> impleme
}
List<Custom> customs = customMapper.selectList(miniUserId);
for(Custom custom:customs){
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", custom.getId()).ne("status_code","logout"));
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", custom.getId()));
JSONObject jsonObject = new JSONObject();
jsonObject.put("custom",custom);
jsonObject.put("customSupports",customSupports);

@ -69,7 +69,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> 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) {

Loading…
Cancel
Save