相关方需求变革

pull/5/head
liujun 2023-12-18 19:58:52 +08:00
parent a0dcdb61d3
commit cfb4c2dd8e
6 changed files with 65 additions and 17 deletions

View File

@ -25,7 +25,6 @@ public class ApiXgfUserController extends BaseController {
public Object synchronizationUserInfo() throws Exception { public Object synchronizationUserInfo() throws Exception {
try { try {
PageData request = this.getPageData(); PageData request = this.getPageData();
System.out.println(request.getString("infoList"));
List<PageData> infoList = Warden.getList(request.getString("infoList")); List<PageData> infoList = Warden.getList(request.getString("infoList"));
xgfUserService.init(request); xgfUserService.init(request);
Map<String, Object> response = new HashMap<String, Object>(); Map<String, Object> response = new HashMap<String, Object>();
@ -36,4 +35,19 @@ public class ApiXgfUserController extends BaseController {
throw new RuntimeException("系统异常"); throw new RuntimeException("系统异常");
} }
} }
@RequestMapping(value = "/approvalApplication")
@ResponseBody
public Object approvalApplication() throws Exception{
try {
PageData request = this.getPageData();
xgfUserService.approvalApplication(request);
Map<String, Object> response = new HashMap<String, Object>();
response.put("result", "response");
return response;
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常");
}
}
} }

View File

@ -54,5 +54,4 @@ public interface XgfUserMapper {
* @throws Exception * @throws Exception
*/ */
public List<PageData> listByIds(PageData pd); public List<PageData> listByIds(PageData pd);
} }

View File

@ -14,4 +14,6 @@ public interface XgfUserService {
List<PageData> list(Page page) throws Exception; List<PageData> list(Page page) throws Exception;
void init(PageData request); void init(PageData request);
void approvalApplication(PageData request) throws Exception;
} }

View File

@ -5,12 +5,14 @@ import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper; import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
import com.zcloud.mapper.datasource.xgf.XgfUserMapper; import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
import com.zcloud.service.xgf.XgfUserService; import com.zcloud.service.xgf.XgfUserService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Warden; import com.zcloud.util.Warden;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List; import java.util.List;
@Service @Service
@ -45,18 +47,23 @@ public class XgfUserServiceImpl implements XgfUserService {
try { try {
PageData condition = new PageData(); PageData condition = new PageData();
if (StringUtils.isNotBlank(x.getString("USER_ID"))) { if (StringUtils.isNotBlank(x.getString("USER_ID"))) {
condition.put("USER_ID", x.getString("USER_ID")); condition.put("XGF_USER_ID", x.getString("USER_ID"));
PageData entity = xgfUserMapper.findById(condition); PageData entity = xgfUserMapper.findById(condition);
if (entity == null || entity.size() <= 0) { if (entity == null || entity.size() <= 0) {
x.put("XGF_USER_ID", x.get("USER_ID")); x.put("XGF_USER_ID", x.get("USER_ID"));
x.put("XGF_USER_DETAILS_ID", x.get("XGF_USER_ID")); x.put("XGF_USER_DETAILS_ID", x.get("USER_ID"));
x.put("ISDELETE","0"); x.put("ISDELETE","0");
x.put("VALID_FLAG","1");
x.put("STATUS","2");
x.put("CREATED_TIME", DateUtil.getTime());
x.put("OPERATOR_TIME",DateUtil.getTime());
xgfUserMapper.save(x); xgfUserMapper.save(x);
xgfUserDetailsMapper.save(x); xgfUserDetailsMapper.save(x);
} else { } else {
x.put("XGF_USER_ID", x.get("USER_ID")); x.put("XGF_USER_ID", x.get("USER_ID"));
x.put("XGF_USER_DETAILS_ID", x.get("XGF_USER_ID")); x.put("XFG_USER_DETAILS_ID", x.get("USER_ID"));
x.put("ISDELETE","0"); x.put("ISDELETE","0");
x.put("OPERATOR_TIME",DateUtil.getTime());
xgfUserMapper.edit(x); xgfUserMapper.edit(x);
xgfUserDetailsMapper.edit(x); xgfUserDetailsMapper.edit(x);
} }
@ -68,4 +75,23 @@ public class XgfUserServiceImpl implements XgfUserService {
} }
} }
} }
@Override
public void approvalApplication(PageData request) throws Exception {
List<String> list = Arrays.asList(request.getString("xgf_user_ids").split(",")) ;
PageData condition = new PageData();
condition.put("XGF_USER_IDS", list);
List<PageData> entities = xgfUserMapper.listByIds(condition);
for (PageData x : entities) {
x.put("VALID_FLAG","0");
x.put("STATUS","1");
xgfUserMapper.edit(x);
}
PageData pd = new PageData();
pd.put("XGF_USER_ID", request.getString("XGF_USER_ID"));
pd.put("ISDELETE", "1");
xgfUserMapper.edit(pd);
xgfUserDetailsMapper.edit(pd);
}
} }

View File

@ -9,7 +9,7 @@
<!-- 字段 --> <!-- 字段 -->
<sql id="Field"> <sql id="Field">
f.XFG_USER_DETAILS_ID, f.XGF_USER_DETAILS_ID,
f.XGF_USER_ID, f.XGF_USER_ID,
f.XGF_USER_NAME, f.XGF_USER_NAME,
f.BELONG_TO_CORP, f.BELONG_TO_CORP,
@ -55,7 +55,7 @@
<!-- 字段用于新增 --> <!-- 字段用于新增 -->
<sql id="Field2"> <sql id="Field2">
XFG_USER_DETAILS_ID, XGF_USER_DETAILS_ID,
XGF_USER_ID, XGF_USER_ID,
XGF_USER_NAME, XGF_USER_NAME,
BELONG_TO_CORP, BELONG_TO_CORP,
@ -101,8 +101,7 @@
<!-- 字段值 --> <!-- 字段值 -->
<sql id="FieldValue"> <sql id="FieldValue">
#{XFG_USER_DETAILS_ID} #{XGF_USER_DETAILS_ID},
,
#{XGF_USER_ID}, #{XGF_USER_ID},
#{XGF_USER_NAME}, #{XGF_USER_NAME},
#{BELONG_TO_CORP}, #{BELONG_TO_CORP},
@ -172,7 +171,7 @@
update update
<include refid="tableName"></include> <include refid="tableName"></include>
set set
XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID}, XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID},
XGF_USER_ID = #{XGF_USER_ID}, XGF_USER_ID = #{XGF_USER_ID},
XGF_USER_NAME = #{XGF_USER_NAME}, XGF_USER_NAME = #{XGF_USER_NAME},
BELONG_TO_CORP = #{BELONG_TO_CORP}, BELONG_TO_CORP = #{BELONG_TO_CORP},
@ -184,7 +183,7 @@
AGE = #{AGE}, AGE = #{AGE},
HKLOCAL = #{HKLOCAL}, HKLOCAL = #{HKLOCAL},
ADDRESS = #{ADDRESS}, ADDRESS = #{ADDRESS},
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},}, DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME}, DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
CORP_START_DATE = #{CORP_START_DATE}, CORP_START_DATE = #{CORP_START_DATE},
POST_ID = #{POST_ID}, POST_ID = #{POST_ID},
@ -215,7 +214,7 @@
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB}, IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
CORPINFO_ID = #{CORPINFO_ID} CORPINFO_ID = #{CORPINFO_ID}
where where
XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID} XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
</update> </update>
<!-- 通过ID获取数据 --> <!-- 通过ID获取数据 -->

View File

@ -17,7 +17,9 @@
f.BELONG_TO_CORP_NAME, f.BELONG_TO_CORP_NAME,
f.ISDELETE, f.ISDELETE,
f.CREATED_TIME, f.CREATED_TIME,
f.CORPINFO_ID f.CORPINFO_ID,
f.STATUS,
f.OPERATOR_TIME
</sql> </sql>
<!-- 字段用于新增 --> <!-- 字段用于新增 -->
@ -30,7 +32,9 @@
BELONG_TO_CORP_NAME, BELONG_TO_CORP_NAME,
ISDELETE, ISDELETE,
CREATED_TIME, CREATED_TIME,
CORPINFO_ID CORPINFO_ID,
STATUS,
OPERATOR_TIME
</sql> </sql>
<!-- 字段值 --> <!-- 字段值 -->
@ -43,7 +47,9 @@
#{BELONG_TO_CORP_NAME}, #{BELONG_TO_CORP_NAME},
#{ISDELETE}, #{ISDELETE},
#{CREATED_TIME}, #{CREATED_TIME},
#{CORPINFO_ID} #{CORPINFO_ID},
#{STATUS},
#{OPERATOR_TIME}
</sql> </sql>
<!-- 新增--> <!-- 新增-->
@ -79,7 +85,9 @@
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME}, BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
ISDELETE = #{ISDELETE}, ISDELETE = #{ISDELETE},
CREATED_TIME = #{CREATED_TIME}, CREATED_TIME = #{CREATED_TIME},
CORPINFO_ID = #{CORPINFO_ID} CORPINFO_ID = #{CORPINFO_ID},
STATUS = #{STATUS},
OPERATOR_TIME = #{OPERATOR_TIME}
where where
XGF_USER_ID = #{XGF_USER_ID} XGF_USER_ID = #{XGF_USER_ID}
</update> </update>
@ -142,7 +150,7 @@
<include refid="tableName"></include> f <include refid="tableName"></include> f
where f.ISDELETE = '0' where f.ISDELETE = '0'
and XGF_USER_ID in and XGF_USER_ID in
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")"> <foreach item="item" index="index" collection="XGF_USER_IDS" open="(" separator="," close=")">
#{item} #{item}
</foreach> </foreach>
</select> </select>