相关方需求变革
parent
a0dcdb61d3
commit
cfb4c2dd8e
|
@ -25,7 +25,6 @@ public class ApiXgfUserController extends BaseController {
|
|||
public Object synchronizationUserInfo() throws Exception {
|
||||
try {
|
||||
PageData request = this.getPageData();
|
||||
System.out.println(request.getString("infoList"));
|
||||
List<PageData> infoList = Warden.getList(request.getString("infoList"));
|
||||
xgfUserService.init(request);
|
||||
Map<String, Object> response = new HashMap<String, Object>();
|
||||
|
@ -36,4 +35,19 @@ public class ApiXgfUserController extends BaseController {
|
|||
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("系统异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,5 +54,4 @@ public interface XgfUserMapper {
|
|||
* @throws Exception
|
||||
*/
|
||||
public List<PageData> listByIds(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,4 +14,6 @@ public interface XgfUserService {
|
|||
List<PageData> list(Page page) throws Exception;
|
||||
|
||||
void init(PageData request);
|
||||
|
||||
void approvalApplication(PageData request) throws Exception;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,14 @@ import com.zcloud.entity.PageData;
|
|||
import com.zcloud.mapper.datasource.xgf.XgfUserDetailsMapper;
|
||||
import com.zcloud.mapper.datasource.xgf.XgfUserMapper;
|
||||
import com.zcloud.service.xgf.XgfUserService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Warden;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
@ -45,18 +47,23 @@ public class XgfUserServiceImpl implements XgfUserService {
|
|||
try {
|
||||
PageData condition = new PageData();
|
||||
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);
|
||||
if (entity == null || entity.size() <= 0) {
|
||||
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("VALID_FLAG","1");
|
||||
x.put("STATUS","2");
|
||||
x.put("CREATED_TIME", DateUtil.getTime());
|
||||
x.put("OPERATOR_TIME",DateUtil.getTime());
|
||||
xgfUserMapper.save(x);
|
||||
xgfUserDetailsMapper.save(x);
|
||||
} else {
|
||||
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("OPERATOR_TIME",DateUtil.getTime());
|
||||
xgfUserMapper.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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.XFG_USER_DETAILS_ID,
|
||||
f.XGF_USER_DETAILS_ID,
|
||||
f.XGF_USER_ID,
|
||||
f.XGF_USER_NAME,
|
||||
f.BELONG_TO_CORP,
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
XFG_USER_DETAILS_ID,
|
||||
XGF_USER_DETAILS_ID,
|
||||
XGF_USER_ID,
|
||||
XGF_USER_NAME,
|
||||
BELONG_TO_CORP,
|
||||
|
@ -101,8 +101,7 @@
|
|||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{XFG_USER_DETAILS_ID}
|
||||
,
|
||||
#{XGF_USER_DETAILS_ID},
|
||||
#{XGF_USER_ID},
|
||||
#{XGF_USER_NAME},
|
||||
#{BELONG_TO_CORP},
|
||||
|
@ -172,7 +171,7 @@
|
|||
update
|
||||
<include refid="tableName"></include>
|
||||
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_NAME = #{XGF_USER_NAME},
|
||||
BELONG_TO_CORP = #{BELONG_TO_CORP},
|
||||
|
@ -184,7 +183,7 @@
|
|||
AGE = #{AGE},
|
||||
HKLOCAL = #{HKLOCAL},
|
||||
ADDRESS = #{ADDRESS},
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},},
|
||||
DEGREE_OF_EDUCATION = #{DEGREE_OF_EDUCATION},
|
||||
DEGREE_OF_EDUCATION_NAME = #{DEGREE_OF_EDUCATION_NAME},
|
||||
CORP_START_DATE = #{CORP_START_DATE},
|
||||
POST_ID = #{POST_ID},
|
||||
|
@ -215,7 +214,7 @@
|
|||
IS_SPECIAL_JOB = #{IS_SPECIAL_JOB},
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
where
|
||||
XFG_USER_DETAILS_ID = #{XFG_USER_DETAILS_ID}
|
||||
XGF_USER_DETAILS_ID = #{XGF_USER_DETAILS_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
f.BELONG_TO_CORP_NAME,
|
||||
f.ISDELETE,
|
||||
f.CREATED_TIME,
|
||||
f.CORPINFO_ID
|
||||
f.CORPINFO_ID,
|
||||
f.STATUS,
|
||||
f.OPERATOR_TIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -30,7 +32,9 @@
|
|||
BELONG_TO_CORP_NAME,
|
||||
ISDELETE,
|
||||
CREATED_TIME,
|
||||
CORPINFO_ID
|
||||
CORPINFO_ID,
|
||||
STATUS,
|
||||
OPERATOR_TIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -43,7 +47,9 @@
|
|||
#{BELONG_TO_CORP_NAME},
|
||||
#{ISDELETE},
|
||||
#{CREATED_TIME},
|
||||
#{CORPINFO_ID}
|
||||
#{CORPINFO_ID},
|
||||
#{STATUS},
|
||||
#{OPERATOR_TIME}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
|
@ -79,7 +85,9 @@
|
|||
BELONG_TO_CORP_NAME = #{BELONG_TO_CORP_NAME},
|
||||
ISDELETE = #{ISDELETE},
|
||||
CREATED_TIME = #{CREATED_TIME},
|
||||
CORPINFO_ID = #{CORPINFO_ID}
|
||||
CORPINFO_ID = #{CORPINFO_ID},
|
||||
STATUS = #{STATUS},
|
||||
OPERATOR_TIME = #{OPERATOR_TIME}
|
||||
where
|
||||
XGF_USER_ID = #{XGF_USER_ID}
|
||||
</update>
|
||||
|
@ -142,7 +150,7 @@
|
|||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
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}
|
||||
</foreach>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue