Commit c25ac964 by 邓实川 Committed by chenzg

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

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