Commit 1b2aa6eb by wuwenlong

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

parents cf40cce3 4359b058
...@@ -341,7 +341,14 @@ public enum DdynamicEnum { ...@@ -341,7 +341,14 @@ public enum DdynamicEnum {
/** /**
* *
*/ */
PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","HGSC001.queryProjectCodeBox") PROJECT_CODE_BOX_BLOCK_ID("projectCodeBox_block_id","projCode","projName","HGSC001.queryProjectCodeBox"),
/**
* 模块: 销售发货
* 用途: 发单号下拉框
* 编写: ly
*/
DELIVERY_CODE_BOX_BLOCK_ID("deliveryCodeBox_block_id","deliveryCode","projName","id","HGYX001.queryReturnCodeBox"),
; ;
......
...@@ -128,6 +128,8 @@ public class HGConstant { ...@@ -128,6 +128,8 @@ public class HGConstant {
public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE"; public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE";
// 销售发货单号 // 销售发货单号
public static final String DELIVERY_CODE = "DELIVERY_CODE"; public static final String DELIVERY_CODE = "DELIVERY_CODE";
//销售退货单号
public static final String RETURN_CODE = "RETURN_CODE";
} }
...@@ -327,6 +329,21 @@ public class HGConstant { ...@@ -327,6 +329,21 @@ public class HGConstant {
// 退库 // 退库
public static final Integer TK = 2; public static final Integer TK = 2;
} }
/**
*
* 生产入库单类型
* @author:jianghesong
* @date:2024/5/15,15:18
*/
public static class StorageType {
// 默认
public static final Integer DEFAULT = 0;
// 入库
public static final Integer RK = 1;
// 退回
public static final Integer TH = 2;
}
/** /**
* 文件类型* * 文件类型*
......
...@@ -128,6 +128,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -128,6 +128,7 @@ public class HGKC003 extends DaoEPBase {
public static final String DELETE = "HGKC003.delete"; public static final String DELETE = "HGKC003.delete";
public static final String UPDATE_SUBMIT_STATUS = "HGKC003.updateSubmitStatus"; public static final String UPDATE_SUBMIT_STATUS = "HGKC003.updateSubmitStatus";
public static final String MAX_ID = "HGKC003.maxId"; public static final String MAX_ID = "HGKC003.maxId";
public static final String BATCH_DELETE = "HGKC003.batchDelete";
private Long id = new Long(0); private Long id = new Long(0);
private Long qualityId = new Long(0); /* 质检单id*/ private Long qualityId = new Long(0); /* 质检单id*/
...@@ -156,14 +157,14 @@ public class HGKC003 extends DaoEPBase { ...@@ -156,14 +157,14 @@ public class HGKC003 extends DaoEPBase {
private String prodTaskNo = " "; /* 生产任务号*/ private String prodTaskNo = " "; /* 生产任务号*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/ private String prdtType; /* 产品类型*/
private String prdtCode = " "; /* 产品编码*/ private String prdtCode = " "; /* 产品编码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private BigDecimal prdtLength = new BigDecimal(0.000); /* 产品-长*/ private BigDecimal prdtLength = new BigDecimal(0.000); /* 产品-长*/
private BigDecimal prdtWidth = new BigDecimal(0.000); /* 产品-宽*/ private BigDecimal prdtWidth = new BigDecimal(0.000); /* 产品-宽*/
private BigDecimal prdtThick = new BigDecimal(0.000); /* 产品-厚*/ private BigDecimal prdtThick = new BigDecimal(0.000); /* 产品-厚*/
private String prdtSpec = " "; /* 产品规格*/ private String prdtSpec = " "; /* 产品规格*/
private Integer partType; /* 零件类型*/ private String partType; /* 零件类型*/
private String partCode = " "; /* 零件编码*/ private String partCode = " "; /* 零件编码*/
private String partName = " "; /* 零件名称*/ private String partName = " "; /* 零件名称*/
private BigDecimal partLength = new BigDecimal(0.000); /* 零件-长*/ private BigDecimal partLength = new BigDecimal(0.000); /* 零件-长*/
...@@ -176,7 +177,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -176,7 +177,7 @@ public class HGKC003 extends DaoEPBase {
private BigDecimal partCoefficient = new BigDecimal(0.000); /* 零件-系数*/ private BigDecimal partCoefficient = new BigDecimal(0.000); /* 零件-系数*/
private BigDecimal price = new BigDecimal("0"); /* 单价*/ private BigDecimal price = new BigDecimal("0"); /* 单价*/
private BigDecimal amount = new BigDecimal("0"); /* 金额*/ private BigDecimal amount = new BigDecimal("0"); /* 金额*/
private Boolean storageType; /* 入库类型:0:入库 1:退回*/ private Integer storageType; /* 入库类型:0:入库 1:退回*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -843,7 +844,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -843,7 +844,7 @@ public class HGKC003 extends DaoEPBase {
* get the prdtType - 产品类型. * get the prdtType - 产品类型.
* @return the prdtType * @return the prdtType
*/ */
public Integer getPrdtType() { public String getPrdtType() {
return this.prdtType; return this.prdtType;
} }
...@@ -852,7 +853,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -852,7 +853,7 @@ public class HGKC003 extends DaoEPBase {
* *
* @param prdtType - 产品类型 * @param prdtType - 产品类型
*/ */
public void setPrdtType(Integer prdtType) { public void setPrdtType(String prdtType) {
this.prdtType = prdtType; this.prdtType = prdtType;
} }
/** /**
...@@ -955,7 +956,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -955,7 +956,7 @@ public class HGKC003 extends DaoEPBase {
* get the partType - 零件类型. * get the partType - 零件类型.
* @return the partType * @return the partType
*/ */
public Integer getPartType() { public String getPartType() {
return this.partType; return this.partType;
} }
...@@ -964,7 +965,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -964,7 +965,7 @@ public class HGKC003 extends DaoEPBase {
* *
* @param partType - 零件类型 * @param partType - 零件类型
*/ */
public void setPartType(Integer partType) { public void setPartType(String partType) {
this.partType = partType; this.partType = partType;
} }
/** /**
...@@ -1120,11 +1121,11 @@ public class HGKC003 extends DaoEPBase { ...@@ -1120,11 +1121,11 @@ public class HGKC003 extends DaoEPBase {
this.amount = amount; this.amount = amount;
} }
public Boolean getStorageType() { public Integer getStorageType() {
return storageType; return storageType;
} }
public void setStorageType(Boolean storageType) { public void setStorageType(Integer storageType) {
this.storageType = storageType; this.storageType = storageType;
} }
...@@ -1163,14 +1164,14 @@ public class HGKC003 extends DaoEPBase { ...@@ -1163,14 +1164,14 @@ public class HGKC003 extends DaoEPBase {
setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo)); setProdTaskNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_TASK_NO)), prodTaskNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType)); setPrdtType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setPrdtLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_LENGTH)), prdtLength)); setPrdtLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_LENGTH)), prdtLength));
setPrdtWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_WIDTH)), prdtWidth)); setPrdtWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_WIDTH)), prdtWidth));
setPrdtThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_THICK)), prdtThick)); setPrdtThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRDT_THICK)), prdtThick));
setPrdtSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_SPEC)), prdtSpec)); setPrdtSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_SPEC)), prdtSpec));
setPartType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PART_TYPE)), partType)); setPartType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_TYPE)), partType));
setPartCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_CODE)), partCode)); setPartCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_CODE)), partCode));
setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_NAME)), partName)); setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PART_NAME)), partName));
setPartLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_LENGTH)), partLength)); setPartLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_LENGTH)), partLength));
...@@ -1183,7 +1184,7 @@ public class HGKC003 extends DaoEPBase { ...@@ -1183,7 +1184,7 @@ public class HGKC003 extends DaoEPBase {
setPartCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_COEFFICIENT)), partCoefficient)); setPartCoefficient(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PART_COEFFICIENT)), partCoefficient));
setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price)); setPrice(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_PRICE)), price));
setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount)); setAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_AMOUNT)), amount));
setStorageType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType)); setStorageType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STORAGE_TYPE)), storageType));
} }
/** /**
......
...@@ -6,7 +6,9 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -6,7 +6,9 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.HGKC003; import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.*;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -17,8 +19,10 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase; ...@@ -17,8 +19,10 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* @author:songx * @author:songx
...@@ -36,9 +40,7 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -36,9 +40,7 @@ public class ServiceHGKC003 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "初始化") @OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_CODE_BLOCK_ID,DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC003().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC003().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -56,8 +58,7 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -56,8 +58,7 @@ public class ServiceHGKC003 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "查询") @OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
// Map queryRow = EiInfoUtils.getFirstRow(inInfo); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_CODE_BLOCK_ID,DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID));
// HGKCUtils.HgKc003.setCondition(queryRow);
inInfo = super.query(inInfo, HGKC003.QUERY, new HGKC003()); inInfo = super.query(inInfo, HGKC003.QUERY, new HGKC003());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -66,6 +67,33 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -66,6 +67,33 @@ public class ServiceHGKC003 extends ServiceBase {
} }
/** /**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产入库单", operType = "保存", operDesc = "保存")
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HGKC003 hgkc003 = new HGKC003();
hgkc003.fromMap(resultRows.get(i));
// 数据校验
this.checkSubmitData(hgkc003);
DaoUtils.update(HGKC003.UPDATE, hgkc003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 删除操作 * 删除操作
* *
* @param inInfo * @param inInfo
...@@ -75,14 +103,15 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -75,14 +103,15 @@ public class ServiceHGKC003 extends ServiceBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<HGKC003> fKc003s = MapUtils.toDaoEPBase(inInfo, HGKC003.class); List<HGKC003> fKc003s = MapUtils.toDaoEPBase(inInfo, HGKC003.class);
// 锁库存 // 生产入库单ids
Map<String, HGKC003> dbKc003Map = HGKCUtils.HgKc003.lockGetDataEp(fKc003s); List<Long> ids = fKc003s.stream().map(HGKC003::getId).collect(Collectors.toList());
// 锁生产计划明细 for(Long id : ids){
// HPSCTools.HpSc004.lock(prodOrderNos); HGKC003 hgkc003 = HGKCTools.HgKc003.getId(id);
// 校验数据 //修改计划生产任务完工数量
this.checkDeleteData(fKc003s, dbKc003Map); HGSCTools.hgkc003Delete(hgkc003.getQualityId(),hgkc003.getInvQty().negate().intValue(),hgkc003.getRectificationId());
// 查询数据 DaoUtils.update(HGKC003.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
this.deleteData(fKc003s, dbKc003Map); }
inInfo.setMsg("删除成功!"); inInfo.setMsg("删除成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败"); LogUtils.setDetailMsg(inInfo, e, "删除失败");
...@@ -91,16 +120,12 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -91,16 +120,12 @@ public class ServiceHGKC003 extends ServiceBase {
} }
/** /**
* @param fKc003s * @param fKc003
* @param dbKc003Map
*/ */
private void checkDeleteData(List<HGKC003> fKc003s, Map<String, HGKC003> dbKc003Map) { private void checkBackData(HGKC003 fKc003) {
for (HGKC003 fKc003 : fKc003s) { AssertUtils.isEquals(DeleteFlagEnum.REMOVE.getCode(), fKc003.getDeleteFlag(),
String depositNo = fKc003.getDepositNo(); String.format("入库单【%s】已删除,请勿重复操作", fKc003.getDepositNo()));
HGKC003 dbKc003 = dbKc003Map.get(depositNo); AssertUtils.isTrue(fKc003.getSubmitStatus().compareTo(HGConstant.ProductStatus.WTJ) == 0,"入库单"+fKc003.getDepositNo()+"未提交,请勿退回");
AssertUtils.isEquals(DeleteFlagEnum.REMOVE.getCode(), dbKc003.getDeleteFlag(),
String.format("入库单【%s】已删除,请勿重复操作", depositNo));
}
} }
...@@ -117,7 +142,16 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -117,7 +142,16 @@ public class ServiceHGKC003 extends ServiceBase {
for (i = 0; i < eiBlock.getRowCount(); i++) { for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hgkc003.fromMap(map); hgkc003.fromMap(map);
hgkc003 = HGKCTools.HgKc003.getId(hgkc003.getId());
// 校验数据
this.checkSubmitData(hgkc003);
DaoUtils.update(HGKC003.UPDATE_SUBMIT_STATUS, hgkc003); DaoUtils.update(HGKC003.UPDATE_SUBMIT_STATUS, hgkc003);
// 修改库存
HGKCUtils.HgKc010.updateInv(hgkc003.getCompanyCode(), hgkc003.getWhCode(), hgkc003.getPartSpecId(),
hgkc003.getInvQty(), hgkc003.getInvWeight());
//修改计划生产任务完工数量
HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "提交")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "提交")});
...@@ -132,33 +166,62 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -132,33 +166,62 @@ public class ServiceHGKC003 extends ServiceBase {
return inInfo; return inInfo;
} }
private void checkSubmitData(HGKC003 hgkc003) {
AssertUtils.isEmpty(hgkc003.getWhCode(),"仓库编码不能为空!");
AssertUtils.isEmpty(hgkc003.getWhName(),"仓库名称不能为空!");
AssertUtils.isNull(hgkc003.getPrice(),"单价不能为空!");
}
/** /**
* 删除数据 * 退回操作
* @param inInfo
* @return
*/
public EiInfo sendBack(EiInfo inInfo){
int i = 0;
try {
HGKC003 hgkc003 = new HGKC003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgkc003.fromMap(map);
hgkc003 = HGKCTools.HgKc003.getId(hgkc003.getId());
// 校验数据
this.checkBackData(hgkc003);
// 退回数据
this.sendBackOption(hgkc003);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "退回")});
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
ErrorCodeUtils.handleUpdateException(inInfo,i,e);
logError("修改失败", e.getMessage());
return inInfo;
}
return inInfo;
}
/**
* 退回数据
* *
* @param fKc003s * @param fKc003
* @param dbKc003Map
*/ */
private void deleteData(List<HGKC003> fKc003s, Map<String, HGKC003> dbKc003Map) { private void sendBackOption(HGKC003 fKc003) {
for (HGKC003 fKc003 : fKc003s) {
fKc003.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
DaoUtils.update(HGKC003.DELETE, fKc003);
// 生产一条负数量和产量的红冲记录 // 生产一条负数量和产量的红冲记录
HGKC003 dbKc003 = dbKc003Map.get(fKc003.getDepositNo()); HGKC003 newKc003 = BeanUtils.copy(fKc003, HGKC003.class);
HGKC003 newKc003 = BeanUtils.copy(dbKc003, HGKC003.class); newKc003.setInvQty(fKc003.getInvQty().negate());
newKc003.setInvQty(dbKc003.getInvQty().negate()); newKc003.setInvWeight(fKc003.getInvWeight().negate());
newKc003.setInvWeight(dbKc003.getInvWeight().negate());
newKc003.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
newKc003.setDepositNoOld(fKc003.getDepositNo()); newKc003.setDepositNoOld(fKc003.getDepositNo());
newKc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO)); newKc003.setDepositNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROD_DEPOSIT_NO));
fKc003.setStorageType(HGConstant.StorageType.TH);
DaoUtils.insert(HGKC003.INSERT, newKc003); DaoUtils.insert(HGKC003.INSERT, newKc003);
// 同步生产计划
// HPSCTools.syncPlan(newKc003.getProdOrderNo(), newKc003.getAmount());
// 更新生产任务已完成数量
// HPSCTools.HpSc005a.updateCompleteNum(newKc003.getProdTaskNo(), newKc003.getAmount());
// 修改库存 // 修改库存
HGKCUtils.HgKc011.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getProdOrderNo(), HGKCUtils.HgKc010.updateInv(newKc003.getCompanyCode(), newKc003.getWhCode(), newKc003.getPartSpecId(),
newKc003.getInvQty(), newKc003.getInvWeight()); newKc003.getInvQty(), newKc003.getInvWeight());
} //修改计划生产任务完工数量
HGSCTools.complete(fKc003.getQualityId(),newKc003.getInvQty().intValue(),fKc003.getRectificationId());
} }
} }
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
AMOUNT as "amount", <!-- 金额 --> AMOUNT as "amount", <!-- 金额 -->
STORAGE_TYPE as "storageType", <!-- 入库类型:0:入库 1:退回 --> STORAGE_TYPE as "storageType", <!-- 入库类型:0:入库 1:退回 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 --> SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC003 WHERE 1=1 FROM ${hggpSchema}.HGKC003 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -281,12 +281,11 @@ ...@@ -281,12 +281,11 @@
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hggpSchema}.HGKC003 WHERE UPDATE ${hggpSchema}.HGKC003 SET DELETE_FLAG = 1 WHERE ID = #id#
ID = #id#
</delete> </delete>
<delete id="batchDelete"> <delete id="batchDelete">
DELETE FROM ${hggpSchema}.HGKC003 WHERE UPDATE ${hggpSchema}.HGKC003 SET DELETE_FLAG = 1 WHERE
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</delete> </delete>
......
...@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baosight.hggp.common.CheckTypeEnum; import com.baosight.hggp.common.CheckTypeEnum;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
...@@ -12,6 +13,7 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools; ...@@ -12,6 +13,7 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.zl.domain.HGZL002; import com.baosight.hggp.hg.zl.domain.HGZL002;
import com.baosight.hggp.hg.zl.domain.HGZL004; import com.baosight.hggp.hg.zl.domain.HGZL004;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -133,6 +135,22 @@ public class HGKCTools { ...@@ -133,6 +135,22 @@ public class HGKCTools {
*/ */
public static class HgKc003 { public static class HgKc003 {
/**
* 生产入库单信息
*
* @param id
* @return
*/
public static HGKC003 getId(Long id) {
AssertUtils.isEmpty(Collections.singleton(id), "生产入库单为空!");
Map<String, Object> paramMap = new HashMap();
paramMap.put("id", id);
paramMap.put("deleteFlag", 0);
List<HGKC003> list = DaoBase.getInstance().query(HGKC003.QUERY, paramMap);
AssertUtils.isEmpty(list, "生产入库单为空!");
return list.get(0);
}
public static HGKC003 save(HGKC003 hgkc003,List<HGKC003A> hgkc003aList){ public static HGKC003 save(HGKC003 hgkc003,List<HGKC003A> hgkc003aList){
checkSaveData(hgkc003,hgkc003aList); checkSaveData(hgkc003,hgkc003aList);
...@@ -178,15 +196,16 @@ public class HGKCTools { ...@@ -178,15 +196,16 @@ public class HGKCTools {
*/ */
public static void putInStorageData(List<HGZL002> hgzl002List) { public static void putInStorageData(List<HGZL002> hgzl002List) {
List<HGKC003> hgkc003List = new LinkedList<>(); List<HGKC003> hgkc003List = new LinkedList<>();
setHgkc003Data(hgzl002List,hgkc003List, null); setHgkc003Data(hgzl002List,hgkc003List, null, null);
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List); DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
} }
/** /**
* 对象赋值(工序质检单) * 对象赋值(工序质检单)
* @param hgzl002List * @param hgzl002List
* @param code * @param code
* @param hgzl004List
*/ */
private static void setHgkc003Data(List<HGZL002> hgzl002List, List<HGKC003> hgkc003List, Integer code) { private static void setHgkc003Data(List<HGZL002> hgzl002List, List<HGKC003> hgkc003List, Integer code, List<HGZL004> hgzl004List) {
List<String> inventCodes = hgzl002List.stream().map(HGZL002::getProductCode).collect(Collectors.toList()); List<String> inventCodes = hgzl002List.stream().map(HGZL002::getProductCode).collect(Collectors.toList());
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.listByInventCodes(inventCodes); List<HGPZ005> hgpz005List = HGPZTools.HgPz005.listByInventCodes(inventCodes);
hgzl002List.forEach(o->{ hgzl002List.forEach(o->{
...@@ -201,8 +220,10 @@ public class HGKCTools { ...@@ -201,8 +220,10 @@ public class HGKCTools {
hgkc003.setAccountCode(o.getAccountCode()); hgkc003.setAccountCode(o.getAccountCode());
hgkc003.setDepCode(o.getDepCode()); hgkc003.setDepCode(o.getDepCode());
if(Objects.nonNull(code)){ if(Objects.nonNull(code)){
HGZL004 hgzl004 = hgzl004List.stream().filter(h->h.getCheckId().equals(o.getId())).findAny().orElse(null);
//整改通知单 //整改通知单
hgkc003.setInvQty(new BigDecimal(o.getUnpassQuantity())); hgkc003.setInvQty(new BigDecimal(o.getUnpassQuantity()));
hgkc003.setRectificationId(hgzl004.getId());
}else{ }else{
//工序质检单 //工序质检单
hgkc003.setInvQty(new BigDecimal(o.getPassQuantity())); hgkc003.setInvQty(new BigDecimal(o.getPassQuantity()));
...@@ -217,13 +238,16 @@ public class HGKCTools { ...@@ -217,13 +238,16 @@ public class HGKCTools {
hgkc003.setProjName(o.getProjName()); hgkc003.setProjName(o.getProjName());
hgkc003.setPartCode(o.getProductCode()); hgkc003.setPartCode(o.getProductCode());
hgkc003.setPartName(o.getProductName()); hgkc003.setPartName(o.getProductName());
hgkc003.setPartType(o.getProductType()); hgkc003.setPartType(hgpz005.getInventType());
hgkc003.setPartSpecId(hgpz005.getId()); hgkc003.setPartSpecId(hgpz005.getId());
hgkc003.setPartSpec(hgpz005.getSpec()); hgkc003.setPartSpec(hgpz005.getSpec());
hgkc003.setPartCoefficient(hgpz005.getCoefficient()); hgkc003.setPartCoefficient(hgpz005.getCoefficient());
hgkc003.setPartLength(hgpz005.getLength()); hgkc003.setPartLength(hgpz005.getLength());
hgkc003.setPartWidth(hgpz005.getWidth()); hgkc003.setPartWidth(hgpz005.getWidth());
hgkc003.setPartThick(hgpz005.getThick()); hgkc003.setPartThick(hgpz005.getThick());
hgkc003.setDepositDate(DateUtils.shortDate());
hgkc003.setStorageType(HGConstant.StorageType.RK);
hgkc003.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
hgkc003List.add(hgkc003); hgkc003List.add(hgkc003);
} }
}); });
...@@ -246,7 +270,7 @@ public class HGKCTools { ...@@ -246,7 +270,7 @@ public class HGKCTools {
checkParamMap.put("ids", checkIds); checkParamMap.put("ids", checkIds);
List<HGZL002> hgzl002List = DaoBase.getInstance().query(HGZL002.QUERY, checkParamMap); List<HGZL002> hgzl002List = DaoBase.getInstance().query(HGZL002.QUERY, checkParamMap);
//赋值 //赋值
setHgkc003Data(hgzl002List,hgkc003List,CheckTypeEnum.PROCESS_CHECK.getCode()); setHgkc003Data(hgzl002List,hgkc003List,CheckTypeEnum.PROCESS_CHECK.getCode(),hgzl004List);
DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List); DaoUtils.insertBatch(HGKC003.INSERT,hgkc003List);
} }
} }
......
package com.baosight.hggp.hg.kc.utils; package com.baosight.hggp.hg.kc.utils;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
...@@ -14,9 +15,12 @@ import com.baosight.hggp.util.DateUtils; ...@@ -14,9 +15,12 @@ import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils; import com.baosight.hggp.util.ObjectUtils;
import com.baosight.hggp.util.StringUtils; import com.baosight.hggp.util.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.util.Collections;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -165,6 +169,7 @@ public class HGKCUtils { ...@@ -165,6 +169,7 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc003.map(depositNos); return HGKCTools.HgKc003.map(depositNos);
} }
} }
public static class HgKc006 { public static class HgKc006 {
......
...@@ -2,10 +2,7 @@ package com.baosight.hggp.hg.sc.tools; ...@@ -2,10 +2,7 @@ package com.baosight.hggp.hg.sc.tools;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.copier.SrcToDestCopier; import cn.hutool.core.lang.copier.SrcToDestCopier;
import com.baosight.hggp.common.AssignStatusEnum; import com.baosight.hggp.common.*;
import com.baosight.hggp.common.CheckStatusEnum;
import com.baosight.hggp.common.ComputeTypeEnum;
import com.baosight.hggp.common.ProductTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase; import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
...@@ -132,8 +129,19 @@ public class HGSCTools { ...@@ -132,8 +129,19 @@ public class HGSCTools {
} }
public static void complete(Long checkId, Integer completeNum){ public static void complete(Long checkId, Integer completeNum, Long rectificationId){
HGZL002 hgzl002 = HGZLTools.THGZL002.get(checkId); HGZL002 hgzl002 = HGZLTools.THGZL002.get(checkId);
if(Objects.nonNull(rectificationId) && rectificationId.intValue() != 0){
//更新整改通知单状态,工序质检单与整改通知单是2条入库单数据
HGZL004 hgzl004 = HGZLTools.THGZL004.get(rectificationId);
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
DaoUtils.update(HGZL004.UPDATE,hgzl004);
}else{
//整改通知单id为空的入库单才是工序质检单生成的入库单。
//更新工序质检单状态
hgzl002.setCheckStatus(CheckStatusEnum.CHECKING.getCode());
DaoUtils.update(HGZL002.UPDATE,hgzl002);
}
HGSC008 hgsc008 = THGSC008.getById(hgzl002.getWorkId()); HGSC008 hgsc008 = THGSC008.getById(hgzl002.getWorkId());
HGSC007 hgsc007 = THGSC007.getById(hgsc008.getTaskId()); HGSC007 hgsc007 = THGSC007.getById(hgsc008.getTaskId());
//更新生产任务完工数量 //更新生产任务完工数量
...@@ -160,6 +168,21 @@ public class HGSCTools { ...@@ -160,6 +168,21 @@ public class HGSCTools {
DaoUtils.update(HGSC005A.UPDATE,hgsc005A); DaoUtils.update(HGSC005A.UPDATE,hgsc005A);
} }
public static void hgkc003Delete(Long checkId, Integer completeNum, Long rectificationId){
HGZL002 hgzl002 = HGZLTools.THGZL002.get(checkId);
if(Objects.nonNull(rectificationId) && rectificationId.intValue() != 0){
//更新整改通知单状态,工序质检单与整改通知单是2条入库单数据
HGZL004 hgzl004 = HGZLTools.THGZL004.get(rectificationId);
hgzl004.setHandleStatus(HandleStatusEnum.UNPROCESS.getCode());
DaoUtils.update(HGZL004.UPDATE,hgzl004);
}else{
//整改通知单id为空的入库单才是工序质检单生成的入库单。
//更新工序质检单状态
hgzl002.setCheckStatus(CheckStatusEnum.CHECKING.getCode());
DaoUtils.update(HGZL002.UPDATE,hgzl002);
}
}
public static class Hgsc001 { public static class Hgsc001 {
public static HGSC001 queryByCode(String code) { public static HGSC001 queryByCode(String code) {
AssertUtils.isNull(code, "项目Code不能为空!"); AssertUtils.isNull(code, "项目Code不能为空!");
......
...@@ -3,6 +3,8 @@ package com.baosight.hggp.hg.yx.domain; ...@@ -3,6 +3,8 @@ package com.baosight.hggp.hg.yx.domain;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils; import com.baosight.iplat4j.core.util.StringUtils;
...@@ -119,8 +121,8 @@ public class HGYX001 extends DaoEPBase { ...@@ -119,8 +121,8 @@ public class HGYX001 extends DaoEPBase {
private String receUserPhone = " "; /* 收货人电话*/ private String receUserPhone = " "; /* 收货人电话*/
private Integer tranType = 0; /* 运输方式*/ private Integer tranType = 0; /* 运输方式*/
private String numPlate = " "; /* 车号*/ private String numPlate = " "; /* 车号*/
private String consQuantity = " "; /* 发货数量*/ private BigDecimal consQuantity = new BigDecimal("0"); /* 发货数量*/
private String consWeight = " "; /* 发货重量*/ private BigDecimal consWeight = new BigDecimal("0"); /* 发货重量*/
private Integer status = 0; /* 审批状态 0-未审核,1-已审核*/ private Integer status = 0; /* 审批状态 0-未审核,1-已审核*/
/** /**
...@@ -239,10 +241,16 @@ public class HGYX001 extends DaoEPBase { ...@@ -239,10 +241,16 @@ public class HGYX001 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_QUANTITY); eiColumn = new EiColumn(FIELD_CONS_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("发货数量"); eiColumn.setDescName("发货数量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WEIGHT); eiColumn = new EiColumn(FIELD_CONS_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("发货重量"); eiColumn.setDescName("发货重量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -696,7 +704,7 @@ public class HGYX001 extends DaoEPBase { ...@@ -696,7 +704,7 @@ public class HGYX001 extends DaoEPBase {
* get the consQuantity - 发货数量. * get the consQuantity - 发货数量.
* @return the consQuantity * @return the consQuantity
*/ */
public String getConsQuantity() { public BigDecimal getConsQuantity() {
return this.consQuantity; return this.consQuantity;
} }
...@@ -705,14 +713,14 @@ public class HGYX001 extends DaoEPBase { ...@@ -705,14 +713,14 @@ public class HGYX001 extends DaoEPBase {
* *
* @param consQuantity - 发货数量 * @param consQuantity - 发货数量
*/ */
public void setConsQuantity(String consQuantity) { public void setConsQuantity(BigDecimal consQuantity) {
this.consQuantity = consQuantity; this.consQuantity = consQuantity;
} }
/** /**
* get the consWeight - 发货重量. * get the consWeight - 发货重量.
* @return the consWeight * @return the consWeight
*/ */
public String getConsWeight() { public BigDecimal getConsWeight() {
return this.consWeight; return this.consWeight;
} }
...@@ -721,7 +729,7 @@ public class HGYX001 extends DaoEPBase { ...@@ -721,7 +729,7 @@ public class HGYX001 extends DaoEPBase {
* *
* @param consWeight - 发货重量 * @param consWeight - 发货重量
*/ */
public void setConsWeight(String consWeight) { public void setConsWeight(BigDecimal consWeight) {
this.consWeight = consWeight; this.consWeight = consWeight;
} }
/** /**
...@@ -775,8 +783,8 @@ public class HGYX001 extends DaoEPBase { ...@@ -775,8 +783,8 @@ public class HGYX001 extends DaoEPBase {
setReceUserPhone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_USER_PHONE)), receUserPhone)); setReceUserPhone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_USER_PHONE)), receUserPhone));
setTranType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TRAN_TYPE)), tranType)); setTranType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TRAN_TYPE)), tranType));
setNumPlate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NUM_PLATE)), numPlate)); setNumPlate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_NUM_PLATE)), numPlate));
setConsQuantity(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_QUANTITY)), consQuantity)); setConsQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONS_QUANTITY)), consQuantity));
setConsWeight(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WEIGHT)), consWeight)); setConsWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_CONS_WEIGHT)), consWeight));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
} }
......
package com.baosight.hggp.hg.yx.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgyx002.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-07 14:37:36 create
*/
public class HGYX002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
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 FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_RETURN_CODE = "returnCode"; /* 退货单号*/
public static final String FIELD_DELIVERY_CODE = "deliveryCode"; /* 发货单号*/
public static final String FIELD_OUTBOUND_CODE = "outboundCode"; /* 出库单号*/
public static final String FIELD_CONS_CODE = "consCode"; /* 发货方编码*/
public static final String FIELD_CONS_NAME = "consName"; /* 发货方名称*/
public static final String FIELD_CONS_WH_CODE = "consWhCode"; /* 发货仓库编码*/
public static final String FIELD_CONS_WH_NAME = "consWhName"; /* 发货仓库名称*/
public static final String FIELD_CONS_ADDR = "consAddr"; /* 发货地址*/
public static final String FIELD_RECE_CODE = "receCode"; /* 收货方编码*/
public static final String FIELD_RECE_NAME = "receName"; /* 收货方名称*/
public static final String FIELD_RECE_USER_PHONE = "receUserPhone"; /* 收货人电话*/
public static final String FIELD_RETURN_QUANTITY = "returnQuantity"; /* 退货数量*/
public static final String FIELD_RETURN_WEIGHT = "returnWeight"; /* 退货重量*/
public static final String FIELD_REMARKS = "remarks"; /* 退货原因*/
public static final String FIELD_STATUS = "status"; /* 审批状态 0-未审核,1-已审核*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
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 COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_RETURN_CODE = "RETURN_CODE"; /* 退货单号*/
public static final String COL_DELIVERY_CODE = "DELIVERY_CODE"; /* 发货单号*/
public static final String COL_CONS_CODE = "CONS_CODE"; /* 发货方编码*/
public static final String COL_CONS_NAME = "CONS_NAME"; /* 发货方名称*/
public static final String COL_CONS_ADDR = "CONS_ADDR"; /* 发货地址*/
public static final String COL_RECE_CODE = "RECE_CODE"; /* 收货方编码*/
public static final String COL_RECE_NAME = "RECE_NAME"; /* 收货方名称*/
public static final String COL_RECE_USER_PHONE = "RECE_USER_PHONE"; /* 收货人电话*/
public static final String COL_RETURN_QUANTITY = "RETURN_QUANTITY"; /* 退货数量*/
public static final String COL_RETURN_WEIGHT = "RETURN_WEIGHT"; /* 退货重量*/
public static final String COL_REMARKS = "REMARKS"; /* 退货原因*/
public static final String COL_STATUS = "STATUS"; /* 审批状态 0-未审核,1-已审核*/
public static final String QUERY = "HGYX002.query";
public static final String COUNT = "HGYX002.count";
public static final String INSERT = "HGYX002.insert";
public static final String UPDATE = "HGYX002.update";
public static final String DELETE = "HGYX002.delete";
public static final String DELETE_FLAG = "HGYX002.deleteFlag";
public static final String BATCH_COMMIT = "HGYX002.batchCommit";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String returnCode = " "; /* 退货单号*/
private String deliveryCode = " "; /* 发货单号*/
private String outboundCode = " "; /* 出库单号*/
private String consCode = " "; /* 发货方编码*/
private String consName = " "; /* 发货方名称*/
private String consWhCode = " "; /* 发货仓库编码*/
private String consWhName = " "; /* 发货仓库名称*/
private String consAddr = " "; /* 发货地址*/
private String receCode = " "; /* 收货方编码*/
private String receName = " "; /* 收货方名称*/
private String receUserPhone = " "; /* 收货人电话*/
private BigDecimal returnQuantity = new BigDecimal(0); /* 退货数量*/
private BigDecimal returnWeight = new BigDecimal("0.000"); /* 退货重量*/
private String remarks = " "; /* 退货原因*/
private Integer status = 0; /* 审批状态 0-未审核,1-已审核*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_CODE);
eiColumn.setDescName("退货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELIVERY_CODE);
eiColumn.setDescName("发货单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OUTBOUND_CODE);
eiColumn.setDescName("出库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_CODE);
eiColumn.setDescName("发货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_NAME);
eiColumn.setDescName("发货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_CODE);
eiColumn.setDescName("发货仓库编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_WH_NAME);
eiColumn.setDescName("发货仓库名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONS_ADDR);
eiColumn.setDescName("发货地址");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_CODE);
eiColumn.setDescName("收货方编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_NAME);
eiColumn.setDescName("收货方名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RECE_USER_PHONE);
eiColumn.setDescName("收货人电话");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("退货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("退货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARKS);
eiColumn.setDescName("退货原因");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("审批状态 0-未审核,1-已审核");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX002() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the returnCode - 退货单号.
* @return the returnCode
*/
public String getReturnCode() {
return this.returnCode;
}
/**
* set the returnCode - 退货单号.
*
* @param returnCode - 退货单号
*/
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
/**
* get the deliveryCode - 发货单号.
* @return the deliveryCode
*/
public String getDeliveryCode() {
return this.deliveryCode;
}
/**
* set the deliveryCode - 发货单号.
*
* @param deliveryCode - 发货单号
*/
public void setDeliveryCode(String deliveryCode) {
this.deliveryCode = deliveryCode;
}
public String getOutboundCode() {
return outboundCode;
}
public void setOutboundCode(String outboundCode) {
this.outboundCode = outboundCode;
}
/**
* get the consCode - 发货方编码.
* @return the consCode
*/
public String getConsCode() {
return this.consCode;
}
/**
* set the consCode - 发货方编码.
*
* @param consCode - 发货方编码
*/
public void setConsCode(String consCode) {
this.consCode = consCode;
}
/**
* get the consName - 发货方名称.
* @return the consName
*/
public String getConsName() {
return this.consName;
}
/**
* set the consName - 发货方名称.
*
* @param consName - 发货方名称
*/
public void setConsName(String consName) {
this.consName = consName;
}
public String getConsWhCode() {
return consWhCode;
}
public void setConsWhCode(String consWhCode) {
this.consWhCode = consWhCode;
}
public String getConsWhName() {
return consWhName;
}
public void setConsWhName(String consWhName) {
this.consWhName = consWhName;
}
/**
* get the consAddr - 发货地址.
* @return the consAddr
*/
public String getConsAddr() {
return this.consAddr;
}
/**
* set the consAddr - 发货地址.
*
* @param consAddr - 发货地址
*/
public void setConsAddr(String consAddr) {
this.consAddr = consAddr;
}
/**
* get the receCode - 收货方编码.
* @return the receCode
*/
public String getReceCode() {
return this.receCode;
}
/**
* set the receCode - 收货方编码.
*
* @param receCode - 收货方编码
*/
public void setReceCode(String receCode) {
this.receCode = receCode;
}
/**
* get the receName - 收货方名称.
* @return the receName
*/
public String getReceName() {
return this.receName;
}
/**
* set the receName - 收货方名称.
*
* @param receName - 收货方名称
*/
public void setReceName(String receName) {
this.receName = receName;
}
/**
* get the receUserPhone - 收货人电话.
* @return the receUserPhone
*/
public String getReceUserPhone() {
return this.receUserPhone;
}
/**
* set the receUserPhone - 收货人电话.
*
* @param receUserPhone - 收货人电话
*/
public void setReceUserPhone(String receUserPhone) {
this.receUserPhone = receUserPhone;
}
/**
* get the returnQuantity - 退货数量.
* @return the returnQuantity
*/
public BigDecimal getReturnQuantity() {
return this.returnQuantity;
}
/**
* set the returnQuantity - 退货数量.
*
* @param returnQuantity - 退货数量
*/
public void setReturnQuantity(BigDecimal returnQuantity) {
this.returnQuantity = returnQuantity;
}
/**
* get the returnWeight - 退货重量.
* @return the returnWeight
*/
public BigDecimal getReturnWeight() {
return this.returnWeight;
}
/**
* set the returnWeight - 退货重量.
*
* @param returnWeight - 退货重量
*/
public void setReturnWeight(BigDecimal returnWeight) {
this.returnWeight = returnWeight;
}
/**
* get the remarks - 退货原因.
* @return the remarks
*/
public String getRemarks() {
return this.remarks;
}
/**
* set the remarks - 退货原因.
*
* @param remarks - 退货原因
*/
public void setRemarks(String remarks) {
this.remarks = remarks;
}
/**
* get the status - 审批状态 0-未审核,1-已审核.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 审批状态 0-未审核,1-已审核.
*
* @param status - 审批状态 0-未审核,1-已审核
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setReturnCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RETURN_CODE)), returnCode));
setDeliveryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DELIVERY_CODE)), deliveryCode));
setOutboundCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OUTBOUND_CODE)), outboundCode));
setConsCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_CODE)), consCode));
setConsName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_NAME)), consName));
setConsWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_CODE)), consWhCode));
setConsWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_WH_NAME)), consWhName));
setConsAddr(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONS_ADDR)), consAddr));
setReceCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_CODE)), receCode));
setReceName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_NAME)), receName));
setReceUserPhone(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECE_USER_PHONE)), receUserPhone));
setReturnQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_QUANTITY)), returnQuantity));
setReturnWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_WEIGHT)), returnWeight));
setRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARKS)), remarks));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_RETURN_CODE, StringUtils.toString(returnCode, eiMetadata.getMeta(FIELD_RETURN_CODE)));
map.put(FIELD_DELIVERY_CODE, StringUtils.toString(deliveryCode, eiMetadata.getMeta(FIELD_DELIVERY_CODE)));
map.put(FIELD_OUTBOUND_CODE, StringUtils.toString(outboundCode, eiMetadata.getMeta(FIELD_OUTBOUND_CODE)));
map.put(FIELD_CONS_CODE, StringUtils.toString(consCode, eiMetadata.getMeta(FIELD_CONS_CODE)));
map.put(FIELD_CONS_NAME, StringUtils.toString(consName, eiMetadata.getMeta(FIELD_CONS_NAME)));
map.put(FIELD_CONS_WH_CODE, StringUtils.toString(consWhCode, eiMetadata.getMeta(FIELD_CONS_WH_CODE)));
map.put(FIELD_CONS_WH_NAME, StringUtils.toString(consWhName, eiMetadata.getMeta(FIELD_CONS_WH_NAME)));
map.put(FIELD_CONS_ADDR, StringUtils.toString(consAddr, eiMetadata.getMeta(FIELD_CONS_ADDR)));
map.put(FIELD_RECE_CODE, StringUtils.toString(receCode, eiMetadata.getMeta(FIELD_RECE_CODE)));
map.put(FIELD_RECE_NAME, StringUtils.toString(receName, eiMetadata.getMeta(FIELD_RECE_NAME)));
map.put(FIELD_RECE_USER_PHONE, StringUtils.toString(receUserPhone, eiMetadata.getMeta(FIELD_RECE_USER_PHONE)));
map.put(FIELD_RETURN_QUANTITY, StringUtils.toString(returnQuantity, eiMetadata.getMeta(FIELD_RETURN_QUANTITY)));
map.put(FIELD_RETURN_WEIGHT, StringUtils.toString(returnWeight, eiMetadata.getMeta(FIELD_RETURN_WEIGHT)));
map.put(FIELD_REMARKS, StringUtils.toString(remarks, eiMetadata.getMeta(FIELD_REMARKS)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
return map;
}
}
package com.baosight.hggp.hg.yx.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/**
* Project: <br>
* Title:Hgyx002a.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-07 14:37:36 create
*/
public class HGYX002A extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
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 FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_INVENT_RECORD_ID = "inventRecordId"; /* 存货档案id*/
public static final String FIELD_INVENT_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
public static final String FIELD_SPEC = "spec"; /* 规格*/
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_QUANTITY = "quantity"; /* 发货数量*/
public static final String FIELD_UNIT_WEIGHT = "unitWeight"; /* 单重*/
public static final String FIELD_WEIGHT = "weight"; /* 发货重量*/
public static final String FIELD_RETURN_QUANTITY = "returnQuantity"; /* 退货数量*/
public static final String FIELD_RETURN_WEIGHT = "returnWeight"; /* 退货重量*/
public static final String FIELD_PARENT_ID = "parentId"; /* 销售退货ID*/
public static final String COL_ID = "ID"; /* ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
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 COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_INVENT_RECORD_ID = "INVENT_RECORD_ID"; /* 存货档案id*/
public static final String COL_INVENT_TYPE = "INVENT_TYPE"; /* 存货类型*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 存货编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 存货名称*/
public static final String COL_SPEC = "SPEC"; /* 规格*/
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_QUANTITY = "QUANTITY"; /* 发货数量*/
public static final String COL_UNIT_WEIGHT = "UNIT_WEIGHT"; /* 单重*/
public static final String COL_WEIGHT = "WEIGHT"; /* 发货重量*/
public static final String COL_RETURN_QUANTITY = "RETURN_QUANTITY"; /* 退货数量*/
public static final String COL_RETURN_WEIGHT = "RETURN_WEIGHT"; /* 退货重量*/
public static final String COL_PARENT_ID = "PARENT_ID"; /* 销售退货ID*/
public static final String QUERY = "HGYX002A.query";
public static final String COUNT = "HGYX002A.count";
public static final String INSERT = "HGYX002A.insert";
public static final String UPDATE = "HGYX002A.update";
public static final String DELETE = "HGYX002A.delete";
public static final String DELETE_FLAG = "HGYX002A.deleteFlag";
public static final String DELETE_BY_PARENT_ID = "HGYX002A.deleteByParentId";
private Long id = new Long(0); /* ID*/
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private Long inventRecordId = new Long(0); /* 存货档案id*/
private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private BigDecimal quantity = new BigDecimal("0"); /* 发货数量*/
private BigDecimal unitWeight = new BigDecimal("0"); /* 单重*/
private BigDecimal weight = new BigDecimal("0"); /* 发货重量*/
private BigDecimal returnQuantity = new BigDecimal(0); /* 退货数量*/
private BigDecimal returnWeight = new BigDecimal(0.000); /* 退货重量*/
private Long parentId = new Long(0); /* 销售退货ID*/
/**
* 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_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
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(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("存货档案id");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_CODE);
eiColumn.setDescName("存货编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_NAME);
eiColumn.setDescName("存货名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SPEC);
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_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("发货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UNIT_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("单重");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("发货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_QUANTITY);
eiColumn.setType("N");
eiColumn.setScaleLength(0);
eiColumn.setFieldLength(20);
eiColumn.setDescName("退货数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RETURN_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(17);
eiColumn.setDescName("退货重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PARENT_ID);
eiColumn.setDescName("销售退货ID");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGYX002A() {
initMetaData();
}
/**
* get the id - ID.
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id - ID.
*
* @param id - ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the inventRecordId - 存货档案id.
* @return the inventRecordId
*/
public Long getInventRecordId() {
return this.inventRecordId;
}
/**
* set the inventRecordId - 存货档案id.
*
* @param inventRecordId - 存货档案id
*/
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
return this.inventType;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
this.inventType = inventType;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public String getInventCode() {
return this.inventCode;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public void setInventCode(String inventCode) {
this.inventCode = inventCode;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public String getInventName() {
return this.inventName;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public void setInventName(String inventName) {
this.inventName = inventName;
}
/**
* get the spec - 规格.
* @return the spec
*/
public String getSpec() {
return this.spec;
}
/**
* set the spec - 规格.
*
* @param spec - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* 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 quantity - 发货数量.
* @return the quantity
*/
public BigDecimal getQuantity() {
return this.quantity;
}
/**
* set the quantity - 发货数量.
*
* @param quantity - 发货数量
*/
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
/**
* get the unitWeight - 单重.
* @return the unitWeight
*/
public BigDecimal getUnitWeight() {
return this.unitWeight;
}
/**
* set the unitWeight - 单重.
*
* @param unitWeight - 单重
*/
public void setUnitWeight(BigDecimal unitWeight) {
this.unitWeight = unitWeight;
}
/**
* get the weight - 发货重量.
* @return the weight
*/
public BigDecimal getWeight() {
return this.weight;
}
/**
* set the weight - 发货重量.
*
* @param weight - 发货重量
*/
public void setWeight(BigDecimal weight) {
this.weight = weight;
}
/**
* get the returnQuantity - 退货数量.
* @return the returnQuantity
*/
public BigDecimal getReturnQuantity() {
return this.returnQuantity;
}
/**
* set the returnQuantity - 退货数量.
*
* @param returnQuantity - 退货数量
*/
public void setReturnQuantity(BigDecimal returnQuantity) {
this.returnQuantity = returnQuantity;
}
/**
* get the returnWeight - 退货重量.
* @return the returnWeight
*/
public BigDecimal getReturnWeight() {
return this.returnWeight;
}
/**
* set the returnWeight - 退货重量.
*
* @param returnWeight - 退货重量
*/
public void setReturnWeight(BigDecimal returnWeight) {
this.returnWeight = returnWeight;
}
/**
* get the parentId - 销售退货ID.
* @return the parentId
*/
public Long getParentId() {
return this.parentId;
}
/**
* set the parentId - 销售退货ID.
*
* @param parentId - 销售退货ID
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
/**
* 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));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
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));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
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));
setQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_QUANTITY)), quantity));
setUnitWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_WEIGHT)), unitWeight));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setReturnQuantity(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_QUANTITY)), returnQuantity));
setReturnWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_RETURN_WEIGHT)), returnWeight));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
}
/**
* 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_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put(FIELD_INVENT_TYPE, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_INVENT_TYPE)));
map.put(FIELD_INVENT_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
map.put(FIELD_SPEC, StringUtils.toString(spec, eiMetadata.getMeta(FIELD_SPEC)));
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_QUANTITY, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_QUANTITY)));
map.put(FIELD_UNIT_WEIGHT, StringUtils.toString(unitWeight, eiMetadata.getMeta(FIELD_UNIT_WEIGHT)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_RETURN_QUANTITY, StringUtils.toString(returnQuantity, eiMetadata.getMeta(FIELD_RETURN_QUANTITY)));
map.put(FIELD_RETURN_WEIGHT, StringUtils.toString(returnWeight, eiMetadata.getMeta(FIELD_RETURN_WEIGHT)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
return map;
}
}
...@@ -136,8 +136,8 @@ public class ServiceHGYX001 extends ServiceEPBase { ...@@ -136,8 +136,8 @@ public class ServiceHGYX001 extends ServiceEPBase {
* 新增操作 * 新增操作
*/ */
public void add(HGYX001 hgyx001) { public void add(HGYX001 hgyx001) {
//生成工序编码 //销售发货单号
hgyx001.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE)); hgyx001.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.DELIVERY_CODE));
DaoUtils.insert(HGYX001.INSERT, hgyx001); DaoUtils.insert(HGYX001.INSERT, hgyx001);
} }
...@@ -188,6 +188,7 @@ public class ServiceHGYX001 extends ServiceEPBase { ...@@ -188,6 +188,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
//List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id); //List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id);
for (Map resultRow:resultRows) { for (Map resultRow:resultRows) {
//销售出库单号
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE); String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
HGYX001 hgyx001 = new HGYX001(); HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(resultRow); hgyx001.fromMap(resultRow);
...@@ -270,10 +271,10 @@ public class ServiceHGYX001 extends ServiceEPBase { ...@@ -270,10 +271,10 @@ public class ServiceHGYX001 extends ServiceEPBase {
for (Map queryRow:queryBlock) { for (Map queryRow:queryBlock) {
HGYX001 hgyx001 = new HGYX001(); HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(queryRow); hgyx001.fromMap(queryRow);
if (hgyx001.getId() == null || hgyx001.getId() == 0) { hgyx001.setStatus(1);
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE); String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
hgyx001.setOutboundCode(outboundCode); hgyx001.setOutboundCode(outboundCode);
hgyx001.setStatus(1); if (hgyx001.getId() == null || hgyx001.getId() == 0) {
this.add(hgyx001); this.add(hgyx001);
HGKC004 hgkc004 = new HGKC004(); HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx001.getId()); hgkc004.setParentId(hgyx001.getId());
...@@ -306,6 +307,13 @@ public class ServiceHGYX001 extends ServiceEPBase { ...@@ -306,6 +307,13 @@ public class ServiceHGYX001 extends ServiceEPBase {
} }
} else { } else {
this.modify(hgyx001); this.modify(hgyx001);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx001.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx001.getCompanyCode());
hgkc004.setWhCode(hgyx001.getConsWhCode());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A(); HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow); hgyx001A.fromMap(resultRow);
...@@ -315,6 +323,20 @@ public class ServiceHGYX001 extends ServiceEPBase { ...@@ -315,6 +323,20 @@ public class ServiceHGYX001 extends ServiceEPBase {
}else { }else {
this.modifyDatail(hgyx001A); this.modifyDatail(hgyx001A);
} }
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx001A.getInventType());
hgkc004A.setInventCode(hgyx001A.getInventCode());
hgkc004A.setInventName(hgyx001A.getInventName());
hgkc004A.setInventRecordId(hgyx001A.getInventRecordId());
hgkc004A.setSpec(hgyx001A.getSpec());
hgkc004A.setLength(hgyx001A.getLength());
hgkc004A.setThick(hgyx001A.getThick());
hgkc004A.setWidth(hgyx001A.getWidth());
hgkc004A.setQuantity(hgyx001A.getQuantity());
hgkc004A.setUnitWeight(hgyx001A.getUnitWeight());
hgkc004A.setWeight(hgyx001A.getWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
} }
} }
} }
......
...@@ -36,6 +36,7 @@ public class ServiceHGYX001A extends ServiceEPBase { ...@@ -36,6 +36,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID); String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
String type = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type");
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A()); EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear(); outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) { if (id != null) {
...@@ -45,6 +46,7 @@ public class ServiceHGYX001A extends ServiceEPBase { ...@@ -45,6 +46,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001)); outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
} }
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type", type);
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata); outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo, CommonMethod.initBlock(outInfo,
......
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC004;
import com.baosight.hggp.hg.kc.domain.HGKC004A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, EiConstant.resultBlock, new HGYX002());
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002().eiMetadata);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROJ_RECORD_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
outInfo.set(HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002.QUERY,new HGYX002());
}
/**
* 删除
* @param inInfo inInfo
* @return
*/
@OperationLogAnnotation(operModul = "销售退货",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(map);
hgyx002.setDeleteFlag(CommonConstant.YesNo.YES_1);
if (hgyx002.getStatus()==1) {
throw new PlatException("已审核,无法删除!");
}
DaoUtils.update(HGYX002.DELETE_FLAG, hgyx002);
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.setParentId(hgyx002.getId());
hgyx002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX002A.DELETE_BY_PARENT_ID, hgyx002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
/**
* 保存操作
*/
@OperationLogAnnotation(operModul = "销售退货",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(queryRow);
if (hgyx002.getId() == null || hgyx002.getId() == 0) {
this.add(hgyx002);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}
}
} else {
this.modify(hgyx002);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}else {
this.modifyDatail(hgyx002A);
}
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作
*/
public void add(HGYX002 hgyx002) {
//销售退货单号
hgyx002.setReturnCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RETURN_CODE));
DaoUtils.insert(HGYX002.INSERT, hgyx002);
}
public void addDatail(HGYX002A hgyx002A) {
//生成工序编码
//hgyx001A.setDeliveryCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PLAN_CODE));
DaoUtils.insert(HGYX002A.INSERT, hgyx002A);
}
/**
* 修改操作
*/
public void modify(HGYX002 hgyx002) {
DaoUtils.update(HGYX002.UPDATE, hgyx002);
}
public void modifyDatail(HGYX002A hgyx002A) {
DaoUtils.update(HGYX002A.UPDATE, hgyx002A);
}
@OperationLogAnnotation(operModul = "销售退货", operType = "提交", operDesc = "提交")
public EiInfo commit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
//List<Long> ids = ObjectUtils.listKey(resultRows, HGSC001.FIELD_id);
for (Map resultRow:resultRows) {
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(resultRow);
hgyx002.setStatus(1);
hgyx002.setOutboundCode(outboundCode);
/*销售出库*/
saveOutbound(resultRow, outboundCode);
DaoUtils.update(HGYX002.BATCH_COMMIT,hgyx002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "操作失败");
}
return inInfo;
}
public void saveOutbound(Map resultRow, String outboundCode) {
// 写入数据
HGKC004 hgkc004 = new HGKC004();
String id = resultRow.get(HGYX002.FIELD_ID).toString();
hgkc004.setParentId(Long.parseLong(id));
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(resultRow.get(HGYX002.FIELD_COMPANY_CODE).toString());
hgkc004.setCompanyName(resultRow.get(HGYX002.FIELD_COMPANY_NAME).toString());
hgkc004.setWhCode(resultRow.get(HGYX002.FIELD_CONS_WH_CODE).toString());
hgkc004.setWhName(resultRow.get(HGYX002.FIELD_CONS_WH_NAME).toString());
hgkc004.setSaleOutCode(outboundCode);
if (hgkc004.getId() == null || hgkc004.getId() == 0) {
this.add(hgkc004);
String parentId = resultRow.get(HGYX002.FIELD_ID).toString();
List<HGYX002A> hgyx002As = HGYXTools.Hgyx002.getParentId(Long.parseLong(parentId));
if (CollectionUtils.isEmpty(hgyx002As)){
throw new PlatException("销售退货详情不能为空!");
}
this.addDetail(hgyx002As, hgkc004.getId());
}
}
/**
* 新增销售退货
* @param hgkc004
*/
public void add(HGKC004 hgkc004) {
//生成工序编码
//hgkc004.setSaleOutCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE));
//hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
DaoUtils.insert(HGKC004.INSERT, hgkc004);
}
/**
* 新增销售退货详情
*/
public void addDetail( List<HGYX002A> hgyx002As,Long parentId) {
for (HGYX002A hgyx002A : hgyx002As) {
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(parentId);
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
@OperationLogAnnotation(operModul = "销售退货",operType = "保存并审核",operDesc = "保存操作")
public EiInfo saveStatus(EiInfo inInfo) {
try {
List<Map> queryBlock = inInfo.getBlock(EiConstant.queryBlock).getRows();
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map queryRow:queryBlock) {
HGYX002 hgyx002 = new HGYX002();
hgyx002.fromMap(queryRow);
hgyx002.setStatus(1);
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
hgyx002.setOutboundCode(outboundCode);
if (hgyx002.getId() == null || hgyx002.getId() == 0) {
//String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
//hgyx001.setOutboundCode(outboundCode);
this.add(hgyx002);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx002.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx002.getCompanyCode());
hgkc004.setCompanyName(hgyx002.getCompanyName());
hgkc004.setWhCode(hgyx002.getConsWhCode());
hgkc004.setWhName(hgyx002.getConsWhName());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
} else {
this.modify(hgyx002);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx002.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx002.getCompanyCode());
hgkc004.setCompanyName(hgyx002.getCompanyName());
hgkc004.setWhCode(hgyx002.getConsWhCode());
hgkc004.setWhName(hgyx002.getConsWhName());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX002A hgyx002A = new HGYX002A();
hgyx002A.fromMap(resultRow);
hgyx002A.setParentId(hgyx002.getId());
if (hgyx002A.getId() == null || hgyx002A.getId() == 0) {
this.addDatail(hgyx002A);
}else {
this.modifyDatail(hgyx002A);
}
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx002A.getInventType());
hgkc004A.setInventCode(hgyx002A.getInventCode());
hgkc004A.setInventName(hgyx002A.getInventName());
hgkc004A.setInventRecordId(hgyx002A.getInventRecordId());
hgkc004A.setSpec(hgyx002A.getSpec());
hgkc004A.setLength(hgyx002A.getLength());
hgkc004A.setThick(hgyx002A.getThick());
hgkc004A.setWidth(hgyx002A.getWidth());
hgkc004A.setQuantity(hgyx002A.getReturnQuantity());
hgkc004A.setUnitWeight(hgyx002A.getUnitWeight());
hgkc004A.setWeight(hgyx002A.getReturnWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID);
String type = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type");
EiInfo outInfo = super.initLoad(inInfo, new HGYX002A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX002 hgyx002 = HGYXTools.Hgyx002.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX002A.QUERY, new HGYX002A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgyx002));
}
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type", type);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002A().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.DELIVERY_CODE_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}
},false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_NAME, userVO.getUsername());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_CODE, userVO.getUsercode());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002A.QUERY,new HGYX002A());
}
@OperationLogAnnotation(operModul = "销售退货详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
String status = inInfo.getCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_STATUS).toString();
if ("1".equals(status)) {
String str = "已审核,无法删除!";
throw new PlatException(str);
}
HGYX002A hgyx002A = new HGYX002A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgyx002A.fromMap(map);
hgyx002A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX002A.DELETE_FLAG, hgyx002A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX002A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX002 hgyx002 = HGYXTools.Hgyx002.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX002A.QUERY, new HGYX002A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgyx002));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX002A().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX002.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_ID);
inInfo.getBlock(EiConstant.queryBlock).getRows().clear();
if (StringUtils.isNotEmpty(id)) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002A.FIELD_PARENT_ID, id);
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX002.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX002A.QUERY,new HGYX002A());
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.domain.HGYX001C;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/7
*/
public class ServiceHGYX002C extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001C.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
String ids = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "ids");
String parentId = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
if (StringUtils.isNotEmpty(ids)) {
String[] idArray = ids.split(",");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "ids", idArray);
}
if (StringUtils.isEmpty(parentId)){
Map params = new HashMap<>();
params.put(HGYX001.FIELD_DELIVERY_CODE, inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELIVERY_CODE));
params.put(HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
List<HGYX001> hgYx001s = HGYXTools.Hgyx001.list(params);
AssertUtils.isEmpty(hgYx001s, "未找到对应发货单号");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELIVERY_CODE, hgYx001s.get(0).getDeliveryCode());
}
inInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID,
DdynamicEnum.INVENT_RECORD_BLOCK_ID,
DdynamicEnum.SPEC_NAME_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGYX001A().eiMetadata);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX001C.QUERY,new HGYX001C());
}
}
...@@ -379,4 +379,15 @@ ...@@ -379,4 +379,15 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryReturnCodeBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID as "id",
PROJ_NAME as "projName", <!-- 项目名称 -->
DELIVERY_CODE as "deliveryCode" <!-- 发货单号 -->
FROM
${hggpSchema}.HGYX001
WHERE DELETE_FLAG = 0 AND STATUS = 1
<include refid="condition" />
</select>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-07 14:37:36
Version : 1.0
schema : hggp
tableName : HGYX002
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
RETURN_CODE VARCHAR,
DELIVERY_CODE VARCHAR,
CONS_CODE VARCHAR,
CONS_NAME VARCHAR,
CONS_ADDR VARCHAR,
RECE_CODE VARCHAR,
RECE_NAME VARCHAR,
RECE_USER_PHONE VARCHAR,
RETURN_QUANTITY DECIMAL,
RETURN_WEIGHT DECIMAL,
REMARKS VARCHAR,
STATUS TINYINT
-->
<sqlMap namespace="HGYX002">
<typeAlias alias="HGYX002" type="com.baosight.hggp.hg.yx.domain.HGYX002"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
RETURN_CODE as "returnCode", <!-- 退货单号 -->
DELIVERY_CODE as "deliveryCode", <!-- 发货单号 -->
OUTBOUND_CODE as "outboundCode", <!-- 出库单号 -->
CONS_CODE as "consCode", <!-- 发货方编码 -->
CONS_NAME as "consName", <!-- 发货方名称 -->
CONS_WH_CODE as "consWhCode", <!-- 发货仓库编码 -->
CONS_WH_NAME as "consWhName", <!-- 发货仓库名称 -->
CONS_ADDR as "consAddr", <!-- 发货地址 -->
RECE_CODE as "receCode", <!-- 收货方编码 -->
RECE_NAME as "receName", <!-- 收货方名称 -->
RECE_USER_PHONE as "receUserPhone", <!-- 收货人电话 -->
RETURN_QUANTITY as "returnQuantity", <!-- 退货数量 -->
RETURN_WEIGHT as "returnWeight", <!-- 退货重量 -->
REMARKS as "remarks", <!-- 退货原因 -->
STATUS as "status" <!-- 审批状态 0-未审核,1-已审核 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME LIKE CONCAT('%',#companyName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE CONCAT('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnCode">
RETURN_CODE LIKE CONCAT('%',#returnCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE LIKE CONCAT('%',#deliveryCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME LIKE CONCAT('%',#consName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhCode">
CONS_WH_CODE = #consWhCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consWhName">
CONS_WH_NAME LIKE CONCAT('%',#consWhName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR = #consAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME LIKE CONCAT('%',#receName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<select id="query" parameterClass="HashMap" resultClass="HGYX002">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX002 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX002 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnCode">
RETURN_CODE = #returnCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliveryCode">
DELIVERY_CODE = #deliveryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consCode">
CONS_CODE = #consCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consName">
CONS_NAME = #consName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="consAddr">
CONS_ADDR = #consAddr#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receCode">
RECE_CODE = #receCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receName">
RECE_NAME = #receName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receUserPhone">
RECE_USER_PHONE = #receUserPhone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remarks">
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX002 (ID,
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
RETURN_CODE, <!-- 退货单号 -->
DELIVERY_CODE, <!-- 发货单号 -->
OUTBOUND_CODE, <!-- 出库单号 -->
CONS_CODE, <!-- 发货方编码 -->
CONS_NAME, <!-- 发货方名称 -->
CONS_WH_CODE, <!-- 发货仓库编码 -->
CONS_WH_NAME, <!-- 发货仓库名称 -->
CONS_ADDR, <!-- 发货地址 -->
RECE_CODE, <!-- 收货方编码 -->
RECE_NAME, <!-- 收货方名称 -->
RECE_USER_PHONE, <!-- 收货人电话 -->
RETURN_QUANTITY, <!-- 退货数量 -->
RETURN_WEIGHT, <!-- 退货重量 -->
REMARKS, <!-- 退货原因 -->
STATUS <!-- 审批状态 0-未审核,1-已审核 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #returnCode#, #deliveryCode#, #outboundCode#, #consCode#, #consName#, #consWhCode#, #consWhName#, #consAddr#, #receCode#, #receName#, #receUserPhone#, #returnQuantity#, #returnWeight#, #remarks#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX002
</selectKey>
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX002 WHERE
ID = #id#
</delete>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX002
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE
ID = #id#
</update>
<update id="update">
UPDATE ${hggpSchema}.HGYX002
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
RETURN_CODE = #returnCode#, <!-- 退货单号 -->
DELIVERY_CODE = #deliveryCode#, <!-- 发货单号 -->
OUTBOUND_CODE = #outboundCode#,
CONS_CODE = #consCode#, <!-- 发货方编码 -->
CONS_NAME = #consName#, <!-- 发货方名称 -->
CONS_WH_CODE = #consWhCode#, <!-- 发货仓库编码 -->
CONS_WH_NAME = #consWhName#, <!-- 发货仓库名称 -->
CONS_ADDR = #consAddr#, <!-- 发货地址 -->
RECE_CODE = #receCode#, <!-- 收货方编码 -->
RECE_NAME = #receName#, <!-- 收货方名称 -->
RECE_USER_PHONE = #receUserPhone#, <!-- 收货人电话 -->
RETURN_QUANTITY = #returnQuantity#, <!-- 退货数量 -->
RETURN_WEIGHT = #returnWeight#, <!-- 退货重量 -->
REMARKS = #remarks#, <!-- 退货原因 -->
STATUS = #status# <!-- 审批状态 0-未审核,1-已审核 -->
WHERE
ID = #id#
</update>
<update id="batchCommit">
UPDATE ${hggpSchema}.HGYX002
SET
OUTBOUND_CODE = #outboundCode#, <!-- 出库单号 -->
STATUS = #status#, <!-- 审批状态 0-未审核,1-已审核 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-07 14:37:36
Version : 1.0
schema : hggp
tableName : HGYX002A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR,
LENGTH DECIMAL,
WIDTH DECIMAL,
THICK DECIMAL,
QUANTITY DECIMAL,
UNIT_WEIGHT DECIMAL,
WEIGHT DECIMAL,
RETURN_QUANTITY DECIMAL,
RETURN_WEIGHT DECIMAL,
PARENT_ID BIGINT
-->
<sqlMap namespace="HGYX002A">
<typeAlias alias="HGYX002A" type="com.baosight.hggp.hg.yx.domain.HGYX002A"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 发货重量 -->
RETURN_QUANTITY as "returnQuantity", <!-- 退货数量 -->
RETURN_WEIGHT as "returnWeight", <!-- 退货重量 -->
PARENT_ID as "parentId" <!-- 销售退货ID -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</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>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordIds">
INVENT_RECORD_ID NOT IN <iterate close=")" open="(" conjunction="," property="inventRecordIds">#inventRecordIds[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="HashMap" resultClass="HGYX002A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX002A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX002A WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</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>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnQuantity">
RETURN_QUANTITY = #returnQuantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="returnWeight">
RETURN_WEIGHT = #returnWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGYX002A (ID, <!-- ID -->
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID, <!-- 存货档案id -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
QUANTITY, <!-- 发货数量 -->
UNIT_WEIGHT, <!-- 单重 -->
WEIGHT, <!-- 发货重量 -->
RETURN_QUANTITY, <!-- 退货数量 -->
RETURN_WEIGHT, <!-- 退货重量 -->
PARENT_ID <!-- 销售退货ID -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #quantity#, #unitWeight#, #weight#, #returnQuantity#, #returnWeight#, #parentId#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGYX002A WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGYX002A
SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 -->
DEP_CODE = #depCode#, <!-- 部门编码 -->
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID = #inventRecordId#, <!-- 存货档案id -->
INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
QUANTITY = #quantity#, <!-- 发货数量 -->
UNIT_WEIGHT = #unitWeight#, <!-- 单重 -->
WEIGHT = #weight#, <!-- 发货重量 -->
RETURN_QUANTITY = #returnQuantity#, <!-- 退货数量 -->
RETURN_WEIGHT = #returnWeight#, <!-- 退货重量 -->
PARENT_ID = #parentId# <!-- 销售退货ID -->
WHERE
ID = #id#
</update>
<update id="deleteFlag">
UPDATE ${hggpSchema}.HGYX002A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE ID = #id#
</update>
<update id="deleteByParentId">
UPDATE ${hggpSchema}.HGYX002A
SET
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag# <!-- 0-未删除,1-已删除 -->
WHERE PARENT_ID = #parentId#
</update>
</sqlMap>
<?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">
<sqlMap namespace="HGYX002A">
<typeAlias alias="HGYX002A" type="com.baosight.hggp.hg.yx.domain.HGYX002A"/>
<sql id="column">
ID as "id", <!-- ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案id -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
QUANTITY as "quantity", <!-- 发货数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 发货重量 -->
'0' as "returnQuantity", <!-- 退货数量 -->
'0' as "returnWeight", <!-- 退货重量 -->
PARENT_ID as "parentId" <!-- 销售退货ID -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</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>
<isNotEmpty prepend=" AND " property="quantity">
QUANTITY = #quantity#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordIds">
INVENT_RECORD_ID NOT IN <iterate close=")" open="(" conjunction="," property="inventRecordIds">#inventRecordIds[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGYX001A">
SELECT
<include refid="column" />
FROM ${hggpSchema}.HGYX001A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc, ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGYX001A WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
\ No newline at end of file
...@@ -4,6 +4,8 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -4,6 +4,8 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.sj.domain.HGSJ001; import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.yx.domain.HGYX001; import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A; import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.domain.HGYX002;
import com.baosight.hggp.hg.yx.domain.HGYX002A;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -56,4 +58,41 @@ public class HGYXTools { ...@@ -56,4 +58,41 @@ public class HGYXTools {
return hgyx001As; return hgyx001As;
} }
} }
public static class Hgyx002 {
public static HGYX002 getId(Long id){
HGYX002 hgyx002 = new HGYX002();
AssertUtils.isNull(id, "销售退货ID不能为空!");
Object object = DaoBase.getInstance().get(HGYX002.QUERY,HGYX002.FIELD_ID, id);
AssertUtils.isNull(object, "销售退货不存在!");
hgyx002.fromMap(MapUtils.toMap(object));
return hgyx002;
}
public static List<HGYX002> list(Map params){
List<HGYX002> hgyx002s = DaoBase.getInstance().query(HGYX002.QUERY, params);
AssertUtils.isNull(hgyx002s, "销售退货不存在!");
return hgyx002s;
}
public static List<HGYX001> list(List<Long> ids){
AssertUtils.isNull(ids, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售退货不存在!");
return hgyx001s;
}
public static List<HGYX002A> getParentId(Long parentId){
AssertUtils.isNull(parentId, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
List<HGYX002A> hgyx002As = DaoBase.getInstance().query(HGYX002A.QUERY, params);
AssertUtils.isEmpty(hgyx002As, "销售退货明细不存在!");
return hgyx002As;
}
}
} }
...@@ -70,7 +70,6 @@ public class ServiceHGZL002 extends ServiceBase { ...@@ -70,7 +70,6 @@ public class ServiceHGZL002 extends ServiceBase {
HGZLTools.THGZL004.addByHGZL002(o); HGZLTools.THGZL004.addByHGZL002(o);
}); });
HGKCTools.HgKc003.putInStorageData(hgzl002List); HGKCTools.HgKc003.putInStorageData(hgzl002List);
// putInStorage();
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + hgzl002List.size() + "]条数据保存成功!");
......
...@@ -75,5 +75,7 @@ ...@@ -75,5 +75,7 @@
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001.xml"/> <sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001A.xml"/> <sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001C.xml"/> <sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001C.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX002.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX002A.xml"/>
</sqlMapConfig> </sqlMapConfig>
let whNameGlobalData = [];
$(function () { $(function () {
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
...@@ -13,21 +15,66 @@ $(function () { ...@@ -13,21 +15,66 @@ $(function () {
let status = item.submitStatus; let status = item.submitStatus;
let template = ''; let template = '';
if (item.id){ if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id +')" >详情</a>';
if (status == 0) { if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateSubmitStatus(' + item.id + ',1)" >提交</a>'; + 'onclick="updateSubmitStatus(' + item.id + ',1)" >提交</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="sendBack(' + item.id + ')" >退回</a>';
} }
} }
return template; return template;
} }
},
{
field: "whCode",
filter: function (options) {
return _.filter(whNameGlobalData, function (item) {
return item["param1Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
dataItem['whName'] = whNameGlobalData[i]['textField'];
return whNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryWhCodeBox");
inInfo.set("blockId", "wh_code_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
} }
], ],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
var item = e.items[0];
//仓库下拉框
if (e.field == "whCode") {
loadChange(grid,e,"price");
}
//金额计算
if (e.field == "price") {
if(item.price && item.invQty){
let totalAmount = item.price * item.invQty;
resultGrid.setCellValue(item, 'amount', totalAmount)
}
}
});
}, },
onSuccess: function (e) { onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ){ if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query(); query();
} }
} }
...@@ -36,9 +83,6 @@ $(function () { ...@@ -36,9 +83,6 @@ $(function () {
// 查询 // 查询
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
// 选择生产任务
$("#SELECT_TASK").on("click", selectTask);
}); });
/** /**
...@@ -46,6 +90,8 @@ $(function () { ...@@ -46,6 +90,8 @@ $(function () {
*/ */
$(window).load(function () { $(window).load(function () {
query(); query();
// 仓库名称
initWh();
}); });
/** /**
...@@ -56,28 +102,20 @@ let query = function () { ...@@ -56,28 +102,20 @@ let query = function () {
} }
/** /**
* 选择生产任务 * 初始化仓库
*/ */
let selectTask = function () { let initWh = function () {
JSColorbox.open({ let inInfo = new EiInfo();
href: "HGKC003A?methodName=initLoad", EiCommunicator.send("HGPZ007", "queryWhCodeBox", inInfo, {
title: "<div style='text-align: center;'>生产任务查询</div>", onSuccess: function (ei) {
width: "80%", whNameGlobalData = ei.getBlock("wh_code_block_id").getMappedRows();
height: "80%", },
callbackName: selectTaskCallback onFail: function (ei) {
}); }
}, {async: false});
} }
/** /**
* 挑选库存回调
*/
let selectTaskCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 显示详情 * 显示详情
*/ */
function showDetail(id) { function showDetail(id) {
...@@ -111,3 +149,64 @@ function updateSubmitStatus(id,status) { ...@@ -111,3 +149,64 @@ function updateSubmitStatus(id,status) {
} }
); );
} }
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let whCode= item.get("whCode");
let whName= item.get("whName");
let price= item.get("price");
if(isBlank(whCode)){
message("选中的第" + (index + 1) + "行\"仓库编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(whName)){
message("选中的第" + (index + 1) + "行\"仓库名称\",不能为空!");
flag = false;
return false;
}
if(isBlank(price)){
message("选中的第" + (index + 1) + "行\"单价\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC003", "save", true);
}
});
}
}
/**
* 提交
* @param id
* @param status
*/
function sendBack(id) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
EiCommunicator.send('HGKC003', 'sendBack', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
}
);
}
...@@ -20,16 +20,52 @@ ...@@ -20,16 +20,52 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" readonly="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" locked="true" width="140" enable="false" readonly="false"/>
<EF:EFColumn ename="qualityId" cname="质检单id" enable="false" width="90" align="center" hidden="true"/>
<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:EFColumn ename="companyName" cname="公司名称" enable="false" width="140" align="center"/> <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="projCode" cname="项目编号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" hidden="true"/>
<EF:EFColumn ename="depositDate" cname="单据日期" enable="false" width="100" align="center" editType="date" <EF:EFColumn ename="depositDate" cname="单据日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="depositNo" cname="生产入库单号" enable="false" width="120" align="center"/> <EF:EFColumn ename="depositNo" cname="生产入库单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="depositNoOld" cname="历史生产入库单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="partType" cname="存货类型" width="120" align="center" required="false"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains" enable="false">
</EF:EFComboColumn>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partCoefficient" cname="系数" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="false"
enable="false"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
enable="false"/>
<EF:EFColumn ename="invWeight" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
required="true"/>
<EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false"> <EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" /> <EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -7,6 +7,7 @@ $(function () { ...@@ -7,6 +7,7 @@ $(function () {
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < whNameGlobalData.length; i++) { for (let i = 0; i < whNameGlobalData.length; i++) {
if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) { if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
dataItem['whName'] = WhNameGlobalData[i]['textField'];
return whNameGlobalData[i]['textField']; return whNameGlobalData[i]['textField'];
} }
} }
...@@ -14,11 +15,9 @@ $(function () { ...@@ -14,11 +15,9 @@ $(function () {
}, },
editor: function (container, options) { editor: function (container, options) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [3]);
inInfo.set("inqu_status-0-whType", options.model["inventType"]); inInfo.set("inqu_status-0-whType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPPZ007"); inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryComboBox"); inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id"); inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
...@@ -55,12 +54,9 @@ $(window).load(function () { ...@@ -55,12 +54,9 @@ $(window).load(function () {
*/ */
let initWh = function () { let initWh = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材 EiCommunicator.send("HGPZ007", "queryWhCodeBox", inInfo, {
inInfo.set("inqu_status-0-inventTypes", [3]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows(); WhNameGlobalData = ei.getBlock("wh_code_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
......
let WhNameGlobalData = [];
$(function () { $(function () {
var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows(); var companyCodes = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
......
...@@ -245,7 +245,7 @@ function update() { ...@@ -245,7 +245,7 @@ function update() {
} }
let id = rows[0].id; let id = rows[0].id;
JSColorbox.open({ JSColorbox.open({
href: "HGYX001A??methodName=initLoad&inqu_status-0-parentId=" + id + "&efParentFormEname=HGYX001", href: "HGYX001A??methodName=initLoad&inqu_status-0-parentId=" + id + "&inqu_status-0-type=update&efParentFormEname=HGYX001",
title: "<div style='text-align: center;'>修改销售发货</div>", title: "<div style='text-align: center;'>修改销售发货</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
...@@ -262,7 +262,7 @@ function remove() { ...@@ -262,7 +262,7 @@ function remove() {
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
if(item.status > 0){ if(item.status > 0){
message2("审核","销售出库已审核不可删除!"); message2("审核","销售发货已审核不可删除!");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
filter="contains" readonly="true" required="true"> filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center"/> <EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="120" align="center"/> <EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center" <EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true"> filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/> <EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/> <EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/> <EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审状态" width="80" align="center" enable="false" defaultValue="0" required="true"> <EF:EFComboColumn ename="status" cname="审状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/> <EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -118,6 +118,10 @@ $(function() { ...@@ -118,6 +118,10 @@ $(function() {
} }
$("#inqu_status-0-projCode").change(function () { $("#inqu_status-0-projCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改项目名称!", "error");
parent.JSColorbox.close();
}
let projCode = $("#inqu_status-0-projCode"); let projCode = $("#inqu_status-0-projCode");
let textField = IPLAT.EFSelect.text(projCode); let textField = IPLAT.EFSelect.text(projCode);
let valueField = IPLAT.EFSelect.value(projCode); let valueField = IPLAT.EFSelect.value(projCode);
...@@ -136,6 +140,10 @@ $(function() { ...@@ -136,6 +140,10 @@ $(function() {
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company); IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
}) })
$("#inqu_status-0-consCode").change(function () { $("#inqu_status-0-consCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货方!", "error");
parent.JSColorbox.close();
}
let consCode = $("#inqu_status-0-consCode") let consCode = $("#inqu_status-0-consCode")
let textField = IPLAT.EFSelect.text(consCode); let textField = IPLAT.EFSelect.text(consCode);
let valueField = IPLAT.EFSelect.value(consCode); let valueField = IPLAT.EFSelect.value(consCode);
...@@ -147,6 +155,10 @@ $(function() { ...@@ -147,6 +155,10 @@ $(function() {
}); });
$("#inqu_status-0-consWhCode").change(function () { $("#inqu_status-0-consWhCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货仓库!", "error");
parent.JSColorbox.close();
}
let textField = IPLAT.EFSelect.text($("#inqu_status-0-consWhCode")); let textField = IPLAT.EFSelect.text($("#inqu_status-0-consWhCode"));
$("#inqu_status-0-consWhName").val(textField); $("#inqu_status-0-consWhName").val(textField);
}); });
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
required="true" colWidth="3" disabled="true" required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -30,31 +30,31 @@ ...@@ -30,31 +30,31 @@
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" disabled="true" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" disabled="true" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" disabled="true" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" disabled="true" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/> <EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" disabled="true" placeholder="请输入车牌号" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}" <EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
......
$(function () {
$(".row").children().attr("class", "col-md-3");
var companyCode = __eiInfo.get("companyCode");
var companyCodeBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
columns: [{
field: "operator",
title: "操作",
template: function (item) {
let auditStatus = item.status;
let template = '';
if (!isBlank(item.id)){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >退货详情</a>';
/*if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审核</a>';
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',0)" >撤回</a>';
}*/
}
return template;
}
}],
loadComplete: function (grid) {
// 此 grid 对象
// 新增
$("#add").on("click",add);
//修改
$("#BNT_MODIFY").on("click", update);
//删除
$("#BNT_REMOVE").on("click", remove);
//提交
$("#BNT_COMMIT").on("click", commit);
},
onAdd: function(e) {
e.preventDefault();
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'delete' ||e.eiInfo.extAttr.methodName == 'save'){
query();
}
}
},
}
// 查询
$("#QUERY").on("click", query);
downKeyUp();
// 导出打印
//$("#PRINT").on("click", exportPrint);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 显示详情
*/
function showDetail(id) {
JSColorbox.open({
href: "HGYX002B?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-type=insert",
title: "<div style='text-align: center;'>退货详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function add() {
JSColorbox.open({
href: "HGYX002A?methodName=initLoad",
title: "<div style='text-align: center;'>新增销售退货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function update() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1||rows.length > 1) {
message2("修改","请选择一条需要修改的数据");
return;
}
if(rows[0].status>0){
message2("修改","销售发货已审核不可修改!");
return;
}
let id = rows[0].id;
JSColorbox.open({
href: "HGYX002A??methodName=initLoad&inqu_status-0-parentId=" + id + "&inqu_status-0-type=update&efParentFormEname=HGYX002",
title: "<div style='text-align: center;'>修改销售退货</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function remove() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("删除","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
if(item.status > 0){
message2("审核","销售退货已审核不可删除!");
flag = false;
return false;
}
});
if(flag) {
IPLAT.confirm({ title: '删除', message: '确认删除此数据么?',
okFn: function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
EiCommunicator.send("HGYX002", "delete", post, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
});
}
}
function commit() {
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message2("提交","没有选中的行");
return;
}
let flag = true;
$.each(rows, function(index, item) {
//let companyCode= item.get("companyCode");
let status= item.get("status");
if(status > 0){
message2("提交","销售退货已审核不可重复提交!");
flag = false;
return false;
}
});
if (flag){
IPLAT.confirm({
title:'提交',
message:'确认提交此数据么?',
okFn:function () {
var post = new EiInfo();
post.addBlock(resultGrid.getCheckedBlockData());
post.set("recursion", true);
EiCommunicator.send("HGYX002","commit",post,{
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
}
})
}
}
function windowCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:28
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售退货">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" cname="发货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="所属公司" placeholder="模糊查询" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="returnCode" cname="退货单号" enable="false" width="120" align="center" required="true"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="receCode" enable="true" cname="收货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="customer_record_all_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" width="120" align="center" readonly="true" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="所属公司" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" readonly="true" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" readonly="true" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审批状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyCode" cname="公司编码" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" hidden="true"/>
<EF:EFColumn ename="consWhCode" cname="仓库编码" hidden="true"/>
<EF:EFColumn ename="consWhName" cname="仓库名称" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function() {
/*$(".row").children().attr("class", "col-md-3");*/
var companyBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var projRecordBox = __eiInfo.getBlock("proj_record_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
var customerAllBox = __eiInfo.getBlock("customer_record_all_block_id").getMappedRows();
var whRecordBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
var deliveryCodeBox = __eiInfo.getBlock("deliveryCodeBox_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "inventCode",
title: "存货名称",
filter: function (options) {
let inventType = options.model["inventType"];
if (inventType){
return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType;
})
}
return options.values;
},
template: function (dataItem) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === dataItem['inventCode']){
dataItem['inventName'] = inventCodedBox[i]['textField']
dataItem['inventRecordId'] = inventCodedBox[i]['param2Field'];
return inventCodedBox[i]['textField'];
}
}
return dataItem["inventCode"];
}
}, {
field: "spec",
filter: function (options) {
let specId = options.model["inventRecordId"];
if (specId){
return _.filter(specIdBox, function (item) {
return item["param7Field"] === specId;
})
}
return options.values;
},
template: function (item) {
return $.trim(item.spec) == "" ? "" : item.spec;
}
}, {
field: "length",
template: function (item) {
return item.length == 0 ? "-" : item.length;
}
}, {
field: "width",
template: function (item) {
return item.width == 0 ? "-" : item.width;
}
}, {
field: "thick",
template: function (item) {
return item.thick == 0 ? "-" : item.thick;
}
}],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "returnQuantity"){
let returnQuantity = 0;
let returnWeight = 0;
for (let i = 0; i < e.items.length; i++) {
let quantity = parseInt(e.items[i]["returnQuantity"]);
let unitWeight = parseFloat(e.items[i]["unitWeight"]);
let weight = quantity*unitWeight;
returnQuantity += quantity;
returnWeight += weight;
resultGrid.setCellValue(e.items[i],"returnQuantity",convertToNegative(quantity));
resultGrid.setCellValue(e.items[i],"returnWeight",convertToNegative(weight));
}
//获取显示框的值
$("#inqu_status-0-returnQuantity_textField").val(convertToNegative(returnQuantity));
$("#inqu_status-0-returnQuantity").val(convertToNegative(returnQuantity));
$("#inqu_status-0-returnWeight_textField").val(convertToNegative(returnWeight));
$("#inqu_status-0-returnWeight").val(convertToNegative(returnWeight));
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function(e) {
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
},
}
$("#inqu_status-0-projCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改项目名称!", "error");
parent.JSColorbox.close();
}
let projCode = $("#inqu_status-0-projCode");
let textField = IPLAT.EFSelect.text(projCode);
let valueField = IPLAT.EFSelect.value(projCode);
$("#inqu_status-0-projName").val(textField);
let proj = _.filter(projRecordBox, function (item) {
return item["valueField"] === valueField;
})
let whRecord = _.filter(whRecordBox, function (item) {
return item["param1Field"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consWhCode"),whRecord);
let company = _.filter(companyBox, function (item) {
return item["valueField"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
})
$("#inqu_status-0-consCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货方!", "error");
parent.JSColorbox.close();
}
})
$("#inqu_status-0-receCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改收货方!", "error");
parent.JSColorbox.close();
}
let valueField = IPLAT.EFSelect.value($("#inqu_status-0-receCode"));
for (let i = 0; i < customerAllBox.length; i++) {
if (customerAllBox[i]["valueField"] === valueField){
$("#inqu_status-0-receName").val(customerAllBox[i]["textField"]);
$("#inqu_status-0-receUserPhone").val(isBlank(customerAllBox[i]["param1Field"].trim())?"":customerAllBox[i]["param1Field"]);
$("#inqu_status-0-receAddr").val(isBlank(customerAllBox[i]["param2Field"].trim())?"":customerAllBox[i]["param2Field"]);
}
}
});
$("#inqu_status-0-deliveryCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货单号!", "error");
parent.JSColorbox.close();
}
let valueField = IPLAT.EFSelect.value($("#inqu_status-0-deliveryCode"));
for (let i = 0; i < deliveryCodeBox.length; i++) {
if (deliveryCodeBox[i]["valueField"] === valueField){
let id = deliveryCodeBox[i]["param1Field"];
$("#inqu_status-0-consId").val(id);
var inInfo=new EiInfo();
inInfo.set("inqu_status-0-id",id);
EiCommunicator.send("HGYX001", "query", inInfo, {
onSuccess: function (ei) {
let result = ei.getBlock("result").getMappedRows();
if (result.length > 0) {
$("#inqu_status-0-companyCode").val(result[0].companyCode);
$("#inqu_status-0-companyName").val(result[0].companyName);
$("#inqu_status-0-outboundCode").val(result[0].outboundCode);
IPLAT.EFSelect.value($("#inqu_status-0-projCode"),result[0].projCode);
//$("#inqu_status-0-projCode").val(result[0].projCode);
$("#inqu_status-0-projName").val(result[0].projName);
IPLAT.EFSelect.value($("#inqu_status-0-consCode"),result[0].consCode);
$("#inqu_status-0-consName").val(result[0].consName);
$("#inqu_status-0-consWhCode").val(result[0].consWhCode);
$("#inqu_status-0-consWhName").val(result[0].consWhName);
IPLAT.EFSelect.value($("#inqu_status-0-receCode"),result[0].receCode);
//$("#inqu_status-0-receCode").val(result[0].receCode);
$("#inqu_status-0-receName").val(result[0].receName);
$("#inqu_status-0-receUserPhone").val(result[0].receUserPhone);
}
}, onFail: function (ei) {
}
}, {async: false});
}
}
});
/*$("#inqu_status-0-deliveryCode").kendoAutoComplete({
dataSource: __eiInfo.getBlock("deliveryCodeBox_block_id").getMappedRows(),
filter: "contains",
template: "#:textField#",
dataValueField: "valueField",
dataTextField: "textField",
optionLabelTemplate: "#:valueField#",
valueTemplate: "#:valueField#",
});*/
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
});
/**
* 选择明细
*/
$("#BNT_CHOICE").on("click", detail);
/**
* 保存
*/
$("#btn_save").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
$.each(rows, function(index, item) {
let inventType= item.get("inventType");
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
let returnQuantity= item.get("returnQuantity");
let returnWeight= item.get("returnWeight");
if(isBlank(inventType)){
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(inventCode)){
message("选中的第" + (index + 1) + "行\"存货编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(spec)){
message("选中的第" + (index + 1) + "行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
message("选中的第" + (index + 1) + "行\"数量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
if(isBlank(returnQuantity) || parseFloat(returnQuantity) == 0){
message("选中的第" + (index + 1) + "行\"退货数量\",必须是数值并且数量不等于0!");
flag = false;
return false;
}
if(Math.abs(parseFloat(returnQuantity)) > parseInt(quantity)){
message("选中的第" + (index + 1) + "行\"退货数量大于发货数量\"");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX002", "save", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
});
/**
* 保存并审核提交
*/
$("#btn_save_status").on("click",function(){
let flag = true;
var validator1 = IPLAT.Validator({
id: "inqu"
});
// 点击按钮后校验
if (!validator1.validate()) {
var errorMsg = validator1.errors().toString();
var errs = errorMsg.split(',');
IPLAT.alert({
message: '<b>错误:<br>' + errs.join('<br>') + '</b>',
okFn: function (e) {
},
title: '错误'
});
return false;
}
let rows = resultGrid.getDataItems();
if (rows.length < 1) {
message("明细信息不能为空,请选择数据");
flag = false;
return false;
}
$.each(rows, function(index, item) {
let inventType= item.get("inventType");
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
let returnQuantity= item.get("returnQuantity");
let returnWeight= item.get("returnWeight");
if(isBlank(inventType)){
message("选中的第" + (index + 1) + "行\"存货类型\",不能为空!");
flag = false;
return false;
}
if(isBlank(inventCode)){
message("选中的第" + (index + 1) + "行\"存货编码\",不能为空!");
flag = false;
return false;
}
if(isBlank(spec)){
message("选中的第" + (index + 1) + "行\"规格\",不能为空!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
message("选中的第" + (index + 1) + "行\"数量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}
if(isBlank(returnQuantity) || parseFloat(returnQuantity) == 0){
message("选中的第" + (index + 1) + "行\"退货数量\",必须是数值并且数量不能等于0!");
flag = false;
return false;
}
if(Math.abs(parseFloat(returnQuantity)) > parseInt(quantity)){
message("选中的第" + (index + 1) + "行\"退货数量大于发货数量\"");
flag = false;
return false;
}
/*if(isBlank(returnWeight)){
message("选中的第" + (index + 1) + "行\"退货重量\",必须是数值并且数量必须大于0!");
flag = false;
return false;
}*/
});
if(flag) {
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("result", "HGYX002", "saveStatus", {
isAlldata: true,
onSuccessCallback: parent.windowCallback
});
}
});
}
})
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
//query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
function detail() {
let ids = [];
let rows = resultGrid.getDataItems();
if (rows.length > 0){
$.each(rows, function(index, item) {
ids.push(item.inventRecordId)
});
}
let consId = $("#inqu_status-0-consId").val();
let deliveryCode = $("#inqu_status-0-deliveryCode").val();
if(isBlank(deliveryCode)){
message("请选择发货单号!");
return false;
}
JSColorbox.open({
href: "HGYX002C?methodName=initLoad&inqu_status-0-deliveryCode="+deliveryCode+"&inqu_status-0-ids="+ids.join(',')+"&inqu_status-0-parentId="+consId,
title: "<div style='text-align: center;'>选择退货明细</div>",
width: "90%",
height: "80%",
callbackName: detailCallback
});
}
function detailCallback(result) {
let rows = resultGrid.getDataItems();
if (result.length> 0) {
for (let i = 0; i < result.length; i++) {
let specId = rows.filter(row => row.inventRecordId == result[i].inventRecordId)
if (specId.length > 0){
message("无法重复添加!");
return false;
}
result[i].set("returnQuantity", 0);
result[i].set("returnWeight", 0);
resultGrid.addRows(result[i]);
}
}
}
function convertToNegative(number) {
if (number <= 0){
return number;
}
return -number;
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:28
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售退货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号"
valueTemplate="#=valueField#-#=textField#"
template="#=valueField#-#=textField#"
textField="#=valueField#-#=textField#"
valueField="valueField"
required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="deliveryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhCode" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="returnQuantity" cname="退货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnWeight" cname="退货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFInput blockId="inqu_status" row="0" ename="remarks" cname="退货原因" type="textarea" colWidth="8" ratio="2:8"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consId" cname="发货方ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="false" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="发货数量" width="120" enable="false" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" hidden="true" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="发货重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" format="{0:N0}" editType="number"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save_status" cname="保存&提交审核" type="button" class="btn-center"/>
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
</div>
</EF:EFPage>
$(function () {
//$(".row").children().attr("class", "col-md-3");
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "spec"){
for (let i = 0; i < specIdBox.length; i++) {
if (specIdBox[i]['param7Field'] === e.items[0]["inventRecordId"]){
e.items[0]["length"] = specIdBox[i]['param1Field'];
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
//e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
//e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
//loadChange(grid,e,"unitWeight");
//loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
resultGrid.setCellValue(e.items[0],"weight",e.items[0].unitWeight*e.items[0].quantity);
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
}
}
})
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:29
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售退货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consCode" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="returnQuantity" cname="退货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnWeight" cname="退货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="remarks" cname="退货原因" type="textarea" colWidth="8" ratio="2:8"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
// 查询
$("#QUERY").on("click", query);
$("#BNT_CHOICE").on("click", choice)
})
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let choice = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
parent.JSColorbox.setValueCallback(rows);
parent.JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/7
Time: 15:29
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="退货明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="物料名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" type="hidden" required="true" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnQuantity" cname="退货数量" width="120" enable="true" hidden="true" format="{0:N0}" editType="number"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
</EF: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