Commit de68548b authored by wanglong's avatar wanglong

修改添加人员时的判断逻辑

parent 5256d30a
......@@ -21,10 +21,12 @@ public class XJConstant {
public static final String CHECK_TYPE = "CHECK_TYPE";
public static final String DEPT_WF_MAP_DIC_CODE = "DEPT_WF_MAP";
//附件默认值
public static final String INSTALL_SUB_FORM="[{\"Symbol_key\":\"B83A18D2-FF89-47D2-BEA2-BAA097E09783\",\"subFormInstall\":\"材质证明文件\",\"info\":\"\",\"type\":\"\"},{\"Symbol_key\":\"DB0306C1-3520-4BB4-93CE-44DA95AAD408\",\"subFormInstall\":\"焊接工艺评定报告\",\"info\":\"\",\"type\":\"\"}]";
public static final String DESIGN_SUB_FORM="[{\"Symbol_key\":\"314C727B-A6A7-40F1-9CFC-C354748657F7\",\"subFormAttachment\":\"设计文件\",\"info\":\"\",\"type\":\"\"},{\"Symbol_key\":\"5F3B660B-25A2-420C-919E-60F74CE1F36A\",\"subFormAttachment\":\"施工组织设计文件\",\"info\":\"\",\"type\":\"\"}]";
//人员org数值
public static final int ORG_CODE=18;
public static final int ORG_CODE_USER=12;
/** 企业用户注册前缀 */
public static final String UGP_USER_TEL = "ugp_tel_";
......
......@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.biz.service.impl.DynamicFormInstanceS
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectResourceEnum;
import com.yeejoin.amos.boot.module.ugp.api.constants.XJConstant;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.entity.ProjectResource;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
......@@ -121,6 +122,8 @@ public class OrgServiceImpl {
* @param bizOrgType
* @return
*/
final static int codeSum = 12;
final static int codeUserSum = 12;
public OrgUsr saveOrgUsr(JSONObject jsonObject,String bizOrgType,String sequenceNbr){
ReginParams reginParams = getReginParams();
OrgUsr orgUsr = new OrgUsr();
......@@ -174,7 +177,14 @@ public class OrgServiceImpl {
OrgUsr parent = orgUsrServiceImpl.getById(orgUsr.getParentId());
if (parent != null && ObjectUtils.isEmpty(orgUsr.getBizOrgCode())) {
orgUsr.setBizOrgCode(parent.getBizOrgCode() + OrgUsrServiceImpl.getOrgCodeStr());
} else if (jsonObject.get("type").equals("WELDER") && parent.getBizOrgCode().length()< XJConstant.ORG_CODE) {//添加部门
orgUsr.setBizOrgCode(parent.getBizOrgCode() + OrgUsrServiceImpl.getOrgCodeStr());
} else if (jsonObject.get("type").equals("WELDER") && parent.getBizOrgCode().length()== XJConstant.ORG_CODE) {//修改部门
orgUsr.setBizOrgCode(parent.getBizOrgCode().substring(0,codeSum)+OrgUsrServiceImpl.getOrgCodeStr());
} else if (ValidationUtil.isEmpty(jsonObject.get("type"))&&parent.getBizOrgCode().length()== XJConstant.ORG_CODE_USER) {//部门负责人修改
orgUsr.setBizOrgCode(parent.getBizOrgCode().substring(0,codeUserSum)+OrgUsrServiceImpl.getOrgCodeStr());
}
} else {
orgUsr.setBizOrgCode(OrgUsrServiceImpl.getOrgCodeStr());
}
......@@ -370,16 +380,6 @@ public class OrgServiceImpl {
}
/**
* 获取当前机构下的人员列表
*/
@BusinessIdentify
public List<OrgUsr> getPreson(){
return null;
}
/**
* 获取当前登陆人所在单位id(orgUsr表中的id)
* @return
*/
......
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