分组类型查询单据
This commit is contained in:
parent
5209d7cfd5
commit
537b70f510
|
@ -108,22 +108,22 @@
|
|||
</trim>
|
||||
</select>
|
||||
|
||||
<update id="entity_update" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">
|
||||
update v_hzya_u9c_pr_pr set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="dataStatus != null and dataStatus != ''"> dataStatus = #{dataStatus},</if>
|
||||
<if test="dataMsg != null and dataMsg != ''"> dataMsg = #{dataMsg},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- <update id="entity_update" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">-->
|
||||
<!-- update PR_PR set-->
|
||||
<!-- update v_hzya_u9c_pr_pr set-->
|
||||
<!-- <trim suffix="" suffixOverrides=",">-->
|
||||
<!-- <if test="dataStatus != null and dataStatus != ''"> DescFlexField_PrivateDescSeg2 = #{dataStatus},</if>-->
|
||||
<!-- <if test="dataMsg != null and dataMsg != ''"> DescFlexField_PrivateDescSeg1 = #{dataMsg},</if>-->
|
||||
<!-- <if test="dataStatus != null and dataStatus != ''"> dataStatus = #{dataStatus},</if>-->
|
||||
<!-- <if test="dataMsg != null and dataMsg != ''"> dataMsg = #{dataMsg},</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- where id = #{id}-->
|
||||
<!-- </update>-->
|
||||
|
||||
<update id="entity_update" parameterType="com.hzya.frame.plugin.dgx.u9c.entity.RequisitionEntity">
|
||||
update PR_PR set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="dataStatus != null and dataStatus != ''"> DescFlexField_PrivateDescSeg2 = #{dataStatus},</if>
|
||||
<if test="dataMsg != null and dataMsg != ''"> DescFlexField_PrivateDescSeg1 = #{dataMsg},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -256,14 +256,14 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
String res = null;
|
||||
Boolean flag = false;
|
||||
try {
|
||||
//1、获取token
|
||||
JSONObject nouserToken = getToken(null, "800045", "8000450000");
|
||||
if (nouserToken.getBoolean("flag")) {
|
||||
////1、获取token
|
||||
//JSONObject nouserToken = getToken(null, "800045", "8000450000");
|
||||
//if (nouserToken.getBoolean("flag")) {
|
||||
//2、根据电话获取code
|
||||
JSONObject usercode = getUsercode(nouserToken.getString("token"), prepayment.getUserPhone(), "800045", "8000450005");
|
||||
if (usercode.getBoolean("flag")) {
|
||||
//JSONObject usercode = getUsercode(nouserToken.getString("token"), prepayment.getUserPhone(), "800045", "8000450005");
|
||||
//if (usercode.getBoolean("flag")) {
|
||||
//3、根据code,再次获取token
|
||||
JSONObject token = getToken(usercode.getString("code"), "800045", "8000450000");
|
||||
JSONObject token = getToken(prepayment.getUserPhone(), "800045", "8000450000");
|
||||
if (token.getBoolean("flag")) {
|
||||
res = invokeEsb(param, "800045", "8000450001", token.getString("token"));
|
||||
JSONObject jsonObject = JSONObject.parseObject(res);
|
||||
|
@ -271,12 +271,12 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
} else {
|
||||
res = token.getString("msg");
|
||||
}
|
||||
} else {
|
||||
res = usercode.getString("msg");
|
||||
}
|
||||
} else {
|
||||
res = nouserToken.getString("msg");
|
||||
}
|
||||
//} else {
|
||||
// res = usercode.getString("msg");
|
||||
//}
|
||||
//} else {
|
||||
// res = nouserToken.getString("msg");
|
||||
//}
|
||||
} catch (Exception e) {
|
||||
logger.error("调用oa接口出错:{}", e);
|
||||
res = e.getMessage();
|
||||
|
@ -376,15 +376,11 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
formmain_0652.put("field0012", requisitionDetailList.get(0).getFactoryName());
|
||||
//状态
|
||||
formmain_0652.put("field0013", requisition.getStatusName());
|
||||
String res = null;
|
||||
Boolean flag = false;
|
||||
JSONObject token = getToken(requisition.getSendPhone(), "800045", "8000450000");
|
||||
//3、根据code,再次获取token
|
||||
if (token.getBoolean("flag")) {
|
||||
|
||||
//发起人
|
||||
formmain_0652.put("field0002", token.getString("name"));
|
||||
//formmain_0652.put("field0002", token.getString("name"));
|
||||
//发起部门
|
||||
formmain_0652.put("field0003", token.getString("bm"));
|
||||
//formmain_0652.put("field0003", token.getString("bm"));
|
||||
//发起时间
|
||||
formmain_0652.put("field0004", DateUtil.now());
|
||||
//来源类型 不要
|
||||
|
@ -441,7 +437,10 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
param.put("data", data);
|
||||
String paramStr = param.toString();
|
||||
logger.info("u9c请购单发起OA流程请求参数:{}", paramStr);
|
||||
String res = null;
|
||||
Boolean flag = false;
|
||||
try {
|
||||
JSONObject token = getToken(requisition.getSendPhone(), "800045", "8000450000");
|
||||
//3、根据code,再次获取token
|
||||
if (token.getBoolean("flag")) {
|
||||
res = invokeEsb(param, "800045", "8000450002", token.getString("token"));
|
||||
|
@ -467,9 +466,6 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
saveLog(taskId, flag, taskLivingDetail);
|
||||
logger.info("u9c请购单发起OA流程返回结果:{}", res);
|
||||
// 发送完成修改主表状态 已完成或发送失败 flag判断
|
||||
} else {
|
||||
res = token.getString("msg");
|
||||
}
|
||||
if (flag) {
|
||||
RequisitionEntity updateRequisition = new RequisitionEntity();
|
||||
updateRequisition.setDataSourceCode(datasourceCode);
|
||||
|
@ -560,7 +556,7 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
String res = null;
|
||||
String token = null;
|
||||
Boolean flag = false;
|
||||
String bm = null;
|
||||
//String bm = null;
|
||||
String name = null;
|
||||
try {
|
||||
res = invokeEsb(param, appId, apiCode, null);
|
||||
|
@ -568,7 +564,7 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
flag = jsonObject.getBoolean("flag");
|
||||
if (flag) {
|
||||
token = jsonObject.getJSONObject("attribute").getString("id");
|
||||
bm = jsonObject.getJSONObject("attribute").getJSONObject("bindingUser").getString("orgDepartmentName");
|
||||
//bm = jsonObject.getJSONObject("attribute").getJSONObject("bindingUser").getString("orgDepartmentName");
|
||||
name = jsonObject.getJSONObject("attribute").getJSONObject("bindingUser").getString("name");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -578,7 +574,7 @@ public class U9CPluginServiceImpl implements IU9CPluginService {
|
|||
if (flag) {
|
||||
returnData.put("flag", "true");
|
||||
returnData.put("token", token);
|
||||
returnData.put("bm", bm);
|
||||
//returnData.put("bm", bm);
|
||||
returnData.put("name", name);
|
||||
} else {
|
||||
returnData.put("flag", "false");
|
||||
|
|
Loading…
Reference in New Issue