Commit 0a843df0 by QianQiXiang

解绑记录接口

parent f085a54a
...@@ -41,7 +41,7 @@ public enum ChannelCodeEnum { ...@@ -41,7 +41,7 @@ public enum ChannelCodeEnum {
this.name = name; this.name = name;
} }
public String getNameByCode(int code) { public static String getNameByCode(int code) {
ChannelCodeEnum[] values = ChannelCodeEnum.values(); ChannelCodeEnum[] values = ChannelCodeEnum.values();
for (ChannelCodeEnum channelCodeEnum : values) { for (ChannelCodeEnum channelCodeEnum : values) {
if (channelCodeEnum.getCode() == code) { if (channelCodeEnum.getCode() == code) {
......
...@@ -42,26 +42,20 @@ import java.util.List; ...@@ -42,26 +42,20 @@ import java.util.List;
@RestController @RestController
public class AuditController extends WebBaseController { public class AuditController extends WebBaseController {
private static Logger logger = LoggerFactory.getLogger(AuditController.class); private static final Logger logger = LoggerFactory.getLogger(AuditController.class);
@Autowired @Autowired
private AuditApiService auditApiService; private AuditApiService auditApiService;
@Autowired @Autowired
private StaffClerkRelationApiService staffClerkRelationApiService; private StaffClerkRelationApiService staffClerkRelationApiService;
@Autowired @Autowired
private StaffApiService staffApiService; private StaffApiService staffApiService;
@Autowired @Autowired
private SyncHaobanToGicServiceApi syncHaobanToGicServiceApi; private SyncHaobanToGicServiceApi syncHaobanToGicServiceApi;
@Autowired @Autowired
private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService; private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService;
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired
private ChannelCodeEnum channelCodeEnum;
//关联记录列表 //关联记录列表
...@@ -104,13 +98,15 @@ public class AuditController extends WebBaseController { ...@@ -104,13 +98,15 @@ public class AuditController extends WebBaseController {
//解绑记录列表 //解绑记录列表
@RequestMapping("clerk-unbind-list") @RequestMapping("clerk-unbind-list")
public HaobanResponse staffUnbindList(String wxEnterpriseId, String search, String enterpriseId, @RequestParam(defaultValue = "1") Integer optType, BasePageInfo qo) { public HaobanResponse staffUnbindList(String wxEnterpriseId, String clerkCode, String enterpriseId, @RequestParam(defaultValue = "1") Integer optType, BasePageInfo qo) {
Page<StaffClerkBindLogDetailDTO> page = staffClerkRelationApiService.pageStaffClerkBindLog(wxEnterpriseId, search, enterpriseId, optType, qo); Page<StaffClerkBindLogDetailDTO> page = staffClerkRelationApiService.pageStaffClerkBindLog(wxEnterpriseId, clerkCode, enterpriseId, optType, qo);
List<StaffClerkBindLogDetailDTO> list = page.getResult(); List<StaffClerkBindLogDetailDTO> list = page.getResult();
List<StaffClerkBindLogDetailVO> voList = new ArrayList<StaffClerkBindLogDetailVO>(); List<StaffClerkBindLogDetailVO> voList = new ArrayList<StaffClerkBindLogDetailVO>();
for (StaffClerkBindLogDetailDTO staffClerkBindLogDetailDTO : list) { for (StaffClerkBindLogDetailDTO staffClerkBindLogDetailDTO : list) {
StaffClerkBindLogDetailVO vo = EntityUtil.changeEntityByJSON(StaffClerkBindLogDetailVO.class, staffClerkBindLogDetailDTO); StaffClerkBindLogDetailVO vo = EntityUtil.changeEntityByJSON(StaffClerkBindLogDetailVO.class, staffClerkBindLogDetailDTO);
vo.setUnbindReason(channelCodeEnum.getNameByCode(vo.getChannelCode())); //vo.setUnbindReason(ChannelCodeEnum.getNameByCode(vo.getChannelCode()));
Integer chanel=vo.getChannelCode();
ChannelCodeEnum.getNameByCode(chanel.intValue());
voList.add(vo); voList.add(vo);
} }
Page<StaffClerkBindLogDetailVO> pageVO = new Page<>(); Page<StaffClerkBindLogDetailVO> pageVO = new Page<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment