feat:企业进项发票crud
This commit is contained in:
parent
be905735c4
commit
193261e47f
17
crm/pom.xml
17
crm/pom.xml
|
@ -46,6 +46,12 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
|
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.generator</groupId>
|
||||||
|
<artifactId>mybatis-generator-core</artifactId>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -101,6 +107,17 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.0.0-M5</version>
|
||||||
|
<configuration>
|
||||||
|
<argLine>
|
||||||
|
-Djavax.xml.accessExternalDTD=all
|
||||||
|
</argLine>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!--拷贝依赖 copy-dependencies-->
|
<!--拷贝依赖 copy-dependencies-->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.kakarote.crm.entity.PO;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
//zzzzzzzzzz
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("wk_crm_qyjxfp")
|
||||||
|
@ApiModel(value="CrmQyjxfp对象", description="企业进项发票信息")
|
||||||
|
|
||||||
|
public class CrmQyjxfp implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "qyjxfp_id", type = IdType.AUTO)
|
||||||
|
/**
|
||||||
|
* 企业进项发票信息Id primary key
|
||||||
|
*/
|
||||||
|
private Integer qyjxfpId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年度
|
||||||
|
*/
|
||||||
|
private String nd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 不含税金额
|
||||||
|
*/
|
||||||
|
private String jxBhsje;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进税金额
|
||||||
|
*/
|
||||||
|
private String jxSe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进项价税合计
|
||||||
|
*/
|
||||||
|
private String jxJshj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社会信用代码
|
||||||
|
*/
|
||||||
|
private String shxydm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.kakarote.crm.mapper;
|
||||||
|
|
||||||
|
import com.kakarote.core.servlet.BaseMapper;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjxfp;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CrmQyjxfpMapper extends BaseMapper<CrmQyjxfp> {
|
||||||
|
|
||||||
|
List<CrmQyjbxx> selectByExample(CrmQyjxfp example);
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.kakarote.crm.mapper.CrmQyjxfpMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.kakarote.crm.entity.PO.CrmQyjxfp">
|
||||||
|
<result column="qyjxfp_id" jdbcType="INTEGER" property="qyjxfpId" />
|
||||||
|
<result column="nd" jdbcType="VARCHAR" property="nd" />
|
||||||
|
<result column="jx_bhsje" jdbcType="VARCHAR" property="jxBhsje" />
|
||||||
|
<result column="jx_se" jdbcType="VARCHAR" property="jxSe" />
|
||||||
|
<result column="jx_jshj" jdbcType="VARCHAR" property="jxJshj" />
|
||||||
|
<result column="shxydm" jdbcType="VARCHAR" property="shxydm" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="creat_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
|
@ -1,6 +1,6 @@
|
||||||
package com.kakarote.crm.service;
|
package com.kakarote.crm.service;
|
||||||
|
|
||||||
|
//借鉴
|
||||||
import com.kakarote.core.servlet.BaseService;
|
import com.kakarote.core.servlet.BaseService;
|
||||||
import com.kakarote.crm.entity.BO.QyjbxxBo;
|
import com.kakarote.crm.entity.BO.QyjbxxBo;
|
||||||
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.kakarote.crm.service;
|
||||||
|
|
||||||
|
import com.kakarote.core.servlet.BaseService;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjxfp;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
public interface ICrmQyjxfpService extends BaseService<CrmQyjxfp> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id获得企业进项发票信息
|
||||||
|
*/
|
||||||
|
CrmQyjxfp getQyjxfp(Integer qyjxfpId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入企业进项发票基本信息
|
||||||
|
*/
|
||||||
|
int insertQyjxfp(CrmQyjxfp crmQyjxfp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新企业进项发票基本信息
|
||||||
|
* @param crmQyjxfp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateQyjxfp(CrmQyjxfp crmQyjxfp);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除企业进项发票基本信息
|
||||||
|
* @param qyjxfpId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteQyjxfp(String qyjxfpId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业进项发票基本信息列表
|
||||||
|
* @param crmQyjxfp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CrmQyjxfp> getQyjxfpList(CrmQyjxfp crmQyjxfp);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
package com.kakarote.crm.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.kakarote.core.servlet.BaseServiceImpl;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjbxx;
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjxfp;
|
||||||
|
import com.kakarote.crm.mapper.CrmQyjxfpMapper;
|
||||||
|
import com.kakarote.crm.service.ICrmQyjxfpService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CrmQyjxfpServiceImpl extends BaseServiceImpl<CrmQyjxfpMapper, CrmQyjxfp> implements ICrmQyjxfpService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CrmQyjxfpMapper crmQyjxfpMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询企业进项发票
|
||||||
|
*
|
||||||
|
* @param qyjxfpId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CrmQyjxfp getQyjxfp(Integer qyjxfpId) {
|
||||||
|
return crmQyjxfpMapper.selectById(qyjxfpId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入企业进项发票
|
||||||
|
*
|
||||||
|
* @param crmQyjxfp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertQyjxfp(CrmQyjxfp crmQyjxfp) {
|
||||||
|
return crmQyjxfpMapper.insert(crmQyjxfp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新企业进项发票
|
||||||
|
*
|
||||||
|
* @param crmQyjxfp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateQyjxfp(CrmQyjxfp crmQyjxfp) {
|
||||||
|
return crmQyjxfpMapper.updateById(crmQyjxfp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除企业进项发票
|
||||||
|
*
|
||||||
|
* @param qyjxfpId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteQyjxfp(String qyjxfpId) {
|
||||||
|
return crmQyjxfpMapper.deleteById(qyjxfpId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询企业进项发票列表
|
||||||
|
*
|
||||||
|
* @param crmQyjxfp
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<CrmQyjxfp> getQyjxfpList(CrmQyjxfp crmQyjxfp) {
|
||||||
|
QueryWrapper<CrmQyjxfp> crmQyjxfpQueryWrapper = new QueryWrapper<>();
|
||||||
|
return crmQyjxfpMapper.selectList(crmQyjxfpQueryWrapper);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.kakarote.crm;
|
||||||
|
|
||||||
|
import com.kakarote.crm.entity.PO.CrmQyjxfp;
|
||||||
|
import com.kakarote.crm.service.ICrmQyjxfpService;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
|
@RunWith(SpringRunner.class)
|
||||||
|
@SpringBootTest
|
||||||
|
public class testQyjxfp {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ICrmQyjxfpService iService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test() {
|
||||||
|
CrmQyjxfp crmQyjxfp = new CrmQyjxfp();
|
||||||
|
crmQyjxfp.setQyjxfpId(1);
|
||||||
|
crmQyjxfp.setNd("123");
|
||||||
|
crmQyjxfp.setJxSe("asd");
|
||||||
|
crmQyjxfp.setJxJshj("asdfg");
|
||||||
|
crmQyjxfp.setJxBhsje("qwert");
|
||||||
|
crmQyjxfp.setShxydm("qqqq");
|
||||||
|
crmQyjxfp.setCreateBy("zxc");
|
||||||
|
crmQyjxfp.setUpdateBy("zxc");
|
||||||
|
crmQyjxfp.setUpdateTime(new Date());
|
||||||
|
crmQyjxfp.setCreateTime(new Date());
|
||||||
|
System.out.println(crmQyjxfp);
|
||||||
|
iService.insertQyjxfp(crmQyjxfp);
|
||||||
|
System.out.println(iService.getQyjxfp(1));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue