Commit 126faaed by liuyang
parents c06e494f 6400cb7a
...@@ -99,7 +99,7 @@ public enum DdynamicEnum { ...@@ -99,7 +99,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框,带id名称等信息 * 用途:存货档案下拉框,带id名称等信息
* 编写: * 编写:
*/ */
PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail","HGPZ005.queryProductComboBox"), PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail", "spec","HGPZ005.queryProductComboBox"),
/** /**
* 模块:存货档案(ALL) * 模块:存货档案(ALL)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
......
...@@ -585,7 +585,7 @@ public class HGCGTools { ...@@ -585,7 +585,7 @@ public class HGCGTools {
Map<String, Object> paramMap = new HashMap<>(); Map<String, Object> paramMap = new HashMap<>();
paramMap.put("receiveNo", receiveNo); paramMap.put("receiveNo", receiveNo);
paramMap.put("isInvoicing", isInvoicing); paramMap.put("isInvoicing", isInvoicing);
DaoUtils.update(HGSqlConstant.HgCw003A.UPDATE_IS_INVOICING, paramMap); DaoUtils.update(HGSqlConstant.HgCg003A.UPDATE_IS_INVOICING, paramMap);
} }
/** /**
......
...@@ -383,4 +383,11 @@ public class HGConstant { ...@@ -383,4 +383,11 @@ public class HGConstant {
// 手动录入 // 手动录入
public static final Integer SDLR = 1; public static final Integer SDLR = 1;
} }
public static class WhCodeStatus {
// 采购计划
public static final Integer S_0 = 0;
// 销售计划
public static final Integer S_1 = 1;
}
} }
...@@ -103,11 +103,11 @@ public class HGSqlConstant { ...@@ -103,11 +103,11 @@ public class HGSqlConstant {
public static final String UPDATE_CONFIRM = MODULE_NAME + "updateConfirm"; public static final String UPDATE_CONFIRM = MODULE_NAME + "updateConfirm";
} }
public class HgCw003A { public class HgCg003A {
/** /**
* 模块名称:HGCW003A * 模块名称:HGCW003A
*/ */
private static final String MODULE_NAME = "HGCW003A."; private static final String MODULE_NAME = "HGCG003A.";
public static final String UPDATE_IS_INVOICING = MODULE_NAME + "updateIsInvoicing"; public static final String UPDATE_IS_INVOICING = MODULE_NAME + "updateIsInvoicing";
} }
......
...@@ -215,7 +215,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -215,7 +215,7 @@ public class ServiceHGCW010 extends ServiceBase {
hgcw011.setMainId(hgcw010.getId()); hgcw011.setMainId(hgcw010.getId());
hgcw011.setId(null); hgcw011.setId(null);
// 反写金额 // 反写金额
HGCWTools.HgCw008.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber())); HGCWTools.HgCw008.deductionAmount(resultRows.get(0).get("contractNumber"), hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber()));
DaoUtils.insert(HGCW011.INSERT, hgcw011); DaoUtils.insert(HGCW011.INSERT, hgcw011);
} }
} else { } else {
...@@ -231,7 +231,7 @@ public class ServiceHGCW010 extends ServiceBase { ...@@ -231,7 +231,7 @@ public class ServiceHGCW010 extends ServiceBase {
for (HGCW011 hgcw011 : hgcw011List) { for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(hgcw010.getId()); hgcw011.setMainId(hgcw010.getId());
// 反写金额 // 反写金额
HGCWTools.HgCw008.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber())); HGCWTools.HgCw008.deductionAmount(resultRows.get(0).get("contractNumber"), hgcw011.getSettlementNumber(), rowMap.get(hgcw011.getSettlementNumber()));
this.addHGCW011(hgcw011); this.addHGCW011(hgcw011);
} }
List<HGCW011> hgcw011s = HGCWTools.HgCw011.getMainId(hgcw010.getId()); List<HGCW011> hgcw011s = HGCWTools.HgCw011.getMainId(hgcw010.getId());
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/5
* @description 销售开票-合同管理选择
*/
public class ServiceHGCW010D extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票-选择合同",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票-选择合同",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HGCW010D.query", new HGCW002());
}
catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售开票-选择合同",operType = "新增",operDesc = "生成销售开票单")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HGCW011> hgcw011List = mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw011List)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW010 hgcw010 = new HGCW010();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername());
hgcw010.setBillTybe(1);
hgcw010.setReviewStatus(0);
hgcw010.setBillState(1);
hgcw010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer();
Map<String, BigDecimal> rowMap = new HashMap<>();
for (HGCW011 hgcw011 : hgcw011List) {
settlementNumber.append(hgcw011.getSettlementNumber()).append(",");
}
for (Map m : resultRows) {
String c = m.get("contractNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}
hgcw010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
hgcw010.setPartyA(hgcw011List.get(0).getPartyA());
hgcw010.setProjCode(hgcw011List.get(0).getProjCode());
hgcw010.setProjName(hgcw011List.get(0).getProjName());
hgcw010.setTaxPoints(hgcw011List.get(0).getTaxPoints());
hgcw010.setThisSettlementTax(hgcw011List.get(0).getThisSettlementTax());
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setBillNumber(hgcw011List.get(0).getBillNumber());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
hgcw010.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
this.add(hgcw010);
//生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(hgcw010.getId());
hgcw011.setId(null);
// 反写金额
HGCWTools.HgCw002.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber()));
DaoUtils.insert(HGCW011.INSERT, hgcw011);
}
} else {
HGCW010 hgcw010 = HGCWTools.HgCw010.getId(mainId);
Map<String, BigDecimal> rowMap = new HashMap<>();
for (Map m : resultRows) {
String c = m.get("contractNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
}
// 生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(hgcw010.getId());
// 反写金额
HGCWTools.HgCw002.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber()));
this.addHGCW011(hgcw011);
}
List<HGCW011> hgcw011s = HGCWTools.HgCw011.getMainId(hgcw010.getId());
if (CollectionUtils.isNotEmpty(hgcw011s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
settlementNumber.append(hgcw011.getSettlementNumber()).append(",");
}
hgcw010.setTotalContractPriceIncluding(totalContractPriceIncluding);
hgcw010.setPartyA(hgcw011s.get(0).getPartyA());
hgcw010.setProjCode(hgcw011s.get(0).getProjCode());
hgcw010.setProjName(hgcw011s.get(0).getProjName());
hgcw010.setTaxPoints(hgcw011List.get(0).getTaxPoints());
hgcw010.setThisSettlementTax(hgcw011List.get(0).getThisSettlementTax());
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setBillNumber(hgcw011List.get(0).getBillNumber());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
this.modify(hgcw010);
}
}inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据生成成功!");
}
}
catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成销售开票单失败");
}
return inInfo;
}
public void add(HGCW010 hgcw010) {
DaoUtils.insert("HGCW010.insert", hgcw010);
}
public void modify(HGCW010 hgcw010) {
DaoUtils.update("HGCW010.update", hgcw010);
}
public void addHGCW011(HGCW011 hgcw011) {
DaoUtils.insert("HGCW011.insert", hgcw011);
}
public List<HGCW011> mapToList(List<Map> rows, Long mainId) {
List<HGCW011> HGCW011List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW011 hgcw011 = new HGCW011();
hgcw011.fromMap(row);
String contractNumber = row.get("contractNumber").toString(); //合同号
String remainingAmount = row.get("thisAmount").toString(); //本次开票金额
BigDecimal taxPoints = new BigDecimal(row.get("taxPoints").toString()); // 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal thisAmount = new BigDecimal(row.get("thisAmount").toString());
BigDecimal taxRateAsDecimal = taxPoints.divide(new BigDecimal("100")).add(new BigDecimal("1")); // 将税率转换为小数形式
BigDecimal thisSettlementAmount = thisAmount.divide(taxRateAsDecimal, 2, RoundingMode.HALF_UP);
BigDecimal thisSettlementTax = thisAmount.subtract(thisSettlementAmount); // 计算税额
hgcw011.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
hgcw011.setSettlementNumber(contractNumber);
hgcw011.setThisSettlementTax(thisSettlementTax.toString());
hgcw011.setThisSettlementAmount(thisSettlementAmount.toString());
if (mainId != null) {
hgcw011.setMainId(mainId);
}
HGCW011List.add(hgcw011);
});
}
return HGCW011List;
}
}
package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/5
* @description 销售开票-租赁合同选择
*/
public class ServiceHGCW010E extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票-选择租赁合同",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售开票-选择租赁合同",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HGCW010E.query", new HGCW006());
}
catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "销售开票-选择租赁合同",operType = "新增",operDesc = "生成销售开票单")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows();
String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) {
mainId = queryRows.get(0).get("mainId").toString();
}
//获取相应的数据
List<HGCW011> hgcw011List = mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw011List)) {
if (StringUtils.isEmpty(mainId)) {
//先生成主表
HGCW010 hgcw010 = new HGCW010();
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername());
hgcw010.setBillTybe(1);
hgcw010.setReviewStatus(0);
hgcw010.setBillState(1);
hgcw010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer();
Map<String, BigDecimal> rowMap = new HashMap<>();
for (HGCW011 hgcw011 : hgcw011List) {
settlementNumber.append(hgcw011.getSettlementNumber()).append(",");
}
for (Map m : resultRows) {
String c = m.get("contractNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
totalContractPriceIncluding = totalContractPriceIncluding.add(remainingAmount);
}
hgcw010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
hgcw010.setPartyA(hgcw011List.get(0).getPartyA());
hgcw010.setProjCode(hgcw011List.get(0).getProjCode());
hgcw010.setProjName(hgcw011List.get(0).getProjName());
hgcw010.setTaxPoints(hgcw011List.get(0).getTaxPoints());
hgcw010.setThisSettlementTax(hgcw011List.get(0).getThisSettlementTax());
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setBillNumber(hgcw011List.get(0).getBillNumber());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
hgcw010.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
this.add(hgcw010);
//生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(hgcw010.getId());
hgcw011.setId(null);
// 反写金额
HGCWTools.HgCw006.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber()));
DaoUtils.insert(HGCW011.INSERT, hgcw011);
}
} else {
HGCW010 hgcw010 = HGCWTools.HgCw010.getId(mainId);
Map<String, BigDecimal> rowMap = new HashMap<>();
for (Map m : resultRows) {
String c = m.get("contractNumber").toString();
BigDecimal remainingAmount = new BigDecimal(m.get("thisAmount").toString());
rowMap.put(c, remainingAmount);
}
// 生成明细表
for (HGCW011 hgcw011 : hgcw011List) {
hgcw011.setMainId(hgcw010.getId());
// 反写金额
HGCWTools.HgCw006.deductionAmount(hgcw011.getSettlementNumber(),rowMap.get(hgcw011.getSettlementNumber()));
this.addHGCW011(hgcw011);
}
List<HGCW011> hgcw011s = HGCWTools.HgCw011.getMainId(hgcw010.getId());
if (CollectionUtils.isNotEmpty(hgcw011s)) {
// 更新主表
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011s) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding());
settlementNumber.append(hgcw011.getSettlementNumber()).append(",");
}
hgcw010.setTotalContractPriceIncluding(totalContractPriceIncluding);
hgcw010.setPartyA(hgcw011s.get(0).getPartyA());
hgcw010.setProjCode(hgcw011s.get(0).getProjCode());
hgcw010.setProjName(hgcw011s.get(0).getProjName());
hgcw010.setTaxPoints(hgcw011List.get(0).getTaxPoints());
hgcw010.setThisSettlementTax(hgcw011List.get(0).getThisSettlementTax());
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setBillNumber(hgcw011List.get(0).getBillNumber());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
this.modify(hgcw010);
}
}inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据生成成功!");
}
}
catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成销售开票单失败");
}
return inInfo;
}
public void add(HGCW010 hgcw010) {
DaoUtils.insert("HGCW010.insert", hgcw010);
}
public void modify(HGCW010 hgcw010) {
DaoUtils.update("HGCW010.update", hgcw010);
}
public void addHGCW011(HGCW011 hgcw011) {
DaoUtils.insert("HGCW011.insert", hgcw011);
}
public List<HGCW011> mapToList(List<Map> rows, Long mainId) {
List<HGCW011> hgcw011ArrayList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW011 hgcw011 = new HGCW011();
hgcw011.fromMap(row);
String contractNumber = row.get("contractNumber").toString(); //合同号
String remainingAmount = row.get("thisAmount").toString(); //本次开票金额
BigDecimal taxPoints = new BigDecimal(row.get("taxPoints").toString()); // 假设这是以整数形式给出的税率,比如17表示17%
BigDecimal thisAmount = new BigDecimal(row.get("thisAmount").toString());
BigDecimal taxRateAsDecimal = taxPoints.divide(new BigDecimal("100")).add(new BigDecimal("1")); // 将税率转换为小数形式
BigDecimal thisSettlementAmount = thisAmount.divide(taxRateAsDecimal, 2, RoundingMode.HALF_UP);
BigDecimal thisSettlementTax = thisAmount.subtract(thisSettlementAmount); // 计算税额
hgcw011.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
hgcw011.setSettlementNumber(contractNumber);
hgcw011.setThisSettlementTax(thisSettlementTax.toString());
hgcw011.setThisSettlementAmount(thisSettlementAmount.toString());
if (mainId != null) {
hgcw011.setMainId(mainId);
}
hgcw011ArrayList.add(hgcw011);
});
}
return hgcw011ArrayList;
}
}
...@@ -278,7 +278,7 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -278,7 +278,7 @@ public class ServiceHGCW012 extends ServiceBase {
} }
catch (Exception e) { catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败"); LogUtils.setMsg(inInfo, e, "生成采购收票失败");
} }
return inInfo; return inInfo;
} }
...@@ -375,7 +375,7 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -375,7 +375,7 @@ public class ServiceHGCW012 extends ServiceBase {
} }
catch (Exception e) { catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败"); LogUtils.setMsg(inInfo, e, "生成采购收票失败");
} }
return inInfo; return inInfo;
} }
...@@ -473,7 +473,7 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -473,7 +473,7 @@ public class ServiceHGCW012 extends ServiceBase {
} }
catch (Exception e) { catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败"); LogUtils.setMsg(inInfo, e, "生成采购收票失败");
} }
return inInfo; return inInfo;
} }
......
...@@ -609,4 +609,15 @@ ...@@ -609,4 +609,15 @@
</isNotEqual> </isNotEqual>
ORDER BY a.CONTRACT_NUMBER ORDER BY a.CONTRACT_NUMBER
</select> </select>
<update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW002
SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余金额-->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap> </sqlMap>
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
<update id="updateDeductionAmount"> <update id="updateDeductionAmount">
UPDATE ${hggpSchema}.HGCW006 UPDATE ${hggpSchema}.HGCW006
SET SET
REMAINING_AMOUNT = #remainingAmount#, <!-- 审核状态 --> REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余金额 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 --> UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
ON T1.PROJ_CODE = B.PROJ_CODE ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.REMAINING_AMOUNT != 0 WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.REMAINING_AMOUNT != 0 AND T1.REVIEW_STATUS = '3'
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCW010D">
<sql id="condition">
<!--<include refid="HGXSDataAuth.authCondition"/>-->
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like ('%$projName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER like ('%$contractNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME like ('%$contractName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCategory">
CONTRACT_CATEGORY = #contractCategory#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A like ('%$partyA$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B like ('%$partyB$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyC">
PARTY_C = #partyC#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planStartDate">
PLAN_START_DATE = #planStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planEndDate">
PLAN_END_DATE = #planEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="engineeringAddress">
ENGINEERING_ADDRESS = #engineeringAddress#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainContractNumber">
MAIN_CONTRACT_NUMBER like ('%$mainContractNumber$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractContent">
CONTRACT_CONTENT = #contractContent#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractingMethod">
CONTRACTING_METHOD = #contractingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="balanceStatus">
BALANCE_STATUS = #balanceStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME like ('%$createdName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
CONTRACT_TYPE as "contractType", <!-- 合同类型;1销售合同2劳务合同3补充协议4合同外用工 -->
CONTRACT_CATEGORY as "contractCategory", <!-- 合同类别;1支出2收入 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB", <!-- 乙方名称 -->
PARTY_C as "partyC", <!-- 丙方名称 -->
PLAN_START_DATE as "planStartDate", <!-- 计划开工日期 -->
PLAN_END_DATE as "planEndDate", <!-- 计划竣工日期 -->
CONTRACT_STATUS as "contractStatus", <!-- 合同状态;1草签2签约 -->
PARTY_A_NAME as "partyAName", <!-- 甲方联系人姓名 -->
PARTY_A_PHONE_NUMBER as "partyAPhoneNumber", <!-- 甲方联系人电话 -->
ALREADY_NAME as "alreadyName", <!-- 已方联系人姓名 -->
ALREADY_PHONE_NUMBER as "alreadyPhoneNumber", <!-- 已方联系人电话 -->
ENGINEERING_ADDRESS as "engineeringAddress", <!-- 工程地址 -->
SIGNING_DATE as "signingDate", <!-- 签约日期 -->
MAIN_CONTRACT_NUMBER as "mainContractNumber", <!-- 主合同号 -->
CONTRACT_CONTENT as "contractContent", <!-- 合同内容 -->
CONTRACTING_METHOD as "contractingMethod", <!-- 承包方式 -->
PAYMENT_METHOD as "paymentMethod", <!-- 付款方式;1一次性付款2分期付款 -->
PRICING_METHOD as "pricingMethod", <!-- 计价方式;1固定单价合同2固定总价合同 -->
TAX_POINTS as "taxPoints", <!-- 税点 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
VALUE_ADDED_TAX as "valueAddedTax", <!-- 税点 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
BALANCE_STATUS as "balanceStatus", <!-- 结算状态;1未结算2部分结算3最终结算 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount"
FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE = 5 AND REMAINING_AMOUNT != 0 AND REVIEW_STATUS = '3'
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW002 WHERE 1=1
<include refid="condition" />
</select>
<!--查询合同总价和补充协议-->
<select id="sumContractPrice" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW002">
SELECT
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
SUM(A.TOTAL_CONTRACT_PRICE_EXCLUDING) as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
SUM(A.VALUE_ADDED_TAX) as "valueAddedTax", <!-- 税点 -->
SUM(A.TOTAL_CONTRACT_PRICE_INCLUDING) as "totalContractPriceIncluding" <!-- 合同总价(含税) -->
FROM (
SELECT
ACCOUNT_CODE as "ACCOUNT_CODE",<!-- 企业编码 -->
COMPANY_CODE as "COMPANY_CODE",<!-- 公司编码 -->
PROJ_CODE as "PROJ_CODE", <!-- 项目编码 -->
SUM( TOTAL_CONTRACT_PRICE_EXCLUDING) as "TOTAL_CONTRACT_PRICE_EXCLUDING", <!-- 合同总价(不含税) -->
SUM(VALUE_ADDED_TAX) as "VALUE_ADDED_TAX", <!-- 税点 -->
SUM(TOTAL_CONTRACT_PRICE_INCLUDING) as "TOTAL_CONTRACT_PRICE_INCLUDING" <!-- 合同总价(含税) -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1 AND REVIEW_STATUS = '3'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
GROUP BY ACCOUNT_CODE,COMPANY_CODE,PROJ_CODE
UNION ALL
SELECT
ACCOUNT_CODE as "ACCOUNT_CODE", <!-- 企业编码 -->
COMPANY_CODE as "COMPANY_CODE", <!-- 公司编码 -->
PROJ_CODE as "PROJ_CODE", <!-- 项目编码 -->
SUM(TOTAL_CONTRACT_PRICE_EXCLUDING) as "TOTAL_CONTRACT_PRICE_EXCLUDING", <!-- 合同总价(不含税) -->
SUM(VALUE_ADDED_TAX) as "VALUE_ADDED_TAX", <!-- 税点 -->
SUM(TOTAL_CONTRACT_PRICE_INCLUDING) as "TOTAL_CONTRACT_PRICE_INCLUDING" <!-- 合同总价(含税) -->
FROM ${hggpSchema}.HGCW002
WHERE 1=1 AND REVIEW_STATUS = '3'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER IN (
SELECT distinct MAIN_CONTRACT_NUMBER
FROM ${hggpSchema}.HGCW002
WHERE 1=1 AND REVIEW_STATUS = '3' and CONTRACT_NUMBER = #contractNumber#
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
)
</isNotEmpty>
GROUP BY ACCOUNT_CODE,COMPANY_CODE,PROJ_CODE
) as A
group by A.ACCOUNT_CODE, A.COMPANY_CODE, A.PROJ_CODE
</select>
</sqlMap>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCW010E">
<sql id="condition">
<!--<include refid="HGXSDataAuth.authCondition"/>-->
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B = #partyB#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalQuantity">
TOTAL_QUANTITY = #totalQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAName">
PARTY_A_NAME = #partyAName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyAPhoneNumber">
PARTY_A_PHONE_NUMBER = #partyAPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyName">
ALREADY_NAME = #alreadyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="alreadyPhoneNumber">
ALREADY_PHONE_NUMBER = #alreadyPhoneNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractStatus">
CONTRACT_STATUS = #contractStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseStartDate">
LEASE_START_DATE = #leaseStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaseEndDate">
LEASE_END_DATE = #leaseEndDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="paymentMethod">
PAYMENT_METHOD = #paymentMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="pricingMethod">
PRICING_METHOD = #pricingMethod#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceExcluding">
TOTAL_CONTRACT_PRICE_EXCLUDING = #totalContractPriceExcluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="valueAddedTax">
VALUE_ADDED_TAX = #valueAddedTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPriceIncluding">
TOTAL_CONTRACT_PRICE_INCLUDING = #totalContractPriceIncluding#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remainingAmount">
REMAINING_AMOUNT > #remainingAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE >= #signingDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= #signingDateTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="supName">
PARTY_B like concat('%',#supName#,'%')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW006">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
CONTRACT_NAME as "contractName", <!-- 合同名称 -->
PARTY_A as "partyA", <!-- 甲方名称 -->
PARTY_B as "partyB", <!-- 乙方名称 -->
SIGNING_DATE as "signingDate", <!-- 签约日期 -->
TOTAL_QUANTITY as "totalQuantity", <!-- 总数量 -->
PARTY_A_NAME as "partyAName", <!-- 甲方联系人姓名 -->
PARTY_A_PHONE_NUMBER as "partyAPhoneNumber", <!-- 甲方联系人电话 -->
ALREADY_NAME as "alreadyName", <!-- 已方联系人姓名 -->
ALREADY_PHONE_NUMBER as "alreadyPhoneNumber", <!-- 已方联系人电话 -->
CONTRACT_STATUS as "contractStatus", <!-- 合同状态;1草签2签约 -->
LEASE_START_DATE as "leaseStartDate", <!-- 租赁开始日期 -->
LEASE_END_DATE as "leaseEndDate", <!-- 租赁结束日期 -->
PAYMENT_METHOD as "paymentMethod", <!-- 付款方式;1一次性付款2分期付款 -->
PRICING_METHOD as "pricingMethod", <!-- 计价方式;1固定单价合同2固定总价合同 -->
TAX_POINTS as "taxPoints", <!-- 税点 -->
TOTAL_CONTRACT_PRICE_EXCLUDING as "totalContractPriceExcluding", <!-- 合同总价(不含税) -->
VALUE_ADDED_TAX as "valueAddedTax", <!-- 增值税 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 合同总价(含税) -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余金额 -->
REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW006 WHERE 1=1 AND REMAINING_AMOUNT != 0 AND REVIEW_STATUS = '3'
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW006 WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
\ No newline at end of file
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumbers">
SETTLEMENT_NUMBER IN <iterate close=")" open="(" conjunction="," property="settlementNumbers">#settlementNumbers[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
...@@ -311,6 +311,40 @@ public class HGCWTools { ...@@ -311,6 +311,40 @@ public class HGCWTools {
}); });
return results.get(0); return results.get(0);
} }
public static void deductionAmount(String contractNumber, BigDecimal deductionAmount) {
AssertUtils.isNull(contractNumber, "合同不能为空!");
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List<HGCW002> results = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
if (CollectionUtils.isEmpty(results)) {
throw new PlatException("找不到对应的合同!");
}
BigDecimal totalAmount = HgCw011.sumSettlementNumber(Collections.singletonList(contractNumber)); //获取累计开票金额
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW002 hgcw002 = results.get(0);
BigDecimal remaining = hgcw002.getTotalContractPriceIncluding();
//获取销售合同金额和补充协议金额
List<HGCW002> hgcw002List = DaoBase.getInstance().query("HGCW010D.sumContractPrice",new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
//计算销售合同金额的20%的总金额 总金额=合同金额+合同金额的20%
remaining = hgcw002List.get(0).getTotalContractPriceIncluding().add(hgcw002List.get(0).getTotalContractPriceIncluding().multiply(new BigDecimal("0.2")));
//合同总金额-(累计开票金额+本次来票金额)
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(remaining.subtract(deductionAmount.add(totalAmount))));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("本次开票金额加累计开票金额超出销售合同金额20%,超出20%需要业务新增补充协议!");
}
BigDecimal remainingCount = new BigDecimal(decimalFormat.format(hgcw002.getRemainingAmount().subtract(deductionAmount)));
hgcw002.setRemainingAmount(remainingCount);
DaoUtils.update("HGCW002.updateDeductionAmount", hgcw002);
}
} }
public static class HgCw003{ public static class HgCw003{
...@@ -355,7 +389,7 @@ public class HGCWTools { ...@@ -355,7 +389,7 @@ public class HGCWTools {
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) { // if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!"); // throw new PlatException("扣款金额不能小于等于0!");
// } // }
List<HGCW006> results = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){ List<HGCW006> results = DaoBase.getInstance().query(HGCW006.QUERY,new HashMap<String,Object>(){
{put("contractNumber",settlementNumber);} {put("contractNumber",settlementNumber);}
}); });
if (CollectionUtils.isEmpty(results)) { if (CollectionUtils.isEmpty(results)) {
...@@ -433,6 +467,55 @@ public class HGCWTools { ...@@ -433,6 +467,55 @@ public class HGCWTools {
} }
public static void deductionAmount(Object contractNumber, String settlementNumber, BigDecimal deductionAmount) {
AssertUtils.isNull(contractNumber, "合同不能为空!");
AssertUtils.isNull(settlementNumber, "结算单不能为空!");
// if (deductionAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
// throw new PlatException("扣款金额不能小于等于0!");
// }
List<HGCW008> hgcw008List = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){
{put("settlementNumber",settlementNumber);}
});
if (CollectionUtils.isEmpty(hgcw008List)) {
throw new PlatException("找不到对应的结算单!");
}
List<HGCW002> hgcw002s = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
if (CollectionUtils.isEmpty(hgcw002s)) {
throw new PlatException("找不到对应的合同!");
}
//获取当期项目所以的结算单
List<HGCW008> cw008List = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
List<String> stringList = cw008List.stream().map(HGCW008::getSettlementNumber).collect(Collectors.toList());
BigDecimal totalAmount = HgCw011.sumSettlementNumber(stringList); //获取累计开票金额
DecimalFormat decimalFormat = new DecimalFormat("#.000");
HGCW002 hgcw002 = hgcw002s.get(0);
BigDecimal remaining = hgcw002.getTotalContractPriceIncluding();
//获取销售合同金额和补充协议金额
List<HGCW002> hgcw002List = DaoBase.getInstance().query("HGCW010D.sumContractPrice",new HashMap<String,Object>(){
{put("contractNumber",contractNumber);}
});
//计算销售合同金额的20%的总金额 总金额=合同金额+合同金额的20%
remaining = hgcw002List.get(0).getTotalContractPriceIncluding().add(hgcw002List.get(0).getTotalContractPriceIncluding().multiply(new BigDecimal("0.2")));
//合同总金额-(累计开票金额+本次来票金额)
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(remaining.subtract(deductionAmount.add(totalAmount))));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("本次开票金额加累计开票金额超出销售合同金额20%,超出20%需要业务新增补充协议!");
}
HGCW008 hgcw008 = hgcw008List.get(0);
BigDecimal remainingCount = new BigDecimal(decimalFormat.format(hgcw008.getRemainingAmount().subtract(deductionAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("扣款金额不能大于结算单剩余金额!");
}
hgcw008.setRemainingAmount(remainingCount);
DaoUtils.update("HGCW008.updateDeductionAmount", hgcw008);
}
} }
...@@ -694,6 +777,24 @@ public class HGCWTools { ...@@ -694,6 +777,24 @@ public class HGCWTools {
}); });
return results; return results;
} }
/**
* 根据来源单号获取总金额
* @param settlementNumber 来源单号
* @return
*/
public static BigDecimal sumSettlementNumber(List<String> settlementNumber) {
AssertUtils.isNull(settlementNumber, "来源单号不能为空!");
List<HGCW011> results = DaoBase.getInstance().query(HGCW011.QUERY,new HashMap<String,Object>(){
{put("settlementNumbers",settlementNumber);}
});
AssertUtils.isEmpty(results, "找不到对应的销售开票记录!");
BigDecimal totalAmount = new BigDecimal("0");
for (HGCW011 hgcw011: results) {
totalAmount = totalAmount.add(hgcw011.getTotalContractPriceIncluding());
}
return totalAmount;
}
} }
/** /**
......
...@@ -109,6 +109,9 @@ public class ServiceHGKC001 extends ServiceBase { ...@@ -109,6 +109,9 @@ public class ServiceHGKC001 extends ServiceBase {
String depositNo = fCg004.getDepositNo(); String depositNo = fCg004.getDepositNo();
HGKC001 dbCg004 = dbCg004Map.get(depositNo); HGKC001 dbCg004 = dbCg004Map.get(depositNo);
AssertUtils.isNull(dbCg004, String.format("入库单[%s]不存在", depositNo)); AssertUtils.isNull(dbCg004, String.format("入库单[%s]不存在", depositNo));
if (fCg004.getSubmitStatus().equals(HGConstant.WhCodeStatus.S_1)){
AssertUtils.isTrue(true, String.format("入库单[%s]状态为已提交,不能修改", fCg004.getDepositNo()));
}
} }
} }
......
...@@ -268,6 +268,9 @@ ...@@ -268,6 +268,9 @@
FLOW_ID FLOW_ID
) )
VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#) VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#)
<selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) FROM ${hggpSchema}.HGPZ005
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -378,7 +381,8 @@ ...@@ -378,7 +381,8 @@
a.WIDTH as "width", <!-- 宽 --> a.WIDTH as "width", <!-- 宽 -->
a.THICK as "thick", <!-- 厚 --> a.THICK as "thick", <!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType", b.PAR_INVENT_TYPE as "parInventType",
b.INVENT_TYPE_DETAIL as "inventTypeDetail" b.INVENT_TYPE_DETAIL as "inventTypeDetail",
a.SPEC as "spec" <!-- 规格 -->
FROM ${hggpSchema}.HGPZ005 a FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0 left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
WHERE a.DELETE_FLAG = 0 WHERE a.DELETE_FLAG = 0
......
...@@ -240,8 +240,8 @@ public class HGPZTools { ...@@ -240,8 +240,8 @@ public class HGPZTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode); queryMap.put("inventCode", inventCode);
List<HGPZ005> results = DaoBase.getInstance().query(HGPZ005.QUERY, queryMap); List<HGPZ005> results = DaoBase.getInstance().query(HGPZ005.QUERY, queryMap);
AssertUtils.isEmpty(results, String.format("物料编码[%s]不存在", inventCode)); //AssertUtils.isEmpty(results, String.format("物料编码[%s]不存在", inventCode));
return results.get(0); return results.size() == 0 ? null :results.get(0);
} }
/** /**
...@@ -613,7 +613,10 @@ public class HGPZTools { ...@@ -613,7 +613,10 @@ public class HGPZTools {
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put(HGPZ005.FIELD_INVENT_CODE, hgpz005.getInventCode()); params.put(HGPZ005.FIELD_INVENT_CODE, hgpz005.getInventCode());
List hgpz005s = DaoBase.getInstance().query(HGPZ005.QUERY, params); List hgpz005s = DaoBase.getInstance().query(HGPZ005.QUERY, params);
AssertUtils.isNotEmpty(hgpz005s, String.format("存货编码[%s]已存在", hgpz005.getInventCode())); if (CollectionUtils.isNotEmpty(hgpz005s)){
continue;
}
//AssertUtils.isNotEmpty(hgpz005s, String.format("存货编码[%s]已存在", hgpz005.getInventCode()));
//hgpz005.setInventCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_CODE)); //hgpz005.setInventCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.INVENT_CODE));
// 设置规格 // 设置规格
if (StringUtils.isBlank(hgpz005.getSpec())) { if (StringUtils.isBlank(hgpz005.getSpec())) {
......
...@@ -40,6 +40,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -40,6 +40,7 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_product_name = "productName"; /* 产品名称*/ public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_type = "productType"; /* 产品type*/ public static final String FIELD_product_type = "productType"; /* 产品type*/
public static final String FIELD_invent_type = "inventType"; /* 档案类型*/ public static final String FIELD_invent_type = "inventType"; /* 档案类型*/
public static final String FIELD_spec = "spec"; /* 规格*/
public static final String FIELD_length = "length"; /* 长*/ public static final String FIELD_length = "length"; /* 长*/
public static final String FIELD_width = "width"; /* 宽*/ public static final String FIELD_width = "width"; /* 宽*/
public static final String FIELD_thick = "thick"; /* 厚*/ public static final String FIELD_thick = "thick"; /* 厚*/
...@@ -56,6 +57,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -56,6 +57,9 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/ public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/ public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/ public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String COL_id = "id"; /* 主键*/ public static final String COL_id = "id"; /* 主键*/
public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/ public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/
...@@ -125,6 +129,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -125,6 +129,7 @@ public class HGSC004A extends DaoEPBase {
private String productName = " "; /* 产品名称*/ private String productName = " "; /* 产品名称*/
private String productType = " "; /* 产品类型*/ private String productType = " "; /* 产品类型*/
private String inventType = " "; /* 档案类型*/ private String inventType = " "; /* 档案类型*/
private String spec = " ";
private BigDecimal length = new BigDecimal("0"); /* 长*/ private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/ private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/ private BigDecimal thick = new BigDecimal("0"); /* 厚*/
...@@ -142,6 +147,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -142,6 +147,9 @@ public class HGSC004A extends DaoEPBase {
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal("0"); /* 系数*/
private String unit = " "; /* 单位*/
private Long techFlowId = new Long(0); /* 工艺流程id*/ private Long techFlowId = new Long(0); /* 工艺流程id*/
private String finishDate = " "; /* 完工日期*/ private String finishDate = " "; /* 完工日期*/
...@@ -225,22 +233,27 @@ public class HGSC004A extends DaoEPBase { ...@@ -225,22 +233,27 @@ public class HGSC004A extends DaoEPBase {
eiColumn = new EiColumn(FIELD_product_code); eiColumn = new EiColumn(FIELD_product_code);
eiColumn.setFieldLength(32); eiColumn.setFieldLength(32);
eiColumn.setDescName("产品编号"); eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_name); eiColumn = new EiColumn(FIELD_product_name);
eiColumn.setFieldLength(50); eiColumn.setFieldLength(50);
eiColumn.setDescName("产品名称"); eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_type); eiColumn = new EiColumn(FIELD_product_type);
eiColumn.setFieldLength(32); eiColumn.setFieldLength(32);
eiColumn.setDescName("产品类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_type); eiColumn = new EiColumn(FIELD_invent_type);
eiColumn.setFieldLength(32); eiColumn.setFieldLength(32);
eiColumn.setDescName("档案类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_spec);
eiColumn.setFieldLength(96);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_length); eiColumn = new EiColumn(FIELD_length);
...@@ -341,7 +354,20 @@ public class HGSC004A extends DaoEPBase { ...@@ -341,7 +354,20 @@ public class HGSC004A extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -840,6 +866,38 @@ public class HGSC004A extends DaoEPBase { ...@@ -840,6 +866,38 @@ public class HGSC004A extends DaoEPBase {
this.thick = thick; this.thick = thick;
} }
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getMaterial() {
return material;
}
public void setMaterial(String material) {
this.material = material;
}
public BigDecimal getCoefficient() {
return coefficient;
}
public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient;
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -866,6 +924,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -866,6 +924,7 @@ public class HGSC004A extends DaoEPBase {
setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId)); setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId));
setProductType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_type)), productType)); setProductType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_type)), productType));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_invent_type)), inventType)); setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_invent_type)), inventType));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_spec)), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length)); setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick));
...@@ -882,6 +941,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -882,6 +941,9 @@ public class HGSC004A extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
} }
/** /**
...@@ -909,6 +971,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -909,6 +971,7 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id))); map.put(FIELD_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id)));
map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type))); map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type)));
map.put(FIELD_invent_type, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_invent_type))); map.put(FIELD_invent_type, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_invent_type)));
map.put(FIELD_spec, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_spec)));
map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length))); map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length)));
map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width))); map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width)));
map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick))); map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick)));
...@@ -925,7 +988,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -925,7 +988,9 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by))); map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by)));
map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name))); map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name)));
map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time))); map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
return map; return map;
} }
} }
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
spec as "spec", <!-- 规格 -->
length as "length", <!-- 长 --> length as "length", <!-- 长 -->
width as "width", <!-- 宽 --> width as "width", <!-- 宽 -->
thick as "thick", <!-- 厚 --> thick as "thick", <!-- 厚 -->
...@@ -84,6 +85,9 @@ ...@@ -84,6 +85,9 @@
<isNotEmpty prepend=" AND " property="inventType"> <isNotEmpty prepend=" AND " property="inventType">
invent_type = #inventType# invent_type = #inventType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="quantity"> <isNotEmpty prepend=" AND " property="quantity">
quantity = #quantity# quantity = #quantity#
</isNotEmpty> </isNotEmpty>
...@@ -199,6 +203,7 @@ ...@@ -199,6 +203,7 @@
a.product_code as "productCode", <!-- 产品编号 --> a.product_code as "productCode", <!-- 产品编号 -->
a.product_name as "productName", <!-- 产品名称 --> a.product_name as "productName", <!-- 产品名称 -->
a.invent_type as "inventType", <!-- 档案类型 --> a.invent_type as "inventType", <!-- 档案类型 -->
a.spec as "spec",
a.length as "length", <!-- 长 --> a.length as "length", <!-- 长 -->
a.width as "width", <!-- 宽 --> a.width as "width", <!-- 宽 -->
a.thick as "thick", <!-- 厚 --> a.thick as "thick", <!-- 厚 -->
...@@ -295,6 +300,7 @@ ...@@ -295,6 +300,7 @@
updated_by, <!-- 更新人 --> updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 --> updated_name, <!-- 修改人名称 -->
updated_time, <!-- 更新时间 --> updated_time, <!-- 更新时间 -->
spec, <!-- 规格 -->
length, <!-- 长 --> length, <!-- 长 -->
width, <!-- 宽 --> width, <!-- 宽 -->
thick <!-- 厚 --> thick <!-- 厚 -->
...@@ -303,7 +309,7 @@ ...@@ -303,7 +309,7 @@
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#, #parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #length#, #width#, #thick#) #updatedName#, #updatedTime#, #spec#, #length#, #width#, #thick#)
<selectKey resultClass="java.lang.Long" keyProperty="id"> <selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) FROM ${hggpSchema}.HGSC004A SELECT MAX(ID) FROM ${hggpSchema}.HGSC004A
</selectKey> </selectKey>
...@@ -333,6 +339,7 @@ ...@@ -333,6 +339,7 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
spec = #spec#,
length = #length#, <!-- 长 --> length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 --> width = #width#, <!-- 宽 -->
thick = #thick#, <!-- 厚 --> thick = #thick#, <!-- 厚 -->
......
...@@ -330,16 +330,12 @@ public class HGSCTools { ...@@ -330,16 +330,12 @@ public class HGSCTools {
hgsc004a.setCompanyName(results.get(0).getCompanyName()); hgsc004a.setCompanyName(results.get(0).getCompanyName());
hgsc004a.setDepCode(results.get(0).getDepCode()); hgsc004a.setDepCode(results.get(0).getDepCode());
hgsc004a.setDepName(results.get(0).getDepName()); hgsc004a.setDepName(results.get(0).getDepName());
if (hgsc004a.getLv()==3){ if (hgsc004a.getParentProdCode().trim().isEmpty()){
hgsc004a.setParentProdCode(results.get(0).getProjCode()); hgsc004a.setParentProdCode(results.get(0).getProjCode());
hgsc004a.setParentProdName(results.get(0).getProjName()); hgsc004a.setParentProdName(results.get(0).getProjName());
hgsc004a.setMaterialId(results.get(0).getId()); hgsc004a.setMaterialId(results.get(0).getId());
checkSaveData(hgsc004a); hgsc004a.setLv(3);
}else if (hgsc004a.getLv()==4){ }else{
if (hgsc004a.getParentProdCode().trim().length()==0){
AssertUtils.isTrue(true, "层级为4级,父节点-产品编号不能为空!");
}
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("companyCode", hgsc004a.getCompanyCode()); paramMap.put("companyCode", hgsc004a.getCompanyCode());
paramMap.put("projCode", hgsc004a.getProjCode()); paramMap.put("projCode", hgsc004a.getProjCode());
...@@ -348,11 +344,9 @@ public class HGSCTools { ...@@ -348,11 +344,9 @@ public class HGSCTools {
List<HGSC004A> hgsc004aList = list(paramMap); List<HGSC004A> hgsc004aList = list(paramMap);
AssertUtils.isEmpty(hgsc004aList, String.format("父节点-产品编号[%s]数据不存在,导入失败!",hgsc004a.getParentProdCode())); AssertUtils.isEmpty(hgsc004aList, String.format("父节点-产品编号[%s]数据不存在,导入失败!",hgsc004a.getParentProdCode()));
hgsc004a.setMaterialId(results.get(0).getId()); hgsc004a.setMaterialId(results.get(0).getId());
checkSaveData(hgsc004a); hgsc004a.setLv(4);
}else {
AssertUtils.isTrue(true, "层级不能为空!");
} }
checkSaveData(hgsc004a);
addEntity(hgsc004a); addEntity(hgsc004a);
} }
...@@ -378,16 +372,36 @@ public class HGSCTools { ...@@ -378,16 +372,36 @@ public class HGSCTools {
AssertUtils.isTrue(true, "数量不能为0!"); AssertUtils.isTrue(true, "数量不能为0!");
} }
hgsc004a.setTotalWeight(hgsc004a.getQuantity().multiply(hgsc004a.getSingleWeight())); hgsc004a.setTotalWeight(hgsc004a.getQuantity().multiply(hgsc004a.getSingleWeight()));
HGPZ005 hgpz005= HGPZTools.HgPz005.get(hgsc004a.getProductCode()); HGPZ005 pz005= HGPZTools.HgPz005.get(hgsc004a.getProductCode());
if (Objects.isNull(hgpz005)){ if (pz005 == null){
AssertUtils.isTrue(true, "产品编号不存在!"); List<HGPZ004> hgpz004s = DaoBase.getInstance().query(HGPZ004.QUERY, new HashMap<String, Object>(){{
put(HGPZ004.FIELD_STATUS, CommonConstant.YesNo.YES_1);
}});
Map parmap = hgpz004s.stream().collect(Collectors.toMap(HGPZ004::getInventTypeName, HGPZ004::getInventType,(v1, v2) -> v1));
String inventType = com.baosight.hggp.util.MapUtils.getString(parmap, com.baosight.hggp.util.StringUtils.trimToEmpty(hgsc004a.getInventType()));
AssertUtils.isEmpty(inventType, String.format("存货类型[%s]代码不存在,添加失败!", hgsc004a.getInventType()));
pz005 = new HGPZ005();
pz005.setInventType(inventType);
pz005.setInventCode(hgsc004a.getProductCode());
pz005.setInventName(hgsc004a.getProductName());
pz005.setSpec(hgsc004a.getSpec());
pz005.setInventTypeDetail(Integer.valueOf(hgsc004a.getProductType()));
pz005.setLength(hgsc004a.getLength());
pz005.setWidth(hgsc004a.getWidth());
pz005.setThick(hgsc004a.getThick());
pz005.setMaterial(hgsc004a.getMaterial());
pz005.setCoefficient(hgsc004a.getCoefficient());
pz005.setUnit(hgsc004a.getUnit());
pz005.setStatus(1); //默认启用
DaoUtils.insert(HGPZ005.INSERT,pz005);
} }
hgsc004a.setProductId(hgpz005.getId()); hgsc004a.setProductId(pz005.getId());
hgsc004a.setInventType(hgpz005.getInventType()+""); hgsc004a.setInventType(pz005.getInventType()+"");
hgsc004a.setProductType(hgpz005.getInventTypeDetail()+""); hgsc004a.setProductType(pz005.getInventTypeDetail()+"");
hgsc004a.setLength(hgpz005.getLength()); hgsc004a.setLength(pz005.getLength());
hgsc004a.setWidth(hgpz005.getWidth()); hgsc004a.setWidth(pz005.getWidth());
hgsc004a.setThick(hgpz005.getThick()); hgsc004a.setThick(pz005.getThick());
DaoUtils.insert(HGSC004A.INSERT, hgsc004a); DaoUtils.insert(HGSC004A.INSERT, hgsc004a);
//主表全部提交时需要有改变状态 //主表全部提交时需要有改变状态
/*if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){ /*if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
......
...@@ -35,16 +35,16 @@ $(function () { ...@@ -35,16 +35,16 @@ $(function () {
return dataItem["purUserName"]; return dataItem["purUserName"];
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); // let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]); // inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("field", options.field); // inInfo.set("field", options.field);
EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, { // EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, {
onSuccess: function (ei) { // onSuccess: function (ei) {
userByCompany = ei.getBlock("userByCompany").getMappedRows(); // userByCompany = ei.getBlock("userByCompany").getMappedRows();
}, // },
onFail: function (ei) { // onFail: function (ei) {
} // }
}, {async: false}); // }, {async: false});
var input = $('<input />'); var input = $('<input />');
input.attr("name", options.field); input.attr("name", options.field);
input.attr("id", options.field); input.attr("id", options.field);
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
filter="contains" required="true"> filter="contains" required="true">
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/> <EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="100" align="center" required="true"/> <EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N0}" enable="false"/> <EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N0}" enable="false"/>
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"/> <EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N0}"/>
......
...@@ -23,16 +23,16 @@ $(function () { ...@@ -23,16 +23,16 @@ $(function () {
return dataItem["purUserName"]; return dataItem["purUserName"];
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); // let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]); // inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("field", options.field); // inInfo.set("field", options.field);
EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, { // EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, {
onSuccess: function (ei) { // onSuccess: function (ei) {
userByCompany = ei.getBlock("userByCompany").getMappedRows(); // userByCompany = ei.getBlock("userByCompany").getMappedRows();
}, // },
onFail: function (ei) { // onFail: function (ei) {
} // }
}, {async: false}); // }, {async: false});
var input = $('<input />'); var input = $('<input />');
input.attr("name", options.field); input.attr("name", options.field);
input.attr("id", options.field); input.attr("id", options.field);
......
...@@ -51,16 +51,16 @@ $(function () { ...@@ -51,16 +51,16 @@ $(function () {
return dataItem["purUserName"]; return dataItem["purUserName"];
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); // let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]); // inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("field", options.field); // inInfo.set("field", options.field);
EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, { // EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, {
onSuccess: function (ei) { // onSuccess: function (ei) {
userByCompany = ei.getBlock("userByCompany").getMappedRows(); // userByCompany = ei.getBlock("userByCompany").getMappedRows();
}, // },
onFail: function (ei) { // onFail: function (ei) {
} // }
}, {async: false}); // }, {async: false});
var input = $('<input />'); var input = $('<input />');
input.attr("name", options.field); input.attr("name", options.field);
input.attr("id", options.field); input.attr("id", options.field);
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
filter="contains" required="true"> filter="contains" required="true">
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/> <EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="100" align="center" required="true"/> <EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
......
...@@ -436,10 +436,10 @@ $(function() { ...@@ -436,10 +436,10 @@ $(function() {
eiInfo.set("fileName", src); eiInfo.set("fileName", src);
EiCommunicator.send("HGCW002A", "importDate", eiInfo, { EiCommunicator.send("HGCW002A", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /* if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
...@@ -368,10 +368,10 @@ $(function() { ...@@ -368,10 +368,10 @@ $(function() {
eiInfo.set("fileName", src); eiInfo.set("fileName", src);
EiCommunicator.send("HGCW002A", "importDate", eiInfo, { EiCommunicator.send("HGCW002A", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /*if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/> <EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
<EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false"/> <EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="contractNumber" cname="合同号" align="center" enable="false"/> <EF:EFColumn ename="contractNumber" cname="合同号" align="center" enable="false"/>
<EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/> <EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/> <EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
......
...@@ -26,6 +26,8 @@ $(function() { ...@@ -26,6 +26,8 @@ $(function() {
loadComplete: function (grid) { loadComplete: function (grid) {
//此grid对象 //此grid对象
$("#SELECT_BILL").on("click",addFunc); $("#SELECT_BILL").on("click",addFunc);
$("#SELECT_CONT").on("click",add1Func);
$("#SELECT_LEASE").on("click",add2Func);
$("#SUBMIT").on("click",submitFunc); $("#SUBMIT").on("click",submitFunc);
$("#BTN_BILL").on("click",billFunc); $("#BTN_BILL").on("click",billFunc);
$("#BII_SAVE").on("click",saveFunc); $("#BII_SAVE").on("click",saveFunc);
...@@ -94,6 +96,24 @@ function addFunc() { ...@@ -94,6 +96,24 @@ function addFunc() {
callbackName: windowCallback callbackName: windowCallback
}); });
} }
function add1Func() {
JSColorbox.open({
href: "HGCW010D?methodName=initLoad&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>合同管理</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
function add2Func() {
JSColorbox.open({
href: "HGCW010E?methodName=initLoad&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>租赁合同</div>",
width: "90%",
height: "90%",
callbackName: windowCallback
});
}
/** /**
* 保存 * 保存
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center" <EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/> editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" format="{0:N3}" align="center"/> <EF:EFColumn ename="billNumber" cname="发票号" width="120" format="{0:N3}" align="center"/>
<EF:EFComboColumn ename="taxPoints" cname="税" width="120" align="center" required="true" <EF:EFComboColumn ename="taxPoints" cname="税" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="160" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center" <EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/> editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/> <EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" format="{0:N3}" editType="text" <EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false" displayType="0.000" sort="true" align="right" maxLength="15" required="false"
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
saveFunc();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
if((reviewStatus === "1")){
message("数据已审核");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
info.set("inqu_status-0-mainId",$("#inqu_status-0-mainId").val())
EiCommunicator.send("HGCW010D", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/5
Time: 15:27
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="合同选择">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="true" checkMode="row" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="partyA" cname="客户名称" width="160" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="false" readonly="true" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="valueAddedTax" cname="税额" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceExcluding" cname="合同总价(不含税)" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="合同总价(含税)" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
$("#cancel").on("click", function () {
cancelFunc();
});
$("#btn_save").on("click", function () {
saveFunc();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
}
}
window.document.addEventListener("keyup",function (event) {
if(event.keyCode === 13){
var grid = $("#ef_grid_result").data("kendoGrid");
// 回填
//grid.addRows(returnRows);
grid.closeCell();
}
})
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function cancelFunc() {
// 关闭弹窗
parent.JSColorbox.setValueCallback();
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let reviewStatus= item.get("reviewStatus");
if((reviewStatus === "1")){
message("数据已审核");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
info.set("inqu_status-0-mainId",$("#inqu_status-0-mainId").val())
EiCommunicator.send("HGCW010E", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/5
Time: 15:28
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="租赁合同选择">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDateSpan startCname="签订日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="项目编号" ename="projCode" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="合同号" ename="settlementNumber" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="true" checkMode="row" queryMethod="query">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="partyA" cname="客户名称" width="160" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="130" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNumber" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractName" cname="合同名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="false" readonly="true" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="valueAddedTax" cname="税额" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceExcluding" cname="合同总价(不含税)" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="合同总价(含税)" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
...@@ -136,6 +136,10 @@ let save = function () { ...@@ -136,6 +136,10 @@ let save = function () {
message("勾选的第" + (i + 1) + "行仓库不能为空"); message("勾选的第" + (i + 1) + "行仓库不能为空");
return; return;
} }
if (rows[i]["submitStatus"] == 1){
message("第" + (i + 1) + "行数据已提交,不能保存");
return;
}
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () { ok: function () {
......
...@@ -126,10 +126,10 @@ $(function() { ...@@ -126,10 +126,10 @@ $(function() {
eiInfo.set("fileName", src); eiInfo.set("fileName", src);
EiCommunicator.send("HGPZ005", "importDate", eiInfo, { EiCommunicator.send("HGPZ005", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /*if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
...@@ -254,6 +254,7 @@ $(function () { ...@@ -254,6 +254,7 @@ $(function () {
resultGrid.setCellValue(e.items[0],"width",productCodeBox[i]['param4Field']); resultGrid.setCellValue(e.items[0],"width",productCodeBox[i]['param4Field']);
resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']); resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']); resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']);
resultGrid.setCellValue(e.items[0],"spec",productCodeBox[i]['param7Field']);
} }
} }
} }
...@@ -486,10 +487,10 @@ $(function () { ...@@ -486,10 +487,10 @@ $(function () {
eiInfo.set("materialId", $("#inqu_status-0-materialId").val()) eiInfo.set("materialId", $("#inqu_status-0-materialId").val())
EiCommunicator.send("HGSC004A", "importDate", eiInfo, { EiCommunicator.send("HGSC004A", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /*if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" /> <EF:EFColumn ename="productCode" required="true" cname="产品编号" />
<EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="spec" cname="规格" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
......
...@@ -189,10 +189,10 @@ $(function () { ...@@ -189,10 +189,10 @@ $(function () {
eiInfo.set("fileName", src); eiInfo.set("fileName", src);
EiCommunicator.send("HGSC009", "importDate", eiInfo, { EiCommunicator.send("HGSC009", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /*if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
...@@ -216,10 +216,10 @@ $(function (){ ...@@ -216,10 +216,10 @@ $(function (){
eiInfo.set("fileName", src); eiInfo.set("fileName", src);
EiCommunicator.send("HGSJ003", "importDate", eiInfo, { EiCommunicator.send("HGSJ003", "importDate", eiInfo, {
onSuccess(ei) { onSuccess(ei) {
if (notIsExcelFile) { /*if (notIsExcelFile) {
NotificationUtil("请导入xls或xlsx文件", "error"); NotificationUtil("请导入xls或xlsx文件", "error");
return; return;
} }*/
if (ei.status == "-1") { if (ei.status == "-1") {
NotificationUtil( NotificationUtil(
{msg: ei.msg, detailMsg: ei.detailMsg}, "error"); {msg: ei.msg, detailMsg: ei.detailMsg}, "error");
......
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 to comment