Commit 1647b8b5 by 宋祥

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

# Conflicts:
#	src/main/webapp/HP/SC/HPSC005.js
#	src/main/webapp/HP/SC/HPSC005.jsp
parents b1dff5cd 006296a5
......@@ -9,12 +9,13 @@ import java.util.*;
* @Date 2024/1/10 14:29
*/
public enum InventTypeEnum {
MATERIAL(1,"原材料"),
RAW(1,"原料"),
CONSUMABLE(2,"耗材"),
SEMI_FINISHED_PRODUCT(3,"零部件"),
FINISHED_PRODUCT(4,"部件"),
WASTE(5,"废料"),
OTHER(6,"其他");
OTHER(6,"其他"),
MATERIAL(7,"材料");
private Integer code;
......
......@@ -392,7 +392,7 @@ public class HPBI001 extends DaoEPBase {
* @param novValue
*/
public void setnovValue(String novValue) {
this.octValue = novValue;
this.novValue = novValue;
}
/**
......@@ -409,7 +409,7 @@ public class HPBI001 extends DaoEPBase {
* @param decValue
*/
public void setdecValue(String decValue) {
this.octValue = decValue;
this.decValue = decValue;
}
/**
......
......@@ -7,6 +7,7 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.bi.domain.HPBI001;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.*;
......@@ -31,7 +32,7 @@ public class ServiceHPBI001 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......@@ -40,9 +41,18 @@ public class ServiceHPBI001 extends ServiceBase {
* @param inInfo
* @return
*/
/* public EiInfo initLoad(EiInfo inInfo) {
return query(inInfo);
}*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), queryMap);
//inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
......
......@@ -59,7 +59,7 @@
'' AS DATE
FROM DUAL
UNION ALL
SELECT '人均产量(kg)' AS INDNAME,'' AS DAYVALUE,
SELECT '人均产量(kg)' AS INDNAME,111 AS DAYVALUE,
14 AS MONVALUE, 14 AS YEARVALUE,
14 AS JANVALUE, 14 AS FEBVALUE,
14 AS MARVLAUE, 14 AS APRVALUE,
......@@ -72,12 +72,12 @@
FROM DUAL
) A
WHERE 1=1
<isNotEmpty prepend=" AND " property="factory">
<!-- <isNotEmpty prepend=" AND " property="factory">
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
</isNotEmpty>-->
<!-- <isNotEmpty prepend=" AND " property="date">
DATE = #date#
</isNotEmpty>
</isNotEmpty>-->
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
INDNAME desc
......@@ -102,12 +102,12 @@
SELECT '人均日产' AS SERIES,'585kg' AS VALUE,NULL AS FACTORY,NULL AS DATE, 5 AS SORT FROM DUAL
) A
WHERE 1=1
<isNotEmpty prepend=" AND " property="factory">
<!-- <isNotEmpty prepend=" AND " property="factory">
FACTORY LIKE CONCAT('%',CONCAT( #factory#,'%'))
</isNotEmpty>
<isNotEmpty prepend=" AND " property="date">
DATE = #date#
</isNotEmpty>
</isNotEmpty>-->
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
SORT asc
......
......@@ -44,7 +44,7 @@ public class HPKC001 extends DaoEPBase {
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_REMARKS = "remarks"; /* 备注*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String COL_ID = "ID"; /* 主键id*/
......@@ -66,7 +66,7 @@ public class HPKC001 extends DaoEPBase {
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案ID*/
public static final String COL_AMOUNT = "AMOUNT"; /* 数量*/
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_REMARKS = "REMARKS"; /* 备注*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPKC001.query";
......@@ -95,7 +95,7 @@ public class HPKC001 extends DaoEPBase {
private Long inventRecordId = new Long(0); /* 存货档案ID*/
private BigDecimal amount = new BigDecimal("0"); /* 数量*/
private BigDecimal weight = new BigDecimal("0"); /* 重量*/
private String remarks = " "; /* 备注*/
private String remark = " "; /* 备注*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
/**
......@@ -191,7 +191,7 @@ public class HPKC001 extends DaoEPBase {
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARKS);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
......@@ -531,20 +531,20 @@ public class HPKC001 extends DaoEPBase {
this.weight = weight;
}
/**
* get the remarks - 备注.
* @return the remarks
* get the remark - 备注.
* @return the remark
*/
public String getRemarks() {
return this.remarks;
public String getRemark() {
return this.remark;
}
/**
* set the remarks - 备注.
* set the remark - 备注.
*
* @param remarks - 备注
* @param remark - 备注
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the deleteFlag - 是否删除0.否1.是.
......@@ -590,7 +590,7 @@ public class HPKC001 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARKS)), remarks));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
}
......@@ -621,7 +621,7 @@ public class HPKC001 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_REMARKS, StringUtils.toString(remarks, eiMetadata.getMeta(FIELD_REMARKS)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map;
......
......@@ -32,9 +32,15 @@ public class HPKC006 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_INVENT_RECORD_ID = "inventRecordId"; /* 规格*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案ID*/
public static final String FIELD_AMOUNT = "amount"; /* 数量*/
public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
public static final String FIELD_MATERIAL = "material"; /* 材质*/
public static final String FIELD_COEFFICIENT = "coefficient"; /* 系数*/
public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_STATUS = "status"; /* 状态 0提交 1保存*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_OLD_ENTER_NO = "oldEnterNo"; /* 原入库单号*/
......@@ -90,6 +96,12 @@ public class HPKC006 extends DaoEPBase {
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
private Integer status = new Integer(0); /* 状态 0提交 1保存*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.00); /* 系数*/
private String unit = " "; /* 单位*/
private String remark = " "; /* 备注*/
private String oldEnterNo = " "; /* 原入库单号*/
private String createdBy = " "; /* 创建人*/
......@@ -165,6 +177,42 @@ public class HPKC006 extends DaoEPBase {
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WIDTH);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THICK);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MATERIAL);
eiColumn.setDescName("材质");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COEFFICIENT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("系数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT);
eiColumn.setDescName("单位");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态 0提交 1保存");
eiMetadata.addMeta(eiColumn);
......@@ -424,6 +472,102 @@ public class HPKC006 extends DaoEPBase {
this.weight = weight;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the material - 材质.
* @return the material
*/
public String getMaterial() {
return this.material;
}
/**
* set the material - 材质.
*
* @param material - 材质
*/
public void setMaterial(String material) {
this.material = material;
}
/**
* get the coefficient - 系数.
* @return the coefficient
*/
public BigDecimal getCoefficient() {
return this.coefficient;
}
/**
* set the coefficient - 系数.
*
* @param coefficient - 系数
*/
public void setCoefficient(BigDecimal coefficient) {
this.coefficient = coefficient;
}
/**
* get the unit - 单位.
* @return the unit
*/
public String getUnit() {
return this.unit;
}
/**
* set the unit - 单位.
*
* @param unit - 单位
*/
public void setUnit(String unit) {
this.unit = unit;
}
/**
* get the status - 状态 0提交 1保存.
* @return the status
*/
......@@ -604,6 +748,12 @@ public class HPKC006 extends DaoEPBase {
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_LENGTH)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WIDTH)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THICK)), thick));
setMaterial(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MATERIAL)), material));
setCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_COEFFICIENT)), coefficient));
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setOldEnterNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_ENTER_NO)), oldEnterNo));
......@@ -636,6 +786,12 @@ public class HPKC006 extends DaoEPBase {
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_AMOUNT, StringUtils.toString(amount, eiMetadata.getMeta(FIELD_AMOUNT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_LENGTH, StringUtils.toString(length, eiMetadata.getMeta(FIELD_LENGTH)));
map.put(FIELD_WIDTH, StringUtils.toString(width, eiMetadata.getMeta(FIELD_WIDTH)));
map.put(FIELD_THICK, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_THICK)));
map.put(FIELD_MATERIAL, StringUtils.toString(material, eiMetadata.getMeta(FIELD_MATERIAL)));
map.put(FIELD_COEFFICIENT, StringUtils.toString(coefficient, eiMetadata.getMeta(FIELD_COEFFICIENT)));
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_OLD_ENTER_NO, StringUtils.toString(oldEnterNo, eiMetadata.getMeta(FIELD_OLD_ENTER_NO)));
......
......@@ -36,7 +36,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
......@@ -32,7 +32,7 @@ import java.util.Map;
public class ServiceHPKC002 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
......@@ -36,7 +36,7 @@ import java.util.Map;
public class ServiceHPKC002A extends ServiceEPBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode()};
/**
......
......@@ -31,7 +31,7 @@ import java.util.Map;
public class ServiceHPKC004 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.SEMI_FINISHED_PRODUCT.getCode(),
InventTypeEnum.FINISHED_PRODUCT.getCode()};
......
......@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.domain.HPPZ006;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
......@@ -20,6 +21,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.MapUtils;
......@@ -38,7 +40,7 @@ import java.util.Map;
public class ServiceHPKC006 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......@@ -52,7 +54,7 @@ public class ServiceHPKC006 extends ServiceBase {
Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_CODE);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), queryMap,false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC006().eiMetadata);
......@@ -105,6 +107,18 @@ public class ServiceHPKC006 extends ServiceBase {
this.setBaseInfo(fKc006);
// 生成入库单号
fKc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
HPPZ006 hppz006= HPPZTools.checkAndSavePZ06(
Integer.parseInt(resultRows.get(i).get("inventType").toString()),
resultRows.get(i).get("inventName").toString(),
NumberUtils.toBigDecimal(resultRows.get(i).get("length")),
NumberUtils.toBigDecimal(resultRows.get(i).get("width")),
NumberUtils.toBigDecimal(resultRows.get(i).get("thick")),
NumberUtils.toBigDecimal(resultRows.get(i).get("coefficient")),
resultRows.get(i).get("material").toString(),
resultRows.get(i).get("unit").toString()
);
fKc006.setInventRecordId(hppz006.getId());
fKc006.setInventCode(hppz006.getInventCode());
DaoUtils.insert(HPKC006.INSERT, fKc006);
// 修改库存
HPKCTools.updateStock(fKc006.getWhCode(), fKc006.getInventRecordId(), fKc006.getAmount(),
......@@ -168,8 +182,8 @@ public class ServiceHPKC006 extends ServiceBase {
HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRows.get(i));
AssertUtils.isEmpty(fKc006.getWhCode(), "仓库名称不能为空");
AssertUtils.isNull(fKc006.getInventCode(), "存货名称不能为空");
AssertUtils.isNull(fKc006.getInventRecordId(), "规格不能为空");
AssertUtils.isNull(fKc006.getInventName(), "存货名称不能为空");
//AssertUtils.isNull(fKc006.getInventRecordId(), "规格不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc006.getAmount(), "数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc006.getWeight(), "重量必须大于0");
}
......@@ -186,7 +200,7 @@ public class ServiceHPKC006 extends ServiceBase {
// 仓库名称
fKc006.setWhName(HPPZTools.getPz007ByCode(fKc006.getWhCode()).getWhName());
// 存货名称
fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName());
//fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName());
}
/**
......
......@@ -38,7 +38,7 @@ import java.util.Map;
public class ServiceHPKC007 extends ServiceBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......
......@@ -35,7 +35,7 @@ import java.util.Map;
public class ServiceHPKC007A extends ServiceEPBase {
// 指定存货类型
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.MATERIAL.getCode(),
private static final Integer[] DEFAULT_INVENT_CODE = {InventTypeEnum.RAW.getCode(),
InventTypeEnum.CONSUMABLE.getCode(), InventTypeEnum.WASTE.getCode()};
/**
......
......@@ -23,7 +23,7 @@
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
REMARKS as "remarks", <!-- 备注 -->
REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
</sql>
......@@ -85,8 +85,8 @@
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
......@@ -153,13 +153,13 @@
INVENT_RECORD_ID, <!-- 存货档案ID -->
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
REMARKS, <!-- 备注 -->
REMARK, <!-- 备注 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#oldPurchaseNo#,#purchaseNo#, #receiptDate#, #whCode#, #whName#, #inventType#,
#purchaseNo#,#oldPurchaseNo#, #receiptDate#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remarks#, #deleteFlag#
#remark#, #deleteFlag#
)
</insert>
......@@ -189,7 +189,7 @@
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案ID -->
AMOUNT = #amount#, <!-- 数量 -->
WEIGHT = #weight#, <!-- 重量 -->
REMARKS = #remarks# <!-- 备注 -->
REMARK = #remark# <!-- 备注 -->
WHERE ID = #id#
</update>
......
......@@ -3,28 +3,34 @@
<sqlMap namespace="HPKC006">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 规格 -->
AMOUNT as "amount", <!-- 数量 -->
WEIGHT as "weight", <!-- 重量 -->
STATUS as "status", <!-- 状态 0提交 1保存 -->
REMARK as "remark", <!-- 备注 -->
OLD_ENTER_NO as "oldEnterNo", <!-- 原入库单号 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
A.OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
A.WH_CODE as "whCode", <!-- 仓库编码 -->
A.WH_NAME as "whName", <!-- 仓库名称 -->
A.INVENT_TYPE as "inventType", <!-- 存货类型 -->
A.INVENT_CODE as "inventCode", <!-- 存货编码 -->
A.INVENT_NAME as "inventName", <!-- 存货名称 -->
A.INVENT_RECORD_ID as "inventRecordId", <!-- 规格 -->
A.AMOUNT as "amount", <!-- 数量 -->
A.WEIGHT as "weight", <!-- 重量 -->
B.LENGTH as "length",
B.WIDTH as "width",
B.THICK as "thick",
B.MATERIAL as "material",
B.COEFFICIENT as "coefficient",
B.UNIT AS "unit",
A.STATUS as "status", <!-- 状态 0提交 1保存 -->
A.REMARK as "remark", <!-- 备注 -->
A.OLD_ENTER_NO as "oldEnterNo", <!-- 原入库单号 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 更新人 -->
A.UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
A.UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql>
<sql id="condition">
......@@ -95,7 +101,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
A.ID DESC
</isEmpty>
</dynamic>
</sql>
......@@ -103,10 +109,67 @@
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC006">
SELECT
<include refid="column"/>
FROM hpjx.t_hpkc006
FROM hpjx.t_hpkc006 A
LEFT JOIN hpjx.t_hppz006 B ON A.INVENT_RECORD_ID = B.ID
WHERE 1=1
<include refid="condition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
A.RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
A.OTHER_ENTER_NO = #otherEnterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
A.WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
A.INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
A.INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
A.INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
A.INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
A.DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNos">
A.OTHER_ENTER_NO IN <iterate close=")" open="(" conjunction="," property="otherEnterNos">#otherEnterNos[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypes">
A.INVENT_TYPE IN <iterate close=")" open="(" conjunction="," property="inventTypes">#inventTypes[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
<isEqual property="spec" compareValue="无规格">
A.INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
</isEqual>
<isNotEqual property="spec" compareValue="无规格">
A.INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
A.CREATED_TIME &gt;= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
<!--<include refid="condition"/>-->
<!--<include refid="customCondition"/>-->
<include refid="order"/>
</select>
......
......@@ -127,14 +127,16 @@
AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 -->
CREATED_BY, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
CREATED_NAME, <!-- 创建人 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
UPDATED_NAME, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
VERSION
) VALUES (
#companyCode#, #depCode#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#createdBy#, #createdTime#, #updatedBy#,
#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #version#
)
</insert>
......
......@@ -78,11 +78,11 @@ public class HPPZ006 extends DaoEPBase {
private String inventName = " "; /* 存货名称*/
private Integer status = 1; /* 状态 0未启用 1启用*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
private BigDecimal length = new BigDecimal(0.000); /* 长*/
private BigDecimal width = new BigDecimal(0.000); /* 宽*/
private BigDecimal thick = new BigDecimal(0.000); /* 厚*/
private String material = " "; /* 材质*/
private BigDecimal coefficient = new BigDecimal(0.00); /* 系数*/
private BigDecimal coefficient = new BigDecimal(0.000); /* 系数*/
private String unit = " "; /* 单位*/
private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/
......
......@@ -178,7 +178,11 @@ public class ServiceHPPZ004 extends ServiceBase {
map.put("inventType", eiInfo.getString("inventType"));
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
boolean isSplicingSymbol = true;
if (eiInfo.getString("isSplicingSymbol") != null) {
isSplicingSymbol = Boolean.parseBoolean(eiInfo.getString("isSplicingSymbol"));
}
CommonMethod.initBlock(eiInfo, list, map,isSplicingSymbol);
return eiInfo;
}
......
......@@ -38,7 +38,7 @@ public class ServiceHPPZ006 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null,false);
inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ006().eiMetadata);
} catch (PlatException e) {
......@@ -78,6 +78,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.insert(HPPZ006.INSERT, fPz006);
}
inInfo = this.query(inInfo);
......@@ -126,6 +127,7 @@ public class ServiceHPPZ006 extends ServiceBase {
fPz006.fromMap(resultRows.get(i));
// 存货名称
fPz006.setInventName(HPPZTools.getPz004ByCode(fPz006.getInventCode()).getInventName());
fPz006.setSpec(HPPZTools.jointSpec(fPz006.getLength(),fPz006.getWidth(),fPz006.getThick()));
DaoUtils.update(HPPZ006.UPDATE, fPz006);
}
inInfo = this.query(inInfo);
......@@ -165,40 +167,31 @@ public class ServiceHPPZ006 extends ServiceBase {
* @return
*/
public EiInfo checkAndSave(EiInfo inInfo){
String inventType = inInfo.getString("inventType");
String inventCode = inInfo.getString("inventCode");
String inventName = inInfo.getString("inventName");
String length = inInfo.getString("length");
String width = inInfo.getString("width");
String thick = inInfo.getString("thick");
String material = inInfo.getString("material");
String coefficient = inInfo.getString("coefficient");
String unit = inInfo.getString("unit");
List<Map> list = dao.query("HPPZ006.queryByCondition",new HashMap<String,Object>(){{
put("inventType",inventType);
put("inventCode",inventCode);
put("inventName",inventName);
put("length", Objects.nonNull(length)?length:"");
put("width",Objects.nonNull(width)?width:"");
put("thick",Objects.nonNull(thick)?thick:"");
put("material",Objects.nonNull(material)?material:"");
put("coefficient",Objects.nonNull(coefficient)?coefficient:"");
put("unit",Objects.nonNull(unit)?unit:"");
}});
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_TYPE,inInfo.getString("inventType"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_CODE,inInfo.getString("inventCode"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_NAME,inInfo.getString("inventName"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_LENGTH,inInfo.getString("length"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_WIDTH,inInfo.getString("width"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_THICK,inInfo.getString("thick"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_MATERIAL,inInfo.getString("material"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_COEFFICIENT,inInfo.getString("coefficient"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_UNIT,inInfo.getString("unit"));
EiInfo eiInfo = super.query(inInfo,"HPPZ006.queryByCondition", new HPPZ006());
HPPZ006 hppz006 = new HPPZ006();
if(CollectionUtils.isEmpty(list)){
hppz006.fromMap(list.get(0));
if(CollectionUtils.isNotEmpty(eiInfo.getBlock(EiConstant.resultBlock).getRows())){
Map map = (Map) eiInfo.getBlock(EiConstant.resultBlock).getRows().get(0);
hppz006.fromMap(map);
}else{
// 生成编码
hppz006.setInventType(Integer.parseInt(inventType));
hppz006.setInventType(Integer.parseInt(inInfo.getString("inventType")));
hppz006.setInventCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.INVENT_CODE));
hppz006.setInventName(inventName);
hppz006.setLength(new BigDecimal(length));
hppz006.setWidth(new BigDecimal(width));
hppz006.setThick(new BigDecimal(thick));
hppz006.setMaterial(material);
hppz006.setCoefficient(new BigDecimal(coefficient));
hppz006.setUnit(unit);
hppz006.setInventName(inInfo.getString("inventCode"));
hppz006.setLength(new BigDecimal(inInfo.getString("length")));
hppz006.setWidth(new BigDecimal(inInfo.getString("width")));
hppz006.setThick(new BigDecimal(inInfo.getString("thick")));
hppz006.setMaterial(inInfo.getString("material"));
hppz006.setCoefficient(new BigDecimal(inInfo.getString("coefficient")));
hppz006.setUnit(inInfo.getString("unit"));
hppz006.setStatus(CommonConstant.YesNo.YES_1.intValue());
hppz006.setSpec(HPPZTools.jointSpec(hppz006.getLength(),hppz006.getWidth(),hppz006.getThick()));
DaoUtils.insert(HPPZ006.INSERT, hppz006);
......@@ -236,9 +229,13 @@ public class ServiceHPPZ006 extends ServiceBase {
if (ObjectUtils.isEmpty(map.get("inventType"))) {
map.put("inventType", eiInfo.getString("inventType"));
}
boolean isSplicingSymbol = true;
if (eiInfo.getString("isSplicingSymbol") != null) {
isSplicingSymbol = Boolean.parseBoolean(eiInfo.getString("isSplicingSymbol"));
}
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.MATERIAL_RECORD_BLOCK_ID);
CommonMethod.initBlock(eiInfo, list, map);
CommonMethod.initBlock(eiInfo, list, map,isSplicingSymbol);
return eiInfo;
}
......
......@@ -33,7 +33,7 @@ public class ServiceHPPZ007 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null,true);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -148,7 +148,11 @@ public class ServiceHPPZ007 extends ServiceBase {
public EiInfo queryComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.WH_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
boolean isSplicingSymbol = true;
if (inInfo.getString("isSplicingSymbol") != null) {
isSplicingSymbol = Boolean.parseBoolean(inInfo.getString("isSplicingSymbol"));
}
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo),isSplicingSymbol);
return inInfo;
}
......
......@@ -96,19 +96,19 @@
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotNull prepend=" AND " property="length">
IFNULL(LENGTH,'') = #length#
IFNULL(LENGTH,'') = cast(#length# as decimal(20,3))
</isNotNull>
<isNotNull prepend=" AND " property="width">
IFNULL(WIDTH,'') = #width#
IFNULL(WIDTH,'') = cast(#width# as decimal(20,3))
</isNotNull>
<isNotNull prepend=" AND " property="thick">
IFNULL(THICK,'') = #thick#
IFNULL(THICK,'') = cast(#thick# as decimal(20,3))
</isNotNull>
<isNotNull prepend=" AND " property="material">
IFNULL(MATERIAL,'') = #material#
</isNotNull>
<isNotNull prepend=" AND " property="coefficient">
IFNULL(COEFFICIENT,'') = #coefficient#
IFNULL(COEFFICIENT,'') =cast(#coefficient# as decimal(20,3))
</isNotNull>
<isNotNull prepend=" AND " property="unit">
IFNULL(UNIT,'') = #unit#
......
......@@ -65,7 +65,9 @@ public class HPSC002A extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
/**
* initialize the metadata.
*/
......@@ -120,8 +122,10 @@ public class HPSC002A extends DaoEPBase {
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("bizType");
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -324,6 +328,22 @@ public class HPSC002A extends DaoEPBase {
this.updatedTime = updatedTime;
}
/**
* get the bizType - .
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType -
*
* @param bizType -
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* get the value from Map.
*
* @param map - source data map
......@@ -343,6 +363,7 @@ public class HPSC002A extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("bizType")), bizType));
}
/**
......@@ -364,7 +385,8 @@ public class HPSC002A extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put("bizType", StringUtils.toString(bizType, eiMetadata.getMeta("bizType")));
return map;
}
}
......@@ -19,9 +19,9 @@ import java.util.Map;
* @history 2024-01-25 16:47:50 create
*/
public class HPSC002B extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/
......@@ -34,7 +34,7 @@ public class HPSC002B extends DaoEPBase {
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/
......@@ -47,13 +47,13 @@ public class HPSC002B extends DaoEPBase {
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String QUERY = "HPSC002B.query";
public static final String COUNT = "HPSC002B.count";
public static final String INSERT = "HPSC002B.insert";
public static final String UPDATE = "HPSC002B.update";
public static final String DELETE = "HPSC002B.delete";
public static final String QUERY = "HPSC002A.query";
public static final String COUNT = "HPSC002A.count";
public static final String INSERT = "HPSC002A.insert";
public static final String UPDATE = "HPSC002A.update";
public static final String DELETE = "HPSC002A.delete";
private Long id = null; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/
......@@ -66,72 +66,76 @@ public class HPSC002B extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("bizType");
eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HPSC002B() {
initMetaData();
}
/**
* get the id - 主键ID.
* @return the id
......@@ -139,7 +143,7 @@ public class HPSC002B extends DaoEPBase {
public Long getId() {
return this.id;
}
/**
* set the id - 主键ID.
*
......@@ -155,7 +159,7 @@ public class HPSC002B extends DaoEPBase {
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 企业编码 预留.
*
......@@ -171,7 +175,7 @@ public class HPSC002B extends DaoEPBase {
public String getDeptCode() {
return this.deptCode;
}
/**
* set the deptCode - 部门编码 预留.
*
......@@ -187,7 +191,7 @@ public class HPSC002B extends DaoEPBase {
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
......@@ -203,7 +207,7 @@ public class HPSC002B extends DaoEPBase {
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
......@@ -219,7 +223,7 @@ public class HPSC002B extends DaoEPBase {
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
......@@ -235,7 +239,7 @@ public class HPSC002B extends DaoEPBase {
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 创建人.
*
......@@ -251,7 +255,7 @@ public class HPSC002B extends DaoEPBase {
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 创建人名称.
*
......@@ -267,7 +271,7 @@ public class HPSC002B extends DaoEPBase {
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 创建时间.
*
......@@ -283,7 +287,7 @@ public class HPSC002B extends DaoEPBase {
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 修改人.
*
......@@ -299,7 +303,7 @@ public class HPSC002B extends DaoEPBase {
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 修改人名称.
*
......@@ -315,7 +319,7 @@ public class HPSC002B extends DaoEPBase {
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 修改时间.
*
......@@ -325,13 +329,29 @@ public class HPSC002B extends DaoEPBase {
this.updatedTime = updatedTime;
}
/**
* get the bizType - .
* @return the bizType
*/
public String getBizType() {
return this.bizType;
}
/**
* set the bizType -
*
* @param bizType -
*/
public void setBizType(String bizType) {
this.bizType = bizType;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode));
......@@ -344,14 +364,15 @@ public class HPSC002B extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("bizType")), bizType));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
......@@ -365,7 +386,8 @@ public class HPSC002B extends DaoEPBase {
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put("bizType", StringUtils.toString(bizType, eiMetadata.getMeta("bizType")));
return map;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
......@@ -31,11 +32,11 @@ public class ServiceHPSC001 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
......@@ -65,6 +66,7 @@ public class ServiceHPSC001 extends ServiceBase {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
hpsc001.setStatus(CommonConstant.YesNo.NO_0);
hpsc001.setProjCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROJ_NUMBER));
DaoUtils.insert("HPSC001.insert",hpsc001);
}
......@@ -86,14 +88,13 @@ public class ServiceHPSC001 extends ServiceBase {
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpsc001.fromMap(map);
DaoUtils.update("HPSC001.insert",hpsc001);
DaoUtils.update("HPSC001.update",hpsc001);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
......
......@@ -335,6 +335,7 @@ public class ServiceHPSC002 extends ServiceBase {
Map sqlMap = new HashMap();
sqlMap.put("id",hppz002.getId());
sqlMap.put("filePath1",hppz002.getFilePath1());
sqlMap.put("bizType","WL");
DaoUtils.update("HPSC002.bindDocIdById", hppz002.toMap());
}
} catch (PlatException e) {
......
......@@ -43,6 +43,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
if (CollectionUtils.isNotEmpty(dbSc002s)) {
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-bizType", queryMap.get("bizType"));
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
......
......@@ -39,7 +39,8 @@ public class ServiceHPSC003 extends ServiceBase {
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID,DdynamicEnum.INVENT_NAME_BLOCK_ID),
new HashMap<String,Object>(){{put("prdtType",4);}});
HPSC003 HPSC003 = new HPSC003();
EiInfo outInfo = super.initLoad(inInfo, HPSC003);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC003.eiMetadata);
......
......@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
......@@ -11,6 +12,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.springframework.security.core.parameters.P;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -55,6 +57,26 @@ public class ServiceHPSC004 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i);
HPSC004.fromMap(map);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
List list = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getPrdtCode());
put("parentId",HPSC004.getParentId());
put("planCommentDate","");
put("planCompletionDate","");
}});
if (list == null) {
List<Map> list1 = this.dao.query("HPSC004.query", new HashMap<String,Object>(){{
put("companyCode",HPSC004.getCompanyCode());
put("projCode",HPSC004.getPrdtCode());
put("parentId",HPSC004.getParentId());
}});
HPSC003 HPSC003 = new HPSC003();
HPSC003.setCompanyCode(HPSC004.getCompanyCode());
HPSC003.setPrdtCode(HPSC004.getPrdtCode());
HPSC003.setPlanInfoNo(HPSC004.getParentId());
HPSC003.setPlanCompletionDate(list1.get(0).get("planCompletionDate").toString());
DaoUtils.update("HPSC003.updateDate", HPSC003.toMap());
}
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
......@@ -22,7 +23,11 @@ public class ServiceHPSC011 extends ServiceBase {
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null);
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
......
......@@ -36,6 +36,7 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
MATERIAL_STATUS as "materialStatus"
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
......@@ -158,9 +159,10 @@
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
DEP_CODE <!-- 部门编码 -->
DEP_CODE, <!-- 部门编码 -->
REMARK
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #princ1#, #princ2#, #status#, 0, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete id="delete">
......@@ -183,8 +185,9 @@
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DEP_CODE = #depCode# <!-- 部门编码 -->
WHERE
DEP_CODE = #depCode#, <!-- 部门编码 -->
REMARK = #remark# <!-- 备注 -->
WHERE
ID = #id#
</update>
......@@ -227,7 +230,8 @@
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark" <!-- 备注 -->
FROM hpjx.t_hpsc001 WHERE 1=1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......
......@@ -458,7 +458,7 @@
</update>
<update id="bindDocIdById">
UPDATE hpjx.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id#
UPDATE hpjx.t_hpsc002 SET FILE_PATH1 = #filePath1# WHERE ID = #id# AND BIZ_TYPE = #bizType#
</update>
......
......@@ -6,6 +6,7 @@
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
......@@ -27,6 +28,9 @@
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
......@@ -95,13 +99,14 @@
INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE,
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #matId#, #docId#, #createdBy#,
#companyCode#, #deptCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
......
......@@ -6,6 +6,7 @@
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID -->
B.DOC_NAME as "docName", <!-- 文件名称 -->
......@@ -27,6 +28,9 @@
<isNotEmpty prepend=" AND " property="deptCode">
A.DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="matId">
A.MAT_ID = #matId#
</isNotEmpty>
......@@ -95,17 +99,18 @@
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE,
MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 -->
) VALUES (
#companyCode#, #deptCode#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
#companyCode#, #deptCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime#
)
</insert>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!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-01-17 10:33:49
Version : 1.0
schema : hpjx
tableName : T_HPSC003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PLAN_INFO_NO VARCHAR,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PLAN_COMPLETION_DATE VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR,
REMARK VARCHAR
-->
<sqlMap namespace="HPSC003">
<sql id="condition">
......@@ -232,4 +253,17 @@
ORDER BY PROJ_CODE
</select>
<!--计划完成时间回写-->
<update id="updateDate">
UPDATE hpjx.T_HPSC003
SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime# <!-- 更新时间 -->
WHERE
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode#
AND PLAN_INFO_NO = #planInfoNo#
</update>
</sqlMap>
......@@ -463,4 +463,26 @@
</isNotEmpty>
ORDER BY A.PROJ_CODE
</select>
<select id="queryDate" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC004">
SELECT
MAX(PLAN_COMPLETION_DATE) as "planCompletionDate" <!-- 计划结束时间 -->
FROM hpjx.T_HPSC004 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCommentDate">
IFNULL(PLAN_COMMENT_DATE,'') = #planCommentDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
IFNULL(PLAN_COMPLETION_DATE,'') = #planCompletionDate#
</isNotEmpty>
</select>
</sqlMap>
......@@ -32,7 +32,7 @@ public class CommonMethod {
* 公用下拉方法
*/
public static void initBlock(EiInfo inInfo, List<DdynamicEnum> tableParams, Map<String, Object> selectParams){
initBlock(inInfo, tableParams, selectParams,true);
initBlock(inInfo, tableParams, selectParams,false);
}
/**
......
$(function () {
$(document).ready(function() {
$("#inqu_status-0-date").data("kendoDatePicker").value(new Date());
});
//$("#inqu_status-date").data("kendoDatePicker").value(new Date());
//$(element) .data("kendoDatePicker").value(Date)
$("#QUERY").click();
/* $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
buildOption("scrb");
......@@ -21,6 +26,7 @@ $(function () {
$('#mrsj').append(str);
})
buildOption("scrb");
resultGrid.dataSource.page(1);
},
// 服务调用失败后的回调函数 onFail
onFail: function(errorMsg, status, e) {
......@@ -28,8 +34,8 @@ $(function () {
console.log(errorMsg)
}
}, {async: true});
resultGrid.dataSource.page(1);
buildOption("scrb");
//resultGrid.dataSource.page(1);
//buildOption("scrb");
});
// 导出
$("#EXPORT").on("click", function () {
......@@ -39,30 +45,7 @@ $(function () {
$(".k-menu-link").click();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
}
// else if (auditStatus == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
// 'onclick="check(' + item.id + ',0)" >撤回</a>';
// }
return template;
}
}
],
}
});
function check(id, auditStatus) {
......@@ -89,7 +72,8 @@ function buildOption(vid){
var colors = ['#5470C6', '#91CC75', '#EE6666'];
var option = {
title: {
text: '柱状图与折线图'
text: '生产月报',
left: 'center'
},
tooltip: {
trigger: 'axis',
......@@ -106,7 +90,7 @@ function buildOption(vid){
xAxis: {
type: 'category',
//boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
},
yAxis: [
{
......@@ -127,7 +111,7 @@ function buildOption(vid){
color: '#4874CB',
yAxisIndex: 0,
barWidth: 15,
data: [120, 200, 150, 80, 70, 110, 130]
data: [120, 200, 150, 80, 70, 110, 130,120, 200, 150, 80, 70]
},
{
name: '生产人数(吨)',
......@@ -135,14 +119,14 @@ function buildOption(vid){
color: '#EE822F',
yAxisIndex: 0,
barWidth: 15,
data: [130, 120, 200, 160, 80, 70, 140]
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]
},
{
name: '人均产量(kg)',
type: 'line',
color:'#F2BA03',
yAxisIndex: 1, // 指定该系列在y轴上的位置,默认是0,可选为:0 | 1 | 2 | ... | n (正整数)
data: [130, 120, 200, 160, 80, 70, 140]
data: [130, 120, 200, 160, 80, 70, 140,130, 120, 200, 160, 80]
}
]
};
......
......@@ -13,11 +13,20 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="工厂" defaultValue="0" ename="inqu_status-0-factory" colWidth="3">
<%-- <EF:EFSelect cname="工厂" defaultValue="0" ename="inqu_status-0-factory" colWidth="3">
<EF:EFOption label="黄陂" value="黄陂"/>
<EF:EFOption label="红安" value="红安"/>
</EF:EFSelect>--%>
<EF:EFSelect cname="工厂" ename="inqu_status-0-factory" colWidth="3" filter="contains">
<%--<EF:EFOption label="全部" value=""/>--%>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker ename="inqu_status-date" colWidth="3" cname="日期:"
<%-- <EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>--%>
<EF:EFDatePicker ename="inqu_status-0-date" colWidth="3" cname="日期:"
format="yyyy-MM-dd"/>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
......@@ -32,7 +41,7 @@
<EF:EFRegion id="result" title="汇总数据">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<%-- <EF:EFColumn ename="id" cname="主键" hidden="true"/>--%>
<EF:EFColumn ename="indNmae" cname="指标名称" readonly="true"/>
<EF:EFColumn ename="dayValue" cname="日" readonly="true"/>
<EF:EFColumn ename="monValue" cname="月" readonly="true"/>
......
......@@ -70,6 +70,16 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "material",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param1Field'];
}
}
return "";
}
}, {
field: "unit",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
......
......@@ -48,8 +48,8 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="purchaseNo" cname="采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="90" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
......@@ -57,8 +57,8 @@
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" readonly="true"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" readonly="true"/>
<EF:EFColumn ename="oldPurchaseNo" cname="原采购单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
......
let whNameGlobalData = [];
let inventNameGlobalData = [];
let specGlobalData = [];
let firstLoad = 0;
$(function() {
IPLATUI.EFGrid = {
......@@ -30,16 +31,56 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "inventCode",
field: "inventName",
template: function (dataItem) {
//let flag = false;
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
if (inventNameGlobalData[i]['textField'] === dataItem['inventName']) {
dataItem.inventCode = inventNameGlobalData[i]['valueField']
//flag= true;
return inventNameGlobalData[i]['textField'];
}
}
return "";
return dataItem.inventName;
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var input = $('<input />');
var dataSource;
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
var eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
eiInfo.set("inqu_status-0-inventType", options.model["inventType"]);
eiInfo.set("isSplicingSymbol",false);
//eiInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
//eiInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
//eiInfo.set("inqu_status-0-company_name", options.model["company_name"]);
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
}, onFail: function (ei) {
}
}, {async: false});
input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource,
dataTextField: "textField",
dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#",
template: "#:textField#",
filter: "contains"
});
}
/*editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
......@@ -48,13 +89,35 @@ $(function() {
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'];
let inventRecordId = specGlobalData[i]['textField'];
/*if (firstLoad === 1){
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-id", dataItem['inventRecordId']);
EiCommunicator.send("HPPZ006", "query", inInfo, {
onSuccess: function (ei) {
let data = ei.blocks.result.rows;
var id = "#datacell__5";
$(id).text(e.model.inventCode)
dataItem["length"] = data[0][8]
dataItem["width"] = data[0][9]
dataItem["thick"] = data[0][10]
dataItem["material"] = data[0][11]
dataItem["coefficient"] = data[0][12]
dataItem["unit"] = data[0][13]
firstLoad = 0;
},
onFail: function (ei) {
}
}, {async: false});
//queryHPPZ006(inInfo,dataItem)
}*/
return inventRecordId;
}
}
return "";
......@@ -71,6 +134,49 @@ $(function() {
}
}],
loadComplete: function (grid) {
},
//beforeAdd:function(){firstLoad = 1},
onSave:function () {
//firstLoad = 1;
},
afterEdit: function (e) {
if (e.field === "inventRecordId") {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-id", e.model.inventRecordId);
EiCommunicator.send("HPPZ006", "query", inInfo, {
onSuccess: function (ei) {
let data = ei.blocks.result.rows;
//var id = "#datacell__5";
//$(id).text(e.model.inventCode)
resultGrid.setCellValue(e.model,"length",data[0][8])
resultGrid.setCellValue(e.model,"width",data[0][9])
resultGrid.setCellValue(e.model,"thick",data[0][10])
resultGrid.setCellValue(e.model,"material",data[0][11])
resultGrid.setCellValue(e.model,"coefficient",data[0][12])
resultGrid.setCellValue(e.model,"unit",data[0][13])
//dataItem["length"] = data[0][8]
//dataItem["width"] = data[0][9]
//dataItem["thick"] = data[0][10]
//dataItem["material"] = data[0][11]
//dataItem["coefficient"] = data[0][12]
//dataItem["unit"] = data[0][13]
firstLoad = 0;
},
onFail: function (ei) {
}
}, {async: false});
//firstLoad = 1;
/*var id = "#datacell_"+e.row+"_5";
$(id).text(e.model.inventCode)
resultGrid.setCellValue({
list:7,
field:"inventRecordId",
cellValue:e.model.inventCode
})
console.log(e.model.inventCode);*/
//e.preventDefault(); // 不关闭单元格
}
}
}
}
......@@ -89,6 +195,7 @@ $(window).load(function () {
// 仓库名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("isSplicingSymbol", false);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
......@@ -121,6 +228,7 @@ $(window).load(function () {
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
firstLoad = 0;
}
/**
......@@ -139,3 +247,22 @@ let save = function () {
});
}
let queryHPPZ006 =function (inInfo,row) {
// 仓库名称
EiCommunicator.send("HPPZ006", "query", inInfo, {
onSuccess: function (ei) {
let data = ei.blocks.result.rows;
row.length = data[0][8]
row.width = data[0][9]
row.thick = data[0][10]
row.material = data[0][11]
row.coefficient = data[0][12]
row.unit = data[0][13]
firstLoad = 0;
},
onFail: function (ei) {
}
}, {async: false});
}
......@@ -48,17 +48,23 @@
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true"
readonly="true">
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true" hidden ="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="length" cname="长" width="120" align="center" format="{0:N3}" required="false" readonly="true"/>
<EF:EFColumn ename="width" cname="宽" width="120" align="center" format="{0:N3}" required="false" readonly="true"/>
<EF:EFColumn ename="thick" cname="厚" width="120" align="center" format="{0:N3}" required="false" readonly="true"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="120" align="center" format="{0:N3}" required="false" readonly="true"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建日期" enable="false" width="140" align="center"
......
......@@ -31,20 +31,20 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="存货档案ID" hidden="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains" enable="false">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" enable="false"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<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']"/>
......
......@@ -31,23 +31,23 @@
<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="prodNo" cname="生产单号" width="120" align="center" required="true"/>
<EF:EFColumn ename="prodNo" cname="生产单号" width="120" align="center" required="true" enable="false"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains" required="true">
align="center" filter="contains" required="true" enable="false">
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center" required="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="部件名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="subInventCode" cname="零部件名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="thich" cname="厚" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" required="true"/>
<EF:EFColumn ename="unitWeight" cname="单重" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right"/>
<EF:EFColumn ename="remark" cname="备注" width="120" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="inventCode" cname="部件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="subInventCode" cname="零部件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="thich" cname="厚" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="90" align="right" required="true" enable="false"/>
<EF:EFColumn ename="unitWeight" cname="单重" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="remark" cname="备注" width="120" align="center" enable="false"/>
<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']"/>
......
......@@ -10,7 +10,7 @@
<div class="row">
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="textField" valueField="valueField"/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
......@@ -24,12 +24,10 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="custCode" cname="供应商编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFComboColumn ename="custType" cname="供应商类型" width="100" align="center"
blockName="company_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
optionLabel=" " required="true">
<EF:EFComboColumn ename="custType" cname="供应商类型" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="供应商名称" width="100" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="120" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
......
......@@ -8,10 +8,9 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3">
<EF:EFSelect ename="custType" blockId="inqu_status" cname="客户类型" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="textField" valueField="valueField"/>
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
<EF:EFOption label="全部" value=""/>
......@@ -24,9 +23,8 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center"
blockName="company_type_block_id" textField="textField" valueField="valueField"
required="true">
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hppz.companyType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
......
......@@ -17,12 +17,12 @@ $(function() {
}, {
field: "width",
template: function (options) {
return options.length == 0 ? "-" : options.length;
return options.width == 0 ? "-" : options.width;
}
}, {
field: "thick",
template: function (options) {
return options.length == 0 ? "-" : options.length;
return options.thick == 0 ? "-" : options.thick;
}
}, {
field: "createdName",
......
......@@ -30,12 +30,12 @@
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" requird="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" maxLength="50" enable="false"/>
<EF:EFColumn ename="length" cname="长" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="material" cname="材质" width="100" align="center" required="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10"/>
<EF:EFColumn ename="coefficient" cname="系数" width="100" align="right" format="{0:N2}" maxLength="10" defaultValue="1"/>
<EF:EFColumn ename="unit" cname="单位" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/>
......
......@@ -12,13 +12,13 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-projType" cname="项目类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="单据状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
......@@ -38,27 +38,27 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" enable="false" cname="项目编码" readonly="true"/>
<EF:EFColumn required="true" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ1" cname="项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ2" cname="客户负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" />
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态" readonly="true">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -377,7 +377,7 @@ function openUploadFile(id) {
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-id=" + id,
href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType='WL'?inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
......
......@@ -79,6 +79,21 @@ $(function () {
NotificationUtil({
msg: '请选择一条或多条数据'
}, "warning");
}
let flag = false;
for (let i = 0; i <rowCount.length; i++) {
let startT = new Date(rowCount[i].planCommentDate).getTime();
let endT = new Date(rowCount[i].planCompletionDate).getTime();
if (startT > endT) {
flag = true;
break
}
}
if (flag){
NotificationUtil({
msg: '计划结束时间不能小于计划开始时间'
}, "warning");
return false;
}
var btnNode = $(this);
......@@ -108,6 +123,19 @@ $(function () {
});
},
afterEdit: function (e) {
if (e.field === "planCompletionDate") {
let startT = new Date(e.model.planCommentDate).getTime();
let endT = new Date(e.model.planCompletionDate).getTime();
if (startT > endT) {
e.preventDefault();
NotificationUtil({
msg: '计划结束时间不能小于计划开始时间'
}, "warning");
}
}
},
columns: [
{
field: "operator",
......@@ -152,7 +180,7 @@ $(function () {
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
href: "HPSC002B?methodName=initLoad&inqu_status-0-bizType='WL'?inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
......
......@@ -14,11 +14,11 @@
<div class="row" > <%-- blockId="inqu_status" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" />
<EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" />
<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
<%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>
</EF:EFSelect>--%>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/>
......@@ -49,7 +49,7 @@
<EF:EFColumn hidden="true" enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true' readonly="true"/>
required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未提交" value="0"/>
......
......@@ -17,6 +17,7 @@ $(function () {
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(' + item.id + ')" >物料清单</a>';
return template;
}
}
......@@ -29,7 +30,4 @@ function jump(id) {
window.open(herf);
}
function jump2(id) {
var herf= ctx + "\\web\\"+ "HPSC006?inqu_status-0-projId=" + id;
window.open(herf);
}
......@@ -16,13 +16,13 @@
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-projType" cname="项目类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect cname="物料提交状态" optionLabel="全部" ename="inqu_status-0-materialStatus" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
......@@ -43,29 +43,28 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn ename="princ1" cname="本公司项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ1" cname="项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户项目负责人" width="120" align="center" required="true"
<EF:EFComboColumn ename="princ2" cname="客户负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn required="true" align="center" ename="materialStatus" cname="物料提交状态" defaultValue="0">
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFComboColumn align="center" ename="materialStatus" cname="物料提交状态" defaultValue="0">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
<EF:EFOption label="全部提交" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="remark" cname="备注"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
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