南歧nc65对接
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
|||||||
|
package com.mhd.common.core.domain.dto.nc;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "bill")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略
|
||||||
|
@XmlType(propOrder = {"billhead"})
|
||||||
|
public class Ysbill {
|
||||||
|
@XmlAttribute(name = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@XmlElement(name = "billhead")
|
||||||
|
private Ysbillhead billhead;
|
||||||
|
}
|
||||||
+86
@@ -0,0 +1,86 @@
|
|||||||
|
package com.mhd.common.core.domain.dto.nc;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "billhead")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略
|
||||||
|
@XmlType(propOrder = {"pk_group","pk_org","sett_org","creationtime","creator","pk_billtype","pk_tradetype","billyear"
|
||||||
|
,"billclass","isinit","syscode","billdate","billno","src_syscode","billstatus","billmaker","def28","def29","def59","pk_busitype","billperiod","effectstatus","bodys"})
|
||||||
|
public class Ysbillhead {
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_group;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_org;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String sett_org;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String creationtime;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_billtype;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_tradetype;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billclass;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String isinit;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String syscode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billdate;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billno;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String src_syscode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billstatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billmaker;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String def28;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String def29;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String def59;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_busitype;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billyear;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String billperiod;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String effectstatus;
|
||||||
|
|
||||||
|
@XmlElement(name = "bodys")
|
||||||
|
private Ysbodys bodys;
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package com.mhd.common.core.domain.dto.nc;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "bodys")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略
|
||||||
|
@XmlType(propOrder = {"item"})
|
||||||
|
public class Ysbodys {
|
||||||
|
@XmlElement(name = "item")
|
||||||
|
private Ysitem item;
|
||||||
|
}
|
||||||
+85
@@ -0,0 +1,85 @@
|
|||||||
|
package com.mhd.common.core.domain.dto.nc;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "item")
|
||||||
|
public class Ysitem {
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_deptid;
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String so_deptid;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_psndoc;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String customer;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String objtype;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String scomment;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String pk_currtype;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String taxrate;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String quantity_de;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String money_de;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String money_bal;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String notax_de;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String tax_de;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String local_tax_de;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String price;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String taxprice;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String invoiceno;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String recaccount;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String prepay;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String subjcode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String def65;
|
||||||
|
|
||||||
|
@ApiModelProperty( "")
|
||||||
|
private String def75;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
package com.mhd.common.core.domain.dto.nc;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@XmlRootElement(name = "ufinterface")
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD) // 使用字段访问策略
|
||||||
|
@XmlType(propOrder = {"bill"})
|
||||||
|
public class Ysufinterface {
|
||||||
|
@XmlAttribute(name = "account")
|
||||||
|
|
||||||
|
private String account;
|
||||||
|
@XmlAttribute(name = "billtype")
|
||||||
|
|
||||||
|
private String billtype;
|
||||||
|
@XmlAttribute(name = "businessunitcode")
|
||||||
|
|
||||||
|
private String businessunitcode;
|
||||||
|
@XmlAttribute(name = "filename")
|
||||||
|
|
||||||
|
private String filename;
|
||||||
|
@XmlAttribute(name = "groupcode")
|
||||||
|
|
||||||
|
private String groupcode;
|
||||||
|
@XmlAttribute(name = "isexchange")
|
||||||
|
|
||||||
|
private String isexchange;
|
||||||
|
@XmlAttribute(name = "orgcode")
|
||||||
|
|
||||||
|
private String orgcode;
|
||||||
|
@XmlAttribute(name = "receiver")
|
||||||
|
|
||||||
|
private String receiver;
|
||||||
|
@XmlAttribute(name = "replace")
|
||||||
|
|
||||||
|
private String replace;
|
||||||
|
@XmlAttribute(name = "roottag")
|
||||||
|
|
||||||
|
private String roottag;
|
||||||
|
@XmlAttribute(name = "sender")
|
||||||
|
|
||||||
|
private String sender;
|
||||||
|
@XmlElement(name = "bill")
|
||||||
|
private com.mhd.common.core.domain.dto.nc.Ysbill bill;
|
||||||
|
}
|
||||||
@@ -214,4 +214,10 @@ public class UserPo {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||||
private Integer validityPeriodManagement;
|
private Integer validityPeriodManagement;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "业务员nc编码")
|
||||||
|
private String salespersonNcCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "制单员nc编码")
|
||||||
|
private String documentPreparerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,4 +159,10 @@ public class UserEntity extends BaseVOEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||||
private Integer validityPeriodManagement;
|
private Integer validityPeriodManagement;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "业务员nc编码")
|
||||||
|
private String salespersonNcCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "制单员nc编码")
|
||||||
|
private String documentPreparerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -191,4 +191,7 @@ public class UserShipperEntity extends BaseVOEntity {
|
|||||||
private BigDecimal authorizedUsedAmount;
|
private BigDecimal authorizedUsedAmount;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "客户nc编码")
|
||||||
|
private String customerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -254,4 +254,7 @@ public class UserShipperPo implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "备注")
|
@ApiModelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "客户nc编码")
|
||||||
|
private String customerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -248,4 +248,10 @@ public class UserDO extends BaseVOEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||||
private Integer validityPeriodManagement;
|
private Integer validityPeriodManagement;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "业务员nc编码")
|
||||||
|
private String salespersonNcCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "制单员nc编码")
|
||||||
|
private String documentPreparerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -225,4 +225,7 @@ public class UserShipperDO extends UserDO {
|
|||||||
private Integer freightNode;
|
private Integer freightNode;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "客户nc编码")
|
||||||
|
private String customerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,4 +235,10 @@ public class UserDTO extends BaseVOEntity {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
@ApiModelProperty(name = "有效期管理 0-否 1-是")
|
||||||
private Integer validityPeriodManagement;
|
private Integer validityPeriodManagement;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "业务员nc编码")
|
||||||
|
private String salespersonNcCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "制单员nc编码")
|
||||||
|
private String documentPreparerNcCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,4 +191,7 @@ public class UserShipperDTO extends UserDTO {
|
|||||||
@ApiModelProperty(name = "备注信息")
|
@ApiModelProperty(name = "备注信息")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "客户nc编码")
|
||||||
|
private String customerNcCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,18 @@
|
|||||||
<artifactId>alibaba-dingtalk-service-sdk</artifactId>
|
<artifactId>alibaba-dingtalk-service-sdk</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--用友NC65对接-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>2.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
|
<version>2.3.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.linke.finance;
|
||||||
|
|
||||||
|
import com.mhd.common.core.domain.dto.nc.*;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Marshaller;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class Test {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Date date = new Date();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
String dateString = sdf.format(date);
|
||||||
|
Ysitem item=new Ysitem();
|
||||||
|
item.setSo_deptid("NG040104");
|
||||||
|
item.setPk_deptid("NG040104");
|
||||||
|
item.setPk_psndoc("111");
|
||||||
|
item.setCustomer("11111");
|
||||||
|
item.setObjtype("0");
|
||||||
|
item.setDirection("1");
|
||||||
|
item.setScomment("南歧");
|
||||||
|
item.setPk_currtype("HKD");
|
||||||
|
item.setTaxrate("1");
|
||||||
|
item.setQuantity_de("0");
|
||||||
|
item.setMoney_de("1000.00");
|
||||||
|
item.setMoney_bal("1000.00");
|
||||||
|
item.setNotax_de("按税率计算");
|
||||||
|
Ysbodys bodys=new Ysbodys();
|
||||||
|
bodys.setItem(item);
|
||||||
|
Ysbillhead billhead=new Ysbillhead();
|
||||||
|
billhead.setPk_group("CNK");
|
||||||
|
billhead.setPk_org("NG0401");
|
||||||
|
billhead.setSett_org("NG0401");
|
||||||
|
billhead.setCreationtime(dateString);
|
||||||
|
billhead.setCreator("xiangna");
|
||||||
|
billhead.setPk_billtype("F0");
|
||||||
|
billhead.setPk_tradetype("D0");
|
||||||
|
billhead.setBillclass("ys");
|
||||||
|
billhead.setIsinit("N");
|
||||||
|
billhead.setBilldate(dateString);
|
||||||
|
billhead.setSyscode("0");
|
||||||
|
billhead.setBillno("1111111");
|
||||||
|
billhead.setDef59("1111111");
|
||||||
|
billhead.setSrc_syscode("0");
|
||||||
|
billhead.setBillstatus("0");
|
||||||
|
billhead.setBillmaker("xiangna");
|
||||||
|
billhead.setPk_busitype("");
|
||||||
|
billhead.setBillyear("2025");
|
||||||
|
billhead.setBillperiod("12");
|
||||||
|
billhead.setEffectstatus("0");
|
||||||
|
billhead.setDef28("nqyw");
|
||||||
|
billhead.setDef29("11111111");
|
||||||
|
billhead.setBodys(bodys);
|
||||||
|
Ysbill bill=new Ysbill();
|
||||||
|
bill.setId("1111");
|
||||||
|
bill.setBillhead(billhead);
|
||||||
|
Ysufinterface ufinterface=new Ysufinterface();
|
||||||
|
ufinterface.setAccount("NKNC");
|
||||||
|
ufinterface.setBilltype("F0");
|
||||||
|
ufinterface.setBusinessunitcode("");
|
||||||
|
ufinterface.setFilename("");
|
||||||
|
ufinterface.setIsexchange("Y");
|
||||||
|
ufinterface.setOrgcode("NG0401");
|
||||||
|
ufinterface.setReceiver("NG0401");
|
||||||
|
ufinterface.setReplace("Y");
|
||||||
|
ufinterface.setRoottag("");
|
||||||
|
ufinterface.setSender("nqyw");
|
||||||
|
ufinterface.setBill(bill);
|
||||||
|
JAXBContext jaxbContext = null;
|
||||||
|
//String xmlString ="<ufinterface account=\"NKNC\" billtype=\"F0\" businessunitcode=\"\" filename=\"\" groupcode=\"CNK\" isexchange=\"Y\" orgcode=\"NG10\" receiver=\"NG10\" replace=\"Y\" roottag=\"\" sender=\"NKT_MY\">";
|
||||||
|
try {
|
||||||
|
jaxbContext = JAXBContext.newInstance(Ysufinterface.class);
|
||||||
|
Marshaller marshaller = jaxbContext.createMarshaller();
|
||||||
|
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
|
||||||
|
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
marshaller.marshal(ufinterface, sw);
|
||||||
|
String xmlString = sw.toString(); // 这是要发送的XML字符串
|
||||||
|
System.out.println(xmlString);
|
||||||
|
} catch (JAXBException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
@@ -610,6 +610,11 @@ public class ReconciliationApplicationService {
|
|||||||
return reconciliationDomainService.workflowProcessInstances(businessDocumentDetaliIds);
|
return reconciliationDomainService.workflowProcessInstances(businessDocumentDetaliIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean synchronousNc(String businessDocumentDetaliIds)
|
||||||
|
{
|
||||||
|
return reconciliationDomainService.synchronousNc(businessDocumentDetaliIds);
|
||||||
|
}
|
||||||
|
|
||||||
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
||||||
{
|
{
|
||||||
return reconciliationDomainService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
return reconciliationDomainService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
|
|||||||
+2
@@ -62,5 +62,7 @@ public interface IReconciliationService extends IService<Reconciliation>
|
|||||||
|
|
||||||
public StartProcessInstanceResponse workflowProcessInstances(String businessDocumentDetaliIds);
|
public StartProcessInstanceResponse workflowProcessInstances(String businessDocumentDetaliIds);
|
||||||
|
|
||||||
|
public boolean synchronousNc(String businessDocumentDetaliIds);
|
||||||
|
|
||||||
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber);
|
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber);
|
||||||
}
|
}
|
||||||
|
|||||||
+93
@@ -20,6 +20,7 @@ import com.linke.finance.domain.reconciliation.repository.facade.IReconciliation
|
|||||||
import com.linke.finance.domain.reconciliation.repository.mapper.ReconciliationMapper;
|
import com.linke.finance.domain.reconciliation.repository.mapper.ReconciliationMapper;
|
||||||
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
import com.linke.finance.domain.reconciliation.repository.po.ReconciliationPO;
|
||||||
import com.linke.finance.domain.reconciliation.repository.todo.ReconciliationDO;
|
import com.linke.finance.domain.reconciliation.repository.todo.ReconciliationDO;
|
||||||
|
import com.mhd.common.core.domain.dto.nc.*;
|
||||||
import com.mhd.common.core.domain.po.UserPo;
|
import com.mhd.common.core.domain.po.UserPo;
|
||||||
import com.mhd.common.core.domain.thirdparty.dingtalk.DetailsDTO;
|
import com.mhd.common.core.domain.thirdparty.dingtalk.DetailsDTO;
|
||||||
import com.mhd.common.core.domain.thirdparty.dingtalk.FormComponentValuesDTO;
|
import com.mhd.common.core.domain.thirdparty.dingtalk.FormComponentValuesDTO;
|
||||||
@@ -35,6 +36,10 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXBContext;
|
||||||
|
import javax.xml.bind.JAXBException;
|
||||||
|
import javax.xml.bind.Marshaller;
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -354,4 +359,92 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean synchronousNc(String businessDocumentDetaliIds) {
|
||||||
|
String [] businessDocumentDetaliIdArray=businessDocumentDetaliIds.split(",");
|
||||||
|
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||||
|
for (String businessDocumentDetaliId:businessDocumentDetaliIdArray){
|
||||||
|
Reconciliation reconciliation=reconciliationMapper.selectById(businessDocumentDetaliId);
|
||||||
|
try {
|
||||||
|
Date date = reconciliation.getCreateTime();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
|
||||||
|
SimpleDateFormat sdf2 = new SimpleDateFormat("MM");
|
||||||
|
String dateString = sdf.format(date);
|
||||||
|
Ysitem item=new Ysitem();
|
||||||
|
item.setSo_deptid("NG040104");
|
||||||
|
item.setPk_deptid("NG040104");
|
||||||
|
item.setPk_psndoc("0035");
|
||||||
|
item.setCustomer("25849");
|
||||||
|
item.setObjtype("0");
|
||||||
|
item.setDirection("1");
|
||||||
|
item.setScomment("新永鸿工业气体有限公司");
|
||||||
|
item.setPk_currtype("HKD");
|
||||||
|
item.setTaxrate("0");
|
||||||
|
item.setQuantity_de("0");
|
||||||
|
item.setMoney_de(String.valueOf(reconciliation.getVerificationMoney()));
|
||||||
|
item.setMoney_bal(String.valueOf(reconciliation.getVerificationMoney()));
|
||||||
|
item.setNotax_de(String.valueOf(reconciliation.getVerificationMoney()));
|
||||||
|
item.setLocal_tax_de("0");
|
||||||
|
item.setTax_de("0");
|
||||||
|
item.setPrice(String.valueOf(reconciliation.getVerificationMoney()));
|
||||||
|
item.setTaxprice("0");
|
||||||
|
item.setDef75("T10");
|
||||||
|
item.setInvoiceno("");
|
||||||
|
Ysbodys bodys=new Ysbodys();
|
||||||
|
bodys.setItem(item);
|
||||||
|
Ysbillhead billhead=new Ysbillhead();
|
||||||
|
billhead.setPk_group("CNK");
|
||||||
|
billhead.setPk_org("NG0401");
|
||||||
|
billhead.setSett_org("NG0401");
|
||||||
|
billhead.setCreationtime(dateString);
|
||||||
|
billhead.setCreator("zhanghongming");
|
||||||
|
billhead.setPk_billtype("F0");
|
||||||
|
billhead.setPk_tradetype("D0");
|
||||||
|
billhead.setBillclass("ys");
|
||||||
|
billhead.setIsinit("N");
|
||||||
|
billhead.setBilldate(dateString);
|
||||||
|
billhead.setSyscode("0");
|
||||||
|
billhead.setBillno("");
|
||||||
|
billhead.setDef59("");
|
||||||
|
billhead.setSrc_syscode("0");
|
||||||
|
billhead.setBillstatus("0");
|
||||||
|
billhead.setBillmaker("zhanghongming");
|
||||||
|
billhead.setPk_busitype("");
|
||||||
|
billhead.setBillyear(sdf1.format(date));
|
||||||
|
billhead.setBillperiod(sdf2.format(date));
|
||||||
|
billhead.setEffectstatus("0");
|
||||||
|
billhead.setDef28("nqyw");
|
||||||
|
billhead.setDef29(reconciliation.getInnerNumber());
|
||||||
|
billhead.setBodys(bodys);
|
||||||
|
Ysbill bill=new Ysbill();
|
||||||
|
bill.setId(String.valueOf(reconciliation.getReconciliationId()));
|
||||||
|
bill.setBillhead(billhead);
|
||||||
|
Ysufinterface ufinterface=new Ysufinterface();
|
||||||
|
ufinterface.setAccount("NKNC");
|
||||||
|
ufinterface.setBilltype("F0");
|
||||||
|
ufinterface.setBusinessunitcode("");
|
||||||
|
ufinterface.setFilename("");
|
||||||
|
ufinterface.setIsexchange("Y");
|
||||||
|
ufinterface.setOrgcode("NG0401");
|
||||||
|
ufinterface.setReceiver("NG0401");
|
||||||
|
ufinterface.setReplace("Y");
|
||||||
|
ufinterface.setRoottag("");
|
||||||
|
ufinterface.setSender("nqyw");
|
||||||
|
ufinterface.setBill(bill);
|
||||||
|
JAXBContext jaxbContext = JAXBContext.newInstance(Ysufinterface.class);
|
||||||
|
Marshaller marshaller = jaxbContext.createMarshaller();
|
||||||
|
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
|
||||||
|
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // 格式化输出,可选
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
marshaller.marshal(ufinterface, sw);
|
||||||
|
String xmlString = sw.toString(); // 这是要发送的XML字符串
|
||||||
|
System.out.println(xmlString);
|
||||||
|
} catch (JAXBException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -157,6 +157,11 @@ public class ReconciliationDomainService {
|
|||||||
return reconciliationService.workflowProcessInstances(businessDocumentDetaliIds);
|
return reconciliationService.workflowProcessInstances(businessDocumentDetaliIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean synchronousNc(String businessDocumentDetaliIds)
|
||||||
|
{
|
||||||
|
return reconciliationService.synchronousNc(businessDocumentDetaliIds);
|
||||||
|
}
|
||||||
|
|
||||||
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
public int editIsInvoice(String innerNumber, Integer isInvoice, String invoiceId, String invoiceMakeTime,String applyNumber)
|
||||||
{
|
{
|
||||||
return reconciliationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
return reconciliationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
|
|||||||
+12
@@ -263,4 +263,16 @@ public class ReconciliationApi extends BaseController{
|
|||||||
reconciliationApplicationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
reconciliationApplicationService.editIsInvoice(innerNumber,isInvoice,invoiceId,invoiceMakeTime,applyNumber);
|
||||||
return AjaxResult.success("发票开票修改对账单的开票状态成功");
|
return AjaxResult.success("发票开票修改对账单的开票状态成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应收账单同步用户nc65
|
||||||
|
*/
|
||||||
|
@Log(title = "应收账单同步用户nc65", description = "应收账单同步用户nc65", businessType = BusinessType.OTHER)
|
||||||
|
@ApiOperation("应收账单同步用户nc65")
|
||||||
|
@GetMapping(value = "/synchronousNc")
|
||||||
|
public AjaxResult synchronousNc(@RequestParam(name="reconciliationId") String reconciliationId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(reconciliationApplicationService.synchronousNc(reconciliationId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
alter table user ADD COLUMN `validity_period_management` int DEFAULT 0 COMMENT '有效期管理 0-否 1-是';
|
alter table user ADD COLUMN `validity_period_management` int DEFAULT 0 COMMENT '有效期管理 0-否 1-是';
|
||||||
|
|
||||||
=====================================截止2025-11-14 正式数据库已同步完成================================
|
=====================================截止2025-11-14 正式数据库已同步完成================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
alter table user ADD COLUMN `salesperson_nc_code` varchar(255) DEFAULT NULL COMMENT '业务员nc编码';
|
||||||
|
|
||||||
|
alter table user ADD COLUMN `document_preparer_nc_code` varchar(255) DEFAULT NULL COMMENT '制单员nc编码';
|
||||||
|
|
||||||
|
alter table user_shipper ADD COLUMN `customer_nc_code` varchar(255) DEFAULT NULL COMMENT '客户nc编码';
|
||||||
|
|||||||
Reference in New Issue
Block a user