forked from integrated_whb/integrated_whb
部门 单位对接
parent
813c74f097
commit
72495ef2ca
|
@ -61,6 +61,18 @@ public class DepartmentController extends BaseController {
|
|||
corpPage.put("CORPINFO_ID", corpinfoId);
|
||||
PageData corpInfo = corpInfoService.findById(corpPage);
|
||||
// {"deptName":"0226-wx","enterpriseId":4,"staffId":"","deptPhone":"","deptAddress":"","remark":"","deptDuty":""}
|
||||
corpPage.put("enterpriseName",corpInfo.getString("CORP_NAME"));
|
||||
if (Tools.isEmpty(corpInfo.getString("enterpriseId"))) {
|
||||
JSONObject body = PLSUtil.GeneralPost("/deploy/enterprise/addDepEnterprise", corpPage, corpinfoId);
|
||||
if (body != null) {
|
||||
if (!"200".equals(body.getString("code"))) {
|
||||
return ReturnMap.error("人员定位系统中部门新增失败");
|
||||
}
|
||||
corpPage.put("enterpriseId", body.getString("data"));
|
||||
corpInfo.put("enterpriseId", body.getString("data"));
|
||||
corpInfoService.updateEnterpriseId(corpPage);
|
||||
}
|
||||
}
|
||||
PageData dept = new PageData();
|
||||
dept.put("deptName", pd.getString("NAME"));
|
||||
dept.put("enterpriseId", corpInfo.get("enterpriseId"));
|
||||
|
@ -69,7 +81,7 @@ public class DepartmentController extends BaseController {
|
|||
if (!"200".equals(body.getString("code"))) {
|
||||
return ReturnMap.error("人员定位系统中部门新增失败");
|
||||
}
|
||||
pd.put("deptId", body.getString("deptId"));
|
||||
pd.put("deptId", body.getString("data"));
|
||||
}
|
||||
pd.put("DEPARTMENT_ID", this.get32UUID()); //主键
|
||||
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业
|
||||
|
|
|
@ -73,5 +73,7 @@ public interface CorpInfoMapper {
|
|||
PageData getInfo(PageData corpCondition);
|
||||
|
||||
PageData eightWorkBI(PageData pd);
|
||||
|
||||
void updateEnterpriseId(PageData corpPage);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,5 +70,7 @@ public interface CorpInfoService {
|
|||
public PageData findByCode(PageData pd)throws Exception;
|
||||
|
||||
PageData eightWorkBI(PageData pd)throws Exception;
|
||||
|
||||
void updateEnterpriseId(PageData corpPage);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,5 +113,10 @@ public class CorpInfoServiceImpl implements CorpInfoService {
|
|||
return corpinfoMapper.eightWorkBI(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEnterpriseId(PageData corpPage) {
|
||||
corpinfoMapper.updateEnterpriseId(corpPage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -333,8 +333,16 @@
|
|||
where
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
</update>
|
||||
<update id="updateEnterpriseId">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
enterpriseId = #{enterpriseId}
|
||||
where
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
t.NAME as REGULARTYPE_NAME,
|
||||
|
|
Loading…
Reference in New Issue