LG88888888 há 3 anos atrás
pai
commit
5839d065ed

+ 44 - 0
src/main/java/net/chenlin/dp/modules/api/controller/AcceptOrderController.java

@@ -0,0 +1,44 @@
+package net.chenlin.dp.modules.api.controller;
+
+import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
+import net.chenlin.dp.common.support.orm.db.DynamicDataSource;
+import net.chenlin.dp.common.utils.SpringContextUtils;
+import net.chenlin.dp.modules.api.dao.SaleOrderMapper;
+import net.chenlin.dp.modules.api.service.AcceptOrderService;
+import net.chenlin.dp.modules.api.service.SaleOrderService;
+import net.chenlin.dp.modules.api.vo.IAcceptOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+public class AcceptOrderController {
+    private AcceptOrderService acceptOrderService=new AcceptOrderService();
+
+    private  SaleOrderService service=new SaleOrderService();
+    private SaleOrderMapper saleOrderMapper= SpringContextUtils.getBean("saleOrderMapper",SaleOrderMapper.class);
+
+
+    /***
+     * 新增收款单
+     * @throws OpenAPIException
+     */
+    public void addAcceptOrder() throws OpenAPIException {
+        try {
+            List<IAcceptOrder> iAcceptOrders = acceptOrderService.addAccept();
+            service.getToaccount();
+            if (iAcceptOrders!=null){
+                for (IAcceptOrder i:iAcceptOrders){
+                    String s = service.acceptAdd(i);
+                    if (s.equals("0")){
+                        DynamicDataSource.setDataSource("last-data-source");
+                        saleOrderMapper.UpdateKSDTKOrder(i.getVouchcode());
+                        DynamicDataSource.setDataSource("");
+                    }
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+    }
+}

+ 39 - 0
src/main/java/net/chenlin/dp/modules/api/controller/CustomerController.java

@@ -0,0 +1,39 @@
+package net.chenlin.dp.modules.api.controller;
+
+import net.chenlin.dp.common.openapi4j.exception.OpenAPIException;
+import net.chenlin.dp.common.support.orm.db.DynamicDataSource;
+import net.chenlin.dp.common.utils.SpringContextUtils;
+import net.chenlin.dp.modules.api.dao.CustomerMapper;
+import net.chenlin.dp.modules.api.service.CustomerService;
+import net.chenlin.dp.modules.api.vo.ICustomer;
+
+import java.util.List;
+
+public class CustomerController {
+    private CustomerService customerService=new CustomerService();
+    private CustomerMapper customerMapper= SpringContextUtils.getBean("customerMapper",CustomerMapper.class);
+
+    /**
+     * u8客户档案新增接口
+     * @throws OpenAPIException
+     */
+    public void addCustomer() throws OpenAPIException {
+        customerService.getToaccount();
+        try {
+            List<ICustomer> iCustomers = customerService.CrmCustomer();
+            if (iCustomers!=null &&iCustomers.size()>0){
+                for (ICustomer i:iCustomers){
+                    String s = customerService.addCustomer(i);
+                    if (s.equals("0")){
+                        DynamicDataSource.setDataSource("last-data-source");
+                        customerMapper.UpdateCustomer(i.getCode());
+                        DynamicDataSource.setDataSource("");
+                    }
+                }
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+    }
+}

+ 46 - 0
src/main/java/net/chenlin/dp/modules/api/dao/AcceptOrderMapper.java

@@ -0,0 +1,46 @@
+package net.chenlin.dp.modules.api.dao;
+
+import net.chenlin.dp.modules.api.vo.*;
+import net.chenlin.dp.modules.sys.dao.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 销售订单
+ * @author zcl<yczclcn@163.com>
+ */
+@Mapper
+public interface AcceptOrderMapper extends BaseMapper<AcceptOrder> {
+
+	/**
+	 * crm收款单表头查询
+	 * @return
+	 */
+	List<AcceptOrder>CrmAcceptOrderList();
+
+	/**
+	 * crm收款单表体查询
+	 * @param id
+	 * @return
+	 */
+//	List<AcceptOrderMin>CrmAcceptOrderMinList(@Param("id")String id);
+
+	/**
+	 * u8收付款单表头新增
+	 * @param acceptOrder
+	 * @return
+	 */
+	int UAddAcceptOrder(AcceptOrder acceptOrder);
+
+	/**
+	 * u8收付款单表体新增
+	 * @param acceptOrderMins
+	 * @return
+	 */
+	int UAddAcceptOrderMin(AcceptOrder acceptOrderMins);
+
+
+	List<IAcceptOrder>IAcceptOrderList();
+}

+ 76 - 0
src/main/java/net/chenlin/dp/modules/api/mapper/AcceptOrderMapper.xml

@@ -0,0 +1,76 @@
+<?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="net.chenlin.dp.modules.api.dao.AcceptOrderMapper">
+
+
+	<insert id="UAddAcceptOrder">
+	insert into Ap_CloseBill(cvouchtype,cvouchid,dvouchdate,cdwcode,cdeptcode,cperson,citem_class,
+							 citemcode,csscode,cdigest,cbankaccount,cexch_name,iexchrate,iamount,iamount_f,
+							 coperator,corderno,iid,citemname,cFlag,iPeriod,iramount,iramount_f )
+							 values (
+									#{cvouchtype},
+							         #{cvouchid},
+							         #{dvouchdate},
+							         #{cdwcode},
+							         #{cdeptcode},
+							         #{cperson},
+							         #{citemclass},
+									#{citemcode},
+							         #{csscode},
+							         #{cdigest},
+							         #{cbankaccount},
+							         #{cexchname},
+							         #{iexchrate},
+							         #{iamount},
+							         #{iamount},
+									#{coperator},
+							         #{corderno},
+							         #{iid},
+							         #{citemname},
+							         'AR',
+							         '10',
+									#{iamount},
+									#{iamount}
+									)
+
+	</insert>
+	<insert id="UAddAcceptOrderMin">
+	insert into ap_closebills(ID, iid,iamt,cxmclass,cxm,cdepcode,cpersoncode,corderid,
+	                          citemname,iType,cCusVen,iamt_f,iramt_f,iramt)
+	values		(
+				#{iid},
+                #{iid},
+				#{iamount},
+				#{citemclass},
+				#{citemcode},
+				#{cdeptcode},
+				#{cperson},
+				#{corderno},
+				#{citemname},
+	         	'0',
+	         	#{cdwcode},
+				#{iamount},
+				#{iamount},
+				#{iamount}
+			)
+	</insert>
+	<select id="CrmAcceptOrderList" resultType="net.chenlin.dp.modules.api.vo.AcceptOrder">
+		select cvouchtype,cvouchid,dvouchdate,cdwcode,cdeptcode,cperson,citem_class as 'citemclass',
+				citemcode,cdigest,cbankaccount,cexch_name as 'cexchname',iexchrate,iamount,
+			   coperator,corderno,iid,citemname
+		from CRM_U8_Refund
+	</select>
+	<select id="CrmAcceptOrderMinList" resultType="net.chenlin.dp.modules.api.vo.AcceptOrderMin">
+		select iid,id,itype,iamt_f as 'iamtf',iamt,cxmclass,cxm,cdepcode,cpersoncode,corderid,citemname from crm_u8_Ap_CloseBills
+		where iid=#{id}
+	</select>
+	<select id="IAcceptOrderList" resultType="net.chenlin.dp.modules.api.vo.IAcceptOrder">
+		select cvouchtype as 'vouchtype',cvouchid as 'vouchcode',convert(varchar(10),dvouchdate,120) as 'vouchdate',cdwcode as 'customercode',cdeptcode as 'departmentcode',
+		cperson as 'personcode',citem_class as 'itemclasscode',
+				citemcode as 'itemcode',cdigest as 'digest',cbankaccount as 'oppositebankcode',iamount as 'amount',
+			   citemname as 'itemname'
+		from CRM_U8_Refund
+
+	</select>
+</mapper>

+ 44 - 0
src/main/java/net/chenlin/dp/modules/api/service/AcceptOrderService.java

@@ -0,0 +1,44 @@
+package net.chenlin.dp.modules.api.service;
+
+import net.chenlin.dp.common.support.orm.db.DynamicDataSource;
+import net.chenlin.dp.common.utils.SpringContextUtils;
+import net.chenlin.dp.modules.api.dao.AcceptOrderMapper;
+import net.chenlin.dp.modules.api.vo.AcceptOrderMin;
+import net.chenlin.dp.modules.api.vo.IAcceptOrder;
+import net.chenlin.dp.modules.sys.service.SysUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.util.List;
+
+/**
+ * 客诉单-退款 -》收款单
+ */
+public class AcceptOrderService {
+    private AcceptOrderMapper acceptOrderMapper= SpringContextUtils.getBean("acceptOrderMapper",AcceptOrderMapper.class);
+
+
+    public List<IAcceptOrder> addAccept(){
+        DynamicDataSource.setDataSource("last-data-source");
+        List<IAcceptOrder> iAcceptOrders = acceptOrderMapper.IAcceptOrderList();
+        DynamicDataSource.setDataSource("");
+        if (iAcceptOrders!=null &&iAcceptOrders.size()>0){
+            for (IAcceptOrder ls:iAcceptOrders){
+                AcceptOrderMin acceptOrderMin=new AcceptOrderMin();
+                List<AcceptOrderMin> entry = ls.getEntry();
+                ls.setBalancecode("1");
+                ls.setVouchtype("48");
+                acceptOrderMin.setAmount(ls.getAmount());
+                acceptOrderMin.setProjectclass(ls.getItemclasscode());
+                acceptOrderMin.setProject(ls.getItemcode());
+                acceptOrderMin.setDepartmentcode(ls.getDepartmentcode());
+                acceptOrderMin.setCustomercode(ls.getCustomercode());
+                acceptOrderMin.setPersoncode(ls.getPersoncode());
+                entry.add(acceptOrderMin);
+                ls.setEntry(entry);
+            }
+            return iAcceptOrders;
+        }else {
+            return null;
+        }
+    }
+}

+ 146 - 0
src/main/java/net/chenlin/dp/modules/api/vo/IAcceptOrder.java

@@ -0,0 +1,146 @@
+package net.chenlin.dp.modules.api.vo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * u8收款单接口实体数据
+ */
+public class IAcceptOrder {
+    private  String vouchtype;//单据类型编码
+    private  String vouchcode;//单据编码
+    private  String vouchdate;//单据日期
+    private  String customercode;//单位编码
+    private  String departmentcode;//部门编码
+    private  String personcode;//业务员编码
+    private  String itemclasscode;//项目大类编码
+    private  String itemcode;//项目编码
+    private  String balancecode;//结算方式编码
+    private  String digest;//摘要
+    private  String oppositebankcode;//银行账号
+    private  String amount;//本币金额
+    private  String originalamount;//原币金额
+    private  String itemname;//项目名称
+
+    private List<AcceptOrderMin>entry=new ArrayList<>();
+
+    public String getVouchtype() {
+        return vouchtype;
+    }
+
+    public void setVouchtype(String vouchtype) {
+        this.vouchtype = vouchtype;
+    }
+
+    public String getVouchcode() {
+        return vouchcode;
+    }
+
+    public void setVouchcode(String vouchcode) {
+        this.vouchcode = vouchcode;
+    }
+
+    public String getVouchdate() {
+        return vouchdate;
+    }
+
+    public void setVouchdate(String vouchdate) {
+        this.vouchdate = vouchdate;
+    }
+
+    public String getCustomercode() {
+        return customercode;
+    }
+
+    public void setCustomercode(String customercode) {
+        this.customercode = customercode;
+    }
+
+    public String getDepartmentcode() {
+        return departmentcode;
+    }
+
+    public void setDepartmentcode(String departmentcode) {
+        this.departmentcode = departmentcode;
+    }
+
+    public String getPersoncode() {
+        return personcode;
+    }
+
+    public void setPersoncode(String personcode) {
+        this.personcode = personcode;
+    }
+
+    public String getItemclasscode() {
+        return itemclasscode;
+    }
+
+    public void setItemclasscode(String itemclasscode) {
+        this.itemclasscode = itemclasscode;
+    }
+
+    public String getItemcode() {
+        return itemcode;
+    }
+
+    public void setItemcode(String itemcode) {
+        this.itemcode = itemcode;
+    }
+
+    public String getBalancecode() {
+        return balancecode;
+    }
+
+    public void setBalancecode(String balancecode) {
+        this.balancecode = balancecode;
+    }
+
+    public String getDigest() {
+        return digest;
+    }
+
+    public void setDigest(String digest) {
+        this.digest = digest;
+    }
+
+    public String getOppositebankcode() {
+        return oppositebankcode;
+    }
+
+    public void setOppositebankcode(String oppositebankcode) {
+        this.oppositebankcode = oppositebankcode;
+    }
+
+    public String getAmount() {
+        return amount;
+    }
+
+    public void setAmount(String amount) {
+        this.amount = amount;
+    }
+
+    public String getOriginalamount() {
+        return originalamount;
+    }
+
+    public void setOriginalamount(String originalamount) {
+        this.originalamount = originalamount;
+    }
+
+    public String getItemname() {
+        return itemname;
+    }
+
+    public void setItemname(String itemname) {
+        this.itemname = itemname;
+    }
+
+    public List<AcceptOrderMin> getEntry() {
+        return entry;
+    }
+
+    public void setEntry(List<AcceptOrderMin> entry) {
+        this.entry = entry;
+    }
+}

+ 73 - 0
src/main/java/net/chenlin/dp/modules/api/vo/ICustomer.java

@@ -0,0 +1,73 @@
+package net.chenlin.dp.modules.api.vo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * u8客户接口实体
+ */
+public class ICustomer {
+    private String code;//客户编码
+    private  String name;//客户名称
+    private  String abbrname ;//客户简称
+    private  String  sort_code;//客户分类编码
+    private  String  devliver_site;//发货地址
+    private  CustomerAddress addresses=new CustomerAddress();//收获地址
+    private List<CustomerBanks>banks=new ArrayList<>();//银行
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAbbrname() {
+        return abbrname;
+    }
+
+    public void setAbbrname(String abbrname) {
+        this.abbrname = abbrname;
+    }
+
+    public String getSort_code() {
+        return sort_code;
+    }
+
+    public void setSort_code(String sort_code) {
+        this.sort_code = sort_code;
+    }
+
+    public String getDevliver_site() {
+        return devliver_site;
+    }
+
+    public void setDevliver_site(String devliver_site) {
+        this.devliver_site = devliver_site;
+    }
+
+    public CustomerAddress getAddresses() {
+        return addresses;
+    }
+
+    public void setAddresses(CustomerAddress addresses) {
+        this.addresses = addresses;
+    }
+
+    public List<CustomerBanks> getBanks() {
+        return banks;
+    }
+
+    public void setBanks(List<CustomerBanks> banks) {
+        this.banks = banks;
+    }
+}

+ 232 - 0
src/main/java/net/chenlin/dp/modules/api/vo/ISaleOrder.java

@@ -0,0 +1,232 @@
+package net.chenlin.dp.modules.api.vo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ISaleOrder {
+    private String code;//订单号
+    private  String date;//日期
+    private  String businesstype;//业务类型 true
+    private  String typecode;//销售类型编码 true
+    private  String typename;//销售类型
+    private  String state;//单据状态
+    private  String custcode;//客户编码 true
+    private  String cusname;//客户名称
+    private  String cusabbname;//客户简称
+    private  String  deptcode;//部门编码 true
+    private  String deptname;//部门名称
+    private  String personcode;//人员编码
+    private  String personname;//人员
+    private  String dpremodatebt;//预完工日期
+    private  String dpredatebt;//预发货日期
+    private  String sendaddress;//发货地址
+    private  String ccusperson;//联系人
+    private  String ccuspersoncode;//联系人编码
+    private  String caddcode;//收货地址编码
+    private  String taxrate;//税率
+    private  String memo;//备注
+    private  String maker;//制单人
+    private  String verifier;//审核人
+    private  String closer;//关闭人
+    private List<ISaleOrderMin>entry=new ArrayList<>();
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public String getBusinesstype() {
+        return businesstype;
+    }
+
+    public void setBusinesstype(String businesstype) {
+        this.businesstype = businesstype;
+    }
+
+    public String getTypecode() {
+        return typecode;
+    }
+
+    public void setTypecode(String typecode) {
+        this.typecode = typecode;
+    }
+
+    public String getTypename() {
+        return typename;
+    }
+
+    public void setTypename(String typename) {
+        this.typename = typename;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getCustcode() {
+        return custcode;
+    }
+
+    public void setCustcode(String custcode) {
+        this.custcode = custcode;
+    }
+
+    public String getCusname() {
+        return cusname;
+    }
+
+    public void setCusname(String cusname) {
+        this.cusname = cusname;
+    }
+
+    public String getCusabbname() {
+        return cusabbname;
+    }
+
+    public void setCusabbname(String cusabbname) {
+        this.cusabbname = cusabbname;
+    }
+
+    public String getDeptcode() {
+        return deptcode;
+    }
+
+    public void setDeptcode(String deptcode) {
+        this.deptcode = deptcode;
+    }
+
+    public String getDeptname() {
+        return deptname;
+    }
+
+    public void setDeptname(String deptname) {
+        this.deptname = deptname;
+    }
+
+    public String getPersoncode() {
+        return personcode;
+    }
+
+    public void setPersoncode(String personcode) {
+        this.personcode = personcode;
+    }
+
+    public String getPersonname() {
+        return personname;
+    }
+
+    public void setPersonname(String personname) {
+        this.personname = personname;
+    }
+
+    public String getDpremodatebt() {
+        return dpremodatebt;
+    }
+
+    public void setDpremodatebt(String dpremodatebt) {
+        this.dpremodatebt = dpremodatebt;
+    }
+
+    public String getDpredatebt() {
+        return dpredatebt;
+    }
+
+    public void setDpredatebt(String dpredatebt) {
+        this.dpredatebt = dpredatebt;
+    }
+
+    public String getSendaddress() {
+        return sendaddress;
+    }
+
+    public void setSendaddress(String sendaddress) {
+        this.sendaddress = sendaddress;
+    }
+
+    public String getCcusperson() {
+        return ccusperson;
+    }
+
+    public void setCcusperson(String ccusperson) {
+        this.ccusperson = ccusperson;
+    }
+
+    public String getCcuspersoncode() {
+        return ccuspersoncode;
+    }
+
+    public void setCcuspersoncode(String ccuspersoncode) {
+        this.ccuspersoncode = ccuspersoncode;
+    }
+
+    public String getCaddcode() {
+        return caddcode;
+    }
+
+    public void setCaddcode(String caddcode) {
+        this.caddcode = caddcode;
+    }
+
+    public String getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(String taxrate) {
+        this.taxrate = taxrate;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    public String getMaker() {
+        return maker;
+    }
+
+    public void setMaker(String maker) {
+        this.maker = maker;
+    }
+
+    public String getVerifier() {
+        return verifier;
+    }
+
+    public void setVerifier(String verifier) {
+        this.verifier = verifier;
+    }
+
+    public String getCloser() {
+        return closer;
+    }
+
+    public void setCloser(String closer) {
+        this.closer = closer;
+    }
+
+    public List<ISaleOrderMin> getEntry() {
+        return entry;
+    }
+
+    public void setEntry(List<ISaleOrderMin> entry) {
+        this.entry = entry;
+    }
+}

+ 238 - 0
src/main/java/net/chenlin/dp/modules/api/vo/ISaleOrderMin.java

@@ -0,0 +1,238 @@
+package net.chenlin.dp.modules.api.vo;
+
+public class ISaleOrderMin {
+    private  String inventorycode; //存货编码 true
+    private  String inventoryname;  //存货
+    private  String invstd;//规格型号
+    private  String unitcode;//销售单位编码
+    private  String unitname;//销售单位
+    private  String unitrate;//换算率
+    private  String quantity;//数量 true
+    private  String num;//件数
+    private  String unitprice;//单价
+    private  String quotedprice;//报价
+    private  String taxunitprice;//含税单价
+    private  String money;//无税金额
+    private  String taxrate;//税率
+    private  String sum;//价税合计
+    private  String discount;//	折扣额
+    private  String natdiscount;//本币折扣额
+    private  String discountrate;//扣率
+    private  String discountrate2;//扣率2
+    private  String natmoney;//本币金额
+    private  String natunitprice;//本币单价
+    private  String tax;//税额
+    private  String nattax;//本币税额
+    private  String natsum;//本币价税合计
+    private  String bgift;//是否赠品(0=非赠品;1=赠品) true
+    private  String rowno;//行号 true
+    private  String define28;
+
+    public String getDefine28() {
+        return define28;
+    }
+
+    public void setDefine28(String define28) {
+        this.define28 = define28;
+    }
+
+    public String getInventorycode() {
+        return inventorycode;
+    }
+
+    public void setInventorycode(String inventorycode) {
+        this.inventorycode = inventorycode;
+    }
+
+    public String getInventoryname() {
+        return inventoryname;
+    }
+
+    public void setInventoryname(String inventoryname) {
+        this.inventoryname = inventoryname;
+    }
+
+    public String getInvstd() {
+        return invstd;
+    }
+
+    public void setInvstd(String invstd) {
+        this.invstd = invstd;
+    }
+
+    public String getUnitcode() {
+        return unitcode;
+    }
+
+    public void setUnitcode(String unitcode) {
+        this.unitcode = unitcode;
+    }
+
+    public String getUnitname() {
+        return unitname;
+    }
+
+    public void setUnitname(String unitname) {
+        this.unitname = unitname;
+    }
+
+    public String getUnitrate() {
+        return unitrate;
+    }
+
+    public void setUnitrate(String unitrate) {
+        this.unitrate = unitrate;
+    }
+
+    public String getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(String quantity) {
+        this.quantity = quantity;
+    }
+
+    public String getNum() {
+        return num;
+    }
+
+    public void setNum(String num) {
+        this.num = num;
+    }
+
+    public String getUnitprice() {
+        return unitprice;
+    }
+
+    public void setUnitprice(String unitprice) {
+        this.unitprice = unitprice;
+    }
+
+    public String getQuotedprice() {
+        return quotedprice;
+    }
+
+    public void setQuotedprice(String quotedprice) {
+        this.quotedprice = quotedprice;
+    }
+
+    public String getTaxunitprice() {
+        return taxunitprice;
+    }
+
+    public void setTaxunitprice(String taxunitprice) {
+        this.taxunitprice = taxunitprice;
+    }
+
+    public String getMoney() {
+        return money;
+    }
+
+    public void setMoney(String money) {
+        this.money = money;
+    }
+
+    public String getTaxrate() {
+        return taxrate;
+    }
+
+    public void setTaxrate(String taxrate) {
+        this.taxrate = taxrate;
+    }
+
+    public String getSum() {
+        return sum;
+    }
+
+    public void setSum(String sum) {
+        this.sum = sum;
+    }
+
+    public String getDiscount() {
+        return discount;
+    }
+
+    public void setDiscount(String discount) {
+        this.discount = discount;
+    }
+
+    public String getNatdiscount() {
+        return natdiscount;
+    }
+
+    public void setNatdiscount(String natdiscount) {
+        this.natdiscount = natdiscount;
+    }
+
+    public String getDiscountrate() {
+        return discountrate;
+    }
+
+    public void setDiscountrate(String discountrate) {
+        this.discountrate = discountrate;
+    }
+
+    public String getDiscountrate2() {
+        return discountrate2;
+    }
+
+    public void setDiscountrate2(String discountrate2) {
+        this.discountrate2 = discountrate2;
+    }
+
+    public String getNatmoney() {
+        return natmoney;
+    }
+
+    public void setNatmoney(String natmoney) {
+        this.natmoney = natmoney;
+    }
+
+    public String getNatunitprice() {
+        return natunitprice;
+    }
+
+    public void setNatunitprice(String natunitprice) {
+        this.natunitprice = natunitprice;
+    }
+
+    public String getTax() {
+        return tax;
+    }
+
+    public void setTax(String tax) {
+        this.tax = tax;
+    }
+
+    public String getNattax() {
+        return nattax;
+    }
+
+    public void setNattax(String nattax) {
+        this.nattax = nattax;
+    }
+
+    public String getNatsum() {
+        return natsum;
+    }
+
+    public void setNatsum(String natsum) {
+        this.natsum = natsum;
+    }
+
+    public String getBgift() {
+        return bgift;
+    }
+
+    public void setBgift(String bgift) {
+        this.bgift = bgift;
+    }
+
+    public String getRowno() {
+        return rowno;
+    }
+
+    public void setRowno(String rowno) {
+        this.rowno = rowno;
+    }
+}

+ 196 - 0
src/main/java/net/chenlin/dp/modules/api/vo/SaleOrderFTH.java

@@ -0,0 +1,196 @@
+package net.chenlin.dp.modules.api.vo;
+
+/**
+ * 销售发货退货单表头
+ */
+public class SaleOrderFTH {
+    private String dlid;//发货退货单主表标识
+    private  String cdlcode;//发货退货单号
+    private  String cvouchtype;//单据类型编码
+    private  String cstcode;//销售类型编码
+    private  String ddate;//单据日期
+    private  String crdcode;//收发类别编码
+    private String cdepcode;//部门编码
+    private  String cpersoncode;//业务员编码
+    private  String ccuscode;//客户编码
+    private  String csccode;//发运方式编码
+    private  String cshipaddress;//发往地址
+    private  String cexchname;//币种名称
+    private  String iexchrate;//汇率
+    private  String itaxrate;//表头税率
+    private  String breturnflag;//退货标志
+    private  String cmaker;//制单人
+    private  String ccusname;//客户名称
+    private  String cbustype;//业务类型
+    private String poid;//模板编号
+    private  String bz;//备注
+    private  String cVouchID;//单据编号
+
+    public String getcVouchID() {
+        return cVouchID;
+    }
+
+    public void setcVouchID(String cVouchID) {
+        this.cVouchID = cVouchID;
+    }
+
+    public String getBz() {
+        return bz;
+    }
+
+    public void setBz(String bz) {
+        this.bz = bz;
+    }
+
+    public String getPoid() {
+        return poid;
+    }
+
+    public void setPoid(String poid) {
+        this.poid = poid;
+    }
+
+    public String getDlid() {
+        return dlid;
+    }
+
+    public void setDlid(String dlid) {
+        this.dlid = dlid;
+    }
+
+    public String getCdlcode() {
+        return cdlcode;
+    }
+
+    public void setCdlcode(String cdlcode) {
+        this.cdlcode = cdlcode;
+    }
+
+    public String getCvouchtype() {
+        return cvouchtype;
+    }
+
+    public void setCvouchtype(String cvouchtype) {
+        this.cvouchtype = cvouchtype;
+    }
+
+    public String getCstcode() {
+        return cstcode;
+    }
+
+    public void setCstcode(String cstcode) {
+        this.cstcode = cstcode;
+    }
+
+    public String getDdate() {
+        return ddate;
+    }
+
+    public void setDdate(String ddate) {
+        this.ddate = ddate;
+    }
+
+    public String getCrdcode() {
+        return crdcode;
+    }
+
+    public void setCrdcode(String crdcode) {
+        this.crdcode = crdcode;
+    }
+
+    public String getCdepcode() {
+        return cdepcode;
+    }
+
+    public void setCdepcode(String cdepcode) {
+        this.cdepcode = cdepcode;
+    }
+
+    public String getCpersoncode() {
+        return cpersoncode;
+    }
+
+    public void setCpersoncode(String cpersoncode) {
+        this.cpersoncode = cpersoncode;
+    }
+
+    public String getCcuscode() {
+        return ccuscode;
+    }
+
+    public void setCcuscode(String ccuscode) {
+        this.ccuscode = ccuscode;
+    }
+
+    public String getCsccode() {
+        return csccode;
+    }
+
+    public void setCsccode(String csccode) {
+        this.csccode = csccode;
+    }
+
+    public String getCshipaddress() {
+        return cshipaddress;
+    }
+
+    public void setCshipaddress(String cshipaddress) {
+        this.cshipaddress = cshipaddress;
+    }
+
+    public String getCexchname() {
+        return cexchname;
+    }
+
+    public void setCexchname(String cexchname) {
+        this.cexchname = cexchname;
+    }
+
+    public String getIexchrate() {
+        return iexchrate;
+    }
+
+    public void setIexchrate(String iexchrate) {
+        this.iexchrate = iexchrate;
+    }
+
+    public String getItaxrate() {
+        return itaxrate;
+    }
+
+    public void setItaxrate(String itaxrate) {
+        this.itaxrate = itaxrate;
+    }
+
+    public String getBreturnflag() {
+        return breturnflag;
+    }
+
+    public void setBreturnflag(String breturnflag) {
+        this.breturnflag = breturnflag;
+    }
+
+    public String getCmaker() {
+        return cmaker;
+    }
+
+    public void setCmaker(String cmaker) {
+        this.cmaker = cmaker;
+    }
+
+    public String getCcusname() {
+        return ccusname;
+    }
+
+    public void setCcusname(String ccusname) {
+        this.ccusname = ccusname;
+    }
+
+    public String getCbustype() {
+        return cbustype;
+    }
+
+    public void setCbustype(String cbustype) {
+        this.cbustype = cbustype;
+    }
+}

+ 268 - 0
src/main/java/net/chenlin/dp/modules/api/vo/SaleOrderFTHMin.java

@@ -0,0 +1,268 @@
+package net.chenlin.dp.modules.api.vo;
+
+/**
+ * 销售发货退货表体
+ */
+public class SaleOrderFTHMin {
+    private String autoid;//发货退货单子表标识
+    private String dlid;//发货退货单主表标识
+    private  String icorid;//原发货退货单子表标识
+    private  String cwhcode;//仓库编码
+    private  String cinvcode;//存货编码
+    private  String iquantity;//数量
+    private  String inum;//辅计量数量
+    private  String iunitprice;//原币无税单价
+    private  String itaxunitprice;//原币含税单价
+    private  String imoney;//原币无税金额
+    private  String itax;//原币税额
+    private  String isum;//原币价税合计
+    private  String inatunitprice;//本币无税单价
+    private  String inatmoney;//本币无税金额
+    private  String inattax;//本币税额
+    private  String inatsum;//本币价税合计
+    private  String isosid;//销售订单子表标识
+    private  String cinvname;//存货名称
+    private  String itaxrate;//税率
+    private  String citemcode;//项目编码
+    private  String citemclass;//项目大类编码
+    private String citemname;//项目名称
+    private  String citemcname;//项目大类名称
+    private  String iinvexchrate;//换算率
+    private  String cunitid;//计量单位编码
+    private  String csocode;//销售订单号
+    private  String ccusinvcode;//客户存货编码
+    private  String ccusinvname;//客户存货名称
+    private  String cdefine33;//备注
+
+    public String getAutoid() {
+        return autoid;
+    }
+
+    public void setAutoid(String autoid) {
+        this.autoid = autoid;
+    }
+
+    public String getDlid() {
+        return dlid;
+    }
+
+    public void setDlid(String dlid) {
+        this.dlid = dlid;
+    }
+
+    public String getIcorid() {
+        return icorid;
+    }
+
+    public void setIcorid(String icorid) {
+        this.icorid = icorid;
+    }
+
+    public String getCwhcode() {
+        return cwhcode;
+    }
+
+    public void setCwhcode(String cwhcode) {
+        this.cwhcode = cwhcode;
+    }
+
+    public String getCinvcode() {
+        return cinvcode;
+    }
+
+    public void setCinvcode(String cinvcode) {
+        this.cinvcode = cinvcode;
+    }
+
+    public String getIquantity() {
+        return iquantity;
+    }
+
+    public void setIquantity(String iquantity) {
+        this.iquantity = iquantity;
+    }
+
+    public String getInum() {
+        return inum;
+    }
+
+    public void setInum(String inum) {
+        this.inum = inum;
+    }
+
+    public String getIunitprice() {
+        return iunitprice;
+    }
+
+    public void setIunitprice(String iunitprice) {
+        this.iunitprice = iunitprice;
+    }
+
+    public String getItaxunitprice() {
+        return itaxunitprice;
+    }
+
+    public void setItaxunitprice(String itaxunitprice) {
+        this.itaxunitprice = itaxunitprice;
+    }
+
+    public String getImoney() {
+        return imoney;
+    }
+
+    public void setImoney(String imoney) {
+        this.imoney = imoney;
+    }
+
+    public String getItax() {
+        return itax;
+    }
+
+    public void setItax(String itax) {
+        this.itax = itax;
+    }
+
+    public String getIsum() {
+        return isum;
+    }
+
+    public void setIsum(String isum) {
+        this.isum = isum;
+    }
+
+    public String getInatunitprice() {
+        return inatunitprice;
+    }
+
+    public void setInatunitprice(String inatunitprice) {
+        this.inatunitprice = inatunitprice;
+    }
+
+    public String getInatmoney() {
+        return inatmoney;
+    }
+
+    public void setInatmoney(String inatmoney) {
+        this.inatmoney = inatmoney;
+    }
+
+    public String getInattax() {
+        return inattax;
+    }
+
+    public void setInattax(String inattax) {
+        this.inattax = inattax;
+    }
+
+    public String getInatsum() {
+        return inatsum;
+    }
+
+    public void setInatsum(String inatsum) {
+        this.inatsum = inatsum;
+    }
+
+    public String getIsosid() {
+        return isosid;
+    }
+
+    public void setIsosid(String isosid) {
+        this.isosid = isosid;
+    }
+
+    public String getCinvname() {
+        return cinvname;
+    }
+
+    public void setCinvname(String cinvname) {
+        this.cinvname = cinvname;
+    }
+
+    public String getItaxrate() {
+        return itaxrate;
+    }
+
+    public void setItaxrate(String itaxrate) {
+        this.itaxrate = itaxrate;
+    }
+
+    public String getCitemcode() {
+        return citemcode;
+    }
+
+    public void setCitemcode(String citemcode) {
+        this.citemcode = citemcode;
+    }
+
+    public String getCitemclass() {
+        return citemclass;
+    }
+
+    public void setCitemclass(String citemclass) {
+        this.citemclass = citemclass;
+    }
+
+    public String getCitemname() {
+        return citemname;
+    }
+
+    public void setCitemname(String citemname) {
+        this.citemname = citemname;
+    }
+
+    public String getCitemcname() {
+        return citemcname;
+    }
+
+    public void setCitemcname(String citemcname) {
+        this.citemcname = citemcname;
+    }
+
+    public String getIinvexchrate() {
+        return iinvexchrate;
+    }
+
+    public void setIinvexchrate(String iinvexchrate) {
+        this.iinvexchrate = iinvexchrate;
+    }
+
+    public String getCunitid() {
+        return cunitid;
+    }
+
+    public void setCunitid(String cunitid) {
+        this.cunitid = cunitid;
+    }
+
+    public String getCsocode() {
+        return csocode;
+    }
+
+    public void setCsocode(String csocode) {
+        this.csocode = csocode;
+    }
+
+    public String getCcusinvcode() {
+        return ccusinvcode;
+    }
+
+    public void setCcusinvcode(String ccusinvcode) {
+        this.ccusinvcode = ccusinvcode;
+    }
+
+    public String getCcusinvname() {
+        return ccusinvname;
+    }
+
+    public void setCcusinvname(String ccusinvname) {
+        this.ccusinvname = ccusinvname;
+    }
+
+    public String getCdefine33() {
+        return cdefine33;
+    }
+
+    public void setCdefine33(String cdefine33) {
+        this.cdefine33 = cdefine33;
+    }
+}