Commit 988faa21 by 熊智

国采改造

parent 4ac86e0d
...@@ -307,17 +307,6 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean ...@@ -307,17 +307,6 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean
throw XZAppUtil.diyEASBizException("取号与订单抬头不一致,无法提交保存"); throw XZAppUtil.diyEASBizException("取号与订单抬头不一致,无法提交保存");
} }
} }
if (entrustNo.startsWith("E")) {
EntrustBillClassifyEntryCollection entrys = info.getClassifyEntrys();
if (entrys != null && entrys.size() > 0) {
CurrencyInfo currency = entrys.get(0).getCurrency();
if (currency != null && !"人民币".equals(currency.getName())) {
if (StringUtils.isEmpty(info.getCustomerBillNumber())) {
throw XZAppUtil.diyEASBizException("国采外币下单时,请填写“报关委托单号”");
}
}
}
}
} }
/** /**
...@@ -923,7 +912,7 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean ...@@ -923,7 +912,7 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean
arTotal = invoiceAmount.subtract(totalAmount); arTotal = invoiceAmount.subtract(totalAmount);
} }
} else if (number.contains("ACI")) { // 普通采购 } else if (number.contains("ACI")) { // 普通采购
rate = BigDecimal.ONE; rate = getCustomsRate(ctx, currencyId, rmbId, info.getBizDate());// 海关汇率
for (int i = 0; i < info.getClassifyEntrys().size(); i++) { for (int i = 0; i < info.getClassifyEntrys().size(); i++) {
EntrustBillClassifyEntryInfo cfyInfo = info.getClassifyEntrys().get(i); EntrustBillClassifyEntryInfo cfyInfo = info.getClassifyEntrys().get(i);
BigDecimal amount = DCUtil.emptyToValue(cfyInfo.getAmount2(), BigDecimal.ZERO); BigDecimal amount = DCUtil.emptyToValue(cfyInfo.getAmount2(), BigDecimal.ZERO);
...@@ -1060,39 +1049,34 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean ...@@ -1060,39 +1049,34 @@ public class EntrustBillControllerBean extends AbstractEntrustBillControllerBean
private void checktotalAmount(Context ctx, EntrustBillInfo info) throws EASBizException, BOSException { private void checktotalAmount(Context ctx, EntrustBillInfo info) throws EASBizException, BOSException {
// 20230724 委托单默认报 双抬头 // 20230724 委托单默认报 双抬头
String isDoubleHeaderStr = DCUtil.getInitSysValueByParamNumber(ctx, "isDoubleHeader"); // 假代理 当总金额大于假代理金额时 假代理字段自动打勾
if ("true".equals(isDoubleHeaderStr)) { BigDecimal fakeAmount = new BigDecimal(DCUtil.getInitSysValueByParamNumber(ctx, "fakeAgent", "0"));
info.setVirtualAgant(true); String currencyId = info.getClassifyEntrys().get(0).getCurrency().getId().toString();
CurrencyInfo baseCurrency = DCUtil.getCurrencyRMB_Abs(ctx);// 人民币
BigDecimal customRate = BigDecimal.ZERO;
if (baseCurrency.getId().toString().equals(currencyId)) {
customRate = BigDecimal.ONE;
} else { } else {
// 假代理 当总金额大于假代理金额时 假代理字段自动打勾 customRate = DCUtil.getCustomsRate(ctx, currencyId, info.getBizDate());// 海关汇率
BigDecimal fakeAmount = new BigDecimal(DCUtil.getInitSysValueByParamNumber(ctx, "fakeAgent", "0")); if (BigDecimal.ZERO.compareTo(customRate) == 0) {
String currencyId = info.getClassifyEntrys().get(0).getCurrency().getId().toString(); throw new EASBizException(new NumericExceptionSubItem("0xE0000026", "请维护海关汇率!!!"));
CurrencyInfo baseCurrency = DCUtil.getCurrencyRMB_Abs(ctx);// 人民币
BigDecimal customRate = BigDecimal.ZERO;
if (baseCurrency.getId().toString().equals(currencyId)) {
customRate = BigDecimal.ONE;
} else {
customRate = DCUtil.getCustomsRate(ctx, currencyId, info.getBizDate());// 海关汇率
if (BigDecimal.ZERO.compareTo(customRate) == 0) {
throw new EASBizException(new NumericExceptionSubItem("0xE0000026", "请维护海关汇率!!!"));
}
} }
BigDecimal totalAmount = info.getTotalAmount().multiply(customRate); }
TFProtocolEntryInfo tfeInfo = info.getBussPlan(); BigDecimal totalAmount = info.getTotalAmount().multiply(customRate);
String number = tfeInfo.getBussExPlan().getNumber(); TFProtocolEntryInfo tfeInfo = info.getBussPlan();
if (number != null && !"".equals(number)) { String number = tfeInfo.getBussExPlan().getNumber();
if (number.contains("ASI")) {// 执行采购 if (number != null && !"".equals(number)) {
EntrustBillInfo entrustInfo = (EntrustBillInfo) DCUtil.getObjectValue(ctx, info.getString("id"), DCUtil.getSeletor("Principal.singleHeader")); if (number.contains("ASI")) {// 执行采购
boolean isSingleHeader = entrustInfo.getPrincipal().isSingleHeader(); EntrustBillInfo entrustInfo = (EntrustBillInfo) DCUtil.getObjectValue(ctx, info.getString("id"), DCUtil.getSeletor("Principal.singleHeader"));
boolean isDoubleHeader = entrustInfo.getPrincipal().isDoubleHeader(); boolean isSingleHeader = entrustInfo.getPrincipal().isSingleHeader();
if ((!isSingleHeader && totalAmount.compareTo(fakeAmount) > 0) || isDoubleHeader) { boolean isDoubleHeader = entrustInfo.getPrincipal().isDoubleHeader();
info.setVirtualAgant(true); if ((!isSingleHeader && totalAmount.compareTo(fakeAmount) > 0) || isDoubleHeader) {
} else {
info.setVirtualAgant(false);
}
} else { // 2018-08-14 新增所有的代理采购均为假代理
info.setVirtualAgant(true); info.setVirtualAgant(true);
} else {
info.setVirtualAgant(false);
} }
} else { // 2018-08-14 新增所有的代理采购均为假代理
info.setVirtualAgant(true);
} }
} }
} }
......
...@@ -46,15 +46,10 @@ import com.kingdee.bos.appframework.uip.UINavigator; ...@@ -46,15 +46,10 @@ import com.kingdee.bos.appframework.uip.UINavigator;
public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.framework.client.CoreUI public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.framework.client.CoreUI
{ {
private static final Logger logger = CoreUIObject.getLogger(AbstractEntrustBillUnitEditUI.class); private static final Logger logger = CoreUIObject.getLogger(AbstractEntrustBillUnitEditUI.class);
protected com.kingdee.bos.ctrl.swing.KDLabelContainer contUnit; protected com.kingdee.bos.ctrl.swing.KDLabelContainer contBGEntrustNo;
protected com.kingdee.bos.ctrl.swing.KDLabelContainer contTradUnit;
protected com.kingdee.bos.ctrl.swing.KDWorkButton btnComfirm; protected com.kingdee.bos.ctrl.swing.KDWorkButton btnComfirm;
protected com.kingdee.bos.ctrl.swing.KDWorkButton btnCancel; protected com.kingdee.bos.ctrl.swing.KDWorkButton btnCancel;
protected com.kingdee.bos.ctrl.swing.KDLabelContainer kDLabelContainer1; protected com.kingdee.bos.ctrl.swing.KDTextField txtBGEntrustNo;
protected com.kingdee.bos.ctrl.swing.KDCheckBox isUpdate;
protected com.kingdee.bos.ctrl.swing.KDComboBox unit;
protected com.kingdee.bos.ctrl.swing.KDComboBox tradUnit;
protected com.kingdee.bos.ctrl.swing.KDTextField txtNoOriginTaxCode;
/** /**
* output class constructor * output class constructor
*/ */
...@@ -73,24 +68,14 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram ...@@ -73,24 +68,14 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram
{ {
this.resHelper = new ResourceBundleHelper(AbstractEntrustBillUnitEditUI.class.getName()); this.resHelper = new ResourceBundleHelper(AbstractEntrustBillUnitEditUI.class.getName());
this.setUITitle(resHelper.getString("this.title")); this.setUITitle(resHelper.getString("this.title"));
this.contUnit = new com.kingdee.bos.ctrl.swing.KDLabelContainer(); this.contBGEntrustNo = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
this.contTradUnit = new com.kingdee.bos.ctrl.swing.KDLabelContainer();
this.btnComfirm = new com.kingdee.bos.ctrl.swing.KDWorkButton(); this.btnComfirm = new com.kingdee.bos.ctrl.swing.KDWorkButton();
this.btnCancel = new com.kingdee.bos.ctrl.swing.KDWorkButton(); this.btnCancel = new com.kingdee.bos.ctrl.swing.KDWorkButton();
this.kDLabelContainer1 = new com.kingdee.bos.ctrl.swing.KDLabelContainer(); this.txtBGEntrustNo = new com.kingdee.bos.ctrl.swing.KDTextField();
this.isUpdate = new com.kingdee.bos.ctrl.swing.KDCheckBox(); this.contBGEntrustNo.setName("contBGEntrustNo");
this.unit = new com.kingdee.bos.ctrl.swing.KDComboBox();
this.tradUnit = new com.kingdee.bos.ctrl.swing.KDComboBox();
this.txtNoOriginTaxCode = new com.kingdee.bos.ctrl.swing.KDTextField();
this.contUnit.setName("contUnit");
this.contTradUnit.setName("contTradUnit");
this.btnComfirm.setName("btnComfirm"); this.btnComfirm.setName("btnComfirm");
this.btnCancel.setName("btnCancel"); this.btnCancel.setName("btnCancel");
this.kDLabelContainer1.setName("kDLabelContainer1"); this.txtBGEntrustNo.setName("txtBGEntrustNo");
this.isUpdate.setName("isUpdate");
this.unit.setName("unit");
this.tradUnit.setName("tradUnit");
this.txtNoOriginTaxCode.setName("txtNoOriginTaxCode");
// CoreUI // CoreUI
this.btnPageSetup.setVisible(false); this.btnPageSetup.setVisible(false);
this.btnCloud.setVisible(false); this.btnCloud.setVisible(false);
...@@ -101,12 +86,9 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram ...@@ -101,12 +86,9 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram
this.menuItemCloudScreen.setVisible(false); this.menuItemCloudScreen.setVisible(false);
this.menuItemCloudShare.setVisible(false); this.menuItemCloudShare.setVisible(false);
this.kdSeparatorFWFile1.setVisible(false); this.kdSeparatorFWFile1.setVisible(false);
// contUnit // contBGEntrustNo
this.contUnit.setBoundLabelText(resHelper.getString("contUnit.boundLabelText")); this.contBGEntrustNo.setBoundLabelText(resHelper.getString("contBGEntrustNo.boundLabelText"));
this.contUnit.setBoundLabelLength(85); this.contBGEntrustNo.setBoundLabelLength(85);
// contTradUnit
this.contTradUnit.setBoundLabelText(resHelper.getString("contTradUnit.boundLabelText"));
this.contTradUnit.setBoundLabelLength(85);
// btnComfirm // btnComfirm
this.btnComfirm.setText(resHelper.getString("btnComfirm.text")); this.btnComfirm.setText(resHelper.getString("btnComfirm.text"));
this.btnComfirm.addActionListener(new java.awt.event.ActionListener() { this.btnComfirm.addActionListener(new java.awt.event.ActionListener() {
...@@ -135,14 +117,7 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram ...@@ -135,14 +117,7 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram
} }
} }
}); });
// kDLabelContainer1 // txtBGEntrustNo
this.kDLabelContainer1.setBoundLabelText(resHelper.getString("kDLabelContainer1.boundLabelText"));
this.kDLabelContainer1.setBoundLabelLength(84);
// isUpdate
this.isUpdate.setText(resHelper.getString("isUpdate.text"));
// unit
// tradUnit
// txtNoOriginTaxCode
//Register control's property binding //Register control's property binding
registerBindings(); registerBindings();
registerUIState(); registerUIState();
...@@ -167,26 +142,16 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram ...@@ -167,26 +142,16 @@ public abstract class AbstractEntrustBillUnitEditUI extends com.kingdee.eas.fram
*/ */
public void initUIContentLayout() public void initUIContentLayout()
{ {
this.setBounds(new Rectangle(10, 10, 290, 140)); this.setBounds(new Rectangle(10, 10, 290, 70));
this.setLayout(null); this.setLayout(null);
contUnit.setBounds(new Rectangle(13, 14, 270, 19)); contBGEntrustNo.setBounds(new Rectangle(13, 14, 270, 19));
this.add(contUnit, null); this.add(contBGEntrustNo, null);
contTradUnit.setBounds(new Rectangle(12, 46, 270, 19)); btnComfirm.setBounds(new Rectangle(144, 46, 61, 19));
this.add(contTradUnit, null);
btnComfirm.setBounds(new Rectangle(144, 110, 61, 19));
this.add(btnComfirm, null); this.add(btnComfirm, null);
btnCancel.setBounds(new Rectangle(221, 110, 61, 19)); btnCancel.setBounds(new Rectangle(221, 46, 61, 19));
this.add(btnCancel, null); this.add(btnCancel, null);
kDLabelContainer1.setBounds(new Rectangle(80, 78, 202, 19)); //contBGEntrustNo
this.add(kDLabelContainer1, null); contBGEntrustNo.setBoundEditor(txtBGEntrustNo);
isUpdate.setBounds(new Rectangle(8, 79, 81, 19));
this.add(isUpdate, null);
//contUnit
contUnit.setBoundEditor(unit);
//contTradUnit
contTradUnit.setBoundEditor(tradUnit);
//kDLabelContainer1
kDLabelContainer1.setBoundEditor(txtNoOriginTaxCode);
} }
......
this.title=\u59D4\u6258\u5355\u4FEE\u6539 this.title=\u59D4\u6258\u5355\u4FEE\u6539
contUnit.boundLabelText=\u5355\u4F4D\uFF1A contBGEntrustNo.boundLabelText=\u62A5\u5173\u59D4\u6258\u5355\u53F7\uFF1A
contTradUnit.boundLabelText=\u6210\u4EA4\u5355\u4F4D\uFF1A
btnComfirm.text=\u786E\u8BA4 btnComfirm.text=\u786E\u8BA4
btnCancel.text=\u53D6\u6D88 btnCancel.text=\u53D6\u6D88
kDLabelContainer1.boundLabelText=\u514D\u4EA7\u5730\u7A0E\u7F16\u7801\uFF1A \ No newline at end of file
isUpdate.text=\u662F\u5426\u66F4\u65B0
\ No newline at end of file
this.title=\u59D4\u6258\u5355\u4FEE\u6539 this.title=\u59D4\u6258\u5355\u4FEE\u6539
contUnit.boundLabelText=\u5355\u4F4D\uFF1A contBGEntrustNo.boundLabelText=\u62A5\u5173\u59D4\u6258\u5355\u53F7\uFF1A
contTradUnit.boundLabelText=\u6210\u4EA4\u5355\u4F4D\uFF1A
btnComfirm.text=\u786E\u8BA4 btnComfirm.text=\u786E\u8BA4
btnCancel.text=\u53D6\u6D88 btnCancel.text=\u53D6\u6D88
kDLabelContainer1.boundLabelText=\u514D\u4EA7\u5730\u7A0E\u7F16\u7801\uFF1A \ No newline at end of file
isUpdate.text=\u662F\u5426\u66F4\u65B0
\ No newline at end of file
this.title=\u59D4\u8A17\u55AE\u4FEE\u6539 this.title=\u59D4\u8A17\u55AE\u4FEE\u6539
contUnit.boundLabelText=\u55AE\u4F4D\uFF1A contBGEntrustNo.boundLabelText=\u5831\u95DC\u59D4\u8A17\u55AE\u865F\uFF1A
contTradUnit.boundLabelText=\u6210\u4EA4\u55AE\u4F4D\uFF1A
btnComfirm.text=\u78BA\u8A8D btnComfirm.text=\u78BA\u8A8D
btnCancel.text=\u53D6\u6D88 btnCancel.text=\u53D6\u6D88
kDLabelContainer1.boundLabelText=\u514D\u7522\u5730\u7A05\u7DE8\u78BC\uFF1A \ No newline at end of file
isUpdate.text=\u662F\u5426\u66F4\u65B0
\ No newline at end of file
...@@ -88,7 +88,7 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI { ...@@ -88,7 +88,7 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI {
if (!StringUtils.isEmpty(value)) { if (!StringUtils.isEmpty(value)) {
HashSet<String> userNos = new HashSet<String>(Arrays.asList(value.split(";"))); HashSet<String> userNos = new HashSet<String>(Arrays.asList(value.split(";")));
if (userNos.contains(userNo)) { if (userNos.contains(userNo)) {
KDWorkButton btnEditUnit = new KDWorkButton("委托单修改"); KDWorkButton btnEditUnit = new KDWorkButton("编辑报关委托单号");
btnEditUnit.addActionListener(new ActionListener() { btnEditUnit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
btnEditUnit_actionPerformed(e); btnEditUnit_actionPerformed(e);
...@@ -136,16 +136,12 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI { ...@@ -136,16 +136,12 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI {
* @description * @description
*/ */
protected void btnEditUnit_actionPerformed(ActionEvent e) { protected void btnEditUnit_actionPerformed(ActionEvent e) {
XZClientUtil.checkSelected(this.kdtClassifyEntrys); if (StringUtils.isEmpty(this.editData.getString("id"))) {
Object[] ids = DCUtil.getSelectedRowsValue(this.kdtClassifyEntrys, "id");
if (UIRuleUtil.isNull(ids)) {
MsgBox.showWarning("请先保存单据!"); MsgBox.showWarning("请先保存单据!");
SysUtil.abort(); SysUtil.abort();
} }
HashSet<String> entryIDs = new HashSet(Arrays.asList(ids));
UIContext uiCtx = new UIContext(this); UIContext uiCtx = new UIContext(this);
uiCtx.put("id", this.editData.getString("id")); uiCtx.put("id", this.editData.getString("id"));
uiCtx.put("entryID", entryIDs);
DCUtil.openUI(EntrustBillUnitEditUI.class.getName(), uiCtx, UIFactoryName.MODEL, OprtState.VIEW); DCUtil.openUI(EntrustBillUnitEditUI.class.getName(), uiCtx, UIFactoryName.MODEL, OprtState.VIEW);
} }
...@@ -537,6 +533,10 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI { ...@@ -537,6 +533,10 @@ public class EntrustBillEditUICTEx extends EntrustBillEditUI {
} }
} }
public void setBGEntrustNo(String bgEntrustNo) {
this.txtcustomerBillNumber.setText(bgEntrustNo);
}
/** /**
* @param string * @param string
* @return * @return
......
...@@ -217,7 +217,7 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI { ...@@ -217,7 +217,7 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI {
menuItemSwitchView.setSelected(true); menuItemSwitchView.setSelected(true);
btnLogistics = new KDWorkButton("物流信息"); btnLogistics = new KDWorkButton("编辑报关委托单号");
btnLogistics.setIcon(EASResource.getIcon("imgTbtn_changecontainer")); btnLogistics.setIcon(EASResource.getIcon("imgTbtn_changecontainer"));
this.toolBar.add(btnLogistics); this.toolBar.add(btnLogistics);
btnLogistics.addActionListener(new ActionListener() { btnLogistics.addActionListener(new ActionListener() {
...@@ -226,11 +226,11 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI { ...@@ -226,11 +226,11 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI {
} }
}); });
addSendEmailFunction(); // addSendEmailFunction();
// 批量关联生成采购订单 // 批量关联生成采购订单
addBatchAssociCreate(); // addBatchAssociCreate();
addExport(); // addExport();
} }
/** /**
...@@ -550,9 +550,8 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI { ...@@ -550,9 +550,8 @@ public class EntrustBillListUI extends AbstractEntrustBillListUI {
} }
String id = tblMain.getCell(rows[0], "id").getValue().toString(); String id = tblMain.getCell(rows[0], "id").getValue().toString();
Map map = new UIContext(this); Map map = new UIContext(this);
map.put("entrustId", id);// 单据IDs map.put("id", id);// 单据IDs
String uiName = "com.kingdee.eas.custom.newbill.client.EntrustBillLogisticsDetaileEditUI"; DCUtil.openUI(EntrustBillUnitEditUI.class.getName(), map, UIFactoryName.MODEL, OprtState.VIEW);
IUIWindow ui = DCUtil.openUI(uiName, map, UIFactoryName.MODEL, OprtState.ADDNEW);
} }
private void fillDate(String number, String pk) { private void fillDate(String number, String pk) {
......
...@@ -40,7 +40,6 @@ import com.kingdee.eas.camel.XZUtil; ...@@ -40,7 +40,6 @@ import com.kingdee.eas.camel.XZUtil;
import com.kingdee.eas.camel.client.UpdateTitleUtil; import com.kingdee.eas.camel.client.UpdateTitleUtil;
import com.kingdee.eas.camel.client.XZClientUtil; import com.kingdee.eas.camel.client.XZClientUtil;
import com.kingdee.eas.common.client.OprtState; import com.kingdee.eas.common.client.OprtState;
import com.kingdee.eas.custom.SCMCommonUtil;
import com.kingdee.eas.fm.common.FMIsqlFacadeFactory; import com.kingdee.eas.fm.common.FMIsqlFacadeFactory;
import com.kingdee.eas.hse.basedata.RateTypeInfo; import com.kingdee.eas.hse.basedata.RateTypeInfo;
import com.kingdee.eas.hse.common.F7ListenerTypeEnum; import com.kingdee.eas.hse.common.F7ListenerTypeEnum;
...@@ -81,44 +80,6 @@ public class PurcharseOrderEditUI extends AbstractPurcharseOrderEditUI { ...@@ -81,44 +80,6 @@ public class PurcharseOrderEditUI extends AbstractPurcharseOrderEditUI {
checkSvisionCd(); checkSvisionCd();
} }
@Override
public void actionEdit_actionPerformed(ActionEvent e) throws Exception {
String entrustNo = this.editData.getServiceNumber();
if (!StringUtils.isEmpty(entrustNo)) {
Object[] objs = SCMCommonUtil.checkPurOrderExistChangeBill(null, entrustNo);
if (!(Boolean) objs[0]) {
MsgBox.showWarning(objs[1] + "");
return;
// int flag = MsgBox.showConfirm2("该入仓号 " + entrustNo + objs[1] + ",是否执行修改?");
// if (flag == MsgBox.YES) {
// SCMCommonUtil.insertChangeBillRecord(entrustNo, "修改");
// } else {
// return;
// }
}
}
super.actionEdit_actionPerformed(e);
}
@Override
public void actionRemove_actionPerformed(ActionEvent e) throws Exception {
String entrustNo = this.editData.getServiceNumber();
if (!StringUtils.isEmpty(entrustNo)) {
Object[] objs = SCMCommonUtil.checkPurOrderExistChangeBill(null, entrustNo);
if (!(Boolean) objs[0]) {
MsgBox.showWarning(objs[1] + "");
return;
// int flag = MsgBox.showConfirm2("该入仓号 " + entrustNo + objs[1] + ",是否执行删除?");
// if (flag == MsgBox.YES) {
// SCMCommonUtil.insertChangeBillRecord(entrustNo, "删除");
// } else {
// return;
// }
}
}
super.actionRemove_actionPerformed(e);
}
public void actionPrint_actionPerformed(ActionEvent e) throws Exception { public void actionPrint_actionPerformed(ActionEvent e) throws Exception {
super.actionPrint_actionPerformed(e); super.actionPrint_actionPerformed(e);
PurcharseOrderFactory.getRemoteInstance().orderPrint(this.editData); PurcharseOrderFactory.getRemoteInstance().orderPrint(this.editData);
......
...@@ -3,7 +3,6 @@ package com.kingdee.eas.hse.scm.purchasemanager.client; ...@@ -3,7 +3,6 @@ package com.kingdee.eas.hse.scm.purchasemanager.client;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -30,7 +29,6 @@ import com.kingdee.eas.camel.client.XZClientUtil; ...@@ -30,7 +29,6 @@ import com.kingdee.eas.camel.client.XZClientUtil;
import com.kingdee.eas.common.client.OprtState; import com.kingdee.eas.common.client.OprtState;
import com.kingdee.eas.common.client.UIContext; import com.kingdee.eas.common.client.UIContext;
import com.kingdee.eas.common.client.UIFactoryName; import com.kingdee.eas.common.client.UIFactoryName;
import com.kingdee.eas.custom.SCMCommonUtil;
import com.kingdee.eas.hse.common.HSEBillStatusEnum; import com.kingdee.eas.hse.common.HSEBillStatusEnum;
import com.kingdee.eas.hse.common.client.DcClientUtil; import com.kingdee.eas.hse.common.client.DcClientUtil;
import com.kingdee.eas.hse.common.util.DCUtil; import com.kingdee.eas.hse.common.util.DCUtil;
...@@ -187,54 +185,6 @@ public class PurcharseOrderListUI extends AbstractPurcharseOrderListUI { ...@@ -187,54 +185,6 @@ public class PurcharseOrderListUI extends AbstractPurcharseOrderListUI {
MsgBox.showInfo("没有可查看的PI附件"); MsgBox.showInfo("没有可查看的PI附件");
} }
@Override
public void actionEdit_actionPerformed(ActionEvent e) throws Exception {
checkSelected();
String id = getSelectedKeyValue();
IPurcharseOrder iFactory = PurcharseOrderFactory.getRemoteInstance();
PurcharseOrderInfo info = iFactory.getPurcharseOrderInfo("select principalId.id, serviceNumber where id = '" + id + "'");
String entrustNo = info.getServiceNumber();
if (!StringUtils.isEmpty(entrustNo)) {
Object[] objs = SCMCommonUtil.checkPurOrderExistChangeBill(null, entrustNo);
if (!(Boolean) objs[0]) {
MsgBox.showWarning(objs[1] + "");
return;
// int flag = MsgBox.showConfirm2("该入仓号 " + entrustNo + objs[1] + ",是否执行修改?");
// if (flag == MsgBox.YES) {
// SCMCommonUtil.insertChangeBillRecord(entrustNo, "修改");
// } else {
// return;
// }
}
}
super.actionEdit_actionPerformed(e);
}
@Override
public void actionRemove_actionPerformed(ActionEvent e) throws Exception {
checkSelected();
ArrayList ids = getSelectedIdValues();
IPurcharseOrder iFactory = PurcharseOrderFactory.getRemoteInstance();
for (int i = 0, size = ids.size(); i < size; i++) {
PurcharseOrderInfo info = iFactory.getPurcharseOrderInfo("select principalId.id, serviceNumber where id = '" + ids.get(i) + "'");
String entrustNo = info.getServiceNumber();
if (!StringUtils.isEmpty(entrustNo)) {
Object[] objs = SCMCommonUtil.checkPurOrderExistChangeBill(null, entrustNo);
if (!(Boolean) objs[0]) {
MsgBox.showWarning(objs[1] + "");
return;
// int flag = MsgBox.showConfirm2("该入仓号 " + entrustNo + objs[1] + ",是否执行删除?");
// if (flag == MsgBox.YES) {
// SCMCommonUtil.insertChangeBillRecord(entrustNo, "删除");
// } else {
// return;
// }
}
}
}
super.actionRemove_actionPerformed(e);
}
/** /**
* @param e * @param e
* @author xiongzhi * @author xiongzhi
......
...@@ -43,14 +43,19 @@ import com.kingdee.eas.basedata.master.cssp.CustomerLinkManCollection; ...@@ -43,14 +43,19 @@ import com.kingdee.eas.basedata.master.cssp.CustomerLinkManCollection;
import com.kingdee.eas.basedata.master.cssp.CustomerLinkManFactory; import com.kingdee.eas.basedata.master.cssp.CustomerLinkManFactory;
import com.kingdee.eas.basedata.master.cssp.CustomerLinkManInfo; import com.kingdee.eas.basedata.master.cssp.CustomerLinkManInfo;
import com.kingdee.eas.basedata.master.cssp.ICustomerLinkMan; import com.kingdee.eas.basedata.master.cssp.ICustomerLinkMan;
import com.kingdee.eas.basedata.org.CompanyOrgUnitFactory;
import com.kingdee.eas.basedata.org.CompanyOrgUnitInfo;
import com.kingdee.eas.basedata.person.PersonInfo; import com.kingdee.eas.basedata.person.PersonInfo;
import com.kingdee.eas.camel.XZUtil; import com.kingdee.eas.camel.XZUtil;
import com.kingdee.eas.camel.app.XZAppUtil; import com.kingdee.eas.camel.app.XZAppUtil;
import com.kingdee.eas.common.EASBizException; import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.newbill.IchuntCustomTaskFacadeFactory; import com.kingdee.eas.custom.newbill.IchuntCustomTaskFacadeFactory;
import com.kingdee.eas.custom.newbill.InventoryManagementFacadeFactory; import com.kingdee.eas.custom.newbill.InventoryManagementFacadeFactory;
import com.kingdee.eas.hse.basedata.ServeProjectFactory;
import com.kingdee.eas.hse.basedata.ServeProjectInfo;
import com.kingdee.eas.hse.basedata.SysParameterCollection; import com.kingdee.eas.hse.basedata.SysParameterCollection;
import com.kingdee.eas.hse.basedata.SysParameterInfo; import com.kingdee.eas.hse.basedata.SysParameterInfo;
import com.kingdee.eas.hse.common.DCConstant;
import com.kingdee.eas.hse.common.HSEBillStatusEnum; import com.kingdee.eas.hse.common.HSEBillStatusEnum;
import com.kingdee.eas.hse.common.dflModeEnum; import com.kingdee.eas.hse.common.dflModeEnum;
import com.kingdee.eas.hse.common.util.DCCallBotpUtil; import com.kingdee.eas.hse.common.util.DCCallBotpUtil;
...@@ -85,11 +90,15 @@ import com.kingdee.eas.hse.scm.salemanager.SalesOrderEntryFactory; ...@@ -85,11 +90,15 @@ import com.kingdee.eas.hse.scm.salemanager.SalesOrderEntryFactory;
import com.kingdee.eas.hse.scm.salemanager.SalesOrderEntryInfo; import com.kingdee.eas.hse.scm.salemanager.SalesOrderEntryInfo;
import com.kingdee.eas.hse.scm.salemanager.SalesOrderInfo; import com.kingdee.eas.hse.scm.salemanager.SalesOrderInfo;
import com.kingdee.eas.hse.scm.salemanager.SignStatus; import com.kingdee.eas.hse.scm.salemanager.SignStatus;
import com.kingdee.eas.hse.scm.service.IScsfundPool;
import com.kingdee.eas.hse.scm.service.ScsfundPoolFactory;
import com.kingdee.eas.hse.scm.service.ScsfundPoolInfo;
import com.kingdee.eas.hse.scm.warehousemanager.IInventoryMananger; import com.kingdee.eas.hse.scm.warehousemanager.IInventoryMananger;
import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerCollection; import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerCollection;
import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerFactory; import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerFactory;
import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerInfo; import com.kingdee.eas.hse.scm.warehousemanager.InventoryManangerInfo;
import com.kingdee.eas.hse.scm.warehousemanager.WareHouseIO; import com.kingdee.eas.hse.scm.warehousemanager.WareHouseIO;
import com.kingdee.eas.hse.settle.app.ArApType;
import com.kingdee.eas.util.app.DbUtil; import com.kingdee.eas.util.app.DbUtil;
import com.kingdee.jdbc.rowset.IRowSet; import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.util.NumericExceptionSubItem; import com.kingdee.util.NumericExceptionSubItem;
...@@ -702,7 +711,7 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill ...@@ -702,7 +711,7 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill
String entrustNo = postReqInfo.getServiceNumber(); String entrustNo = postReqInfo.getServiceNumber();
if (entrustNo.startsWith("E")) { if (entrustNo.startsWith("E")) {
IEntrustBill iFactory = EntrustBillFactory.getLocalInstance(ctx); IEntrustBill iFactory = EntrustBillFactory.getLocalInstance(ctx);
String oql = "where number = '" + entrustNo + "'"; String oql = "select *, customer.*, ClassifyEntrys.*, ClassifyEntrys.currency.* where number = '" + entrustNo + "'";
if (iFactory.exists(oql)) { if (iFactory.exists(oql)) {
EntrustBillInfo info = iFactory.getEntrustBillInfo(oql); EntrustBillInfo info = iFactory.getEntrustBillInfo(oql);
EntrustBillClassifyEntryCollection entrys = info.getClassifyEntrys(); EntrustBillClassifyEntryCollection entrys = info.getClassifyEntrys();
...@@ -716,6 +725,7 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill ...@@ -716,6 +725,7 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill
} }
String scmWSDLUrl = DCUtil.getInitSysValueByParamNumber(ctx, "scmWSDLUrl"); String scmWSDLUrl = DCUtil.getInitSysValueByParamNumber(ctx, "scmWSDLUrl");
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("entrustNo", customerBillNo);
HashMap<String, Object> params = XZUtil.APIWSCtx(scmWSDLUrl, "getGCDatas", json.toJSONString()); HashMap<String, Object> params = XZUtil.APIWSCtx(scmWSDLUrl, "getGCDatas", json.toJSONString());
String rs = XZAppUtil.callAPI(ctx, params); String rs = XZAppUtil.callAPI(ctx, params);
reloadInitData(ctx, postReqInfo, info, rs); reloadInitData(ctx, postReqInfo, info, rs);
...@@ -732,11 +742,14 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill ...@@ -732,11 +742,14 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill
* @author 熊智 * @author 熊智
* @param info * @param info
* @param postReqInfo * @param postReqInfo
* @throws BOSException
* @throws EASBizException
* @date 2024-1-23 下午02:21:50 * @date 2024-1-23 下午02:21:50
*/ */
private void reloadInitData(Context ctx, PostRequistionBillInfo postReqInfo, EntrustBillInfo info, String rs) { private void reloadInitData(Context ctx, PostRequistionBillInfo postReqInfo, EntrustBillInfo info, String rs) throws EASBizException, BOSException {
if (!StringUtils.isEmpty(rs)) { if (!StringUtils.isEmpty(rs)) {
JSONArray jsons = JSONObject.parseArray(rs); JSONArray jsons = JSONObject.parseArray(rs);
IScsfundPool iFactory = ScsfundPoolFactory.getLocalInstance(ctx);
for (int i = 0; i < jsons.size(); i++) { for (int i = 0; i < jsons.size(); i++) {
JSONObject json = jsons.getJSONObject(i); JSONObject json = jsons.getJSONObject(i);
String poolID = json.getString("poolID"); String poolID = json.getString("poolID");
...@@ -744,9 +757,48 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill ...@@ -744,9 +757,48 @@ public class PostRequistionBillControllerBean extends AbstractPostRequistionBill
String serveProject = json.getString("serveProject"); String serveProject = json.getString("serveProject");
BigDecimal amt = json.getBigDecimal("amt"); BigDecimal amt = json.getBigDecimal("amt");
String bizDate = json.getString("bizDate"); String bizDate = json.getString("bizDate");
String contractNo = json.getString("contractNo");
String oql = "where innerBillBack = '" + poolID + "'";
if (!iFactory.exists(oql)) {
ScsfundPoolInfo fInfo1 = new ScsfundPoolInfo();
fInfo1.setInnerBillBack(poolID);
fInfo1.setServiceInnerCode(poolNo);
fInfo1.setBizFlow(info.getBizFlow());
fInfo1.setBizSubFlow(info.getBizSubFlow());
fInfo1.setServiceNumber(info.getNumber());
fInfo1.setBizDate(XZUtil.StringToDate(bizDate, "yyyy-MM-dd"));//业务日期 - 申报日期
fInfo1.setPredictType(DCUtil.getSysParameterInfoByNumber(ctx, "CUSTOMER"));//往来单位类型 供应商
fInfo1.setPredictId(info.getCustomer().getId().toString());//往来单位ID - 供应商
fInfo1.setPredictNumber(info.getCustomer().getNumber());//往来单位编码
fInfo1.setPredictName(info.getCustomer().getName());//往来单位名称
fInfo1.setArap(ArApType.ar);//收付类型 - 收
ServeProjectInfo infoSp = null;
if ("进口增值税".equals(serveProject)) {
infoSp = ServeProjectFactory.getLocalInstance(ctx).getServeProjectInfo(" where number = '"+DCConstant.serviceProjecttarrfiAmount+"'");//增值税
} else {
infoSp = ServeProjectFactory.getLocalInstance(ctx).getServeProjectInfo(" where number = '"+DCConstant.serviceProjectvatAmount+"'");//关税
}
fInfo1.setGroupSP(infoSp.getGroup());//计费项目组别
fInfo1.setServerProject(infoSp);//计费项目
fInfo1.setOrgCurrency(DCUtil.getCurrencyRMB_Abs(ctx));//RMB
fInfo1.setSettleCurrency(fInfo1.getOrgCurrency());//RMB
fInfo1.setRate(BigDecimal.ONE);//汇率
fInfo1.setOrgAmount(amt);//原币金额
fInfo1.setSettleAmount(amt);//结算金额
fInfo1.setSourceBillNumber(postReqInfo.getNumber());//来源单据编码
fInfo1.setSourceBillId(postReqInfo.getId().toString());//来源单据ID
fInfo1.setSourceBillEntryId(null);//来源单据分录ID
fInfo1.setSourceFunction(DCUtil.getEntityName(ctx, postReqInfo.getBOSType().toString()));//来源单据类型
fInfo1.setPrincipal(info.getPrincipal());//委托方
fInfo1.setIsDK(info.isIsDKs());
CompanyOrgUnitInfo cInfo = postReqInfo.getCompany();
fInfo1.setCompany(cInfo);//出口经营单位 公司
fInfo1.setCU(cInfo.getCU());//出口经营单位 对应的CU
fInfo1.setDealPerson(postReqInfo.getDealPerson());//处理人
fInfo1.setCreateTime(DCUtil.DateToTimestamp(XZUtil.StringToDate(bizDate, "yyyy-MM-dd")));//审核日期
fInfo1.setCustomsBrokerContractsNum(contractNo);
iFactory.save(fInfo1);
}
} }
} }
} }
......
...@@ -6006,10 +6006,10 @@ public class FundManager implements IServiceManager { ...@@ -6006,10 +6006,10 @@ public class FundManager implements IServiceManager {
fInfo.setGroupSP(infoSp.getGroup());//计费项目组别 fInfo.setGroupSP(infoSp.getGroup());//计费项目组别
fInfo.setServerProject(infoSp);//计费项目 fInfo.setServerProject(infoSp);//计费项目
fInfo.setOrgCurrency(info.getCurrency());//原币别 -结算币别 fInfo.setOrgCurrency(info.getCurrency());//原币别 -结算币别
fInfo.setSettleCurrency(info.getCurrency());//结算币别 -结算币别 fInfo.setSettleCurrency(DCUtil.getCurrencyRMB(cmd.getContext()));//结算币别 -结算币别
fInfo.setOrgAmount(totalAmount);//原币金额 fInfo.setOrgAmount(totalAmount);//原币金额
fInfo.setSettleAmount(totalAmount);//结算金额 fInfo.setSettleAmount(totalAmount.multiply(info.getRate()).setScale(2, RoundingMode.HALF_UP));//结算金额
fInfo.setRate(BigDecimal.ONE);//客户汇率 fInfo.setRate(info.getRate());//客户汇率
fInfo.setSourceBillNumber(info.getNumber());//来源单据编码 fInfo.setSourceBillNumber(info.getNumber());//来源单据编码
fInfo.setSourceBillId(info.getId().toString());//来源单据ID fInfo.setSourceBillId(info.getId().toString());//来源单据ID
fInfo.setSourceBillEntryId(info.getId().toString());//来源单据分录ID fInfo.setSourceBillEntryId(info.getId().toString());//来源单据分录ID
...@@ -6040,13 +6040,14 @@ public class FundManager implements IServiceManager { ...@@ -6040,13 +6040,14 @@ public class FundManager implements IServiceManager {
CurrencyInfo currency = null; CurrencyInfo currency = null;
if(classifyEntryInfo1!=null){ if(classifyEntryInfo1!=null){
fEntryInfo.setPrice(classifyEntryInfo1.getPrice2()); fEntryInfo.setPrice(classifyEntryInfo1.getPrice2());
fEntryInfo.setSettleAmount(classifyEntryInfo1.getPrice2().multiply(eInfo.getOutStockQty()).setScale(DCUtil.getAmountPrecision(), RoundingMode.HALF_UP)); fEntryInfo.setSettleAmount(classifyEntryInfo1.getPrice2().multiply(eInfo.getOutStockQty()).multiply(info.getRate()).setScale(DCUtil.getAmountPrecision(), RoundingMode.HALF_UP));
fEntryInfo.setOrgAmount(classifyEntryInfo1.getPrice2().multiply(eInfo.getOutStockQty()).setScale(DCUtil.getAmountPrecision(), RoundingMode.HALF_UP)); fEntryInfo.setOrgAmount(classifyEntryInfo1.getPrice2().multiply(eInfo.getOutStockQty()).setScale(DCUtil.getAmountPrecision(), RoundingMode.HALF_UP));
currency = classifyEntryInfo1.getCurrency(); currency = classifyEntryInfo1.getCurrency();
} }
fEntryInfo.setSettleCurrency(currency);
fEntryInfo.setSettleCurrency(fInfo.getSettleCurrency());
fEntryInfo.setCurrency(currency); fEntryInfo.setCurrency(currency);
fEntryInfo.setRate(BigDecimal.ONE); fEntryInfo.setRate(info.getRate());
fEntryInfo.setUnit(classifyEntryInfo1.getUnit()); fEntryInfo.setUnit(classifyEntryInfo1.getUnit());
fEntryInfo.setQty(eInfo.getOutStockQty()); fEntryInfo.setQty(eInfo.getOutStockQty());
fEntryInfo.setContractsNum(info.getNumber()); fEntryInfo.setContractsNum(info.getNumber());
......
...@@ -2991,11 +2991,25 @@ public class ArChargeSettleEditUI extends AbstractArChargeSettleEditUI ...@@ -2991,11 +2991,25 @@ public class ArChargeSettleEditUI extends AbstractArChargeSettleEditUI
info.setTTLAmount(orignAmount.multiply(newRate)); info.setTTLAmount(orignAmount.multiply(newRate));
info.setAdjSAT(BigDecimal.ZERO); info.setAdjSAT(BigDecimal.ZERO);
} else{ } else{
BigDecimal rate = DCUtil.gethseExRateDay(detailInfo.getString("FOrgCurrencyID"), SettlementCurrency.getId().toString(),detailInfo.getDate("ebFBizdate") , forExRate.卖出价); if ("13".equals(editData.getBizFlow().getNumber()) && !detailInfo.getString("FOrgCurrencyID").equals(SettlementCurrency.getId().toString())) {
info.setExchangeRate(rate); BigDecimal rate = BigDecimal.ONE;
info.setSettlementAmount(orignAmount.multiply(rate)); try {
info.setTTLAmount(orignAmount.multiply(rate)); rate = DCUtil.getCustomsRate(null, detailInfo.getString("FOrgCurrencyID"), detailInfo.getDate("ebFBizdate"));
info.setAdjSAT(BigDecimal.ZERO); } catch (Exception e) {
e.printStackTrace();
}
// 海关汇率
info.setExchangeRate(rate);
info.setSettlementAmount(orignAmount.multiply(rate));
info.setTTLAmount(orignAmount.multiply(rate));
info.setAdjSAT(BigDecimal.ZERO);
} else {
BigDecimal rate = DCUtil.gethseExRateDay(detailInfo.getString("FOrgCurrencyID"), SettlementCurrency.getId().toString(),detailInfo.getDate("ebFBizdate") , forExRate.卖出价);
info.setExchangeRate(rate);
info.setSettlementAmount(orignAmount.multiply(rate));
info.setTTLAmount(orignAmount.multiply(rate));
info.setAdjSAT(BigDecimal.ZERO);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment