箱变质检报告推启源调整组织判断
This commit is contained in:
parent
b09d397893
commit
fb76ce3647
|
|
@ -250,10 +250,13 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||||
String targetCode = configParams.get("xbOrg");
|
String targetCode = configParams.get("xbqcOrg");
|
||||||
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
||||||
throw new BusinessException("未配置组织参数");
|
throw new BusinessException("未配置组织参数");
|
||||||
}
|
}
|
||||||
|
if (targetCode.contains("qc-")) {
|
||||||
|
targetCode = targetCode.replace("qc-", "");
|
||||||
|
}
|
||||||
String[] orgItem = targetCode.split(",");
|
String[] orgItem = targetCode.split(",");
|
||||||
for (String orgCode : orgItem) {
|
for (String orgCode : orgItem) {
|
||||||
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
||||||
|
|
|
||||||
|
|
@ -254,10 +254,13 @@ public class QCRptDataPushtoQmsAction implements ICommonAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||||
String targetCode = configParams.get("xbOrg");
|
String targetCode = configParams.get("xbqcOrg");
|
||||||
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
||||||
throw new BusinessException("未配置组织参数");
|
throw new BusinessException("未配置组织参数");
|
||||||
}
|
}
|
||||||
|
if (targetCode.contains("qc-")) {
|
||||||
|
targetCode = targetCode.replace("qc-", "");
|
||||||
|
}
|
||||||
String[] orgItem = targetCode.split(",");
|
String[] orgItem = targetCode.split(",");
|
||||||
for (String orgCode : orgItem) {
|
for (String orgCode : orgItem) {
|
||||||
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
||||||
|
|
|
||||||
|
|
@ -249,10 +249,13 @@ public class SyncDeleteQcQmsRule implements IRule<ReportVO> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||||
String targetCode = configParams.get("xbOrg");
|
String targetCode = configParams.get("xbqcOrg");
|
||||||
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
||||||
throw new BusinessException("未配置组织参数");
|
throw new BusinessException("未配置组织参数");
|
||||||
}
|
}
|
||||||
|
if (targetCode.contains("qc-")) {
|
||||||
|
targetCode = targetCode.replace("qc-", "");
|
||||||
|
}
|
||||||
String[] orgItem = targetCode.split(",");
|
String[] orgItem = targetCode.split(",");
|
||||||
for (String orgCode : orgItem) {
|
for (String orgCode : orgItem) {
|
||||||
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
||||||
|
|
|
||||||
|
|
@ -151,12 +151,14 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
|
||||||
updateArrveOrder(hvo.getPk_arriveorder());
|
updateArrveOrder(hvo.getPk_arriveorder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateArrveOrder(String pkArriveorder) throws DAOException {
|
private void updateArrveOrder(String pkArriveorder) throws DAOException {
|
||||||
BaseDAO dao = new BaseDAO();
|
BaseDAO dao = new BaseDAO();
|
||||||
String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder='"
|
String sql = "update po_arriveorder_b set vbdef32='Y' where pk_arriveorder='"
|
||||||
+ pkArriveorder + "'";
|
+ pkArriveorder + "'";
|
||||||
dao.executeUpdate(sql);
|
dao.executeUpdate(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Object getBz(ArriveItemVO[] bvo, String cfirstbid) {
|
private Object getBz(ArriveItemVO[] bvo, String cfirstbid) {
|
||||||
for (ArriveItemVO arriveItemVO : bvo) {
|
for (ArriveItemVO arriveItemVO : bvo) {
|
||||||
if (arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
if (arriveItemVO.getPk_arriveorder_b().equals(cfirstbid)) {
|
||||||
|
|
@ -223,10 +225,13 @@ public class SyncQcQmsRule implements IRule<ReportVO> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
private boolean checkIfOrg(String code, Map<String, String> configParams) throws BusinessException {
|
||||||
String targetCode = configParams.get("xbOrg");
|
String targetCode = configParams.get("xbqcOrg");
|
||||||
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
if (targetCode == null || StringUtils.isEmpty(targetCode)) {
|
||||||
throw new BusinessException("δÅäÖÃ×éÖ¯²ÎÊý");
|
throw new BusinessException("δÅäÖÃ×éÖ¯²ÎÊý");
|
||||||
}
|
}
|
||||||
|
if (targetCode.contains("qc-")) {
|
||||||
|
targetCode = targetCode.replace("qc-", "");
|
||||||
|
}
|
||||||
String[] orgItem = targetCode.split(",");
|
String[] orgItem = targetCode.split(",");
|
||||||
for (String orgCode : orgItem) {
|
for (String orgCode : orgItem) {
|
||||||
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
if (!orgCode.isEmpty() && orgCode.equals(code)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue