Commit 37dc6945 by 徐高华

Merge branch 'feature/xgh/11月零散迭代' into 'master'

Feature/xgh/11月零散迭代

See merge request !2318
parents 902aed41 b1484c5c
...@@ -24,6 +24,7 @@ import com.gic.haoban.manage.api.service.StaffApiService; ...@@ -24,6 +24,7 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.chat.GroupChatApiService; import com.gic.haoban.manage.api.service.chat.GroupChatApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.log.LogRecordUserServiceImpl; import com.gic.haoban.manage.web.log.LogRecordUserServiceImpl;
import com.gic.haoban.manage.web.vo.chat.GroupChatUserExcelVO;
import com.gic.haoban.manage.web.vo.chat.GroupChatUserQuitVO; import com.gic.haoban.manage.web.vo.chat.GroupChatUserQuitVO;
import com.gic.log.record.anno.GicLogRecord; import com.gic.log.record.anno.GicLogRecord;
import com.gic.log.record.util.GicLogRecordCategoryEnum; import com.gic.log.record.util.GicLogRecordCategoryEnum;
...@@ -48,11 +49,7 @@ import java.util.Date; ...@@ -48,11 +49,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* * 企微群
* @ClassName: GroupChatController
* @Description: 群
* @author xugh
* @date 2022年11月26日 上午9:32:56
* *
*/ */
@RestController @RestController
...@@ -153,6 +150,67 @@ public class GroupChatController { ...@@ -153,6 +150,67 @@ public class GroupChatController {
return RestResponse.successResult(page.getResult()); return RestResponse.successResult(page.getResult());
} }
/**
* 群详情导出
*/
@RequestMapping("user/detail/excel")
public RestResponse<Boolean> detailExcel(HttpServletRequest request, HttpServletResponse response,GroupChatUserSearchQDTO qdto) {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
qdto.setWxEnterpriseId(loginUser.getWxEnterpriseId());
qdto.setEnterpriseId(loginUser.getEnterpriseId());
BasePageInfo basePageInfo = new BasePageInfo() ;
basePageInfo.setPageNum(1);
basePageInfo.setPageSize(1000);
ServiceResponse<Page<GroupChatUserDTO>> resp = this.groupChatApiService.listUserPage(qdto, basePageInfo);
Long groupChatId = qdto.getGroupChatId() ;
ServiceResponse<GroupChatDTO> detailResp = this.groupChatApiService.detail(loginUser.getWxEnterpriseId(),groupChatId);
List<GroupChatUserDTO> list = resp.getResult().getResult() ;
if(CollectionUtils.isEmpty(list)) {
return RestResponse.failure("9999","无相关群成员");
}
String s = DateUtil.formatString(new Date(), DateUtil.FORMAT_DATE_10);
String fileName = "客户群成员-"+detailResp.getResult().getName()+"-"+s;
List<String> titleList = Arrays.asList("群成员名称", "群成员昵称", "身份", "入群方式", "入群时间");
List<String> fileList = Arrays.asList("userName","nickName","userTypeExcel", "sceneExcel", "addTimeExcel");
List<GroupChatUserExcelVO> voList = new ArrayList<>() ;
for (GroupChatUserDTO dto : list) {
GroupChatUserExcelVO vo = EntityUtil.changeEntityByJSON(GroupChatUserExcelVO.class,dto) ;
vo.setAddTimeExcel(DateUtil.dateToStr(dto.getJoinTime() , "yyyy-MM-dd HH:mm:ss"));
if(dto.getUserType()==1) {
vo.setUserTypeExcel("企业成员");
}else if(dto.getUserType()==2) {
vo.setUserTypeExcel("外部成员");
}else {
vo.setUserTypeExcel("客户");
}
Integer joinScene = dto.getJoinScene() ;
if(null != joinScene) {
String invitor_user_name = dto.getInvitorUserName() ;
if(StringUtils.isBlank(invitor_user_name)) {
invitor_user_name = "群成员" ;
}
if(joinScene==1) {
// 由群成员邀请入群(直接邀请入群)
vo.setSceneExcel(String.format("由%s直接邀请入群",invitor_user_name));
}else if(joinScene==2) {
// 由群成员邀请入群(通过邀请链接入群)
vo.setSceneExcel(String.format("通过%s分享链接入群",invitor_user_name));
}else if(joinScene==3) {
// 通过扫描群二维码入群
vo.setSceneExcel(String.format("通过扫描%s分享的二维码入群",invitor_user_name));
}
voList.add(vo) ;
}
}
try {
ExcelUtils.xls(response, request, fileName, voList, fileList, titleList);
} catch (Exception e) {
logger.info("异常",e);
logger.info("导出失败");
}
return RestResponse.successResult(true);
}
@RequestMapping("user/quit/excel") @RequestMapping("user/quit/excel")
public RestResponse<Boolean> excel(HttpServletRequest request, HttpServletResponse response,String searchParams,Integer userType, public RestResponse<Boolean> excel(HttpServletRequest request, HttpServletResponse response,String searchParams,Integer userType,
......
package com.gic.haoban.manage.web.vo.chat;
import java.io.Serializable;
/**
*
* @ClassName: TabHaobanGroupChatUser
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:42:52
* @Modify
* @CopyRight
*/
public class GroupChatUserExcelVO implements Serializable {
private static final long serialVersionUID = 21771431486600L;
/**
* 1企业成员2外部联系人3客户
*/
private String userTypeExcel;
/**
* 姓名
*/
private String userName;
/**
* 昵称
*/
private String nickName;
private String sceneExcel;
private String addTimeExcel;
public String getUserTypeExcel() {
return userTypeExcel;
}
public void setUserTypeExcel(String userTypeExcel) {
this.userTypeExcel = userTypeExcel;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getSceneExcel() {
return sceneExcel;
}
public void setSceneExcel(String sceneExcel) {
this.sceneExcel = sceneExcel;
}
public String getAddTimeExcel() {
return addTimeExcel;
}
public void setAddTimeExcel(String addTimeExcel) {
this.addTimeExcel = addTimeExcel;
}
}
\ No newline at end of file
...@@ -119,7 +119,10 @@ public class UploadController extends WebBaseController { ...@@ -119,7 +119,10 @@ public class UploadController extends WebBaseController {
if(name.contains(".")) { if(name.contains(".")) {
suffix = name.substring(name.lastIndexOf(".")+1) ; suffix = name.substring(name.lastIndexOf(".")+1) ;
} }
logger.info("后缀={}",suffix); logger.info("后缀={},{},fileName={}",suffix,name,fileName);
if(StringUtils.isBlank(suffix) && fileName.contains(".")) {
suffix = fileName.substring(name.lastIndexOf(".")+1) ;
}
CloudFileTypeEnum cloudFileTypeEnum = CloudFileTypeEnum.OTHER; CloudFileTypeEnum cloudFileTypeEnum = CloudFileTypeEnum.OTHER;
if (UploadUtils.isPicture(suffix)) { if (UploadUtils.isPicture(suffix)) {
cloudFileTypeEnum = CloudFileTypeEnum.IMAGE; cloudFileTypeEnum = CloudFileTypeEnum.IMAGE;
......
...@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse; import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.manage.web.qo.offline.PageOfflinePreQO; import com.gic.haoban.manage.web.qo.offline.PageOfflinePreQO;
import com.gic.haoban.manage.web.qo.offline.WriteOffOfflinePreQO; import com.gic.haoban.manage.web.qo.offline.WriteOffOfflinePreQO;
...@@ -16,18 +18,23 @@ import com.gic.marketing.pro.api.qdto.offline.PageOfflinePreQDTO; ...@@ -16,18 +18,23 @@ import com.gic.marketing.pro.api.qdto.offline.PageOfflinePreQDTO;
import com.gic.marketing.pro.api.qdto.offline.WriteOffOfflinePreQDTO; import com.gic.marketing.pro.api.qdto.offline.WriteOffOfflinePreQDTO;
import com.gic.marketing.pro.api.service.offline.OfflinePreApiService; import com.gic.marketing.pro.api.service.offline.OfflinePreApiService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.List;
/** /**
* 好办小程序-线下预约 * 好办小程序-线下预约
*/ */
@Controller @Controller
public class OfflinePreController { public class OfflinePreController {
private final Logger logger = LogManager.getLogger(this.getClass());
@Autowired @Autowired
private OfflinePreApiService offlinePreApiService; private OfflinePreApiService offlinePreApiService;
...@@ -39,11 +46,48 @@ public class OfflinePreController { ...@@ -39,11 +46,48 @@ public class OfflinePreController {
@RequestMapping("/page-offline-pre") @RequestMapping("/page-offline-pre")
@ResponseBody @ResponseBody
public RestResponse<Page<OfflinePreInfoVO>> pageOfflinePre(@RequestBody PageOfflinePreQO qo){ public RestResponse<Page<OfflinePreInfoVO>> pageOfflinePre(@RequestBody PageOfflinePreQO qo){
ServiceResponse<Page<OfflinePreInfoDTO>> resp = offlinePreApiService.pageOfflinePre(JSONObject.parseObject(JSONObject.toJSONString(qo), PageOfflinePreQDTO.class));
ServiceResponse<Page<OfflinePreInfoDTO>> offlinePreInfoDTO = offlinePreApiService.pageOfflinePre(JSONObject.parseObject(JSONObject.toJSONString(qo), PageOfflinePreQDTO.class)); Page<OfflinePreInfoVO> pageVO = new Page<>() ;
return JSONObject.parseObject(JSONObject.toJSONString(offlinePreInfoDTO, SerializerFeature.WriteMapNullValue), RestResponse.class); pageVO.setCurrentPage(resp.getResult().getCurrentPage());
pageVO.setTotalCount(resp.getResult().getTotalCount());
pageVO.setPageSize(resp.getResult().getPageSize());
if(null != resp.getResult() && null != resp.getResult().getResult()) {
List<OfflinePreInfoDTO> list = resp.getResult().getResult() ;
List<OfflinePreInfoVO> voList = new ArrayList<>() ;
for(OfflinePreInfoDTO dto : list) {
OfflinePreInfoVO vo = EntityUtil.changeEntityByJSON(OfflinePreInfoVO.class,dto) ;
if(null != qo.getType()) {
if(qo.getType()==1) {
if ((dto.getPreTime().getTime() < System.currentTimeMillis() || this.getAheadSignFlag(dto.getAheadSignFlag()) == 1)
&& DateUtil.getStartTimeOfDay(dto.getPreTime()).getTime() >= DateUtil.getStartTimeOfDay().getTime()) {
vo.setCanSign(1);
} else {
if (DateUtil.getStartTimeOfDay(dto.getPreTime()).getTime() < DateUtil.getStartTimeOfDay().getTime()) {
logger.info("已过期");
continue;
} else if (this.getAheadSignFlag(dto.getAheadSignFlag()) == 0 && dto.getPreTime().getTime() > System.currentTimeMillis()) {
vo.setReason("不可提前签到");
}
}
}
if(qo.getType()==2) {
if(dto.getStatusFlag() ==0) {
vo.setStatusFlag(2);
}
}
}
voList.add(vo) ;
}
pageVO.setResult(voList);
}
return RestResponse.successResult(pageVO) ;
}
private int getAheadSignFlag(Integer flag) {
if(null == flag) {
return 1 ;
}
return flag ;
} }
/** /**
* 获取预约详情 * 获取预约详情
* @param offlinePreId 预约ID * @param offlinePreId 预约ID
......
...@@ -498,6 +498,9 @@ public class GicOrderController { ...@@ -498,6 +498,9 @@ public class GicOrderController {
public OrderDetailVO getOrderDetail(String enterpriseId, OrderInfoDTO orderInfo, public OrderDetailVO getOrderDetail(String enterpriseId, OrderInfoDTO orderInfo,
List<ListOrderItemDTO> orderItemDTOList, String storeId) { List<ListOrderItemDTO> orderItemDTOList, String storeId) {
OrderDetailVO orderDetailVO = EntityUtil.changeEntityByJSON(OrderDetailVO.class, orderInfo); OrderDetailVO orderDetailVO = EntityUtil.changeEntityByJSON(OrderDetailVO.class, orderInfo);
if(null != orderInfo.getPickUpDetail()) {
orderDetailVO.setPickUpReserveTime(orderInfo.getPickUpDetail().getGoodsTime());
}
orderDetailVO.setUsePoint(orderInfo.getUsePoints()); orderDetailVO.setUsePoint(orderInfo.getUsePoints());
orderDetailVO.setBuyerRemark(orderInfo.getRemarks()); orderDetailVO.setBuyerRemark(orderInfo.getRemarks());
List<OrderDetailItemVO> orderItemList = EntityUtil.changeEntityListNew(OrderDetailItemVO.class, List<OrderDetailItemVO> orderItemList = EntityUtil.changeEntityListNew(OrderDetailItemVO.class,
......
...@@ -156,6 +156,56 @@ public class OfflinePreInfoVO implements Serializable { ...@@ -156,6 +156,56 @@ public class OfflinePreInfoVO implements Serializable {
*/ */
private Integer writeOffExchangeNum; private Integer writeOffExchangeNum;
// '支持提前签到1是0否' ,
private Integer aheadSignFlag = 1 ;
private String imgIntegral ;
private String imgCoupon ;
// 是否可以签到
private int canSign ;
// 不能签到原因
private String reason ;
public Integer getAheadSignFlag() {
return aheadSignFlag;
}
public void setAheadSignFlag(Integer aheadSignFlag) {
this.aheadSignFlag = aheadSignFlag;
}
public String getImgIntegral() {
return imgIntegral;
}
public void setImgIntegral(String imgIntegral) {
this.imgIntegral = imgIntegral;
}
public String getImgCoupon() {
return imgCoupon;
}
public void setImgCoupon(String imgCoupon) {
this.imgCoupon = imgCoupon;
}
public int getCanSign() {
return canSign;
}
public void setCanSign(int canSign) {
this.canSign = canSign;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public Integer getWriteOffExchangeNum() { public Integer getWriteOffExchangeNum() {
return writeOffExchangeNum; return writeOffExchangeNum;
} }
......
...@@ -128,6 +128,16 @@ public class OrderDetailVO implements Serializable { ...@@ -128,6 +128,16 @@ public class OrderDetailVO implements Serializable {
* 自提时间 * 自提时间
*/ */
private Date pickUpTime; private Date pickUpTime;
/**
* 自提截止时间
*/
private Date pickUpOverTime ;
/**
* 自提预约时间
*/
private String pickUpReserveTime ;
// 核销码 // 核销码
private String writeOffCode ; private String writeOffCode ;
...@@ -139,7 +149,23 @@ public class OrderDetailVO implements Serializable { ...@@ -139,7 +149,23 @@ public class OrderDetailVO implements Serializable {
// 物流包裹列表 // 物流包裹列表
private List<String> orderLogisticsIdList ; private List<String> orderLogisticsIdList ;
public String getPickUpReserveTime() {
return pickUpReserveTime;
}
public void setPickUpReserveTime(String pickUpReserveTime) {
this.pickUpReserveTime = pickUpReserveTime;
}
public Date getPickUpOverTime() {
return pickUpOverTime;
}
public void setPickUpOverTime(Date pickUpOverTime) {
this.pickUpOverTime = pickUpOverTime;
}
public Integer getUsePoint() { public Integer getUsePoint() {
return usePoint; return usePoint;
} }
......
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