Commit d16fb495 by wuwenlong

组织机构bugfix

parent 565e19e6
......@@ -62,9 +62,8 @@ public class ServiceXSOG0801A extends ServiceEPBase {
} else if (OrgTypeEnum.FACTORY.getCode().equals(org.getOrgType())) {
condition = String.format(" ITEM_CODE IN ('%s')", OrgTypeEnum.DEPT.getCode());
} else if (OrgTypeEnum.DEPT.getCode().equals(org.getOrgType())) {
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s', '%s')", OrgTypeEnum.DEPT.getCode(),
OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode(),
OrgTypeEnum.SYN_GROUP.getCode());
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s')", OrgTypeEnum.DEPT.getCode(),
OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode());
} else {
condition = " ITEM_CODE = 'NOT CODE'";
}
......
......@@ -47,12 +47,16 @@ public class ServiceXSOG0801B extends ServiceEPBase {
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s')", OrgTypeEnum.COMPANY.getCode(),
OrgTypeEnum.FACTORY.getCode(), OrgTypeEnum.DEPT.getCode());
} else if (OrgTypeEnum.FACTORY.getCode().equals(org.getOrgType())) {
condition = String.format(" ITEM_CODE IN ('%s')", OrgTypeEnum.DEPT.getCode());
condition = String.format(" ITEM_CODE IN ('%s')", OrgTypeEnum.FACTORY.getCode());
} else if (OrgTypeEnum.DEPT.getCode().equals(org.getOrgType())) {
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s', '%s')", OrgTypeEnum.DEPT.getCode(),
OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode(),
OrgTypeEnum.SYN_GROUP.getCode());
} else {
condition = String.format(" ITEM_CODE IN ('%s')", OrgTypeEnum.DEPT.getCode());
// , OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode(),
// OrgTypeEnum.SYN_GROUP.getCode());
} else if (OrgTypeEnum.PROD_GROUP.getCode().equals(org.getOrgType())
||OrgTypeEnum.CUT_GROUP.getCode().equals(org.getOrgType())){
condition = String.format(" ITEM_CODE IN ('%s', '%s')",
OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode());
}else {
condition = " ITEM_CODE = 'NOT CODE'";
}
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.XsOg.ORG_TYPE, condition);
......
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