Commit 20e7a188 by yukang

Merge branch 'dev' of https://gitlab.baocloud.cn/bggf/smart/hp-smart into dev

parents 4e48a3eb 908e7a07
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 false;
}
...@@ -141,7 +141,7 @@ public enum DdynamicEnum { ...@@ -141,7 +141,7 @@ public enum DdynamicEnum {
INVENT_RECORD_BLOCK_ID("invent_record_block_id","prdtCode","prdtName","HPSC003.queryInventComboBox"), INVENT_RECORD_BLOCK_ID("invent_record_block_id","prdtCode","prdtName","HPSC003.queryInventComboBox"),
/** /**
* 模块:零件档案 * 模块:零件档案
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
...@@ -181,10 +181,25 @@ public enum DdynamicEnum { ...@@ -181,10 +181,25 @@ public enum DdynamicEnum {
/** /**
* 模块:物料清单 * 模块:物料清单
* 用途:物料清单部件类型 耗材 零件 部件 * 用途:物料清单部件类型 耗材 零件 部件
* 编写:ly * 编写:ly
*/ */
CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HPSC002.querySmallCode"); CODESET_CODE_BLOCK_ID("codeset_code_block_id","itemCode","itemCname","HPSC002.querySmallCode"),
/**
* 模块:日志管理
* 用途:日志查询
* 编写:wan
*/
OPER_MODUL_BLOCK_ID("oper_modul_block_id","operModul","operModul","HPRZ001.queryOperModulComboBox"),
/**
* 模块:日志管理
* 用途:日志查询
* 编写:wan
*/
OPER_TYPE_BLOCK_ID("oper_type_block_id","operType","operType","HPRZ001.queryOperTypeComboBox");
/** 将结果集放入的块名 */ /** 将结果集放入的块名 */
private final String blockId; private final String blockId;
......
...@@ -11,7 +11,7 @@ import java.util.*; ...@@ -11,7 +11,7 @@ import java.util.*;
public enum InventTypeEnum { public enum InventTypeEnum {
RAW(1,"原料"), RAW(1,"原料"),
CONSUMABLE(2,"耗材"), CONSUMABLE(2,"耗材"),
SEMI_FINISHED_PRODUCT(3,"零件"), SEMI_FINISHED_PRODUCT(3,"零件"),
FINISHED_PRODUCT(4,"部件"), FINISHED_PRODUCT(4,"部件"),
WASTE(5,"废料"), WASTE(5,"废料"),
OTHER(6,"其他"), OTHER(6,"其他"),
......
...@@ -7,7 +7,7 @@ package com.baosight.hpjx.common; ...@@ -7,7 +7,7 @@ package com.baosight.hpjx.common;
public enum ProdOrderStatusEnum { public enum ProdOrderStatusEnum {
NOT_ASSIGN(0, "未分派"), NOT_ASSIGN(0, "未分派"),
PART_ASSIGN(1, "部分分派"), PART_ASSIGN(1, "部分分派"),
ALL_ASSIGN(1, "全部分派"); ALL_ASSIGN(2, "全部分派");
private Integer code; private Integer code;
private String value; private String value;
......
...@@ -38,4 +38,20 @@ public class CommonConstant { ...@@ -38,4 +38,20 @@ public class CommonConstant {
public static final String DAY = "DAY"; public static final String DAY = "DAY";
} }
/**
* 常用字段常量
*
* @author:songx
* @date:2024/2/22,15:33
*/
public static class Field {
// DETAIL
public static final String DETAIL = "detail";
// ID
public static final String ID = "id";
// 生产订单号
public static final String PROD_ORDER_NO = "prodOrderNo";
}
} }
...@@ -62,7 +62,7 @@ public class HPBI001 extends DaoEPBase { ...@@ -62,7 +62,7 @@ public class HPBI001 extends DaoEPBase {
private String yearValue = " "; /* 供应商编码*/ private String yearValue = " "; /* 供应商编码*/
private String janValue = " "; /* 供应商名称*/ private String janValue = " "; /* 供应商名称*/
private String febValue = " "; /* 地址*/ private String febValue = " "; /* 地址*/
private Integer marValue = 1; /* 状态 0禁用 1启用*/ private String marValue = " "; /* 状态 0禁用 1启用*/
private String aprValue = " "; /* 创建人*/ private String aprValue = " "; /* 创建人*/
private String mayValue = " "; /* 创建人名称*/ private String mayValue = " "; /* 创建人名称*/
private String junValue = " "; /* 创建时间*/ private String junValue = " "; /* 创建时间*/
...@@ -252,7 +252,7 @@ public class HPBI001 extends DaoEPBase { ...@@ -252,7 +252,7 @@ public class HPBI001 extends DaoEPBase {
* get the marValue - 状态 0禁用 1启用. * get the marValue - 状态 0禁用 1启用.
* @return the marValue * @return the marValue
*/ */
public Integer getmarValue() { public String getmarValue() {
return this.marValue; return this.marValue;
} }
...@@ -261,7 +261,7 @@ public class HPBI001 extends DaoEPBase { ...@@ -261,7 +261,7 @@ public class HPBI001 extends DaoEPBase {
* *
* @param marValue - 状态 0禁用 1启用 * @param marValue - 状态 0禁用 1启用
*/ */
public void setmarValue(Integer marValue) { public void setmarValue(String marValue) {
this.marValue = marValue; this.marValue = marValue;
} }
/** /**
...@@ -427,7 +427,7 @@ public class HPBI001 extends DaoEPBase { ...@@ -427,7 +427,7 @@ public class HPBI001 extends DaoEPBase {
setyearValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(YEARVALUE)), yearValue)); setyearValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(YEARVALUE)), yearValue));
setjanValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JANVALUE)), janValue)); setjanValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JANVALUE)), janValue));
setfebValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FEBVALUE)), febValue)); setfebValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FEBVALUE)), febValue));
setmarValue(NumberUtils.toInteger(StringUtils.toString(map.get(MARVLAUE)), marValue)); setmarValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(MARVLAUE)), marValue));
setaprValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(APRVALUE)), aprValue)); setaprValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(APRVALUE)), aprValue));
setmayValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(MAYVALUE)), mayValue)); setmayValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(MAYVALUE)), mayValue));
setjunValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JUNVALUE)), junValue)); setjunValue(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(JUNVALUE)), junValue));
......
...@@ -73,4 +73,18 @@ public class HPConstant { ...@@ -73,4 +73,18 @@ public class HPConstant {
public static final String QT = "QT"; public static final String QT = "QT";
} }
/**
* 计划状态常量
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class planStatus {
// 计划中
public static final Integer S_0 = 0;
// 生产中
public static final Integer S_1 = 1;
}
} }
...@@ -153,6 +153,22 @@ public class HPSqlConstant { ...@@ -153,6 +153,22 @@ public class HPSqlConstant {
} }
/** /**
* HPKC009A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC009A {
// 按日期删除
public static final String DELETE_BY_TIME = "HPKC009A.deleteByTime";
// 查询
public static final String QUERY = "HPKC009A.query";
// 查询统计
public static final String QUERY_SUM = "HPKC009A.querySum";
}
/**
* HPKC010 SQL 定义 * HPKC010 SQL 定义
* *
* @author:songx * @author:songx
...@@ -173,7 +189,7 @@ public class HPSqlConstant { ...@@ -173,7 +189,7 @@ public class HPSqlConstant {
public class HPKC010A { public class HPKC010A {
// 按日期删除 // 按日期删除
public static final String DELETE_BY_TIME = "HPKC009.deleteByTime"; public static final String DELETE_BY_TIME = "HPKC010A.deleteByTime";
// 备份数量 // 备份数量
public static final String BACKUP = "HPKC010A.backup"; public static final String BACKUP = "HPKC010A.backup";
} }
...@@ -191,6 +207,20 @@ public class HPSqlConstant { ...@@ -191,6 +207,20 @@ public class HPSqlConstant {
} }
/** /**
* HPKC011A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC011A {
// 按日期删除
public static final String DELETE_BY_TIME = "HPKC011A.deleteByTime";
// 备份数量
public static final String BACKUP = "HPKC011A.backup";
}
/**
* HPPZ010 SQL 定义 * HPPZ010 SQL 定义
* *
* @author:songx * @author:songx
...@@ -217,6 +247,20 @@ public class HPSqlConstant { ...@@ -217,6 +247,20 @@ public class HPSqlConstant {
} }
/** /**
* HPSC003 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC003 {
// 修改状态
public static final String UPDATE_STATUS = "HPSC003.updateStatus";
// 修改时间
public static final String UPDATE_DATE = "HPSC003.updateDate";
}
/**
* HPSC004 SQL名称定义 * HPSC004 SQL名称定义
* *
* @author:songx * @author:songx
...@@ -226,8 +270,14 @@ public class HPSqlConstant { ...@@ -226,8 +270,14 @@ public class HPSqlConstant {
// 锁 // 锁
public static final String LOCK = "HPSC004.lock"; public static final String LOCK = "HPSC004.lock";
// 更新时间完工情况 // 根据材料号删除
public static final String DELETE_BY_MAT = "HPSC004.deleteByMat";
// 更新计划完工情况
public static final String UPDATE_PLAN_DATE = "HPSC004.updatePlanDate";
// 更新实际完工情况
public static final String UPDATE_COMPLETE = "HPSC004.updateComplete"; public static final String UPDATE_COMPLETE = "HPSC004.updateComplete";
// 更新订单号
public static final String UPDATE_PROD_ORDER_NO = "HPSC004.updateProdOrderNo";
} }
/** /**
......
...@@ -34,8 +34,8 @@ public class HPKC004 extends DaoEPBase { ...@@ -34,8 +34,8 @@ public class HPKC004 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/ 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_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_LENGTH = "length"; /* 长*/ public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/ public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/ public static final String FIELD_THICK = "thick"; /* 厚*/
...@@ -66,8 +66,8 @@ public class HPKC004 extends DaoEPBase { ...@@ -66,8 +66,8 @@ public class HPKC004 extends DaoEPBase {
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/ public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 部件名称*/ 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_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/ public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/
public static final String COL_LENGTH = "LENGTH"; /* 长*/ public static final String COL_LENGTH = "LENGTH"; /* 长*/
public static final String COL_WIDTH = "WIDTH"; /* 宽*/ public static final String COL_WIDTH = "WIDTH"; /* 宽*/
public static final String COL_THICK = "THICK"; /* 厚*/ public static final String COL_THICK = "THICK"; /* 厚*/
...@@ -104,8 +104,8 @@ public class HPKC004 extends DaoEPBase { ...@@ -104,8 +104,8 @@ public class HPKC004 extends DaoEPBase {
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/ private String inventCode = " "; /* 部件编码*/
private String inventName = " "; /* 部件名称*/ private String inventName = " "; /* 部件名称*/
private String subInventCode = " "; /* 零件编码*/ private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/ private String subInventName = " "; /* 零件名称*/
private BigDecimal length = new BigDecimal("0"); /* 长*/ private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/ private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/ private BigDecimal thick = new BigDecimal("0"); /* 厚*/
...@@ -180,11 +180,11 @@ public class HPKC004 extends DaoEPBase { ...@@ -180,11 +180,11 @@ public class HPKC004 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE); eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码"); eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME); eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称"); eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH); eiColumn = new EiColumn(FIELD_LENGTH);
...@@ -476,7 +476,7 @@ public class HPKC004 extends DaoEPBase { ...@@ -476,7 +476,7 @@ public class HPKC004 extends DaoEPBase {
this.inventName = inventName; this.inventName = inventName;
} }
/** /**
* get the subInventCode - 零件编码. * get the subInventCode - 零件编码.
* @return the subInventCode * @return the subInventCode
*/ */
public String getSubInventCode() { public String getSubInventCode() {
...@@ -484,15 +484,15 @@ public class HPKC004 extends DaoEPBase { ...@@ -484,15 +484,15 @@ public class HPKC004 extends DaoEPBase {
} }
/** /**
* set the subInventCode - 零件编码. * set the subInventCode - 零件编码.
* *
* @param subInventCode - 零件编码 * @param subInventCode - 零件编码
*/ */
public void setSubInventCode(String subInventCode) { public void setSubInventCode(String subInventCode) {
this.subInventCode = subInventCode; this.subInventCode = subInventCode;
} }
/** /**
* get the subInventName - 零件名称. * get the subInventName - 零件名称.
* @return the subInventName * @return the subInventName
*/ */
public String getSubInventName() { public String getSubInventName() {
...@@ -500,9 +500,9 @@ public class HPKC004 extends DaoEPBase { ...@@ -500,9 +500,9 @@ public class HPKC004 extends DaoEPBase {
} }
/** /**
* set the subInventName - 零件名称. * set the subInventName - 零件名称.
* *
* @param subInventName - 零件名称 * @param subInventName - 零件名称
*/ */
public void setSubInventName(String subInventName) { public void setSubInventName(String subInventName) {
this.subInventName = subInventName; this.subInventName = subInventName;
......
...@@ -33,8 +33,8 @@ public class HPKC011 extends DaoEPBase { ...@@ -33,8 +33,8 @@ public class HPKC011 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/ 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_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_LENGTH = "length"; /* 长*/ public static final String FIELD_LENGTH = "length"; /* 长*/
public static final String FIELD_WIDTH = "width"; /* 宽*/ public static final String FIELD_WIDTH = "width"; /* 宽*/
public static final String FIELD_THICK = "thick"; /* 厚*/ public static final String FIELD_THICK = "thick"; /* 厚*/
...@@ -60,8 +60,8 @@ public class HPKC011 extends DaoEPBase { ...@@ -60,8 +60,8 @@ public class HPKC011 extends DaoEPBase {
public static final String COL_PROJ_NAME = "FIELD_PROJ_NAME"; /* 项目名称*/ 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_CODE = "FIELD_INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "FIELD_INVENT_NAME"; /* 部件名称*/ 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_CODE = "FIELD_SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "FIELD_SUB_INVENT_NAME"; /* 零件名称*/ 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_LENGTH = "FIELD_LENGTH"; /* 长*/
public static final String COL_WIDTH = "FIELD_WIDTH"; /* 宽*/ public static final String COL_WIDTH = "FIELD_WIDTH"; /* 宽*/
public static final String COL_THICK = "FIELD_THICK"; /* 厚*/ public static final String COL_THICK = "FIELD_THICK"; /* 厚*/
...@@ -93,8 +93,8 @@ public class HPKC011 extends DaoEPBase { ...@@ -93,8 +93,8 @@ public class HPKC011 extends DaoEPBase {
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 物料编码*/ private String inventCode = " "; /* 物料编码*/
private String inventName = " "; /* 物料名称*/ private String inventName = " "; /* 物料名称*/
private String subInventCode = " "; /* 零件编码*/ private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/ private String subInventName = " "; /* 零件名称*/
private BigDecimal length = new BigDecimal("0"); /* 长*/ private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/ private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/ private BigDecimal thick = new BigDecimal("0"); /* 厚*/
...@@ -158,11 +158,11 @@ public class HPKC011 extends DaoEPBase { ...@@ -158,11 +158,11 @@ public class HPKC011 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE); eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码"); eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME); eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称"); eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_LENGTH); eiColumn = new EiColumn(FIELD_LENGTH);
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -45,6 +46,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -45,6 +46,7 @@ public class ServiceHPKC001 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -66,6 +68,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -66,6 +68,7 @@ public class ServiceHPKC001 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -89,6 +92,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -89,6 +92,7 @@ public class ServiceHPKC001 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "插入",operDesc = "插入")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -123,6 +127,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -123,6 +127,7 @@ public class ServiceHPKC001 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -161,6 +166,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -161,6 +166,7 @@ public class ServiceHPKC001 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC001 fKc001 = new HPKC001(); HPKC001 fKc001 = new HPKC001();
...@@ -178,6 +184,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -178,6 +184,7 @@ public class ServiceHPKC001 extends ServiceBase {
* *
* @param fKc001 * @param fKc001
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(HPKC001 fKc001) { private void setBaseInfo(HPKC001 fKc001) {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc001.setReceiptDate(StringUtil.removeHorizontalLine(fKc001.getReceiptDate())); fKc001.setReceiptDate(StringUtil.removeHorizontalLine(fKc001.getReceiptDate()));
...@@ -193,6 +200,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -193,6 +200,7 @@ public class ServiceHPKC001 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "采购入库单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -38,6 +39,7 @@ public class ServiceHPKC002 extends ServiceBase { ...@@ -38,6 +39,7 @@ public class ServiceHPKC002 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "生产领料单",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
...@@ -61,6 +63,7 @@ public class ServiceHPKC002 extends ServiceBase { ...@@ -61,6 +63,7 @@ public class ServiceHPKC002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产领料单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -83,6 +86,7 @@ public class ServiceHPKC002 extends ServiceBase { ...@@ -83,6 +86,7 @@ public class ServiceHPKC002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产领料单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -45,6 +46,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -45,6 +46,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
...@@ -67,6 +69,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -67,6 +69,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -85,6 +88,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -85,6 +88,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生成出库单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -44,9 +45,10 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -44,9 +45,10 @@ public class ServiceHPKC003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产入库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), new HashMap<String,Object>(){{put("inventTypes",new String[]{"2","3"});}}, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -61,6 +63,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -61,6 +63,7 @@ public class ServiceHPKC003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产入库单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -81,6 +84,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -81,6 +84,7 @@ public class ServiceHPKC003 extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产入库单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
try { try {
List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = eiInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
...@@ -49,11 +50,12 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -49,11 +50,12 @@ public class ServiceHPKC003A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务查询",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("inventTypes", DEFAULT_INVENT_TYPE); queryMap.put("inventTypes", new String[]{"2","3"});
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), queryMap, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -68,6 +70,7 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -68,6 +70,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务查询",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -86,6 +89,7 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -86,6 +89,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务查询",operType = "插入",operDesc = "生成入库单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -41,6 +42,7 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -41,6 +42,7 @@ public class ServiceHPKC004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "销售出库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -62,6 +64,7 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -62,6 +64,7 @@ public class ServiceHPKC004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "销售出库单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -83,6 +86,7 @@ public class ServiceHPKC004 extends ServiceBase { ...@@ -83,6 +86,7 @@ public class ServiceHPKC004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "销售出库单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -42,6 +43,7 @@ public class ServiceHPKC004A extends ServiceEPBase { ...@@ -42,6 +43,7 @@ public class ServiceHPKC004A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
...@@ -58,6 +60,7 @@ public class ServiceHPKC004A extends ServiceEPBase { ...@@ -58,6 +60,7 @@ public class ServiceHPKC004A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -74,6 +77,7 @@ public class ServiceHPKC004A extends ServiceEPBase { ...@@ -74,6 +77,7 @@ public class ServiceHPKC004A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生成出库单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -40,6 +41,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -40,6 +41,7 @@ public class ServiceHPKC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
...@@ -59,6 +61,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -59,6 +61,7 @@ public class ServiceHPKC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -81,6 +84,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -81,6 +84,7 @@ public class ServiceHPKC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -113,6 +117,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -113,6 +117,7 @@ public class ServiceHPKC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -137,6 +142,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -137,6 +142,7 @@ public class ServiceHPKC005 extends ServiceBase {
* *
* @param fKc005 * @param fKc005
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(HPKC005 fKc005) { private void setBaseInfo(HPKC005 fKc005) {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate())); fKc005.setReceiptDate(StringUtil.removeHorizontalLine(fKc005.getReceiptDate()));
...@@ -156,6 +162,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -156,6 +162,7 @@ public class ServiceHPKC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存盘点单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
...@@ -38,6 +39,7 @@ public class ServiceHPKC005A extends ServiceEPBase { ...@@ -38,6 +39,7 @@ public class ServiceHPKC005A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
...@@ -58,6 +60,7 @@ public class ServiceHPKC005A extends ServiceEPBase { ...@@ -58,6 +60,7 @@ public class ServiceHPKC005A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -75,6 +78,7 @@ public class ServiceHPKC005A extends ServiceEPBase { ...@@ -75,6 +78,7 @@ public class ServiceHPKC005A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生成盘点单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -49,6 +50,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -49,6 +50,7 @@ public class ServiceHPKC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -70,6 +72,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -70,6 +72,7 @@ public class ServiceHPKC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -93,6 +96,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -93,6 +96,7 @@ public class ServiceHPKC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -139,6 +143,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -139,6 +143,7 @@ public class ServiceHPKC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -177,6 +182,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -177,6 +182,7 @@ public class ServiceHPKC006 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC006 fKc006 = new HPKC006(); HPKC006 fKc006 = new HPKC006();
...@@ -194,6 +200,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -194,6 +200,7 @@ public class ServiceHPKC006 extends ServiceBase {
* *
* @param fKc006 * @param fKc006
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(HPKC006 fKc006) { private void setBaseInfo(HPKC006 fKc006) {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc006.setReceiptDate(StringUtil.removeHorizontalLine(fKc006.getReceiptDate())); fKc006.setReceiptDate(StringUtil.removeHorizontalLine(fKc006.getReceiptDate()));
...@@ -209,6 +216,7 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -209,6 +216,7 @@ public class ServiceHPKC006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他入库单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -47,6 +48,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -47,6 +48,7 @@ public class ServiceHPKC007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -68,6 +70,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -68,6 +70,7 @@ public class ServiceHPKC007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -89,6 +92,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -89,6 +92,7 @@ public class ServiceHPKC007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -123,6 +127,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -123,6 +127,7 @@ public class ServiceHPKC007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -162,6 +167,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -162,6 +167,7 @@ public class ServiceHPKC007 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC007 fKc007 = new HPKC007(); HPKC007 fKc007 = new HPKC007();
...@@ -179,6 +185,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -179,6 +185,7 @@ public class ServiceHPKC007 extends ServiceBase {
* *
* @param fKc007 * @param fKc007
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(HPKC007 fKc007) { private void setBaseInfo(HPKC007 fKc007) {
// 去除日期字符串中的- // 去除日期字符串中的-
fKc007.setReceiptDate(StringUtil.removeHorizontalLine(fKc007.getReceiptDate())); fKc007.setReceiptDate(StringUtil.removeHorizontalLine(fKc007.getReceiptDate()));
...@@ -194,6 +201,7 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -194,6 +201,7 @@ public class ServiceHPKC007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "其他出库单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -44,6 +45,7 @@ public class ServiceHPKC007A extends ServiceEPBase { ...@@ -44,6 +45,7 @@ public class ServiceHPKC007A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "初始化")
@Override @Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
...@@ -66,6 +68,7 @@ public class ServiceHPKC007A extends ServiceEPBase { ...@@ -66,6 +68,7 @@ public class ServiceHPKC007A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -84,6 +87,7 @@ public class ServiceHPKC007A extends ServiceEPBase { ...@@ -84,6 +87,7 @@ public class ServiceHPKC007A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存查询",operType = "插入",operDesc = "生成出库单")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -38,6 +39,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -38,6 +39,7 @@ public class ServiceHPKC008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "数据统计单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -57,6 +59,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -57,6 +59,7 @@ public class ServiceHPKC008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "数据统计单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -80,6 +83,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -80,6 +83,7 @@ public class ServiceHPKC008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "数据统计单",operType = "查询",operDesc = "新增")
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -111,6 +115,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -111,6 +115,7 @@ public class ServiceHPKC008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "数据统计单",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -140,6 +145,7 @@ public class ServiceHPKC008 extends ServiceBase { ...@@ -140,6 +145,7 @@ public class ServiceHPKC008 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "数据统计单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
...@@ -54,6 +55,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -54,6 +55,7 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
...@@ -73,6 +75,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -73,6 +75,7 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -96,6 +99,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -96,6 +99,7 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "插入",operDesc = "按天统计")
public EiInfo statDay(EiInfo inInfo) { public EiInfo statDay(EiInfo inInfo) {
try { try {
// 取昨天的日期 // 取昨天的日期
...@@ -130,6 +134,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -130,6 +134,7 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "插入",operDesc = "按月统计")
public EiInfo statMonth(EiInfo inInfo) { public EiInfo statMonth(EiInfo inInfo) {
try { try {
// 上个月的日期 // 上个月的日期
...@@ -165,6 +170,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -165,6 +170,7 @@ public class ServiceHPKC009 extends ServiceBase {
* *
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "插入",operDesc = "统计库存收发存")
private List<HPKC009> statData(Map queryMap) { private List<HPKC009> statData(Map queryMap) {
List<HPKC009> newKc009s = new ArrayList<>(); List<HPKC009> newKc009s = new ArrayList<>();
// 1.1、期末库存 // 1.1、期末库存
...@@ -178,10 +184,10 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -178,10 +184,10 @@ public class ServiceHPKC009 extends ServiceBase {
buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventType(), item.getInventCode(), buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventType(), item.getInventCode(),
item.getWhCode(), item.getInventRecordId()), item -> item)); item.getWhCode(), item.getInventRecordId()), item -> item));
// 1.3、生产入库 // 1.3、生产入库
List<HPKC003> scRks = dao.query(HPSqlConstant.HPKC003.STAT_DATE, queryMap); // List<HPKC003> scRks = dao.query(HPSqlConstant.HPKC003.STAT_DATE, queryMap);
Map<String, HPKC003> scRkMap = scRks.stream().collect(Collectors.toMap(item -> // Map<String, HPKC003> scRkMap = scRks.stream().collect(Collectors.toMap(item ->
buildKey(item.getCompanyCode(), item.getDepCode(), item.getPartType(), item.getPartCode(), // buildKey(item.getCompanyCode(), item.getDepCode(), item.getPartType(), item.getPartCode(),
item.getWhCode(), null), item -> item)); // item.getWhCode(), null), item -> item));
// 1.4、其他入库 // 1.4、其他入库
List<HPKC006> qtRks = dao.query(HPSqlConstant.HPKC006.STAT_DATE, queryMap); List<HPKC006> qtRks = dao.query(HPSqlConstant.HPKC006.STAT_DATE, queryMap);
Map<String, HPKC006> qtRkMap = qtRks.stream().collect(Collectors.toMap(item -> Map<String, HPKC006> qtRkMap = qtRks.stream().collect(Collectors.toMap(item ->
...@@ -193,10 +199,10 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -193,10 +199,10 @@ public class ServiceHPKC009 extends ServiceBase {
buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventType(), item.getInventCode(), buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventType(), item.getInventCode(),
item.getWhCode(), item.getInventRecordId()), item -> item)); item.getWhCode(), item.getInventRecordId()), item -> item));
// 1.6、销售出库 // 1.6、销售出库
List<HPKC004> xsCks = dao.query(HPSqlConstant.HPKC004.STAT_DATE, queryMap); // List<HPKC004> xsCks = dao.query(HPSqlConstant.HPKC004.STAT_DATE, queryMap);
Map<String, HPKC004> xsCkMap = xsCks.stream().collect(Collectors.toMap(item -> // Map<String, HPKC004> xsCkMap = xsCks.stream().collect(Collectors.toMap(item ->
buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventCode(), item.getSubInventCode(), // buildKey(item.getCompanyCode(), item.getDepCode(), item.getInventCode(), item.getSubInventCode(),
item.getWhCode(), ""), item -> item)); // item.getWhCode(), ""), item -> item));
// 1.7、其它出库 // 1.7、其它出库
List<HPKC007> qtCks = dao.query(HPSqlConstant.HPKC007.STAT_DATE, queryMap); List<HPKC007> qtCks = dao.query(HPSqlConstant.HPKC007.STAT_DATE, queryMap);
Map<String, HPKC007> qtCkMap = qtCks.stream().collect(Collectors.toMap(item -> Map<String, HPKC007> qtCkMap = qtCks.stream().collect(Collectors.toMap(item ->
...@@ -228,7 +234,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -228,7 +234,7 @@ public class ServiceHPKC009 extends ServiceBase {
kc009.setCgEnterAmount(cgRk == null ? BigDecimal.ZERO : cgRk.getAmount()); kc009.setCgEnterAmount(cgRk == null ? BigDecimal.ZERO : cgRk.getAmount());
kc009.setCgEnterWeight(cgRk == null ? BigDecimal.ZERO : cgRk.getWeight()); kc009.setCgEnterWeight(cgRk == null ? BigDecimal.ZERO : cgRk.getWeight());
// 1.3、生产入库 // 1.3、生产入库
HPKC003 scRk = scRkMap.get(key); HPKC003 scRk = null;//scRkMap.get(key);
kc009.setScEnterAmount(scRk == null ? BigDecimal.ZERO : scRk.getAmount()); kc009.setScEnterAmount(scRk == null ? BigDecimal.ZERO : scRk.getAmount());
kc009.setScEnterWeight(scRk == null ? BigDecimal.ZERO : scRk.getWeight()); kc009.setScEnterWeight(scRk == null ? BigDecimal.ZERO : scRk.getWeight());
// 1.3、其他入库 // 1.3、其他入库
...@@ -245,7 +251,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -245,7 +251,7 @@ public class ServiceHPKC009 extends ServiceBase {
kc009.setScOuterAmount(scCk == null ? BigDecimal.ZERO : scCk.getAmount()); kc009.setScOuterAmount(scCk == null ? BigDecimal.ZERO : scCk.getAmount());
kc009.setScOuterWeight(scCk == null ? BigDecimal.ZERO : scCk.getWeight()); kc009.setScOuterWeight(scCk == null ? BigDecimal.ZERO : scCk.getWeight());
// 1.6、销售出库 // 1.6、销售出库
HPKC004 xsCk = xsCkMap.get(key); HPKC004 xsCk = null;//xsCkMap.get(key);
kc009.setXsOuterAmount(xsCk == null ? BigDecimal.ZERO : xsCk.getAmount()); kc009.setXsOuterAmount(xsCk == null ? BigDecimal.ZERO : xsCk.getAmount());
kc009.setXsOuterWeight(xsCk == null ? BigDecimal.ZERO : xsCk.getWeight()); kc009.setXsOuterWeight(xsCk == null ? BigDecimal.ZERO : xsCk.getWeight());
// 1.7、其他出库 // 1.7、其他出库
...@@ -282,6 +288,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -282,6 +288,7 @@ public class ServiceHPKC009 extends ServiceBase {
* *
* @param kc009s * @param kc009s
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(List<HPKC009> kc009s) { private void setBaseInfo(List<HPKC009> kc009s) {
// 仓库名称 // 仓库名称
List<String> whCodes = kc009s.stream().map(HPKC009::getWhCode).collect(Collectors.toList()); List<String> whCodes = kc009s.stream().map(HPKC009::getWhCode).collect(Collectors.toList());
...@@ -316,6 +323,7 @@ public class ServiceHPKC009 extends ServiceBase { ...@@ -316,6 +323,7 @@ public class ServiceHPKC009 extends ServiceBase {
* @param inventRecordId * @param inventRecordId
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存收发存",operType = "设置",operDesc = "构建KEY")
private String buildKey(Object companyCode, Object depCode, Object inventType, Object inventCode, private String buildKey(Object companyCode, Object depCode, Object inventType, Object inventCode,
Object whCode, Object inventRecordId) { Object whCode, Object inventRecordId) {
return ObjectUtils.trimToEmpty(companyCode) + "#" return ObjectUtils.trimToEmpty(companyCode) + "#"
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
...@@ -39,6 +40,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -39,6 +40,7 @@ public class ServiceHPKC010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "实时库存管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPKC010 HPKC010 = new HPKC010(); HPKC010 HPKC010 = new HPKC010();
EiInfo outInfo = super.initLoad(inInfo, HPKC010); EiInfo outInfo = super.initLoad(inInfo, HPKC010);
...@@ -53,6 +55,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -53,6 +55,7 @@ public class ServiceHPKC010 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "实时库存管理",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -67,6 +70,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -67,6 +70,7 @@ public class ServiceHPKC010 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "实时库存管理",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -91,6 +95,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -91,6 +95,7 @@ public class ServiceHPKC010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "实时库存管理",operType = "修改",operDesc = "更新库存")
public EiInfo updateStock(EiInfo inInfo){ public EiInfo updateStock(EiInfo inInfo){
String whCode = inInfo.getString("whCode"); String whCode = inInfo.getString("whCode");
Long inventRecordId = Long.parseLong(inInfo.getString("inventRecordId")); Long inventRecordId = Long.parseLong(inInfo.getString("inventRecordId"));
...@@ -149,6 +154,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -149,6 +154,7 @@ public class ServiceHPKC010 extends ServiceBase {
* @param weight * @param weight
* @reutrn HPKC010 * @reutrn HPKC010
*/ */
private HPKC010 generatorBaseInfo(String companyCode, String whCode, Long inventRecordId, BigDecimal amout, BigDecimal weight) { private HPKC010 generatorBaseInfo(String companyCode, String whCode, Long inventRecordId, BigDecimal amout, BigDecimal weight) {
HPKC010 hpkc010 = new HPKC010(); HPKC010 hpkc010 = new HPKC010();
hpkc010.setCompanyCode(companyCode); hpkc010.setCompanyCode(companyCode);
...@@ -167,7 +173,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -167,7 +173,7 @@ public class ServiceHPKC010 extends ServiceBase {
hpkc010.setUpdatedTime(time); hpkc010.setUpdatedTime(time);
return hpkc010; return hpkc010;
} }
@OperationLogAnnotation(operModul = "实时库存管理",operType = "设置",operDesc = "生成库存对象")
private void generatorBaseInfo(HPKC010 hpkc010) { private void generatorBaseInfo(HPKC010 hpkc010) {
String whName = ""; String whName = "";
Integer inventType = new Integer(0); Integer inventType = new Integer(0);
...@@ -216,6 +222,7 @@ public class ServiceHPKC010 extends ServiceBase { ...@@ -216,6 +222,7 @@ public class ServiceHPKC010 extends ServiceBase {
* @param amout * @param amout
* @param weight * @param weight
*/ */
@OperationLogAnnotation(operModul = "实时库存管理",operType = "校验",operDesc = "校验库存变更请求参数")
private void checkUpdateStockParam(String companyCode, String whCode, Long inventRecordId private void checkUpdateStockParam(String companyCode, String whCode, Long inventRecordId
, BigDecimal amout, BigDecimal weight){ , BigDecimal amout, BigDecimal weight){
if(StringUtils.isBlank(companyCode)){ if(StringUtils.isBlank(companyCode)){
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -23,6 +24,7 @@ public class ServiceHPKC010A extends ServiceBase { ...@@ -23,6 +24,7 @@ public class ServiceHPKC010A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "库存管理",operType = "插入",operDesc = "备份数据")
public EiInfo backup(EiInfo inInfo) { public EiInfo backup(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum; import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -37,6 +38,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -37,6 +38,7 @@ public class ServiceHPKC011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "产品库存管理",operType = "查润",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPKC011 HPKC011 = new HPKC011(); HPKC011 HPKC011 = new HPKC011();
EiInfo outInfo = super.initLoad(inInfo, HPKC011); EiInfo outInfo = super.initLoad(inInfo, HPKC011);
...@@ -52,6 +54,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -52,6 +54,7 @@ public class ServiceHPKC011 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "产品库存管理",operType = "查润",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -66,6 +69,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -66,6 +69,7 @@ public class ServiceHPKC011 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "产品库存管理",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -90,6 +94,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -90,6 +94,7 @@ public class ServiceHPKC011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "产品库存管理",operType = "修改",operDesc = "更新库存")
public EiInfo updateStock(EiInfo inInfo){ public EiInfo updateStock(EiInfo inInfo){
String whCode = inInfo.getString("whCode"); String whCode = inInfo.getString("whCode");
String prodNo = inInfo.getString("prodNo"); String prodNo = inInfo.getString("prodNo");
...@@ -166,7 +171,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -166,7 +171,7 @@ public class ServiceHPKC011 extends ServiceBase {
hpkc011.setUpdatedTime(time); hpkc011.setUpdatedTime(time);
return hpkc011; return hpkc011;
} }
@OperationLogAnnotation(operModul = "产品库存管理",operType = "设置",operDesc = "生成库存对象")
private void generatorBaseInfo(HPKC011 hpkc011) { private void generatorBaseInfo(HPKC011 hpkc011) {
EiInfo inInfo = new EiInfo(); EiInfo inInfo = new EiInfo();
try { try {
...@@ -209,6 +214,7 @@ public class ServiceHPKC011 extends ServiceBase { ...@@ -209,6 +214,7 @@ public class ServiceHPKC011 extends ServiceBase {
* @param amout * @param amout
* @param weight * @param weight
*/ */
@OperationLogAnnotation(operModul = "产品库存管理",operType = "校验",operDesc = "校验库存变更请求参数")
private void checkUpdateStockParam(String companyCode, String whCode, String prodNo private void checkUpdateStockParam(String companyCode, String whCode, String prodNo
, BigDecimal amout, BigDecimal weight){ , BigDecimal amout, BigDecimal weight){
if(StringUtils.isBlank(companyCode)){ if(StringUtils.isBlank(companyCode)){
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.time.LocalDate;
import java.util.HashMap;
import java.util.Map;
/**
* @author:songx
* @date:2024/1/25,18:49
*/
public class ServiceHPKC011A extends ServiceBase {
/**
* 备份数据
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "库存管理",operType = "插入",operDesc = "备份数据")
public EiInfo backup(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("dateProc", LocalDate.now().minusDays(1).format(DateUtils.SHORT_DATE));
// 清除数据
dao.delete(HPSqlConstant.HPKC011A.DELETE_BY_TIME, queryMap);
// 备份数据
dao.insert(HPSqlConstant.HPKC011A.BACKUP, queryMap);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("备份数据成功");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -14,6 +15,7 @@ public class ServiceHPKC099 extends ServiceBase { ...@@ -14,6 +15,7 @@ public class ServiceHPKC099 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询 ",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
inInfo.set("inqu_status-0-status", "1"); inInfo.set("inqu_status-0-status", "1");
...@@ -26,6 +28,7 @@ public class ServiceHPKC099 extends ServiceBase { ...@@ -26,6 +28,7 @@ public class ServiceHPKC099 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询 ",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
......
...@@ -187,9 +187,9 @@ ...@@ -187,9 +187,9 @@
COMPANY_CODE AS "companyCode", COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode", DEP_CODE AS "depCode",
WH_CODE AS "whCode", WH_CODE AS "whCode",
INVENT_TYPE AS "inventType", PROJ_CODE AS "projCode",
INVENT_CODE AS "inventCode", PRDT_CODE AS "prdtCode",
INVENT_RECORD_ID AS "inventRecordId", PART_CODE AS "partCode",
COALESCE(SUM(AMOUNT), 0) AS "amount", COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight" COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC003 FROM ${hpjxSchema}.T_HPKC003
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom"> <isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo# CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty> </isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, PRDT_CODE, PART_CODE
</select> </select>
</sqlMap> </sqlMap>
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
PROJ_NAME as "projName", <!-- 项目名称 --> PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 --> INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 --> INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 --> SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 --> SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
...@@ -157,8 +157,8 @@ ...@@ -157,8 +157,8 @@
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 --> INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 --> INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 --> SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 --> SUB_INVENT_NAME, <!-- 零件名称 -->
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
INVENT_CODE = #inventCode#, <!-- 部件编码 --> INVENT_CODE = #inventCode#, <!-- 部件编码 -->
INVENT_NAME = #inventName#, <!-- 部件名称 --> INVENT_NAME = #inventName#, <!-- 部件名称 -->
SUB_INVENT_CODE = #subInventCode#, <!-- 零件编码 --> SUB_INVENT_CODE = #subInventCode#, <!-- 零件编码 -->
SUB_INVENT_NAME = #subInventName#, <!-- 零件名称 --> SUB_INVENT_NAME = #subInventName#, <!-- 零件名称 -->
LENGTH = #length#, <!-- 长 --> LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 --> WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 --> THICK = #thick#, <!-- 厚 -->
...@@ -241,9 +241,9 @@ ...@@ -241,9 +241,9 @@
COMPANY_CODE AS "companyCode", COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode", DEP_CODE AS "depCode",
WH_CODE AS "whCode", WH_CODE AS "whCode",
INVENT_TYPE AS "inventType", PROJ_CODE AS "projCode",
INVENT_CODE AS "inventCode", INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId", SUB_INVENT_CODE AS "subInventCode",
COALESCE(SUM(AMOUNT), 0) AS "amount", COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight" COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004 FROM ${hpjxSchema}.T_HPKC004
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
<isNotEmpty prepend=" AND " property="createdTimeFrom"> <isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo# CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty> </isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, INVENT_CODE, SUB_INVENT_CODE
</select> </select>
</sqlMap> </sqlMap>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPKC009A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DATE_TYPE as "dateType", <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
INIT_AMOUNT as "initAmount", <!-- 期初数量 -->
INIT_WEIGHT as "initWeight", <!-- 期初重量 -->
ENTER_AMOUNT as "enterAmount", <!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight", <!-- 入库重量 -->
OUTER_AMOUNT as "outerAmount", <!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight", <!-- 出库重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount", <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight", <!-- 盘点差异重量 -->
END_AMOUNT as "endAmount", <!-- 期末数量 -->
END_WEIGHT as "endWeight" <!-- 期末重量 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateType">
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateProc">
DATE_PROC = #dateProc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME = #subInventName#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC009A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC009A
WHERE 1=1
<include refid="condition"/>
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC009A WHERE 1=1
<include refid="condition"/>
</select>
<!-- 查询统计 -->
<select id="querySum" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC009A">
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount", <!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight", <!-- 期初重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount", <!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight", <!-- 入库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount", <!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight", <!-- 出库重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount", <!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight", <!-- 盘点差异重量 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount", <!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight" <!-- 期末重量 -->
FROM ${hpjxSchema}.T_HPKC009A
WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC009A (
COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
DATE_TYPE, <!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
INIT_AMOUNT, <!-- 期初数量 -->
INIT_WEIGHT, <!-- 期初重量 -->
ENTER_AMOUNT, <!-- 入库数量 -->
ENTER_WEIGHT, <!-- 入库重量 -->
OUTER_AMOUNT, <!-- 出库数量 -->
OUTER_WEIGHT, <!-- 出库重量 -->
PD_DIFF_AMOUNT, <!-- 盘点差异数量 -->
PD_DIFF_WEIGHT, <!-- 盘点差异重量 -->
END_AMOUNT, <!-- 期末数量 -->
END_WEIGHT <!-- 期末重量 -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#dateType#, #dateProc#, #whCode#, #whName#, #projCode#, #projName#,
#inventCode#, #inventName#, #subInventCode#, #subInventName#, #initAmount#, #initWeight#,
#enterAmount#, #enterWeight#, #outerAmount#, #outerWeight#, #pdDiffAmount#,
#pdDiffWeight#, #endAmount#, #endWeight#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPKC009A WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hpjxSchema}.T_HPKC009A WHERE DATE_PROC = #dateProc#
</delete>
</sqlMap>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
PROJ_NAME as "projName", <!-- 生产单号 --> PROJ_NAME as "projName", <!-- 生产单号 -->
INVENT_CODE as "inventCode", <!-- 部件编码 --> INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 --> INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 --> SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 --> SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
PROJ_NAME, <!-- 生产单号 --> PROJ_NAME, <!-- 生产单号 -->
INVENT_CODE, <!-- 部件编码 --> INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 --> INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 --> SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 --> SUB_INVENT_NAME, <!-- 零件名称 -->
LENGTH, <!-- 长 --> LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 --> WIDTH, <!-- 宽 -->
THICK, <!-- 厚 --> THICK, <!-- 厚 -->
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPKC011A">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
DATE_PROC as "dateProc", <!-- 日期 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
PROD_NO as "prodNo", <!-- 生产单号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
INVENT_CODE as "inventCode", <!-- 部件编码 -->
INVENT_NAME as "inventName", <!-- 部件名称 -->
SUB_INVENT_CODE as "subInventCode", <!-- 零件编码 -->
SUB_INVENT_NAME as "subInventName", <!-- 零件名称 -->
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
AMOUNT as "amount", <!-- 数量 -->
UNIT_WEIGHT as "unitWeight", <!-- 单重 -->
WEIGHT as "weight", <!-- 重量 -->
REMARK as "remark", <!-- 备注 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
VERSION as "version" <!-- 版本号 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="dateProc">
DATE_PROC = #dateProc#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventCode">
SUB_INVENT_CODE = #subInventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subInventName">
SUB_INVENT_NAME = #subInventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
WIDTH = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
THICK = #thick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="amount">
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWeight">
UNIT_WEIGHT = #unitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="weight">
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="version">
VERSION = #version#
</isNotEmpty>
</sql>
<sql id="order">
<dynamic prepend="ORDER BY">
<isNotEmpty property="order">
$order$
</isNotEmpty>
<isEmpty property="order">
ID asc
</isEmpty>
</dynamic>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011A">
SELECT
<include refid="column"/>
FROM ${hpjxSchema}.T_HPKC011A
WHERE 1=1
<include refid="condition" />
<include refid="order"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPKC011A WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPKC011A (
COMPANY_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
DATE_PROC, <!-- 日期 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
PROD_NO, <!-- 生产单号 -->
PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 -->
INVENT_CODE, <!-- 部件编码 -->
INVENT_NAME, <!-- 部件名称 -->
SUB_INVENT_CODE, <!-- 零件编码 -->
SUB_INVENT_NAME, <!-- 零件名称 -->
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
AMOUNT, <!-- 数量 -->
UNIT_WEIGHT, <!-- 单重 -->
WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 -->
CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME, <!-- 创建时间 -->
UPDATED_BY, <!-- 更新人 -->
UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 -->
VERSION <!-- 版本号 -->
) VALUES (
#companyCode#, #depCode#, #dateProc#, #whCode#, #whName#, #prodNo#, #projCode#,
#projName#, #inventCode#, #inventName#, #subInventCode#, #subInventName#, #length#,
#width#, #thick#, #amount#, #unitWeight#, #weight#, #remark#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #version#
)
</insert>
<delete id="delete">
DELETE FROM ${hpjxSchema}.T_HPKC011A WHEREID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete id="deleteByTime">
DELETE FROM ${hpjxSchema}.T_HPKC011A WHERE DATE_PROC = #dateProc#
</delete>
<!-- 备份数据 -->
<insert id="backup">
INSERT INTO ${hpjxSchema}.T_HPKC011A (
COMPANY_CODE, DEP_CODE, DATE_PROC, WH_CODE, WH_NAME, PROD_NO, PROJ_CODE,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CREATED_NAME,
CREATED_TIME, UPDATED_BY, UPDATED_NAME, UPDATED_TIME, VERSION
)
SELECT
COMPANY_CODE, DEP_CODE, #dateProc#, WH_CODE, WH_NAME, PROD_NO, PROJ_CODE,
PROJ_NAME, INVENT_CODE, INVENT_NAME, SUB_INVENT_CODE, SUB_INVENT_NAME, LENGTH,
WIDTH, THICK, AMOUNT, UNIT_WEIGHT, WEIGHT, REMARK, CREATED_BY, CREATED_NAME,
CREATED_TIME, UPDATED_BY, UPDATED_NAME, UPDATED_TIME, VERSION
FROM ${hpjxSchema}.T_HPKC011
</insert>
</sqlMap>
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -22,6 +23,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -22,6 +23,7 @@ public class ServiceHPPZ001 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "客商类型",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
Thppz001 hppz001 = new Thppz001(); Thppz001 hppz001 = new Thppz001();
EiInfo outInfo = super.initLoad(inInfo, hppz001); EiInfo outInfo = super.initLoad(inInfo, hppz001);
...@@ -33,6 +35,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -33,6 +35,7 @@ public class ServiceHPPZ001 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "客商类型",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
...@@ -44,6 +47,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -44,6 +47,7 @@ public class ServiceHPPZ001 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "客商类型",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...@@ -76,6 +80,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -76,6 +80,7 @@ public class ServiceHPPZ001 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "客商类型",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
...@@ -103,6 +108,7 @@ public class ServiceHPPZ001 extends ServiceBase { ...@@ -103,6 +108,7 @@ public class ServiceHPPZ001 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "客商类型",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
Thppz001 hppz001 = new Thppz001(); Thppz001 hppz001 = new Thppz001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -36,6 +37,7 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -36,6 +37,7 @@ public class ServiceHPPZ002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "供应商档案",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
...@@ -53,6 +55,7 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -53,6 +55,7 @@ public class ServiceHPPZ002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "供应商档案",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -69,6 +72,7 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -69,6 +72,7 @@ public class ServiceHPPZ002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "供应商档案",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
...@@ -97,6 +101,7 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -97,6 +101,7 @@ public class ServiceHPPZ002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "供应商档案",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock); CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try { try {
...@@ -121,6 +126,7 @@ public class ServiceHPPZ002 extends ServiceBase { ...@@ -121,6 +126,7 @@ public class ServiceHPPZ002 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "供应商档案",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.CompanyTypeEnum; import com.baosight.hpjx.common.CompanyTypeEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -33,6 +34,7 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -33,6 +34,7 @@ public class ServiceHPPZ003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.setBlock(CompanyTypeEnum.generatorEiBlock()); inInfo.setBlock(CompanyTypeEnum.generatorEiBlock());
...@@ -50,6 +52,7 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -50,6 +52,7 @@ public class ServiceHPPZ003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -66,6 +69,7 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -66,6 +69,7 @@ public class ServiceHPPZ003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -93,6 +97,7 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -93,6 +97,7 @@ public class ServiceHPPZ003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -116,6 +121,7 @@ public class ServiceHPPZ003 extends ServiceBase { ...@@ -116,6 +121,7 @@ public class ServiceHPPZ003 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "客户档案",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -36,6 +37,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -36,6 +37,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.setBlock(InitiateModeEnum.generatorEiBlock()); inInfo.setBlock(InitiateModeEnum.generatorEiBlock());
...@@ -52,6 +54,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -52,6 +54,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -68,6 +71,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -68,6 +71,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -95,6 +99,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -95,6 +99,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -117,6 +122,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -117,6 +122,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "查询",operDesc = "判断存货名称是否存在,如果存在返回编码,否则新增并返回编码")
public EiInfo checkAndSave(EiInfo inInfo){ public EiInfo checkAndSave(EiInfo inInfo){
String inventType = inInfo.getString("inventType"); String inventType = inInfo.getString("inventType");
String inventName = inInfo.getString("inventName"); String inventName = inInfo.getString("inventName");
...@@ -150,6 +156,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -150,6 +156,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -177,6 +184,7 @@ public class ServiceHPPZ004 extends ServiceBase { ...@@ -177,6 +184,7 @@ public class ServiceHPPZ004 extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货类型",operType = "查询",operDesc = "下拉框")
public EiInfo queryComboBox(EiInfo eiInfo) { public EiInfo queryComboBox(EiInfo eiInfo) {
Map map = new HashMap(); Map map = new HashMap();
map.put("inventType", eiInfo.getString("inventType")); map.put("inventType", eiInfo.getString("inventType"));
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.hp.pz.domain.HPPZ005; import com.baosight.hpjx.hp.pz.domain.HPPZ005;
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;
...@@ -14,7 +15,7 @@ import java.util.Date; ...@@ -14,7 +15,7 @@ import java.util.Date;
import java.util.Map; import java.util.Map;
public class ServiceHPPZ005 extends ServiceBase { public class ServiceHPPZ005 extends ServiceBase {
@OperationLogAnnotation(operModul = "配置管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPPZ005 hppz005 = new HPPZ005(); HPPZ005 hppz005 = new HPPZ005();
EiInfo outInfo = super.initLoad(inInfo, hppz005); EiInfo outInfo = super.initLoad(inInfo, hppz005);
...@@ -26,6 +27,7 @@ public class ServiceHPPZ005 extends ServiceBase { ...@@ -26,6 +27,7 @@ public class ServiceHPPZ005 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
...@@ -37,6 +39,7 @@ public class ServiceHPPZ005 extends ServiceBase { ...@@ -37,6 +39,7 @@ public class ServiceHPPZ005 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...@@ -69,6 +72,7 @@ public class ServiceHPPZ005 extends ServiceBase { ...@@ -69,6 +72,7 @@ public class ServiceHPPZ005 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
...@@ -96,6 +100,7 @@ public class ServiceHPPZ005 extends ServiceBase { ...@@ -96,6 +100,7 @@ public class ServiceHPPZ005 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPPZ005 hppz005 = new HPPZ005(); HPPZ005 hppz005 = new HPPZ005();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InitiateModeEnum; import com.baosight.hpjx.common.InitiateModeEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -36,6 +37,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -36,6 +37,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null,false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null,false);
...@@ -50,6 +52,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -50,6 +52,7 @@ public class ServiceHPPZ006 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -66,6 +69,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -66,6 +69,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "新增 ",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -95,6 +99,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -95,6 +99,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "校验 ",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPPZ006 fPz006 = new HPPZ006(); HPPZ006 fPz006 = new HPPZ006();
...@@ -119,6 +124,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -119,6 +124,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "修改 ",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -145,6 +151,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -145,6 +151,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "删除 ",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -166,6 +173,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -166,6 +173,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "判断存货档案是否存在,如果存在返回ID,否则新增并返回ID")
public EiInfo checkAndSave(EiInfo inInfo){ public EiInfo checkAndSave(EiInfo inInfo){
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_TYPE,inInfo.getString("inventType")); inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_TYPE,inInfo.getString("inventType"));
inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_CODE,inInfo.getString("inventCode")); inInfo.setCell(EiConstant.queryBlock,0,HPPZ006.FIELD_INVENT_CODE,inInfo.getString("inventCode"));
...@@ -207,6 +215,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -207,6 +215,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "规格下拉框")
public EiInfo queryComboBoxSpec(EiInfo inInfo) { public EiInfo queryComboBoxSpec(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
...@@ -224,6 +233,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -224,6 +233,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "存货名称下拉框")
public EiInfo queryMaterialComboBox(EiInfo eiInfo) { public EiInfo queryMaterialComboBox(EiInfo eiInfo) {
Map map = EiInfoUtils.getFirstRow(eiInfo); Map map = EiInfoUtils.getFirstRow(eiInfo);
if (ObjectUtils.isEmpty(map.get("inventType"))) { if (ObjectUtils.isEmpty(map.get("inventType"))) {
...@@ -245,6 +255,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -245,6 +255,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "下拉框")
public EiInfo queryComboBoxAll(EiInfo inInfo) { public EiInfo queryComboBoxAll(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
...@@ -262,6 +273,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -262,6 +273,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询 ",operDesc = "单位下拉框")
public EiInfo queryComboBoxUnit(EiInfo inInfo) { public EiInfo queryComboBoxUnit(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
...@@ -279,6 +291,7 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -279,6 +291,7 @@ public class ServiceHPPZ006 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框")
public EiInfo queryPrdtComboBox(EiInfo inInfo) { public EiInfo queryPrdtComboBox(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
...@@ -31,6 +32,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -31,6 +32,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询 ",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null,true); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), null,true);
...@@ -47,6 +49,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -47,6 +49,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询 ",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -60,6 +63,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -60,6 +63,7 @@ public class ServiceHPPZ007 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "新增 ",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -87,6 +91,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -87,6 +91,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "修改 ",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -110,6 +115,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -110,6 +115,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "删除 ",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -131,6 +137,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -131,6 +137,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询 ",operDesc = "根据仓库CODE找对象")
public EiInfo queryByWhCode(EiInfo inInfo) { public EiInfo queryByWhCode(EiInfo inInfo) {
Map params = new HashMap<>(); Map params = new HashMap<>();
params.put("whCode", inInfo.getString("whCode")); params.put("whCode", inInfo.getString("whCode"));
...@@ -145,6 +152,7 @@ public class ServiceHPPZ007 extends ServiceBase { ...@@ -145,6 +152,7 @@ public class ServiceHPPZ007 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询",operDesc = "下拉框")
public EiInfo queryComboBox(EiInfo inInfo) { public EiInfo queryComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.WH_RECORD_BLOCK_ID); list.add(DdynamicEnum.WH_RECORD_BLOCK_ID);
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -22,6 +23,7 @@ public class ServiceHPPZ008 extends ServiceBase { ...@@ -22,6 +23,7 @@ public class ServiceHPPZ008 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "库存预警值档案",operType = "查询 ",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
Thppz008 hppz008 = new Thppz008(); Thppz008 hppz008 = new Thppz008();
EiInfo outInfo = super.initLoad(inInfo, hppz008); EiInfo outInfo = super.initLoad(inInfo, hppz008);
...@@ -33,6 +35,7 @@ public class ServiceHPPZ008 extends ServiceBase { ...@@ -33,6 +35,7 @@ public class ServiceHPPZ008 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "库存预警值档案",operType = "查询 ",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
...@@ -44,6 +47,7 @@ public class ServiceHPPZ008 extends ServiceBase { ...@@ -44,6 +47,7 @@ public class ServiceHPPZ008 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "库存预警值档案",operType = "新增 ",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...@@ -79,6 +83,7 @@ public class ServiceHPPZ008 extends ServiceBase { ...@@ -79,6 +83,7 @@ public class ServiceHPPZ008 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "库存预警值档案",operType = "修改 ",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
...@@ -106,6 +111,7 @@ public class ServiceHPPZ008 extends ServiceBase { ...@@ -106,6 +111,7 @@ public class ServiceHPPZ008 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "库存预警值档案",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
Thppz008 hppz008 = new Thppz008(); Thppz008 hppz008 = new Thppz008();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
...@@ -36,6 +37,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -36,6 +37,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ009().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ009().eiMetadata);
...@@ -51,6 +53,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -51,6 +53,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -67,6 +70,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -67,6 +70,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "插入",operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -96,6 +100,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -96,6 +100,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
// 数据校验 // 数据校验
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
...@@ -113,6 +118,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -113,6 +118,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param fPz009 * @param fPz009
* @throws Exception * @throws Exception
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "新增",operDesc = "新增企业信息")
private void add(HPPZ009 fPz009) throws Exception { private void add(HPPZ009 fPz009) throws Exception {
// 生成企业编码 // 生成企业编码
fPz009.setCompanyCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.COMPANY_CODE)); fPz009.setCompanyCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.COMPANY_CODE));
...@@ -132,6 +138,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -132,6 +138,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* *
* @param fPz009 * @param fPz009
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "修改",operDesc = "修改")
private void modify(HPPZ009 fPz009) { private void modify(HPPZ009 fPz009) {
DaoUtils.update("HPPZ009.update", fPz009); DaoUtils.update("HPPZ009.update", fPz009);
} }
...@@ -142,6 +149,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -142,6 +149,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -168,6 +176,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -168,6 +176,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* *
* @param hppz009 * @param hppz009
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "新增",operDesc = "初始化用户")
private void initUser(HPPZ009 hppz009) throws Exception { private void initUser(HPPZ009 hppz009) throws Exception {
String companyCode = hppz009.getCompanyCode(); String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap(); Map inInfoRowMap = new HashMap();
...@@ -196,6 +205,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -196,6 +205,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* *
* @param hppz009 * @param hppz009
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "新增",operDesc = "用户关联角色")
private void insertGroupMember(HPPZ009 hppz009) { private void insertGroupMember(HPPZ009 hppz009) {
String companyCode = hppz009.getCompanyCode(); String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap(); Map inInfoRowMap = new HashMap();
...@@ -221,6 +231,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -221,6 +231,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "修改",operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -246,6 +257,7 @@ public class ServiceHPPZ009 extends ServiceBase { ...@@ -246,6 +257,7 @@ public class ServiceHPPZ009 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "企业管理",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
...@@ -35,6 +36,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -35,6 +36,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ010().eiMetadata);
...@@ -50,6 +52,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -50,6 +52,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "查询",operDesc = "查询数据列表")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -66,6 +69,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -66,6 +69,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -95,6 +99,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -95,6 +99,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
// 数据校验 // 数据校验
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
...@@ -111,6 +116,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -111,6 +116,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param fPz009 * @param fPz009
* @throws Exception * @throws Exception
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "新增企业信息")
private void add(HPPZ009 fPz009) throws Exception { private void add(HPPZ009 fPz009) throws Exception {
// 生成企业编码 // 生成企业编码
fPz009.setCompanyCode(SequenceGenerator.getNextSequence("COMPANY_CODE")); fPz009.setCompanyCode(SequenceGenerator.getNextSequence("COMPANY_CODE"));
...@@ -127,6 +133,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -127,6 +133,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* *
* @param fPz009 * @param fPz009
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "修改",operDesc = "修改数据")
private void modify(HPPZ009 fPz009) { private void modify(HPPZ009 fPz009) {
DaoUtils.update("HPPZ009.update", fPz009); DaoUtils.update("HPPZ009.update", fPz009);
} }
...@@ -137,6 +144,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -137,6 +144,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "新增操作")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -163,6 +171,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -163,6 +171,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* *
* @param hppz009 * @param hppz009
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "新增",operDesc = "初始化用户")
private void initUser(HPPZ009 hppz009) throws Exception { private void initUser(HPPZ009 hppz009) throws Exception {
String companyCode = hppz009.getCompanyCode(); String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap(); Map inInfoRowMap = new HashMap();
...@@ -191,6 +200,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -191,6 +200,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* *
* @param hppz009 * @param hppz009
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "查询",operDesc = "用户关联角色")
private void insertGroupMember(HPPZ009 hppz009) { private void insertGroupMember(HPPZ009 hppz009) {
String companyCode = hppz009.getCompanyCode(); String companyCode = hppz009.getCompanyCode();
Map inInfoRowMap = new HashMap(); Map inInfoRowMap = new HashMap();
...@@ -216,6 +226,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -216,6 +226,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "修改",operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -241,6 +252,7 @@ public class ServiceHPPZ010 extends ServiceBase { ...@@ -241,6 +252,7 @@ public class ServiceHPPZ010 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "配置管理",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -37,6 +38,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -37,6 +38,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -56,6 +58,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -56,6 +58,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -72,6 +75,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -72,6 +75,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "新增",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -81,16 +85,17 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -81,16 +85,17 @@ public class ServiceHPPZ011 extends ServiceBase {
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPPZ011 fPz011 = new HPPZ011(); HPPZ011 fPz011 = new HPPZ011();
fPz011.fromMap(resultRow); fPz011.fromMap(resultRow);
// 设置生产组名称
fPz011.setGroupName(HPXSTools.XsOrg.get(fPz011.getGroupCode()).getOrgCname());
// 校验厂区名是否存在 // 校验厂区名是否存在
HPPZ011 dbPz011 = HPPZTools.HpPz011.getByName(fPz011.getFactoryName()); HPPZ011 dbPz011 = HPPZTools.HpPz011.getByName(fPz011.getFactoryName());
if (dbPz011 != null) { if (dbPz011 != null) {
fPz011.setFactoryCode(dbPz011.getFactoryCode()); fPz011.setFactoryCode(dbPz011.getFactoryCode());
} else { } else {
// 生成厂区编码 // 生成厂区编码,同时新增记录
fPz011.setFactoryCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.FACTORY_CODE)); fPz011.setFactoryCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.FACTORY_CODE));
fPz011.setId(null);
} }
// 设置生产组名称
fPz011.setGroupName(HPXSTools.XsOrg.get(fPz011.getGroupCode()).getOrgCname());
if (fPz011.getId() == null || fPz011.getId() == 0) { if (fPz011.getId() == null || fPz011.getId() == 0) {
this.add(fPz011); this.add(fPz011);
} else { } else {
...@@ -111,6 +116,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -111,6 +116,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* *
* @param resultRows * @param resultRows
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "校验",operDesc = "校验保存的数据")
private void checkSaveData(List<Map> resultRows) { private void checkSaveData(List<Map> resultRows) {
// 数据校验 // 数据校验
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
...@@ -126,6 +132,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -126,6 +132,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* *
* @param fPz011 * @param fPz011
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "新增",operDesc = "新增企业信息")
private void add(HPPZ011 fPz011) { private void add(HPPZ011 fPz011) {
fPz011.setDeleteFlag(CommonConstant.YesNo.NO_0); fPz011.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPPZ011.INSERT, fPz011); DaoUtils.insert(HPPZ011.INSERT, fPz011);
...@@ -136,6 +143,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -136,6 +143,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* *
* @param fPz011 * @param fPz011
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "修改",operDesc = "修改数据")
private void modify(HPPZ011 fPz011) { private void modify(HPPZ011 fPz011) {
DaoUtils.update(HPPZ011.UPDATE, fPz011); DaoUtils.update(HPPZ011.UPDATE, fPz011);
} }
...@@ -146,6 +154,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -146,6 +154,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -167,6 +176,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -167,6 +176,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "查询",operDesc = "下拉框")
public EiInfo queryComboBox(EiInfo inInfo) { public EiInfo queryComboBox(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
...@@ -177,7 +187,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -177,7 +187,7 @@ public class ServiceHPPZ011 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "厂区管理",operType = "查询",operDesc = "下拉框")
public EiInfo queryComboBoxAll(EiInfo inInfo) { public EiInfo queryComboBoxAll(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
...@@ -193,6 +203,7 @@ public class ServiceHPPZ011 extends ServiceBase { ...@@ -193,6 +203,7 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "厂区管理",operType = "查询",operDesc = "下拉框")
public EiInfo queryGroupComboBox(EiInfo inInfo) { public EiInfo queryGroupComboBox(EiInfo inInfo) {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="order"> <isNotEmpty property="order">
$orderBy$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="order"> <isEmpty property="order">
A.ID ASC A.ID ASC
......
package com.baosight.hpjx.hp.rz.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.InventTypeEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.rz.domian.HPRZ001;
import com.baosight.hpjx.util.*;
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 org.apache.commons.collections.MapUtils;
import java.math.BigDecimal;
import java.util.*;
/**
* @author wan
* @date 2024年02月23日 16:18
*/
public class ServiceHPRZ001 extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "日志查询",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.OPER_MODUL_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.OPER_TYPE_BLOCK_ID), queryMap);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPRZ001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "日志查询",operType = "查询",operDesc = "查询操作")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPRZ001.QUERY, new HPRZ001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 查询操作模块下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "日志查询",operType = "查询",operDesc = "操作模块下拉框")
public EiInfo queryOperModulComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("companyCode", UserSessionUtils.getCompanyCode());
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.OPER_MODUL_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
/**
* 查询操作类型下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "日志查询",operType = "查询",operDesc = "操作类型下拉框")
public EiInfo queryOperTypeComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
queryMap.put("companyCode", UserSessionUtils.getCompanyCode());
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.OPER_TYPE_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
}
...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -15,7 +15,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-01-25 16:47:50 create * @history 2024-02-23 9:19:19 create
*/ */
public class HPSC002A extends DaoEPBase { public class HPSC002A extends DaoEPBase {
...@@ -23,29 +23,29 @@ public class HPSC002A extends DaoEPBase { ...@@ -23,29 +23,29 @@ public class HPSC002A extends DaoEPBase {
public static final String FIELD_ID = "id"; /* 主键ID*/ public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/ public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/ public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/ public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/ public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String COL_ID = "ID"; /* 主键ID*/ public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/ public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/ public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String QUERY = "HPSC002A.query"; public static final String QUERY = "HPSC002A.query";
public static final String COUNT = "HPSC002A.count"; public static final String COUNT = "HPSC002A.count";
...@@ -53,19 +53,17 @@ public class HPSC002A extends DaoEPBase { ...@@ -53,19 +53,17 @@ public class HPSC002A extends DaoEPBase {
public static final String UPDATE = "HPSC002A.update"; public static final String UPDATE = "HPSC002A.update";
public static final String DELETE = "HPSC002A.delete"; public static final String DELETE = "HPSC002A.delete";
private Long id = null; /* 主键ID*/ private Long id; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Long matId = null; /* 物料ID*/ private Long matId; /* 物料ID*/
private String docId = " "; /* 文件ID*/ private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/ private String bizType = " "; /* 业务类型*/
/** /**
...@@ -83,7 +81,7 @@ public class HPSC002A extends DaoEPBase { ...@@ -83,7 +81,7 @@ public class HPSC002A extends DaoEPBase {
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留"); eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -95,10 +93,6 @@ public class HPSC002A extends DaoEPBase { ...@@ -95,10 +93,6 @@ public class HPSC002A extends DaoEPBase {
eiColumn.setDescName("文件ID"); eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -123,9 +117,11 @@ public class HPSC002A extends DaoEPBase { ...@@ -123,9 +117,11 @@ public class HPSC002A extends DaoEPBase {
eiColumn.setDescName("修改时间"); eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("bizType"); eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型"); eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -168,20 +164,20 @@ public class HPSC002A extends DaoEPBase { ...@@ -168,20 +164,20 @@ public class HPSC002A extends DaoEPBase {
this.companyCode = companyCode; this.companyCode = companyCode;
} }
/** /**
* get the deptCode - 部门编码 预留. * get the depCode - 部门编码 预留.
* @return the deptCode * @return the depCode
*/ */
public String getDeptCode() { public String getDepCode() {
return this.deptCode; return this.depCode;
} }
/** /**
* set the deptCode - 部门编码 预留. * set the depCode - 部门编码 预留.
* *
* @param deptCode - 部门编码 预留 * @param depCode - 部门编码 预留
*/ */
public void setDeptCode(String deptCode) { public void setDepCode(String depCode) {
this.deptCode = deptCode; this.depCode = depCode;
} }
/** /**
* get the matId - 物料ID. * get the matId - 物料ID.
...@@ -216,22 +212,6 @@ public class HPSC002A extends DaoEPBase { ...@@ -216,22 +212,6 @@ public class HPSC002A extends DaoEPBase {
this.docId = docId; this.docId = docId;
} }
/** /**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the createdBy - 创建人. * get the createdBy - 创建人.
* @return the createdBy * @return the createdBy
*/ */
...@@ -328,7 +308,7 @@ public class HPSC002A extends DaoEPBase { ...@@ -328,7 +308,7 @@ public class HPSC002A extends DaoEPBase {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the bizType - . * get the bizType - 业务类型.
* @return the bizType * @return the bizType
*/ */
public String getBizType() { public String getBizType() {
...@@ -336,9 +316,9 @@ public class HPSC002A extends DaoEPBase { ...@@ -336,9 +316,9 @@ public class HPSC002A extends DaoEPBase {
} }
/** /**
* set the bizType - * set the bizType - 业务类型.
* *
* @param bizType - * @param bizType - 业务类型
*/ */
public void setBizType(String bizType) { public void setBizType(String bizType) {
this.bizType = bizType; this.bizType = bizType;
...@@ -353,17 +333,16 @@ public class HPSC002A extends DaoEPBase { ...@@ -353,17 +333,16 @@ public class HPSC002A extends DaoEPBase {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId)); setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("bizType")), bizType)); setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
} }
/** /**
...@@ -375,17 +354,16 @@ public class HPSC002A extends DaoEPBase { ...@@ -375,17 +354,16 @@ public class HPSC002A extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID))); map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME))); map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put("bizType", StringUtils.toString(bizType, eiMetadata.getMeta("bizType"))); map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
return map; return map;
} }
......
...@@ -24,7 +24,7 @@ public class HPSC002B extends DaoEPBase { ...@@ -24,7 +24,7 @@ public class HPSC002B extends DaoEPBase {
public static final String FIELD_ID = "id"; /* 主键ID*/ public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEPT_CODE = "deptCode"; /* 部门编码 预留*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/ public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/ public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/ public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
...@@ -37,7 +37,7 @@ public class HPSC002B extends DaoEPBase { ...@@ -37,7 +37,7 @@ public class HPSC002B extends DaoEPBase {
public static final String COL_ID = "ID"; /* 主键ID*/ public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEPT_CODE = "DEPT_CODE"; /* 部门编码 预留*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/ public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/ public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/
...@@ -54,10 +54,10 @@ public class HPSC002B extends DaoEPBase { ...@@ -54,10 +54,10 @@ public class HPSC002B extends DaoEPBase {
public static final String UPDATE = "HPSC002A.update"; public static final String UPDATE = "HPSC002A.update";
public static final String DELETE = "HPSC002A.delete"; public static final String DELETE = "HPSC002A.delete";
private Long id = null; /* 主键ID*/ private Long id; /* 主键ID*/
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String deptCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Long matId = null; /* 物料ID*/ private Long matId; /* 物料ID*/
private String docId = " "; /* 文件ID*/ private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/ private String docName = " "; /* 文件名称*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
...@@ -84,7 +84,7 @@ public class HPSC002B extends DaoEPBase { ...@@ -84,7 +84,7 @@ public class HPSC002B extends DaoEPBase {
eiColumn.setDescName("企业编码 预留"); eiColumn.setDescName("企业编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEPT_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留"); eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -169,20 +169,20 @@ public class HPSC002B extends DaoEPBase { ...@@ -169,20 +169,20 @@ public class HPSC002B extends DaoEPBase {
this.companyCode = companyCode; this.companyCode = companyCode;
} }
/** /**
* get the deptCode - 部门编码 预留. * get the depCode - 部门编码 预留.
* @return the deptCode * @return the depCode
*/ */
public String getDeptCode() { public String getDepCode() {
return this.deptCode; return this.depCode;
} }
/** /**
* set the deptCode - 部门编码 预留. * set the depCode - 部门编码 预留.
* *
* @param deptCode - 部门编码 预留 * @param depCode - 部门编码 预留
*/ */
public void setDeptCode(String deptCode) { public void setDepCode(String depCode) {
this.deptCode = deptCode; this.depCode = depCode;
} }
/** /**
* get the matId - 物料ID. * get the matId - 物料ID.
...@@ -354,7 +354,7 @@ public class HPSC002B extends DaoEPBase { ...@@ -354,7 +354,7 @@ public class HPSC002B extends DaoEPBase {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDeptCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEPT_CODE)), deptCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId)); setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName)); setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
...@@ -376,7 +376,7 @@ public class HPSC002B extends DaoEPBase { ...@@ -376,7 +376,7 @@ public class HPSC002B extends DaoEPBase {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEPT_CODE, StringUtils.toString(deptCode, eiMetadata.getMeta(FIELD_DEPT_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID))); map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME))); map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
......
package com.baosight.hpjx.hp.sc.domain; package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* Project: <br> * Project: <br>
...@@ -16,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,7 +17,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-02-05 14:06:35 create * @history 2024-02-22 10:52:56 create
*/ */
public class HPSC005 extends DaoEPBase { public class HPSC005 extends DaoEPBase {
...@@ -25,7 +26,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -25,7 +26,7 @@ public class HPSC005 extends DaoEPBase {
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_PRODUCTION_ORDER_NO = "productionOrderNo"; /* 生产订单号*/ public static final String FIELD_PROD_ORDER_NO = "prodOrderNo"; /* 生产订单号*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/ public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/ public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
...@@ -72,7 +73,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -72,7 +73,7 @@ public class HPSC005 extends DaoEPBase {
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_PRODUCTION_ORDER_NO = "PRODUCTION_ORDER_NO"; /* 生产订单号*/ public static final String COL_PROD_ORDER_NO = "PROD_ORDER_NO"; /* 生产订单号*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/ public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/ public static final String COL_PRDT_TYPE = "PRDT_TYPE"; /* 产品类型*/
...@@ -125,7 +126,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -125,7 +126,7 @@ public class HPSC005 extends DaoEPBase {
private Long id; private Long id;
private String companyCode = " "; /* 企业编码 预留*/ private String companyCode = " "; /* 企业编码 预留*/
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private String productionOrderNo = " "; /* 生产订单号*/ private String prodOrderNo = " "; /* 生产订单号*/
private String projCode = " "; /* 项目编码*/ private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/ private Integer prdtType; /* 产品类型*/
...@@ -153,7 +154,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -153,7 +154,7 @@ public class HPSC005 extends DaoEPBase {
private String factoryName = " "; /* 厂区名称*/ private String factoryName = " "; /* 厂区名称*/
private String orgNo = " "; /* 生产组编码*/ private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/ private String orgName = " "; /* 生产组名称*/
private Boolean documentType; /* 单据类型 0-非子母单;1-子母单*/ private Integer documentType; /* 单据类型 0-非子母单;1-子母单*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String remark1 = " "; /* 备注*/ private String remark1 = " "; /* 备注*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
...@@ -188,7 +189,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -188,7 +189,7 @@ public class HPSC005 extends DaoEPBase {
eiColumn.setDescName("部门编码"); eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PRODUCTION_ORDER_NO); eiColumn = new EiColumn(FIELD_PROD_ORDER_NO);
eiColumn.setDescName("生产订单号"); eiColumn.setDescName("生产订单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -452,20 +453,20 @@ public class HPSC005 extends DaoEPBase { ...@@ -452,20 +453,20 @@ public class HPSC005 extends DaoEPBase {
this.depCode = depCode; this.depCode = depCode;
} }
/** /**
* get the productionOrderNo - 生产订单号. * get the prodOrderNo - 生产订单号.
* @return the productionOrderNo * @return the prodOrderNo
*/ */
public String getProductionOrderNo() { public String getProdOrderNo() {
return this.productionOrderNo; return this.prodOrderNo;
} }
/** /**
* set the productionOrderNo - 生产订单号. * set the prodOrderNo - 生产订单号.
* *
* @param productionOrderNo - 生产订单号 * @param prodOrderNo - 生产订单号
*/ */
public void setProductionOrderNo(String productionOrderNo) { public void setProdOrderNo(String prodOrderNo) {
this.productionOrderNo = productionOrderNo; this.prodOrderNo = prodOrderNo;
} }
/** /**
* get the projCode - 项目编码. * get the projCode - 项目编码.
...@@ -903,7 +904,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -903,7 +904,7 @@ public class HPSC005 extends DaoEPBase {
* get the documentType - 单据类型 0-非子母单;1-子母单. * get the documentType - 单据类型 0-非子母单;1-子母单.
* @return the documentType * @return the documentType
*/ */
public Boolean getDocumentType() { public Integer getDocumentType() {
return this.documentType; return this.documentType;
} }
...@@ -912,7 +913,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -912,7 +913,7 @@ public class HPSC005 extends DaoEPBase {
* *
* @param documentType - 单据类型 0-非子母单;1-子母单 * @param documentType - 单据类型 0-非子母单;1-子母单
*/ */
public void setDocumentType(Boolean documentType) { public void setDocumentType(Integer documentType) {
this.documentType = documentType; this.documentType = documentType;
} }
/** /**
...@@ -1150,7 +1151,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1150,7 +1151,7 @@ public class HPSC005 extends DaoEPBase {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setProductionOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRODUCTION_ORDER_NO)), productionOrderNo)); setProdOrderNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROD_ORDER_NO)), prodOrderNo));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode)); setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType)); setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
...@@ -1178,7 +1179,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1178,7 +1179,7 @@ public class HPSC005 extends DaoEPBase {
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName)); setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FACTORY_NAME)), factoryName));
setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo)); setOrgNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NO)), orgNo));
setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName)); setOrgName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ORG_NAME)), orgName));
setDocumentType(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_DOCUMENT_TYPE)), documentType)); setDocumentType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOCUMENT_TYPE)), documentType));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1)); setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK1)), remark1));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -1205,7 +1206,7 @@ public class HPSC005 extends DaoEPBase { ...@@ -1205,7 +1206,7 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_PRODUCTION_ORDER_NO, StringUtils.toString(productionOrderNo, eiMetadata.getMeta(FIELD_PRODUCTION_ORDER_NO))); map.put(FIELD_PROD_ORDER_NO, StringUtils.toString(prodOrderNo, eiMetadata.getMeta(FIELD_PROD_ORDER_NO)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE))); map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE))); map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -30,6 +31,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -30,6 +31,7 @@ public class ServiceHPSC001 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "销售管理",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001()); inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
...@@ -48,6 +50,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -48,6 +50,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 查询操作. * 查询操作.
*/ */
@Override @Override
@OperationLogAnnotation(operModul = "销售管理",operType = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001()); EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
...@@ -59,6 +62,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -59,6 +62,7 @@ public class ServiceHPSC001 extends ServiceBase {
* 新增操作. * 新增操作.
*/ */
@Override @Override
@OperationLogAnnotation(operModul = "销售管理",operType = "新增")
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
HPSC001 hpsc001 = new HPSC001(); HPSC001 hpsc001 = new HPSC001();
...@@ -87,6 +91,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -87,6 +91,7 @@ public class ServiceHPSC001 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "销售管理",operType = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
HPSC001 hpsc001 = new HPSC001(); HPSC001 hpsc001 = new HPSC001();
...@@ -111,6 +116,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -111,6 +116,7 @@ public class ServiceHPSC001 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "销售管理",operType = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC001 hpsc001 = new HPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
...@@ -138,6 +144,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -138,6 +144,7 @@ public class ServiceHPSC001 extends ServiceBase {
/** /**
* 提交 撤回. * 提交 撤回.
*/ */
@OperationLogAnnotation(operModul = "销售管理",operType = "提交")
public EiInfo check(EiInfo eiInfo) { public EiInfo check(EiInfo eiInfo) {
HPSC001 hpsc001 = new HPSC001(); HPSC001 hpsc001 = new HPSC001();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
...@@ -38,6 +39,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -38,6 +39,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
// 查询物料ID所对应的项目名称和部件名称 // 查询物料ID所对应的项目名称和部件名称
...@@ -76,6 +78,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -76,6 +78,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -92,6 +95,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -92,6 +95,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "新增操作")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -115,6 +119,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -115,6 +119,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
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.HPSC002A;
...@@ -27,6 +28,7 @@ public class ServiceHPSC002B extends ServiceEPBase { ...@@ -27,6 +28,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
// 查询物料ID所对应的项目名称和部件名称 // 查询物料ID所对应的项目名称和部件名称
...@@ -51,6 +53,7 @@ public class ServiceHPSC002B extends ServiceEPBase { ...@@ -51,6 +53,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -67,6 +70,7 @@ public class ServiceHPSC002B extends ServiceEPBase { ...@@ -67,6 +70,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -90,6 +94,7 @@ public class ServiceHPSC002B extends ServiceEPBase { ...@@ -90,6 +94,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "附件清单",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC003; import com.baosight.hpjx.hp.sc.domain.HPSC003;
...@@ -26,6 +27,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -26,6 +27,7 @@ public class ServiceHPSC004 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiInfo outInfo = super.initLoad(inInfo, HPSC004); EiInfo outInfo = super.initLoad(inInfo, HPSC004);
...@@ -37,6 +39,8 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -37,6 +39,8 @@ public class ServiceHPSC004 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
...@@ -48,6 +52,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -48,6 +52,7 @@ public class ServiceHPSC004 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "新增",operDesc = "新增操作")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -75,6 +80,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -75,6 +80,7 @@ public class ServiceHPSC004 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "修改",operDesc = "修改操作")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
...@@ -99,6 +105,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -99,6 +105,7 @@ public class ServiceHPSC004 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
...@@ -121,7 +128,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -121,7 +128,7 @@ public class ServiceHPSC004 extends ServiceBase {
eiInfo.setMsg("删除成功!"); eiInfo.setMsg("删除成功!");
return eiInfo; return eiInfo;
} }
@OperationLogAnnotation(operModul = "生产计划",operType = "查询",operDesc = "查询明细")
public EiInfo queryDetail(EiInfo inInfo){ public EiInfo queryDetail(EiInfo inInfo){
HPSC004 HPSC004 = new HPSC004(); HPSC004 HPSC004 = new HPSC004();
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
...@@ -141,6 +148,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -141,6 +148,7 @@ public class ServiceHPSC004 extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "提交",operDesc = "计划提交验证")
public EiInfo inspectDetail(EiInfo eiInfo) { public EiInfo inspectDetail(EiInfo eiInfo) {
Map map = new HashMap(); Map map = new HashMap();
String id = eiInfo.get("id").toString(); String id = eiInfo.get("id").toString();
...@@ -156,6 +164,7 @@ public class ServiceHPSC004 extends ServiceBase { ...@@ -156,6 +164,7 @@ public class ServiceHPSC004 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产计划",operType = "查询",operDesc = "部件下拉框")
public EiInfo queryInventComboBox(EiInfo inInfo) { public EiInfo queryInventComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID); list.add(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID);
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; 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.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; 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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.xservices.xs.og.domain.XSOG01;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import java.text.SimpleDateFormat; import java.util.ArrayList;
import java.util.*; import java.util.List;
import java.util.Map;
/** /**
* @author:songx * @author:songx
...@@ -37,10 +28,13 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -37,10 +28,13 @@ public class ServiceHPSC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
HPSC005 HPSC005 = new HPSC005(); try {
EiInfo outInfo = super.initLoad(inInfo, HPSC005); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata); } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo; return inInfo;
} }
...@@ -50,10 +44,13 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -50,10 +44,13 @@ public class ServiceHPSC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
queryRow.put("planCompletionDate", DateUtils.formatShort(MapUtils.getString(queryRow,
"planCompletionDate")));
inInfo = super.query(inInfo, HPSC005.QUERY, new HPSC005()); inInfo = super.query(inInfo, HPSC005.QUERY, new HPSC005());
} catch (Throwable e) { } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -62,124 +59,12 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -62,124 +59,12 @@ public class ServiceHPSC005 extends ServiceBase {
} }
/** /**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
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);
DaoUtils.insert("HPSC005.insert", HPSC005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
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);
DaoUtils.update("HPSC005.update", HPSC005.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPSC005 HPSC005 = new HPSC005();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HPSC005.fromMap(map);
this.dao.delete("HPSC005.delete", HPSC005.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
/**
* 分派
* @param eiInfo
* @return
*/
public EiInfo assign(EiInfo eiInfo) {
try {
String ids = eiInfo.get("ids").toString();
String orgId = eiInfo.get("id").toString();
//先找到分派的组织
HPPZ011 HPPZ011 =(HPPZ011) dao.get("HPPZ011.get","id", orgId);
String [] id = ids.split(",");
for (int i = 0; i < id.length; i++) {
// 更新HPSC005的数据
HPSC005 HPSC005 = new HPSC005();
HPSC005.setId(NumberUtils.toLong(id[i]));
HPSC005.setStatus(2);
HPSC005.setOrgNo(HPPZ011.getGroupCode());
HPSC005.setFactoryCode(HPPZ011.getFactoryCode());
HPSC005.setFactoryName(HPPZ011.getFactoryName());
DaoUtils.update("HPSC005.updateAssign", HPSC005.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("分派成功!");
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("分派失败!原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("分派失败", e.getMessage());
return eiInfo;
}
return query(eiInfo);
}
/**
* 项目下拉框 * 项目下拉框
* *
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "项目下拉框")
public EiInfo queryProjComboBox(EiInfo inInfo) { public EiInfo queryProjComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PROJ_PROD_BLOCK_ID); list.add(DdynamicEnum.PROJ_PROD_BLOCK_ID);
...@@ -193,6 +78,7 @@ public class ServiceHPSC005 extends ServiceBase { ...@@ -193,6 +78,7 @@ public class ServiceHPSC005 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "生产组下拉框")
public EiInfo queryOrgComboBox(EiInfo inInfo) { public EiInfo queryOrgComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.ORG_PROD_BLOCK_ID); list.add(DdynamicEnum.ORG_PROD_BLOCK_ID);
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; 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.HPKC006;
import com.baosight.hpjx.hp.pz.domain.HPPZ011; import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
...@@ -17,7 +18,6 @@ import com.baosight.hpjx.util.EiInfoUtils; ...@@ -17,7 +18,6 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils; import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils; import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiConstant; 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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -42,12 +42,13 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -42,12 +42,13 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo"); String prodOrderNo = MapUtils.getString(queryMap, CommonConstant.Field.PROD_ORDER_NO);
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005); inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
...@@ -62,6 +63,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -62,6 +63,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
...@@ -78,10 +80,11 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -78,10 +80,11 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "新增",operDesc = "新增操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, CommonConstant.Field.DETAIL);
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, CommonConstant.Field.PROD_ORDER_NO);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 生产任务号 // 生产任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo"); List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
...@@ -120,8 +123,9 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -120,8 +123,9 @@ public class ServiceHPSC005A extends ServiceBase {
* @param dbSc005 * @param dbSc005
* @param fSc005a * @param fSc005a
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "新增",operDesc = "新增")
private void add(HPSC005 dbSc005, HPSC005A fSc005a) { private void add(HPSC005 dbSc005, HPSC005A fSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区"); AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区");
AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组"); AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组");
...@@ -144,8 +148,9 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -144,8 +148,9 @@ public class ServiceHPSC005A extends ServiceBase {
* @param fSc005a * @param fSc005a
* @param mapSc005a * @param mapSc005a
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "修改",operDesc = "修改数据")
private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) { private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo()); HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo());
AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(), AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(),
...@@ -165,10 +170,11 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -165,10 +170,11 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "删除",operDesc = "删除操作")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, CommonConstant.Field.DETAIL);
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, CommonConstant.Field.PROD_ORDER_NO);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
...@@ -198,9 +204,10 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -198,9 +204,10 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "刷新",operDesc = "刷新主订单信息")
private EiInfo refreshOrderInfo(EiInfo inInfo, String prodOrderNo) { private EiInfo refreshOrderInfo(EiInfo inInfo, String prodOrderNo) {
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo); HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005); inInfo.addBlock(CommonConstant.Field.DETAIL).addRow(dbSc005);
return inInfo; return inInfo;
} }
...@@ -210,6 +217,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -210,6 +217,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "新增",operDesc = "分派")
public EiInfo assign(EiInfo inInfo) { public EiInfo assign(EiInfo inInfo) {
try { try {
List<String> orderIds = (List<String>) inInfo.get("ids"); List<String> orderIds = (List<String>) inInfo.get("ids");
...@@ -219,16 +227,25 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -219,16 +227,25 @@ public class ServiceHPSC005A extends ServiceBase {
for (String orderId : orderIds) { for (String orderId : orderIds) {
// 校验主订单是否已分派 // 校验主订单是否已分派
HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId)); HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId));
AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()), AssertUtils.isTrue(ProdOrderStatusEnum.ALL_ASSIGN.getCode().equals(dbSc005.getStatus()),
String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProductionOrderNo())); String.format("生产订单[%s]已全部分派,不能在进行批量分派,请检查!", dbSc005.getProdOrderNo()));
HPSC005A newSc005a = new HPSC005A();
// 更新订单主表数量 // 更新订单主表数量
HPSCTools.checkAssignedNum(dbSc005.getProductionOrderNo(), dbSc005.getNum()); if (ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus())) {
HPSCTools.checkAssignedNum(dbSc005.getProdOrderNo(), dbSc005.getNum());
} else {
HPSCTools.checkAssignedNum2(dbSc005.getProdOrderNo(), dbSc005.getUnassignedNum());
}
// 写入子表数据 // 写入子表数据
HPSC005A newSc005a = new HPSC005A();
newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO, newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO,
new String[]{dbSc005.getProductionOrderNo()})); new String[]{dbSc005.getProdOrderNo()}));
newSc005a.setProdOrderNo(dbSc005.getProductionOrderNo()); newSc005a.setProdOrderNo(dbSc005.getProdOrderNo());
//区分未派单与部分派单
if (ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus())) {
newSc005a.setNum(dbSc005.getNum()); newSc005a.setNum(dbSc005.getNum());
} else {
newSc005a.setNum(dbSc005.getUnassignedNum());
}
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt())); newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
newSc005a.setOrgNo(dbPz011.getGroupCode()); newSc005a.setOrgNo(dbPz011.getGroupCode());
newSc005a.setOrgName(dbPz011.getGroupName()); newSc005a.setOrgName(dbPz011.getGroupName());
...@@ -249,6 +266,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -249,6 +266,7 @@ public class ServiceHPSC005A extends ServiceBase {
* *
* @param fSc005a * @param fSc005a
*/ */
@OperationLogAnnotation(operModul = "拆单派工",operType = "设置",operDesc = "设置基础信息")
private void setBaseInfo(HPSC005A fSc005a) { private void setBaseInfo(HPSC005A fSc005a) {
// 厂区名称 // 厂区名称
fSc005a.setFactoryName(HPPZTools.HpPz011.getFactoryName(fSc005a.getFactoryCode())); fSc005a.setFactoryName(HPPZTools.HpPz011.getFactoryName(fSc005a.getFactoryCode()));
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.ProdOrderStatusEnum; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B; import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant; 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.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/** /**
* 生产任务 * 生产任务
...@@ -37,6 +21,7 @@ public class ServiceHPSC005B extends ServiceBase { ...@@ -37,6 +21,7 @@ public class ServiceHPSC005B extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
...@@ -52,6 +37,7 @@ public class ServiceHPSC005B extends ServiceBase { ...@@ -52,6 +37,7 @@ public class ServiceHPSC005B extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产任务",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
......
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.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.domain.HPSC005C;
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
*/
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005C dbSc005 = HPSCTools.HpSc005.getDetails(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005C().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "查询")
@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;
}
}
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants; import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
...@@ -37,6 +38,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -37,6 +38,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
...@@ -52,6 +54,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -52,6 +54,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
...@@ -62,7 +65,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -62,7 +65,7 @@ public class ServiceHPSC006 extends ServiceBase {
return outInfo; return outInfo;
} }
@OperationLogAnnotation(operModul = "生产下料",operType = "查询",operDesc = "查询明细")
public EiInfo queryDetail(EiInfo inInfo){ public EiInfo queryDetail(EiInfo inInfo){
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
...@@ -80,6 +83,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -80,6 +83,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -121,6 +125,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -121,6 +125,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
...@@ -158,6 +163,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -158,6 +163,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
...@@ -185,6 +191,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -185,6 +191,7 @@ public class ServiceHPSC006 extends ServiceBase {
/** /**
* 绑定附件 * 绑定附件
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "绑定",operDesc = "绑定附件")
public EiInfo bindDocIdById(EiInfo eiInfo) { public EiInfo bindDocIdById(EiInfo eiInfo) {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
...@@ -215,6 +222,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -215,6 +222,7 @@ public class ServiceHPSC006 extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "生产下料",operType = "新增",operDesc = "分派")
public EiInfo assign(EiInfo eiInfo) { public EiInfo assign(EiInfo eiInfo) {
try { try {
String ids = eiInfo.get("ids").toString(); String ids = eiInfo.get("ids").toString();
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
...@@ -31,6 +32,7 @@ public class ServiceHPSC007 extends ServiceBase { ...@@ -31,6 +32,7 @@ public class ServiceHPSC007 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "下料登记",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
...@@ -52,6 +54,7 @@ public class ServiceHPSC007 extends ServiceBase { ...@@ -52,6 +54,7 @@ public class ServiceHPSC007 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "下料登记",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
...@@ -63,6 +66,7 @@ public class ServiceHPSC007 extends ServiceBase { ...@@ -63,6 +66,7 @@ public class ServiceHPSC007 extends ServiceBase {
/** /**
* 新增操作. * 新增操作.
*/ */
@OperationLogAnnotation(operModul = "下料登记",operType = "新增",operDesc = "新增")
@Override @Override
public EiInfo insert(EiInfo inInfo) { public EiInfo insert(EiInfo inInfo) {
try { try {
...@@ -120,6 +124,7 @@ public class ServiceHPSC007 extends ServiceBase { ...@@ -120,6 +124,7 @@ public class ServiceHPSC007 extends ServiceBase {
/** /**
* 修改操作. * 修改操作.
*/ */
@OperationLogAnnotation(operModul = "下料登记",operType = "修改",operDesc = "修改")
public EiInfo update(EiInfo inInfo) { public EiInfo update(EiInfo inInfo) {
try { try {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
...@@ -178,6 +183,7 @@ public class ServiceHPSC007 extends ServiceBase { ...@@ -178,6 +183,7 @@ public class ServiceHPSC007 extends ServiceBase {
/** /**
* 删除操作. * 删除操作.
*/ */
@OperationLogAnnotation(operModul = "下料登记",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
...@@ -21,6 +22,7 @@ public class ServiceHPSC011 extends ServiceBase { ...@@ -21,6 +22,7 @@ public class ServiceHPSC011 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "项目档案",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1); inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
...@@ -40,6 +42,7 @@ public class ServiceHPSC011 extends ServiceBase { ...@@ -40,6 +42,7 @@ public class ServiceHPSC011 extends ServiceBase {
/** /**
* 查询操作. * 查询操作.
*/ */
@OperationLogAnnotation(operModul = "项目档案",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/ /* 调用EI查询方法.*/
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.pz.domain.HPPZ011; import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
...@@ -24,6 +25,7 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -24,6 +25,7 @@ public class ServiceHPSC098 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "组织机构",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
...@@ -43,6 +45,7 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -43,6 +45,7 @@ public class ServiceHPSC098 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "组织机构",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
......
package com.baosight.hpjx.hp.sc.service; package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -12,6 +13,7 @@ public class ServiceHPSC099 extends ServiceBase { ...@@ -12,6 +13,7 @@ public class ServiceHPSC099 extends ServiceBase {
/** /**
* 画面初始化. * 画面初始化.
*/ */
@OperationLogAnnotation(operModul = "附件上传",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
return inInfo; return inInfo;
} }
...@@ -20,6 +22,7 @@ public class ServiceHPSC099 extends ServiceBase { ...@@ -20,6 +22,7 @@ public class ServiceHPSC099 extends ServiceBase {
/** /**
* 附件上传. * 附件上传.
*/ */
@OperationLogAnnotation(operModul = "附件上传",operType = "上传",operDesc = "附件上传")
public EiInfo form(EiInfo inInfo) { public EiInfo form(EiInfo inInfo) {
return inInfo; return inInfo;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-10 9:33:44
Version : 1.0
tableName :hpjx.t_hpsc001
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRINC1 VARCHAR,
PRINC2 VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HPSC001"> <sqlMap namespace="HPSC001">
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -66,6 +48,9 @@ ...@@ -66,6 +48,9 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCodes">
PROJ_CODE IN <iterate close=")" open="(" conjunction="," property="projCodes">#projCodes[]#</iterate>
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isEmpty property="orderBy"> <isEmpty property="orderBy">
CREATED_TIME desc CREATED_TIME desc
...@@ -101,6 +86,9 @@ ...@@ -101,6 +86,9 @@
<isNotEmpty prepend=" AND " property="materialStatus"> <isNotEmpty prepend=" AND " property="materialStatus">
MATERIAL_STATUS = #materialStatus# MATERIAL_STATUS = #materialStatus#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCodes">
PROJ_CODE IN <iterate close=")" open="(" conjunction="," property="projCodes">#projCodes[]#</iterate>
</isNotEmpty>
</select> </select>
<!-- <!--
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<sql id="column"> <sql id="column">
A.ID as "id", A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID --> A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID --> A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID --> A.DOC_ID as "docId", <!-- 文件ID -->
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode"> <isNotEmpty prepend=" AND " property="depCode">
A.DEPT_CODE = #deptCode# A.DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType"> <isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType# A.BIZ_TYPE = #bizType#
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002A ( INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE, BIZ_TYPE,
MAT_ID, <!-- 物料ID --> MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID --> DOC_ID, <!-- 文件ID -->
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) VALUES ( ) VALUES (
#companyCode#, #deptCode#, #bizType#, #matId#, #docId#, #createdBy#, #companyCode#, #depCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime# #createdName#, #createdTime#
) )
</insert> </insert>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<sql id="column"> <sql id="column">
A.ID as "id", A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.DEPT_CODE as "deptCode", <!-- 部门编码 预留 --> A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.BIZ_TYPE as "bizType", <!-- 物料ID --> A.BIZ_TYPE as "bizType", <!-- 物料ID -->
A.MAT_ID as "matId", <!-- 物料ID --> A.MAT_ID as "matId", <!-- 物料ID -->
A.DOC_ID as "docId", <!-- 文件ID --> A.DOC_ID as "docId", <!-- 文件ID -->
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode# A.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode"> <isNotEmpty prepend=" AND " property="depCode">
A.DEPT_CODE = #deptCode# A.DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="bizType"> <isNotEmpty prepend=" AND " property="bizType">
A.BIZ_TYPE = #bizType# A.BIZ_TYPE = #bizType#
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<insert id="insert"> <insert id="insert">
INSERT INTO ${hpjxSchema}.T_HPSC002A ( INSERT INTO ${hpjxSchema}.T_HPSC002A (
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEPT_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
BIZ_TYPE, BIZ_TYPE,
MAT_ID, <!-- 物料ID --> MAT_ID, <!-- 物料ID -->
DOC_ID, <!-- 文件ID --> DOC_ID, <!-- 文件ID -->
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME <!-- 创建时间 -->
) VALUES ( ) VALUES (
#companyCode#, #deptCode#, #bizType#, #matId#, #docId#, #createdBy#, #companyCode#, #depCode#, #bizType#, #matId#, #docId#, #createdBy#,
#createdName#, #createdTime# #createdName#, #createdTime#
) )
</insert> </insert>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC003"> <sqlMap namespace="HPSC003">
<sql id="condition"> <sql id="condition">
...@@ -59,8 +59,14 @@ ...@@ -59,8 +59,14 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <!-- 公共修改字段 -->
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003"> <sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT SELECT
ID as "id", ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
...@@ -195,12 +201,17 @@ ...@@ -195,12 +201,17 @@
UPDATE hpjx.T_HPSC003 UPDATE hpjx.T_HPSC003
SET SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE PLAN_INFO_NO = #planInfoNo#
WHERE </update>
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode# <!-- 修改状态 -->
AND PLAN_INFO_NO = #planInfoNo# <update id="updateStatus">
UPDATE hpjx.T_HPSC003
SET
STATUS = #status#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update> </update>
</sqlMap> </sqlMap>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
A.ID as "id", A.ID as "id",
A.PROJ_CODE as "projCode", <!-- 项目编码 --> A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 --> A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> A.PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
A.PRDT_CODE as "prdtCode", <!-- 部件编码 --> A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 --> A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PRDT_SPEC as "prdtSpec", A.PRDT_SPEC as "prdtSpec",
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
A.ID = #id# A.ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
A.PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%') A.PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE = #projCode# A.PROJ_CODE = #projCode#
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM HPJX.T_HPSC005 A FROM HPJX.T_HPSC005 A
INNER JOIN HPJX.T_HPSC005A B ON A.PRODUCTION_ORDER_NO = B.PROD_ORDER_NO INNER JOIN HPJX.T_HPSC005A B ON A.PROD_ORDER_NO = B.PROD_ORDER_NO
LEFT JOIN ( SELECT LEFT JOIN ( SELECT
DISTINCT PROD_TASK_NO DISTINCT PROD_TASK_NO
FROM HPJX.T_HPZL001 WHERE 1=1 AND DELETE_FLAG = 0 AND STATUS = 0) C ON B.PROD_TASK_NO = C.PROD_TASK_NO FROM HPJX.T_HPZL001 WHERE 1=1 AND DELETE_FLAG = 0 AND STATUS = 0) C ON B.PROD_TASK_NO = C.PROD_TASK_NO
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC005C">
<sql id="column">
ID as "id",
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PROD_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
INVENT_RECORD_ID as "inventRecordId",
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 部件编码 -->
PRDT_NAME as "prdtName", <!-- 部件名称 -->
PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
NUM as "num", <!-- 计划数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 计划重量 -->
STATUS as "status", <!-- 状态 0-未派工,1-已派工 -->
ORG_NO as "orgNo", <!-- 生产组编码 -->
ORG_NAME as "orgName", <!-- 生产组名称 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PRDT_SPEC as "prdtSpec",
PART_TYPE as "partType",
PART_CODE as "partCode",
PART_NAME as "partName",
PART_SPEC as "partSpec",
REMARK1 as "remark1",
PRDT_LENGTH as "prdtLength", <!-- 长 -->
PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
PRDT_THICK as "prdtThick", <!-- 厚 -->
PART_LENGTH as "partLength", <!-- 长 -->
PART_WIDTH as "partWidth", <!-- 宽 -->
PART_THICK as "partThick", <!-- 厚 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
DOCUMENT_TYPE as "documentType" <!-- 单据类型 0-非子母单;1-子母单 -->
</sql>
<sql id="column2">
A.ID as "id",
A.COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PROD_ORDER_NO as "productionOrderNo", <!-- 生产订单号 -->
A.INVENT_RECORD_ID as "inventRecordId",
A.PRDT_TYPE as "prdtType",
A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
A.NUM as "num", <!-- 计划数量 -->
A.UNIT_WT as "unitWt", <!-- 单重 -->
A.TOTAL_WT as "totalWt", <!-- 计划重量 -->
A.STATUS as "status", <!-- 状态 0-未派工,1-已派工 -->
A.ORG_NO as "orgNo", <!-- 生产组编码 -->
A.ORG_NAME as "orgName", <!-- 生产组名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.UPDATED_BY as "updatedBy", <!-- 更新人 -->
A.UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.REMARK as "remark", <!-- 备注 -->
A.FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
A.FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
A.FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
A.FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
A.FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
A.PRDT_SPEC as "prdtSpec",
A.PART_TYPE as "partType",
A.PART_CODE as "partCode",
A.PART_NAME as "partName",
A.PART_SPEC as "partSpec",
A.REMARK1 as "remark1",
A.PRDT_LENGTH as "prdtLength", <!-- 长 -->
A.PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
A.PRDT_THICK as "prdtThick", <!-- 厚 -->
A.PART_LENGTH as "partLength", <!-- 长 -->
A.PART_WIDTH as "partWidth", <!-- 宽 -->
A.PART_THICK as "partThick", <!-- 厚 -->
A.FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
A.FACTORY_NAME as "factoryName", <!-- 厂区名称 -->
A.ASSIGNED_NUM as "assignedNum", <!-- 已派工数量 -->
A.UNASSIGNED_NUM as "unassignedNum", <!-- 待派工数量 -->
A.DOCUMENT_TYPE as "documentType", <!-- 单据类型 0-非子母单;1-子母单 -->
B.COMPLETE_NUM as "completeNum", <!-- 已完成数量 -->
COALESCE(C.TOTAL_WT-C.ACTUAL_COMPLETION_NUM,0) as "unTotalWt", <!-- 剩余重量 -->
COALESCE(C.ACTUAL_COMPLETION_DATE,"") as "actualCompletionDate", <!-- 实际完工日期 -->
COALESCE(C.ACTUAL_COMPLETION_NUM,0) as "actualCompletionTotalWt"<!-- 实际完工重量 -->
</sql>
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like CONCAT('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
A.PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME LIKE CONCAT('%', #partName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgNo">
ORG_NO like CONCAT('%', #orgNo#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgName">
ORG_NAME like CONCAT('%', #orgName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC005C">
SELECT
<include refid="column2"/>
FROM ${hpjxSchema}.T_HPSC005 A
LEFT JOIN (SELECT PROD_ORDER_NO,SUM(COMPLETE_NUM) AS COMPLETE_NUM
FROM ${hpjxSchema}.T_HPSC005A GROUP BY PROD_ORDER_NO) B ON A.PROD_ORDER_NO=B.PROD_ORDER_NO
LEFT JOIN ${hpjxSchema}.T_HPSC004 C ON A.PROD_ORDER_NO=C.PROD_ORDER_NO
WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" />
</select>
</sqlMap>
...@@ -3,22 +3,22 @@ package com.baosight.hpjx.hp.sc.tools; ...@@ -3,22 +3,22 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC005C;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -57,7 +57,7 @@ public class HPSCTools { ...@@ -57,7 +57,7 @@ public class HPSCTools {
updateMap.put("assignedNum", totalNum); updateMap.put("assignedNum", totalNum);
updateMap.put("unassignedNum", jhNum.subtract(totalNum)); updateMap.put("unassignedNum", jhNum.subtract(totalNum));
// 0.未派工,1.部分派工,2.全部派工 // 0.未派工,1.部分派工,2.全部派工
if (jhNum.compareTo(assignNum) == 0) { if (jhNum.subtract(totalNum).compareTo(BigDecimal.ZERO)==0) {
updateMap.put("status", 2); updateMap.put("status", 2);
} else if (totalNum.compareTo(BigDecimal.ZERO) == 1) { } else if (totalNum.compareTo(BigDecimal.ZERO) == 1) {
updateMap.put("status", 1); updateMap.put("status", 1);
...@@ -68,6 +68,37 @@ public class HPSCTools { ...@@ -68,6 +68,37 @@ public class HPSCTools {
} }
/** /**
* 拆单数量校正(部分派单)
*
* @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);
}
/**
* 新增入库及删除入库单做同步计划订单 * 新增入库及删除入库单做同步计划订单
* *
* @param prodOrderNo * @param prodOrderNo
...@@ -115,6 +146,35 @@ public class HPSCTools { ...@@ -115,6 +146,35 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param projCodes
* @return
*/
public static List<HPSC001> list(List<String> projCodes) {
if (CollectionUtils.isEmpty(projCodes)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("projCodes", projCodes);
return DaoBase.getInstance().query("HPSC001.query", queryMap);
}
/**
* 查询
*
* @param projCodes
* @return
*/
public static Map<String, HPSC001> map(List<String> projCodes) {
List<HPSC001> results = list(projCodes);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPSC001::getProjCode, item -> item));
}
} }
/** /**
...@@ -131,7 +191,7 @@ public class HPSCTools { ...@@ -131,7 +191,7 @@ public class HPSCTools {
* @param prdtCode * @param prdtCode
* @return * @return
*/ */
public static HPSC002 get(String prdtCode) { public static HPSC002 getByPrdt(String prdtCode) {
AssertUtils.isEmpty(prdtCode, "部件编码不能为空"); AssertUtils.isEmpty(prdtCode, "部件编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
...@@ -139,6 +199,35 @@ public class HPSCTools { ...@@ -139,6 +199,35 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
/**
* 查询节点
*
* @param id
* @return
*/
public static HPSC002 get(Long id) {
AssertUtils.isNull(id, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isNull(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public static List<HPSC002> queryByParent(String parentId) {
AssertUtils.isEmpty(parentId, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
}
} }
/** /**
...@@ -163,6 +252,48 @@ public class HPSCTools { ...@@ -163,6 +252,48 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id)); AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC003 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 修改状态
*
* @param id
* @param status
*/
public static void updateStatus(Long id, Integer status) {
AssertUtils.isNull(id, "节点ID不能为空");
Map map = new HashMap();
map.put("id", id);
map.put("status", status);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_STATUS, map);
}
/**
* 修改计划完成时间
*
* @param planInfoNo
* @param planCompletionDate
*/
public static void updateDate(String planInfoNo, String planCompletionDate) {
AssertUtils.isNull(planInfoNo, "计划号不能为空");
Map map = new HashMap();
map.put("planInfoNo", planInfoNo);
map.put("planCompletionDate", planCompletionDate);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_DATE, map);
}
} }
/** /**
...@@ -204,6 +335,21 @@ public class HPSCTools { ...@@ -204,6 +335,21 @@ public class HPSCTools {
} }
/** /**
* 根据材料号删除
*
* @param matId
* @return
*/
public static void deleteByMat(Long matId) {
if (matId == null) {
return;
}
Map queryMap = new HashMap();
queryMap.put("matId", matId);
DaoBase.getInstance().update(HPSqlConstant.HPSC004.DELETE_BY_MAT, queryMap);
}
/**
* 查询 * 查询
* *
* @param prodOrderNo * @param prodOrderNo
...@@ -212,11 +358,38 @@ public class HPSCTools { ...@@ -212,11 +358,38 @@ public class HPSCTools {
public static HPSC004 get(String prodOrderNo) { public static HPSC004 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap); List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC004 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 根据父级ID查询
*
* @param parentId
* @return
*/
public static List<HPSC004> queryByParent(String parentId) {
AssertUtils.isNull(parentId, "计划ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
}
} }
/** /**
...@@ -327,12 +500,27 @@ public class HPSCTools { ...@@ -327,12 +500,27 @@ public class HPSCTools {
public static HPSC005 get(String prodOrderNo) { public static HPSC005 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static HPSC005C getDetails(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005C> results = DaoBase.getInstance().query(HPSC005C.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0);
}
} }
/** /**
...@@ -474,8 +662,6 @@ public class HPSCTools { ...@@ -474,8 +662,6 @@ public class HPSCTools {
/** /**
* 更新已完成数量 * 更新已完成数量
* *
* @param prodTaskNo
* @param completeNum
*/ */
public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt, public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt,
Integer status, String actualCompletionDate) { Integer status, String actualCompletionDate) {
......
package com.baosight.hpjx.hp.xs.service; package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.xs.domain.User; import com.baosight.hpjx.hp.xs.domain.User;
...@@ -28,6 +29,7 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -28,6 +29,7 @@ public class ServiceHPXSUser extends ServiceBase {
* @param eiInfo * @param eiInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "用户信息",operType = "查询",operDesc = "获取用户信息")
public EiInfo getUser(EiInfo eiInfo) { public EiInfo getUser(EiInfo eiInfo) {
EiInfo outInfo = new EiInfo(); EiInfo outInfo = new EiInfo();
int status = 0; int status = 0;
...@@ -62,6 +64,7 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -62,6 +64,7 @@ public class ServiceHPXSUser extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "用户信息",operType = "查询",operDesc = "查询用户下拉框")
public EiInfo queryComboBox(EiInfo inInfo) { public EiInfo queryComboBox(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
...@@ -81,6 +84,7 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -81,6 +84,7 @@ public class ServiceHPXSUser extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "用户信息",operType = "查询",operDesc = "查询用户的企业下拉框")
public EiInfo queryCompanyComboBox(EiInfo inInfo) { public EiInfo queryCompanyComboBox(EiInfo inInfo) {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
......
...@@ -32,8 +32,8 @@ public class HPZL001 extends DaoEPBase { ...@@ -32,8 +32,8 @@ public class HPZL001 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 部件编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 部件名称*/
public static final String FIELD_SUB_INVENT_CODE = "subInventCode"; /* 零件编码*/ 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_NAME = "subInventName"; /* 零件名称*/
public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/ public static final String FIELD_ORG_NO = "orgNo"; /* 生产组编码*/
public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/ public static final String FIELD_ORG_NAME = "orgName"; /* 生产组名称*/
public static final String FIELD_POOR_TYPE = "poorType"; /* 不良品类*/ public static final String FIELD_POOR_TYPE = "poorType"; /* 不良品类*/
...@@ -60,8 +60,8 @@ public class HPZL001 extends DaoEPBase { ...@@ -60,8 +60,8 @@ public class HPZL001 extends DaoEPBase {
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/ public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/ public static final String COL_INVENT_CODE = "INVENT_CODE"; /* 部件编码*/
public static final String COL_INVENT_NAME = "INVENT_NAME"; /* 部件名称*/ 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_CODE = "SUB_INVENT_CODE"; /* 零件编码*/
public static final String COL_SUB_INVENT_NAME = "SUB_INVENT_NAME"; /* 零件名称*/ 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_NO = "ORG_NO"; /* 生产组编码*/
public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/ public static final String COL_ORG_NAME = "ORG_NAME"; /* 生产组名称*/
public static final String COL_POOR_TYPE = "POOR_TYPE"; /* 不良品类*/ public static final String COL_POOR_TYPE = "POOR_TYPE"; /* 不良品类*/
...@@ -94,8 +94,8 @@ public class HPZL001 extends DaoEPBase { ...@@ -94,8 +94,8 @@ public class HPZL001 extends DaoEPBase {
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private String inventCode = " "; /* 部件编码*/ private String inventCode = " "; /* 部件编码*/
private String inventName = " "; /* 部件名称*/ private String inventName = " "; /* 部件名称*/
private String subInventCode = " "; /* 零件编码*/ private String subInventCode = " "; /* 零件编码*/
private String subInventName = " "; /* 零件名称*/ private String subInventName = " "; /* 零件名称*/
private String orgNo = " "; /* 生产组编码*/ private String orgNo = " "; /* 生产组编码*/
private String orgName = " "; /* 生产组名称*/ private String orgName = " "; /* 生产组名称*/
private Integer poorType; /* 不良品类*/ private Integer poorType; /* 不良品类*/
...@@ -163,11 +163,11 @@ public class HPZL001 extends DaoEPBase { ...@@ -163,11 +163,11 @@ public class HPZL001 extends DaoEPBase {
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE); eiColumn = new EiColumn(FIELD_SUB_INVENT_CODE);
eiColumn.setDescName("零件编码"); eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME); eiColumn = new EiColumn(FIELD_SUB_INVENT_NAME);
eiColumn.setDescName("零件名称"); eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ORG_NO); eiColumn = new EiColumn(FIELD_ORG_NO);
...@@ -413,7 +413,7 @@ public class HPZL001 extends DaoEPBase { ...@@ -413,7 +413,7 @@ public class HPZL001 extends DaoEPBase {
this.inventName = inventName; this.inventName = inventName;
} }
/** /**
* get the subInventCode - 零件编码. * get the subInventCode - 零件编码.
* @return the subInventCode * @return the subInventCode
*/ */
public String getSubInventCode() { public String getSubInventCode() {
...@@ -421,15 +421,15 @@ public class HPZL001 extends DaoEPBase { ...@@ -421,15 +421,15 @@ public class HPZL001 extends DaoEPBase {
} }
/** /**
* set the subInventCode - 零件编码. * set the subInventCode - 零件编码.
* *
* @param subInventCode - 零件编码 * @param subInventCode - 零件编码
*/ */
public void setSubInventCode(String subInventCode) { public void setSubInventCode(String subInventCode) {
this.subInventCode = subInventCode; this.subInventCode = subInventCode;
} }
/** /**
* get the subInventName - 零件名称. * get the subInventName - 零件名称.
* @return the subInventName * @return the subInventName
*/ */
public String getSubInventName() { public String getSubInventName() {
...@@ -437,9 +437,9 @@ public class HPZL001 extends DaoEPBase { ...@@ -437,9 +437,9 @@ public class HPZL001 extends DaoEPBase {
} }
/** /**
* set the subInventName - 零件名称. * set the subInventName - 零件名称.
* *
* @param subInventName - 零件名称 * @param subInventName - 零件名称
*/ */
public void setSubInventName(String subInventName) { public void setSubInventName(String subInventName) {
this.subInventName = subInventName; this.subInventName = subInventName;
......
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