generated from dxfeng/secondev-chapanda-feishu
信息采集,保存功能完善
This commit is contained in:
parent
c630aaa4bc
commit
4d06a7377e
|
|
@ -118,7 +118,7 @@ public class CheckRepeatResume {
|
|||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, 1);
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId);
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class RecruitRecordSet {
|
|||
* @param modeTable
|
||||
* @param formModeId
|
||||
*/
|
||||
public static int refreshRight(String uuid, String modeTable, int formModeId) {
|
||||
public static int refreshRight(String uuid, String modeTable, int formModeId, int creator) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from " + modeTable + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
|
|
@ -132,7 +132,7 @@ public class RecruitRecordSet {
|
|||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
modeRightInfo.editModeDataShare(creator, formModeId, bid);
|
||||
return bid;
|
||||
}
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import java.util.*;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageServiceImpl extends Service implements InductionManageService {
|
||||
private static final String MOBILE_APPID_COLLECT = RecruitModeUtil.getRecruitPropValue("MOBILE_APPID_COLLECT");
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
|
||||
String operateType = Util.null2String(param.get("operateType"));
|
||||
|
|
@ -39,8 +41,20 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
String[] split = ids.split(",");
|
||||
|
||||
if (StringUtils.isBlank(MOBILE_APPID_COLLECT)) {
|
||||
throw new CustomizeRunTimeException("未获取到对应移动建模ID,请检查配置文件");
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select noLoginUser from mobileappbaseinfo where id = ?", MOBILE_APPID_COLLECT);
|
||||
int creator = -1;
|
||||
if (rs.next()) {
|
||||
creator = rs.getInt("noLoginUser");
|
||||
}
|
||||
if (-1 == creator) {
|
||||
throw new CustomizeRunTimeException("未配置免登陆访问用户,经检查移动建模应用配置");
|
||||
}
|
||||
|
||||
|
||||
for (String billId : split) {
|
||||
// 判断是否已发送信息采集,已发送的不重复发送
|
||||
rs.executeQuery("select a.id from uf_jcl_xxcj a inner join uf_jcl_rzgl b on a.xm = b.xm and a.sjh = b.sjhm where b.id = ? ", billId);
|
||||
|
|
@ -61,7 +75,7 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, user.getUID());
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, creator);
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
|
|
@ -78,6 +92,8 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
String password = generatePassword();
|
||||
dataMap.put("mm", password);
|
||||
|
||||
dataMap.put("modedatastatus", "1");
|
||||
|
||||
|
||||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
|
|
@ -89,7 +105,7 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
}
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId);
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId, creator);
|
||||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue