Commit dcdfc9ea by 谢明辉

Merge branch 'develop' of http://192.168.9.26/platform/finance_serv into develop

2 parents 3c3cb712 dfbca4b0
Showing 71 changed files with 3402 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vion</groupId>
<artifactId>financial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>FinancialSystem</name>
<description>Financial System project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- <dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency> -->
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency> -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.3-1102-jdbc41</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.vion.financial;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@MapperScan(basePackages="com.vion.financial.mapper")
@ComponentScan(basePackages="com.vion.financial")
public class FinancialSystemApplication {
public static void main(String[] args) {
SpringApplication.run(FinancialSystemApplication.class, args);
}
}
package com.vion.financial.controller;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.vion.financial.entity.Appendix;
import com.vion.financial.service.AppendixService;
import com.vion.financial.vo.AppendixVo;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.SuccessCode;
@RestController
public class AppendixController extends BaseController{
@Autowired
SuccessCode successCode;
@Autowired
FailCode failCode;
@Resource
AppendixService AppendixService;
@PostMapping(value="/{contract_unid}/upload/appendixes")
@ResponseBody
public Object upload(AppendixVo appendixVo) {
try {
Appendix appendix = null;
List<Appendix> list=new ArrayList<Appendix> ();
MultipartFile[] appendix_files=appendixVo.getAppendix_files();
for (MultipartFile multipartFile : appendix_files) {
appendix = new Appendix();
appendix.setAppendix_name(multipartFile.getOriginalFilename());
appendix.setBusiness_table(appendixVo.getBusiness_table());
String suffix = appendix.getAppendix_name().substring(appendix.getAppendix_name().lastIndexOf(".") + 1);
appendix.setAppendix_type(suffix);
appendix.setAppendix_url("E:\\"+multipartFile.getOriginalFilename());
AppendixService.addAppendix(appendix);
list.add(appendix);
InputStream inputStream = multipartFile.getInputStream();
File file = new File("E:\\"+multipartFile.getOriginalFilename());
OutputStream os = new FileOutputStream(file);
byte[] read = new byte[2048];
int off=0;
while((off=inputStream.read(read)) != -1) {
os.write(read);
}
os.flush();
os.close();
inputStream.close();
}
return list;
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("上传异常");
return failCode;
}
}
}
package com.vion.financial.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping(value="/api/v1/financial/contracts")
public class BaseController {
}
package com.vion.financial.controller;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.ContractService;
import com.vion.financial.vo.ContractVo;
@RestController
public class ContractController extends BaseController {
@Resource
ContractService contractService;
@PostMapping
@ResponseBody
public Object addContract(@RequestBody ContractVo vontractVo) {
return contractService.addOne(vontractVo);
}
@GetMapping(value="/{contract_unid}")
@ResponseBody
public Object queryOne(@PathVariable String contract_unid) {
return contractService.queryOne(contract_unid);
}
@PutMapping(value="/{contract_unid}")
@ResponseBody
public Object updateOne(@PathVariable String contract_unid , @RequestBody ContractVo vontractVo) {
vontractVo.setContract_unid(contract_unid);
return contractService.updateOne(vontractVo);
}
@DeleteMapping(value="/{contract_unid}")
@ResponseBody
public Object deleteOne(@PathVariable String contract_unid ) {
return contractService.deleteOne(contract_unid);
}
}
package com.vion.financial.controller;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.DeliverGoodsService;
import com.vion.financial.service.ReturnInfoService;
import com.vion.financial.vo.DeliverGoodsVo;
@RestController
public class DeliverGoodsController extends BaseController{
@Resource
DeliverGoodsService deliverGoodsService;
@GetMapping("/{contract_unid}/delivers")
@ResponseBody
public Object queryDeliverInfo(@PathVariable String contract_unid) {
return deliverGoodsService.queryDeliverGoods(contract_unid);
}
@PostMapping("/{contract_unid}/delivers")
@ResponseBody
public Object addDeliverInfo(@RequestBody DeliverGoodsVo deliverGoodsVo,@PathVariable String contract_unid) {
return deliverGoodsService.addDeliverGoods(deliverGoodsVo, contract_unid);
}
@PutMapping("/{contract_unid}/delivers")
@ResponseBody
public Object updateDeliverInf(@RequestBody DeliverGoodsVo deliverGoodsVo,@PathVariable String contract_unid) {
return deliverGoodsService.updateDeliverGoods(deliverGoodsVo, contract_unid);
}
}
package com.vion.financial.controller;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.PaymentAgreeService;
import com.vion.financial.vo.PaymentAgreeVo;
@RestController
public class PaymentAgreeController extends BaseController{
@Resource
PaymentAgreeService PaymentAgreeService;
@GetMapping("/{contract_unid}/payments")
@ResponseBody
public Object queryPaymentInfo(@PathVariable String contract_unid) {
return PaymentAgreeService.queryPaymentAgree(contract_unid);
}
@PostMapping("/{contract_unid}/payments")
@ResponseBody
public Object addPaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
return PaymentAgreeService.addPaymentAgree(paymentAgreeVo,contract_unid);
}
@PutMapping("/{contract_unid}/payments")
@ResponseBody
public Object updatePaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
return PaymentAgreeService.updatePaymentAgree(paymentAgreeVo,contract_unid);
}
@DeleteMapping("/{contract_unid}/payments")
@ResponseBody
public Object deletePaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
return PaymentAgreeService.deletePaymentAgree(paymentAgreeVo, contract_unid);
}
}
package com.vion.financial.controller;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.model.Person;
import com.vion.financial.service.imp.PersonServiceImp;
@RestController
@RequestMapping("/financial")
public class PersonController {
@Autowired
PersonServiceImp personServiceImp;
@RequestMapping(value={"/query"}, method=RequestMethod.GET)
public Person query(String id) {
Person person=personServiceImp.query(Integer.parseInt(id));
return person;
}
@RequestMapping(value="/getAll",method=RequestMethod.GET)
public ArrayList getAll() {
ArrayList arrayList=personServiceImp.getAll();
return arrayList;
}
@RequestMapping(value="/addPerson",method=RequestMethod.PUT)
public Object addPerson(Person person) {
Object o=personServiceImp.addPerson(person);
return o;
}
@RequestMapping(value="/update",method=RequestMethod.POST)
public Object update(Person person) {
Object o=personServiceImp.update(person);
return o;
}
@RequestMapping(value="/delete", method=RequestMethod.DELETE)
public Object delete(String id) {
Object o=personServiceImp.delete(Integer.parseInt(id));
return o;
}
}
package com.vion.financial.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.ReceiptService;
import com.vion.financial.vo.ReceiptVo;
@RestController
public class ReceiptController extends BaseController{
@Autowired
ReceiptService receiptService;
@PostMapping("/{contract_unid}/receipts")
@ResponseBody
public Object addReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
return receiptService.addReceipt(receiptVo, contract_unid);
}
@GetMapping("/{contract_unid}/receipts")
@ResponseBody
public Object queryReceiptInfo(@PathVariable String contract_unid) {
return receiptService.queryReceipt(contract_unid);
}
@PutMapping("/{contract_unid}/receipts")
@ResponseBody
public Object updateReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
return receiptService.updateReceipt(receiptVo, contract_unid);
}
@DeleteMapping("/{contract_unid}/receipts")
@ResponseBody
public Object deleteReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
return receiptService.deleteReceipt(receiptVo, contract_unid);
}
}
package com.vion.financial.controller;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.service.PaymentAgreeService;
import com.vion.financial.service.ReturnInfoService;
import com.vion.financial.vo.PaymentAgreeVo;
import com.vion.financial.vo.ReturnInfoVo;
@RestController
public class ReturnInfoController extends BaseController{
@Resource
ReturnInfoService returnInfoService;
@GetMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object queryRebackInfo(@PathVariable String contract_unid) {
return returnInfoService.queryReturnInfo(contract_unid);
}
@PostMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object addRebackInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
return returnInfoService.addReturnInfo(returnInfoVo, contract_unid);
}
@PutMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object updateReturnInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
return returnInfoService.updateReturnInfo(returnInfoVo, contract_unid);
}
@DeleteMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object deletePaymentInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
return returnInfoService.deleteReturn(returnInfoVo, contract_unid);
}
}
package com.vion.financial.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.vion.financial.mapper.PersonMapper;
import com.vion.financial.vo.AppendixVo;
@RestController
public class Test {
@Autowired
PersonMapper personMapper;
@PostMapping("/test")
@ResponseBody
public Object test(AppendixVo appendixVo) {
Object o = personMapper.query(1);
return o;
}
}
package com.vion.financial.entity;
public class Appendix {
private int appendix_unid;
private String business_table;
private String business_unid;
private String appendix_name;
private String appendix_type;
private String appendix_url;
public int getAppendix_unid() {
return appendix_unid;
}
public void setAppendix_unid(int appendix_unid) {
this.appendix_unid = appendix_unid;
}
public String getBusiness_table() {
return business_table;
}
public void setBusiness_table(String business_table) {
this.business_table = business_table;
}
public String getBusiness_unid() {
return business_unid;
}
public void setBusiness_unid(String business_unid) {
this.business_unid = business_unid;
}
public String getAppendix_name() {
return appendix_name;
}
public void setAppendix_name(String appendix_name) {
this.appendix_name = appendix_name;
}
public String getAppendix_type() {
return appendix_type;
}
public void setAppendix_type(String appendix_type) {
this.appendix_type = appendix_type;
}
public String getAppendix_url() {
return appendix_url;
}
public void setAppendix_url(String appendix_url) {
this.appendix_url = appendix_url;
}
}
package com.vion.financial.entity;
import java.util.Date;
public class Contract {
private String contract_unid;
private String salesperson_unid;
private int project_unid;
private int customer_unid;
private String province;
private String city;
private String county;
private int guarantee_period;
private Date sign_date;
private String product_line_type;
private String contract_state;
private String contract_type;
private double contract_amount;
private double deduct_amount;
private String contract_amount_note;
private double stop_amount;
private String reback_note;
private double exemptions_amount;
private String contract_remain_note;
private boolean is_archive;
private double bad_amount;
private String bad_amount_note;
private double confirm_income_amount;
private String amount_state_unid;
private Date start_guarantee_date;
private Date end_guarantee_date;
private String mainten_start_point;
private String contract_note;
private boolean is_delete;
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public String getSalesperson_unid() {
return salesperson_unid;
}
public void setSalesperson_unid(String salesperson_unid) {
this.salesperson_unid = salesperson_unid;
}
public int getProject_unid() {
return project_unid;
}
public void setProject_unid(int project_unid) {
this.project_unid = project_unid;
}
public int getCustomer_unid() {
return customer_unid;
}
public void setCustomer_unid(int customer_unid) {
this.customer_unid = customer_unid;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public int getGuarantee_period() {
return guarantee_period;
}
public void setGuarantee_period(int guarantee_period) {
this.guarantee_period = guarantee_period;
}
public Date getSign_date() {
return sign_date;
}
public void setSign_date(Date sign_date) {
this.sign_date = sign_date;
}
public String getProduct_line_type() {
return product_line_type;
}
public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type;
}
public String getContract_state() {
return contract_state;
}
public void setContract_state(String contract_state) {
this.contract_state = contract_state;
}
public String getContract_type() {
return contract_type;
}
public void setContract_type(String contract_type) {
this.contract_type = contract_type;
}
public double getContract_amount() {
return contract_amount;
}
public void setContract_amount(double contract_amount) {
this.contract_amount = contract_amount;
}
public double getDeduct_amount() {
return deduct_amount;
}
public void setDeduct_amount(double deduct_amount) {
this.deduct_amount = deduct_amount;
}
public String getContract_amount_note() {
return contract_amount_note;
}
public void setContract_amount_note(String contract_amount_note) {
this.contract_amount_note = contract_amount_note;
}
public double getStop_amount() {
return stop_amount;
}
public void setStop_amount(double stop_amount) {
this.stop_amount = stop_amount;
}
public String getReback_note() {
return reback_note;
}
public void setReback_note(String reback_note) {
this.reback_note = reback_note;
}
public double getExemptions_amount() {
return exemptions_amount;
}
public void setExemptions_amount(double exemptions_amount) {
this.exemptions_amount = exemptions_amount;
}
public String getContract_remain_note() {
return contract_remain_note;
}
public void setContract_remain_note(String contract_remain_note) {
this.contract_remain_note = contract_remain_note;
}
public boolean isIs_archive() {
return is_archive;
}
public void setIs_archive(boolean is_archive) {
this.is_archive = is_archive;
}
public double getBad_amount() {
return bad_amount;
}
public void setBad_amount(double bad_amount) {
this.bad_amount = bad_amount;
}
public String getBad_amount_note() {
return bad_amount_note;
}
public void setBad_amount_note(String bad_amount_note) {
this.bad_amount_note = bad_amount_note;
}
public double getConfirm_income_amount() {
return confirm_income_amount;
}
public void setConfirm_income_amount(double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount;
}
public String getAmount_state_unid() {
return amount_state_unid;
}
public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid;
}
public Date getStart_guarantee_date() {
return start_guarantee_date;
}
public void setStart_guarantee_date(Date start_guarantee_date) {
this.start_guarantee_date = start_guarantee_date;
}
public Date getEnd_guarantee_date() {
return end_guarantee_date;
}
public void setEnd_guarantee_date(Date end_guarantee_date) {
this.end_guarantee_date = end_guarantee_date;
}
public String getMainten_start_point() {
return mainten_start_point;
}
public void setMainten_start_point(String mainten_start_point) {
this.mainten_start_point = mainten_start_point;
}
public String getContract_note() {
return contract_note;
}
public void setContract_note(String contract_note) {
this.contract_note = contract_note;
}
public boolean isIs_delete() {
return is_delete;
}
public void setIs_delete(boolean is_delete) {
this.is_delete = is_delete;
}
}
package com.vion.financial.entity;
public class Customer {
private int customer_unid;
private String customer_name;
public int getCustomer_unid() {
return customer_unid;
}
public void setCustomer_unid(int customer_unid) {
this.customer_unid = customer_unid;
}
public String getCustomer_name() {
return customer_name;
}
public void setCustomer_name(String customer_name) {
this.customer_name = customer_name;
}
}
package com.vion.financial.entity;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(value=Include.NON_NULL)
public class DeliverGoods {
private int deliver_unid;
private String contract_unid;
private Date deliver_goods_date;
private Date goods_acceptanc_date;
private List<Appendix> appendix_list;
public int getDeliver_unid() {
return deliver_unid;
}
public void setDeliver_unid(int deliver_unid) {
this.deliver_unid = deliver_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public Date getDeliver_goods_date() {
return deliver_goods_date;
}
public void setDeliver_goods_date(Date deliver_goods_date) {
this.deliver_goods_date = deliver_goods_date;
}
public Date getGoods_acceptanc_date() {
return goods_acceptanc_date;
}
public void setGoods_acceptanc_date(Date goods_acceptanc_date) {
this.goods_acceptanc_date = goods_acceptanc_date;
}
public List<Appendix> getAppendix_list() {
return appendix_list;
}
public void setAppendix_list(List<Appendix> appendix_list) {
this.appendix_list = appendix_list;
}
}
package com.vion.financial.entity;
public class PaymentAgree {
private int payment_unid;
private String contract_unid;
private String payment_type;
private int payment_progress;
private int days;
private double payment_propority;
private String payment_requirement;
public int getPayment_unid() {
return payment_unid;
}
public void setPayment_unid(int payment_unid) {
this.payment_unid = payment_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public String getPayment_type() {
return payment_type;
}
public void setPayment_type(String payment_type) {
this.payment_type = payment_type;
}
public int getPayment_progress() {
return payment_progress;
}
public void setPayment_progress(int payment_progress) {
this.payment_progress = payment_progress;
}
public int getDays() {
return days;
}
public void setDays(int days) {
this.days = days;
}
public double getPayment_propority() {
return payment_propority;
}
public void setPayment_propority(double payment_propority) {
this.payment_propority = payment_propority;
}
public String getPayment_requirement() {
return payment_requirement;
}
public void setPayment_requirement(String payment_requirement) {
this.payment_requirement = payment_requirement;
}
}
package com.vion.financial.entity;
public class Project {
private int project_unid;
private String project_name;
public int getProject_unid() {
return project_unid;
}
public void setProject_unid(int project_unid) {
this.project_unid = project_unid;
}
public String getProject_name() {
return project_name;
}
public void setProject_name(String project_name) {
this.project_name = project_name;
}
}
package com.vion.financial.entity;
import java.util.Date;
public class ProjectAcceptanc {
private int acceptanc_unid;
private String contract_unid;
private String acceptanc_type;
private Date acceptanc_date;
private String acceptanc_note;
public int getAcceptanc_unid() {
return acceptanc_unid;
}
public void setAcceptanc_unid(int acceptanc_unid) {
this.acceptanc_unid = acceptanc_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public String getAcceptanc_type() {
return acceptanc_type;
}
public void setAcceptanc_type(String acceptanc_type) {
this.acceptanc_type = acceptanc_type;
}
public Date getAcceptanc_date() {
return acceptanc_date;
}
public void setAcceptanc_date(Date acceptanc_date) {
this.acceptanc_date = acceptanc_date;
}
public String getAcceptanc_note() {
return acceptanc_note;
}
public void setAcceptanc_note(String acceptanc_note) {
this.acceptanc_note = acceptanc_note;
}
}
package com.vion.financial.entity;
import java.util.Date;
public class Receipt {
private int receipt_unid;
private String contract_unid;
private int receipt_progress;
private double receipt_amount;
private String oa_flow_id;
private String receipt_note;
private Date create_date;
public int getReceipt_unid() {
return receipt_unid;
}
public void setReceipt_unid(int receipt_unid) {
this.receipt_unid = receipt_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public int getReceipt_progress() {
return receipt_progress;
}
public void setReceipt_progress(int receipt_progress) {
this.receipt_progress = receipt_progress;
}
public double getReceipt_amount() {
return receipt_amount;
}
public void setReceipt_amount(double receipt_amount) {
this.receipt_amount = receipt_amount;
}
public String getOa_flow_id() {
return oa_flow_id;
}
public void setOa_flow_id(String oa_flow_id) {
this.oa_flow_id = oa_flow_id;
}
public String getReceipt_note() {
return receipt_note;
}
public void setReceipt_note(String receipt_note) {
this.receipt_note = receipt_note;
}
public Date getCreate_date() {
return create_date;
}
public void setCreate_date(Date create_date) {
this.create_date = create_date;
}
}
package com.vion.financial.entity;
import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
public class ReturnInfo {
private int reback_unid;
private String contract_unid;
private int reback_progress;
private Date reback_date;
private double actual_reback_amount;
private String reback_note;
public int getReback_unid() {
return reback_unid;
}
public void setReback_unid(int reback_unid) {
this.reback_unid = reback_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public int getReback_progress() {
return reback_progress;
}
public void setReback_progress(int reback_progress) {
this.reback_progress = reback_progress;
}
//@JsonSerialize(using = DateYMDHMSJsonSerializer.class)
public Date getReback_date() {
return reback_date;
}
public void setReback_date(Date reback_date) {
this.reback_date = reback_date;
}
public double getActual_reback_amount() {
return actual_reback_amount;
}
public void setActual_reback_amount(double actual_reback_amount) {
this.actual_reback_amount = actual_reback_amount;
}
public String getReback_note() {
return reback_note;
}
public void setReback_note(String reback_note) {
this.reback_note = reback_note;
}
}
package com.vion.financial.handler;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
@MappedJdbcTypes({JdbcType.DATE})
@MappedTypes({Date.class})
public class MilliDateTypeHandler extends BaseTypeHandler<Date>{
@Override
public void setNonNullParameter(PreparedStatement ps, int i, Date date, JdbcType jdbcType)
throws SQLException {
//String dateS = DateUtil.FORMAT_YYYY_MM_DD.format(date);
System.out.println("=======adsa======");
java.sql.Date sqldate = new java.sql.Date(date.getTime());
ps.setDate(i, sqldate);
}
@Override
public Date getNullableResult(ResultSet rs, String columnName) throws SQLException {
return new Date(rs.getLong(columnName));
}
@Override
public Date getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return new Date(rs.getLong(columnIndex));
}
@Override
public Date getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return cs.getDate(columnIndex);
}
}
package com.vion.financial.mapper;
import java.util.List;
import com.vion.financial.entity.Appendix;
public interface AppendixMapper {
public List<Appendix> queryAppendixList(Appendix appendix);
int addAppendix(Appendix appendix);
public void updateAppendix(Appendix appendix);
public void deleteAppendix(Appendix appendix);
}
package com.vion.financial.mapper;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.ContractsListVo;
import com.vion.financial.vo.SelectVo;
public interface ContractMapper {
@Transactional
public void addOne(ContractVo contractVo);
public ContractVo queryOne(String contract_unid);
@Transactional
public void updateOne(ContractVo contractVo);
@Transactional
public void deleteOne(String contract_unid);
public ContractsListVo selectByCondition(SelectVo selectVo);
public boolean isDelete(String contract_unid);
}
package com.vion.financial.mapper;
import com.vion.financial.entity.Customer;
public interface CustomerMapper {
public Object addCustomer(Customer customer);
public Customer queryCustomer(String s);
public Object updateCustomer(Customer customer);
public Object deleteCustomer(int n);
}
package com.vion.financial.mapper;
import java.util.List;
import com.vion.financial.entity.DeliverGoods;
public interface DeliverGoodsMapper {
public void addDeliverGoods(DeliverGoods deliverGoods);
public List<DeliverGoods> queryDeliverGoods(String s);
public void updateDeliverGoods(DeliverGoods deliverGoods);
public void deleteDeliverGoods(int n);
}
package com.vion.financial.mapper;
import java.util.List;
import com.vion.financial.entity.PaymentAgree;
public interface PaymentAgreeMapper {
public void addPaymentAgree(PaymentAgree paymentAgree);
public List<PaymentAgree> queryPaymentAgree(String s);
public void updatePaymentAgree(PaymentAgree paymentAgree);
public void deletePaymentAgree(int n);
}
package com.vion.financial.mapper;
import java.util.ArrayList;
import com.vion.financial.model.Person;
public interface PersonMapper {
Person query(int id);
ArrayList<Person> getAll();
Object addPerson(Person person);
Object update(Person person);
Object delete(int id);
}
package com.vion.financial.mapper;
import com.vion.financial.entity.ProjectAcceptanc;
public interface ProjectAcceptancMapper {
public Object addProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
public ProjectAcceptanc queryProjectAcceptanc(String s);
public Object updateProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
public Object deleteProjectAcceptanc(int n);
}
package com.vion.financial.mapper;
import com.vion.financial.entity.Project;
public interface ProjectMapper {
public Object addProject(Project projec);
public Project queryProject(String s);
public Object updateProject(Project project);
public Object deleteProject(int n);
}
package com.vion.financial.mapper;
import java.util.List;
import com.vion.financial.entity.Receipt;
public interface ReceiptMapper {
public void addReceipt(Receipt receipt);
public List<Receipt> queryReceipt(String s);
public void updateReceipt(Receipt receipt);
public void deleteReceipt(int n);
}
package com.vion.financial.mapper;
import com.vion.financial.entity.ReturnInfo;
public interface ReturnInfoMapper {
public void addReturnInfo(ReturnInfo returnInfo);
public ReturnInfo queryReturnInfo(String s);
public void updateReturnInfo(ReturnInfo returnInfo);
public void deleteReturnInfo(int n);
}
<?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.vion.financial.mapper.AppendixMapper">
<select id="queryAppendixList" resultType="com.vion.financial.entity.Appendix" parameterType="com.vion.financial.entity.Appendix">
select * from tb_appendix where
<if test="business_table !=null and business_table !=''">
business_table = #{business_table}
</if>
<if test="business_unid !=null and business_unid !=''">
and business_unid = #{business_unid}
</if>
<!-- and
<if test="appendix_name !=null and appendix_name !=''">
appendix_name = #{appendix_name}
</if>
and
<if test="appendix_type !=null and appendix_type !=''">
appendix_type = #{appendix_type}
</if>
and
<if test="appendix_url !=null and appendix_url !=''">
appendix_url = #{appendix_url}
</if> -->
</select>
<insert id="addAppendix" parameterType="com.vion.financial.entity.Appendix" keyColumn="appendix_unid" keyProperty="appendix_unid" useGeneratedKeys="true" >
insert into tb_appendix (
business_table
<if test="business_unid !=null and business_unid !=''">
,business_unid
</if>
<if test="appendix_name !=null and appendix_name !=''">
,appendix_name
</if>
<if test="appendix_type !=null and appendix_type !=''">
,appendix_type
</if>
<if test="appendix_url !=null and appendix_url !=''">
,appendix_url
</if>
) values (
#{business_table}
<if test="business_unid !=null and business_unid !=''">
,#{business_unid}
</if>
<if test="appendix_name !=null and appendix_name !=''">
,#{appendix_name}
</if>
<if test="appendix_type !=null and appendix_type !=''">
,#{appendix_type}
</if>
<if test="appendix_url !=null and appendix_url !=''">
,#{appendix_url}
</if>
)
</insert>
<update id="updateAppendix" parameterType="com.vion.financial.entity.Appendix">
update tb_appendix set
<if test="appendix_unid != null and appendix_unid != ''">
appendix_unid=#{appendix_unid}
</if>
<if test="business_table != null and business_table != ''">
,business_table=#{business_table}
</if>
<if test="business_unid !=null and business_unid != ''">
, business_unid=#{business_unid}
</if>
<if test="appendix_name != null and appendix_name != ''">
,appendix_name=#{appendix_name}
</if>
<if test="appendix_type != null and appendix_type != ''">
,appendix_type=#{appendix_type}
</if>
<if test="appendix_url != null and appendix_url != ''">
,appendix_url=#{appendix_url}
</if>
where appendix_unid = #{appendix_unid}
</update>
<delete id="deleteAppendix" parameterType="com.vion.financial.entity.Appendix">
delete from tb_appendix where business_table = #{business_table} and business_unid = #{business_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.ContractMapper">
<insert id="addOne" parameterType="com.vion.financial.vo.ContractVo">
INSERT INTO tb_contract(
contract_unid
<if test="salesperson_unid != null and salesperson_unid != ''">
,salesperson_unid
</if>
<if test="province != null and province != ''">
,province
</if>
<if test="city !=null and city != ''">
,city
</if>
<if test="county != null and county != ''">
,county
</if>
<if test="guarantee_period != null and guarantee_period != ''">
,guarantee_period
</if>
<if test="sign_date != null and sign_date != ''">
,sign_date
</if>
<if test="product_line_type != null and product_line_type != ''">
,product_line_type
</if>
<if test="contract_state != null and contract_state != ''">
,contract_state
</if>
<if test="contract_type != null and contract_type != ''">
,contract_type
</if>
<if test="contract_amount != null and contract_amount != ''">
,contract_amount
</if>
<if test="deduct_amount != null and deduct_amount != ''">
,deduct_amount
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,contract_type
</if>
<if test="stop_amount != null and stop_amount != ''">
,stop_amount
</if>
<if test="reback_note != null and reback_note != ''">
,reback_note
</if>
<if test="exemptions_amount != null and exemptions_amount != ''">
,exemptions_amount
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note
</if>
<if test="is_archive != null and is_archive != ''">
,is_archive
</if>
<if test="bad_amount != null and bad_amount != ''">
,bad_amount
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note
</if>
<if test="confirm_income_amount != null and confirm_income_amount != ''">
,confirm_income_amount
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid
</if>
<if test="start_guarantee_date != null and start_guarantee_date != ''">
,start_guarantee_date
</if>
<if test="end_guarantee_date != null and end_guarantee_date != ''">
,end_guarantee_date
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point
</if>
<if test="contract_note != null and contract_note != ''">
,contract_note
</if>
<if test="is_delete != null and is_delete != ''">
,is_delete
</if>
<if test="project_unid != null and project_unid != ''">
,project_unid
</if>
<if test="customer_unid != null and customer_unid != ''">
,customer_unid
</if>
) VALUES(
#{contract_unid}
<if test="salesperson_unid != null and salesperson_unid != ''">
,#{salesperson_unid}
</if>
<if test="province != null and province != ''">
,#{province}
</if>
<if test="city !=null and city != ''">
, #{city}
</if>
<if test="county != null and county != ''">
,#{county}
</if>
<if test="guarantee_period != null and guarantee_period != ''">
,#{guarantee_period}
</if>
<if test="sign_date != null and sign_date != ''">
,{sign_date}
</if>
<if test="product_line_type != null and product_line_type != ''">
,#{product_line_type}
</if>
<if test="contract_state != null and contract_state != ''">
,#{contract_state}
</if>
<if test="contract_type != null and contract_type != ''">
,#{contract_type}
</if>
<if test="contract_amount != null and contract_amount != ''">
,#{contract_amount}
</if>
<if test="deduct_amount != null and deduct_amount != ''">
,#{deduct_amount}
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,#{contract_type}
</if>
<if test="stop_amount != null and stop_amount != ''">
,#{stop_amount}
</if>
<if test="reback_note != null and reback_note != ''">
,#{reback_note}
</if>
<if test="exemptions_amount != null and exemptions_amount != ''">
,#{exemptions_amount}
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,#{contract_remain_note}
</if>
<if test="is_archive != null and is_archive != ''">
,#{is_archive}
</if>
<if test="bad_amount != null and bad_amount != ''">
,#{bad_amount}
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,#{bad_amount_note}
</if>
<if test="confirm_income_amount != null and confirm_income_amount != ''">
,#{confirm_income_amount}
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,#{amount_state_unid}
</if>
<if test="start_guarantee_date != null and start_guarantee_date != ''">
,#{start_guarantee_date}
</if>
<if test="end_guarantee_date != null and end_guarantee_date != ''">
,#{end_guarantee_date}
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,#{mainten_start_point}
</if>
<if test="contract_note != null and contract_note != ''">
,#{contract_note}
</if>
<if test="is_delete != null and is_delete != ''">
,#{is_delete}
</if>
<if test="project_unid != null and project_unid != ''">
,#{project_unid}
</if>
<if test="customer_unid != null and customer_unid != ''">
,#{customer_unid}
</if>
)
</insert>
<select id="queryOne" resultType="com.vion.financial.vo.ContractVo" parameterType="java.lang.String">
select * from tb_contract where contract_unid = #{contract_unid}
</select>
<update id="updateOne" parameterType="com.vion.financial.vo.ContractVo">
update tb_contract set
<if test="salesperson_unid != null and salesperson_unid != ''">
salesperson_unid=#{salesperson_unid}
</if>
<if test="province != null and province != ''">
,province=#{province}
</if>
<if test="city !=null and city != ''">
, city=#{city}
</if>
<if test="county != null and county != ''">
,county=#{county}
</if>
<if test="guarantee_period != null and guarantee_period != ''">
,guarantee_period=#{guarantee_period}
</if>
<if test="sign_date != null and sign_date != ''">
,sign_date=#{sign_date}
</if>
<if test="product_line_type != null and product_line_type != ''">
,product_line_type=#{product_line_type}
</if>
<if test="contract_state != null and contract_state != ''">
,contract_state=#{contract_state}
</if>
<if test="contract_type != null and contract_type != ''">
,contract_type=#{contract_type}
</if>
<if test="contract_amount != null and contract_amount != ''">
,contract_amount=#{contract_amount}
</if>
<if test="deduct_amount != null and deduct_amount != ''">
,deduct_amount=#{deduct_amount}
</if>
<if test="contract_amount_note != null and contract_amount_note != ''">
,contract_type=#{contract_type}
</if>
<if test="stop_amount != null and stop_amount != ''">
,stop_amount=#{stop_amount}
</if>
<if test="reback_note != null and reback_note != ''">
,reback_note=#{reback_note}
</if>
<if test="exemptions_amount != null and exemptions_amount != ''">
,exemptions_amount=#{exemptions_amount}
</if>
<if test="contract_remain_note != null and contract_remain_note != ''">
,contract_remain_note=#{contract_remain_note}
</if>
<if test="is_archive != null and is_archive != ''">
,is_archive=#{is_archive}
</if>
<if test="bad_amount != null and bad_amount != ''">
,bad_amount=#{bad_amount}
</if>
<if test="bad_amount_note != null and bad_amount_note != ''">
,bad_amount_note=#{bad_amount_note}
</if>
<if test="confirm_income_amount != null and confirm_income_amount != ''">
,confirm_income_amount=#{confirm_income_amount}
</if>
<if test="amount_state_unid != null and amount_state_unid != ''">
,amount_state_unid=#{amount_state_unid}
</if>
<if test="start_guarantee_date != null and start_guarantee_date != ''">
,start_guarantee_date=#{start_guarantee_date}
</if>
<if test="end_guarantee_date != null and end_guarantee_date != ''">
,end_guarantee_date=#{end_guarantee_date}
</if>
<if test="mainten_start_point != null and mainten_start_point != ''">
,mainten_start_point=#{mainten_start_point}
</if>
<if test="contract_note != null and contract_note != ''">
,contract_note=#{contract_note}
</if>
<if test="is_delete != null and is_delete != ''">
,is_delete=#{is_delete}
</if>
<if test="project_unid != null and project_unid != ''">
,project_unid=#{project_unid}
</if>
<if test="customer_unid != null and customer_unid != ''">
,customer_unid=#{customer_unid}
</if>
where contract_unid=#{contract_unid}
</update>
<delete id="deleteOne" parameterType="java.lang.String">
update tb_contract set is_delete = false where contract_unid = #{contract_unid}
<!-- delete from tb_contract where contract_unid = #{contract_unid} -->
</delete>
<select id="selectByCondition" parameterType="com.vion.financial.vo.SelectVo" resultType="com.vion.financial.vo.ContractsListVo">
</select>
<select id="isDelete" parameterType="String" resultType="boolean">
select is_delete from tb_contract where contract_unid = #{contract_unid}
</select>
</mapper>
<?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.vion.financial.mapper.CustomerMapper">
<insert id="addCustomer" parameterType="com.vion.financial.entity.Customer">
insert into tb_customer (customer_name) values (#{customer_name})
</insert>
<update id="updateCustomer" parameterType="com.vion.financial.entity.Customer">
update tb_customer set contract_unid = #{contract_unid},customer_name = #{customer_name}
where customer_unid = #{customer_unid}
</update>
<select id="queryCustomer" parameterType="String">
select *from tb_customer where contract_unid = #{contract_unid}
</select>
<delete id="deleteCustomer" parameterType="int">
delete from tb_customer where customer_unid = #{customer_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.DeliverGoodsMapper">
<insert id="addDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods">
insert into tb_deliver_goods (contract_unid,deliver_goods_date,goods_acceptanc_date)
values(#{contract_unid},#{deliver_goods_date},#{goods_acceptanc_date})
</insert>
<update id="updateDeliverGoods" parameterType="com.vion.financial.entity.DeliverGoods">
update tb_deliver_goods set
<if test="deliver_goods_date !=null">
deliver_goods_date = #{deliver_goods_date},
goods_acceptanc_date = #{goods_acceptanc_date}
</if>
where deliver_unid = #{deliver_unid}
</update>
<select id="queryDeliverGoods" parameterType="String" resultType="com.vion.financial.entity.DeliverGoods">
select *from tb_deliver_goods where contract_unid = #{contract_unid}
</select>
<delete id="deleteDeliverGoods" parameterType="int">
delete from tb_deliver_goods where deliver_unid = #{deliver_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.PaymentAgreeMapper">
<insert id="addPaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
insert into tb_payment_agree (
contract_unid,
<if test="payment_type !=null and payment_type !=''">
payment_type,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress,
</if>
<if test="days !=null and days !=''">
days,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement
</if>
)
values(
#{contract_unid},
<if test="payment_type !=null and payment_type !=''">
#{payment_type},
</if>
<if test="payment_progress !=null and payment_progress !=''">
#{payment_progress},
</if>
<if test="days !=null and days !=''">
#{days},
</if>
<if test="payment_propority !=null and payment_propority !=''">
#{payment_propority},
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
#{payment_requirement}
</if>
)
</insert>
<update id="updatePaymentAgree" parameterType="com.vion.financial.entity.PaymentAgree">
update tb_payment_agree set
contract_unid=#{contract_unid},
<if test="payment_type != null and payment_type !=''">
payment_type = #{payment_type} ,
</if>
<if test="payment_progress !=null and payment_progress !=''">
payment_progress = #{payment_progress} ,
</if>
<if test="days !=null and days !=''">
days = #{days} ,
</if>
<if test="payment_propority !=null and payment_propority !=''">
payment_propority = #{payment_propority} ,
</if>
<if test="payment_requirement !=null and payment_requirement !=''">
payment_requirement = #{payment_requirement}
</if>
where payment_unid = #{payment_unid}
</update>
<select id="queryPaymentAgree" parameterType="String" resultType="com.vion.financial.entity.PaymentAgree">
select * from tb_payment_agree where contract_unid = #{contract_unid}
</select>
<delete id="deletePaymentAgree" parameterType="int">
delete from tb_payment_agree where payment_unid = #{payment_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.PersonMapper"> <!--设置domain类和数据库中表的字段一一对应,注意数据库字段和domain类中的字段名称不致,此处一定要! -->
<select id="query" parameterType="int" resultType="com.vion.financial.model.Person">
select * from person where id = #{id}
</select>
<select id="getAll" resultType="com.vion.financial.model.Person">
select * from person
</select>
<select id="addPerson" parameterType="com.vion.financial.model.Person">
insert into person(id,name,age) values (#{id},#{name},#{age})
</select>
<select id="update" parameterType="com.vion.financial.model.Person">
update person set name=#{name},age=#{age} where id=#{id}
</select>
<select id="delete" parameterType="int">
delete from person where id=#{id}
</select>
</mapper>
<?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.vion.financial.mapper.ProjectAcceptancMapper">
<insert id="addProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc">
insert into tb_project_acceptanc (contract_unid,acceptanc_type,acceptanc_date,acceptanc_note)
values(#{contract_unid},#{acceptanc_type},#{acceptanc_date},#{acceptanc_note})
</insert>
<update id="updateProjectAcceptanc" parameterType="com.vion.financial.entity.ProjectAcceptanc">
update tb_project_acceptanc set contract_unid = #{contract_unid},acceptanc_type = #{acceptanc_type},acceptanc_date = #{acceptanc_date},acceptanc_note = #{acceptanc_note}
where acceptanc_unid = #{acceptanc_unid}
</update>
<select id="queryProjectAcceptanc" parameterType="String">
select *from tb_project_acceptanc where contract_unid = #{contract_unid}
</select>
<delete id="deleteProjectAcceptanc" parameterType="int">
delete from tb_project_acceptanc where acceptanc_unid = #{acceptanc_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.ProjectMapper">
<insert id="addProject" parameterType="com.vion.financial.entity.Project">
insert into tb_project (project_name) values (#{project_name})
</insert>
<update id="updateProject" parameterType="com.vion.financial.entity.Project">
update tb_project set contract_unid = #{contract_unid},project_name = #{project_name}
where project_unid = #{project_unid}
</update>
<select id="queryProject" parameterType="String">
select *from tb_project where contract_unid = #{contract_unid}
</select>
<delete id="deleteProject" parameterType="int">
delete from tb_project where project_unid = #{project_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.ReceiptMapper">
<insert id="addReceipt" parameterType="com.vion.financial.entity.Receipt">
insert into tb_receipt (contract_unid,receipt_progress,receipt_amount,oa_flow_id,
<if test="receipt_note !=null and receipt_note !=''">
receipt_note,
</if>
create_date)
values( #{contract_unid},#{receipt_progress},#{receipt_amount},#{oa_flow_id},
<if test="receipt_note !=null and receipt_note !=''">
#{receipt_note},
</if>
now())
</insert>
<update id="updateReceipt" parameterType="com.vion.financial.entity.Receipt">
update tb_receipt set
<if test="receipt_progress !=null">
receipt_progress = #{receipt_progress},
</if>
<if test="receipt_amount !=null">
receipt_amount = #{receipt_amount},
</if>
<if test="oa_flow_id !=null and oa_flow_id !=''">
oa_flow_id = #{oa_flow_id},
</if>
<if test="receipt_note !=null and receipt_note !=''">
receipt_note = #{receipt_note}
</if>
<!-- <if test="create_date !=null ">
create_date = now()
</if> -->
where receipt_unid = #{receipt_unid}
</update>
<select id="queryReceipt" parameterType="String" resultType="com.vion.financial.entity.Receipt">
select *from tb_receipt where contract_unid = #{contract_unid}
</select>
<delete id="deleteReceipt" parameterType="int">
delete from tb_receipt where receipt_unid = #{receipt_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
<?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.vion.financial.mapper.ReturnInfoMapper">
<insert id="addReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
insert into tb_return_info (
contract_unid,
<if test="reback_progress !=null and reback_progress !=''">
reback_progress,
</if>
<if test="reback_date !=null">
reback_date,
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount,
</if>
<if test="reback_note !=null and reback_note !=''">
reback_note
</if>
)
values (
#{contract_unid},
<if test="reback_progress !=null and reback_progress !=''">
#{reback_progress},
</if>
<if test="reback_date !=null">
#{reback_date,jdbcType=DATE},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
#{actual_reback_amount},
</if>
<if test="reback_note !=null and reback_note !=''">
#{reback_note}
</if>
)
</insert>
<update id="updateReturnInfo" parameterType="com.vion.financial.entity.ReturnInfo">
update tb_return_info set (
<if test="reback_progress !=null and reback_progress !=''">
reback_progress = #{reback_progress},
</if>
<if test="reback_date !=null and reback_date !=''">
reback_date = #{reback_date},
</if>
<if test="actual_reback_amount !=null and actual_reback_amount !=''">
actual_reback_amount = #{actual_reback_amount},
</if>
<if test="reback_note !=null and reback_note !=''">
reback_note = #{reback_note}
</if>
)
where reback_unid = #{reback_unid}
</update>
<select id="queryReturnInfo" parameterType="String" resultType="com.vion.financial.entity.ReturnInfo">
select *from tb_return_info where contract_unid = #{contract_unid}
</select>
<delete id="deleteReturnInfo" parameterType="int">
delete from tb_return_info where reback_unid = #{reback_unid}
</delete>
</mapper>
\ No newline at end of file \ No newline at end of file
package com.vion.financial.model;
public class Person {
private int id;
private String name;
private int age;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
package com.vion.financial.serializer;
import java.io.IOException;
import java.util.Date;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.vion.financial.utils.DateUtil;
public class DateYMDHMSJsonSerializer extends JsonSerializer<Date>{
@Override
public void serialize(Date date, JsonGenerator gen, SerializerProvider serializers)
throws IOException, JsonProcessingException {
try {
gen.writeString(DateUtil.FORMAT_YYYY_MM_DD.format(date));
} catch (Exception e) {
gen.writeString(String.valueOf(date.getTime()));
}
}
}
package com.vion.financial.service;
import java.util.List;
import com.vion.financial.entity.Appendix;
public interface AppendixService {
public Object queryAppendixList(Appendix appendix);
public Object addAppendix(Appendix appendix);
public Object updateAppendix(Appendix appendix);
public Object deleteAppendix(Appendix appendix);
}
package com.vion.financial.service;
import com.vion.financial.vo.ContractVo;
public interface ContractService {
Object addOne(ContractVo vontractVo);
Object queryOne(String s);
Object updateOne(ContractVo vontractVo);
Object deleteOne(String s);
boolean isDelete(String s);
}
package com.vion.financial.service;
import java.util.List;
import com.vion.financial.entity.DeliverGoods;
import com.vion.financial.vo.DeliverGoodsVo;
public interface DeliverGoodsService {
public Object addDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
public Object queryDeliverGoods(String s);
public Object updateDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
public Object deleteDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
}
package com.vion.financial.service;
import java.util.List;
import com.vion.financial.entity.PaymentAgree;
import com.vion.financial.vo.PaymentAgreeVo;
public interface PaymentAgreeService {
public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s);
public Object queryPaymentAgree(String s);
public Object updatePaymentAgree(PaymentAgreeVo paymentAgreeVo, String s);
public Object deletePaymentAgree(PaymentAgreeVo paymentAgreeVo,String s);
}
package com.vion.financial.service;
import java.util.ArrayList;
import com.vion.financial.model.Person;
public interface PersonService {
Person query(int id);
ArrayList<Person> getAll();
Object addPerson(Person person);
Object update(Person person);
Object delete(int id);
}
package com.vion.financial.service;
import com.vion.financial.vo.ReceiptVo;
public interface ReceiptService {
public Object addReceipt(ReceiptVo receiptVo,String s);
public Object queryReceipt(String s);
public Object updateReceipt(ReceiptVo receiptVo,String s);
public Object deleteReceipt(ReceiptVo receiptVo,String s);
}
package com.vion.financial.service;
import com.vion.financial.vo.ReturnInfoVo;
public interface ReturnInfoService {
public Object addReturnInfo(ReturnInfoVo returnInfoVo,String s);
public Object queryReturnInfo(String s);
public Object updateReturnInfo(ReturnInfoVo returnInfoVo, String s);
public Object deleteReturn(ReturnInfoVo returnInfoVo,String s);
}
package com.vion.financial.service.imp;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.Appendix;
import com.vion.financial.mapper.AppendixMapper;
import com.vion.financial.service.AppendixService;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.SuccessCode;
@Service
public class AppendixServiceImpl implements AppendixService {
Logger logger = LoggerFactory.getLogger(AppendixServiceImpl.class);
@Autowired
AppendixMapper appendixMapper;
@Autowired
FailCode failCode;
@Autowired
SuccessCode successCode;
@Override
public Object queryAppendixList(Appendix appendix) {
// TODO Auto-generated method stub
try {
logger.info("====================查询附件start======================");
return appendixMapper.queryAppendixList(appendix);
} catch (Exception e) {
// TODO: handle exception
logger.error("查询附件异常"+e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("附件查询异常");
return failCode;
}
}
@Override
public Object addAppendix(Appendix appendix) {
// TODO Auto-generated method stub
try {
logger.info("====================增加附件start=======================");
return appendixMapper.addAppendix(appendix);
} catch (Exception e) {
// TODO: handle exception
logger.error("增加附件异常"+e.getLocalizedMessage(),e);
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("附件增加异常");
return failCode;
}
}
@Override
public Object updateAppendix(Appendix appendix) {
// TODO Auto-generated method stub
try {
logger.info("========================修改附件start====================");
appendixMapper.updateAppendix(appendix);
return successCode;
} catch (Exception e) {
logger.error("删除附件异常"+e.getLocalizedMessage(),e);
// TODO: handle exception
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("附件修改异常");
return failCode;
}
}
@Override
public Object deleteAppendix(Appendix appendix) {
// TODO Auto-generated method stub
try {
logger.info("=======================删除附件start====================");
appendixMapper.deleteAppendix(appendix);
return successCode;
} catch (Exception e) {
logger.error("删除附件异常"+e.getLocalizedMessage(), e);
// TODO: handle exception
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("附件删除异常");
return failCode;
}
}
}
package com.vion.financial.service.imp;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.Appendix;
import com.vion.financial.mapper.AppendixMapper;
import com.vion.financial.mapper.ContractMapper;
import com.vion.financial.service.ContractService;
import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.SuccessCode;
@Service
public class ContractServiceImpl implements ContractService {
Logger logger = LoggerFactory.getLogger(ContractServiceImpl.class);
@Autowired
ContractMapper contractMapper;
@Autowired
AppendixMapper appendixMapper;
@Autowired
SuccessCode successCode;
@Autowired
FailCode failCode;
/***
* 新增合同信息
*/
@Override
public Object addOne(ContractVo contractVo) {
try {
//先插入合同信息
logger.info("============新增合同 start ============");
//根据附件unid集合更新附件表信息
Appendix appendix = new Appendix();
if(contractMapper.queryOne(contractVo.getContract_unid()) !=null) {
contractMapper.updateOne(contractVo);
}else {
contractMapper.addOne(contractVo);
}
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(contractVo.getContract_unid());
for(int n:contractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix);
}
return successCode;
} catch (Exception e) {
e.printStackTrace();
logger.error("增加合同异常:"+e.getLocalizedMessage(), e);
failCode.setEnode("500");
failCode.setEnode("增加异常");
return failCode;
}
}
@Override
public Object queryOne(String s) {
try {
logger.info("================查询合同start===================");
ContractVo contractVo = contractMapper.queryOne(s);
Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(s);
List<Appendix> appendixs = appendixMapper.queryAppendixList(appendix);
contractVo.setAppendix_list(appendixs);
return contractVo;
} catch (Exception e) {
// TODO: handle exception
/* return failCode;*/
logger.error("查询合同异常"+e.getLocalizedMessage(),e);
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("查询异常");
return failCode;
}
}
@Override
public Object updateOne(ContractVo vontractVo) {
try {
logger.info("======================修改合同start=====================");
contractMapper.updateOne(vontractVo);
Appendix appendix = new Appendix();
appendix.setBusiness_table("tb_contract");
appendix.setBusiness_unid(vontractVo.getContract_unid());
for(int n:vontractVo.getAppendix_unids()) {
appendix.setAppendix_unid(n);
appendixMapper.updateAppendix(appendix);
}
return successCode;
} catch (Exception e) {
// TODO: handle exception
logger.error("修改合同异常"+e.getLocalizedMessage(), e);
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("修改异常");
return failCode;
}
}
@Override
public Object deleteOne(String s) {
try {
logger.info("=================删除合同=================");
//contractMapper.updateSingleContract(contractVo);
contractMapper.deleteOne(s);
return successCode;
} catch (Exception e) {
logger.error("删除合同异常"+e.getLocalizedMessage(),e);
e.printStackTrace();
failCode.setEnode("500");
failCode.setEnode("删除异常");
return failCode;
}
}
public boolean isDelete(String s) {
return contractMapper.isDelete(s);
}
}
package com.vion.financial.service.imp;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.Appendix;
import com.vion.financial.entity.DeliverGoods;
import com.vion.financial.mapper.DeliverGoodsMapper;
import com.vion.financial.service.AppendixService;
import com.vion.financial.service.ContractService;
import com.vion.financial.service.DeliverGoodsService;
import com.vion.financial.vo.DeliverGoodsVo;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.SuccessCode;
@Service
public class DeliverGoodsServiceImpl implements DeliverGoodsService {
Logger logger = LoggerFactory.getLogger(DeliverGoodsServiceImpl.class);
@Autowired
SuccessCode successCode;
@Autowired
FailCode failCode;
@Autowired
DeliverGoodsMapper deliverGoodsMapper;
@Autowired
ContractService contractService;
@Autowired
AppendixService appendixService;
@Override
public Object addDeliverGoods(DeliverGoodsVo deliverGoodsVo, String s) {
// TODO Auto-generated method stub
try {
Appendix appendix = new Appendix();
logger.info("=====================增加发货信息=====================");
if((boolean)contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list) {
deliverGoods.setContract_unid(s);
deliverGoodsMapper.addDeliverGoods(deliverGoods);
for(int appendixUnid:deliverGoodsVo.getAppendix_unids()) {
appendix.setAppendix_unid(appendixUnid);
appendix.setBusiness_table("tb_deliver_goods");
appendix.setBusiness_unid(String.valueOf(deliverGoods.getDeliver_unid()));
}
}
return successCode;
}else {
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("增加发货信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("增加异常");
return failCode;
}
}
@Override
public Object queryDeliverGoods(String s) {
try {
DeliverGoodsVo deliverGoodsVo = new DeliverGoodsVo();
deliverGoodsVo.setList_deliver_data(new ArrayList());
Appendix appendix = null;
logger.info("========================查询发货信息========================");
if(contractService.isDelete(s)) {
List<DeliverGoods> list=deliverGoodsMapper.queryDeliverGoods(s);
for(DeliverGoods deliverGoods:list) {
appendix = new Appendix();
appendix.setBusiness_table("tb_deliver_goods");
appendix.setBusiness_unid(String.valueOf(deliverGoods.getDeliver_unid()));
Object o = appendixService.queryAppendixList(appendix);
deliverGoods.setAppendix_list(o == null ? null : (List)o);
deliverGoodsVo.getList_deliver_data().add(deliverGoods);
}
}
else {
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
return deliverGoodsVo;
} catch (Exception e) {
// TODO: handle exception
logger.error("查询发货信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("查询异常");
return failCode;
}
}
@Override
public Object updateDeliverGoods(DeliverGoodsVo deliverGoodsVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("===========================修改发货信息===========================");
if(contractService.isDelete(s)) {
List<DeliverGoods> list_deliver_data=deliverGoodsVo.getList_deliver_data();
for(DeliverGoods deliverGoods:list_deliver_data) {
deliverGoodsMapper.updateDeliverGoods(deliverGoods);
}
return successCode;
}else {
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
logger.error("更新发货信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("更新异常");
return failCode;
// TODO: handle exception
}
}
@Override
public Object deleteDeliverGoods(DeliverGoodsVo deliverGoodsVo, String s) {
// TODO Auto-generated method stub
return null;
}
}
package com.vion.financial.service.imp;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.PaymentAgree;
import com.vion.financial.mapper.PaymentAgreeMapper;
import com.vion.financial.service.PaymentAgreeService;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.PaymentAgreeVo;
import com.vion.financial.vo.SuccessCode;
@Service
public class PaymentAgreeServiceImpl implements PaymentAgreeService {
Logger logger=LoggerFactory.getLogger(PaymentAgreeServiceImpl.class);
@Autowired
PaymentAgreeMapper paymentAgreeMapper;
@Autowired
FailCode failCode;
@Autowired
ContractServiceImpl contractServiceImpl;
@Autowired
SuccessCode SuccessCode;
@Override
public Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) {
try {
logger.info("==============增加付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
paymentAgreeMapper.addPaymentAgree(paymentAgree);
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("增加付款预定信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("增加异常");
return failCode;
}
}
@Override
public Object queryPaymentAgree(String s) {
try {
logger.info("===============查询付款约定信息start=====================");
if((boolean) contractServiceImpl.isDelete(s)) {
return paymentAgreeMapper.queryPaymentAgree(s);
}
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
} catch (Exception e) {
// TODO: handle exception
logger.error("查询付款约定信息异常:"+e.getLocalizedMessage(), e);
failCode.setEnode("500");
failCode.setEnode("查询异常");
return failCode;
}
}
@Override
public Object updatePaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) {
// TODO Auto-generated method stub
try {
logger.info("==============修改付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
paymentAgreeMapper.updatePaymentAgree(paymentAgree);
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("修改付款预定信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("修改异常");
return failCode;
}
}
@Override
public Object deletePaymentAgree(PaymentAgreeVo paymentAgreeVo,String s) {
// TODO Auto-generated method stub
try {
logger.info("==============删除付款约定信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<PaymentAgree> list = paymentAgreeVo.getList_payment_data();
for(PaymentAgree paymentAgree:list) {
paymentAgree.setContract_unid(s);
paymentAgreeMapper.deletePaymentAgree(paymentAgree.getPayment_unid());
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("删除付款预定信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("删除异常");
return failCode;
}
}
}
package com.vion.financial.service.imp;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.mapper.PersonMapper;
import com.vion.financial.model.Person;
import com.vion.financial.service.PersonService;
@Service
public class PersonServiceImp implements PersonService {
@Autowired
PersonMapper personMapper;
@Override
public Person query(int id) {
Person person=personMapper.query(id);
// TODO Auto-generated method stub
return person;
}
public ArrayList<Person> getAll(){
ArrayList<Person> arrayList=personMapper.getAll();
return arrayList;
}
public Object addPerson(Person person) {
Object o=personMapper.addPerson(person);
return o;
}
public Object update(Person person) {
Object o=personMapper.update(person);
return o;
}
public Object delete(int id) {
Object o=personMapper.delete(id);
return o;
}
}
package com.vion.financial.service.imp;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.Receipt;
import com.vion.financial.mapper.ReceiptMapper;
import com.vion.financial.service.ReceiptService;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.ReceiptVo;
import com.vion.financial.vo.SuccessCode;
@Service
public class ReceiptServiceImpl implements ReceiptService {
Logger logger =LoggerFactory.getLogger(ReceiptServiceImpl.class);
@Autowired
ReceiptMapper receiptMapper;
@Autowired
SuccessCode successCode;
@Autowired
FailCode failCode;
@Autowired
ContractServiceImpl contractServiceImpl;
@Override
public Object addReceipt(ReceiptVo receiptVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("=====================增加合同开票信息=====================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt: list) {
receipt.setContract_unid(s);
receiptMapper.addReceipt(receipt);
}
return successCode;
}else {
failCode.setEnode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) {
logger.error("增加开票信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("增加异常");
return failCode;
}
}
@Override
public Object queryReceipt(String s) {
// TODO Auto-generated method stub
try {
logger.info("========================查询合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) {
return receiptMapper.queryReceipt(s);
}else {
failCode.setEnode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) {
logger.error("查询开票信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("查询异常");
return failCode;
}
}
@Override
public Object updateReceipt(ReceiptVo receiptVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("===================修改合同开票信息========================");
if((boolean)contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getList_receipt_data();
for(Receipt receipt:list) {
receipt.setContract_unid(s);
receiptMapper.updateReceipt(receipt);
}
return successCode;
}
else {
failCode.setEnode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) {
logger.error("修改开票信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("修改异常");
return failCode;
}
}
@Override
public Object deleteReceipt(ReceiptVo receiptVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("=========================删除合同开票信息=======================");
if((boolean)contractServiceImpl.isDelete(s)) {
List<Receipt> list=receiptVo.getReceipt_unids();
for(Receipt receiptUnid :list) {
receiptMapper.deleteReceipt(receiptUnid.getReceipt_unid());
}
return successCode;
}
else {
failCode.setEnode("100");
failCode.setEnote("合同已删除");
return failCode;
}
} catch (Exception e) {
logger.error("删除开票信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("删除异常");
return failCode;
}
}
}
package com.vion.financial.service.imp;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.vion.financial.entity.ReturnInfo;
import com.vion.financial.mapper.ReturnInfoMapper;
import com.vion.financial.service.ReturnInfoService;
import com.vion.financial.vo.FailCode;
import com.vion.financial.vo.ReturnInfoVo;
import com.vion.financial.vo.SuccessCode;
@Service
public class ReturnInfoServiceImpl implements ReturnInfoService {
Logger logger=LoggerFactory.getLogger(ReturnInfoServiceImpl.class);
@Autowired
ReturnInfoMapper returnInfoMapper;
@Autowired
FailCode failCode;
@Autowired
ContractServiceImpl contractServiceImpl;
@Autowired
SuccessCode SuccessCode;
@Override
public Object addReturnInfo(ReturnInfoVo returnInfoVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("==============增加合同回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
returnInfoMapper.addReturnInfo(returnInfo);
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("增加回款信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("增加异常");
return failCode;
}
}
@Override
public Object queryReturnInfo(String s) {
// TODO Auto-generated method stub
try {
logger.info("===============查询回款信息=====================");
if((boolean) contractServiceImpl.isDelete(s)){
return returnInfoMapper.queryReturnInfo(s);
}else {
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("查询回款信息异常:"+e.getLocalizedMessage(), e);
failCode.setEnode("500");
failCode.setEnode("查询异常");
return failCode;
}
}
@Override
public Object updateReturnInfo(ReturnInfoVo returnInfoVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("==============修改回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = returnInfoVo.getList_reback_data();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
returnInfoMapper.updateReturnInfo(returnInfo);
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("修改回款信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("修改异常");
return failCode;
}
}
@Override
public Object deleteReturn(ReturnInfoVo paymentAgreeVo, String s) {
// TODO Auto-generated method stub
try {
logger.info("==============删除回款信息===================");
if((boolean) contractServiceImpl.isDelete(s)) {
List<ReturnInfo> list = paymentAgreeVo.getReback_unids();
for(ReturnInfo returnInfo:list) {
returnInfo.setContract_unid(s);
returnInfoMapper.deleteReturnInfo(returnInfo.getReback_unid());
}
return SuccessCode;
}else{
failCode.setEnode("100");
failCode.setEnode("合同已删除");
return failCode;
}
} catch (Exception e) {
// TODO: handle exception
logger.error("删除回款信息异常"+e.getLocalizedMessage(),e);
failCode.setEnode("500");
failCode.setEnode("删除异常");
return failCode;
}
}
}
package com.vion.financial.vo;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(value=Include.NON_NULL)
public class AppendixVo {
private int appendix_unid;
private String business_table;
private String business_unid;
private String appendix_name;
private String appendix_type;
private String appendix_url;
private MultipartFile[] appendix_files;
public int getAppendix_unid() {
return appendix_unid;
}
public void setAppendix_unid(int appendix_unid) {
this.appendix_unid = appendix_unid;
}
public String getBusiness_table() {
return business_table;
}
public void setBusiness_table(String business_table) {
this.business_table = business_table;
}
public String getBusiness_unid() {
return business_unid;
}
public void setBusiness_unid(String business_unid) {
this.business_unid = business_unid;
}
public String getAppendix_name() {
return appendix_name;
}
public void setAppendix_name(String appendix_name) {
this.appendix_name = appendix_name;
}
public String getAppendix_type() {
return appendix_type;
}
public void setAppendix_type(String appendix_type) {
this.appendix_type = appendix_type;
}
public String getAppendix_url() {
return appendix_url;
}
public void setAppendix_url(String appendix_url) {
this.appendix_url = appendix_url;
}
public MultipartFile[] getAppendix_files() {
return appendix_files;
}
public void setAppendix_files(MultipartFile[] appendix_files) {
this.appendix_files = appendix_files;
}
}
package com.vion.financial.vo;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.vion.financial.entity.Appendix;
import com.vion.financial.entity.PaymentAgree;
@JsonInclude(value=Include.NON_NULL)
public class ContractVo extends SelectVo{
private String contract_unid;
private String salesperson_unid;
private int project_unid;
private int customer_unid;
private String province;
private String city;
private String county;
private int guarantee_period;
private Date sign_date;
private String product_line_type;
private String contract_state;
private String contract_type;
private double contract_amount;
private double deduct_amount;
private String contract_amount_note;
private double stop_amount;
private String reback_note;
private double exemptions_amount;
private String contract_remain_note;
private boolean is_archive;
private double bad_amount;
private String bad_amount_note;
private double confirm_income_amount;
private String amount_state_unid;
private Date start_guarantee_date;
private Date end_guarantee_date;
private String mainten_start_point;
private String contract_note;
private boolean is_delete;
private List<Integer> appendix_unids;
private List<Appendix> appendix_list;
private String business_table;
private String business_unid;
private List<PaymentAgree> paymentAgree_list;
//private List<> payment_data;
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public String getSalesperson_unid() {
return salesperson_unid;
}
public void setSalesperson_unid(String salesperson_unid) {
this.salesperson_unid = salesperson_unid;
}
public int getProject_unid() {
return project_unid;
}
public void setProject_unid(int project_unid) {
this.project_unid = project_unid;
}
public int getCustomer_unid() {
return customer_unid;
}
public void setCustomer_unid(int customer_unid) {
this.customer_unid = customer_unid;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCounty() {
return county;
}
public void setCounty(String county) {
this.county = county;
}
public int getGuarantee_period() {
return guarantee_period;
}
public void setGuarantee_period(int guarantee_period) {
this.guarantee_period = guarantee_period;
}
public Date getSign_date() {
return sign_date;
}
public void setSign_date(Date sign_date) {
this.sign_date = sign_date;
}
public String getProduct_line_type() {
return product_line_type;
}
public void setProduct_line_type(String product_line_type) {
this.product_line_type = product_line_type;
}
public String getContract_state() {
return contract_state;
}
public void setContract_state(String contract_state) {
this.contract_state = contract_state;
}
public String getContract_type() {
return contract_type;
}
public void setContract_type(String contract_type) {
this.contract_type = contract_type;
}
public double getContract_amount() {
return contract_amount;
}
public void setContract_amount(double contract_amount) {
this.contract_amount = contract_amount;
}
public double getDeduct_amount() {
return deduct_amount;
}
public void setDeduct_amount(double deduct_amount) {
this.deduct_amount = deduct_amount;
}
public String getContract_amount_note() {
return contract_amount_note;
}
public void setContract_amount_note(String contract_amount_note) {
this.contract_amount_note = contract_amount_note;
}
public double getStop_amount() {
return stop_amount;
}
public void setStop_amount(double stop_amount) {
this.stop_amount = stop_amount;
}
public String getReback_note() {
return reback_note;
}
public void setReback_note(String reback_note) {
this.reback_note = reback_note;
}
public double getExemptions_amount() {
return exemptions_amount;
}
public void setExemptions_amount(double exemptions_amount) {
this.exemptions_amount = exemptions_amount;
}
public String getContract_remain_note() {
return contract_remain_note;
}
public void setContract_remain_note(String contract_remain_note) {
this.contract_remain_note = contract_remain_note;
}
public boolean isIs_archive() {
return is_archive;
}
public void setIs_archive(boolean is_archive) {
this.is_archive = is_archive;
}
public double getBad_amount() {
return bad_amount;
}
public void setBad_amount(double bad_amount) {
this.bad_amount = bad_amount;
}
public String getBad_amount_note() {
return bad_amount_note;
}
public void setBad_amount_note(String bad_amount_note) {
this.bad_amount_note = bad_amount_note;
}
public double getConfirm_income_amount() {
return confirm_income_amount;
}
public void setConfirm_income_amount(double confirm_income_amount) {
this.confirm_income_amount = confirm_income_amount;
}
public String getAmount_state_unid() {
return amount_state_unid;
}
public void setAmount_state_unid(String amount_state_unid) {
this.amount_state_unid = amount_state_unid;
}
public Date getStart_guarantee_date() {
return start_guarantee_date;
}
public void setStart_guarantee_date(Date start_guarantee_date) {
this.start_guarantee_date = start_guarantee_date;
}
public Date getEnd_guarantee_date() {
return end_guarantee_date;
}
public void setEnd_guarantee_date(Date end_guarantee_date) {
this.end_guarantee_date = end_guarantee_date;
}
public String getMainten_start_point() {
return mainten_start_point;
}
public void setMainten_start_point(String mainten_start_point) {
this.mainten_start_point = mainten_start_point;
}
public String getContract_note() {
return contract_note;
}
public void setContract_note(String contract_note) {
this.contract_note = contract_note;
}
public boolean isIs_delete() {
return is_delete;
}
public void setIs_delete(boolean is_delete) {
this.is_delete = is_delete;
}
public List<Integer> getAppendix_unids() {
return appendix_unids;
}
public void setAppendix_unids(List<Integer> appendix_unids) {
this.appendix_unids = appendix_unids;
}
public String getBusiness_table() {
return business_table;
}
public void setBusiness_table(String business_table) {
this.business_table = business_table;
}
public String getBusiness_unid() {
return business_unid;
}
public void setBusiness_unid(String business_unid) {
this.business_unid = business_unid;
}
public List<Appendix> getAppendix_list() {
return appendix_list;
}
public void setAppendix_list(List<Appendix> appendix_list) {
this.appendix_list = appendix_list;
}
public List<PaymentAgree> getPaymentAgree_list() {
return paymentAgree_list;
}
public void setPaymentAgree_list(List<PaymentAgree> paymentAgree_list) {
this.paymentAgree_list = paymentAgree_list;
}
}
package com.vion.financial.vo;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(value=Include.NON_NULL)
public class ContractsListVo {
int total_number; //总的数据量
int list_size; //本次返回的列表数量
int offset; //本次返回的起始索引
List<Object> list_data; //数据列表
public int getTotal_number() {
return total_number;
}
public void setTotal_number(int total_number) {
this.total_number = total_number;
}
public int getList_size() {
return list_size;
}
public void setList_size(int list_size) {
this.list_size = list_size;
}
public int getOffset() {
return offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public List<Object> getList_data() {
return list_data;
}
public void setList_data(List<Object> list_data) {
this.list_data = list_data;
}
}
package com.vion.financial.vo;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.vion.financial.entity.Appendix;
import com.vion.financial.entity.DeliverGoods;
@JsonInclude(value=Include.NON_NULL)
public class DeliverGoodsVo {
private Integer deliver_unid;
private String contract_unid;
private Date deliver_goods_date;
private Date goods_acceptanc_date;
List<DeliverGoods> list_deliver_data;
List<Integer> appendix_unids;
public List<DeliverGoods> getList_deliver_data() {
return list_deliver_data;
}
public void setList_deliver_data(List<DeliverGoods> list_deliver_data) {
this.list_deliver_data = list_deliver_data;
}
public Integer getDeliver_unid() {
return deliver_unid;
}
public void setDeliver_unid(Integer deliver_unid) {
this.deliver_unid = deliver_unid;
}
public String getContract_unid() {
return contract_unid;
}
public void setContract_unid(String contract_unid) {
this.contract_unid = contract_unid;
}
public Date getDeliver_goods_date() {
return deliver_goods_date;
}
public void setDeliver_goods_date(Date deliver_goods_date) {
this.deliver_goods_date = deliver_goods_date;
}
public Date getGoods_acceptanc_date() {
return goods_acceptanc_date;
}
public void setGoods_acceptanc_date(Date goods_acceptanc_date) {
this.goods_acceptanc_date = goods_acceptanc_date;
}
public List<Integer> getAppendix_unids() {
return appendix_unids;
}
public void setAppendix_unids(List<Integer> appendix_unids) {
this.appendix_unids = appendix_unids;
}
}
package com.vion.financial.vo;
import org.springframework.stereotype.Component;
@Component
public class FailCode {
private String enode="400";
private String enote="FAIL";
public String getEnode() {
return enode;
}
public void setEnode(String enode) {
this.enode = enode;
}
public String getEnote() {
return enote;
}
public void setEnote(String enote) {
this.enote = enote;
}
}
package com.vion.financial.vo;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.vion.financial.entity.PaymentAgree;
@JsonInclude(value=Include.NON_NULL)
public class PaymentAgreeVo {
private List<PaymentAgree> list_payment_data;
public List<PaymentAgree> getList_payment_data() {
return list_payment_data;
}
public void setList_payment_data(List<PaymentAgree> list_payment_data) {
this.list_payment_data = list_payment_data;
}
}
package com.vion.financial.vo;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.vion.financial.entity.Receipt;
@JsonInclude(value=Include.NON_NULL)
public class ReceiptVo {
List<Receipt> list_receipt_data;
List<Receipt> receipt_unids;
public List<Receipt> getList_receipt_data() {
return list_receipt_data;
}
public void setList_receipt_data(List<Receipt> list_receipt_data) {
this.list_receipt_data = list_receipt_data;
}
public List<Receipt> getReceipt_unids() {
return receipt_unids;
}
public void setReceipt_unids(List<Receipt> receipt_unids) {
this.receipt_unids = receipt_unids;
}
}
package com.vion.financial.vo;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.vion.financial.entity.ReturnInfo;
@JsonInclude(value=Include.NON_NULL)
public class ReturnInfoVo {
List<ReturnInfo> list_reback_data;
List<ReturnInfo> reback_unids;
public List<ReturnInfo> getList_reback_data() {
return list_reback_data;
}
public void setList_reback_data(List<ReturnInfo> list_reback_data) {
this.list_reback_data = list_reback_data;
}
public List<ReturnInfo> getReback_unids() {
return reback_unids;
}
public void setReback_unids(List<ReturnInfo> reback_unids) {
this.reback_unids = reback_unids;
}
}
package com.vion.financial.vo;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@JsonInclude(value=Include.NON_NULL)
public class SelectVo {
private String salesperson_name__like;
private String project_name__like;
private String customer_name__like;
private String province;
private String city;
private String county;
private int guarantee_period;
private String year;
private String month;
private String product_line_type;
private String contract_state;
private String contract_type;
private String acceptanc_type;
private boolean is_archive;
private double confirm_income_amount;
private String amount_state_unid;
private Date start_date;
private Date end_date;
private double amount_point;
private int overdays_point;
private double leave_amount_point;
private int offset;
private int limit;
}
package com.vion.financial.vo;
import org.springframework.stereotype.Component;
@Component
public class SuccessCode {
public String ecode="200";
public String enote="OK";
}
server:
port: 8080
spring:
thymeleaf:
prefix: classpath:/templates/thymeleaf/
suffix: .html
mode: HTML5
encoding: UTF-8
cache: false
datasource:
url: jdbc:postgresql://192.168.9.162:5432/financial_serv
username: postgres
password: authpass
driver-class-name: org.postgresql.Driver
hikari:
connection-timeout: 1800000
maximum-pool-size: 20
# hikari:
# maximum-pool-size:
http:
multipart:
max-file-size: 20Mb
max-request-size: 40Mb
mybatis:
mapper-locations: com/vion/financial/mapping/*.xml
logging:
level:
root: INFO
pattern:
level: INFO
console: "[financial_serv]-[%d{yyyy-MM-dd HH:mm:ss.SSS}]-%m%n"
path: F:\LOG\
#pagehelper:
# helperDialect: postgresql
# reasonable: true
# supportMethodsArguments: true
# params: count=countSql
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<context id="context1">
<jdbcConnection connectionURL="jdbc:postgresql://localhost:5432/financial_serv" driverClass="org.postgresql.Driver" password="vion" userId="postgres" />
<javaModelGenerator targetPackage="com.vion.financial.entity" targetProject="/FinancialSystem/src/main/java" />
<sqlMapGenerator targetPackage="com.vion.financial.mapping" targetProject="/FinancialSystem/src/main/java" />
<javaClientGenerator targetPackage="com.vion.financial.mapper" targetProject="/FinancialSystem/src/main/java" type="XMLMAPPER" />
<table schema="???" tableName="???">
<columnOverride column="???" property="???" />
</table>
</context>
</generatorConfiguration>
\ No newline at end of file \ No newline at end of file
<!-- <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
数据库驱动:选择你的本地硬盘上面的数据库驱动包
<classPathEntry location="E:\developer\mybatis-generator-core-1.3.2\lib\mysql-connector-java-5.1.25-bin.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true"/>
是否去除自动生成的注释 true:是 : false:否
<property name="suppressAllComments" value="true"/>
</commentGenerator>
数据库链接URL,用户名、密码
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1/mytest" userId="root" password="root">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
生成模型的包名和位置
<javaModelGenerator targetPackage="com.winter.model" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
生成映射文件的包名和位置
<sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
生成DAO的包名和位置
<javaClientGenerator type="XMLMAPPER" targetPackage="com.winter.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名
<table tableName="t_user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration> -->
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!