|
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
@@ -53,6 +54,8 @@ public class RecruitApiController {
|
|
|
@Autowired
|
|
|
private JobInformationInfoService jobInformationInfoService;
|
|
|
@Autowired
|
|
|
+ private JobEnterpriseRelationService jobEnterpriseRelationService;
|
|
|
+ @Autowired
|
|
|
private EnterpriseInfoService enterpriseInfoService;
|
|
|
@Autowired
|
|
|
private ShareWorksInfoService shareWorksInfoService;
|
|
@@ -103,17 +106,23 @@ public class RecruitApiController {
|
|
|
@PostMapping("findRecruitSearch")
|
|
|
@ApiOperation(value = " 首搜索页面查询(公开接口)")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "type", value = "(日结1,周结2,月结3 不传默认最新)", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "status", value = "查询是找工作0找零工1,不传默认找工作0)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "statusType", value = "找工作(日结1,周结2,月结3 不传默认最新)/找零工(最新1,最热2,不传默认最新)", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "content", value = "搜索内容", required = false, paramType = "form"),
|
|
|
- @ApiImplicitParam(name = "salaryStart", value = "薪资待遇起", required = false, paramType = "form"),
|
|
|
- @ApiImplicitParam(name = "salaryEnd", value = "薪资待遇止", required = false, paramType = "form"),
|
|
|
- @ApiImplicitParam(name = "workExp", value = "工作经验(字典表 1无,2半年,3一年,4两年,5三年,6五年,7十年及以上)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "industry", value = "行业(找工作)字典表", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "settlementMethod", value = "结算方式(找工作)字典表", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryForm", value = "薪资形式(找工作)字典表", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryStart", value = "薪资待遇起(找零工)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryEnd", value = "薪资待遇止(找零工)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "workExp", value = "工作经验(字典表 1无,2半年,3一年,4两年,5三年,6五年,7十年及以上)(找零工)", required = false, paramType = "form"),
|
|
|
})
|
|
|
public MessageResult<Map> findRecruitSearch(
|
|
|
- @RequestParam(value="type",defaultValue="") String type,
|
|
|
@RequestParam(value="status",defaultValue="0") String status,
|
|
|
+ @RequestParam(value="statusType",defaultValue="") String statusType,
|
|
|
@RequestParam(value="content",defaultValue="") String content,
|
|
|
+ @RequestParam(value="industry",defaultValue="") String industry,
|
|
|
+ @RequestParam(value="settlementMethod",defaultValue="") String settlementMethod,
|
|
|
+ @RequestParam(value="salaryForm",defaultValue="") String salaryForm,
|
|
|
@RequestParam(value="salaryStart",defaultValue="") String salaryStart,
|
|
|
@RequestParam(value="salaryEnd",defaultValue="") String salaryEnd,
|
|
|
@RequestParam(value="workExp",defaultValue="") String workExp,
|
|
@@ -134,17 +143,19 @@ public class RecruitApiController {
|
|
|
searchParams.put("content","%" + content.trim() + "%");
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(type)) {
|
|
|
- searchParams.put("settlementMethod",type);
|
|
|
+ if (StringUtils.isNotEmpty(statusType)) {
|
|
|
+ searchParams.put("settlementMethod",statusType);
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(salaryStart)) {
|
|
|
- searchParams.put("salaryStart",salaryStart);
|
|
|
+ if (StringUtils.isNotEmpty(industry)) {
|
|
|
+ searchParams.put("industry",industry);
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(salaryEnd)) {
|
|
|
- searchParams.put("salaryEnd",salaryEnd);
|
|
|
+ if (StringUtils.isNotEmpty(settlementMethod)) {
|
|
|
+ searchParams.put("settlementMethod",settlementMethod);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(salaryForm)) {
|
|
|
+ searchParams.put("salaryForm",salaryForm);
|
|
|
}
|
|
|
-
|
|
|
|
|
|
Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
|
|
@@ -157,8 +168,8 @@ public class RecruitApiController {
|
|
|
if (StringUtils.isNotEmpty(content)) {
|
|
|
searchParams.put("content","%" + content.trim() + "%");
|
|
|
}
|
|
|
- if (StringUtils.isNotEmpty(type)) {
|
|
|
- searchParams.put("method",type);
|
|
|
+ if (StringUtils.isNotEmpty(statusType)) {
|
|
|
+ searchParams.put("method",statusType);
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotEmpty(salaryStart)) {
|
|
@@ -215,12 +226,18 @@ public class RecruitApiController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("findJobList")
|
|
|
- @ApiOperation(value = " 临工驿站(公开接口)")
|
|
|
+ @ApiOperation(value = " 弃用-零工驿站(公开接口)")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "type", value = "(日结1,周结2,月结3 不传默认最新)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryStart", value = "薪资待遇起(找零工)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryEnd", value = "薪资待遇止(找零工)", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "workExp", value = "工作经验(字典表 1无,2半年,3一年,4两年,5三年,6五年,7十年及以上)(找零工)", required = false, paramType = "form"),
|
|
|
})
|
|
|
public MessageResult<Map> findJobList(
|
|
|
@RequestParam(value="type",defaultValue="") String type,
|
|
|
+ @RequestParam(value="salaryStart",defaultValue="") String salaryStart,
|
|
|
+ @RequestParam(value="salaryEnd",defaultValue="") String salaryEnd,
|
|
|
+ @RequestParam(value="workExp",defaultValue="") String workExp,
|
|
|
@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
|
MessageResult<Map> messageResult = new MessageResult<>();
|
|
@@ -236,6 +253,17 @@ public class RecruitApiController {
|
|
|
searchParams.put("settlementMethod",type);
|
|
|
}
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(salaryStart)) {
|
|
|
+ searchParams.put("salaryStart",salaryStart);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(salaryEnd)) {
|
|
|
+ searchParams.put("salaryEnd",salaryEnd);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(workExp)) {
|
|
|
+ searchParams.put("workExp",workExp);
|
|
|
+ }
|
|
|
+
|
|
|
Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
|
|
|
recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
@@ -253,8 +281,8 @@ public class RecruitApiController {
|
|
|
return messageResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="createRecruit")
|
|
|
- @RequestMapping(value = "发布招聘信息",method = RequestMethod.POST)
|
|
|
+ @ApiOperation(value="发布招聘信息")
|
|
|
+ @RequestMapping(value = "createRecruit",method = RequestMethod.POST)
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "id", value = "ID(传为修改", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "positionName", value = "职位名称", required = false, paramType = "form"),
|
|
@@ -267,6 +295,7 @@ public class RecruitApiController {
|
|
|
@ApiImplicitParam(name = "contactsPhone", value = "联系电话", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "workArea", value = "工作地区", required = false, paramType = "form"),
|
|
|
@ApiImplicitParam(name = "address", value = "详细地址", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "salaryForm", value = "薪资形式(字典:计件,计时,定额)", required = false, paramType = "form"),
|
|
|
})
|
|
|
public MessageResult<Map> createRecruit(
|
|
|
@RequestParam(value="id",defaultValue="") String id,
|
|
@@ -280,6 +309,7 @@ public class RecruitApiController {
|
|
|
@RequestParam(value="contactsPhone",defaultValue="") String contactsPhone,
|
|
|
@RequestParam(value="workArea",defaultValue="") String workArea,
|
|
|
@RequestParam(value="address",defaultValue="") String address,
|
|
|
+ @RequestParam(value="salaryForm",defaultValue="") String salaryForm,
|
|
|
@RequestAttribute String subject){
|
|
|
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
@@ -311,6 +341,7 @@ public class RecruitApiController {
|
|
|
recruitInformationInfo.setContactsPhone(contactsPhone);
|
|
|
recruitInformationInfo.setWorkArea(workArea);
|
|
|
recruitInformationInfo.setAddress(address);
|
|
|
+ recruitInformationInfo.setSalaryForm(salaryForm);
|
|
|
|
|
|
recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
} else {
|
|
@@ -332,6 +363,7 @@ public class RecruitApiController {
|
|
|
recruitInformationInfo.setContactsPhone(contactsPhone);
|
|
|
recruitInformationInfo.setWorkArea(workArea);
|
|
|
recruitInformationInfo.setAddress(address);
|
|
|
+ recruitInformationInfo.setSalaryForm(salaryForm);
|
|
|
|
|
|
recruitInformationInfoService.insert(recruitInformationInfo);
|
|
|
}
|
|
@@ -346,8 +378,8 @@ public class RecruitApiController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="recruitDetail")
|
|
|
- @RequestMapping(value = "招聘信息详细(免登陆",method = RequestMethod.POST)
|
|
|
+ @ApiOperation(value="招聘信息详细(免登陆")
|
|
|
+ @RequestMapping(value = "recruitDetail",method = RequestMethod.POST)
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "recruitId", value = "招聘信息ID", required = false, paramType = "form"),
|
|
|
})
|
|
@@ -389,6 +421,8 @@ public class RecruitApiController {
|
|
|
returnMap.put("recruitInformationInfo",recruitInformationInfo);
|
|
|
returnMap.put("enterpriseInfo",enterpriseInfo);
|
|
|
returnMap.put("isJoin",isJoin);
|
|
|
+
|
|
|
+ msgResult.setData(returnMap);
|
|
|
msgResult.setResult(true);
|
|
|
}catch (Exception e){
|
|
|
msgResult.setResult(false);
|
|
@@ -463,4 +497,271 @@ public class RecruitApiController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="我的用工管理")
|
|
|
+ @RequestMapping(value = "myEmployment",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "status", value = "发布中1,待审核0,未通过2", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Map> myEmployment(
|
|
|
+ @RequestParam(value="status",defaultValue="1") String status,
|
|
|
+ @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ searchParams.put("enterpriseId",personInfo.getEnterpriseId());
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("a.create_time","desc"));
|
|
|
+
|
|
|
+ Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value="我的用工管理刷新")
|
|
|
+ @RequestMapping(value = "myEmploymentRefresh",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "id", value = "id", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Boolean> myEmploymentRefresh(
|
|
|
+ @RequestParam(value="id",defaultValue="1") String id,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Boolean> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
|
|
|
+ recruitInformationInfo.setUpdateBy(subject);
|
|
|
+ recruitInformationInfo.setUpdateTime(new Date());
|
|
|
+ int count = recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
+ Boolean returnFlag = false;
|
|
|
+ if(count > 0){
|
|
|
+ returnFlag = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(returnFlag);
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value="我的用工管理删除")
|
|
|
+ @RequestMapping(value = "myEmploymentDelete",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "id", value = "id", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Boolean> myEmploymentDelete(
|
|
|
+ @RequestParam(value="id",defaultValue="1") String id,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Boolean> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ Boolean returnFlag = false;
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(id);
|
|
|
+ if(recruitInformationInfo != null) {
|
|
|
+ recruitInformationInfo.setDelFlag(true);
|
|
|
+ recruitInformationInfo.setUpdateBy(subject);
|
|
|
+ recruitInformationInfo.setUpdateTime(new Date());
|
|
|
+ int count = recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
+ if (count > 0) {
|
|
|
+ returnFlag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(returnFlag);
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value="我的收到报名")
|
|
|
+ @RequestMapping(value = "myReceivedRegistration",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "status", value = "收到报名0,邀请记录1", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Map> myReceivedRegistration(
|
|
|
+ @RequestParam(value="status",defaultValue="0") String status,
|
|
|
+ @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("a.create_time","desc"));
|
|
|
+ if("0".equals(status)){
|
|
|
+ searchParams.put("enterpriseId",personInfo.getEnterpriseId());
|
|
|
+
|
|
|
+ Page<RecruitPersonRelation> page = recruitPersonRelationService.pageSearchMobile(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
+ for(RecruitPersonRelation recruitPersonRelation : page.getResult()){
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(recruitPersonRelation.getRecruitInformationId());
|
|
|
+
|
|
|
+ EnterpriseInfo enterpriseInfo = enterpriseInfoService.get(recruitInformationInfo.getEnterpriseId());
|
|
|
+ if(enterpriseInfo!=null){
|
|
|
+ recruitInformationInfo.setEnterpriseName(enterpriseInfo.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ recruitInformationInfo.setIndustryN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",recruitInformationInfo.getIndustry()));
|
|
|
+ recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
|
+
|
|
|
+ recruitPersonRelation.setRecruitInformationInfo(recruitInformationInfo);
|
|
|
+ }
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ }else if("1".equals(status)){
|
|
|
+ searchParams.put("enterpriseId",personInfo.getEnterpriseId());
|
|
|
+
|
|
|
+ Page<JobEnterpriseRelation> page = jobEnterpriseRelationService.pageSearchMobile(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
+ for(JobEnterpriseRelation jobEnterpriseRelation : page.getResult()){
|
|
|
+ JobInformationInfo jobInformationInfo = jobInformationInfoService.get(jobEnterpriseRelation.getJobInformationId());
|
|
|
+ jobInformationInfo.setMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod()));
|
|
|
+ jobEnterpriseRelation.setJobInformationInfo(jobInformationInfo);
|
|
|
+ }
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+ }
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value="我的共享用工")
|
|
|
+ @RequestMapping(value = "myShareWork",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "status", value = "发布中1,待审核0,未通过2", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Map> myShareWork(
|
|
|
+ @RequestParam(value="status",defaultValue="1") String status,
|
|
|
+ @RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("a.create_time","desc"));
|
|
|
+
|
|
|
+ searchParams.put("createBy",subject);
|
|
|
+ searchParams.put("status",status);
|
|
|
+
|
|
|
+ Page<ShareWorksInfo> page = shareWorksInfoService.pageSearchMobile(searchParams, pageIndex, pageSize, true, sortList);
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value="我的共享用工删除")
|
|
|
+ @RequestMapping(value = "myShareWorkDelete",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "id", value = "id", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Boolean> myShareWorkDelete(
|
|
|
+ @RequestParam(value="id",defaultValue="") String id,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Boolean> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+ Boolean returnFlag = false;
|
|
|
+ ShareWorksInfo shareWorksInfo = shareWorksInfoService.get(id);
|
|
|
+ if(shareWorksInfo != null){
|
|
|
+ shareWorksInfo.setDelFlag(true);
|
|
|
+ shareWorksInfo.setUpdateBy(subject);
|
|
|
+ shareWorksInfo.setUpdateTime(new Date());
|
|
|
+ int count = shareWorksInfoService.update(shareWorksInfo);
|
|
|
+ if(count > 0 ){
|
|
|
+ returnFlag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(returnFlag);
|
|
|
+
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|