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 4479 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
<?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
<?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
<?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
<?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
<?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
<?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
<?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
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.utils;
import java.text.DateFormatSymbols;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
public class DateUtil {
private static DateFormatSymbols dateformatSymbols = new DateFormatSymbols(Locale.getDefault());
static{
dateformatSymbols.setShortWeekdays(new String[]{"","周日","周一","周二","周三","周四","周五","周六"});
}
/**
* 英文简写(默认)如:2010
*/
public static SimpleDateFormat FORMAT_YYYY = new SimpleDateFormat("yyyy");
/**
* 英文简写(默认)如:2010-12-31 24
*/
public static SimpleDateFormat FORMAT_YYYY_MM_DD_HH = new SimpleDateFormat("yyyy-MM-dd HH");
/**
* 英文简写(默认)如:2010-12-31
*/
public static SimpleDateFormat FORMAT_YYYY_MM_DD = new SimpleDateFormat("yyyy-MM-dd");
/**
* 英文简写(默认)如:12-31 24
*/
public static SimpleDateFormat FORMAT_MM_DD_HH = new SimpleDateFormat("MM-dd HH");
/**
* 英文简写(默认)如:31 24
*/
public static SimpleDateFormat FORMAT_DD_HH = new SimpleDateFormat("dd HH");
/**
* 英文简写(默认)如:24
*/
public static SimpleDateFormat FORMAT_HH = new SimpleDateFormat("HH");
/**
* 星期的简写 周一 周二 周三 周四等
*/
public static SimpleDateFormat FORMAT_DAY_OF_WEEK_SORT = new SimpleDateFormat("E",dateformatSymbols);
/**
* 英文简写(默认)如:2010-12
*/
public static SimpleDateFormat FORMAT_YYYY_MM = new SimpleDateFormat("yyyy-MM");
/**
* 英文简写(默认)如:12-31
*/
public static SimpleDateFormat FORMAT_MM_DD = new SimpleDateFormat("MM-dd");
/**
* 英文简写带星期(默认)如:12-31(周三)
*/
public static SimpleDateFormat FORMAT_MM_DD_E = new SimpleDateFormat("MM-dd(E)",dateformatSymbols);
/**
* 英文简写(默认)如:31
*/
public static SimpleDateFormat FORMAT_DD = new SimpleDateFormat("dd");
/**
* 英文简写(默认)如:2010-12-01
*/
public static SimpleDateFormat FORMAT_SHORT = new SimpleDateFormat("yyyy-MM-dd");
/**
* 英文全称 如:2010-12-01 23:15
*/
public static SimpleDateFormat FORMAT_YYYY_MM_DD_HH_MM = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
/**
* 英文全称 如:2010-12-01 23:15:06
*/
public static SimpleDateFormat FORMAT_LONG = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
/**
* 精确到毫秒的完整时间 如:2010-12-01 23:15:06.999
*/
public static SimpleDateFormat FORMAT_FULL = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
/**
* 中文简写 如:2010年12月01日
*/
public static SimpleDateFormat FORMAT_SHORT_CN = new SimpleDateFormat("yyyy年MM月dd日");
/**
* 中文简写 如:2010年12月01日(周日)
*/
public static SimpleDateFormat FORMAT_SHORT_CN_WEEK = new SimpleDateFormat("yyyy年MM月dd日(E)",dateformatSymbols);
public static SimpleDateFormat FORMAT_SHORT_WEEK = new SimpleDateFormat("yyyy-MM-dd(E)",dateformatSymbols);
/**
* 中文全称 如:2010年12月01日 23时15分06秒
*/
public static SimpleDateFormat FORMAT_LONG_CN = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒");
/**
* 精确到毫秒的完整中文时间 如:2010年12月01日 23时15分06秒999毫秒
*/
public static SimpleDateFormat FORMAT_FULL_CN = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒SSS毫秒");
public static final int FIRST_DAY_OF_WEEK = Calendar.MONDAY; // 中国周一是一周的第一天
public static SimpleDateFormat FORMAT_HHMMSS = new SimpleDateFormat("HH:mm:ss.S");
public static SimpleDateFormat FORMAT_HHMM = new SimpleDateFormat("HH:mm");
public static SimpleDateFormat FORMAT_UTC = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
/**
* 获取上周同期
* @param date
* @return 上周同天
*/
public static Date getLastWeek(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.WEEK_OF_MONTH, -1);
return calendar.getTime();
}
/**
* 获取上月同期
* @param date 当日
* @return
*/
public static Date getLastMonth(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.MONTH, -1);
return calendar.getTime();
}
/**
* 获取下月同期
* @param date 当日
* @return
*/
public static Date getNextMonth(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.MONTH, 1);
return calendar.getTime();
}
/**
* 获取去年同期
* @param date 当日
* @return
*/
public static Date getLastYear(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.YEAR, -1);
return calendar.getTime();
}
/**
* 获取昨日日期
* @param date 当日
* @return
*/
public static Date getYesterday(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_YEAR, -1);
return calendar.getTime();
}
/**
* 获取明天日期
* @param date 当日
* @return
*/
public static Date getTorromow(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_YEAR, 1);
return calendar.getTime();
}
/**
* 获取下一小时
* @param date 日期
* @return
*/
public static Date getNextHour(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.HOUR_OF_DAY, 1);
return calendar.getTime();
}
/**
* 获取前一小时
* @param date 日期
* @return
*/
public static Date getPreviousHour(Date date){
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.HOUR_OF_DAY, -1);
return calendar.getTime();
}
/**
* 判断 yesterDay 是否是 today 的昨天
* @param today 今天日期
* @param yesterDay 昨天日期
* @return
*/
public static boolean isYesterday(Date today,Date yesterDay){
return isSameDay(getYesterday(today), yesterDay);
}
/**
* 判断 lastWeekDay 是否是 today 的上周同期
* @param today 今天日期
* @param lastWeekDay 上周同期日期
* @return
*/
public static boolean isLastWeekDay(Date today,Date lastWeekDay){
return isSameDay(getLastWeek(today), lastWeekDay);
}
/**
* 判断 lastMonthDay 是否是 today 的上月同期
* @param today 今天日期
* @param lastMonthDay 上月同期
* @return
*/
public static boolean isLastMonthDay(Date today,Date lastMonthDay){
return isSameDay(getLastMonth(today), lastMonthDay);
}
/**
* 判断 lastYearDay 是否是 today 的去年同期
* @param today 今天日期
* @param lastYearDay 去年同期日期
* @return
*/
public static boolean isLastYearDay(Date today,Date lastYearDay){
return isSameDay(getLastYear(today),lastYearDay);
}
/**
* 判断两个日期是否是同一天
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameHour(Date date1,Date date2){
if(!isSameDay(date1, date2)){
return false;
}
if(date1.getHours()!=date2.getHours()){
return false;
}
return true;
}
/**
* 判断两个日期是否是同一天
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameDay(Date date1,Date date2){
if(!isSameMonth(date1, date2)){
return false;
}
if(date1.getDate()!=date2.getDate()){
return false;
}
return true;
}
/**
* 判断两个日期是否是同一周
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameWeek(Date week, Date otherWeek) {
return isSameDay(getMondayOfWeek(week), getMondayOfWeek(otherWeek));
}
/**
* 判断两个日期是否是同一月
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameMonth(Date date1,Date date2){
if(date1.getYear()!=date2.getYear()){
return false;
}
if(date1.getMonth()!=date2.getMonth()){
return false;
}
return true;
}
/***
* 判断日期2是否是日期1的上周
* @param date1
* @param date2
* @return
*/
public static boolean isLastWeek(Date date1,Date date2){
return isSameWeek(getLastWeek(date1), date2);
}
/***
/***
* 判断日期2是否是日期1的上月
* @param date1
* @param date2
* @return
*/
public static boolean isLastMonth(Date date1,Date date2){
return isSameMonth(getLastMonth(date1), date2);
}
/***
* 判断日期2是否是日期1的去年同月
* @param date1
* @param date2
* @return
*/
public static boolean isLastYearMonth(Date date1,Date date2){
return isSameMonth(getLastYear(date1), date2);
}
/**
* 判断两个日期是否是同一季度
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameSeason(Date date1,Date date2){
return getSeason(date1)==getSeason(date2);
}
/**
* 判断 日期2 是否是 日期1的 上一季度
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isLastSeason(Date date1,Date date2){
return getSeason(date1)==getSeason(date2)+1;
}
/**
* 判断两个日期是否是同一年
* @param date1 日期1
* @param date2 日期2
* @return
*/
public static boolean isSameYear(Date date1,Date date2){
if(date1.getYear()!=date2.getYear()){
return false;
}
return true;
}
/**
* 将HH:mm解析成整点对象
* @param HMStr
* @param before true 往前取整 false 往后取整
* @return
* @throws ParseException 解析异常
*/
public static Date parseHMDate2NowTime(String HMStr,boolean before) throws ParseException{
Calendar calendar = Calendar.getInstance();
Date HMTime = FORMAT_HHMM.parse(HMStr);
calendar.setTime(HMTime);
int hour = calendar.get(Calendar.HOUR_OF_DAY);
int minute = calendar.get(Calendar.MINUTE);
int second = calendar.get(Calendar.SECOND);
int milliSecond = calendar.get(Calendar.MILLISECOND);
if(before){
hour = hour;
minute = 0;
second = 0;
milliSecond = 0;
}else{
hour = hour;
minute = 59;
second = 59;
milliSecond = 999;
}
calendar.set(Calendar.HOUR_OF_DAY,hour);
calendar.set(Calendar.MINUTE, minute);
calendar.set(Calendar.SECOND, second);
calendar.set(Calendar.MILLISECOND, milliSecond);
return calendar.getTime();
}
/**
* 将日期设置为整点
* @param date 需要设置的日期
* @param HMTime 小时分钟信息
* @param before true 是指向前取整 false 向后取整 小时会+1
* @return
*/
public static Date setDayHMS(Date date,Date HMTime) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.HOUR_OF_DAY,HMTime.getHours());
calendar.set(Calendar.MINUTE, HMTime.getMinutes());
calendar.set(Calendar.SECOND, HMTime.getSeconds());
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
}
/**
* 将日期设置为对应的时分信息
* @param date 需要设置的日期
* @param HMTime 小时分钟信息
* @return
* @throws ParseException
*/
public static Date setDayHM(Date date,String HMTimeStr) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);//HH:mm:ss.S
Date HMTime = null;
try {
HMTime = FORMAT_HHMM.parse(HMTimeStr);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar hmCalendar = Calendar.getInstance();
hmCalendar.setTime(HMTime);//HH:mm:ss.S
calendar.set(Calendar.HOUR_OF_DAY, hmCalendar.get(Calendar.HOUR_OF_DAY));
calendar.set(Calendar.MINUTE, hmCalendar.get(Calendar.MINUTE));
calendar.set(Calendar.SECOND, 0);
return calendar.getTime();
}
/**
* 将日期设置为对应的时分秒
* @param date 需要设置的日期
* @param HMSTime 小时分钟秒信息
* @return
* @throws ParseException
*/
public static Date setDayHMS(Date date,String HMSTimeStr) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);//HH:mm:ss.S
Date HMSTime = null;
try {
HMSTime = FORMAT_HHMMSS.parse(HMSTimeStr);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar hmsCalendar = Calendar.getInstance();
hmsCalendar.setTime(HMSTime);//HH:mm:ss.S
calendar.set(Calendar.HOUR_OF_DAY, hmsCalendar.get(Calendar.HOUR_OF_DAY));
calendar.set(Calendar.MINUTE, hmsCalendar.get(Calendar.MINUTE));
calendar.set(Calendar.SECOND, hmsCalendar.get(Calendar.SECOND));
return calendar.getTime();
}
/**
* 将日期设置为对应的时分秒
* @param date 需要设置的日期
* @param HMSTime 小时分钟秒信息
* @return
* @throws ParseException
*/
public static Date setDayH(Date date,String HTimeStr) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);//HH:mm:ss.S
Date HTime = null;
try {
HTime = FORMAT_HH.parse(HTimeStr);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar hCalendar = Calendar.getInstance();
hCalendar.setTime(HTime);//HH:mm:ss.S
calendar.set(Calendar.HOUR_OF_DAY, hCalendar.get(Calendar.HOUR_OF_DAY));
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
return calendar.getTime();
}
/**
* 获取时间戳
*/
public static String getTimeString() {
Calendar calendar = Calendar.getInstance();
return FORMAT_FULL.format(calendar.getTime());
}
/**
* 获取日期年份
* @param date 日期
* @return
*/
public static int getYear(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.YEAR);
}
/**
* 功能描述:返回月
*
* @param date
* Date 日期
* @return 返回月份
*/
public static int getMonth(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.MONTH) + 1;
}
/**
* 功能描述:返回日
*
* @param date
* Date 日期
* @return 返回日份
*/
public static int getDay(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.DAY_OF_MONTH);
}
/**
* 功能描述:返回小时
*
* @param date
* 日期
* @return 返回小时
*/
public static int getHour(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.HOUR_OF_DAY);
}
/**
* 功能描述:返回分
*
* @param date
* 日期
* @return 返回分钟
*/
public static int getMinute(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.MINUTE);
}
/**
* 功能描述:返回分
*
* @param date
* 日期
* @return 返回分钟
*/
public static int getMinuteOfDay(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.HOUR_OF_DAY)*60+calendar.get(Calendar.MINUTE);
}
/**
* 返回秒钟
*
* @param date
* Date 日期
* @return 返回秒钟
*/
public static int getSecond(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(Calendar.SECOND);
}
/**
* 功能描述:返回毫秒
*
* @param date
* 日期
* @return 返回毫
*/
public static int getMillis(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(calendar.MILLISECOND);
}
/**
* 取得当天日期是周几
*
* @param date
* @return
*/
public static int getDayOfWeek(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.setFirstDayOfWeek(FIRST_DAY_OF_WEEK);
int day_of_week = c.get(Calendar.DAY_OF_WEEK);
day_of_week-=1;
if(day_of_week == 0){
day_of_week = 7;
}
return day_of_week;
}
/**
* 获取一个月 周一 到 周日 的个数 用count存储
* @param date
* @return 下标0 代表周一的天数 下表1代表周二的天数 依次类推
*/
public static int[] getCountDayOfWeekInMonth(Date date){
int[] count = new int[7];
Date firstDate = getFirstDateOfMonth(date);
int dayOfWeek = getDayOfWeek(firstDate);
int dayOfMonth = getPassDayOfMonth(date);
for (int i = 0; i < dayOfMonth; i++) {
count[dayOfWeek-1]++;
dayOfWeek++;
if(dayOfWeek>7){
dayOfWeek=1;
}
}
return count;
}
/**
* 取得一月的第几周
*
* @param date
* @return
*/
public static int getWeekOfMonth(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
int week_of_year = c.get(Calendar.WEEK_OF_MONTH);
return week_of_year;
}
/**
* 取得一年的第几周
*
* @param date
* @return
*/
public static int getWeekOfYear(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
int week_of_year = c.get(Calendar.WEEK_OF_YEAR);
return week_of_year;
}
/**
* 根据日期取得对应周周一日期
*
* @param date
* @return
*/
public static Date getMondayOfWeek(Date date) {
Calendar monday = Calendar.getInstance();
monday.setTime(date);
monday.setFirstDayOfWeek(FIRST_DAY_OF_WEEK);
monday.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
return monday.getTime();
}
/**
* 根据日期取得对应周周日日期
*
* @param date
* @return
*/
public static Date getSundayOfWeek(Date date) {
Calendar sunday = Calendar.getInstance();
sunday.setTime(date);
sunday.setFirstDayOfWeek(FIRST_DAY_OF_WEEK);
sunday.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
return sunday.getTime();
}
/**
* 根据日期取得对应月的第一个相同周几
*
* @param date
* @return
*/
public static Date getFirsSametWeekOfMonth(Date date) {
Calendar c = Calendar.getInstance();
date = setDayMinTime(date);
c.setTime(date);
int weekIndex = c.get(Calendar.DAY_OF_WEEK);
c.set(Calendar.DAY_OF_MONTH,1);
while (true) {
if(weekIndex == c.get(Calendar.DAY_OF_WEEK))
break;
c.add(Calendar.DAY_OF_MONTH, 1);
}
return c.getTime();
}
/**
* 取得月的剩余天数
*
* @param date
* @return
*/
public static int getRemainDayOfMonth(Date date) {
int dayOfMonth = getDayOfMonth(date);
int day = getPassDayOfMonth(date);
return dayOfMonth - day;
}
/**
* 取得月已经过的天数
*
* @param date
* @return
*/
public static int getPassDayOfMonth(Date date) {
Date monthStart = setDayMinTime(getFirstDateOfMonth(new Date()));
if(monthStart.after(date))
return getDayOfMonth(date);
Date monthEnd = setDayMaxTime(getLastDateOfMonth(new Date()));
if(monthEnd.before(date))
return 0;
Calendar c = Calendar.getInstance();
c.setTime(new Date());
return c.get(Calendar.DAY_OF_MONTH);
}
/**
* 取得月天数
*
* @param date
* @return
*/
public static int getDayOfMonth(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
return c.getActualMaximum(Calendar.DAY_OF_MONTH);
}
/**
* 取得月第一天
*
* @param date
* @return
*/
public static Date getFirstDateOfMonth(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));
return c.getTime();
}
/**
* 取得月最后一天
*
* @param date
* @return
*/
public static Date getLastDateOfMonth(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
return c.getTime();
}
/**
* 取得季度第一天
*
* @param date
* @return
*/
public static Date getFirstDateOfSeason(Date date) {
return getFirstDateOfMonth(getSeasonDate(date)[0]);
}
/**
* 取得季度最后一天
*
* @param date
* @return
*/
public static Date getLastDateOfSeason(Date date) {
return getLastDateOfMonth(getSeasonDate(date)[2]);
}
/**
* 取得季度天数
*
* @param date
* @return
*/
public static int getDayOfSeason(Date date) {
int day = 0;
Date[] seasonDates = getSeasonDate(date);
for (Date date2 : seasonDates) {
day += getDayOfMonth(date2);
}
return day;
}
/**
* 取得季度剩余天数
*
* @param date
* @return
*/
public static int getRemainDayOfSeason(Date date) {
return getDayOfSeason(date) - getPassDayOfSeason(date);
}
/**
* 取得季度已过天数
*
* @param date
* @return
*/
public static int getPassDayOfSeason(Date date) {
int day = 0;
Date[] seasonDates = getSeasonDate(date);
Calendar c = Calendar.getInstance();
c.setTime(date);
int month = c.get(Calendar.MONTH);
if (month == Calendar.JANUARY || month == Calendar.APRIL
|| month == Calendar.JULY || month == Calendar.OCTOBER) {// 季度第一个月
day = getPassDayOfMonth(seasonDates[0]);
} else if (month == Calendar.FEBRUARY || month == Calendar.MAY
|| month == Calendar.AUGUST || month == Calendar.NOVEMBER) {// 季度第二个月
day = getDayOfMonth(seasonDates[0])
+ getPassDayOfMonth(seasonDates[1]);
} else if (month == Calendar.MARCH || month == Calendar.JUNE
|| month == Calendar.SEPTEMBER || month == Calendar.DECEMBER) {// 季度第三个月
day = getDayOfMonth(seasonDates[0]) + getDayOfMonth(seasonDates[1])
+ getPassDayOfMonth(seasonDates[2]);
}
return day;
}
/**
* 取得季度月
*
* @param date
* @return
*/
public static Date[] getSeasonDate(Date date) {
Date[] season = new Date[3];
Calendar c = Calendar.getInstance();
c.setTime(date);
int nSeason = getSeason(date);
if (nSeason == 1) {// 第一季度
c.set(Calendar.MONTH, Calendar.JANUARY);
season[0] = c.getTime();
c.set(Calendar.MONTH, Calendar.FEBRUARY);
season[1] = c.getTime();
c.set(Calendar.MONTH, Calendar.MARCH);
season[2] = c.getTime();
} else if (nSeason == 2) {// 第二季度
c.set(Calendar.MONTH, Calendar.APRIL);
season[0] = c.getTime();
c.set(Calendar.MONTH, Calendar.MAY);
season[1] = c.getTime();
c.set(Calendar.MONTH, Calendar.JUNE);
season[2] = c.getTime();
} else if (nSeason == 3) {// 第三季度
c.set(Calendar.MONTH, Calendar.JULY);
season[0] = c.getTime();
c.set(Calendar.MONTH, Calendar.AUGUST);
season[1] = c.getTime();
c.set(Calendar.MONTH, Calendar.SEPTEMBER);
season[2] = c.getTime();
} else if (nSeason == 4) {// 第四季度
c.set(Calendar.MONTH, Calendar.OCTOBER);
season[0] = c.getTime();
c.set(Calendar.MONTH, Calendar.NOVEMBER);
season[1] = c.getTime();
c.set(Calendar.MONTH, Calendar.DECEMBER);
season[2] = c.getTime();
}
return season;
}
/**
*
* 1 第一季度 2 第二季度 3 第三季度 4 第四季度
*
* @param date
* @return
*/
public static int getSeason(Date date) {
int season = 0;
Calendar c = Calendar.getInstance();
c.setTime(date);
int month = c.get(Calendar.MONTH);
switch (month) {
case Calendar.JANUARY:
case Calendar.FEBRUARY:
case Calendar.MARCH:
season = 1;
break;
case Calendar.APRIL:
case Calendar.MAY:
case Calendar.JUNE:
season = 2;
break;
case Calendar.JULY:
case Calendar.AUGUST:
case Calendar.SEPTEMBER:
season = 3;
break;
case Calendar.OCTOBER:
case Calendar.NOVEMBER:
case Calendar.DECEMBER:
season = 4;
break;
default:
break;
}
return season;
}
/**
* 取得年第一天
*
* @param date
* @return
*/
public static Date getFirstDateOfYear(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.DAY_OF_YEAR, c.getActualMinimum(Calendar.DAY_OF_YEAR));
return setDayMinTime(c.getTime());
}
/**
* 取得年最后一天
*
* @param date
* @return
*/
public static Date getLastDateOfYear(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.DAY_OF_YEAR, c.getActualMaximum(Calendar.DAY_OF_YEAR));
return setDayMaxTime(c.getTime());
}
/**
* String转Date
* 支持:2010-12-01 23:15:06.999
* 2010-12-01 23:15:06
* 2010-12-01 23:15
* 2010-12-01
* @param dateStr
* @return
* @throws ParseException
*/
public static Date dateFormat(String dateStr) throws ParseException{
if(dateStr.length()==23)
return DateUtil.FORMAT_FULL.parse(dateStr);
if(dateStr.length()==19)
return DateUtil.FORMAT_LONG.parse(dateStr);
else if(dateStr.length()==16)
return DateUtil.FORMAT_YYYY_MM_DD_HH_MM.parse(dateStr);
else if(dateStr.length()==10)
return DateUtil.FORMAT_SHORT.parse(dateStr);
else
return null;
}
/**
* 设置一天的最大值
* @param date
* @return
*/
public static Date setDayMaxTime(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.HOUR_OF_DAY, c.getActualMaximum(Calendar.HOUR_OF_DAY));
c.set(Calendar.MINUTE, c.getActualMaximum(Calendar.MINUTE));
c.set(Calendar.SECOND, c.getActualMaximum(Calendar.SECOND));
c.set(Calendar.MILLISECOND, c.getActualMaximum(Calendar.MILLISECOND));
return c.getTime();
}
/**
* 设置一天的最小值
* @param date
* @return
*/
public static Date setDayMinTime(Date date) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.set(Calendar.HOUR_OF_DAY, c.getActualMinimum(Calendar.HOUR_OF_DAY));
c.set(Calendar.MINUTE, c.getActualMinimum(Calendar.MINUTE));
c.set(Calendar.SECOND, c.getActualMinimum(Calendar.SECOND));
c.set(Calendar.MILLISECOND, c.getActualMinimum(Calendar.MILLISECOND));
return c.getTime();
}
/**
* 当前日期加n毫秒
* @param date
* @param num
* @return
*/
public static Date dateAddMillisecond(Date date,int num) {
Calendar c = Calendar.getInstance();
c.setTime(date);
c.add(Calendar.MILLISECOND, num);
return c.getTime();
}
/**
* 获取两个时间点之间的天
* @param startDate 开始时间
* @param endDate 结束时间
* @return
*/
public static List<Date> getDaysBetweenStartDateAndEndDate(Date startDate,Date endDate) {
List<Date> dates = new ArrayList<>();
Calendar c = Calendar.getInstance();
c.setTime(startDate);
while (c.getTime().before(endDate)) {
dates.add(c.getTime());
c.add(Calendar.DAY_OF_MONTH, 1);
}
dates.add(endDate);
return dates;
}
/**
* 将字符串解析成时间,如果无法解析返回null
* @param sdf
* @param dateStr
* @return
*/
public static Date parseDate(SimpleDateFormat sdf, String dateStr){
try {
return sdf.parse(dateStr);
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}
public static Date maxDate(Date date1,Date date2){
if(date1.before(date2)){
return date2;
}else{
return date1;
}
}
public static Date minDate(Date date1,Date date2){
if(date1.before(date2)){
return date1;
}else{
return date2;
}
}
}
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
<?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
<!-- <?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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!