Commit 7f40fb81 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 6b459ec4 b572ab9a
package com.baosight.hggp.common;
/**
* @author jhs
* @version 1.0 2024/6/11
*/
public enum InventorySource {
MANUAL_ENTRY(1,"手动录入"),
INVENTORY(2,"盘点"),
ALLOCATION(3,"调拨");
private Integer code;
private String value;
InventorySource(Integer code, String value) {
this.code = code;
this.value = value;
}
public static InventorySource getEnumByCode(Integer code){
for (InventorySource en : InventorySource.values()){
if(code.compareTo(en.code)==0){
return en;
}
}
return null;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
......@@ -216,7 +216,7 @@ public class ServiceHGKC003 extends ServiceBase {
newKc003.setInvWeight(fKc003.getInvWeight().negate());
newKc003.setDepositNoOld(fKc003.getDepositNo());
newKc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
fKc003.setStorageType(HGConstant.StorageType.TH);
newKc003.setStorageType(HGConstant.StorageType.TH);
DaoUtils.insert(HGKC003.INSERT, newKc003);
// 修改库存
HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartSpecId(),
......
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -141,7 +142,7 @@ public class ServiceHGKC006 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(userVO.getUsercode());
hgkc006.setCompanyName(userVO.getUsername());
hgkc006.setSource(HGConstant.RKSource.SDLR);
hgkc006.setSource(InventorySource.MANUAL_ENTRY.getCode());
hgkc006.setSubmitStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
}
......
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -139,7 +140,7 @@ public class ServiceHGKC007 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc007.setCompanyCode(userVO.getUsercode());
hgkc007.setCompanyName(userVO.getUsername());
hgkc007.setSource(HGConstant.CKSource.SDLR);
hgkc007.setSource(InventorySource.MANUAL_ENTRY.getCode());
DaoUtils.insert(HGKC007.INSERT, hgkc007);
}
......
......@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventorySource;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
......@@ -119,7 +120,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
AssertUtils.isNotEmpty(hgkc013aList, "已经添加调拨单明细,无法保存!");
DaoUtils.update(HGKC013.UPDATE, hgkc013);
}
@OperationLogAnnotation(operModul = "调拨单",operType = "修改",operDesc = "修改状态操作")
public EiInfo updateStatus(EiInfo inInfo){
int i = 0;
......@@ -153,7 +154,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc006.setOtherEnterDate(DateUtils.formatShort(DateUtils.date()));
hgkc006.setWhCode(hgkc013.getCallinWhCode());
hgkc006.setWhName(hgkc013.getCallinWhName());
hgkc006.setSource(3);
hgkc006.setSource(InventorySource.ALLOCATION.getCode());
hgkc006.setSubmitStatus(0);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
List<HGKC006> list = this.dao.query("HGKC006.queryList", hgkc006.toMap());
......@@ -179,7 +180,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc006A.setPartWidth(hgkc013A.getWidth());
hgkc006A.setPartThick(hgkc013A.getThick());
hgkc006A.setPartSpec(hgkc013A.getSpec());
hgkc006A.setSource(3);
hgkc006A.setSource(InventorySource.ALLOCATION.getCode());
DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
}
}
......@@ -194,7 +195,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc007.setOtherOutDate(DateUtils.formatShort(DateUtils.date()));
hgkc007.setWhCode(hgkc013.getCalloutWhCode());
hgkc007.setWhName(hgkc013.getCalloutWhName());
hgkc007.setSource(3);
hgkc007.setSource(InventorySource.ALLOCATION.getCode());
hgkc007.setSubmitStatus(0);
DaoUtils.insert(HGKC007.INSERT, hgkc007);
List<HGKC007> list = this.dao.query("HGKC007.queryList", hgkc007.toMap());
......@@ -220,7 +221,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc007A.setPartWidth(hgkc013A.getWidth());
hgkc007A.setPartThick(hgkc013A.getThick());
hgkc007A.setPartSpec(hgkc013A.getSpec());
hgkc007A.setSource(3);
hgkc007A.setSource(InventorySource.ALLOCATION.getCode());
DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
}
}
......
......@@ -207,7 +207,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
ID desc
</isEmpty>
</dynamic>
......
......@@ -38,6 +38,9 @@ public class HGSC004B extends DaoEPBase {
public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_type = "productType"; /* 产品type*/
public static final String FIELD_invent_type = "inventType"; /* 档案类型*/
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_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/
public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String FIELD_quantity = "quantity"; /* 数量*/
......@@ -68,6 +71,9 @@ public class HGSC004B extends DaoEPBase {
public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_product_type = "product_type"; /* 产品类型*/
public static final String COL_invent_type = "invent_type"; /* 档案类型*/
public static final String COL_length = "length"; /* 长*/
public static final String COL_width = "width"; /* 宽*/
public static final String COL_thick = "thick"; /* 厚*/
public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/
public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String COL_quantity = "quantity"; /* 数量*/
......@@ -104,6 +110,9 @@ public class HGSC004B extends DaoEPBase {
private String productName = " "; /* 产品名称*/
private String productType = " "; /* 产品类型*/
private String inventType = " "; /* 档案类型*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/
private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/
private Integer quantity = new Integer(0); /* 数量*/
......@@ -212,6 +221,27 @@ public class HGSC004B extends DaoEPBase {
eiColumn.setDescName("档案类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_length);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_width);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_thick);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
......@@ -740,6 +770,30 @@ public class HGSC004B extends DaoEPBase {
this.inventType = inventType;
}
public BigDecimal getLength() {
return length;
}
public void setLength(BigDecimal length) {
this.length = length;
}
public BigDecimal getWidth() {
return width;
}
public void setWidth(BigDecimal width) {
this.width = width;
}
public BigDecimal getThick() {
return thick;
}
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the value from Map.
*
......@@ -777,6 +831,9 @@ public class HGSC004B 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));
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));
}
/**
......@@ -813,6 +870,9 @@ public class HGSC004B 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(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)));
return map;
}
......
......@@ -99,6 +99,9 @@
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
......
......@@ -84,6 +84,15 @@
<isNotEmpty prepend=" AND " property="materialDetailId">
material_detail_id = #materialDetailId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
length = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
width = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
thick = #thick#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
......@@ -105,6 +114,9 @@
product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 -->
product_type as "productType", <!-- 产品类别 -->
length as "length", <!-- 长 -->
width as "width", <!-- 宽 -->
thick as "thick", <!-- 厚 -->
product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity", <!-- 数量 -->
......@@ -163,13 +175,16 @@
created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 -->
updated_time, <!-- 更新时间 -->
length, <!-- 长 -->
width, <!-- 宽 -->
thick <!-- 厚 -->
)
VALUES (#id#,#materialDetailId#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#,
#projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#,
#productCode#, #productName#,#productType#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#,
#totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#)
#updatedBy#, #updatedName#, #updatedTime#, #length#, #width#, #thick#)
</insert>
<delete id="delete">
......@@ -194,6 +209,9 @@
product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 -->
length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 -->
thick = #thick#, <!-- 厚 -->
product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 -->
change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity = #quantity#, <!-- 数量 -->
......
......@@ -77,6 +77,11 @@ $(function () {
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e){
// 阻止默认请求,使用自定义删除
e.preventDefault();
update();
}
}
......@@ -167,7 +172,7 @@ function updateSubmitStatus(id) {
/**
* 保存
*/
let save = function () {
let update = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
......@@ -178,6 +183,12 @@ let save = function () {
let whCode= item.get("whCode");
let whName= item.get("whName");
let price= item.get("price");
let submitStatus= item.get("submitStatus");
if(submitStatus == 1){
message("选中的第" + (index + 1) + "行\"提交状态\",为已提交!");
flag = false;
return false;
}
if(isBlank(whCode)){
message("选中的第" + (index + 1) + "行\"仓库编码\",不能为空!");
flag = false;
......
......@@ -27,6 +27,9 @@
<EF:EFColumn ename="rectificationId" cname="整改通知单ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="partSpecId" cname="零件规格ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFComboColumn cname="入库类型" ename="storageType" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.kc.storageType" />
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
......
......@@ -147,14 +147,14 @@ $(function (){
}
if (e.field == "projCode") {
e.items[0].blueprintCode = "";
e.items[0].blueprintNmae = "";
e.items[0].blueprintName = "";
loadChange(grid,e,"projName");
}
if (e.field == "companyCode") {
e.items[0].projCode = "";
e.items[0].projName = "";
e.items[0].blueprintCode = "";
e.items[0].blueprintNmae = "";
e.items[0].blueprintName = "";
loadChange(grid,e,"projCode");
}
});
......
......@@ -36,8 +36,8 @@
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center" required="true"/>
<EF:EFColumn ename="blueprintCode" cname="蓝图编码" enable="true" width="120" align="center" required="true"/>
<EF:EFColumn ename="blueprintName" cname="蓝图名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="materialStatus" cname="提交状态" width="80" align="center" enable="false" required="false" readonly="true">
<EF:EFCodeOption codeName="hggp.sc.materialStatus" />
</EF:EFComboColumn>
......
......@@ -19,17 +19,14 @@
<EF:EFComboColumn cname="变更类型" ename="changeType" width="90" align="center" enable="false" required="false">
<EF:EFCodeOption codeName="hggp.sc.changeType" />
</EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" enable="false"/>
<EF:EFColumn ename="productCode" required="false" cname="产品编号" enable="false"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="quantity" required="true" cname="数量" enable="false" />
<EF:EFColumn ename="singleWeight" required="true" format="{0:N3}" cname="单重(kg)" enable="false"/>
<EF:EFColumn enable="true" required="true" format="{0:N3}" ename="totalWeight" cname="总重(kg)"/>
<EF:EFComboColumn cname="提交状态" ename="productStatus" width="90" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn>
<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:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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