Commit 7c8d71cb by liuyang

2024-10-23 合同添加分支单位,采购收票,付款单添加合同号

parent 8d13ba90
......@@ -367,7 +367,7 @@ public enum DdynamicEnum {
*
*/
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","genralContractCode", "genralContractName",
"subcontractCode", "subcontractName", "startDate","endDate","partyPmName","partyPmHpone","HGSC001.queryProjectCodeBox"),
"subcontractCode", "subcontractName", "startDate","endDate","partyPmName","partyPmHpone", "branchUnit","HGSC001.queryProjectCodeBox"),
/**
* 模块: 销售发货
......
......@@ -519,4 +519,18 @@ public class HGConstant {
//超报工
public static final Integer S3 = 3;
}
/**
* 开票状态
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class BillStatus {
// 未开票
public static final Integer S1 = 1;
// 已开票
public static final Integer S2 = 2;
}
}
......@@ -64,6 +64,7 @@ public class HGCW002 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -156,6 +157,7 @@ public class HGCW002 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
private String contractTypeStr = ""; /* 合同类型;1销售合同2劳务合同3补充协议4合同外用工*/
private String branchUnit = " ";
/**
* initialize the metadata.
......@@ -343,6 +345,10 @@ public class HGCW002 extends DaoEPBase {
eiColumn = new EiColumn("contractTypeStr");
eiColumn.setDescName("合同类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -1009,6 +1015,14 @@ public class HGCW002 extends DaoEPBase {
this.contractTypeStr = contractTypeStr;
}
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/**
* get the value from Map.
*
......@@ -1059,6 +1073,7 @@ public class HGCW002 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setContractTypeStr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("contractTypeStr")), contractTypeStr));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
}
/**
......@@ -1110,6 +1125,7 @@ public class HGCW002 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put("contractTypeStr", StringUtils.toString(contractTypeStr, eiMetadata.getMeta("contractTypeStr")));
map.put("branchUnit", StringUtils.toString(branchUnit, eiMetadata.getMeta("branchUnit")));
return map;
}
......
......@@ -51,6 +51,7 @@ public class HGCW010 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_COMPANY_CODES = "companyCodes";
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -112,6 +113,7 @@ public class HGCW010 extends DaoEPBase {
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 累计结算价税合计金额*/
private String branchUnit = " ";
/**
* initialize the metadata.
......@@ -235,6 +237,9 @@ public class HGCW010 extends DaoEPBase {
eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -636,6 +641,15 @@ public class HGCW010 extends DaoEPBase {
public void setRemainingAmount(BigDecimal remainingAmount) {
this.remainingAmount = remainingAmount;
}
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/**
* get the value from Map.
*
......@@ -669,6 +683,7 @@ public class HGCW010 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
}
/**
......@@ -703,6 +718,7 @@ public class HGCW010 extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_BRANCH_UNIT, StringUtils.toString(branchUnit, eiMetadata.getMeta(FIELD_BRANCH_UNIT)));
return map;
}
......
......@@ -46,6 +46,7 @@ public class HGCW011 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_BRANCH_UNIT = "branchUnit";
public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
......@@ -96,6 +97,7 @@ public class HGCW011 extends DaoEPBase {
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private String depCode = " "; /* 部门编码*/
private String branchUnit = " ";
/**
* initialize the metadata.
......@@ -191,7 +193,9 @@ public class HGCW011 extends DaoEPBase {
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BRANCH_UNIT);
eiColumn.setDescName("分支单位");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -537,6 +541,15 @@ public class HGCW011 extends DaoEPBase {
public void setDepCode(String depCode) {
this.depCode = depCode;
}
public String getBranchUnit() {
return branchUnit;
}
public void setBranchUnit(String branchUnit) {
this.branchUnit = branchUnit;
}
/**
* get the value from Map.
*
......@@ -566,6 +579,7 @@ public class HGCW011 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setBranchUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("branchUnit")), branchUnit));
}
/**
......@@ -596,6 +610,7 @@ public class HGCW011 extends DaoEPBase {
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_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_BRANCH_UNIT, StringUtils.toString(branchUnit, eiMetadata.getMeta(FIELD_BRANCH_UNIT)));
return map;
}
......
......@@ -58,6 +58,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_DEPOSIT_QTY = "depositQty"; /* 入库数量*/
public static final String FIELD_RECEIVE_WEIGHT = "receiveWeight"; /* 收货重量*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -130,6 +131,7 @@ public class HGCW012 extends DaoEPBase {
private String spec = " "; /* 规格*/
private BigDecimal depositQty = new BigDecimal("0"); /* 入库数量*/
private BigDecimal receiveWeight = new BigDecimal("0"); /* 收货重量*/
private String contractNo = " "; /* 合同号*/
/**
* initialize the metadata.
......@@ -282,6 +284,9 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setDescName("收货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
}
......@@ -804,6 +809,14 @@ public class HGCW012 extends DaoEPBase {
public void setReceiveWeight(BigDecimal receiveWeight) {
this.receiveWeight = receiveWeight;
}
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/**
* get the value from Map.
*
......@@ -845,6 +858,7 @@ public class HGCW012 extends DaoEPBase {
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setDepositQty(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_DEPOSIT_QTY)), depositQty));
setReceiveWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RECEIVE_WEIGHT)), receiveWeight));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
}
/**
......@@ -887,6 +901,7 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_DEPOSIT_QTY, StringUtils.toString(depositQty, eiMetadata.getMeta(FIELD_DEPOSIT_QTY)));
map.put(FIELD_RECEIVE_WEIGHT, StringUtils.toString(receiveWeight, eiMetadata.getMeta(FIELD_RECEIVE_WEIGHT)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map;
}
......
......@@ -49,6 +49,7 @@ public class HGCW013 extends DaoEPBase {
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
......@@ -101,6 +102,7 @@ public class HGCW013 extends DaoEPBase {
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private String contractNo = " "; /* 合同号*/
/**
* initialize the metadata.
......@@ -207,6 +209,10 @@ public class HGCW013 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -562,6 +568,14 @@ public class HGCW013 extends DaoEPBase {
this.spec = spec;
}
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/**
* get the value from Map.
*
......@@ -594,6 +608,7 @@ public class HGCW013 extends DaoEPBase {
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
}
/**
......@@ -627,6 +642,7 @@ public class HGCW013 extends DaoEPBase {
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map;
}
......
......@@ -40,6 +40,7 @@ public class HGCW017 extends DaoEPBase {
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编号*/
public static final String FIELD_CONTRACT_NO = "contractNo"; /* 合同号*/
public static final String COL_ID = "ID";
public static final String COL_MAIN_ID = "MAIN_ID"; /* 主表ID*/
......@@ -83,6 +84,7 @@ public class HGCW017 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/
private String projName = " "; /* 项目名称*/
private String projCode = " "; /* 项目编号*/
private String contractNo = " "; /* 合同号*/
/**
* initialize the metadata.
......@@ -161,6 +163,10 @@ public class HGCW017 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_NO);
eiColumn.setDescName("合同号");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -427,6 +433,15 @@ public class HGCW017 extends DaoEPBase {
this.projCode = projCode;
}
public String getContractNo() {
return contractNo;
}
public void setContractNo(String contractNo) {
this.contractNo = contractNo;
}
/**
* get the value from Map.
*
......@@ -452,6 +467,7 @@ public class HGCW017 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setContractNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NO)), contractNo));
}
/**
......@@ -478,6 +494,7 @@ public class HGCW017 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_CONTRACT_NO, StringUtils.toString(contractNo, eiMetadata.getMeta(FIELD_CONTRACT_NO)));
return map;
}
......
......@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
......@@ -10,6 +11,7 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
......@@ -55,6 +57,17 @@ public class ServiceHGCW002 extends ServiceBase {
Map<String, Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID, DdynamicEnum.CONTRACT_BLOCK_ID));
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(outInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID, roleCompanyCode);
......@@ -116,16 +129,19 @@ public class ServiceHGCW002 extends ServiceBase {
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
if (HGCW002.getId() == null || HGCW002.getId() == 0) {
String contractNumber = HGCW002.getCompanyCode() +
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setContractNumber(contractNumber);
if (HGCW002.getContractNumber().trim().isEmpty()){
String contractNumber = HGCW002.getCompanyCode() +
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setContractNumber(contractNumber);
}
HGCW002.setReviewStatus(0);
HGCW002.setBalanceStatus(1);
this.add(HGCW002);
// 写入其他数据
HGCWTools.HgCw003.save(detail1Rows, contractNumber, HGCW002);
HGCWTools.HgCw003.save(detail1Rows, HGCW002.getContractNumber(), HGCW002);
HGCWTools.HgCw999.batchUpdate(detail2Rows, HGCW002.getId());
} else {
......
......@@ -2,15 +2,19 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
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.HGCW003;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.domain.HGSC004A;
import com.baosight.hggp.hg.sj.domain.HGSJ003;
import com.baosight.hggp.hg.xs.domain.Company;
......@@ -47,6 +51,17 @@ public class ServiceHGCW002A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJECT_CODE_BOX_BLOCK_ID), null, false);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
inInfo.addBlock("detail1").addBlockMeta(new HGCW002().eiMetadata);
inInfo.addBlock("detail2").addBlockMeta(new HGCW002().eiMetadata);
} catch (PlatException e) {
......
......@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
......@@ -22,6 +25,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -42,6 +46,16 @@ public class ServiceHGCW002B extends ServiceBase {
String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
}
//获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List);
......
......@@ -2,19 +2,24 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -35,6 +40,16 @@ public class ServiceHGCW002C extends ServiceBase {
String id = inInfo.getString("id");
HGCW002 HGCW002 = HGCWTools.HgCw002.getId(id);
inInfo.addBlock(EiConstant.resultBlock).addRow(HGCW002);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
}
//获取清单
List<HGCW003> hgcw003List = HGCWTools.HgCw003.queryByContractNumber(HGCW002.getContractNumber());
inInfo.addBlock("detail1").addRows(hgcw003List);
......
......@@ -3,6 +3,9 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -10,12 +13,14 @@ import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -26,10 +31,8 @@ import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -50,11 +53,34 @@ public class ServiceHGCW010 extends ServiceBase {
/*CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);*/
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
}}
);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata);
} catch (Exception e) {
......@@ -91,26 +117,30 @@ public class ServiceHGCW010 extends ServiceBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
for (Map resultRow : resultRows) {
HGCW010 hgcw010 = new HGCW010();
hgcw010.fromMap(resultRows.get(i));
if (StringUtils.isEmpty(hgcw010.getCompanyCode())){
hgcw010.fromMap(resultRow);
if (StringUtils.isEmpty(hgcw010.getCompanyCode())) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername());
}
if (StringUtils.isEmpty(hgcw010.getProjName())){
if (StringUtils.isEmpty(hgcw010.getProjName())) {
// 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(hgcw010.getProjCode());
AssertUtils.isNull(HGSC001, "项目编码[" + hgcw010.getProjCode() + "]不存在");
hgcw010.setProjName(HGSC001.getProjName());
}
hgcw010.setBillState(1);
hgcw010.setReviewStatus(0);
hgcw010.setSigningDate(DateUtils.formatShort(hgcw010.getSigningDate()));
if (hgcw010.getId() == null || hgcw010.getId() == 0) {
hgcw010.setBillState(HGConstant.BillStatus.S1);
hgcw010.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
this.add(hgcw010);
} else {
List<HGCW011> hgcw011List = HGCWTools.HgCw011.getMainId(hgcw010.getId());
if (hgcw011List.size() > 0 && StringUtils.isNotEmpty(hgcw010.getBillNumber())){
hgcw010.setBillState(HGConstant.BillStatus.S2);
}
this.modify(hgcw010);
}
}
......
......@@ -2,20 +2,24 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW011;
import com.baosight.hggp.hg.cw.domain.HGCW015;
import com.baosight.hggp.hg.pz.domain.HGPZ001;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.Arrays;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -35,6 +39,21 @@ public class ServiceHGCW010B extends ServiceBase {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,
DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW015().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -2,18 +2,26 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
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.pz.domain.HGPZ001;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
......@@ -23,10 +31,8 @@ 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;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author LiuYang
......@@ -47,6 +53,29 @@ public class ServiceHGCW010D extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
Map map1 = new HashMap<>();
map1.put("status", CommonConstant.YesNo.YES_1);
List<HGPZ001> list = DaoBase.getInstance().query(HGPZ001.QUERY,map1);
List<HGPZ001> list1 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list1.size() > 0){
list1 = list1.stream().filter(hgpz001 -> "分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list1.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
List<Map> info = inInfo.getBlock("customer_record_block_id").getRows();
EiBlock block = new EiBlock("customer1_record_block_id");
block.setRows(info);
inInfo.setBlock(block);
CommonMethod.comboBoxDefaultValue(inInfo,"customer1_record_block_id");
}
List<HGPZ001> list2 = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
if (list2.size() > 0){
list2 = list2.stream().filter(hgpz001 -> !"分支单位".equals(hgpz001.getCustTypeName())).collect(Collectors.toList());
List<String> custTypeList = list2.stream().map(HGPZ001::getCustType).collect(Collectors.toList());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID),
new HashMap<String, Object>(){{put("custTypes", custTypeList);}},false);
CommonMethod.comboBoxDefaultValue(inInfo,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID.getBlockId());
}
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -93,8 +122,8 @@ public class ServiceHGCW010D extends ServiceEPBase {
hgcw010.setCompanyCode(userVO.getUsercode());
hgcw010.setCompanyName(userVO.getUsername());
hgcw010.setBillTybe(1);
hgcw010.setReviewStatus(0);
hgcw010.setBillState(1);
hgcw010.setReviewStatus(ReviewStatusEnum.UNREVIEWED.getCode());
hgcw010.setBillState(HGConstant.BillStatus.S1);
hgcw010.setSigningDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer settlementNumber = new StringBuffer();
......@@ -117,6 +146,7 @@ public class ServiceHGCW010D extends ServiceEPBase {
hgcw010.setThisSettlementAmount(hgcw011List.get(0).getThisSettlementAmount());
hgcw010.setSettlementNumber(settlementNumber.toString().substring(0, settlementNumber.length() - 1));
hgcw010.setRemainingAmount(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
hgcw010.setBranchUnit(hgcw011List.get(0).getBranchUnit());
this.add(hgcw010);
//生成明细表
......
......@@ -14,10 +14,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG003B;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW008;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW013;
import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.xs.domain.Company;
......@@ -391,6 +388,8 @@ public class ServiceHGCW012 extends ServiceBase {
//StringBuffer settlementNumber = new StringBuffer();
Map<String, BigDecimal> rowMap = new HashMap<>();
HGCWTools.HgCw013.countTaxAmount(resultRows, hgcw012, rowMap);
String contractNo =hgcw013List.stream().map(HGCW013::getContractNo).distinct().collect(Collectors.joining());
hgcw012.setContractNo(contractNo);
/*for (HGCW013 hgcw013 : hgcw013List) {
settlementNumber.append(hgcw013.getSettlementNumber()).append(",");
}
......@@ -591,13 +590,15 @@ public class ServiceHGCW012 extends ServiceBase {
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
//List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<HGCW012> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW012.class);
List<Long> ids = resultRows.stream().map(HGCW012::getId).collect(Collectors.toList());
List<HGCW013> hgcw013s = HGCWTools.HgCw013.getMainId(ids);
for (HGCW012 resultRow : resultRows) {
HGCW012 hgcw012 = new HGCW012();
hgcw012.fromMap(resultRow);
if (hgcw012.getBillState() == 0) {
throw new PlatException("数据未开票,请先开票!");
}
hgcw012.fromMap(resultRow.toMap());
long count = hgcw013s.stream().filter(hgcw013 -> hgcw013.getMainId().equals(resultRow.getId())).count();
AssertUtils.isTrue(count <= 0, "请添加明细数据!");
hgcw012.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode());
DaoUtils.update("HGCW012.submit", hgcw012);
}
......
......@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.eplat.utils.StringUtils;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.ReviewStatusEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -273,7 +274,7 @@ public class ServiceHGCW014 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGCW014 HGCW014 = new HGCW014();
HGCW014.fromMap(resultRows.get(i));
HGCW014.setReviewStatus(1);
HGCW014.setReviewStatus(ReviewStatusEnum.REVIEWED.getCode());
DaoUtils.update("HGCW014.submit", HGCW014);
}
inInfo = this.query(inInfo);
......@@ -291,6 +292,9 @@ public class ServiceHGCW014 extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGCW014 HGCW014 = new HGCW014();
HGCW014.fromMap(resultRows.get(i));
if (!HGCW014.getReviewStatus().equals(ReviewStatusEnum.UNREVIEWED.getCode())){
throw new RuntimeException("当前状态为未审核提交,请先审核提交!");
}
HGCW014.setCancelStatus(2);
DaoUtils.update("HGCW014.writeoff", HGCW014);
}
......
......@@ -13,10 +13,7 @@ import com.baosight.hggp.hg.cw.domain.HGCW017;
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.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -31,6 +28,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author yukang
......@@ -265,12 +263,16 @@ public class ServiceHGCW016 extends ServiceBase {
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW016 HGCW016 = new HGCW016();
HGCW016.fromMap(resultRows.get(i));
HGCW016.setReviewStatus(1);
DaoUtils.update("HGCW016.submit", HGCW016);
List<HGCW016> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW016.class);
List<Long> ids = resultRows.stream().map(HGCW016::getId).collect(Collectors.toList());
List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(ids);
for (HGCW016 resultRow : resultRows) {
HGCW016 hgcw016 = new HGCW016();
hgcw016.fromMap(resultRow.toMap());
long count = hgcw017s.stream().filter(hgcw017 -> hgcw017.getMainId().equals(resultRow.getId())).count();
AssertUtils.isTrue(count <= 0, "请添加明细数据!");
hgcw016.setReviewStatus(1);
DaoUtils.update("HGCW016.submit", hgcw016);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据审核成功!");
......@@ -282,14 +284,18 @@ public class ServiceHGCW016 extends ServiceBase {
public EiInfo writeoff(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
List<HGCW016> resultRows = MapUtils.toDaoEPBases(inInfo, HGCW016.class);
List<Long> ids = resultRows.stream().map(HGCW016::getId).collect(Collectors.toList());
List<HGCW017> hgcw017s = HGCWTools.HgCw017.getMainId(ids);
for (HGCW016 resultRow : resultRows) {
HGCW016 hgcw016 = new HGCW016();
hgcw016.fromMap(resultRows.get(i));
hgcw016.setCancelStatus(2);
if (hgcw016.getReviewStatus() == 0){
hgcw016.fromMap(resultRow.toMap());
long count = hgcw017s.stream().filter(hgcw017 -> hgcw017.getMainId().equals(resultRow.getId())).count();
AssertUtils.isTrue(count <= 0, "请添加明细数据!");
if (hgcw016.getReviewStatus() == 0) {
throw new PlatException("请先审核!");
}
hgcw016.setCancelStatus(2);
DaoUtils.update("HGCW016.writeoff", hgcw016);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
/**
* @author LiuYang
* @version 1.0 2024/10/23
* @description
*/
public class ServiceHGCW999A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
......@@ -45,7 +45,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount"
REMAINING_AMOUNT as "remainingAmount",
BRANCH_UNIT as "branchUnit"
</sql>
<sql id="condition">
......@@ -176,6 +177,9 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql>
<sql id="customCondition">
......@@ -190,7 +194,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID DESC
</isEmpty>
</dynamic>
</sql>
......@@ -253,9 +257,16 @@
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT
REMAINING_AMOUNT,
BRANCH_UNIT
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#, #contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#, #planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#, #engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#, #paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#, #totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #contractNumber#,
#contractName#, #contractType#, #contractCategory#, #partyA#, #partyB#, #partyC#, #planStartDate#,
#planEndDate#, #contractStatus#, #partyAName#, #partyAPhoneNumber#, #alreadyName#, #alreadyPhoneNumber#,
#engineeringAddress#, #signingDate#, #mainContractNumber#, #contractContent#, #contractingMethod#,
#paymentMethod#, #pricingMethod#, #taxPoints#, #totalContractPriceExcluding#, #valueAddedTax#,
#totalContractPriceIncluding#, #reviewStatus#, #balanceStatus#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #branchUnit#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW002
</selectKey>
......@@ -307,7 +318,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
REMAINING_AMOUNT = #remainingAmount#
REMAINING_AMOUNT = #remainingAmount#,
BRANCH_UNIT = #branchUnit#
<!-- DEP_CODE = #depCode# 部门编码 -->
WHERE
ID = #id#
......
......@@ -116,6 +116,9 @@
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -145,7 +148,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW010 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -241,32 +245,36 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW010 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_TYBE, <!-- 票据类型 -->
BILL_NUMBER, <!-- 发票号 -->
BILL_STATE, <!-- 开票状态 -->
SIGNING_DATE, <!-- 开票日期 -->
PARTY_A, <!-- 客户名称 -->
REVIEW_STATUS, <!-- 审批状态 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_TYBE, <!-- 票据类型 -->
BILL_NUMBER, <!-- 发票号 -->
BILL_STATE, <!-- 开票状态 -->
SIGNING_DATE, <!-- 开票日期 -->
PARTY_A, <!-- 客户名称 -->
REVIEW_STATUS, <!-- 审批状态 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
REMAINING_AMOUNT,
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,#remainingAmount#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
BRANCH_UNIT
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#,
#billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #thisSettlementTax#,
#thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,#remainingAmount#, #createdBy#,
#createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #branchUnit#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW010
</selectKey>
......@@ -302,7 +310,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
BRANCH_UNIT = #branchUnit#
WHERE
ID = #id#
</update>
......
......@@ -130,6 +130,9 @@
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -175,7 +178,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount"
REMAINING_AMOUNT as "remainingAmount",
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW002 WHERE 1=1 AND CONTRACT_TYPE in (1,5) AND REMAINING_AMOUNT > 0 AND REVIEW_STATUS = '3'
<include refid="condition" />
<dynamic prepend="ORDER BY">
......
......@@ -98,6 +98,9 @@
<isNotEmpty prepend=" AND " property="settlementNumbers">
SETTLEMENT_NUMBER IN <iterate close=")" open="(" conjunction="," property="settlementNumbers">#settlementNumbers[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="branchUnit">
BRANCH_UNIT = #branchUnit#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -123,7 +126,8 @@
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
BRANCH_UNIT as "branchUnit"
FROM ${hggpSchema}.HGCW011 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -210,28 +214,31 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW011 (ID,
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_NUMBER, <!-- 发票号 -->
PARTY_A, <!-- 客户名称 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE <!-- 部门编码 -->
)
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#, #billNumber#, #partyA#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#)
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_NAME, <!-- 项目名称 -->
PROJ_CODE, <!-- 项目编号 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_NUMBER, <!-- 发票号 -->
PARTY_A, <!-- 客户名称 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TAX_POINTS, <!-- 税率 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
BRANCH_UNIT
)
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projName#, #projCode#, #settlementNumber#,
#billNumber#, #partyA#, #thisSettlementTax#, #thisSettlementAmount#, #taxPoints#, #totalContractPriceIncluding#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #branchUnit#)
</insert>
<delete id="delete">
......@@ -261,7 +268,8 @@
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
BRANCH_UNIT = #branchUnit#
WHERE
ID = #id#
</update>
......
......@@ -71,7 +71,8 @@
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_WEIGHT as "receiveWeight" <!-- 收货重量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
CONTRACT_NO as "contractNo"
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
......@@ -176,6 +177,9 @@
<isNotEmpty prepend=" AND " property="notRemainingAmount">
REMAINING_AMOUNT != #notRemainingAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -329,13 +333,14 @@
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
DEPOSIT_QTY, <!-- 入库数量 -->
RECEIVE_WEIGHT <!-- 收货重量 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
CONTRACT_NO
)
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#,
#billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#,
#thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#,
#contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#)
#contractType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #depositQty#, #receiveWeight#,#contractNo#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey>
......@@ -380,7 +385,8 @@
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
DEPOSIT_QTY = #depositQty#, <!-- 入库数量 -->
RECEIVE_WEIGHT = #receiveWeight# <!-- 收货重量 -->
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
CONTRACT_NO = #contractNo#
WHERE
ID = #id#
</update>
......
......@@ -50,7 +50,8 @@
DEP_CODE as "depCode", <!-- 部门编码 -->
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName",
SPEC as "spec"
SPEC as "spec",
CONTRACT_NO as "contractNo"
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
......@@ -129,6 +130,12 @@
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainIds">
MAIN_ID IN <iterate close=")" open="(" conjunction="," property="mainIds">#mainIds[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -215,31 +222,35 @@
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW013 (ID,
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
MAIN_ID, <!-- 主表ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编号 -->
PROJ_NAME, <!-- 项目名称 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_NUMBER, <!-- 发票号 -->
PARTY_A, <!-- 供应商名称 -->
TAX_POINTS, <!-- 税率 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
SETTLEMENT_NUMBER, <!-- 来源单号 -->
BILL_NUMBER, <!-- 发票号 -->
PARTY_A, <!-- 供应商名称 -->
TAX_POINTS, <!-- 税率 -->
THIS_SETTLEMENT_TAX, <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT, <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING, <!-- 开票总额 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC <!-- 规格 -->
)
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#, #billNumber#, #partyA#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #inventCode#, #inventName#, #spec#)
SPEC, <!-- 规格 -->
CONTRACT_NO
)
VALUES (#id#, #mainId#, #accountCode#, #companyCode#, #companyName#, #projCode#, #projName#, #settlementNumber#,
#billNumber#, #partyA#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #inventCode#,
#inventName#, #spec#,#contractNo#)
</insert>
<delete id="delete">
......@@ -275,7 +286,8 @@
DEP_CODE = #depCode#, <!-- 部门编码 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec# <!-- 规格 -->
SPEC = #spec#, <!-- 规格 -->
CONTRACT_NO = #contractNo#
WHERE
ID = #id#
</update>
......
......@@ -77,6 +77,12 @@
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mainIds">
MAIN_ID IN <iterate close=")" open="(" conjunction="," property="mainIds">#mainIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO like concat('%' , #contractNo# , '%')
</isNotEmpty>
</sql>
<sql id="condition">
......@@ -103,7 +109,8 @@
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName"
PROJ_NAME as "projName",
CONTRACT_NO as "contractNo"
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -136,7 +143,8 @@
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName" <!-- 项目名称 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
CONTRACT_NO as "contractNo"
FROM ${hggpSchema}.HGCW017 WHERE 1=1
<include refid="condition_no_auth" />
<dynamic prepend="ORDER BY">
......@@ -220,11 +228,12 @@
UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME <!-- 项目名称 -->
PROJ_NAME, <!-- 项目名称 -->
CONTRACT_NO
)
VALUES (#mainId#, #accountCode#, #companyCode#, #companyName#, #contractNumber#, #partyA#,
#totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #depCode#, #projCode#, #projName#)
#updatedTime#, #depCode#, #projCode#, #projName#, #contractNo#)
</insert>
<delete id="delete">
......@@ -250,7 +259,8 @@
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
PROJ_CODE = #projCode#,
PROJ_NAME = #projName#
PROJ_NAME = #projName#,
CONTRACT_NO = #contractNo#
WHERE
ID = #id#
</update>
......
......@@ -985,7 +985,7 @@ public class HGCWTools {
HGCW012 HGCW012 = results.get(0);
BigDecimal remainingAmount = new BigDecimal(decimalFormat.format(HGCW012.getRemainingAmount().subtract(cutAmount)));
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("款金额不能大于采购收票剩余金额!");
throw new PlatException("本次付款金额不能大于采购收票剩余金额!");
}
HGCW012.setRemainingAmount(remainingAmount);
DaoUtils.update("HGCW012.updateDeductionAmount", HGCW012);
......@@ -1110,6 +1110,14 @@ public class HGCWTools {
return results;
}
public static List<HGCW013> getMainId(List<Long> mainIds) {
AssertUtils.isNull(mainIds, "主表ID不能为空!");
List<HGCW013> results = DaoBase.getInstance().query(HGCW013.QUERY,new HashMap<String,Object>(){
{put("mainIds",mainIds);}
});
return results;
}
public static void countTaxAmount(List<Map> rows,HGCW012 hgcw012,Map<String, BigDecimal> rowMap) {
DecimalFormat decimalFormat = new DecimalFormat("#.00");
StringBuffer settlementNumber = new StringBuffer();
......@@ -1272,6 +1280,14 @@ public class HGCWTools {
});
return results;
}
public static List<HGCW017> getMainId(List<Long> mainIds) {
AssertUtils.isNull(mainIds, "主表ID不能为空!");
List<HGCW017> results = DaoBase.getInstance().query(HGCW017.QUERY,new HashMap<String,Object>(){
{put("mainIds",mainIds);}
});
return results;
}
}
/**
......
......@@ -39,7 +39,7 @@ public class ServiceHGSC001 extends ServiceBase {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
Map map = new HashMap();
map.put(HGSC001.FIELD_account_code, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID), map,false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_TYPE_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), map,false);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......
......@@ -300,9 +300,13 @@
start_date as "startDate", <!-- 开工日期 -->
end_date as "endDate", <!-- 竣工日期 -->
party_pm_name as "partyPmName", <!-- 甲方项目经理名称 -->
party_pm_hpone as "partyPmHpone" <!-- 甲方项目经理联系电话-->
party_pm_hpone as "partyPmHpone", <!-- 甲方项目经理联系电话-->
branch_unit as "branchUnit"
FROM ${hggpSchema}.HGSC001 WHERE approval_status = 2 and proj_status = 0
<include refid="condition" />
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty>
</select>
<select id="queryProjectByRoleBox" parameterClass="java.util.HashMap"
......
......@@ -412,11 +412,32 @@ let remove = function () {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG002", "remove", true);
let flag = true;
rows.forEach(function (item, index) {
if(item.status == 2){
message("勾选的第" + (index + 1) + "行数据已经审核通过,不能删除");
flag = false;
return;
}
});
if(item.status == 4){
message("勾选的第" + (index + 1) + "行数据已经收货中,不能删除");
flag = false;
return;
}
if(item.status == 5){
message("勾选的第" + (index + 1) + "行数据已经收货完成,不能删除");
flag = false;
return;
}
})
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG002", "remove", true);
}
});
}
}
/**
......
......@@ -53,6 +53,7 @@
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="200" align="left"/>
<EF:EFColumn ename="projCode" cname="项目编码" width="140" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" align="center" enable="false"/>
<EF:EFColumn ename="receiveDate" cname="收货日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
......
......@@ -32,6 +32,9 @@
</EF:EFDateSpan>
<EF:EFInput cname="甲方名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="乙方名称" ename="partyB" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput cname="主合同号" ename="mainContractNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="合同状态" ename="inqu_status-0-contractStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
......@@ -61,6 +64,11 @@
<EF:EFColumn ename="contractName" cname="合同名称" align="center" enable="false"/>
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false" width="160" align="center" required="false"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="mainContractNumber" cname="主合同号" align="center" enable="false"/>
<EF:EFComboColumn ename="mainContractNumber" cname="主合同名称" enable="false" width="160" align="center" required="false"
blockName="contract_block_id" textField="textField" valueField="valueField"
......
......@@ -143,9 +143,17 @@ $(function() {
if (contractType == "2"){
$("#result-0-partyA").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
$("#result-0-partyB").val(projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyB") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
}else {
$("#result-0-partyA").val(projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
$("#result-0-partyB").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyA") , projectCodeBox[i]['param1Field']+"-"+projectCodeBox[i]['param2Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.value( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
}
var planStartDate = $("#result-0-planStartDate").data("kendoDatePicker");
planStartDate.value(projectCodeBox[i]['param5Field'], "d");
......@@ -153,10 +161,10 @@ $(function() {
planEndDate.value(projectCodeBox[i]['param6Field'], "d");
IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']);
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']);
IPLAT.EFSelect.value($("#result-0-branchUnit"), projectCodeBox[i]['param9Field']);
break;
}
}
}
}
}
......@@ -182,8 +190,8 @@ $(function() {
$("#result-0-mainContractNumber").val("");
var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "" || valueField == "3" || valueField == "5") {
$("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("收入");
$("#result-0-contractCategory").val("2");
IPLAT.EFInput.value($("#contractCategory"),"收入");
for (let i = 0; i < projectCodeBox.length; i++) {
let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){
......@@ -197,11 +205,10 @@ $(function() {
break;
}
}
}
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("支出");
$("#result-0-contractCategory").val("1");
IPLAT.EFInput.value($("#contractCategory"),"支出");
for (let i = 0; i < projectCodeBox.length; i++) {
let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){
......@@ -214,14 +221,10 @@ $(function() {
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field'])
}
}
}
} else {
$("#result-0-contractCategory").val("");
}
}
},
"result-0-taxPoints": {
......
......@@ -17,7 +17,7 @@
</EF:EFSelect>
<EF:EFInput ename="result-0-projCode" cname="项目编号" type="hidden"/>
<EF:EFInput ename="result-0-projName" cname="项目简称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="true" />
<EF:EFInput ename="result-0-contractNumber" cname="合同号" colWidth="4" readonly="false" />
</div>
<div class="row">
<EF:EFInput ename="result-0-contractName" cname="合同名称" colWidth="4" required="true"/>
......@@ -34,7 +34,7 @@
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyAQuery" resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
valueField="username" textField="username"
......@@ -44,7 +44,7 @@
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyBQuery" resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
......@@ -54,14 +54,17 @@
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
<EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" />
</div>
<div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
startName="planStartDate" endName="planEndDate" row="0" role="date"
format="yyyy-MM-dd" ratio="4:4" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" filter="contains">
<EF:EFSelect cname="合同状态" ename="result-0-contractStatus" colWidth="4" defaultValue="1" filter="contains">
<EF:EFOption label="-- 请选择 --" value=""/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFSelect>
......
......@@ -160,12 +160,12 @@ $(function() {
var dataItem = e.dataItem;
console.log(dataItem)
var valueField = dataItem['valueField'];
if (valueField == "1" || valueField == "3") {
$("#result-0-contractCategory").val("1");
$("#contractCategoryName").val("收入");
} else if (valueField == "2" || valueField == "4"){
if (valueField == "1" || valueField == "3" || valueField == "5") {
$("#result-0-contractCategory").val("2");
$("#contractCategoryName").val("支出");
IPLAT.EFInput.value($("#contractCategory"),"收入");
} else if (valueField == "2" || valueField == "4"){
$("#result-0-contractCategory").val("1");
IPLAT.EFInput.value($("#contractCategory"),"支出");
} else {
$("#result-0-contractCategory").val("");
}
......
......@@ -38,7 +38,7 @@
<%-- </EF:EFSelect>--%>
</div>
<div class="row">
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="4"
<EF:EFPopupInput ename="popupInputPartyA" cname="甲方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyAQuery"
resultId="partyAResult"
required="true" save="false" popupType="ServiceGrid"
......@@ -49,7 +49,7 @@
resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
<EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="3"
serviceName="HGCW002A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
......@@ -60,7 +60,10 @@
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" />
<EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains" readonly="true">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" />
</div>
<div class="row">
<EF:EFDateSpan startCname="计划开工/竣工日期" endCname="至" required="true" colWidth="8" blockId="result"
......
......@@ -29,9 +29,12 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput ename="result-0-partyA" cname="甲方名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" colWidth="3" readonly="true"/>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="3" readonly="true"/>
<EF:EFSelect cname="分支单位" ename="result-0-branchUnit" colWidth="3" filter="contains" readonly="true">
<EF:EFOptions blockId="customer_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFInput ename="result-0-partyC" cname="丙方" colWidth="3" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-planStartDate" cname="计划开工日期" colWidth="4" readonly="true"/>
......
......@@ -24,6 +24,9 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户名称"/>
<EF:EFSelect cname="分支单位" ename="inqu_status-0-branchUnit" colWidth="3" filter="contains">
<EF:EFOptions blockId="customer1_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFSelect>
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
......@@ -65,6 +68,12 @@
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="140" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" defaultValue="1">
......
......@@ -13,6 +13,12 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票金额" width="120" format="{0:N2}" align="right"/>
</EF:EFGrid>
......
......@@ -47,6 +47,12 @@
<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:EFComboColumn ename="branchUnit" cname="分支单位" blockName="customer1_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="签订日期" width="120" enable="true" readonly="false" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
......
......@@ -295,7 +295,7 @@ function submitFunc() {
flag = false;
}
if (row.reviewStatus == "3") {
message("选中的第"+(index+1)+"行已经提交的合同!");
message("选中的第"+(index+1)+"行已经提交的数据!");
flag = false;
}
})
......
......@@ -51,6 +51,7 @@
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" hidden="true"/>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="partyA" cname="供应商名称" blockName="sup_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -80,12 +80,12 @@ function btnSaveFunc(btnNode, gridNode) {
let thisAmount = item['thisAmount'];
let remainingAmount = item['remainingAmount'];
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (index + 1) + "行本次收票金额必须是大于0的数字");
message("勾选的第" + (index + 1) + "行本次付款金额必须是大于0的数字");
flag = false;
return false;
}
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (index + 1) + "行本次收票金额不能大于剩余收票金额");
message("第" + (index + 1) + "行本次付款金额不能大于剩余采购收票金额");
flag = false;
return false;
}
......@@ -184,6 +184,13 @@ $(function () {
locked: false
},
{
field: "contractNo",
title: "合同号",
headerTemplate: "<span style='color: '>合同号 </span>",
enable: false,
locked: false
},
{
field: "receiveNo",
title: "收货编号",
headerTemplate: "<span style='color: '>收货编号 </span>",
......@@ -259,8 +266,8 @@ $(function () {
},
{
field: "thisSettlementAmount",
title: "票总额",
headerTemplate: "<span style='color: '>票总额 </span>",
title: "票总额",
headerTemplate: "<span style='color: '>票总额 </span>",
format:"{0:C2}",
align:"right",
locked: false,
......@@ -377,7 +384,7 @@ $(function () {
},
{
field: "thisAmount",
title: "本次票金额",
title: "本次票金额",
headerTemplate: "<span style='color: '>本次收票金额 </span>",
format:"{0:C2}",
locked: false
......@@ -495,7 +502,7 @@ $(function () {
locked: false
},{
field: "thisAmount",
title: "本次票金额",
title: "本次票金额",
headerTemplate: "<span style='color: '>本次收票金额 </span>",
format:"{0:C2}",
locked: false
......
......@@ -12,6 +12,7 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractNo" cname="合同号" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" 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="totalContractPriceIncluding" cname="付款总额" width="120" format="{0:C2}" align="center"/>
......
......@@ -19,9 +19,10 @@
maxLength="16" readonly="false" width="200" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="200" enable="false" readonly="true" align="center"/>
<%--<EF:EFColumn ename="partyA" 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="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:C2}" align="right" enable="false" readonly="true"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="发票总额" width="120" format="{0:C2}" align="right" enable="false" readonly="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......
......@@ -17,6 +17,8 @@ $(function() {
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">收款清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
}
......@@ -175,11 +177,6 @@ function submitFunc() {
message("选中的第"+(index+1)+"行未保存的数据,请先保存!");
flag = false;
}
if (row.cancelStatus == "1") {
message("勾选的数据中有未核销的单据!");
flag = false;
return;
}
if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的单据!");
flag = false;
......@@ -237,6 +234,11 @@ function writeoffFunc() {
flag = false;
return;
}
if (row.reviewStatus == "0") {
message("勾选的第"+(index+1)+"行中有未审核提交的单据,请先审核提交!");
flag = false;
return;
}
})
if (flag) {
......@@ -306,3 +308,11 @@ function contractDetailFunc(id) {
});
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=KP&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
......@@ -30,7 +30,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -20,6 +20,8 @@ $(function() {
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="contractDetailFunc(' + item.id + ')">付款清单</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="fileDetailFunc(' + item.id + ')">附件详情</a>';
return template;
}
},
......@@ -363,3 +365,12 @@ function contractDetailFunc(id) {
});
}
function fileDetailFunc(id) {
JSColorbox.open({
href: "HGCW999?methodName=initLoad&inqu_status-0-bizType=FK&inqu_status-0-matId=" + id + "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
......@@ -30,7 +30,7 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
......@@ -47,6 +47,7 @@
maxLength="16" readonly="true" width="210" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNo" cname="合同号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次付款金额" width="120" enable="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,2})?$/" maxLength="15" required="true"
......
......@@ -6,7 +6,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="款清单">
<EF:EFPage title="款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
......@@ -24,6 +24,7 @@
maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNo" 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="totalContractPriceIncluding" cname="付款总额" width="120" enable="true" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right"
......
......@@ -6,7 +6,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="款清单">
<EF:EFPage title="款清单">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="row">
......@@ -24,6 +24,7 @@
maxLength="16" width="200" readonly="true" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="contractNo" 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="totalContractPriceIncluding" cname="付款总额" width="120" enable="false" format="{0:C2}" editType="text"
displayType="0.00" sort="true" align="right" readonly="true"
......
......@@ -6,6 +6,8 @@ $(function () {
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.docId) + '" target="_blank">附件下载</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showPreview(\'' + item.docId + '\',\''+ item.docName + '\')" >预览</a>';
return template;
}
}],
......@@ -101,3 +103,17 @@ function deleteFunc() {
}
})
}
/**
* 预览
*
* @param fileId
* @param docId
* @param docType
* @param docName
*/
let showPreview = function (docId, docName) {
let typeIndex = docName.lastIndexOf(".");
let docType = typeIndex == -1 ? "" : docName.substring(typeIndex+1);
addCwRecordWindow(docId, docType, docName);
}
......@@ -4,7 +4,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
......@@ -25,3 +27,5 @@
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<jsp:include page="HGCW999A.jsp" />
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/23
Time: 16:02
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}"/>
<script src="${ctx}/common/docxjs/jszip.min.js"></script>
<script src="${ctx}/common/docxjs/docx-preview.js"></script>
<script src="${ctx}/common/js/xlsx.full.min.js"></script>
<script src="${ctx}/HG/WD/HGWD001C1.js"></script>
<script src="${ctx}/HG/CW/HGCW999A.js"></script>
<link rel="stylesheet" href="${ctx}/HG/WD/HGWD002A1.css">
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<%-- 预览文件 --%>
<EF:EFWindow id="previewFile" title="附件预览" height="90%" width="90%">
<div id="descDiv" class="center-flex">
<span id="descSpan" style="font-weight: bold;font-size: 18px">附件预览区域...</span>
</div>
<%-- 文本预览 --%>
<div id="textContainer" class="left-flex" style="display: none;">
<pre id="textSpan" class="textSpan"></pre>
</div>
<%-- docx文件预览--%>
<div id="docxContainer" style="display: none;"></div>
<%-- IMAGE文件预览--%>
<div id="imageContainer" class="left-flex" style="display: none;">
<img id="image" src="" style="border: 1px solid gray;width: 100%;height: 100%;"/>
</div>
<%-- other --%>
<iframe id="previewFrame" src="" style="display: none;"></iframe>
</EF:EFWindow>
<%-- 图片放大区域 --%>
<div id="imageOuterDiv" class="imageOuterDiv">
<img id="bigImage" src=""/>
</div>
......@@ -40,6 +40,13 @@
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subcontractName" cname="分包方" enable="false" width="120" align="center"/>
<EF:EFColumn ename="genralContractName" cname="总包方" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="100" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projType" cname="项目性质" enable="false" width="120" align="center"/>
<EF:EFColumn ename="permissStartDate" cname="准许开工日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="startDate" cname="开工日期" enable="false" width="120" align="center"/>
......
......@@ -41,7 +41,7 @@
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货编码" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=valueField#-#=textField#" readonly="true"
columnTemplate="#=valueField#" itemTemplate="#=valueField#-#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="120"/>
......
......@@ -67,6 +67,15 @@ $(function (){
},
afterEdit:function (e) {
},
onAdd: function (e) {
$.each(e.items, function (index, item) {
let rowsDate = resultGrid.getDataItems();
let maxProcessOrder = rowsDate.reduce((prev, current) => {
return (prev.processOrder || 0) > (current.processOrder || 0) ? prev : current;
});
item['processOrder'] = Number(maxProcessOrder.processOrder)+1;
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
......
......@@ -46,7 +46,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="flowCode" cname="流程编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="flowName" cname="流程名称" width="120" enable="true" readonly="false" align="center" required="true"/>--%>
<EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N3}" editType="number"
<EF:EFColumn ename="processOrder" cname="加工顺序" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0" sort="true" align="center" required="true"
data-regex="/^-?[0-9]{1,15}?$/" maxLength="15"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
......
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