Commit 8e7d83bf by 13420

Merge remote-tracking branch 'origin/dev' into dev

parents 61996b88 92e30358
......@@ -99,9 +99,9 @@ public class DaoUtils {
public static int insertBatch(String sql, Collection parameters) {
parameters.forEach(obj->{
if (obj instanceof DaoEPBase) {
setRevisor((DaoEPBase) obj, true);
setCreator((DaoEPBase) obj);
} else if (obj instanceof Map) {
setRevisor((Map) obj, true);
setCreator((Map) obj);
}
});
return DaoBase.getInstance().insertBatch(sql, parameters);
......
......@@ -45,7 +45,7 @@ public class HGCB002 extends DaoEPBase {
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC_ID = "specId"; /* 规格ID*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
......@@ -53,6 +53,7 @@ public class HGCB002 extends DaoEPBase {
public static final String FIELD_IS_ESTIMATE = "isEstimate"; /* 是否暂估:0-否 1-是*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -91,6 +92,7 @@ public class HGCB002 extends DaoEPBase {
public static final String INSERT = "HGCB002.insert";
public static final String UPDATE = "HGCB002.update";
public static final String DELETE = "HGCB002.delete";
public static final String DELETE_PERIOD = "HGCB002.deleteByPeriod";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 企业编码*/
......@@ -115,7 +117,7 @@ public class HGCB002 extends DaoEPBase {
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long specId = new Long(0); /* 规格ID*/
private Long inventRecordId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
......@@ -123,6 +125,7 @@ public class HGCB002 extends DaoEPBase {
private Integer isEstimate = 0; /* 是否暂估:0-否 1-是*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Integer inventTypeDetail;
/**
* initialize the metadata.
......@@ -223,7 +226,7 @@ public class HGCB002 extends DaoEPBase {
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC_ID);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
......@@ -267,6 +270,9 @@ public class HGCB002 extends DaoEPBase {
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
......@@ -648,20 +654,20 @@ public class HGCB002 extends DaoEPBase {
this.inventName = inventName;
}
/**
* get the specId - 规格ID.
* @return the specId
* get the inventRecordId - 规格ID.
* @return the inventRecordId
*/
public Long getSpecId() {
return this.specId;
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the specId - 规格ID.
* set the inventRecordId - 规格ID.
*
* @param specId - 规格ID
* @param inventRecordId - 规格ID
*/
public void setSpecId(Long specId) {
this.specId = specId;
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the spec - 规格.
......@@ -775,6 +781,15 @@ public class HGCB002 extends DaoEPBase {
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -806,7 +821,7 @@ public class HGCB002 extends DaoEPBase {
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
......@@ -814,6 +829,7 @@ public class HGCB002 extends DaoEPBase {
setIsEstimate(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_ESTIMATE)), isEstimate));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -846,7 +862,7 @@ public class HGCB002 extends DaoEPBase {
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
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_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
......@@ -854,7 +870,7 @@ public class HGCB002 extends DaoEPBase {
map.put(FIELD_IS_ESTIMATE, StringUtils.toString(isEstimate, eiMetadata.getMeta(FIELD_IS_ESTIMATE)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_INVENT_TYPE_DETAIL, StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
}
......@@ -44,7 +44,7 @@ public class HGCB003 extends DaoEPBase {
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC_ID = "specId"; /* 规格ID*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_QUANTITY = "quantity"; /* 数量*/
......@@ -52,6 +52,7 @@ public class HGCB003 extends DaoEPBase {
public static final String FIELD_IS_ESTIMATE = "isEstimate"; /* 是否暂估:0-否 1-是*/
public static final String FIELD_PRICE = "price"; /* 单价*/
public static final String FIELD_AMOUNT = "amount"; /* 金额*/
public static final String FIELD_INVENT_TYPE_DETAIL = "inventTypeDetail"; /*存货类型明细*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
......@@ -90,6 +91,7 @@ public class HGCB003 extends DaoEPBase {
public static final String INSERT = "HGCB003.insert";
public static final String UPDATE = "HGCB003.update";
public static final String DELETE = "HGCB003.delete";
public static final String DELETE_PERIOD = "HGCB003.deleteByPeriod";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 企业编码*/
......@@ -113,7 +115,7 @@ public class HGCB003 extends DaoEPBase {
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long specId = new Long(0); /* 规格ID*/
private Long inventRecordId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private String unit = " "; /* 单位*/
private BigDecimal quantity = new BigDecimal("0"); /* 数量*/
......@@ -121,6 +123,7 @@ public class HGCB003 extends DaoEPBase {
private Integer isEstimate = 0; /* 是否暂估:0-否 1-是*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Integer inventTypeDetail;
/**
* initialize the metadata.
......@@ -217,7 +220,7 @@ public class HGCB003 extends DaoEPBase {
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC_ID);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
......@@ -261,6 +264,9 @@ public class HGCB003 extends DaoEPBase {
eiColumn.setDescName("金额");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE_DETAIL);
eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn);
}
......@@ -624,20 +630,20 @@ public class HGCB003 extends DaoEPBase {
this.inventName = inventName;
}
/**
* get the specId - 规格ID.
* @return the specId
* get the inventRecordId - 规格ID.
* @return the inventRecordId
*/
public Long getSpecId() {
return this.specId;
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the specId - 规格ID.
* set the inventRecordId - 规格ID.
*
* @param specId - 规格ID
* @param inventRecordId - 规格ID
*/
public void setSpecId(Long specId) {
this.specId = specId;
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the spec - 规格.
......@@ -751,6 +757,15 @@ public class HGCB003 extends DaoEPBase {
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Integer getInventTypeDetail() {
return inventTypeDetail;
}
public void setInventTypeDetail(Integer inventTypeDetail) {
this.inventTypeDetail = inventTypeDetail;
}
/**
* get the value from Map.
*
......@@ -781,7 +796,7 @@ public class HGCB003 extends DaoEPBase {
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpecId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_SPEC_ID)), specId));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
......@@ -789,6 +804,7 @@ public class HGCB003 extends DaoEPBase {
setIsEstimate(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_IS_ESTIMATE)), isEstimate));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
}
/**
......@@ -820,7 +836,7 @@ public class HGCB003 extends DaoEPBase {
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
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_ID, StringUtils.toString(specId, eiMetadata.getMeta(FIELD_SPEC_ID)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
......@@ -828,7 +844,7 @@ public class HGCB003 extends DaoEPBase {
map.put(FIELD_IS_ESTIMATE, StringUtils.toString(isEstimate, eiMetadata.getMeta(FIELD_IS_ESTIMATE)));
map.put(FIELD_PRICE, StringUtils.toString(price, eiMetadata.getMeta(FIELD_PRICE)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_INVENT_TYPE_DETAIL, StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
return map;
}
}
......@@ -42,6 +42,7 @@ public class HGCB004 extends DaoEPBase {
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 规格ID*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
public static final String FIELD_INIT_QUANTITY = "initQuantity"; /* 期初数量*/
public static final String FIELD_INIT_WEIGHT = "initWeight"; /* 期初重量*/
public static final String FIELD_INIT_AMOUNT = "initAmount"; /* 期初金额*/
......@@ -159,6 +160,7 @@ public class HGCB004 extends DaoEPBase {
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId = new Long(0); /* 规格ID*/
private String spec = " "; /* 规格*/
private BigDecimal initQuantity = new BigDecimal(0); /* 期初数量*/
private BigDecimal initWeight = new BigDecimal(0.000); /* 期初重量*/
private BigDecimal initAmount = new BigDecimal(0.000); /* 期初金额*/
......@@ -280,6 +282,10 @@ public class HGCB004 extends DaoEPBase {
eiColumn.setDescName("规格ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INIT_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
......@@ -842,6 +848,15 @@ public class HGCB004 extends DaoEPBase {
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the initQuantity - 期初数量.
* @return the initQuantity
......@@ -1398,6 +1413,7 @@ public class HGCB004 extends DaoEPBase {
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
setInitQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_QUANTITY)), initQuantity));
setInitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_WEIGHT)), initWeight));
setInitAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_INIT_AMOUNT)), initAmount));
......@@ -1460,6 +1476,7 @@ public class HGCB004 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_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
map.put(FIELD_INIT_QUANTITY, StringUtils.toString(initQuantity, eiMetadata.getMeta(FIELD_INIT_QUANTITY)));
map.put(FIELD_INIT_WEIGHT, StringUtils.toString(initWeight, eiMetadata.getMeta(FIELD_INIT_WEIGHT)));
map.put(FIELD_INIT_AMOUNT, StringUtils.toString(initAmount, eiMetadata.getMeta(FIELD_INIT_AMOUNT)));
......
package com.baosight.hggp.hg.cb.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.security.UserSessionUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.cb.domain.HGCB002;
import com.baosight.hggp.hg.cb.domain.HGCB004;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
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.ServiceEPBase;
import java.util.Arrays;
......@@ -47,12 +51,43 @@ public class ServiceHGCB002 extends ServiceEPBase {
return super.query(inInfo, HGCB002.QUERY, new HGCB002());
}
@OperationLogAnnotation(operModul = "原材料入库成本核算",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGCB002.DELETE);
}
@OperationLogAnnotation(operModul = "原材料入库成本核算",operType = "查询",operDesc = "数据同步操作")
public EiInfo select(EiInfo inInfo) {
try {
Map params= EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB002.FIELD_COMPANY_CODE).toString());
params.put(HGCW001.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
params.put(HGCW001.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
HGUtils.setCondition(params);
HGCB001 hgcw001Today = HGCBTools.HgCb001.select(params);
if (hgcw001Today != null && hgcw001Today.getAccountPeriodStatus() == 0) {
throw new PlatException(String.format("公司[%s]会计期[%s]状态为关账状态,数据同步失败!", hgcw001Today.getCompanyCode(), hgcw001Today.getAccountPeriod()));
}
HGCB001 hgcw001Last = HGCBTools.HgCb001.selectLast(params);
if (hgcw001Last != null && hgcw001Last.getAccountPeriodStatus() == 1) {
throw new PlatException(String.format("公司[%s]上月会计期[%s]为开账状态,数据同步失败!", hgcw001Last.getCompanyCode(), hgcw001Last.getAccountPeriod()));
}
HGCBTools.HgCb002.select(params);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "同步数据失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "原材料入库成本核算",operType = "查询",operDesc = "查询业务账期")
public EiInfo selectAll(EiInfo inInfo) {
try {
Map params= EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB002.FIELD_COMPANY_CODE).toString());
EiInfoUtils.addBlock(inInfo,"hgcw001_block_id", hgcw001, HGCW001.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "同步数据失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.cb.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.cb.domain.HGCB003;
import com.baosight.hggp.hg.cb.tools.HGCBTools;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.utils.HGUtils;
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.hggp.util.ObjectUtils;
import com.baosight.hggp.util.*;
import com.baosight.hggp.util.contants.ACConstants;
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.ServiceEPBase;
import java.util.Arrays;
import java.util.Map;
/**
......@@ -26,6 +28,8 @@ public class ServiceHGCB003 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.initLoad(inInfo, EiConstant.resultBlock, new HGCB003());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
EiInfoUtils.addBlock(inInfo,"company_code_block_id", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -43,11 +47,26 @@ public class ServiceHGCB003 extends ServiceEPBase {
}
public EiInfo select(EiInfo inInfo) {
try{
Map params= EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB003.FIELD_COMPANY_CODE).toString());
params.put(HGCW001.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
params.put(HGCW001.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
HGUtils.setCondition(params);
HGCB001 hgcw001Today = HGCBTools.HgCb001.select(params);
if (hgcw001Today != null && hgcw001Today.getAccountPeriodStatus() == 0) {
throw new PlatException(String.format("公司[%s]会计期[%s]状态为关账状态,数据同步失败!", hgcw001Today.getCompanyCode(), hgcw001Today.getAccountPeriod()));
}
HGCB001 hgcw001Last = HGCBTools.HgCb001.selectLast(params);
if (hgcw001Last != null && hgcw001Last.getAccountPeriodStatus() == 1) {
throw new PlatException(String.format("公司[%s]上月会计期[%s]为开账状态,数据同步失败!", hgcw001Last.getCompanyCode(), hgcw001Last.getAccountPeriod()));
}
HGCBTools.HgCb003.select(params);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "同步数据失败");
}
return inInfo;
}
@Override
public EiInfo delete(EiInfo inInfo) {
return super.delete(inInfo, HGCB003.DELETE);
}
}
......@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cb.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.security.UserSessionUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.cb.domain.HGCB002;
import com.baosight.hggp.hg.cb.domain.HGCB004;
......@@ -14,6 +15,8 @@ import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.domain.HGPZ007;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.utils.HGUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -39,12 +42,13 @@ public class ServiceHGCB004 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"company_code_block_id", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCB004().eiMetadata);
} catch (PlatException e) {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -73,17 +77,23 @@ public class ServiceHGCB004 extends ServiceEPBase {
* @return
*/
@OperationLogAnnotation(operModul = "收发存汇总",operType = "同步数据",operDesc = "同步数据")
public EiInfo synchData(EiInfo inInfo) {
public EiInfo select(EiInfo inInfo) {
try {
Map<String, Object> queryRow = EiInfoUtils.getFirstRow(inInfo);
HGCW001 hgcw001 = HGCWTools.HgCw001.getMaxAccountPeriod(queryRow.get(HGCB002.FIELD_COMPANY_CODE).toString());
queryRow.put(HGCB004.FIELD_ACCOUNT_CODE, hgcw001.getAccountCode());
queryRow.put(HGCB004.FIELD_ACCOUNT_PERIOD, hgcw001.getAccountPeriod());
List<HGCB004> cb004s =HGCBTools.HgCb004.synchData(queryRow);
Map params = EiInfoUtils.getFirstRow(inInfo);
HGUtils.setCondition(params);
HGCB001 hgcw001Today = HGCBTools.HgCb001.select(params);
if (hgcw001Today != null && hgcw001Today.getAccountPeriodStatus() == 0) {
throw new PlatException(String.format("公司[%s]会计期[%s]状态为关账状态,数据同步失败!", hgcw001Today.getCompanyCode(), hgcw001Today.getAccountPeriod()));
}
HGCB001 hgcw001Last = HGCBTools.HgCb001.selectLast(params);
if (hgcw001Last != null && hgcw001Last.getAccountPeriodStatus() == 1) {
throw new PlatException(String.format("公司[%s]上月会计期[%s]为开账状态,数据同步失败!", hgcw001Last.getCompanyCode(), hgcw001Last.getAccountPeriod()));
}
HGCBTools.HgCb004.synchData(params);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + cb004s.size() + "]条数据同步成功!");
inInfo.setMsg("操作成功!本次数据同步成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "同步数据失败");
LogUtils.setDetailMsg(inInfo, e, "数据同步失败");
}
return inInfo;
}
......
......@@ -68,6 +68,51 @@
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<sql id="lastCondition">
<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="accountYear">
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = (select DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriodStatus">
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
</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>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cb.domain.HGCB001">
......@@ -199,10 +244,38 @@
ID = #id#
</update>
<select id="getSwitchRowNum" resultClass="com.baosight.hggp.hg.cw.domain.HGCB001">
<select id="getSwitchRowNum" resultClass="com.baosight.hggp.hg.cb.domain.HGCB001">
SELECT * FROM ${hggpSchema}.HGCB001 WHERE ACCOUNT_PERIOD_STATUS = 1
</select>
<select id="getLastRow" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.cb.domain.HGCB001">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
ACCOUNT_PERIOD_STATUS as "accountPeriodStatus", <!-- 会计期状态0:关账1:开账 -->
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}.HGCB001 WHERE 1=1
<include refid="lastCondition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<update id="updateSwitchRow">
UPDATE ${hggpSchema}.HGCB001
SET
......
......@@ -62,36 +62,30 @@
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount" <!-- 金额 -->
AMOUNT as "amount", <!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql>
<sql id="columnLast">
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
BIZ_TYPE as "bizType", <!-- 业务类型 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
RECEIPT_CODE as "receiptCode", <!-- 单据号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
sum(QUANTITY) as "quantity", <!-- 数量 -->
sum(WEIGHT) as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
CASE WHEN IFNULL(SUM(QUANTITY), 0) = 0 THEN 0 ELSE SUM(AMOUNT)/SUM(QUANTITY) END as "price", <!-- 单价 -->
sum(AMOUNT) as "amount" <!-- 金额 -->
</sql>
......@@ -166,8 +160,8 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
......@@ -190,6 +184,12 @@
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
......@@ -206,12 +206,18 @@
SELECT <include refid="column" />
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
<isNotEmpty prepend=" AND " property="accountDate">
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
<isNotEmpty prepend=" AND " property="accountDate">
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
</select>
<select id="queryDetail" parameterClass="java.util.HashMap" resultClass="HGCB002">
......@@ -223,7 +229,8 @@
WH_CODE as "whCode", <!-- 仓库编码 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
SPEC_ID as "specId", <!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SPEC as "spec", <!-- 规格 -->
SUM(QUANTITY) as "quantity", <!-- 数量 -->
SUM(WEIGHT) as "weight", <!-- 重量 -->
......@@ -231,14 +238,17 @@
SUM(AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, SPEC_ID, SPEC, IS_ESTIMATE
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID,INVENT_TYPE_DETAIL, SPEC, IS_ESTIMATE
</select>
<!--查询上月-->
<select id="queryLast" parameterClass="java.util.HashMap" resultClass="HGCB002">
SELECT <include refid="columnLast" />
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include refid="condition" />
group by ACCOUNT_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, BIZ_TYPE, RECEIPT_DATE, RECEIPT_CODE, RECEIVE_NO, WH_CODE, WH_NAME, INVENT_TYPE, INVENT_CODE, INVENT_NAME, SPEC_ID, SPEC, UNIT, IS_ESTIMATE
<isNotEmpty prepend=" AND " property="accountDate">
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, WH_CODE, INVENT_CODE, INVENT_RECORD_ID,INVENT_TYPE_DETAIL, SPEC
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -366,19 +376,20 @@
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
INVENT_RECORD_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
IS_ESTIMATE, <!-- 是否暂估:0-否 1-是 -->
PRICE, <!-- 单价 -->
AMOUNT <!-- 金额 -->
AMOUNT, <!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #receiveNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
#receiptDate#, #receiptCode#, #receiveNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#, #inventTypeDetail#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCB002
</selectKey>
......@@ -387,6 +398,14 @@
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCB002 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete id="deleteByPeriod">
DELETE FROM ${hggpSchema}.HGCB002
WHERE ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_YEAR = #accountYear#
AND ACCOUNT_PERIOD = #accountPeriod#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB002
......@@ -413,14 +432,15 @@
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC_ID = #specId#, <!-- 规格ID -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 规格ID -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
QUANTITY = #quantity#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
IS_ESTIMATE = #isEstimate#, <!-- 是否暂估:0-否 1-是 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount# <!-- 金额 -->
AMOUNT = #amount#, <!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
......
......@@ -61,14 +61,15 @@
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
QUANTITY as "quantity", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount" <!-- 金额 -->
AMOUNT as "amount", <!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" <!-- 存货类型明细 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
......@@ -138,8 +139,8 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
......@@ -162,6 +163,12 @@
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetails">
INVENT_TYPE_DETAIL IN <iterate close=")" open="(" conjunction="," property="inventTypeDetails">#inventTypeDetails[]#</iterate>
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
......@@ -191,18 +198,23 @@
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
SPEC_ID as "specId", <!-- 规格ID -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SPEC as "spec", <!-- 规格 -->
SUM(QUANTITY) as "quantity", <!-- 数量 -->
SUM(WEIGHT) as "weight", <!-- 重量 -->
IS_ESTIMATE as "isEstimate", <!-- 是否暂估:0-否 1-是 -->
SUM(AMOUNT) as "amount" <!-- 金额 -->
FROM ${hggpSchema}.HGCB003 WHERE 1=1
<include refid="condition" />
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, SPEC_ID, IS_ESTIMATE
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, WH_CODE, WH_NAME, INVENT_TYPE, INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID,INVENT_TYPE_DETAIL, SPEC
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
......@@ -320,24 +332,33 @@
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
INVENT_RECORD_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
UNIT, <!-- 单位 -->
QUANTITY, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
IS_ESTIMATE, <!-- 是否暂估:0-否 1-是 -->
PRICE, <!-- 单价 -->
AMOUNT <!-- 金额 -->
AMOUNT, <!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #specId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
#receiptDate#, #receiptCode#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#, #inventTypeDetail#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCB003 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete id="deleteByPeriod">
DELETE FROM ${hggpSchema}.HGCB003
WHERE ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_YEAR = #accountYear#
AND ACCOUNT_PERIOD = #accountPeriod#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCB003
......@@ -363,14 +384,15 @@
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC_ID = #specId#, <!-- 规格ID -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 规格ID -->
SPEC = #spec#, <!-- 规格 -->
UNIT = #unit#, <!-- 单位 -->
QUANTITY = #quantity#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
IS_ESTIMATE = #isEstimate#, <!-- 是否暂估:0-否 1-是 -->
PRICE = #price#, <!-- 单价 -->
AMOUNT = #amount# <!-- 金额 -->
AMOUNT = #amount#, <!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
......
......@@ -81,6 +81,7 @@
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
INIT_QUANTITY as "initQuantity", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
INIT_AMOUNT as "initAmount", <!-- 期初金额 -->
......@@ -160,7 +161,7 @@
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
WH_NAME like concat('%',#whName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
......@@ -169,11 +170,14 @@
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
INVENT_NAME like concat('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="initQuantity">
INIT_QUANTITY = #initQuantity#
</isNotEmpty>
......@@ -386,7 +390,52 @@
</select>
<!--查询上月-->
<select id="queryLast" parameterClass="java.util.HashMap" resultClass="HGCB004">
SELECT <include refid="column" />
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE_DETAIL as "inventTypeDetail", <!-- 存货类型明细 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
SUM(INIT_QUANTITY) as "initQuantity", <!-- 期初数量 -->
SUM(INIT_WEIGHT) as "initWeight", <!-- 期初重量 -->
SUM(INIT_AMOUNT) as "initAmount", <!-- 期初金额 -->
SUM(CG_ENTER_QUANTITY) as "cgEnterQuantity", <!-- 采购入库数量 -->
SUM(CG_ENTER_WEIGHT) as "cgEnterWeight", <!-- 采购入库重量 -->
SUM(CG_ENTER_AMOUNT) as "cgEnterAmount", <!-- 采购入库金额 -->
SUM(SC_ENTER_QUANTITY) as "scEnterQuantity", <!-- 生产入库数量 -->
SUM(SC_ENTER_WEIGHT) as "scEnterWeight", <!-- 生产入库重量 -->
SUM(SC_ENTER_AMOUNT) as "scEnterAmount", <!-- 生产入库金额 -->
SUM(QT_ENTER_QUANTITY) as "qtEnterQuantity", <!-- 其它入库数量 -->
SUM(QT_ENTER_WEIGHT) as "qtEnterWeight", <!-- 其它入库重量 -->
SUM(QT_ENTER_AMOUNT) as "qtEnterAmount", <!-- 其它入库重量 -->
SUM(ENTER_QUANTITY) as "enterQuantity", <!-- 入库数量 -->
SUM(ENTER_WEIGHT) as "enterWeight", <!-- 入库重量 -->
SUM(ENTER_AMOUNT) as "enterAmount", <!-- 入库金额 -->
SUM(SC_OUTER_QUANTITY) as "scOuterQuantity", <!-- 生产领料数量 -->
SUM(SC_OUTER_WEIGHT) as "scOuterWeight", <!-- 生产领料重量 -->
SUM(SC_OUTER_AMOUNT) as "scOuterAmount", <!-- 生产领料金额 -->
SUM(XS_OUTER_QUANTITY) as "xsOuterQuantity", <!-- 销售出库数量 -->
SUM(XS_OUTER_WEIGHT) as "xsOuterWeight", <!-- 销售出库重量 -->
SUM(XS_OUTER_AMOUNT) as "xsOuterAmount", <!-- 销售出库金额 -->
SUM(QT_OUTER_QUANTITY) as "qtOuterQuantity", <!-- 其它出库数量 -->
SUM(QT_OUTER_WEIGHT) as "qtOuterWeight", <!-- 其它出库重量 -->
SUM(QT_OUTER_AMOUNT) as "qtOuterAmount", <!-- 其它出库数量 -->
SUM(OUTER_QUANTITY) as "outerQuantity", <!-- 出库数量 -->
SUM(OUTER_WEIGHT) as "outerWeight", <!-- 出库重量 -->
SUM(OUTER_AMOUNT) as "outerAmount", <!-- 出库金额 -->
SUM(PD_DIFF_QUANTITY) as "pdDiffQuantity", <!-- 盘点差异数量 -->
SUM(PD_DIFF_WEIGHT) as "pdDiffWeight", <!-- 盘点差异重量 -->
SUM(PD_DIFF_AMOUNT) as "pdDiffAmount", <!-- 盘点差异金额 -->
SUM(END_QUANTITY) as "endQuantity", <!-- 期末数量 -->
SUM(END_WEIGHT) as "endWeight", <!-- 期末重量 -->
SUM(END_AMOUNT) as "endAmount" <!-- 期末金额 -->
FROM ${hggpSchema}.HGCB004 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
......@@ -398,7 +447,48 @@
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
ACCOUNT_PERIOD = DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m')
ACCOUNT_PERIOD = (select DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_PERIOD, WH_CODE, WH_NAME, INVENT_TYPE_DETAIL, INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, SPEC
</select>
<select id="querySum1" parameterClass="java.util.HashMap" resultClass="HGCB004">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "inventRecordId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
UNIT as "unit", <!-- 单位 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC010
WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
......@@ -596,6 +686,7 @@
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
INVENT_RECORD_ID, <!-- 规格ID -->
SPEC,
INIT_QUANTITY, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 -->
INIT_AMOUNT, <!-- 期初金额 -->
......@@ -631,8 +722,8 @@
END_AMOUNT <!-- 期末金额 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #companyCode#, #companyName#, #dateType#, #accountPeriod#, #whCode#, #whName#, #inventType#,#inventTypeDetail#,
#inventCode#, #inventName#, #inventRecordId#, #initQuantity#, #initWeight#, #initAmount#, #cgEnterQuantity#,
#updatedTime#, #companyCode#, #companyName#, #dateType#, #accountPeriod#, #whCode#, #whName#, #inventType#, #inventTypeDetail#,
#inventCode#, #inventName#, #inventRecordId#, #spec#, #initQuantity#, #initWeight#, #initAmount#, #cgEnterQuantity#,
#cgEnterWeight#, #cgEnterAmount#, #scEnterQuantity#, #scEnterWeight#, #scEnterAmount#, #qtEnterQuantity#,
#qtEnterWeight#, #qtEnterAmount#, #enterQuantity#, #enterWeight#, #enterAmount#, #scOuterQuantity#,
#scOuterWeight#, #scOuterAmount#, #xsOuterQuantity#, #xsOuterWeight#, #xsOuterAmount#, #qtOuterQuantity#,
......@@ -671,6 +762,7 @@
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 规格ID -->
SPEC = #spec#,
INIT_QUANTITY = #initQuantity#, <!-- 期初数量 -->
INIT_WEIGHT = #initWeight#, <!-- 期初重量 -->
INIT_AMOUNT = #initAmount#, <!-- 期初金额 -->
......
......@@ -274,12 +274,19 @@
ACCOUNT_CODE as "accountCode",
COMPANY_CODE as "companyCode",
ACCOUNT_YEAR as "accountYear",
MAX(ACCOUNT_PERIOD) as "accountPeriod"
ACCOUNT_PERIOD as "accountPeriod",
ACCOUNT_PERIOD_DATE_START as "accountPeriodDateStart",
ACCOUNT_PERIOD_DATE_END as "accountPeriodDateEnd"
from ${hggpSchema}.HGCW001
where 1=1
<include refid="condition" />
group by
ACCOUNT_CODE, COMPANY_CODE, ACCOUNT_YEAR
where ACCOUNT_PERIOD_STATUS = 0
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_PERIOD = (
select MAX(ACCOUNT_PERIOD) from ${hggpSchema}.HGCW001
where ACCOUNT_CODE = #accountCode#
and COMPANY_CODE = #companyCode#
and ACCOUNT_PERIOD_STATUS = 0
)
</select>
</sqlMap>
......@@ -35,9 +35,8 @@ public class HGCWTools {
public static HGCW001 getMaxAccountPeriod(String companyCode) {
Map<String, Object> params = new HashMap<>();
params.put("companyCode", companyCode);
params.put("accountPeriodStatus",0);
List<HGCW001> list = DaoBase.getInstance().query("HGCW001.getMaxAccountPeriod", params);
AssertUtils.isEmpty(list, "未找到公司对应的会计期");
AssertUtils.isEmpty(list, "未找到公司对应的会计期");
return list.get(0);
}
}
......
......@@ -54,6 +54,7 @@ public class HGKC005 extends DaoEPBase {
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_SUBMIT_STATUS = "submitStatus"; /* 提交状态*/
public static final String FIELD_IS_AMOUNT = "isAmount";
public static final String COL_ID = "ID";
......@@ -94,6 +95,7 @@ public class HGKC005 extends DaoEPBase {
public static final String INSERT = "HGKC005.insert";
public static final String UPDATE = "HGKC005.update";
public static final String DELETE = "HGKC005.delete";
public static final String UPDATE_SUBMIT_STATUS = "HGKC005.updateSubmitStatus";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
......@@ -127,6 +129,7 @@ public class HGKC005 extends DaoEPBase {
private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Integer submitStatus; /* 提交状态*/
/**
* initialize the metadata.
......@@ -287,6 +290,9 @@ public class HGKC005 extends DaoEPBase {
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUBMIT_STATUS);
eiColumn.setDescName("提交状态");
eiMetadata.addMeta(eiColumn);
}
......@@ -809,6 +815,15 @@ public class HGKC005 extends DaoEPBase {
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getSubmitStatus() {
return submitStatus;
}
public void setSubmitStatus(Integer submitStatus) {
this.submitStatus = submitStatus;
}
/**
* get the value from Map.
*
......@@ -849,6 +864,7 @@ public class HGKC005 extends DaoEPBase {
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setSubmitStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SUBMIT_STATUS)), submitStatus));
}
/**
......@@ -890,6 +906,7 @@ public class HGKC005 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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_SUBMIT_STATUS, StringUtils.toString(submitStatus, eiMetadata.getMeta(FIELD_SUBMIT_STATUS)));
return map;
}
......
......@@ -248,6 +248,9 @@ public class ServiceHGKC003 extends ServiceBase {
// 修改库存
HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPrdtCode(),
newKc003.getInvQty(), newKc003.getInvWeight());
//历史单据也要标记退回
fKc003.setIsReturn(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGKC003.UPDATE, fKc003);
}
}
......@@ -9,15 +9,21 @@ import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC005;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.util.*;
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.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
......@@ -126,7 +132,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
if (fKc005.getId() == null || fKc005.getId() == 0) {
this.addData(fKc005);
} else {
// TODO 盘点不支持修改
// 设置基础信息
this.setBaseInfo(fKc005);
DaoUtils.update(HGKC005.UPDATE, fKc005);
}
}
}
......@@ -139,12 +147,10 @@ public class ServiceHGKC005 extends ServiceEPBase {
private void addData(HGKC005 fKc005) {
// 设置基础信息
this.setBaseInfo(fKc005);
fKc005.setSubmitStatus(HGConstant.ProductStatus.WTJ);
// 生成单据号
fKc005.setCheckNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CHECK_NO));
DaoUtils.insert(HGKC005.INSERT, fKc005);
// 修改库存
HGKCTools.updateStock(fKc005.getWhCode(), fKc005.getInventRecordId(),
fKc005.getDiffAmount(), fKc005.getDiffWeight(),fKc005.getCompanyCode(),fKc005.getCompanyName());
}
/**
......@@ -166,6 +172,20 @@ public class ServiceHGKC005 extends ServiceEPBase {
}
/**
* 校验保存的数据
*
* @param fKc005
*/
private void checkSubmitData(HGKC005 fKc005) {
AssertUtils.isEmpty(fKc005.getInventCode(), "存货类型不能为空");
AssertUtils.isEmpty(fKc005.getWhCode(), "仓库名称不能为空");
AssertUtils.isEmpty(fKc005.getInventCode(), "存货名称不能为空");
AssertUtils.isNull(fKc005.getInventRecordId(), "规格不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc005.getBookAmount(), "账面数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc005.getEntityAmount(), "实物重量必须大于0");
}
/**
* 设置基础信息
*
* @param fKc005
......@@ -242,4 +262,40 @@ public class ServiceHGKC005 extends ServiceEPBase {
HGKCTools.updateStock(newKc005);
}
}
/**
* 修改提交状态
* @param inInfo
* @return
*/
public EiInfo updateSubmitStatus(EiInfo inInfo){
int i = 0;
try {
HGKC005 hgkc005 = new HGKC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgkc005.fromMap(map);
hgkc005 = HGKCTools.HgKc005.getId(hgkc005.getId());
hgkc005.setSubmitStatus(HGConstant.ProductStatus.YTJ);
// 校验数据
this.checkSubmitData(hgkc005);
DaoUtils.update(HGKC005.UPDATE_SUBMIT_STATUS, hgkc005);
// //修改计划生产任务完工数量
// HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId(),HGConstant.StorageType.RK);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "提交")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
}
......@@ -147,6 +147,7 @@ public class ServiceHGKC005A extends ServiceEPBase {
newKc005.setRemark(entityRemark);
newKc005.setInventRecordId(dbKc010.getSpecId());
newKc005.setDeleteFlag(CommonConstant.YesNo.NO_0);
newKc005.setSubmitStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC005.INSERT, newKc005);
HGKCTools.updateStock(newKc005);
......
......@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
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;
......@@ -34,9 +35,10 @@ public class ServiceHGKC008 extends ServiceBase {
Map map = new HashMap();
map.put(HGKC008.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),map,false
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BY_ROLE_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),map,false
);
} catch (PlatException e) {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......@@ -45,11 +47,6 @@ public class ServiceHGKC008 extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGKC008.QUERY, new HGKC008());
Map map = new HashMap();
map.put(HGKC008.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
......@@ -273,7 +273,7 @@
WHERE
ID = #id#
</update>
<!--查询月累计入库数据-->
<select id="queryList" resultClass="com.baosight.hggp.hg.kc.domain.HGKC001">
SELECT <include refid="column"/>
FROM ${hggpSchema}.HGKC001
......@@ -288,12 +288,18 @@
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
LEFT(DEPOSIT_DATE,6) = #accountPeriod#
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeFrom">
DEPOSIT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<include refid="orderBy"/>
</select>
......
......@@ -460,6 +460,10 @@
DEP_CODE as "depCode", <!-- 部门编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SUM(INV_QTY) as "invQty", <!-- 数量 -->
SUM(INV_WEIGHT) as "invWeight", <!-- 重量 -->
SUM(AMOUNT) as "amount" <!-- 金额 -->
......@@ -471,8 +475,8 @@
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriod">
LEFT(DEPOSIT_DATE,6) = #accountPeriod#
<isNotEmpty prepend=" AND " property="createdTimeFrom">
DEPOSIT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
......@@ -486,7 +490,7 @@
<isEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = 1
</isEmpty>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, WH_CODE
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, WH_CODE,PRDT_CODE,PRDT_NAME,PRDT_SPEC,INVENT_TYPE_DETAIL
</select>
</sqlMap>
......@@ -250,6 +250,8 @@
a.INVENT_RECORD_ID as "inventRecordId",
a.INVENT_TYPE as "inventType",
a.INVENT_CODE AS "inventCode",
a.SPEC as "spec",
a.INVENT_TYPE_DETAIL as "inventTypeDetail",
COALESCE(SUM(a.QUANTITY), 0) AS "quantity",
COALESCE(SUM(a.WEIGHT), 0) AS "weight",
COALESCE(SUM(a.AMOUNT)) as "amount"
......@@ -264,8 +266,8 @@
<isNotEmpty prepend=" AND " property="whCode">
b.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty property=" AND " prepend="accountPeriod">
LEFT(b.RECEIPT_DATE,6) = #accountPeriod#
<isNotEmpty prepend=" AND " property="createdTimeFrom">
b.RECEIPT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeDetail">
a.INVENT_TYPE_DETAIL = #inventTypeDetail#
......@@ -276,7 +278,7 @@
<isEmpty prepend=" AND " property="submitStatus">
b.STATUS = 1
</isEmpty>
GROUP BY a.ACCOUNT_CODE, a.DEP_CODE, a.COMPANY_CODE, b.WH_CODE, a.INVENT_RECORD_ID, a.INVENT_TYPE, a.INVENT_CODE
GROUP BY a.ACCOUNT_CODE, a.DEP_CODE, a.COMPANY_CODE, b.WH_CODE, a.INVENT_RECORD_ID, a.INVENT_TYPE, a.INVENT_CODE, a.SPEC,a.INVENT_TYPE_DETAIL
</select>
</sqlMap>
<?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"> <!-- table information
Generate time : 2024-06-12 10:57:29
Version : 1.0
schema : hggp
tableName : HGKC005
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
RECEIPT_DATE VARCHAR NOT NULL,
CHECK_NO VARCHAR NOT NULL,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
BOOK_AMOUNT DECIMAL,
BOOK_UNIT_WEIGHT DECIMAL,
BOOK_WEIGHT DECIMAL,
ENTITY_AMOUNT DECIMAL,
ENTITY_UNIT_WEIGHT DECIMAL,
ENTITY_WEIGHT DECIMAL,
DIFF_AMOUNT DECIMAL,
DIFF_WEIGHT DECIMAL,
KC_ID BIGINT,
STATUS TINYINT NOT NULL,
REMARK VARCHAR,
OLD_CHECK_NO VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC005">
<typeAlias alias="HGKC005" type="com.baosight.hggp.hg.kc.domain.HGKC005"/>
......@@ -137,6 +100,9 @@
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="checkNos">
......@@ -191,7 +157,8 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC005 WHERE 1=1
<include refid="condition" />
<include refid="customCondition"/>
......@@ -226,105 +193,6 @@
<include refid="customCondition"/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookAmount">
BOOK_AMOUNT = #bookAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookUnitWeight">
BOOK_UNIT_WEIGHT = #bookUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookWeight">
BOOK_WEIGHT = #bookWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityAmount">
ENTITY_AMOUNT = #entityAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityUnitWeight">
ENTITY_UNIT_WEIGHT = #entityUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityWeight">
ENTITY_WEIGHT = #entityWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffAmount">
DIFF_AMOUNT = #diffAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffWeight">
DIFF_WEIGHT = #diffWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="kcId">
KC_ID = #kcId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="oldCheckNo">
OLD_CHECK_NO = #oldCheckNo#
</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="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC005 (
ACCOUNT_CODE, <!-- 企业编码 -->
......@@ -357,9 +225,10 @@
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 -->
SUBMIT_STATUS <!-- 提交状态 -->
)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #submitStatus#)
</insert>
<delete id="delete">
......@@ -436,4 +305,17 @@
GROUP BY DEP_CODE, COMPANY_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<update id="updateSubmitStatus">
UPDATE ${hggpSchema}.HGKC005
SET
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
SUBMIT_STATUS = #submitStatus# <!-- 提交状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
......@@ -377,7 +377,7 @@
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
B.FIELD_OTHER_ENTER_DATE as "otherEnterDate", <!-- 其他入库日期 -->
B.OTHER_ENTER_DATE as "otherEnterDate", <!-- 其他入库日期 -->
A.OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
A.WH_CODE as "whCode", <!-- 仓库编码 -->
A.WH_NAME as "whName", <!-- 仓库名称 -->
......@@ -424,8 +424,8 @@
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterDate">
LEFT(B.OTHER_ENTER_DATE,6) = #otherEnterDate#
<isNotEmpty prepend=" AND " property="createdTimeFrom">
B.OTHER_ENTER_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
A.OTHER_ENTER_NO = #otherEnterNo#
......
<?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"> <!-- table information
Generate time : 2024-05-24 16:31:28
Version : 1.0
schema : hggp
tableName : HGKC007
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_OUT_DATE VARCHAR,
OTHER_OUT_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
OTHER_OUT_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
SUBMIT_STATUS TINYINT,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGKC007">
<sql id="condition">
......@@ -229,125 +185,6 @@
<update id="check">
UPDATE ${hggpSchema}.HGKC007 SET SUBMIT_STATUS = #submitStatus# WHERE ID = #id#
</update>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</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="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC007 (ID,
......
......@@ -419,8 +419,8 @@
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
B.OTHER_OUT_DATE = #otherOutDate#
<isNotEmpty prepend=" AND " property="createdTimeFrom">
B.OTHER_OUT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
B.OTHER_OUT_NO = #otherOutNo#
......
......@@ -304,8 +304,8 @@
<isNotEmpty prepend=" AND " property="whCode">
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
B.RECEIPT_DATE = #receiptDate#
<isNotEmpty prepend=" AND " property="createdTimeFrom">
B.RECEIPT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="applyCode">
B.APPLY_CODE = #applyCode#
......
......@@ -142,6 +142,32 @@
<include refid="condition"/>
</select>
<select id="querySum" resultClass="com.baosight.hggp.hg.kc.domain.HGKC010">
SELECT
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
INV_QTY as "invQty", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "invWeight", <!-- 库存重量 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC010 (
ACCOUNT_CODE, <!-- 企业编码 -->
......
......@@ -517,6 +517,22 @@ public class HGKCTools {
*/
public static class HgKc005 {
/**
* 库存盘点单信息
*
* @param id
* @return
*/
public static HGKC005 getId(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "库存盘点单id为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put("id", id);
List<HGKC005> list = DaoBase.getInstance().query(HGKC005.QUERY, paramMap);
AssertUtils.isEmpty(list, "库存盘点单为空!");
return list.get(0);
}
/**
* 锁
*
......@@ -673,6 +689,9 @@ public class HGKCTools {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC007.queryCheckList", paramMap);
}
}
public static class HgKc007A {
......
......@@ -279,6 +279,26 @@ public class ServiceHGPZ005 extends ServiceBase {
}
/**
* 下拉框 (不默认状态)
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框(原料、零件、耗材)")
public EiInfo queryInventCodeProdTypeFourBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree());
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ005.FIELD_STATUS,1);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
/**
* 下拉框
*
* @param inInfo
......
......@@ -429,7 +429,6 @@ public class ServiceHGSC004A extends ServiceBase {
public EiInfo updateProductStatus(EiInfo inInfo){
int i = 0;
try {
HGSC004A hgsc004a = new HGSC004A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
String materialId = eiBlock.getCellStr(ACConstants.ROW_CODE_0, HGSC004A.FIELD_material_id);
//获取主表信息
......@@ -442,6 +441,7 @@ public class ServiceHGSC004A extends ServiceBase {
List<HGSC004A> submitEntityList = new LinkedList<>();
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGSC004A hgsc004a = new HGSC004A();
//前端传参不完全,但是肯定有id
hgsc004a.fromMap(map);
Long id = hgsc004a.getId();
......@@ -471,8 +471,11 @@ public class ServiceHGSC004A extends ServiceBase {
});
}
}
//批量勾选时,List中有的则不需要往里放了
HGSC004A filterEntity = hgsc004AList.stream().filter(o -> o.getId().compareTo(entity.getId()) == 0).findAny().orElse(null);
if(Objects.isNull(filterEntity)){
hgsc004AList.add(entity);
DaoUtils.updateBatch(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004AList);
}
}
//全部提交后的操作,如新增的提交、替换的提交
if(hgsc004.getMaterialStatus().intValue() == HGConstant.MaterialStatus.QBTJ){
......@@ -499,7 +502,9 @@ public class ServiceHGSC004A extends ServiceBase {
submitPlanEntity(hgsc004, true,hgsc004AList);
}
}
hgsc004a.setProductStatus(HGConstant.ProductStatus.YTJ);
hgsc004AList.forEach(o->{
o.setProductStatus(HGConstant.ProductStatus.YTJ);
});
DaoUtils.updateBatch(HGSC004A.UPDATE_PRODUCT_STATUS, hgsc004AList);
}
}
......
......@@ -4,9 +4,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC009A;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
......@@ -20,6 +24,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author ZhangJiHui
......@@ -41,7 +46,7 @@ public class ServiceHGSC009 extends ServiceEPBase {
Map userCompany = HGSBTools.getUserCompany();
qarma.put(HGSC009.FIELD_COMPANY_CODE,userCompany.get(HGSC009.FIELD_COMPANY_CODE));
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID),qarma);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BY_ROLE_BLOCK_ID),qarma);
qarma.clear();
List<String> orgIds = HGSBTools.getRoleCompanyCode();
......@@ -143,6 +148,9 @@ public class ServiceHGSC009 extends ServiceEPBase {
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgsc009.fromMap(map);
// 数据校验
this.checkUpdateStatusData(hgsc009);
DaoUtils.update(HGSC009.UPDATE_BLUEPRINT_STATUS, hgsc009);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......@@ -157,7 +165,20 @@ public class ServiceHGSC009 extends ServiceEPBase {
return inInfo;
}
/**
* 校验提交数据
* @param hgsc009
*/
private void checkUpdateStatusData(HGSC009 hgsc009) {
hgsc009 = HGSCTools.THGSC009.getById(hgsc009.getId());
List<HGSC009A> hgsc009AList = HGSCTools.THGSC009.getByPlanMaterialCode(hgsc009.getPlanMaterialCode());
List<Long> materialPlanIds = hgsc009AList.stream().map(HGSC009A::getId).collect(Collectors.toList());
List<HGCG001> hgcg001List = HGCGTools.HgCg001.listByMaterialPlanIds(materialPlanIds);
hgsc009AList.forEach(o->{
HGCG001 hgcg001 = hgcg001List.stream().filter(c -> c.getMaterialPlanId().intValue() == o.getId()).findAny().orElse(null);
AssertUtils.isTrue(Objects.nonNull(hgcg001), String.format("材料计划[%s]已生成采购计划", o.getPlanMaterialCode()));
});
}
}
......@@ -217,7 +217,7 @@ public class ServiceHGSC009A extends ServiceBase {
public EiInfo insertcg(EiInfo inInfo) {
try {
String[] orderDetailIds = inInfo.getString("planMaterialCodes").split(",");
List<HGSC009A> hgsc009AList = HGSCTools.HGSC009.getById(orderDetailIds);
List<HGSC009A> hgsc009AList = HGSCTools.THGSC009.getByPlanMaterialCodes(orderDetailIds);
List<String> inventCodes = Optional.ofNullable(hgsc009AList).orElse(new ArrayList<>()).stream().map(HGSC009A::getInventCode).collect(Collectors.toList());
Map<String,String> inventUnitMap = new HashMap<>();
if(CollectionUtils.isNotEmpty(inventCodes)){
......
......@@ -1185,7 +1185,7 @@ public class HGSCTools {
}
public static class HGSC009{
public static class THGSC009{
/* public static void generatorOrder(List<HGSC005> hgsc005List, List<HGSC005A> hgsc005AList){
Map<String, Optional<HGSC005>> hgsc005Map = hgsc005List.stream().collect(Collectors.groupingBy(HGSC005::getPlanCode,Collectors.maxBy(
Comparator.comparingLong(HGSC005::getId))));
......@@ -1211,11 +1211,24 @@ public class HGSCTools {
hgsc006.setAssignStatus(UNASSIGN.getCode());
return hgsc006;
}*/
public static HGSC009 getById(Long taskId){
AssertUtils.isTrue(Objects.isNull(taskId)||taskId<=0, "材料计划ID不能为空!");
HGSC009 results = (HGSC009)DaoBase.getInstance().get(HGSC009.QUERY, HGSC009.FIELD_ID, taskId);
return results;
}
public static List<HGSC009A> getByPlanMaterialCodes(String[] planMaterialCodes){
AssertUtils.isTrue(Objects.isNull(planMaterialCodes)||planMaterialCodes.length<=0, "材料计划编码不能为空!");
Map map = new HashMap<>();
map.put("planMaterialCodes",planMaterialCodes);
List<HGSC009A> results = DaoBase.getInstance().query(HGSC009A.QUERYList, map);
AssertUtils.isEmpty(results,"材料明细不能为空!");
return results;
}
public static List<HGSC009A> getById(String[] orderDetailId){
AssertUtils.isTrue(Objects.isNull(orderDetailId)||orderDetailId.length<=0, "订单明细ID不能为空!");
public static List<HGSC009A> getByPlanMaterialCode(String planMaterialCode){
AssertUtils.isTrue(StringUtils.isBlank(planMaterialCode), "材料计划编码不能为空!");
Map map = new HashMap<>();
map.put("planMaterialCodes",orderDetailId);
map.put("planMaterialCode",planMaterialCode);
List<HGSC009A> results = DaoBase.getInstance().query(HGSC009A.QUERYList, map);
AssertUtils.isEmpty(results,"材料明细不能为空!");
return results;
......
......@@ -77,6 +77,7 @@ public class ServiceHGZL004 extends ServiceBase {
DaoUtils.update(HGZL004.UPDATE,o);
break;
case PROCESSING:
DaoUtils.update(HGZL004.UPDATE,o);
break;
case PROCESSED:
AssertUtils.isTrue(true,String.format("检查单号[%s]已处理完成,不能修改!"));
......
......@@ -13,6 +13,7 @@
<sqlMap resource="com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"/>
<!--成本-->
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB003.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cb/sql/HGCB004.xml"/>
......
......@@ -57,7 +57,7 @@ $(function (){
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "price") {
let items = e.items[0];
let items = e.items;
for (let i = 0; i < items.length; i++) {
let amount = items[i].price * items[i].quantity;
resultGrid.setCellValue(e.items[i],"amount",amount);
......@@ -154,26 +154,28 @@ function showDetail(id) {
JSColorbox.open({
href: "HGCB002A?methodName=initLoad",
title: "<div style='text-align: center;'>选择公司</div>",
width: "60%",
height: "60%",
width: "30%",
height: "45%",
callbackName: windowCallback
});
}
function windowCallback(companyCode) {
synchData(companyCode);
function windowCallback(item) {
synchData(item);
// 关闭弹窗
JSColorbox.close();
// 刷新列表
query();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let synchData = function (item) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
info.set("inqu_status-0-companyCode", item.companyCode);
info.set("inqu_status-0-accountYear", item.accountYear);
info.set("inqu_status-0-accountPeriod", item.accountPeriod);
info.set("inqu_status-0-createdTimeFrom", item.accountPeriodDateStart);
info.set("inqu_status-0-createdTimeTo", item.accountPeriodDateEnd);
EiCommunicator.send("HGCB002", "select", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
......@@ -182,6 +184,8 @@ let synchData = function (companyCode) {
} else {
NotificationUtil(ei);
}
// 刷新列表
query();
} else {
NotificationUtil(ei, "error");
}
......
......@@ -24,7 +24,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="bizType" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFSelect>
......@@ -37,7 +37,7 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<EF:EFComboColumn ename="companyCode" cname="公司名称" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
......@@ -45,30 +45,30 @@
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="true" align="center" required="true">
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']" required="true"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="false" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date" enable="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="140" align="center" required="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" enable="false" readonly="true" align="center" required="true"/>
<%--<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="unit" cname="单位" width="100" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="unit" cname="单位" width="100" enable="false" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
......@@ -76,7 +76,7 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="computeType" cname="是否暂估" width="100" enable="true" align="center" required="true">
<EF:EFComboColumn ename="isEstimate" cname="是否暂估" width="100" enable="false" align="center" required="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
......
$(function() {
let companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
$(".row").children().attr("class", "col-md-3");
$("#CONFIRM").on("click", function () {
confirm();
});
});
/**
* 确认
*/
let confirm = function () {
let companyCode = $("#inqu_status-0-companyCode").val();
if (companyCode.length < 1) {
message("请选择公司");
return;
}
parent.JSColorbox.setValueCallback(companyCode);
let hgcw001 = queryHgcw001(companyCode);
let companyName;
let accountPeriod = hgcw001[0].accountPeriod;
for (let i = 0; i <companyCodeBox.length ; i++) {
if (companyCodeBox[i].companyCode == hgcw001[0].companyCode) {
companyName = companyCodeBox[i].companyName;
break;
}
}
JSUtils.confirm("确定要对[" + companyName + " 会计期"+accountPeriod+"]做\"数据同步\"操作? ", {
ok: function () {
parent.JSColorbox.setValueCallback(hgcw001[0]);
}
});
});
});
let queryHgcw001 = function (companyCode){
var hgcw001_block_id =[];
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB002", "selectAll", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
hgcw001_block_id = ei.getBlock("hgcw001_block_id").getMappedRows();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
},{async: false});
return hgcw001_block_id;
}
\ No newline at end of file
$(function (){
var companyCodeBox = __eiInfo.getBlock("company_code_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_code_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", function (e) {
query();
})
$("#SYNC").on("click", function () {
showDetail();
});
IPLATUI.EFGrid= {
"result": {
pageable: {
......@@ -37,7 +44,7 @@ $(function (){
exportGrid: {
exportFileName: function (gridInstance) {
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return "原材料库成本核算_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
return "原材料库成本核算_" + kendo.toString(new Date(), IPLAT.FORMAT.DATE_14_PR);
},
exportFileType: "xls", // 默认值是xls,可选值为pdf[规划中]
exportBlockId: "result", // 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
......@@ -146,27 +153,29 @@ function showDetail(id) {
JSColorbox.open({
href: "HGCB002A?methodName=initLoad",
title: "<div style='text-align: center;'>选择公司</div>",
width: "60%",
height: "60%",
width: "30%",
height: "45%",
callbackName: windowCallback
});
}
function windowCallback(companyCode) {
synchData(companyCode);
function windowCallback(item) {
synchData(item);
// 关闭弹窗
JSColorbox.close();
// 刷新列表
query();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let synchData = function (item) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB004", "synchData", info, {
info.set("inqu_status-0-companyCode", item.companyCode);
info.set("inqu_status-0-accountYear", item.accountYear);
info.set("inqu_status-0-accountPeriod", item.accountPeriod);
info.set("inqu_status-0-createdTimeFrom", item.accountPeriodDateStart);
info.set("inqu_status-0-createdTimeTo", item.accountPeriodDateEnd);
EiCommunicator.send("HGCB003", "select", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
......@@ -174,6 +183,8 @@ let synchData = function (companyCode) {
} else {
NotificationUtil(ei);
}
// 刷新列表
query();
} else {
NotificationUtil(ei, "error");
}
......
......@@ -22,11 +22,11 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
......@@ -37,38 +37,38 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%>
<EF:EFComboColumn ename="companyCode" cname="公司名称" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="true" align="center" required="true">
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="false" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date" enable="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="false" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="false" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="false" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="true" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="unit" cname="单位" width="80" enable="false" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
......@@ -76,8 +76,8 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="computeType" cname="是否暂估" width="80" enable="true" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
<EF:EFComboColumn ename="isEstimate" cname="是否暂估" width="80" enable="false" align="center" hidden="true" required="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="100" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
......
$(function (){
$(".row").children().attr("class", "col-md-3");
$("#QUERY").on("click", function (e) {
query();
})
IPLATUI.EFGrid= {
"result": {
pageable: {
......@@ -97,18 +101,22 @@ function showDetail() {
});
}
function windowCallback(companyCode) {
synchData(companyCode);
function windowCallback(item) {
synchData(item);
JSColorbox.close();
}
/**
* 确认
*/
let synchData = function (companyCode) {
let synchData = function (item) {
let info = new EiInfo();
info.set("inqu_status-0-companyCode", companyCode);
EiCommunicator.send("HGCB004", "synchData", info, {
info.set("inqu_status-0-companyCode", item.companyCode);
info.set("inqu_status-0-accountYear", item.accountYear);
info.set("inqu_status-0-accountPeriod", item.accountPeriod);
info.set("inqu_status-0-createdTimeFrom", item.accountPeriodDateStart);
info.set("inqu_status-0-createdTimeTo", item.accountPeriodDateEnd);
EiCommunicator.send("HGCB004", "select", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
......
......@@ -22,14 +22,15 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="whName" cname="仓库名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
......@@ -38,31 +39,33 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<%--<EF:EFComboColumn ename="whCode" cname="仓库名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>--%>
<EF:EFColumn ename="whName" cname="仓库名称" width="140" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="物料编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="物料名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
<EF:EFColumn ename="spec" cname="规格" width="120" enable="true" readonly="true" align="center" required="true"/>
<%--<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="80" enable="true" readonly="false" type="hidden" align="center"/>
</EF:EFComboColumn>--%>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="80" enable="true" readonly="false" hidden="true" align="center"/>
<EF:EFColumn ename="initQuantity" cname="期初数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
......
......@@ -64,34 +64,10 @@ $(function () {
supCodeChange(e);
var item = e.items[0];
if (e.field == "price") {
if(item.purQty && item.price && item.taxRate){
// 数量*单价金额
let totalAmount = item.purQty * item.price;
//税额
let taxAmount = totalAmount * item.taxRate / 100;
//不含税金额
let amount = totalAmount - taxAmount;
//含税金额
let taxIncludeAmount = amount + taxAmount;
resultGrid.setCellValue(item, 'taxAmount', taxAmount)
resultGrid.setCellValue(item, 'amount', amount)
resultGrid.setCellValue(item, 'taxIncludeAmount', taxIncludeAmount)
}
calAmount(item);
}
if (e.field == "taxRate") {
if(item.purQty && item.price && item.taxRate){
// 数量*单价金额
let totalAmount = item.purQty * item.price;
//税额
let taxAmount = totalAmount* item.taxRate / 100;
//不含税金额
let amount = totalAmount - taxAmount;
//含税金额
let taxIncludeAmount = amount + taxAmount;
resultGrid.setCellValue(item, 'taxAmount', taxAmount)
resultGrid.setCellValue(item, 'amount', amount)
resultGrid.setCellValue(item, 'taxIncludeAmount', taxIncludeAmount)
}
calAmount(item);
}
});
},
......@@ -115,6 +91,47 @@ $(function () {
downKeyUp();
});
/**
* 计算金额
* @param item
* @param length
* @param width
* @param thick
* @param coefficient
*/
let calAmount = function (item) {
//原材料
if(item.inventTypeDetail === '3'){
if(item.purWeight && item.price && item.taxRate){
// 重量*单价金额
let totalAmount = item.purWeight * item.price;
//不含税金额
let amount = totalAmount / (1 + item.taxRate / 100);
//税额
let taxAmount = totalAmount - amount;
//含税金额
let taxIncludeAmount = totalAmount;
resultGrid.setCellValue(item, 'taxAmount', taxAmount)
resultGrid.setCellValue(item, 'amount', amount)
resultGrid.setCellValue(item, 'taxIncludeAmount', taxIncludeAmount)
}
}else{
if(item.purQty && item.price && item.taxRate){
// 数量*单价金额
let totalAmount = item.purQty * item.price;
//不含税金额
let amount = totalAmount / (1 + item.taxRate / 100);
//税额
let taxAmount = totalAmount - amount;
//含税金额
let taxIncludeAmount = totalAmount;
resultGrid.setCellValue(item, 'taxAmount', taxAmount)
resultGrid.setCellValue(item, 'amount', amount)
resultGrid.setCellValue(item, 'taxIncludeAmount', taxIncludeAmount)
}
}
}
/**
* 页面加载时执行
......
......@@ -83,6 +83,8 @@
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型明细" enable="false" width="100" align="center" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -66,7 +66,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="applyQty" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="applyWeight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="applyWeight" cname="总重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="oldReqNo" cname="原领料单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/>
......
......@@ -56,12 +56,12 @@
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="false"
enable="false"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
enable="false"/>
<EF:EFColumn ename="invWeight" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(KG)" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
......
......@@ -38,7 +38,7 @@
hidden="true"/>
<EF:EFColumn ename="unCompleteNum" cname="待入库数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="num" cname="任务数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="totalWt" cname="任务重量(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="任务重量(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="150" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prdtCode" cname="物料编码" enable="false" width="120" align="center" hidden="true"/>
......
......@@ -29,8 +29,8 @@
<EF:EFColumn ename="prdtWidth" cname="宽度(MM)" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="prdtThick" cname="厚度(MM)" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invQty" cname="数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="price" cname="单价" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="120" align="right" format="{0:N3}"/>
</EF:EFGrid>
......
......@@ -53,7 +53,7 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="100" enable="true" readonly="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="100" enable="true" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......
let whNameGlobalData = [];
let inventNameGlobalData = [];
let specGlobalData = [];
$(function() {
whNameGlobalData = __eiInfo.getBlock("wh_record_block_id").getMappedRows();
inventNameGlobalData = __eiInfo.getBlock("invent_record_block_id").getMappedRows();
specGlobalData = __eiInfo.getBlock("spec_record_block_id").getMappedRows();
IPLATUI.EFGrid = {
pageable: {
pageSize: 20,
......@@ -21,7 +13,22 @@ $(function() {
// save: true, // 不显示保存按钮
// delete: true, // 显示删除按钮
},*/
columns: [{
columns: [
{
field: "operator",
title: "操作",
template: function (item) {
let status = item.submitStatus;
let template = '';
if (item.id){
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateSubmitStatus(' + item.id + ')" >提交</a>';
}
}
return template;
}
},{
field: "receiptDate",
attributes: {
class: "i-input-readonly"
......@@ -29,65 +36,6 @@ $(function() {
defaultValue: function () {
return currShortDate();
}
}, {
field: "whCode",
template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return whNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}, {
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryMaterialComboBox");
inInfo.set("blockId", "material_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}, {
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < specGlobalData.length; i++) {
if (specGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return specGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBoxSpec");
inInfo.set("blockId", "invent_spec_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
loadComplete: function (grid) {
},
......@@ -116,67 +64,77 @@ $(function() {
* 页面加载时执行
*/
$(window).load(function () {
// 仓库名称
//initWh()
// 存货名称
//initInvent()
// 规格
//initSpec()
// 查询
query();
//存货编号
initInventCode();
});
/**
* 初始化仓库
* 提交
* @param id
* @param status
*/
let initWh = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ007", "queryComboBox", inInfo, {
function updateSubmitStatus(id) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
JSUtils.confirm("确定提交此库存盘点单吗? ", {
ok: function () {
EiCommunicator.send('HGKC005', 'updateSubmitStatus', inEiInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}, {async: false});
}
);
}
});
}
/**
* 初始化存货
* 存货编号
*/
let initInvent = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
let initInventCode = function () {
//物料信息下拉
var inInfo=new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
let dataSource;
var input=$("#inqu_status-0-inventCode");
dataSource=ei.getBlock("invent_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "valueField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataSource,
template: "[#:valueField#]#:textField#|#:param2Field#",
filter: "contains"
});
}, onFail: function (ei) {
}
}, {async: false});
}
/**
* 初始化规格
*/
let initSpec = function () {
let inInfo = new EiInfo();
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryComboBoxAll", inInfo, {
onSuccess: function (ei) {
specGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
}
/**
* 查询
......
......@@ -28,24 +28,24 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%-- <EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">--%>
<%-- <EF:EFOption label="全部" value=""/>--%>
<%-- <EF:EFOptions blockId="spec_record_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" colWidth="3"/>
</div>
......@@ -54,6 +54,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="100" enable="false" readonly="false"/>
<EF:EFColumn ename="checkNo" cname="盘点单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
......@@ -68,28 +69,30 @@
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" readonly="true" width="120" align="center"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="true" readonly="true" width="120" align="center"
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(T)" enable="false" format="{0:N3}" maxLength="20" width="120"
sumType="all" required="true" enable="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量(T)" enable="false" format="{0:N3}" maxLength="20" width="120"
sumType="all" required="true" enable="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="diffAmount" cname="差异数量" enable="false" format="{0:N0}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="diffWeight" cname="差异重量(T)" enable="false" format="{0:N3}" maxLength="20" width="120"
<EF:EFColumn ename="diffWeight" cname="差异重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" />
<EF:EFColumn ename="oldCheckNo" cname="原盘点单号" enable="false" hidden="true" width="140" align="center"/>
<EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量</span>
......
......@@ -66,7 +66,6 @@ let select = function () {
}
for (let i = 0; i < rows.length; i++) {
let entityAmount = rows[i]['entityAmount'];
let amount = rows[i]['amount'];
if (!isPositiveInteger(entityAmount)) {
message("勾选的第" + (i + 1) + "行实物数量必须是大于0的整数");
return;
......
......@@ -51,12 +51,12 @@
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="entityAmount" cname="实物数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" width="120" align="right" format="{0:N0}" hidden="true" defaultValue="0"/>
<EF:EFColumn ename="entityRemark" cname="盘点说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="invUnitWeight" cname="库存单重(KG)" enable="false" width="120" align="right" format="{0:N0}" hidden="true"/>
<EF:EFColumn ename="invWeight" cname="库存重量(KG)" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="invUnitWeight" cname="库存单重(KG)" enable="false" width="120" align="right" format="{0:N0}" hidden="true"/>
<EF:EFColumn ename="invWeight" cname="库存重量(KG)" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150" hidden="true"/>
</EF:EFGrid>
......
......@@ -21,11 +21,11 @@ $(function () {
if(item.inventCode){
for(let i=0;i<inventRecordBoxBlocks.length;i++){
if(item.inventCode === inventRecordBoxBlocks[i]['valueField']){
template = inventRecordBoxBlocks[i]['valueField'];
return inventRecordBoxBlocks[i]['valueField'];
}
}
}
return template;
return item.inventCode;
},
editor: function (container, options) {
var input = $('<input />');
......@@ -51,11 +51,11 @@ $(function () {
if(item.partSpec){
for(let i=0;i<specBoxBlocks.length;i++){
if(item.partSpec === specBoxBlocks[i]['valueField']){
template = specBoxBlocks[i]['valueField'];
return specBoxBlocks[i]['valueField'];
}
}
}
return template;
return item.partSpec;
},
editor: function (container, options) {
var input = $('<input />');
......
......@@ -58,12 +58,12 @@
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="true"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
enable="false"/>
<EF:EFColumn ename="invWeight" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(KG)" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
......
......@@ -49,12 +49,12 @@
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="true"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
enable="false"/>
<EF:EFColumn ename="invWeight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
......
$(function (){
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var projCodes = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var companyCodes = __eiInfo.getBlock("roleCompany").getMappedRows();
var projCodes = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
var whRecordBoxBlocks = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3");
......@@ -42,8 +42,9 @@ $(function (){
field: "companyCode",
template: function (dataItem) {
for (let i = 0; i < companyCodes.length; i++) {
if (companyCodes[i]['valueField'] === dataItem['companyCode']){
return companyCodes[i]['textField'];
if (companyCodes[i]['companyCode'] === dataItem['companyCode']){
dataItem['companyName'] = companyCodes[i]['companyName']
return companyCodes[i]['companyName'];
}
}
return dataItem["companyCode"];
......@@ -59,7 +60,7 @@ $(function (){
}
}
}
return template;
return item.projCode;
},
editor: function (container, options) {
let inInfo = new EiInfo();
......@@ -69,7 +70,7 @@ $(function (){
let dataSource;
EiCommunicator.send("HGSC003", "projComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("proj_record_block_id").getMappedRows();
dataSource = ei.getBlock("projRecordByRole_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -100,7 +101,7 @@ $(function (){
}
}
}
return template;
return item.whCode;
},
editor: function (container, options) {
var input = $('<input />');
......
......@@ -45,7 +45,7 @@
<EF:EFColumn ename="invWidth" cname="宽度(MM)" width="120" align="center" enable="false"/>
<EF:EFColumn ename="invThick" cname="厚度(MM)" width="120" align="center" enable="false"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}" enable="true" required="true" />
<EF:EFColumn ename="invUnitWeight" cname="单重" width="100" enable="false" readonly="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" width="100" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......
......@@ -53,39 +53,39 @@
</EF:EFComboColumn>
<EF:EFColumn ename="initAmount" cname="期初数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="initWeight" cname="期初重量(T)" enable="false" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="initWeight" cname="期初重量(KG)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="cgEnterAmount" cname="采购入库数量" enable="false" width="100" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量(T)" enable="false" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="cgEnterWeight" cname="采购入库重量(KG)" enable="false" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtEnterAmount" cname="其它入库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="qtEnterWeight" cname="其它入库重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="enterAmount" cname="入库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="enterWeight" cname="入库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="enterWeight" cname="入库重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="scOuterAmount" cname="生产领料数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="scOuterWeight" cname="生产领料重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="qtOuterAmount" cname="其它出库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="qtOuterWeight" cname="其它出库重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="outerAmount" cname="出库数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="outerWeight" cname="出库重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="outerWeight" cname="出库重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="pdDiffAmount" cname="盘点差异数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="pdDiffWeight" cname="盘点差异重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="endAmount" cname="期末数量" enable="false" width="90" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="endWeight" cname="期末重量(T)" enable="false" width="90" align="right" format="{0:N3}"
<EF:EFColumn ename="endWeight" cname="期末重量(KG)" enable="false" width="90" align="right" format="{0:N3}"
sumType="all"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -49,8 +49,8 @@
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
......
......@@ -43,8 +43,8 @@
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="invQty" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(T)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="总重(KG)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
......@@ -64,7 +64,7 @@
<EF:EFColumn ename="unit" cname="单位" enable="false" width="120" align="center"/>
<EF:EFColumn ename="warnNum" cname="预警值" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invWeight" cname="库存重量(T)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存重量(KG)" enable="false" width="90" align="right" format="{0:N3}"/>
<%--<EF:EFComboColumn ename="princ" cname="仓库负责人" width="120" align="center" enable="false"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" filter="contains" />--%>
......
......@@ -54,7 +54,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -58,11 +58,11 @@
<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="quantity" required="true" cname="数量"/>
<EF:EFColumn ename="singleWeight" cname="单重(kg)" width="100" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="totalWeight" cname="总重(kg)" width="100" enable="false" readonly="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="totalWeight" cname="总重(KG)" width="100" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
......
......@@ -25,8 +25,8 @@
<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="quantity" required="false" cname="数量" enable="false" />
<EF:EFColumn ename="singleWeight" required="false" format="{0:N3}" cname="单重(kg)" enable="false"/>
<EF:EFColumn enable="true" required="false" format="{0:N3}" ename="totalWeight" cname="总重(kg)"/>
<EF:EFColumn ename="singleWeight" required="false" format="{0:N3}" cname="单重(KG)" enable="false"/>
<EF:EFColumn enable="true" required="false" format="{0:N3}" ename="totalWeight" cname="总重(KG)"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -38,10 +38,10 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="计划重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishWeight" cname="完成重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishWeight" cname="未完成重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="计划重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishWeight" cname="完成重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishWeight" cname="未完成重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="quantity" cname="计划数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishQuantity" cname="完成数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完成数量" width="120" enable="true" align="center" readOnly="true"/>
......
......@@ -40,10 +40,10 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" />
<EF:EFColumn ename="singleWeight" cname="单重(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="订单重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignWeight" cname="派工重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignWeight" cname="待派工重量(kg)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="totalWeight" cname="订单重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignWeight" cname="派工重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignWeight" cname="待派工重量(KG)" format="{0:0.00}" editType="text" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="quantity" cname="订单数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="assignQuantity" cname="派工数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unassignQuantity" cname="待派工数量" width="120" enable="true" align="center" readOnly="true"/>
......
......@@ -25,12 +25,12 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-planEndDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-singleWeight" cname="单量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWeight" cname="订单重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-singleWeight" cname="单量(KG)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWeight" cname="订单重量(KG)" format="{0:0.00}" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignWeight" cname="派工重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignWeight" cname="待派工重量(kg)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-assignWeight" cname="派工重量(KG)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignWeight" cname="待派工重量(KG)" format="{0:0.00}" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-quantity" cname="订单数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
......
......@@ -47,10 +47,10 @@
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishQuantity" cname="完工数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完工数量" width="100" enable="false" readonly="true" align="center"/>
......
......@@ -14,7 +14,7 @@
<EF:EFInput ename="result-0-processName" cname="工序" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-singleWeight" cname="单重" colWidth="4" format="{0:0.00}" editType="text" readonly="true"/>
<EF:EFInput ename="result-0-singleWeight" cname="单重(KG)" colWidth="4" format="{0:0.00}" editType="text" readonly="true"/>
<EF:EFInput ename="result-0-taskQuantity" cname="任务数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-taskWeight" cname="任务重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div>
......
......@@ -37,8 +37,8 @@
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var groupCodeBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var groupCodeBox = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
......@@ -65,7 +65,7 @@ $(function () {
let dataSource;
EiCommunicator.send("HGSC003", "projComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("proj_record_block_id").getMappedRows();
dataSource = ei.getBlock("projRecordByRole_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -232,7 +232,7 @@ function INSERTCG() {
});
if(flag) {
inEiInfo.set("planMaterialCodes",ids.join(','));
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"生成采购计划\"操作? ", {
ok: function () {
EiCommunicator.send('HGSC009A', 'insertcg', inEiInfo, {
onSuccess(response) {
......
......@@ -25,7 +25,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司编码"
......
......@@ -11,11 +11,6 @@ $(function () {
},
columns: [{
field: "inventCode",
filter: function (options) {
return _.filter(inventAllBlockId, function (item) {
return item["param1Field"] == "true";
})
},
template: function (item) {
let template = "";
if(item.inventCode){
......@@ -31,10 +26,9 @@ $(function () {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-isSplicingSymbol", true);
inInfo.set("field", options.field);
let dataSource = inventRecordBoxBlockId;
EiCommunicator.send("HGPZ005", "queryInventCodeBox", inInfo, {
EiCommunicator.send("HGPZ005", "queryInventCodeProdTypeFourBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_record_box_block_id").getMappedRows();
},
......
......@@ -56,11 +56,11 @@
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" enable="false"/>
<EF:EFColumn ename="grossAmount" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="grossAmount" cname="总重(KG)" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
......
......@@ -96,7 +96,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -94,11 +94,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -51,11 +51,11 @@
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consUnitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
<EF:EFColumn ename="consUnitWeight" cname="单重(KG)" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consWeight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="consWeight" cname="重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -93,11 +93,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" hidden="true" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="false" format="{0:N3}" hidden="true" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="发货重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="发货重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......@@ -105,7 +105,7 @@
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
<EF:EFColumn ename="returnWeight" cname="退货重量(KG)" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
......
......@@ -83,11 +83,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......@@ -95,7 +95,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="returnWeight" cname="退货重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
......@@ -52,11 +52,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量(KG)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......@@ -64,7 +64,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
<EF:EFColumn ename="returnWeight" cname="退货重量(KG)" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -5,7 +5,7 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="质量巡检单">
<EF:EFPage title="入库质检单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="receiptDate" blockId="inqu_status" row="0" colWidth="3"
......
......@@ -43,10 +43,10 @@
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重(KG)" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishQuantity" cname="完工数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完工数量" width="100" enable="false" readonly="true" align="center"/>
......
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