Commit 6f70c406 by 宋祥

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

# Conflicts:
#	src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC003.xml
parents 37ddf6e2 8daa05c3
...@@ -54,6 +54,9 @@ ...@@ -54,6 +54,9 @@
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companCode">
COMPANY_CODE = #companCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
......
...@@ -143,7 +143,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -143,7 +143,7 @@ public class ServiceHPSC001 extends ServiceBase {
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);
hpsc001.fromMap(map); hpsc001.fromMap(map);
this.dao.update("HPSC001.check", hpsc001.toMap()); DaoUtils.update("HPSC001.check", hpsc001.toMap());
if(hpsc001.getStatus() == 1){ if(hpsc001.getStatus() == 1){
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("id",hpsc001.getId()); sqlMap.put("id",hpsc001.getId());
......
...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
...@@ -69,7 +70,6 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -69,7 +70,6 @@ public class ServiceHPSC002 extends ServiceBase {
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC002 hppz002 = new HPSC002(); HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
...@@ -84,14 +84,10 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -84,14 +84,10 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue()))); BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(1); hppz002.setDelStatus(1);
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
hppz002.setCreatedBy(UserSession.getUserId());
hppz002.setCreatedTime(sdf.format(new Date()));
hppz002.setUpdatedBy(null);
hppz002.setUpdatedTime(null);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentPrdtCode().equals("root")) { if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentPrdtCode().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName()); hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
} }
this.dao.insert("HPSC002.insert", hppz002.toMap()); DaoUtils.insert("HPSC002.insert", hppz002.toMap());
if (!hppz002.getParentPrdtCode().equals("root")) { if (!hppz002.getParentPrdtCode().equals("root")) {
this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode())); this.checkTreeNodeLeaf(new Long(hppz002.getParentPrdtCode()));
} }
...@@ -114,16 +110,13 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -114,16 +110,13 @@ public class ServiceHPSC002 extends ServiceBase {
* 修改操作. * 修改操作.
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC002 hppz002 = new HPSC002(); HPSC002 hppz002 = new HPSC002();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
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);
hppz002.fromMap(map); hppz002.fromMap(map);
hppz002.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC001.update", hppz002.toMap());
hppz002.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC001.update", hppz002.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
...@@ -225,7 +218,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -225,7 +218,7 @@ public class ServiceHPSC002 extends ServiceBase {
}else{ }else{
queryMap.put("leaf", "1"); queryMap.put("leaf", "1");
} }
this.dao.update("HPSC002.updateTreeNodeLeaf", queryMap); DaoUtils.update("HPSC002.updateTreeNodeLeaf", queryMap);
} }
...@@ -247,7 +240,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -247,7 +240,7 @@ public class ServiceHPSC002 extends ServiceBase {
// 二级如果已经审核了则需要去看看计划是否已经更新 // 二级如果已经审核了则需要去看看计划是否已经更新
} }
} }
this.dao.update("HPSC002.check", hppz002.toMap()); DaoUtils.update("HPSC002.check", hppz002.toMap());
} }
// 处理三级审核之后判断是否都审核完成,如果都审核完成则二级直接审核通过 // 处理三级审核之后判断是否都审核完成,如果都审核完成则二级直接审核通过
...@@ -270,7 +263,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -270,7 +263,7 @@ public class ServiceHPSC002 extends ServiceBase {
map2.put("status",0); map2.put("status",0);
map2.put("id",THPSC002.getParentPrdtCode()); map2.put("id",THPSC002.getParentPrdtCode());
} }
this.dao.update("HPSC002.check",map2); DaoUtils.update("HPSC002.check",map2);
//处理项目管理中物料状态 //处理项目管理中物料状态
Map map3 = new HashMap(); Map map3 = new HashMap();
...@@ -287,13 +280,13 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -287,13 +280,13 @@ public class ServiceHPSC002 extends ServiceBase {
Map map4 = new HashMap(); Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode()); map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",2); map4.put("materialStatus",2);
this.dao.update("HPSC001.checkByProjCode",map4); DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) { } else if (num1 > 0 && num1 < num2) {
// 部分审批 // 部分审批
Map map4 = new HashMap(); Map map4 = new HashMap();
map4.put("projCode",THPSC002.getProjCode()); map4.put("projCode",THPSC002.getProjCode());
map4.put("materialStatus",1); map4.put("materialStatus",1);
this.dao.update("HPSC001.checkByProjCode",map4); DaoUtils.update("HPSC001.checkByProjCode",map4);
} }
} }
...@@ -322,7 +315,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -322,7 +315,7 @@ public class ServiceHPSC002 extends ServiceBase {
Map sqlMap = new HashMap(); Map sqlMap = new HashMap();
sqlMap.put("id",hppz002.getId()); sqlMap.put("id",hppz002.getId());
sqlMap.put("filePath1",hppz002.getFilePath1()); sqlMap.put("filePath1",hppz002.getFilePath1());
this.dao.update("HPSC002.bindDocIdById", hppz002.toMap()); DaoUtils.update("HPSC002.bindDocIdById", hppz002.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); eiInfo.setStatus(EiConstant.STATUS_FAILURE);
...@@ -361,10 +354,8 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -361,10 +354,8 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setCreatedTime(sdf.format(new Date())); HPSC003.setCreatedTime(sdf.format(new Date()));
HPSC003.setUpdatedBy(null); HPSC003.setUpdatedBy(null);
HPSC003.setUpdatedTime(null); HPSC003.setUpdatedTime(null);
this.dao.insert("HPSC003.insert", HPSC003.toMap()); DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//根据生产计划单号找到ID
HPSC003 ent = (HPSC003) this.dao.get("HPSC003.query","planInfoNo", SCJHD);
//生产计划详情 //生产计划详情
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id", id); queryMap.put("id", id);
...@@ -377,7 +368,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -377,7 +368,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setDeptCode(""); HPSC004.setDeptCode("");
HPSC004.setProjCode(HPSC002.getProjCode()); HPSC004.setProjCode(HPSC002.getProjCode());
HPSC004.setProjName(HPSC002.getProjName()); HPSC004.setProjName(HPSC002.getProjName());
HPSC004.setParentPrdtCode(StringUtils.toString(ent.getId())); HPSC004.setParentPrdtCode(SCJHD);
HPSC004.setParentPrdtName(HPSC002.getParentPrdtName()); HPSC004.setParentPrdtName(HPSC002.getParentPrdtName());
HPSC004.setPrdtType(HPSC002.getPrdtType()); HPSC004.setPrdtType(HPSC002.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode()); HPSC004.setPrdtCode(HPSC002.getPrdtCode());
...@@ -395,7 +386,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -395,7 +386,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setCreatedTime(sdf.format(new Date())); HPSC004.setCreatedTime(sdf.format(new Date()));
HPSC004.setUpdatedBy(null); HPSC004.setUpdatedBy(null);
HPSC004.setUpdatedTime(null); HPSC004.setUpdatedTime(null);
this.dao.insert("HPSC004.insert", HPSC004.toMap()); DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
} }
} }
} }
...@@ -18,6 +18,7 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -18,6 +18,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -40,11 +41,13 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -40,11 +41,13 @@ public class ServiceHPSC002A extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称 // 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap); List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0); if (CollectionUtils.isNotEmpty(dbSc002s)) {
inInfo.set("inqu_status-0-matId", queryMap.get("id")); HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-projName", dbSc002.getProjName()); inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName()); inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata); inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC002; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC002B; import com.baosight.hpjx.hp.sc.domain.HPSC002B;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -9,6 +10,7 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -9,6 +10,7 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -30,11 +32,13 @@ public class ServiceHPSC002B extends ServiceEPBase { ...@@ -30,11 +32,13 @@ public class ServiceHPSC002B extends ServiceEPBase {
// 查询物料ID所对应的项目名称和产品名称 // 查询物料ID所对应的项目名称和产品名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap); List<HPSC002> dbSc002s = dao.query("HPSC002.query", queryMap);
HPSC002 dbSc002 = dbSc002s.get(0); if (CollectionUtils.isNotEmpty(dbSc002s)) {
inInfo.set("inqu_status-0-matId", queryMap.get("id")); HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-projName", dbSc002.getProjName()); inInfo.set("inqu_status-0-matId", queryMap.get("id"));
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName()); inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002B().eiMetadata); inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants; import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC003; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
...@@ -65,7 +66,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -65,7 +66,7 @@ public class ServiceHPSC003 extends ServiceBase {
HPSC003.setCreatedTime(sdf.format(new Date())); HPSC003.setCreatedTime(sdf.format(new Date()));
HPSC003.setUpdatedBy(null); HPSC003.setUpdatedBy(null);
HPSC003.setUpdatedTime(null); HPSC003.setUpdatedTime(null);
this.dao.insert("HPSC003.insert", HPSC003.toMap()); DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
...@@ -85,7 +86,6 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -85,7 +86,6 @@ public class ServiceHPSC003 extends ServiceBase {
* 修改操作. * 修改操作.
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC003 HPSC003 = new HPSC003(); HPSC003 HPSC003 = new HPSC003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
...@@ -93,9 +93,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -93,9 +93,7 @@ public class ServiceHPSC003 extends ServiceBase {
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);
HPSC003.fromMap(map); HPSC003.fromMap(map);
HPSC003.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC003.update", HPSC003.toMap());
HPSC003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC003.update", HPSC003.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
...@@ -111,16 +109,13 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -111,16 +109,13 @@ public class ServiceHPSC003 extends ServiceBase {
} }
public EiInfo updateHPSC0004(EiInfo inInfo) { public EiInfo updateHPSC0004(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock("detail"); EiBlock eiBlock = inInfo.getBlock("detail");
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);
HPSC004.fromMap(map); HPSC004.fromMap(map);
HPSC004.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC004.updateHPSC0004", HPSC004.toMap());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.updateHPSC0004", HPSC004.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
...@@ -181,15 +176,12 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -181,15 +176,12 @@ public class ServiceHPSC003 extends ServiceBase {
*/ */
public EiInfo checkHPSC0003(EiInfo eiInfo) { public EiInfo checkHPSC0003(EiInfo eiInfo) {
try { try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Map map = new HashMap(); Map map = new HashMap();
String id = eiInfo.get("id").toString(); String id = eiInfo.get("id").toString();
map.put("id", id); map.put("id", id);
HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id); HPSC003 HPSC003 = (HPSC003) this.dao.get("HPSC003.query","id",id);
HPSC003.setStatus(1); HPSC003.setStatus(1);
HPSC003.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC003.update", HPSC003.toMap());
HPSC003.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC003.update", HPSC003.toMap());
//生成生产订单 //生成生产订单
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("parentPrdtCode",HPSC003.getId()); params.put("parentPrdtCode",HPSC003.getId());
...@@ -208,15 +200,11 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -208,15 +200,11 @@ public class ServiceHPSC003 extends ServiceBase {
HPSC005.setNum(HPSC004.getNum()); HPSC005.setNum(HPSC004.getNum());
HPSC005.setTotalWt(HPSC004.getUnitWt()); HPSC005.setTotalWt(HPSC004.getUnitWt());
HPSC005.setStatus(0); HPSC005.setStatus(0);
HPSC005.setCreatedBy(UserSession.getUserId()); HPSC005.setFilePath1(HPSC004.getFilePath1());
HPSC005.setCreatedTime(sdf.format(new Date())); DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
HPSC005.setFilePath1(HPSC004.getId().toString());
this.dao.insert("HPSC005.insert", HPSC005.toMap());
HPSC004.setProductionOrderNo(SCDD); HPSC004.setProductionOrderNo(SCDD);
HPSC004.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC004.update", HPSC004.toMap());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.update", HPSC004.toMap());
} }
} catch (PlatException e) { } catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE); eiInfo.setStatus(EiConstant.STATUS_FAILURE);
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
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;
...@@ -44,18 +45,13 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -44,18 +45,13 @@ public class ServiceHPSC004 extends ServiceBase {
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
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);
HPSC004.fromMap(map); HPSC004.fromMap(map);
HPSC004.setCreatedBy(UserSession.getUserId()); DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
HPSC004.setCreatedTime(sdf.format(new Date()));
HPSC004.setUpdatedBy(null);
HPSC004.setUpdatedTime(null);
this.dao.insert("HPSC004.insert", HPSC004.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
...@@ -75,16 +71,13 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -75,16 +71,13 @@ public class ServiceHPSC004 extends ServiceBase {
* 修改操作. * 修改操作.
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = inInfo.getBlock("detail"); EiBlock eiBlock = inInfo.getBlock("detail");
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);
HPSC004.fromMap(map); HPSC004.fromMap(map);
HPSC004.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC004.update", HPSC004.toMap());
HPSC004.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC004.update", HPSC004.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -48,18 +49,13 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -48,18 +49,13 @@ public class ServiceHPSC005 extends ServiceBase {
*/ */
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
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);
HPSC005.fromMap(map); HPSC005.fromMap(map);
HPSC005.setCreatedBy(UserSession.getUserId()); DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
HPSC005.setCreatedTime(sdf.format(new Date()));
HPSC005.setUpdatedBy(null);
HPSC005.setUpdatedTime(null);
this.dao.insert("HPSC005.insert", HPSC005.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!"); inInfo.setMsg("新增成功!");
...@@ -79,16 +75,13 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -79,16 +75,13 @@ public class ServiceHPSC005 extends ServiceBase {
* 修改操作. * 修改操作.
*/ */
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
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);
HPSC005.fromMap(map); HPSC005.fromMap(map);
HPSC005.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC005.update", HPSC005.toMap());
HPSC005.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC005.update", HPSC005.toMap());
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!"); inInfo.setMsg("修改成功!");
...@@ -135,7 +128,6 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -135,7 +128,6 @@ public class ServiceHPSC005 extends ServiceBase {
*/ */
public EiInfo assign(EiInfo eiInfo) { public EiInfo assign(EiInfo eiInfo) {
try { try {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String ids = eiInfo.get("ids").toString(); String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("orgId").toString(); String orgId = eiInfo.get("orgId").toString();
//先找到分派的组织 //先找到分派的组织
...@@ -149,9 +141,7 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -149,9 +141,7 @@ public class ServiceHPSC005 extends ServiceBase {
HPSC005.setStatus(1); HPSC005.setStatus(1);
HPSC005.setOrgNo(map.get("orgId").toString()); HPSC005.setOrgNo(map.get("orgId").toString());
HPSC005.setOrgName(map.get("orgCname").toString()); HPSC005.setOrgName(map.get("orgCname").toString());
HPSC005.setUpdatedBy(UserSession.getUserId()); DaoUtils.update("HPSC005.updateAssign", HPSC005.toMap());
HPSC005.setUpdatedTime(sdf.format(new Date()));
this.dao.update("HPSC005.updateAssign", HPSC005.toMap());
} }
eiInfo.setStatus(EiConstant.STATUS_SUCCESS); eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC004; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
...@@ -10,6 +11,7 @@ import com.baosight.xservices.xs.og.domain.XSOG01; ...@@ -10,6 +11,7 @@ import com.baosight.xservices.xs.og.domain.XSOG01;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
...@@ -22,6 +24,7 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -22,6 +24,7 @@ public class ServiceHPSC098 extends ServiceBase {
*/ */
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
outInfo.set("inqu_status-0-companyCode", UserSessionUtils.getCompanyCode());
outInfo.set("inqu_status-0-orgCname", inInfo.get("inqu_status-0-orgCname")); outInfo.set("inqu_status-0-orgCname", inInfo.get("inqu_status-0-orgCname"));
outInfo = super.query(outInfo, "XSOG0801.queryOrgList", new XSOG01()); outInfo = super.query(outInfo, "XSOG0801.queryOrgList", new XSOG01());
EiBlock r3Block = new EiBlock("result"); EiBlock r3Block = new EiBlock("result");
...@@ -38,6 +41,7 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -38,6 +41,7 @@ public class ServiceHPSC098 extends ServiceBase {
EiBlock eiBlock = outInfo.addBlock("result"); EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("orgCname",inInfo.get("inqu_status-0-orgCname")); params.put("orgCname",inInfo.get("inqu_status-0-orgCname"));
params.put("companyCode", UserSessionUtils.getCompanyCode());
List list = dao.query("XSOG0801.queryOrgList",params,0,-999999); List list = dao.query("XSOG0801.queryOrgList",params,0,-999999);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(XSOG01.eiMetadata); outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(XSOG01.eiMetadata);
outInfo.addBlock(EiConstant.resultBlock).addRows(list); outInfo.addBlock(EiConstant.resultBlock).addRows(list);
......
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
A.UPDATED_TIME = #updatedTime# A.UPDATED_TIME = #updatedTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
B.DOC_NAME LIKE ('%$updatedTime$%')
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
...@@ -34,19 +34,19 @@ ...@@ -34,19 +34,19 @@
PROJ_TYPE = #projType# PROJ_TYPE = #projType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE LIKE ('%$projCode$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME LIKE ('%$projName$%') PROJ_NAME LIKE ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planInfoNo"> <isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo# PLAN_INFO_NO LIKE ('%$planInfoNo$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode"> <isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode# PRDT_CODE LIKE ('%$prdtCode$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName# PRDT_NAME = #prdtName#
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
CONCAT(( CONCAT((
SELECT SELECT
ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100 format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
FROM FROM
hpjx.T_HPSC004 hpjx.T_HPSC004
WHERE WHERE
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
PRDT_CODE = #prdtCode# PRDT_CODE = #prdtCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName"> <isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName# PRDT_NAME LIKE ('%$prdtName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate"> <isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate# PLAN_COMPLETION_DATE = #planCompletionDate#
......
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode# PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME like CONCAT('%', #projName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo# PRODUCTION_ORDER_NO like CONCAT('%', #productionOrderNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
PRDT_NAME = #prdtName# PRDT_NAME = #prdtName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate"> <isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate# PLAN_COMPLETION_DATE like CONCAT('%', #planCompletionDate#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="num"> <isNotEmpty prepend=" AND " property="num">
NUM = #num# NUM = #num#
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
STATUS = #status# STATUS = #status#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo"> <isNotEmpty prepend=" AND " property="orgNo">
ORG_NO = #orgNo# ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName"> <isNotEmpty prepend=" AND " property="orgName">
ORG_NAME = #orgName# ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy"> <isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy# CREATED_BY = #createdBy#
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd" <EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"
readonly="true"/> />
<EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/> <EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
......
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#GENERATE").on("click", generateRK); $("#GENERATE").on("click", generateRK);
$("#inqu_status-0-orgNo").on("click", function () {
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
title: "<div style='text-align: center;'>选择组织</div>",
width: "40%",
height: "70%",
callbackName: getOrgCallback
});
});
IPLATUI.EFGrid.result = { IPLATUI.EFGrid.result = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
...@@ -29,3 +38,8 @@ let generateRK = function () { ...@@ -29,3 +38,8 @@ let generateRK = function () {
} }
}); });
} }
let getOrgCallback = function (orgId) {
$("#inqu_status-0-orgNo").val(orgId);
JSColorbox.close();
}
\ No newline at end of file
...@@ -16,9 +16,15 @@ ...@@ -16,9 +16,15 @@
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%> <div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/> <EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产订单号:" row="0"/> <EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产组:" row="0"/> <EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0" defaultValue="">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="已派工" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
...@@ -45,4 +51,4 @@ ...@@ -45,4 +51,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HP/SC/HPKC099.js"></script> <script src="${ctx}/HP/KC/HPKC099.js"></script>
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<div class="row"> <div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/> <EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="产品名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/> <EF:EFInput cname="产品名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date" startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="ID" hidden="true"/> <EF:EFColumn ename="id" cname="ID" hidden="true"/>
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/> <%-- <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="150"/>--%>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="150"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/> parseFormats="['yyyyMMddHHmmss']" editType="datetime" dateFormat="yyyy-MM-dd HH:mm:ss"/>
......
...@@ -16,17 +16,30 @@ $(function () { ...@@ -16,17 +16,30 @@ $(function () {
{ {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let template = ''; let template = '';
if (auditStatus == 0) { if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >审核</a>'; 'onclick="check(' + item.id + ',1)" >审核</a>';
} else { }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >反审</a>'; 'onclick="check(' + item.id + ',0)" >反审</a>';
} }
return template; return template;
} }
},
{
field: "planCompletionDate",
template: function (item){
let auditStatus = item.status;
let template = '';
if (auditStatus == 1){
template += 'this.blur();';
}
return template;
}
} }
], ],
onRowClick : function(e) { onRowClick : function(e) {
......
...@@ -9,14 +9,19 @@ ...@@ -9,14 +9,19 @@
</head> </head>
<EF:EFPage title="生产计划"> <EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件" align-item="center"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%> <div class="row" > <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/> <EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="planInfoNo" cname="生产计划单号:" row="0"/> <EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期" <EF:EFInput blockId="inqu_status" ename="prdtCode" colWidth="3" cname="产品编码:" row="0"/>
format="yyyy-MM-dd" required="true"/> <EF:EFInput blockId="inqu_status" ename="prdtName" colWidth="3" cname="产品名称:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> </div>
<div class="row">
<EF:EFInput blockId="inqu_status" ename="planInfoNo" colWidth="3" cname="生产计划单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" colWidth="3" cname="计划完成日期:"
format="yyyy-MM-dd"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" colWidth="3" ename="status" row="0">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
<EF:EFOption label="已审核" value="1"/> <EF:EFOption label="已审核" value="1"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -36,7 +41,7 @@ ...@@ -36,7 +41,7 @@
<EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/> <EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true'/> required='true' readonly="true"/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/> <EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态"> <EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未审核" value="0"/> <EF:EFOption label="未审核" value="0"/>
......
...@@ -5,6 +5,16 @@ $(function () { ...@@ -5,6 +5,16 @@ $(function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
}); });
$("#inqu_status-0-orgNo").on("click", function () {
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
title: "<div style='text-align: center;'>选择组织</div>",
width: "40%",
height: "70%",
callbackName: getOrgCallback
});
})
$("#ASSIGN").on("click", function () { $("#ASSIGN").on("click", function () {
//重置全局变量 //重置全局变量
ids = []; ids = [];
...@@ -13,7 +23,16 @@ $(function () { ...@@ -13,7 +23,16 @@ $(function () {
message("请至少选择一条需要分派的数据"); message("请至少选择一条需要分派的数据");
return; return;
} }
let num = 0;
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
title: "<div style='text-align: center;'>选择组织</div>",
width: "40%",
height: "70%",
callbackName: assignCallback
});
//分派可修改,不做判断
/*let num = 0;
rows.forEach(function(element) { rows.forEach(function(element) {
if (element.status == 1) { if (element.status == 1) {
num++; num++;
...@@ -24,14 +43,8 @@ $(function () { ...@@ -24,14 +43,8 @@ $(function () {
message("勾选的数据中有已经分派的数据!"); message("勾选的数据中有已经分派的数据!");
return; return;
} else { } else {
JSColorbox.open({
href: "HPSC098?methodName=initLoad", }*/
title: "<div style='text-align: center;'>选择组织</div>",
width: "40%",
height: "70%",
callbackName: assignCallback
});
}
}); });
...@@ -86,4 +99,9 @@ let assignCallback = function (orgId) { ...@@ -86,4 +99,9 @@ let assignCallback = function (orgId) {
},{async:false}); },{async:false});
}
let getOrgCallback = function (orgId) {
$("#inqu_status-0-orgNo").val(orgId);
JSColorbox.close();
} }
\ No newline at end of file
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%> <EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%> <div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput blockId="inqu_status" ename="projCode" cname="项目号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/> <EF:EFInput blockId="inqu_status" ename="projName" cname="项目名称:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产订单号:" row="0"/> <EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFInput blockId="inqu_status" ename="projType" cname="生产组:" row="0"/> <EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0"> <EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0">
<EF:EFOption label="未派工" value="0"/> <EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="已派工" value="1"/> <EF:EFOption label="已派工" value="1"/>
......
...@@ -22,7 +22,7 @@ $(function () { ...@@ -22,7 +22,7 @@ $(function () {
return; return;
} }
let row = rows[0]; let row = rows[0];
JSUtils.confirm("确定\"保存\"操作? ", { JSUtils.confirm("确定\"是否\"分派? ", {
ok: function () { ok: function () {
parent.JSColorbox.setValueCallback(row.orgId); parent.JSColorbox.setValueCallback(row.orgId);
} }
......
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