Commit 90778128 by wancheng

采购计划更新

parent 7d914c17
...@@ -68,7 +68,7 @@ public class HPCG003 extends DaoEPBase { ...@@ -68,7 +68,7 @@ public class HPCG003 extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private Boolean deleteFlag; /* 是否删除 0-否1-是*/ private Integer deleteFlag = 0; /* 是否删除 0-否1-是*/
private String proOrderDate = " "; /* 采购订单日期*/ private String proOrderDate = " "; /* 采购订单日期*/
private String proOrderNo = " "; /* 采购订单单号*/ private String proOrderNo = " "; /* 采购订单单号*/
private String proPlanNo = " "; /* 采购计划单号*/ private String proPlanNo = " "; /* 采购计划单号*/
...@@ -300,7 +300,7 @@ public class HPCG003 extends DaoEPBase { ...@@ -300,7 +300,7 @@ public class HPCG003 extends DaoEPBase {
* get the deleteFlag - 是否删除 0-否1-是. * get the deleteFlag - 是否删除 0-否1-是.
* @return the deleteFlag * @return the deleteFlag
*/ */
public Boolean getDeleteFlag() { public Integer getDeleteFlag() {
return this.deleteFlag; return this.deleteFlag;
} }
...@@ -309,7 +309,7 @@ public class HPCG003 extends DaoEPBase { ...@@ -309,7 +309,7 @@ public class HPCG003 extends DaoEPBase {
* *
* @param deleteFlag - 是否删除 0-否1-是 * @param deleteFlag - 是否删除 0-否1-是
*/ */
public void setDeleteFlag(Boolean deleteFlag) { public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag; this.deleteFlag = deleteFlag;
} }
/** /**
...@@ -409,7 +409,7 @@ public class HPCG003 extends DaoEPBase { ...@@ -409,7 +409,7 @@ public class HPCG003 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setProOrderDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_ORDER_DATE)), proOrderDate)); setProOrderDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_ORDER_DATE)), proOrderDate));
setProOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_ORDER_NO)), proOrderNo)); setProOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_ORDER_NO)), proOrderNo));
setProPlanNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_PLAN_NO)), proPlanNo)); setProPlanNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRO_PLAN_NO)), proPlanNo));
......
...@@ -89,7 +89,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -89,7 +89,7 @@ public class HPCG003A extends DaoEPBase {
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private Boolean deleteFlag; /* 是否删除 0-否1-是*/ private Integer deleteFlag = 0; /* 是否删除 0-否1-是*/
private String whCode = " "; /* 仓库编码*/ private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/ private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/ private String inventType = " "; /* 存货类型*/
...@@ -386,7 +386,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -386,7 +386,7 @@ public class HPCG003A extends DaoEPBase {
* get the deleteFlag - 是否删除 0-否1-是. * get the deleteFlag - 是否删除 0-否1-是.
* @return the deleteFlag * @return the deleteFlag
*/ */
public Boolean getDeleteFlag() { public Integer getDeleteFlag() {
return this.deleteFlag; return this.deleteFlag;
} }
...@@ -395,7 +395,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -395,7 +395,7 @@ public class HPCG003A extends DaoEPBase {
* *
* @param deleteFlag - 是否删除 0-否1-是 * @param deleteFlag - 是否删除 0-否1-是
*/ */
public void setDeleteFlag(Boolean deleteFlag) { public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag; this.deleteFlag = deleteFlag;
} }
/** /**
...@@ -655,7 +655,7 @@ public class HPCG003A extends DaoEPBase { ...@@ -655,7 +655,7 @@ public class HPCG003A extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode)); setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName)); setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType)); setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
......
...@@ -152,6 +152,7 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -152,6 +152,7 @@ public class ServiceHPCG002A extends ServiceBase {
EiInfo inInfo = new EiInfo(); EiInfo inInfo = new EiInfo();
HPCG002 hpcg002 = new HPCG002(); HPCG002 hpcg002 = new HPCG002();
try { try {
//更新选中数据提交状态
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
hpcg002A.fromMap(map); hpcg002A.fromMap(map);
...@@ -160,6 +161,7 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -160,6 +161,7 @@ public class ServiceHPCG002A extends ServiceBase {
inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, HPCG002A.FIELD_PARENT_ID,hpcg002A.getParentId()); inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0, HPCG002A.FIELD_PARENT_ID,hpcg002A.getParentId());
DaoUtils.update(HPCG002A.CHECK, hpcg002A.toMap()); DaoUtils.update(HPCG002A.CHECK, hpcg002A.toMap());
} }
//统计提交状态
EiInfo outInfo = super.query(inInfo, HPCG002A.QUERY, new HPCG002A()); EiInfo outInfo = super.query(inInfo, HPCG002A.QUERY, new HPCG002A());
EiBlock outBlock = outInfo.getBlock(EiConstant.resultBlock); EiBlock outBlock = outInfo.getBlock(EiConstant.resultBlock);
String inventType = ""; String inventType = "";
...@@ -171,9 +173,9 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -171,9 +173,9 @@ public class ServiceHPCG002A extends ServiceBase {
if(hpcg002A.getProApplyStatus()==1){ if(hpcg002A.getProApplyStatus()==1){
num = num+1; num = num+1;
} }
DaoUtils.update(HPCG002A.CHECK, hpcg002A.toMap());
} }
if(num==outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=2){ if(num==outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=2){
//全提交更新状态
hpcg002.setProPlanStatus(2); hpcg002.setProPlanStatus(2);
DaoUtils.update(HPCG002.CHECK, hpcg002.toMap()); DaoUtils.update(HPCG002.CHECK, hpcg002.toMap());
//全部提交后,生成采购订单 //全部提交后,生成采购订单
...@@ -183,6 +185,7 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -183,6 +185,7 @@ public class ServiceHPCG002A extends ServiceBase {
List<HPCG002> hpcg002s = this.dao.query(HPCG002.QUERY,new HashMap<String,Object>(){{ List<HPCG002> hpcg002s = this.dao.query(HPCG002.QUERY,new HashMap<String,Object>(){{
put(HPCG002.FIELD_ID,hpcg002.getId()); put(HPCG002.FIELD_ID,hpcg002.getId());
}}); }});
//生成采购订单详情
for (Object str: listMap.keySet()) { for (Object str: listMap.keySet()) {
HPCG003 hpcg003 = new HPCG003(); HPCG003 hpcg003 = new HPCG003();
hpcg003.toMap(); hpcg003.toMap();
...@@ -217,6 +220,7 @@ public class ServiceHPCG002A extends ServiceBase { ...@@ -217,6 +220,7 @@ public class ServiceHPCG002A extends ServiceBase {
} }
}else if(num!=outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=1){ }else if(num!=outBlock.getRowCount()&&hpcg002.getProPlanStatus()!=1){
//部分交更新状态
hpcg002.setProPlanStatus(1); hpcg002.setProPlanStatus(1);
DaoUtils.update(HPCG002.CHECK, hpcg002.toMap()); DaoUtils.update(HPCG002.CHECK, hpcg002.toMap());
} }
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
...@@ -52,6 +55,12 @@ ...@@ -52,6 +55,12 @@
<isNotEmpty prepend=" AND " property="proPlanStatus"> <isNotEmpty prepend=" AND " property="proPlanStatus">
PRO_PLAN_STATUS = #proPlanStatus# PRO_PLAN_STATUS = #proPlanStatus#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateFrom">
PRO_PLAN_DATE &gt;= #createdDateFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdDateTo">
PRO_PLAN_DATE &lt;= #createdDateTo#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
...@@ -16,10 +16,11 @@ ...@@ -16,10 +16,11 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/> <EF:EFInput cname="采购申请单号" ename="inqu_status-0-proApplyNo" colWidth="3"/>
<EF:EFSelect cname="供应商名称" ename="inqu_status-0-repCustomId" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect cname="供应商名称" ename="inqu_status-0-custCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="supplier_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="父ID" ename="inqu_status-0-parentId" colWidth="3" type="hidden"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment