Commit f8421a9d by 宋祥

Merge branch 'dev' of ssh://10.70.33.7:32359/smart/hp-smart into dev

 Conflicts:
	src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC005A.java
	src/main/webapp/HP/SC/HPSC003.js
	src/main/webapp/HP/SC/HPSC003.jsp
	src/main/webapp/HP/SC/HPSC005.jsp
parents 69bea29a 17666132
package com.baosight.hpjx.aspect;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.ibatis.dao.Dao;
import com.baosight.iplat4j.core.data.ibatis.dao.SqlMapDaoLogProxy;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
import java.sql.PreparedStatement;
import java.util.HashMap;
import java.util.Map;
/**
* 切面处理类,操作日志异常日志记录处理
*/
@Aspect //记录日志实现性能跟踪以及用户行为分析
@Component
public class OperationLogAspect {
private static Dao dao = (Dao) PlatApplicationContext.getBean("dao");
/**
* 设置操作日志切入点 记录操作日志 在注解的位置切入代码
*/
@Pointcut("@annotation(com.baosight.hpjx.aspect.annotation.OperationLogAnnotation)")
public void operLogPointCut() {
}
/**
* 设置操作异常切入点记录异常日志 扫描所有dc包下操作
*/
@Pointcut("execution(* com.baosight.hpjx.hp.*.service..*.*(..))")
public void operExceptionLogPointCut() {
}
/**
* 正常返回通知,拦截用户操作日志,连接点正常执行完成后执行, 如果连接点抛出异常,则不会执行
*
* @param joinPoint 切入点
* @param keys 返回结果
*/
@AfterReturning(value = "operLogPointCut()", returning = "keys")
public void saveOperLog(JoinPoint joinPoint, Object keys) {
// 从切面织入点处通过反射机制获取织入点处的方法
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
// 获取切入点所在的方法
Method method = signature.getMethod();
OperationLogAnnotation opLog = method.getAnnotation(OperationLogAnnotation.class);
if (opLog != null) {
try {
String companyCode;
try {
companyCode = UserSessionUtils.getCompanyCode();
} catch (Exception e) {
companyCode = "";
}
String userId = UserSession.getLoginName();
String loginName = UserSession.getLoginCName();
String operModul = opLog.operModul();
String operType = opLog.operType();
String operDesc = opLog.operDesc();
boolean saveContet = opLog.saveContent();
String sql = "INSERT INTO hpjx.SYS_OPERATION_LOG (OPER_MODUL,OPER_TYPE,OPER_DESC," +
"OPER_CONTENT,COMPANY_CODE,CREATED_BY,CREATED_NAME,CREATED_TIME)" +
" VALUES (?,?,?,?,?,?,?,?)";
PreparedStatement ps = ((SqlMapDaoLogProxy) dao).getSqlMapClient().getDataSource().getConnection().prepareStatement(sql);
ps.setString(1,operModul);
ps.setString(2,operType);
ps.setString(3,operDesc);
if(saveContet && joinPoint.getArgs() != null) {
String strBlock = EiConstant.resultBlock;
EiInfo result = ((EiInfo) joinPoint.getArgs()[0]);
ps.setString(4, JSONObject.toJSONString(((EiInfo) joinPoint.getArgs()[0]).getBlock(strBlock).getRows().get(0)));
}else {
ps.setString(4, "");
}
ps.setString(5,companyCode);
ps.setString(6,userId);
ps.setString(7,loginName);
ps.setString(8,DateUtils.shortDateTime());
ps.execute();
} catch (Exception e) {
e.printStackTrace();
}
}
}
/**
* 异常返回通知,用于拦截异常日志信息 连接点抛出异常后执行
*
* @param joinPoint 切入点
* @param e 异常信息
*/
@AfterThrowing(pointcut = "operExceptionLogPointCut()", throwing = "e")
public void saveExceptionLog(JoinPoint joinPoint, Throwable e) {
// 获取RequestAttributes
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
// 从获取RequestAttributes中获取HttpServletRequest的信息
HttpServletRequest request = (HttpServletRequest) requestAttributes
.resolveReference(RequestAttributes.REFERENCE_REQUEST);
try {
// 从切面织入点处通过反射机制获取织入点处的方法
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
// 获取切入点所在的方法
Method method = signature.getMethod();
// 获取请求的类名
String className = joinPoint.getTarget().getClass().getName();
// 获取请求的方法名
String methodName = method.getName();
methodName = className + "." + methodName;
// 请求的参数
Map<String, String> rtnMap = converMap(request.getParameterMap());
// 将参数所在的数组转换成json
String params = JSON.toJSONString(rtnMap);
// 异常信息
String errorMsg = stackTraceToString(e.getClass().getName(), e.getMessage(), e.getStackTrace());
//TODO 异常信息持久化
System.out.println(params);
System.out.println(errorMsg);
} catch (Exception e2) {
e2.printStackTrace();
}
}
/**
* 转换request 请求参数
*
* @param paramMap request获取的参数数组
*/
public Map<String, String> converMap(Map<String, String[]> paramMap) {
Map<String, String> rtnMap = new HashMap<String, String>();
for (String key : paramMap.keySet()) {
rtnMap.put(key, paramMap.get(key)[0]);
}
return rtnMap;
}
/**
* 转换异常信息为字符串
*
* @param exceptionName 异常名称
* @param exceptionMessage 异常信息
* @param elements 堆栈信息
*/
public String stackTraceToString(String exceptionName, String exceptionMessage, StackTraceElement[] elements) {
StringBuffer strbuff = new StringBuffer();
for (StackTraceElement stet : elements) {
strbuff.append(stet + "\n");
}
String message = exceptionName + ":" + exceptionMessage + "\n\t" + strbuff.toString();
return message;
}
}
\ No newline at end of file
package com.baosight.hpjx.aspect.annotation;
import java.lang.annotation.*;
/**
* @description: 自定义操作日志注解
*/
@Target(ElementType.METHOD) //方法
@Retention(RetentionPolicy.RUNTIME) //生命周期
@Documented
public @interface OperationLogAnnotation {
String operModul() default ""; // 操作模块
String operType() default ""; // 操作类型
String operDesc() default ""; // 操作说明
boolean saveContent() default true;
}
......@@ -141,7 +141,7 @@ public enum DdynamicEnum {
INVENT_RECORD_BLOCK_ID("invent_record_block_id","prdtCode","prdtName","HPSC003.queryInventComboBox"),
/**
* 模块:零件档案
* 模块:零件档案
* 用途:项目档案下拉框
* 编写:wwl
*/
......@@ -181,7 +181,7 @@ public enum DdynamicEnum {
/**
* 模块:物料清单
* 用途:物料清单部件类型 耗材 零件 部件
* 用途:物料清单部件类型 耗材 零件 部件
* 编写:ly
*/
CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HPSC002.querySmallCode");
......
......@@ -11,7 +11,7 @@ import java.util.*;
public enum InventTypeEnum {
RAW(1,"原料"),
CONSUMABLE(2,"耗材"),
SEMI_FINISHED_PRODUCT(3,"零件"),
SEMI_FINISHED_PRODUCT(3,"零件"),
FINISHED_PRODUCT(4,"部件"),
WASTE(5,"废料"),
OTHER(6,"其他"),
......
......@@ -7,7 +7,7 @@ package com.baosight.hpjx.common;
public enum ProdOrderStatusEnum {
NOT_ASSIGN(0, "未分派"),
PART_ASSIGN(1, "部分分派"),
ALL_ASSIGN(1, "全部分派");
ALL_ASSIGN(2, "全部分派");
private Integer code;
private String value;
......
......@@ -34,8 +34,8 @@ public class HPKC004 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
......@@ -66,8 +66,8 @@ public class HPKC004 extends DaoEPBase {
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 部件名称*/
public static final String COL_SUB_INVENT_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_SUB_INVENT_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/
......@@ -104,8 +104,8 @@ public class HPKC004 extends DaoEPBase {
private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/
private String inventName = " "; /* 部件名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
......@@ -180,11 +180,11 @@ public class HPKC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码");
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称");
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
......@@ -476,7 +476,7 @@ public class HPKC004 extends DaoEPBase {
this.inventName = inventName;
}
/**
* get the subInventCode - 零件编码.
* get the subInventCode - 零件编码.
* @return the subInventCode
*/
public String getSubInventCode() {
......@@ -484,15 +484,15 @@ public class HPKC004 extends DaoEPBase {
}
/**
* set the subInventCode - 零件编码.
* set the subInventCode - 零件编码.
*
* @param subInventCode - 零件编码
* @param subInventCode - 零件编码
*/
public void setSubInventCode(String subInventCode) {
this.subInventCode = subInventCode;
}
/**
* get the subInventName - 零件名称.
* get the subInventName - 零件名称.
* @return the subInventName
*/
public String getSubInventName() {
......@@ -500,9 +500,9 @@ public class HPKC004 extends DaoEPBase {
}
/**
* set the subInventName - 零件名称.
* set the subInventName - 零件名称.
*
* @param subInventName - 零件名称
* @param subInventName - 零件名称
*/
public void setSubInventName(String subInventName) {
this.subInventName = subInventName;
......
......@@ -33,8 +33,8 @@ public class HPKC011 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/
......@@ -60,8 +60,8 @@ public class HPKC011 extends DaoEPBase {
public static final String COL_PROJ_NAME = "FIELD_PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "FIELD_INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "FIELD_INVENT_NAME"; /* 部件名称*/
public static final String COL_SUB_INVENT_CODE = "FIELD_SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "FIELD_SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_SUB_INVENT_CODE = "FIELD_SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "FIELD_SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_LENGTH = "FIELD_LENGTH"; /* 长*/
public static final String COL_WIDTH = "FIELD_WIDTH"; /* 宽*/
public static final String COL_THICK = "FIELD_THICK"; /* 厚*/
......@@ -93,8 +93,8 @@ public class HPKC011 extends DaoEPBase {
private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
......@@ -158,11 +158,11 @@ public class HPKC011 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码");
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称");
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH);
......
......@@ -15,8 +15,8 @@
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
......@@ -157,8 +157,8 @@
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
......@@ -196,8 +196,8 @@
PROJ_NAME = #projName#, <!-- 项目名称 -->
INVENT_CODE = #inventCode#, <!-- 部件编码 -->
INVENT_NAME = #inventName#, <!-- 部件名称 -->
SUB_INVENT_CODE = #subInventCode#, <!-- 零件编码 -->
SUB_INVENT_NAME = #subInventName#, <!-- 零件名称 -->
SUB_INVENT_CODE = #subInventCode#, <!-- 零件编码 -->
SUB_INVENT_NAME = #subInventName#, <!-- 零件名称 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
......
......@@ -13,8 +13,8 @@
PROJ_NAME as "projName", <!-- 生产单号 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
......@@ -131,8 +131,8 @@
PROJ_NAME, <!-- 生产单号 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
......@@ -30,6 +31,7 @@ public class ServiceHPSC001 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "销售管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
......@@ -48,6 +50,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 查询操作.
*/
@Override
@OperationLogAnnotation(operModul = "销售管理",operType = "查询")
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
......@@ -59,6 +62,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 新增操作.
*/
@Override
@OperationLogAnnotation(operModul = "销售管理",operType = "新增")
public EiInfo insert(EiInfo inInfo) {
try {
HPSC001 hpsc001 = new HPSC001();
......@@ -87,6 +91,7 @@ public class ServiceHPSC001 extends ServiceBase {
/**
* 修改操作.
*/
@OperationLogAnnotation(operModul = "销售管理",operType = "修改")
public EiInfo update(EiInfo inInfo) {
try {
HPSC001 hpsc001 = new HPSC001();
......@@ -111,6 +116,7 @@ public class ServiceHPSC001 extends ServiceBase {
/**
* 删除操作.
*/
@OperationLogAnnotation(operModul = "销售管理",operType = "删除")
public EiInfo delete(EiInfo eiInfo) {
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......@@ -138,6 +144,7 @@ public class ServiceHPSC001 extends ServiceBase {
/**
* 提交 撤回.
*/
@OperationLogAnnotation(operModul = "销售管理",operType = "提交")
public EiInfo check(EiInfo eiInfo) {
HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
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.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/2/6,10:39
*/
public class ServiceHPSC005C extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HPSC005.QUERY, new HPSC005());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -380,7 +380,7 @@
</isNotEmpty>
</update>
<!-- 零件下拉框 -->
<!-- 零件下拉框 -->
<select id="queryInventComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
A.PRDT_CODE as "prdtCode",
......
......@@ -56,7 +56,7 @@ public class HPSCTools {
updateMap.put("assignedNum", totalNum);
updateMap.put("unassignedNum", jhNum.subtract(totalNum));
// 0.未派工,1.部分派工,2.全部派工
if (jhNum.compareTo(assignNum) == 0) {
if (jhNum.subtract(totalNum).compareTo(BigDecimal.ZERO)==0) {
updateMap.put("status", 2);
} else if (totalNum.compareTo(BigDecimal.ZERO) == 1) {
updateMap.put("status", 1);
......@@ -65,6 +65,37 @@ public class HPSCTools {
}
DaoUtils.update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, updateMap);
}
/**
* 拆单数量校正(部分派单)
*
* @param prodOrderNo 生产订单号
* @param assignNum 剩余数量
*/
public static void checkAssignedNum2(String prodOrderNo, BigDecimal assignNum) {
// 生产订单
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
BigDecimal jhNum = dbSc005.getNum();//生产订单总单
// 子单
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005A> dbSc005as = DaoBase.getInstance().query(HPSC005A.QUERY, queryMap, 0, -999999);
BigDecimal totalNum = assignNum;
if (CollectionUtils.isNotEmpty(dbSc005as)) {
for (HPSC005A dbSc005a : dbSc005as) {
totalNum = totalNum.add(dbSc005a.getNum());
}
}
// 判断重量是否超过订单重量
AssertUtils.isGt(totalNum, jhNum, "拆单的分派数量不能大于计划数量!");
Map updateMap = new HashMap();
updateMap.put("id", dbSc005.getId());
updateMap.put("assignedNum", jhNum);
updateMap.put("unassignedNum", 0);//分派剩余数量变为0
// 部分派工变为全部派工
updateMap.put("status", 2);
DaoUtils.update(HPSqlConstant.HPSC005.UPDATE_ASSIGN_NUM, updateMap);
}
/**
* 新增入库及删除入库单做同步计划订单
......
......@@ -32,8 +32,8 @@ public class HPZL001 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/
public static final String FIELD_SUB_INVENT_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
public static final String FIELD_POOR_TYPE = "poorType"; /* 不良品类*/
......@@ -60,8 +60,8 @@ public class HPZL001 extends DaoEPBase {
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 部件名称*/
public static final String COL_SUB_INVENT_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_SUB_INVENT_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_ORG_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
public static final String COL_POOR_TYPE = "POOR_TYPE"; /* 不良品类*/
......@@ -94,8 +94,8 @@ public class HPZL001 extends DaoEPBase {
private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/
private String inventName = " "; /* 部件名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/
private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/
private Integer poorType; /* 不良品类*/
......@@ -163,11 +163,11 @@ public class HPZL001 extends DaoEPBase {
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码");
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称");
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO);
......@@ -413,7 +413,7 @@ public class HPZL001 extends DaoEPBase {
this.inventName = inventName;
}
/**
* get the subInventCode - 零件编码.
* get the subInventCode - 零件编码.
* @return the subInventCode
*/
public String getSubInventCode() {
......@@ -421,15 +421,15 @@ public class HPZL001 extends DaoEPBase {
}
/**
* set the subInventCode - 零件编码.
* set the subInventCode - 零件编码.
*
* @param subInventCode - 零件编码
* @param subInventCode - 零件编码
*/
public void setSubInventCode(String subInventCode) {
this.subInventCode = subInventCode;
}
/**
* get the subInventName - 零件名称.
* get the subInventName - 零件名称.
* @return the subInventName
*/
public String getSubInventName() {
......@@ -437,9 +437,9 @@ public class HPZL001 extends DaoEPBase {
}
/**
* set the subInventName - 零件名称.
* set the subInventName - 零件名称.
*
* @param subInventName - 零件名称
* @param subInventName - 零件名称
*/
public void setSubInventName(String subInventName) {
this.subInventName = subInventName;
......
......@@ -141,7 +141,7 @@ public class ServiceHPZL001 extends ServiceBase {
// fZl001.setProjName(HPSCTools.HpSc001.get(fZl001.getProjCode()).getProjName());
// 部件名称
// fZl001.setInventName(HPSCTools.HpSc002.get(fZl001.getInventCode()).getPrdtName());
// 零件名称
// 零件名称
// fZl001.setSubInventName(HPSCTools.HpSc002.get(fZl001.getSubInventCode()).getPrdtName());
// 生产组名称
// fZl001.setOrgName(HPXSTools.XsOrg.get(fZl001.getOrgNo()).getOrgCname());
......
......@@ -14,8 +14,8 @@
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
POOR_TYPE as "poorType", <!-- 不良品类 -->
......@@ -136,8 +136,8 @@
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
ORG_NO, <!-- 生产组编码 -->
ORG_NAME, <!-- 生产组名称 -->
POOR_TYPE, <!-- 不良品类 -->
......
......@@ -36,7 +36,7 @@ jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://10.24.1.94:3306/iplat?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.username=root
jdbc.password=fnvu~aKs9LTDYUxe
#jdbc.password=root
#jdbc.password=123456
jdbc.maxActive=20
jdbc.validationQuery=SELECT 1 FROM ${platSchema}.TEDFA00
......
......@@ -11,7 +11,7 @@
<Appenders> <!--<Console name="Console" target="SYSTEM_OUT" follow="true">--> <!--<PatternLayout pattern="${LOG_PATTERN}"/>--> <!--</Console>--> <!-- 用来定义输出到控制台的配置 -->
<Console name="Console" target="SYSTEM_OUT"> <!-- 设置控制台只输出error及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY" />
<PatternLayout pattern="${LOG_PATTERN}" />
<PatternLayout pattern="${LOG_PATTERN}" charset="UTF-8" />
</Console>
<RollingRandomAccessFile name="MyFile" fileName="apps/logs/iplat.log" filePattern="apps/logs/iplat.%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
......
......@@ -20,7 +20,7 @@
</div>
<div class="row">
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
</div>
......@@ -48,13 +48,13 @@
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="prdtName" 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="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
......
......@@ -15,7 +15,7 @@
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产组名称" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
......@@ -28,8 +28,8 @@
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" 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="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" required="true">
......@@ -45,7 +45,7 @@
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150" hidden="true"/>
</EF:EFGrid>
......
......@@ -16,7 +16,7 @@
</div>
<div class="row">
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="是否打印" ename="isPrint" blockId="inqu_status" row="0" colWidth="3" defaultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/>
......@@ -41,7 +41,7 @@
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" format="{0:N3}" maxLength="20" width="100"
align="center"/>
<EF:EFColumn ename="length" cname="长" enable="false" format="{0:N3}" maxLength="20" width="100"
......@@ -63,7 +63,7 @@
<EF:EFColumn ename="saleNo" cname="销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="oldSaleNo" cname="原销售单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
......@@ -15,8 +15,8 @@
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件编码" ename="subInventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件编码" ename="subInventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
......@@ -27,7 +27,7 @@
<EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}"/>
......@@ -36,7 +36,7 @@
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prodNo" cname="生产订单号" enable="false" width="140" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -21,7 +21,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-subInventCode" cname="零件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFSelect ename="inqu_status-0-subInventCode" cname="零件名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="material_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -40,7 +40,7 @@
<EF:EFColumn ename="projCode" cname="项目编号" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="inventCode" cname="部件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="subInventCode" cname="零件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="subInventCode" cname="零件名称" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="thick" cname="厚" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
......
......@@ -181,7 +181,7 @@ $(function () {
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
setTimeout(function(){ tree.reload("root");}, 500);//更新树
}
});
},
......
......@@ -41,7 +41,7 @@
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码" hidden="true"/>
......
......@@ -109,7 +109,7 @@ $(function () {
// 绑定grid
detailGrid.setEiInfo(ei);
query();
resultGrid.dataSource.page(resultGrid.dataSource._page);
}
//释放禁用按钮
btnNode.attr("disabled", false);
......
......@@ -59,8 +59,8 @@
<EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/>
......
......@@ -28,7 +28,7 @@ $(function () {
+ 'onclick="tearAssign(\'' + prodOrderNo + '\')" >拆单派工</a>';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showGroupDetail(\'' + prodOrderNo + '\')" >详情</a>';
+ 'onclick="showGroupDetail(\'' + prodOrderNo + '\')" >任务详情</a>';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>';
......@@ -62,6 +62,21 @@ function tearAssign(prodOrderNo) {
}
/**
* 生产订单详情
*
* @param productionOrderNo
*/
function tearDetails(prodOrderNo) {
JSColorbox.open({
href: "HPSC005C?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo",
title: "<div style='text-align: center;'>生产订单详情</div>",
width: "80%",
height: "90%",
callbackName: tearAssignCallback
});
}
/**
* 拆单分派回调
*/
function tearAssignCallback() {
......
......@@ -14,7 +14,7 @@
<EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件名称" blockId="inqu_status" ename="partName" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" blockId="inqu_status" ename="partName" row="0" colWidth="3"/>
<EF:EFDatePicker cname="计划完成日期:" blockId="inqu_status" ename="planCompletionDate" row="0" colWidth="3"
format="yyyy/MM/dd" readonly="true"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0" colWidth="3">
......@@ -28,7 +28,8 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center" onclick="tearDetails()"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="90" align="center">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
......
......@@ -15,7 +15,7 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
</div>
<div class="row">
......
......@@ -14,7 +14,7 @@
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产组名称" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
......
let factoryGroupGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "orgName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
}
$("#QUERY").on("click", query);
});
<!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="订单详情">
<EF:EFInput ename="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partLength" cname="部件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="部件宽" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partThick" cname="部件厚" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="部件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="部件重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark" cname="部件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partLength" cname="零件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="零件宽" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partThick" cname="零件厚" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="零件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="零件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unitWt" cname="零件重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="剩余数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="剩余重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partType" cname="完成数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="完成重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="实际完成时间" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
</EF:EFPage>
......@@ -7,48 +7,41 @@
<EF:EFPage title="下料登记">
<EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="detail-0-id" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partName" cname="零部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-inventName" cname="材料名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unitWt" cname="单重" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="计划重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionNum" cname="完工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionUnitWt" cname="完工重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true">
<EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/>
<EF:EFOption label="已完成" value="2"/>
<EF:EFOption label="下料中" value="0"/>
<EF:EFOption label="完工" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" required='true' cname="完成日期" editType="date" dateFormat="yyyy/MM/dd" />
<EF:EFPopupColumn ename="userId" cname="完成人" popupType="ServiceGrid"
popupTitle="人员信息" serviceName="HPXSUser" methodName="queryComboBox" resultId="user_block_id"
columnEnames="textField,valueField"
columnCnames="登录名称,用户名"
backFillColumnIds="textField,valueField"
backFillFieldIds="userName,userId"
valueField="valueField" textField="valueField"/>
<EF:EFColumn ename="userName" cname="完成名称" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成日期" enable="false" hidden="true"/>
<EF:EFColumn ename="userId" cname="完成人" enable="false" align="center"/>
<EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" />
<EF:EFColumn ename="actualCompletionTotalWt" cname="完成重量" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -167,7 +167,7 @@ $(window).load(function () {
// onFail: function (ei) {
// }
// }, {async: false});
// // 零件名称
// // 零件名称
// EiCommunicator.send("HPSC004", "queryInventComboBox", inInfo, {
// onSuccess: function (ei) {
// subInventNameGlobalData = ei.getBlock("sub_invent_record_block_id").getMappedRows();
......
......@@ -12,7 +12,7 @@
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="工作组" ename="orgName" blockId="inqu_status" row="0" colWidth="3"/>
......@@ -50,7 +50,7 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventName" cname="部件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventName" cname="零件名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
......@@ -64,7 +64,7 @@
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="inventCode" cname="部件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="subInventCode" cname="零件编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="130" align="center"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="150" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="150" align="center"
......
......@@ -12,7 +12,7 @@
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="部件名称" ename="inventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="零件名称" ename="subInventName" blockId="detail" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="生产组" ename="orgName" blockId="detail" row="0" colWidth="3" readonly="true"/>
</div>
<EF:EFInput cname="状态" ename="status" blockId="detail" row="0" colWidth="3" type="hidden"/>
......
......@@ -15,7 +15,7 @@
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
......@@ -26,8 +26,8 @@
<EF:EFColumn ename="childId" cname="生产任务ID" enable="false" width="90" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" 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="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="poorType" cname="不良品类" width="100" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpjx.poorType"/>
</EF:EFComboColumn>
......@@ -40,7 +40,7 @@
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="150"/>
<EF:EFColumn ename="orgNo" cname="生产组编码" enable="false" width="150"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="140" 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