Commit 9d2b2972 by yukang

处理相关BUG

parent c85d2d39
......@@ -346,9 +346,6 @@ public class HPPZTools {
}
sb.append(thick.stripTrailingZeros().toPlainString());
}
if (StringUtils.isNotBlank(sb)) {
sb.append("(MM)");
}
return sb.toString();
}
......
......@@ -288,6 +288,8 @@ public class ServiceHPSC002 extends ServiceBase {
if (!hppz002.getParentId().equals("root")) {
this.checkTreeNodeLeaf(hppz002.getParentId());
}
//处理项目管理中物料状态
HPSCTools.updateProjStatus(hppz002.getProjCode());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......@@ -629,28 +631,7 @@ public class ServiceHPSC002 extends ServiceBase {
DaoUtils.update("HPSC002.check",map2);
//处理项目管理中物料状态
Map map3 = new HashMap();
map3.put("projCode",THPSC002.getProjCode());
List list1 = dao.query("HPSC002.checkExamineNum1", map3);
List list2 = dao.query("HPSC002.checkExamineNum1Count", map3);
//未提交数量
int num1 = NumberUtils.toint(list1.get(0));
//总量
int num2 = NumberUtils.toint(list2.get(0));
if (num1 == 0) {
//都已经提交
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",2);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分提交
Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",1);
DaoUtils.update("HPSC001.checkByProjCode",map4);
}
HPSCTools.updateProjStatus(hppz002.getProjCode());
}
} catch (PlatException e) {
......
......@@ -17,6 +17,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.util.NumberUtils;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
......@@ -124,6 +125,33 @@ public class HPSCTools {
}
DaoUtils.update(HPSqlConstant.HPSC004.UPDATE_COMPLETE, newSc004);
}
public static void updateProjStatus(String projCode) {
AssertUtils.isNull(projCode, String.format("项目编码[%s]不能为空", projCode));
Map map3 = new HashMap();
map3.put("projCode",projCode);
List list1 = DaoBase.getInstance().query("HPSC002.checkExamineNum1", map3);
List list2 = DaoBase.getInstance().query("HPSC002.checkExamineNum1Count", map3);
//未提交数量
int num1 = NumberUtils.toint(list1.get(0));
//总量
int num2 = NumberUtils.toint(list2.get(0));
if (num1 == 0) {
//都已经提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",2);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",1);
DaoUtils.update("HPSC001.checkByProjCode",map4);
}
}
/**
* HPSC001公共DAO定义
......
......@@ -176,6 +176,8 @@ public class ExcelUtils {
Map<?, ?> map = okBlock.getRow(i);
HPSC002.fromMap(map);
DaoUtils.insert("HPSC002.insert",HPSC002);
//处理项目管理中物料状态
HPSCTools.updateProjStatus(HPSC002.getProjCode());
}
if (!HPSC002.getParentId().equals("root")) {
checkTreeNodeLeaf(HPSC002.getParentId());
......
......@@ -90,10 +90,11 @@ $(function () {
}
}
if (flag){
e.preventDefault();
NotificationUtil({
msg: '计划结束时间不能小于计划开始时间'
}, "warning");
return false;
return;
}
var btnNode = $(this);
//禁用按钮
......
......@@ -285,7 +285,8 @@ $(function () {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
detailGrid.setEiInfo(ei);
resultGrid.dataSource.page(resultGrid.dataSource._page);
}
},
onFail: function (ei) {
......
......@@ -79,12 +79,12 @@
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue=""
filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="下料组" width="110" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="orgNo" cname="下料组" width="110" align="center" readonly="true"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<%-- <EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center"--%>
......
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