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