Commit 61d19021 by 江和松

增加常量类,库存来源

parent 0ee9eb18
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;
}
}
......@@ -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);
}
}
......
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