Commit c25ac964 by 邓实川 Committed by chenzg

电子合同优化,员工统计图籍贯查询

parent 93021197
...@@ -172,17 +172,19 @@ public class DzhtController2 { ...@@ -172,17 +172,19 @@ public class DzhtController2 {
TokenHelper.getTokenData(); TokenHelper.getTokenData();
j = AccountHelper.createOrgAcct(thirdPartyUserId, creator, qyzc.getName(), qyzc.getIdType(), j = AccountHelper.createOrgAcct(thirdPartyUserId, creator, qyzc.getName(), qyzc.getIdType(),
qyzc.getIdNumber()); qyzc.getIdNumber());
Integer code = j.getInteger("code");
if (code != null && code != 0)
return ResultUtil.error(j.getString("message"));
} catch (DefineException e) { } catch (DefineException e) {
e.printStackTrace(); e.getStackTrace();
return ResultUtil.error();
} }
String orgId = j.getString("orgId"); String orgId = j.getString("orgId");
String accountId = j.getString("accountId");
qyzc.setOrgId(orgId); qyzc.setOrgId(orgId);
qyzc.setOrgCode(userBean.getOrgCode()); qyzc.setOrgCode(userBean.getOrgCode());
if (j.getString("accountId") != null) { if (accountId != null)
qyzc.insert(); qyzc.insert();
}
return ResultUtil.data(orgId, "创建成功"); return ResultUtil.data(orgId, "创建成功");
} }
...@@ -204,8 +206,8 @@ public class DzhtController2 { ...@@ -204,8 +206,8 @@ public class DzhtController2 {
@GetMapping("/getOrganizations") @GetMapping("/getOrganizations")
@ApiOperation(value = "查询企业信息s", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查询企业信息s", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getOrganizations(@CurrentUser UserBean userBean) { public Result<Object> getOrganizations(@CurrentUser UserBean userBean) {
List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build() List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build().selectList(
.selectList(new QueryWrapper<QyzxEmpEntAsso>().eq("emp_num", userBean.getEmpNum())); new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode()); List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode());
List<String> orgIds = new ArrayList<String>(); List<String> orgIds = new ArrayList<String>();
for (Integer orgCode : orgCodeList) { for (Integer orgCode : orgCodeList) {
......
...@@ -207,7 +207,8 @@ public class AccountHelper { ...@@ -207,7 +207,8 @@ public class AccountHelper {
String param = AccountParamUtil.createOrgAcctParam(thirdPartyUserId, creatorId, name, idType, idNumber); String param = AccountParamUtil.createOrgAcctParam(thirdPartyUserId, creatorId, name, idType, idNumber);
JSONObject json = HttpHelper.doCommHttp(RequestType.POST, ConfigConstant.createOrgAcc_URL(), param); JSONObject json = HttpHelper.doCommHttp(RequestType.POST, ConfigConstant.createOrgAcc_URL(), param);
return JSONHelper.castDataJson(json,JSONObject.class); return json;
// return JSONHelper.castDataJson(json,JSONObject.class);
} }
/** /**
......
...@@ -384,17 +384,17 @@ ...@@ -384,17 +384,17 @@
<!-- 籍贯统计(省份)查询 --> <!-- 籍贯统计(省份)查询 -->
<select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto"> <select id="queryNativeplace" resultType="cn.timer.api.dto.yggl.YgglCartogramDto">
SELECT SELECT
IFNULL(c.name,'null') province,count(y.jg) provinceNum IFNULL(c.city_name,'null') province,count(y.jg_id) provinceNum
FROM FROM
yggl_main_emp y yggl_main_emp y
LEFT JOIN LEFT JOIN
city_class c common_area c
ON ON
y.jg = c.id y.jg_id = c.code_id
WHERE WHERE
org_code = #{orgCode} org_code = #{orgCode}
GROUP BY GROUP BY
c.name c.city_name
</select> </select>
<!-- 员工工龄分布查询 --> <!-- 员工工龄分布查询 -->
......
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