Commit b4e761f6 by 王军业

[删除无用代码以及加入注解]

1 parent a1ed6932
Showing 28 changed files with 273 additions and 410 deletions
......@@ -32,7 +32,7 @@ public class DeliverGoodsController extends BaseController{
}
/**
*
* 增加某一合同的发货信息
* @param deliverGoodsVo
* @param contract_unid
* @return
......@@ -43,12 +43,24 @@ public class DeliverGoodsController extends BaseController{
return deliverGoodsService.addDeliverGoods(deliverGoodsVo, contract_unid);
}
/**
* 修改某一合同的发货信息
* @param deliverGoodsVo
* @param contract_unid
* @return
*/
@PutMapping("/{contract_unid}/delivers")
@ResponseBody
public Object updateDeliverInf(@RequestBody DeliverGoodsVo deliverGoodsVo,@PathVariable String contract_unid) {
return deliverGoodsService.updateDeliverGoods(deliverGoodsVo, contract_unid);
}
/**
* 删除某一合同的发货信息
* @param deliverGoodsVo
* @param contract_unid
* @return
*/
@DeleteMapping("/{contract_unid}/delivers")
@ResponseBody
public Object deleteDeliverInfo(@RequestBody DeliverGoodsVo deliverGoodsVo,@PathVariable String contract_unid) {
......
......@@ -22,24 +22,47 @@ public class PaymentAgreeController extends BaseController{
@Resource
PaymentAgreeService PaymentAgreeService;
/**
* 查询某一合同的付款预定信息
* @param contract_unid
* @return
*/
@GetMapping("/{contract_unid}/payments")
@ResponseBody
public Object queryPaymentInfo(@PathVariable String contract_unid) {
return PaymentAgreeService.queryPaymentAgree(contract_unid);
}
/**
* 增加某一合同的付款约定信息
* @param paymentAgreeVo
* @param contract_unid
* @return
*/
@PostMapping("/{contract_unid}/payments")
@ResponseBody
public Object addPaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
return PaymentAgreeService.addPaymentAgree(paymentAgreeVo,contract_unid);
}
/**
* 修改某一合同的付款约定信息
* @param paymentAgreeVo
* @param contract_unid
* @return
*/
@PutMapping("/{contract_unid}/payments")
@ResponseBody
public Object updatePaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
return PaymentAgreeService.updatePaymentAgree(paymentAgreeVo,contract_unid);
}
/**
* 删除某一合同的付款约定信息
* @param paymentAgreeVo
* @param contract_unid
* @return
*/
@DeleteMapping("/{contract_unid}/payments")
@ResponseBody
public Object deletePaymentInfo(@RequestBody PaymentAgreeVo paymentAgreeVo,@PathVariable String contract_unid) {
......
......@@ -22,24 +22,47 @@ public class ProjectAcceptancController extends BaseController{
@Resource
ProjectAcceptancService projectAcceptancService;
/**
* 查询某一合同的工程验收信息
* @param contract_unid
* @return
*/
@GetMapping("/{contract_unid}/project/acceptancs")
@ResponseBody
public Object queryAcceptancInfo(@PathVariable String contract_unid) {
return projectAcceptancService.queryProjectAcceptanc(contract_unid);
}
/**
* 增加某一合同的工程验收信息
* @param projectAcceptancVo
* @param contract_unid
* @return
*/
@PostMapping("/{contract_unid}/project/acceptancs")
@ResponseBody
public Object addAcceptancInfo(@RequestBody ProjectAcceptancVo projectAcceptancVo,@PathVariable String contract_unid) {
return projectAcceptancService.addProjectAcceptanc(projectAcceptancVo,contract_unid);
}
/**
* 修改某一合同的工程验收信息
* @param projectAcceptancVo
* @param contract_unid
* @return
*/
@PutMapping("/{contract_unid}/project/acceptancs")
@ResponseBody
public Object updateAcceptancInfo(@RequestBody ProjectAcceptancVo projectAcceptancVo,@PathVariable String contract_unid) {
return projectAcceptancService.updateProjectAcceptanc(projectAcceptancVo, contract_unid);
}
/**
* 删除某一合同的工程验收信息
* @param projectAcceptancVo
* @param contract_unid
* @return
*/
@DeleteMapping("/{contract_unid}/project/acceptancs")
@ResponseBody
public Object deleteAcceptancInfo(@RequestBody ProjectAcceptancVo projectAcceptancVo,@PathVariable String contract_unid) {
......
......@@ -20,24 +20,43 @@ public class ProjectController extends BaseController{
@Autowired
ProjectService projectService;
/**
* 增加项目名称
* @param project
* @return
*/
@PostMapping(value="/projects")
@ResponseBody
public Object addProject(@RequestBody Project project) {
return projectService.addProject(project);
}
/**
* 查询项目列表
* @return
*/
@GetMapping(value="/projects")
@ResponseBody
public Object queryProject() {
return projectService.queryProject();
}
/**
* 修改项目名称
* @param project
* @return
*/
@PutMapping(value="/projects")
@ResponseBody
public Object updateProject(@RequestBody Project project) {
return projectService.updateProject(project);
}
/**
* 删除某一项目
* @param project
* @return
*/
@DeleteMapping(value="/projects")
@ResponseBody
public Object deleteProject(@RequestBody Project project) {
......
......@@ -19,24 +19,47 @@ public class ReceiptController extends BaseController{
@Autowired
ReceiptService receiptService;
/**
* 增加开票信息
* @param receiptVo
* @param contract_unid
* @return
*/
@PostMapping("/{contract_unid}/receipts")
@ResponseBody
public Object addReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
return receiptService.addReceipt(receiptVo, contract_unid);
}
/**
* 查询开票信息
* @param contract_unid
* @return
*/
@GetMapping("/{contract_unid}/receipts")
@ResponseBody
public Object queryReceiptInfo(@PathVariable String contract_unid) {
return receiptService.queryReceipt(contract_unid);
}
/**
* 修改开票信息
* @param receiptVo
* @param contract_unid
* @return
*/
@PutMapping("/{contract_unid}/receipts")
@ResponseBody
public Object updateReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
return receiptService.updateReceipt(receiptVo, contract_unid);
}
/**
* 删除开票信息
* @param receiptVo
* @param contract_unid
* @return
*/
@DeleteMapping("/{contract_unid}/receipts")
@ResponseBody
public Object deleteReceiptInfo(@RequestBody ReceiptVo receiptVo,@PathVariable String contract_unid) {
......
......@@ -21,24 +21,47 @@ public class ReturnInfoController extends BaseController{
@Resource
ReturnInfoService returnInfoService;
/**
* 查询回款信息
* @param contract_unid
* @return
*/
@GetMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object queryRebackInfo(@PathVariable String contract_unid) {
return returnInfoService.queryReturnInfo(contract_unid);
}
/**
* 增加回款信息
* @param returnInfoVo
* @param contract_unid
* @return
*/
@PostMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object addRebackInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
return returnInfoService.addReturnInfo(returnInfoVo, contract_unid);
}
/**
* 修改回款信息
* @param returnInfoVo
* @param contract_unid
* @return
*/
@PutMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object updateReturnInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
return returnInfoService.updateReturnInfo(returnInfoVo, contract_unid);
}
/**
* 删除回款信息
* @param returnInfoVo
* @param contract_unid
* @return
*/
@DeleteMapping("/{contract_unid}/rebacks")
@ResponseBody
public Object deletePaymentInfo(@RequestBody ReturnInfoVo returnInfoVo,@PathVariable String contract_unid) {
......
package com.vion.financial.entity;
public class Appendix {
private Integer appendix_unid;
private String business_table;
private String business_unid;
private String appendix_name;
private String appendix_type;
private String appendix_url;
private Integer appendix_unid; //合同id
private String business_table; //附件表的名称
private String business_unid; //表中数据的主键
private String appendix_name; //附件名称
private String appendix_type; //附件的类型
private String appendix_url; //附件保存的地址
public Integer getAppendix_unid() {
return appendix_unid;
}
......
......@@ -6,35 +6,35 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.vion.financial.serializer.DateYMDHMSJsonSerializer;
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;
private String contract_unid; //合同编号
private String salesperson_unid; //销售员id
private int project_unid; //项目id
private int customer_unid; //顾客id
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;
}
......
......@@ -47,12 +47,6 @@ public class ImportExcel {
log.info("导入失败数据,编号"+importModel.getContract_unid());
}
/* if(failList.size()==0) {
return successList;
}
ImportModel flag=new ImportModel();
flag.setContract_unid("数据格式出错");
successList.add(flag);*/
return list;
}
}
......@@ -5,8 +5,8 @@ import java.util.List;
import com.vion.financial.entity.Appendix;
public interface AppendixMapper {
public List<Appendix> queryAppendixList(Appendix appendix);
List<Appendix> queryAppendixList(Appendix appendix);
int addAppendix(Appendix appendix);
public void updateAppendix(Appendix appendix);
public void deleteAppendix(Appendix appendix);
void updateAppendix(Appendix appendix);
void deleteAppendix(Appendix appendix);
}
......@@ -22,5 +22,6 @@ public interface ContractMapper {
Boolean isDelete(String contract_unid);
List<ExportModel> exportContracts(SelectVo selectVo);
void actualDeleteOne(String contract_unid);
@Transactional
String timeUpdate();
}
......@@ -2,12 +2,17 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.entity.Customer;
public interface CustomerMapper {
public void addCustomer(Customer customer);
public List<Customer> queryCustomer();
public void updateCustomer(Customer customer);
public void deleteCustomer(int n);
public Customer selectByName(String name);
@Transactional
void addCustomer(Customer customer);
List<Customer> queryCustomer();
@Transactional
void updateCustomer(Customer customer);
@Transactional
void deleteCustomer(int n);
Customer selectByName(String name);
}
......@@ -2,11 +2,16 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
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);
@Transactional
void addDeliverGoods(DeliverGoods deliverGoods);
List<DeliverGoods> queryDeliverGoods(String s);
@Transactional
void updateDeliverGoods(DeliverGoods deliverGoods);
@Transactional
void deleteDeliverGoods(int n);
}
......@@ -3,11 +3,16 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
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);
@Transactional
void addPaymentAgree(PaymentAgree paymentAgree);
List<PaymentAgree> queryPaymentAgree(String s);
@Transactional
void updatePaymentAgree(PaymentAgree paymentAgree);
@Transactional
void deletePaymentAgree(int n);
}
......@@ -2,11 +2,16 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.entity.ProjectAcceptanc;
public interface ProjectAcceptancMapper {
public void addProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
public List<ProjectAcceptanc> queryProjectAcceptanc(String s);
public void updateProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
public void deleteProjectAcceptanc(int n);
@Transactional
void addProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
List<ProjectAcceptanc> queryProjectAcceptanc(String s);
@Transactional
void updateProjectAcceptanc(ProjectAcceptanc projectAcceptanc);
@Transactional
void deleteProjectAcceptanc(int n);
}
......@@ -2,12 +2,17 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.entity.Project;
public interface ProjectMapper {
public void addProject(Project projec);
public List<Project> queryProject();
public void updateProject(Project project);
public void deleteProject(int n);
public Project selectByName(String name);
@Transactional
void addProject(Project projec);
List<Project> queryProject();
@Transactional
void updateProject(Project project);
@Transactional
void deleteProject(int n);
Project selectByName(String name);
}
......@@ -2,11 +2,16 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
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);
@Transactional
void addReceipt(Receipt receipt);
List<Receipt> queryReceipt(String s);
@Transactional
void updateReceipt(Receipt receipt);
@Transactional
void deleteReceipt(int n);
}
......@@ -2,11 +2,16 @@ package com.vion.financial.mapper;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import com.vion.financial.entity.ReturnInfo;
public interface ReturnInfoMapper {
public void addReturnInfo(ReturnInfo returnInfo);
public List<ReturnInfo> queryReturnInfo(String s);
public void updateReturnInfo(ReturnInfo returnInfo);
public void deleteReturnInfo(int n);
@Transactional
void addReturnInfo(ReturnInfo returnInfo);
List<ReturnInfo> queryReturnInfo(String s);
@Transactional
void updateReturnInfo(ReturnInfo returnInfo);
@Transactional
void deleteReturnInfo(int n);
}
......@@ -6,9 +6,9 @@ import com.vion.financial.entity.Appendix;
import com.vion.financial.vo.AppendixVo;
public interface AppendixService {
public Object queryAppendixList(Appendix appendix);
public Object addAppendix(Appendix appendix);
public Object updateAppendix(Appendix appendix);
public Object deleteAppendix(Appendix appendix);
public Object upload(AppendixVo appendixVo);
Object queryAppendixList(Appendix appendix);
Object addAppendix(Appendix appendix);
Object updateAppendix(Appendix appendix);
Object deleteAppendix(Appendix appendix);
Object upload(AppendixVo appendixVo);
}
......@@ -8,13 +8,13 @@ import com.vion.financial.vo.ContractVo;
import com.vion.financial.vo.SelectVo;
public interface ContractService {
public Object addOne(ContractVo vontractVo);
public Object queryOne(String s);
public Object updateOne(ContractVo vontractVo);
public Object deleteOne(String s);
public Object queryList();
Object addOne(ContractVo vontractVo);
Object queryOne(String s);
Object updateOne(ContractVo vontractVo);
Object deleteOne(String s);
Object queryList();
Boolean isDelete(String s);
public Object selectByCondition(SelectVo selectVo);
public void exportExcel(SelectVo selectVo,HttpServletResponse response);
public Object importExcel(MultipartFile file);
Object selectByCondition(SelectVo selectVo);
void exportExcel(SelectVo selectVo,HttpServletResponse response);
Object importExcel(MultipartFile file);
}
......@@ -3,8 +3,8 @@ package com.vion.financial.service;
import com.vion.financial.entity.Customer;
public interface CustomerService {
public Object addCustomer(Customer customer);
public Object queryCustomer();
public Object updateCustomer(Customer customer);
public Object deleteCustomer(int n);
Object addCustomer(Customer customer);
Object queryCustomer();
Object updateCustomer(Customer customer);
Object deleteCustomer(int n);
}
......@@ -6,8 +6,8 @@ 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);
Object addDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
Object queryDeliverGoods(String s);
Object updateDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
Object deleteDeliverGoods(DeliverGoodsVo deliverGoodsVo,String s);
}
......@@ -6,8 +6,8 @@ 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);
Object addPaymentAgree(PaymentAgreeVo paymentAgreeVo,String s);
Object queryPaymentAgree(String s);
Object updatePaymentAgree(PaymentAgreeVo paymentAgreeVo, String s);
Object deletePaymentAgree(PaymentAgreeVo paymentAgreeVo,String s);
}
......@@ -4,8 +4,8 @@ import com.vion.financial.vo.DeliverGoodsVo;
import com.vion.financial.vo.ProjectAcceptancVo;
public interface ProjectAcceptancService {
public Object addProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
public Object queryProjectAcceptanc(String s);
public Object updateProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
public Object deleteProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
Object addProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
Object queryProjectAcceptanc(String s);
Object updateProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
Object deleteProjectAcceptanc(ProjectAcceptancVo projectAcceptancVo,String s);
}
......@@ -4,8 +4,8 @@ import com.vion.financial.entity.Project;
public interface ProjectService {
public Object addProject(Project project);
public Object queryProject();
public Object updateProject(Project project);
public Object deleteProject(Project project);
Object addProject(Project project);
Object queryProject();
Object updateProject(Project project);
Object deleteProject(Project project);
}
......@@ -3,8 +3,8 @@ 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);
Object addReceipt(ReceiptVo receiptVo,String s);
Object queryReceipt(String s);
Object updateReceipt(ReceiptVo receiptVo,String s);
Object deleteReceipt(ReceiptVo receiptVo,String s);
}
......@@ -3,8 +3,8 @@ 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);
Object addReturnInfo(ReturnInfoVo returnInfoVo,String s);
Object queryReturnInfo(String s);
Object updateReturnInfo(ReturnInfoVo returnInfoVo, String s);
Object deleteReturn(ReturnInfoVo returnInfoVo,String s);
}
......@@ -391,137 +391,8 @@ public class ContractServiceImpl implements ContractService {
break;
}
}
/* if(contractVo.getProduct_line_type()!=null) {
switch(contractVo.getProduct_line_type()) {
case "1" :
contractVo.setProduct_line_type_name("安防");
break;
case "2" :
contractVo.setProduct_line_type_name("交通");
break;
case "3" :
contractVo.setProduct_line_type_name("客流");
break;
case "4" :
contractVo.setProduct_line_type_name("维保");
break;
default:
break;
}
}
if(contractVo.getContract_state()!=null) {
switch(contractVo.getContract_state()) {
case "1" :
contractVo.setContract_state_name("已完成");
break;
case "2" :
contractVo.setContract_state_name("待发货");
break;
case "3" :
contractVo.setContract_state_name("施工中");
break;
case "4" :
contractVo.setContract_state_name("项目暂停");
break;
default:
break;
}
}
if(contractVo.getContract_type()!=null) {
switch(contractVo.getContract_type()){
case "1" :
contractVo.setContract_type_name("供货");
break;
case "2" :
contractVo.setContract_type_name("施工");
break;
case "3" :
contractVo.setContract_type_name("集成");
break;
case "4" :
contractVo.setContract_type_name("维保");
break;
default:
break;
}
}
if(contractVo.getAmount_state_unid()!=null) {
switch(contractVo.getAmount_state_unid()) {
case "1" :
contractVo.setAmount_state_unid_name("正常预付款");
break;
case "2" :
contractVo.setAmount_state_unid_name("正常到货款");
break;
case "3" :
contractVo.setAmount_state_unid_name("正常验收款");
break;
case "4" :
contractVo.setAmount_state_unid_name("正常维保款");
break;
case "5" :
contractVo.setAmount_state_unid_name("正常质保款");
break;
default:
break;
}
}*/
}
/* String provinceurl=financeConfig.getProvinceurl();
String province_results=HttpNetClient.doGet(provinceurl, null);
Map map_provinces=JavaBean2Json.Json2JavaBean(province_results, Map.class);
list_province=(List<Map>) map_provinces.get("list_data");
for (ContractVo contractVo : list) {
if(list_data != null && list_data.size() > 0) {
for(Map _map:list_data) {
if(contractVo.getSalesperson_unid()!=null) {
if (contractVo.getSalesperson_unid().equals(_map.get("user_unid"))) {
contractVo.setSalesperson_name((String) _map.get("name"));
}
}
}
}
if(list_province != null && list_province.size() > 0) {
for(Map _map:list_province) {
if(contractVo.getProvince()!=null) {
if(contractVo.getProvince().equals(_map.get("province_unid"))) {
contractVo.setProvince_name((String)_map.get("name"));
break;
}
}
}
String cityurl=String.format(financeConfig.getCityurl(),contractVo.getProvince());
String city_results=HttpNetClient.doGet(cityurl, null);
Map map_cities=JavaBean2Json.Json2JavaBean(city_results, Map.class);
list_city=(List<Map>) map_cities.get("list_data");
if(list_city != null && list_city.size() > 0) {
for(Map _map:list_city) {
if(contractVo.getCity()!=null) {
if(contractVo.getCity().equals(_map.get("city_unid"))) {
contractVo.setCity_name((String)_map.get("name"));
break;
}
}
}
String countyurl=String.format(financeConfig.getCountyurl(),contractVo.getProvince(),contractVo.getCity());
String county_results=HttpNetClient.doGet(countyurl, null);
Map map_ciunties=JavaBean2Json.Json2JavaBean(county_results, Map.class);
list_county=(List<Map>) map_ciunties.get("list_data");
if(list_county != null && list_county.size() > 0) {
for(Map _map:list_county) {
if(contractVo.getCounty()!=null) {
if(contractVo.getCounty().equals(_map.get("county_unid"))) {
contractVo.setCounty_name((String)_map.get("name"));
break;
}
}
}
}
}
}
}*/
}
resultVo.setList_data(list);
resultVo.setList_size(list.size());
resultVo.setOffset(selectVo.getOffset());
......@@ -540,30 +411,11 @@ public class ContractServiceImpl implements ContractService {
public void exportExcel(SelectVo selectVo,HttpServletResponse response) {
logger.info("========================导出合同Excel表格===========================");
List<Map> list_data = null;
/* List<Map> list_province=null;
List<Map> list_city=null;
List<Map> list_county=null;*/
String url = financeConfig.getAuthurl();
String result = HttpNetClient.doGet(url, null);
Map map = JavaBean2Json.Json2JavaBean(result, Map.class);
list_data = (List<Map>) map.get("list_data");
/*
String provinceurl=financeConfig.getProvinceurl();
String province_results=HttpNetClient.doGet(provinceurl, null);
Map map_provinces=JavaBean2Json.Json2JavaBean(province_results, Map.class);
list_province=(List<Map>) map_provinces.get("list_data");
String cityurl=financeConfig.getCityurl();
String city_results=HttpNetClient.doGet(cityurl, null);
Map map_cities=JavaBean2Json.Json2JavaBean(city_results, Map.class);
list_city=(List<Map>) map_cities.get("list_data");
String countyurl=financeConfig.getCountyurl();
String county_results=HttpNetClient.doGet(countyurl, null);
Map map_ciunties=JavaBean2Json.Json2JavaBean(county_results, Map.class);
list_county=(List<Map>) map_ciunties.get("list_data");
*/
if (StringUtils.isNotBlank(selectVo.getSalesperson_name__like())) {
if(list_data != null && list_data.size() > 0) {
List<String> salesperson_unids = new ArrayList<String>();
......@@ -634,68 +486,14 @@ public class ContractServiceImpl implements ContractService {
case "20003" :
exportModel.setProduct_line_type_name("其它");
break;
/* case "20004" :
exportModel.setProduct_line_type_name("维保");
break;*/
default:
break;
}
}
/*if(list_province != null && list_province.size() > 0) {
for(Map _map:list_province) {
if(exportModel.getProvince()!=null) {
if(exportModel.getProvince().equals(_map.get("province_unid"))) {
exportModel.setProvince_name((String)_map.get("name"));
break;
}
}
}
String cityurl=String.format(financeConfig.getCityurl(),exportModel.getProvince());
String city_results=HttpNetClient.doGet(cityurl, null);
Map map_cities=JavaBean2Json.Json2JavaBean(city_results, Map.class);
list_city=(List<Map>) map_cities.get("list_data");
if(list_city != null && list_city.size() > 0) {
for(Map _map:list_city) {
if(exportModel.getCity()!=null) {
if(exportModel.getCity().equals(_map.get("city_unid"))) {
exportModel.setCity_name((String)_map.get("name"));
break;
}
}
}
String countyurl=String.format(financeConfig.getCountyurl(),exportModel.getProvince(),exportModel.getCity());
String county_results=HttpNetClient.doGet(countyurl, null);
Map map_ciunties=JavaBean2Json.Json2JavaBean(county_results, Map.class);
list_county=(List<Map>) map_ciunties.get("list_data");
if(list_county != null && list_county.size() > 0) {
for(Map _map:list_county) {
if(exportModel.getCounty()!=null) {
if(exportModel.getCounty().equals(_map.get("county_unid"))) {
exportModel.setCounty_name((String)_map.get("name"));
break;
}
}
}
}
}
}
*/
}
try {
DownLoad downLoad =new DownLoad();
/* if(selectVo.getColumns() != null && selectVo.getColumns().length > 0) {
//动态生成excel表头
ExcelExportEntity excelExportEntity = new ExcelExportEntity("合同编号");
excelExportEntity.setWidth(20);
excelExportEntity.setKey("contract_unid");
}else {
downLoad.exportExcel(list, "合同Excel表格", "合同Excel表格", ExportModel.class, "合同.xls", response);
}*/
if(selectVo.getColumns() != null && selectVo.getColumns().length > 0) {
downLoad.dynamicExportExcel("合同Excel表格", "合同Excel表格", dynamicCreatTableHead(selectVo),dynamicCreatTableDatas(list), "合同.xls", response);
}else {
......@@ -715,40 +513,8 @@ public class ContractServiceImpl implements ContractService {
logger.info("========================导入合同Excel表格===========================");
//ImportExcel importExcel = new ImportExcel();
try {
/* ImportParams importParams = new ImportParams();
IExcelDataHandler<ImportModel> handle=new ImportHandle();
handle.setNeedHandlerFields(new String[] {"合同编号"});
importParams.setDataHanlder(handle);
importParams.setNeedVerfiy(true);
ExcelImportResult<ImportModel> resultList=ExcelImportUtil.importExcelMore(file.getInputStream(), ImportModel.class, importParams);
List<ImportModel> successList=resultList.getList();
List<ImportModel> failList=resultList.getFailList();
logger.info("是否存在验证未通过的数据:"+resultList.isVerfiyFail());
logger.info("验证通过的数量:"+successList.size());
logger.info("验证未通过的数量"+failList.size());
for(ImportModel importModel:successList) {
logger.info("导入成功数据,编号="+importModel.getContract_unid()+";签订时间="+importModel.getSign_date());
}
for(ImportModel importModel:failList) {
logger.info("导入失败数据,编号"+importModel.getContract_unid());
}*/
/* List<ImportModel> successList=importExcel.Import(file);
ImportModel impor=null;*/
ImportExcel importExcel = new ImportExcel();
List<List<ImportModel>> list=importExcel.Import(file);
/* Boolean flag=true;
if(importExcel.flag) {
flag=false;
}*/
/* Iterator iterator=successList.iterator();
while(iterator.hasNext()) {
impor= (ImportModel) iterator.next();
if(impor.getContract_unid().equals("数据格式出错")) {
flag = false;
}
}*/
String s="s";
if(importExcel.flag) {
s=s+"!";
......@@ -777,9 +543,6 @@ public class ContractServiceImpl implements ContractService {
PaymentAgree mainten_aymentAgree=null;
DeliverGoods deliverGoods=null;
for(ImportModel importModel:list.get(0)) {
/*if(contractMapper.queryOne(importModel.getContract_unid())!=null) {
contractMapper.actualDeleteOne(importModel.getContract_unid());
}*/
contractVo=new ContractVo();
returnInfo=new ReturnInfo();
receipt=new Receipt();
......@@ -793,8 +556,6 @@ public class ContractServiceImpl implements ContractService {
mainten_aymentAgree =new PaymentAgree();
deliverGoods = new DeliverGoods();
contractVo.setContract_unid(importModel.getContract_unid());
//String temp=new SimpleDateFormat("yyyy-MM-dd").format(importModel.getSign_date());
//Long date=importModel.getSign_date().getTime();
contractVo.setSign_date(importModel.getSign_date());
if(importModel.getProduct_line_type_name()!=null) {
switch(importModel.getProduct_line_type_name()) {
......@@ -807,9 +568,6 @@ public class ContractServiceImpl implements ContractService {
case "其它" :
contractVo.setProduct_line_type("20003");
break;
/* case "维保" :
contractVo.setProduct_line_type("20004");
break;*/
default:
break;
}
......@@ -943,21 +701,7 @@ public class ContractServiceImpl implements ContractService {
}
contractVo.setStart_guarantee_date(importModel.getStart_guarantee_date());
contractVo.setEnd_guarantee_date(importModel.getEnd_guarantee_date());
/* if(importModel.getMainten_start_point()!=null) {
switch(importModel.getMainten_start_point()) {
case "签订时间":
contractVo.setMainten_start_point("60001");
break;
case "到货验收时间":
contractVo.setMainten_start_point("60002");
break;
case "项目终验时间":
contractVo.setMainten_start_point("60003");
break;
default:
break;
}
}*/
contractVo.setContract_amount_note(importModel.getDeduct_amount_note());
contractVo.setReback_note(importModel.getStop_amount_note());
contractVo.setContract_remain_note(importModel.getExemptions_amount_note());
......@@ -1071,23 +815,10 @@ public class ContractServiceImpl implements ContractService {
if(returnInfo.getReback_date()!=null ||returnInfo.getActual_reback_amount()!=null ||returnInfo.getReback_note()!=null) {
returnInfoMapper.addReturnInfo(returnInfo);
}
/*}else {
if(importModel.getReback_date()!=null ||importModel.getReback_amount()!=null ||importModel.getReback_note()!=null) {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}
}*/
//if( receiptMapper.queryReceipt(importModel.getContract_unid()).size()==0) {
if(receipt.getReceipt_amount()!=null||receipt.getOa_flow_id()!=null||receipt.getReceipt_note()!=null) {
receiptMapper.addReceipt(receipt);
}
/*}else {
if(importModel.getReceipt_amount()!=null||importModel.getOa_flow_id()!=null||importModel.getReceipt_note()!=null) {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}
}*/
if(/*projectAcceptanc_pre.getContract_unid() != null && projectAcceptanc_end.getContract_unid() != null &&*/ projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
if( projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
if(projectAcceptanc_pre.getAcceptanc_date()!=null ||projectAcceptanc_pre.getAcceptanc_note()!=null ||projectAcceptanc_pre.getAcceptanc_type()!=null) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_pre);
}
......@@ -1101,9 +832,7 @@ public class ContractServiceImpl implements ContractService {
repeatListId.add(contractVo.getContract_unid());
}
}
/* if(projectAcceptanc_end.getContract_unid() != null && projectAcceptancMapper.queryProjectAcceptanc(importModel.getContract_unid()).size()==0) {
projectAcceptancMapper.addProjectAcceptanc(projectAcceptanc_end);
}*/
if(paymentAgreeMapper.queryPaymentAgree(importModel.getContract_unid()).size()==0) {
if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(pre_aymentAgree);
......@@ -1126,21 +855,7 @@ public class ContractServiceImpl implements ContractService {
repeatListId.add(contractVo.getContract_unid());
}
}
/* if(pre_aymentAgree.getPayment_propority()!=null ||pre_aymentAgree.getPayment_requirement()!=null||pre_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(pre_aymentAgree);
}
if(arrival_aymentAgree.getPayment_propority()!=null ||arrival_aymentAgree.getPayment_requirement()!=null||arrival_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(arrival_aymentAgree);
}
if(acceptanc_aymentAgree.getPayment_propority()!=null ||acceptanc_aymentAgree.getPayment_requirement()!=null||acceptanc_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(acceptanc_aymentAgree);
}
if(mainten_aymentAgree.getPayment_propority()!=null ||mainten_aymentAgree.getPayment_requirement()!=null||mainten_aymentAgree.getDays()!=null) {
paymentAgreeMapper.addPaymentAgree(mainten_aymentAgree);
}*/
/* if(deliverGoods.getDeliver_goods_date()!=null || deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods);
}*/
if(deliverGoodsMapper.queryDeliverGoods(importModel.getContract_unid()).size()==0) {
if(deliverGoods.getDeliver_goods_date()!=null ||deliverGoods.getGoods_acceptanc_date()!=null) {
deliverGoodsMapper.addDeliverGoods(deliverGoods);
......@@ -1151,11 +866,6 @@ public class ContractServiceImpl implements ContractService {
repeatListId.add(contractVo.getContract_unid());
}
}
//}
/* else {
is_repeat=false;
repeatListId.add(contractVo.getContract_unid());
}*/
}if(!is_repeat) {
return repeatListId;
}else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!