编制模块修改
parent
a52ef7ecb2
commit
498da847b3
@ -0,0 +1,13 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 10:21 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/staff/out")
|
||||
public class StaffOutController extends com.engine.organization.web.StaffOutController {
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.engine.organization.entity.staff.param;
|
||||
|
||||
import com.engine.organization.enums.StaffChangeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 11:02 AM
|
||||
* @Description:
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class StaffOutParam {
|
||||
|
||||
private StaffChangeEnum type;
|
||||
|
||||
private Integer planId;
|
||||
|
||||
private Integer company;
|
||||
|
||||
private Integer department;
|
||||
|
||||
private Integer job;
|
||||
|
||||
private Integer num;
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.engine.organization.entity.staff.param;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 2:03 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class TransactionParam {
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.engine.organization.enums;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 1:50 PM
|
||||
* @Description: 编制变更枚举
|
||||
* @Version 1.0
|
||||
*/
|
||||
public enum StaffChangeEnum {
|
||||
|
||||
ADD(0, "增加"),
|
||||
|
||||
REDUCE(1, "减少");
|
||||
|
||||
private Integer value;
|
||||
|
||||
private String desc;
|
||||
|
||||
StaffChangeEnum(Integer value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.staff.param.StaffOutParam;
|
||||
import com.engine.organization.entity.staff.param.TransactionParam;
|
||||
import com.engine.organization.service.StaffOutService;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 10:27 AM
|
||||
* @Description: 编制外部调用
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class StaffOutServiceImpl extends Service implements StaffOutService {
|
||||
|
||||
|
||||
@Override
|
||||
public Integer changeStaff(StaffOutParam staffOutParam) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer transactionOnJob(TransactionParam transactionParam) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.staff.param.StaffOutParam;
|
||||
import com.engine.organization.entity.staff.param.StaffSearchParam;
|
||||
import com.engine.organization.entity.staff.param.TransactionParam;
|
||||
import com.engine.organization.service.StaffOutService;
|
||||
import com.engine.organization.service.impl.StaffOutServiceImpl;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/1 10:19 AM
|
||||
* @Description: 编制外部调用
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class StaffOutController {
|
||||
|
||||
public StaffOutService staffOutService(User user) {
|
||||
return ServiceUtil.getService(StaffOutServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/change")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult changeStaff(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody StaffOutParam staffOutParam) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(staffOutService(user).changeStaff(staffOutParam));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/transaction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult transactionOnJob(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TransactionParam transactionParam) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(staffOutService(user).transactionOnJob(transactionParam));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue