Java8->Java17(一)

This commit is contained in:
DB 2024-04-23 14:39:14 +08:00
parent e489bde765
commit 69dbc94b48
109 changed files with 1477 additions and 4237 deletions

View File

@ -7,9 +7,6 @@ import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

View File

@ -5,13 +5,11 @@ import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 小程序用户-系统用户中间表 实体类
*

View File

@ -63,17 +63,4 @@ public class CpopApiTests {
System.out.println(geocoder);
}
/**
* 新增租户
* @author DB
* @since 2024/2/28
*/
@Test
public void insertTenant() throws IOException, IllegalAccessException {
com.alibaba.fastjson2.JSONObject jsonObject = SpringUtils.getBean(CpopSignatureUtils.class).sendSignaturePost("http://localhost:9440/Jambox-System/api/tenant/insertTenant",
new ApiTenantRequest().setName("测试租户").setIsSuper(false), "100");
System.out.println(jsonObject);
}
}

View File

@ -1,55 +0,0 @@
package com.cpop.oam.web;
import com.alibaba.fastjson.JSONObject;
import com.cpop.api.tencent.location.handler.TencentLocationHandler;
import com.cpop.core.utils.SpringUtils;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.Db;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.core.row.RowKey;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDateTime;
/**
* @author DB
* @version 1.0.0
* @since 2024-02-21 14:44
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CpopClueTests {
@Test
public void insertClue() {
LocalDateTime now = LocalDateTime.now();
//添加线索以及
Row clue = Row.ofKey(RowKey.SNOW_FLAKE_ID);
clue.set("store_id","81892317270687744");
//校区城市
JSONObject geocoder = SpringUtils.getBean(TencentLocationHandler.class).geocoder("113.93041", "22.53332", "UGLBZ-LBF3I-ETCGO-UUH5X-QDV45-3LFKA");
if (geocoder.getInteger("status") == 0){
clue.set("city",geocoder.getJSONObject("result").getJSONObject("ad_info").getString("city"));
}
clue.set("clue_status",0);
clue.set("create_time", now);
clue.set("update_time", now);
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
clue.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId());
clue.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId());
Db.insert("cp_oam_clue",clue);
//录入记录
Row clueRecord = Row.ofKey(RowKey.SNOW_FLAKE_ID);
clueRecord.set("clue_id",clue.getString("id"));
clueRecord.set("record_type",0);
clueRecord.set("record_content", "机构负责人" + "测试" + "创建线索");
clueRecord.set("record_staff_id", "1");
clueRecord.set("create_time", now);
clueRecord.set("update_time", now);
clueRecord.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId());
clueRecord.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId());
Db.insert("cp_oam_clue_record",clueRecord);
}
}

View File

@ -1,117 +0,0 @@
package com.cpop.oam.web;
import cn.hutool.core.util.IdUtil;
import com.cpop.core.base.enums.OperationLogEnum;
import com.cpop.core.base.enums.UserType;
import com.cpop.core.utils.RsaUtils;
import com.cpop.core.utils.SpringUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.util.Map;
/**
* @author DB
* @Description: RockBlade核心功能测试
* @create 2023-08-27 11:11
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CpopCoreTests {
@Autowired
private CoreService coreService;
@Autowired
private RsaUtils rsaUtils;
/**
* @Description: 添加操作日志
* @param
* @return
* @Author DB
* @Date: 2023/8/27 11:11
*/
@Test
public void insertOperationLog() {
LoginUser loginUser = new LoginUser();
loginUser.setIpAddr("localhost")
.setUserId("1")
.setUserName("RockBlade");
coreService.insertOperationLog(200, OperationLogEnum.SYSTEM_LOGIN, loginUser, null);
}
/**
* @Description: 根据用户名获取用户信息
* @param
* @return
* @Author DB
* @Date: 2023/8/27 23:46
*/
@Test
public void loadUserByUsername() {
System.out.println(coreService.getSysUserByUsername("RockBlade", UserType.OAM_USER));
}
/**
* 初始化密钥对
*/
@Test
public void initKeyPair() {
Map<String, String> keyPairMap = rsaUtils.initKeyPair();
String publicKey = keyPairMap.get("publicKey");
String privateKey = keyPairMap.get("privateKey");
System.out.println("公钥:");
System.out.println(publicKey);
System.out.println();
System.out.println("私钥:");
System.out.println(privateKey);
System.out.println();
String source = "jambox5772";
System.out.println("待加密字符串:"+source);
System.out.println();
String strEncrypt = rsaUtils.encrypt(source);
System.out.println("加密后的字符串:");
System.out.println(strEncrypt);
System.out.println();
String strDecrypt = rsaUtils.decrypt(strEncrypt);
System.out.println("解密后的字符串:");
System.out.println(strDecrypt);
//加密
String encode = SpringUtils.getBean(PasswordEncoder.class).encode("Admin@123");
System.out.println("encode加密"+encode);
}
/**
* 初始化密钥对
*/
@Test
public void initPublicOrPrivateKey() {
String snowflakeNextIdStr = IdUtil.getSnowflakeNextIdStr();
String baseKeyRepository = "E:\\KeyRepository\\";
String publicKeyFile = baseKeyRepository + "publicKey" + snowflakeNextIdStr;
String privateKeyFile = baseKeyRepository + "privateKey" + snowflakeNextIdStr;
Map<String, String> keyPairMap = rsaUtils.initKeyPair(publicKeyFile, privateKeyFile);
String publicKey = keyPairMap.get("publicKey");
String privateKey = keyPairMap.get("privateKey");
System.out.println("公钥:");
System.out.println(publicKey);
System.out.println();
System.out.println("私钥:");
System.out.println(privateKey);
System.out.println();
String source = "Admin@123";
System.out.println("待加密字符串:" + source);
System.out.println();
String strEncrypt = rsaUtils.encrypt(source);
System.out.println("加密后的字符串:");
System.out.println(strEncrypt);
System.out.println();
String strDecrypt = rsaUtils.decrypt(strEncrypt);
System.out.println("解密后的字符串:");
System.out.println(strDecrypt);
//加密
String encode = SpringUtils.getBean(PasswordEncoder.class).encode("Admin@123");
System.out.println("encode加密" + encode);
}
}

View File

@ -1,52 +1,7 @@
package com.cpop.oam.web;
import com.cpop.api.cloudDb.core.dto.CloudStoreActiveDto;
import com.cpop.api.cloudDb.handler.CloudStoreHandler;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.utils.SpringUtils;
import com.cpop.jambox.business.entity.*;
import com.cpop.jambox.business.service.*;
import com.cpop.oam.business.entity.Clue;
import com.cpop.oam.business.entity.Task;
import com.cpop.oam.business.entity.TaskWorkOrder;
import com.cpop.oam.business.mapper.TaskWorkOrderMapper;
import com.cpop.oam.business.service.ClueService;
import com.cpop.oam.business.service.TaskService;
import com.cpop.system.business.entity.Store;
import com.cpop.system.business.entity.StoreSign;
import com.cpop.system.business.mapper.StoreMapper;
import com.cpop.system.business.service.StoreService;
import com.cpop.system.business.service.StoreSignService;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.Db;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.core.row.RowUtil;
import com.mybatisflex.core.update.UpdateChain;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.transaction.annotation.Transactional;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
import static com.cpop.oam.business.entity.table.TaskTableDef.TASK;
import static com.cpop.oam.business.entity.table.TaskWorkOrderTableDef.TASK_WORK_ORDER;
import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
import static com.mybatisflex.core.query.QueryMethods.count;
import static com.mybatisflex.core.query.QueryMethods.max;
/**
* @author DB
@ -55,6 +10,7 @@ import static com.mybatisflex.core.query.QueryMethods.max;
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles(profiles = {"prod", "core", "pay"})
@Deprecated
public class CpopDataSyncTests {
/**
@ -62,7 +18,7 @@ public class CpopDataSyncTests {
* @author DB
* @since 2024/1/16
*/
@Test
/*@Test
public void syncStoreInfo(){
List<Row> rowList;
try {
@ -89,11 +45,11 @@ public class CpopDataSyncTests {
SpringUtils.getBean(StoreService.class).updateBatch(storeList);
}
/**
*//**
* 同步课卡模板
* @author DB
* @since 2024/1/17
*/
*//*
@Test
public void syncCardTemplate(){
List<Row> rowList;
@ -212,14 +168,14 @@ public class CpopDataSyncTests {
}
}
/**
*//**
* 同步校区签约
* @author DB
* @since 2024/1/18
*/
*//*
@Test
public void syncOldStoreSignData() {
/*List<Row> rowList;
*//*List<Row> rowList;
try {
DataSourceKey.use("jambox");
rowList = DbChain.table("OAM_data_sign")
@ -256,7 +212,7 @@ public class CpopDataSyncTests {
}
}
storeSigns.add(storeSign);
});*/
});*//*
SpringUtils.getBean(StoreService.class).updateChain()
.set(STORE.SIGN_ID, null)
@ -288,9 +244,9 @@ public class CpopDataSyncTests {
System.out.println(input.replaceAll(pattern, ""));
}
/**
*//**
* 同步校区签约数据
*/
*//*
@Test
public void syncStoreSignData(){
List<StoreSign> list = SpringUtils.getBean(StoreSignService.class).list();
@ -304,11 +260,11 @@ public class CpopDataSyncTests {
SpringUtils.getBean(StoreService.class).updateBatch(stores);
}
/**
*//**
* 删除没有云校区的数据
* @author DB
* @since 2024/1/23
*/
*//*
@Test
public void removeNotHaveCloudStore() {
StoreService storeService = SpringUtils.getBean(StoreService.class);
@ -383,11 +339,11 @@ public class CpopDataSyncTests {
SpringUtils.getBean(ClueService.class).saveBatch(clues);
}
/**
*//**
* 导入校区活跃数
* @author DB
* @since 2024/4/12
*/
*//*
@Test
@Transactional(rollbackFor = Exception.class)
public void importStoreActiveData(){
@ -403,5 +359,5 @@ public class CpopDataSyncTests {
SpringUtils.getBean(StoreActiveService.class).saveBatch(storeActives);
}
}
}
}*/
}

View File

@ -1,6 +1,5 @@
package com.cpop.oam.web;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cpop.api.cloudDb.core.constant.CloudDbUrl;
import com.cpop.core.utils.SpringUtils;
@ -9,8 +8,10 @@ import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.*;
import com.mybatisflex.core.row.Db;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.core.row.RowKey;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@ -39,6 +40,7 @@ public class CpopEasyLearnDataAnalyseTest{
*/
@Test
public void insertLearnNowPayLaterData() throws WxPayException {
//TODO查询数据
try {
//查询旧表
DataSourceKey.use("jambox");
@ -56,7 +58,7 @@ public class CpopEasyLearnDataAnalyseTest{
.list();
List<Row> insertList = new ArrayList<>();
list.forEach(item->{
WxPayService wxPayService = wxPayHandler.getWxPayService(null, item.getString("subMchId"));
WxPayService wxPayService = wxPayHandler.getServiceWxPayService();
try {
WxPayOrderQueryResult wxPayOrderQueryResult = wxPayService.queryOrder(item.getString("transactionId"), null);
String[] split = wxPayOrderQueryResult.getAttach().split("\\|");

View File

@ -1,58 +1,10 @@
package com.cpop.oam.web;
import cn.binarywang.wx.miniapp.api.WxMaQrcodeService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.utils.StringUtils;
import com.cpop.system.framework.enums.OrderSource;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.file.FileUtils;
import com.cpop.jambox.business.entity.EasyLearnOrder;
import com.cpop.jambox.business.entity.StoreExtend;
import com.cpop.jambox.business.service.EasyLearnOrderService;
import com.cpop.jambox.business.service.StoreExtendService;
import com.cpop.jambox.framework.constant.JamboxCloudUrl;
import com.cpop.pay.framewok.config.wxPay.WxPayProperties;
import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
import com.github.binarywang.wxpay.bean.payscore.*;
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingBillV3Request;
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingRequest;
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult;
import com.github.binarywang.wxpay.bean.request.WxPayApplyTradeBillV3Request;
import com.github.binarywang.wxpay.bean.request.WxPayOrderQueryRequest;
import com.github.binarywang.wxpay.bean.request.WxPayPartnerOrderCloseV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayApplyBillV3Result;
import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.ProfitSharingService;
import com.github.binarywang.wxpay.service.WxPayService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.Db;
import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.core.row.RowKey;
import com.qcloud.cos.model.UploadResult;
import me.chanjar.weixin.common.error.WxErrorException;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.cpop.jambox.business.entity.table.EasyLearnOrderTableDef.EASY_LEARN_ORDER;
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
/**
* @author DB
@ -61,33 +13,31 @@ import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EX
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles({"dev", "core", "jambox", "pay"})
@Deprecated
public class CpopEasyLearnTest {
@Autowired
private WxPayService wxPayService;
@Autowired
private WxPayProperties wxPayProperties;
@Autowired
private WxPayHandler wxPayHandler;
/**
/* *//**
* 关闭订单一次性支付
* @author DB
* @since 2023/12/29
*/
*//*
@Test
public void finishOncePay() throws WxPayException {
String outTradeNo = "97973645262987264";
/*String transactionId = "4200002093202312282215936862";
*//*String transactionId = "4200002093202312282215936862";
ProfitSharingFinishRequest profitSharingFinishRequest = new ProfitSharingFinishRequest();
profitSharingFinishRequest.setTransactionId(transactionId);
profitSharingFinishRequest.setOutOrderNo(outTradeNo);
profitSharingFinishRequest.setDescription("结束分账");
profitSharingFinishRequest.setSubMchId("1661323640");
//结束分账
wxPayService.getProfitSharingService().profitSharingFinish(profitSharingFinishRequest);*/
wxPayService.getProfitSharingService().profitSharingFinish(profitSharingFinishRequest);*//*
//完结订单
WxPayConfig wxPayConfig = wxPayService.getConfig();
wxPayConfig.setSubMchId("1661323640");
@ -95,11 +45,11 @@ public class CpopEasyLearnTest {
wxPayService.closeOrder(outTradeNo);
}
/**
*//**
* 放心学一次性支付
* @author DB
* @since 2023/12/29
*/
*//*
@Test
public void easyLearnOncePay(){
String orderId = "97976926051770368";
@ -139,14 +89,14 @@ public class CpopEasyLearnTest {
.where(EASY_LEARN_ORDER.ID.eq(orderId)).update();
}
/**
*//**
* 构建分账请求参数
* @author DB
* @since 2023/12/28
* @param orderId 订单号
* @param orderSource 订单来源
* @return ProfitSharingRequest
*/
*//*
private ProfitSharingRequest buildProfitSharingRequest(String orderId, OrderSource orderSource, Integer totalFee, String subMchId, String transactionId) {
LocalDateTime now = LocalDateTime.now();
Double ceil = Math.ceil(totalFee * orderSource.getRate());
@ -178,14 +128,14 @@ public class CpopEasyLearnTest {
return profitSharingRequest;
}
/**
*//**
* 微信支付分账
* @author DB
* @since 2023/11/03 11:09
* @param profitSharingRequest 请求参数
* @param wxPayService 微信服务类
* @param flag 标记
*/
*//*
private void wxPayProfitSharing(ProfitSharingRequest profitSharingRequest, WxPayService wxPayService, Integer flag, OrderSource orderSource) {
try {
ProfitSharingResult profitSharingResult = wxPayService.getProfitSharingService().profitSharing(profitSharingRequest);
@ -217,11 +167,11 @@ public class CpopEasyLearnTest {
}
}
/**
*//**
* 关闭服务商订单
* @author DB
* @since 2024/1/12
*/
*//*
@Test
public void closePartnerOrderV3() throws WxPayException {
WxPayService wxPayService= wxPayHandler.getWxPayService();
@ -231,11 +181,11 @@ public class CpopEasyLearnTest {
wxPayService.closePartnerOrderV3(wxPayPartnerOrderCloseV3Request);
}
/**
*//**
* 查询未完结订单
* @author DB
* @since 2024/1/19
*/
*//*
@Test
public void downloadBill() throws WxPayException {
WxPayService wxPayService = wxPayHandler.getWxPayService(null, "1663310469");
@ -354,11 +304,11 @@ public class CpopEasyLearnTest {
}
}
/**
*//**
* 创建微信太阳码
* @author DB
* @since 2024/1/23
*/
*//*
@Test
public void createMiniQrCode() throws WxErrorException, IOException {
// 获取当前执行环境
@ -410,7 +360,7 @@ public class CpopEasyLearnTest {
|| ((codePoint >= 0x20) && (codePoint <= 0xD7FF))
|| ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))
|| ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF));
}
}*/
}

View File

@ -1,48 +1,11 @@
package com.cpop.oam.web;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.utils.StringUtils;
import com.cpop.system.framework.enums.OrderSource;
import com.cpop.core.utils.SpringUtils;
import com.cpop.jambox.business.entity.*;
import com.cpop.jambox.business.service.*;
import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
import com.cpop.system.business.entity.Store;
import com.cpop.system.business.service.StoreService;
import com.github.binarywang.wxpay.bean.payscore.PartnerUserSignPlanEntity;
import com.github.binarywang.wxpay.bean.payscore.PayScorePlanDetailResult;
import com.github.binarywang.wxpay.bean.payscore.WxPartnerPayScoreSignPlanResult;
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingV3Result;
import com.github.binarywang.wxpay.bean.request.WxPayPartnerOrderQueryV3Request;
import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
import com.github.binarywang.wxpay.bean.result.WxPayPartnerOrderQueryV3Result;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.core.datasource.DataSourceKey;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.*;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.cpop.jambox.business.entity.table.EasyLearnOrderExtendTableDef.EASY_LEARN_ORDER_EXTEND;
import static com.cpop.jambox.business.entity.table.EasyLearnOrderTableDef.EASY_LEARN_ORDER;
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
import static com.cpop.system.business.entity.table.WxPayScoreTableDef.WX_PAY_SCORE;
/**
* 旧数据同步
* @author DB
@ -52,16 +15,17 @@ import static com.cpop.system.business.entity.table.WxPayScoreTableDef.WX_PAY_SC
@Slf4j
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles(profiles = {"prod","core","pay"})
@Deprecated
public class CpopOldDataSyncTests {
@Autowired
private WxPayHandler wxPayHandler;
/**
/* *//**
* 同步旧校区数据
* @author DB
* @since 2024/1/11
*/
*//*
@Test
public void syncOldStoreData(){
List<Row> rowList = null;
@ -90,11 +54,11 @@ public class CpopOldDataSyncTests {
SpringUtils.getBean(StoreService.class).updateBatch(RowUtil.toEntityList(filterList, Store.class));
}
/**
*//**
* 同步旧数据一次一次支付
* @author DB
* @since 2024/1/12
*/
*//*
@Test
public void syncOldEasyLearnPayScorePlanData() {
List<Row> rowList = null;
@ -300,11 +264,11 @@ public class CpopOldDataSyncTests {
}
}
/**
*//**
* 导入到旧库,已核销的数据
* @author DB
* @since 2024/1/12
*/
*//*
@Test
public void importEasyLearnDataToOldDataBase(){
List<Row> brandList = null;
@ -438,6 +402,6 @@ public class CpopOldDataSyncTests {
} catch (WxPayException e) {
throw new RuntimeException(e);
}
}
}*/
}

View File

@ -1,498 +0,0 @@
package com.cpop.oam.web;
import cn.hutool.poi.excel.ExcelDateUtil;
import cn.hutool.poi.excel.ExcelUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.enums.UserType;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysUser;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.uuid.IdUtils;
import com.cpop.oam.business.entity.Dept;
import com.cpop.oam.business.entity.Staff;
import com.cpop.oam.business.entity.StaffMidDept;
import com.cpop.oam.business.service.DeptService;
import com.cpop.oam.business.service.StaffMidDeptService;
import com.cpop.oam.business.service.StaffService;
import com.cpop.oam.framework.config.wxCp.WxCpConfiguration;
import com.mybatisflex.core.row.Db;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.api.WxCpExternalContactService;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.WxCpDepart;
import me.chanjar.weixin.cp.bean.WxCpUser;
import me.chanjar.weixin.cp.bean.export.WxCpExportRequest;
import me.chanjar.weixin.cp.bean.export.WxCpExportResult;
import me.chanjar.weixin.cp.bean.external.WxCpUserExternalGroupChatInfo;
import me.chanjar.weixin.cp.bean.external.WxCpUserExternalGroupChatList;
import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactBatchInfo;
import me.chanjar.weixin.cp.bean.user.WxCpDeptUserResult;
import org.apache.commons.codec.binary.Base64;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.io.File;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
* @author DB
* @createTime 2023/10/12 15:19
* @description 企业微信Api测试
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Slf4j
public class CpopWxCpTests {
/**
* @descriptions 获取成员ID列表
* @author DB
* @date 2023/10/12 15:33
* @return: void
*/
@Test
public void userListId() {
try {
WxCpDeptUserResult userListId = WxCpConfiguration.getCpService(1000024).getUserService().getUserListId("", 100);
System.out.println(userListId);
} catch (WxErrorException e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 根据手机号获取用户id
*/
@Test
public void getUserId() {
try {
String userId = WxCpConfiguration.getCpService(1000024).getUserService().getUserId("17728500831");
System.out.println(userId);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
}
/**
* 根据用户id获取用户
*/
@Test
public void getUser() {
try {
WxCpUser user = WxCpConfiguration.getCpService(1000024).getUserService().getById("XiaoKanTianSeMuKanYun");
System.out.println(user);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
}
/**
* 获取部门列表
*/
@Test
public void getDepartmentList() {
try {
List<WxCpDepart> wxCpDeparts = WxCpConfiguration.getCpService(1000000).getDepartmentService().simpleList(1L);
System.out.println(wxCpDeparts);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
}
@Test
public void getDeptById() {
try {
WxCpDepart wxCpDepart = WxCpConfiguration.getCpService(1000024).getDepartmentService().get(1L);
System.out.println(wxCpDepart);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
}
/**
* 导出部门
*/
@Test
public void exportDept() {
try {
WxCpExportRequest request = new WxCpExportRequest();
request.setEncodingAesKey("DLSzfHVUZN3O9WhtL07RBXUoooqC2bjEJYwep8k8ojt");
String jabId = WxCpConfiguration.getCpService(1000024).getExportService().department(request);
System.out.println(jabId);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
}
/**
* @descriptions 获取导出结果
* @author DB
* @date 2023/10/13 16:18
* @return: void
*/
@Test
public void getExportResult() throws WxErrorException {
//jobid_dFssU8d6nirNJjOHwoxoPV23OzWH6edwrb__ilftwyA
WxCpExportResult result = WxCpConfiguration.getCpService(1000024).getExportService().getResult("jobid__qH9HAsRGgeErUVEaJA1UnOFpjuL7CQddh11dYtDE6s");
System.out.println(result);
}
/**
* @descriptions 解密导出数据
* @author DB
* @date 2023/10/13 16:49
* @return: void
*/
@Test
public void decryptExportData(){
String result = getDecryptExportData("DLSzfHVUZN3O9WhtL07RBXUoooqC2bjEJYwep8k8ojt", "https://szfront.wxwork.qq.com:443/downloadobject?fileid=080112043133303122093131343535363239362a0131322463396566396533662d626332392d346666622d623033652d623034626633343633656539388004421453e8114eb1942bcda5dfca7c8457534c237ab95448015802600768b8177207333030303030308a010b6170706c69636174696f6e90018ffba3a9069a0100a001d5b703&weixinnum=2519320458&authkey=7008001005186022606b8b2cec47b7d5c6a502d671c77f8b35bfb4908f7cc912258e5c54554a0485f9b61c484bb3f5c56fc823c2b3aefed8b319fd113a0220b6297a7879c4a3d50313c6bc91b004c50efd6d2849165eb511f52b8027d3f34de5e970d95291af935be7&filename=data_0.json");
if (result != null) {
System.out.println(result.substring(0, result.lastIndexOf("}") + 1));
}
}
public final String getDecryptExportData(String aesKey, String url) {
RestTemplate restTemplate = new RestTemplate();
ResponseEntity<byte[]> responseEntity = restTemplate.getForEntity(url, byte[].class);
if (responseEntity.getBody() == null) {
return null;
}
byte[] key = Base64.decodeBase64(aesKey + "=");
byte[] original = null;
try {
// 设置解密模式为AES的CBC模式
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
SecretKeySpec keySpec = new SecretKeySpec(key, "AES");
IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(key, 0, 16));
cipher.init(Cipher.DECRYPT_MODE, keySpec, iv);
original = cipher.doFinal(responseEntity.getBody());
} catch (Exception e) {
log.error("", e);
}
assert original != null;
return new String(original);
}
/**
* @descriptions 导入部门
* @author DB
* @date 2023/10/13 16:54
* @return: void
*/
@Test
public void importDept() {
//将导出数据转换
String result = getDecryptExportData("DLSzfHVUZN3O9WhtL07RBXUoooqC2bjEJYwep8k8ojt", "https://szfront.wxwork.qq.com:443/downloadobject?fileid=080112043133303122093131343535363239362a0131322463396566396533662d626332392d346666622d623033652d623034626633343633656539388004421453e8114eb1942bcda5dfca7c8457534c237ab95448015802600768b8177207333030303030308a010b6170706c69636174696f6e90018ffba3a9069a0100a001d5b703&weixinnum=2519320458&authkey=7008001005186022606b8b2cec47b7d5c6a502d671c77f8b35bfb4908f7cc912258e5c54554a0485f9b61c484bb3f5c56fc823c2b3aefed8b319fd113a0220b6297a7879c4a3d50313c6bc91b004c50efd6d2849165eb511f52b8027d3f34de5e970d95291af935be7&filename=data_0.json");
//导出集合
List<ExportDept> exportDeptList = JSONObject.parseObject(result).getJSONArray("department").toJavaList(ExportDept.class);
//转换部门
List<Dept> list = new ArrayList<>();
exportDeptList.forEach(item -> {
Dept dept = new Dept();
dept.setWxCpId(item.getId())
.setWxCpParentId(item.getParentId())
.setOrderNo(item.getOrder())
.setName(item.getName());
list.add(dept);
});
//批量导入数据
DeptService deptService = SpringUtils.getBean(DeptService.class);
deptService.saveBatch(list);
//同步父id
Map<Long, Dept> deptMap = list.stream().collect(Collectors.toMap(Dept::getWxCpId, item -> item));
list.forEach(item->{
if (null != deptMap.get(item.getWxCpParentId())){
item.setParentId(deptMap.get(item.getWxCpParentId()).getId());
}
});
//批量更新
deptService.updateBatch(list);
}
/**
* 导出部门数据
*/
@Data
public class ExportDept {
/**
* 部门id
*/
private Long id;
/**
* 部门名
*/
private String name;
/**
* 父部门id
*/
@JSONField(name = "parentid")
private Long parentId;
/**
* 排序
*/
private Integer order;
}
@Test
public void getUserList() throws WxErrorException {
WxCpExportRequest request = new WxCpExportRequest();
request.setEncodingAesKey("DLSzfHVUZN3O9WhtL07RBXUoooqC2bjEJYwep8k8ojt");
String jobId = WxCpConfiguration.getCpService(1000024).getExportService().user(request);
System.out.println(jobId);
}
/**
* @descriptions 导出员工
* @author DB
* @date 2023/10/16 9:20
* @return: void
*/
@Test
public void importStaffList() throws WxErrorException {
//https://szfront.wxwork.qq.com:443/downloadobject?fileid=080112043133303122093131343535363239362a0131322464333430383931612d386139312d346262652d616231302d62353464653065383035316138a03b42149c55bf3c6169f900ae391370dd348245dd7308a548015802600768b8177207333030303030308a010b6170706c69636174696f6e900197a4b2a9069a0100a0019cdf03&weixinnum=2909765272&authkey=700800100918602260b996bf284cb359495885b1480d4065832650ca9911785379ca2fe340691640e9e97f18aa5e0df436f97b866f7364f9ea4b81497eca584fedd26dca5fb1afdbcf42508abe97ef4529ec213ade2dac789a350500807294c0c941157438264a30c7&filename=data_0.json
String result = getDecryptExportData("DLSzfHVUZN3O9WhtL07RBXUoooqC2bjEJYwep8k8ojt", "https://szfront.wxwork.qq.com:443/downloadobject?fileid=080112043133303122093131343535363239362a0131322464333430383931612d386139312d346262652d616231302d62353464653065383035316138a03b42149c55bf3c6169f900ae391370dd348245dd7308a548015802600768b8177207333030303030308a010b6170706c69636174696f6e900197a4b2a9069a0100a0019cdf03&weixinnum=2909765272&authkey=700800100918602260b996bf284cb359495885b1480d4065832650ca9911785379ca2fe340691640e9e97f18aa5e0df436f97b866f7364f9ea4b81497eca584fedd26dca5fb1afdbcf42508abe97ef4529ec213ade2dac789a350500807294c0c941157438264a30c7&filename=data_0.json");
JSONArray department = JSONObject.parseObject(result).getJSONArray("userlist");
//转换员工用户
List<Staff> staffList = new ArrayList<>();
List<SysUser> sysUserList = new ArrayList<>();
List<ExportUser> exportUsers = department.toJavaList(ExportUser.class);
//获取当前创建人员信息
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
Map<Integer, Staff> userMapStaff = new HashMap<>();
AtomicReference<Integer> flag = new AtomicReference<>(0);
exportUsers.forEach(item -> {
//创建用户
SysUser sysUser = new SysUser();
sysUser.setId(IdUtils.fastSimpleUUID());
sysUser.setPassword("$2a$10$6CA0M3iyO8u8zSVtmufYGO3KfLvjaE5fxdHCqTQ2NpxYH/Dxi/fBu")
.setNickName(item.getAlias())
.setStatus(item.getStatus())
.setUserType(UserType.OAM_USER.toString());
sysUser.setCreateUserId(loginUser == null ? "1" : loginUser.getUserId());
sysUser.setUpdateUserId(loginUser == null ? "1" : loginUser.getUserId());
sysUserList.add(sysUser);
//转换员工
Staff staff = BeanUtils.mapToClass(item, Staff.class);
staff.setName(item.getName())
//默认售后人员由管理人员修改
.setStaffType(1)
//设置角色信息
//.setRoleId()
.setWxCpUserId(item.getWxCpUserId());
//放入一个map集合中
userMapStaff.put(flag.get(), staff);
flag.getAndSet(flag.get() + 1);
});
Db.executeBatch(sysUserList, CoreMapper.class, CoreMapper::insertSysUser);
for (int i = 0; i < sysUserList.size(); i++) {
SysUser sysUser = sysUserList.get(i);
Staff staff = userMapStaff.get(i);
staff.setUserId(sysUser.getId());
staffList.add(staff);
}
SpringUtils.getBean(StaffService.class).saveBatch(staffList);
//导入用户信息分组
Map<String, ExportUser> exportUserMap = exportUsers.stream().collect(Collectors.toMap(ExportUser::getWxCpUserId, item -> item));
//获取所有部门信息
Map<Long, Dept> deptMap = SpringUtils.getBean(DeptService.class).list().stream().collect(Collectors.toMap(Dept::getWxCpId, item -> item));
List<StaffMidDept> staffMidDeptList = new ArrayList<>();
//设置中间部门表信息
staffList.forEach(item->{
ExportUser exportUser = exportUserMap.get(item.getWxCpUserId());
exportUser.getDepartment().forEach(innerItem->{
StaffMidDept staffMidDept = new StaffMidDept();
staffMidDept.setDeptId(deptMap.get(innerItem).getId());
staffMidDept.setStaffId(item.getId());
staffMidDeptList.add(staffMidDept);
});
});
SpringUtils.getBean(StaffMidDeptService.class).getMapper().insertBatch(staffMidDeptList);
}
/**
* 导入用户
*/
@Data
public class ExportUser {
/**
* 成员名称
*/
private String name;
/**
* 别名
*/
private String alias;
/**
* 座机
*/
private String telephone;
/**
* 职位名称
*/
private String position;
/**
* 成员所属部门id列表
*/
private List<Long> department;
/**
* 表示在所在的部门内是否为部门负责人
*/
@JSONField(name = "is_leader_in_dept")
private List<Long> isLeaderInDept;
/**
* 企业微信用户id
*/
@JSONField(name = "userid")
private String wxCpUserId;
/**
* 是否启用
*/
private Boolean status;
/**
* 部门排序
*/
private List<Long> order;
}
/**
* 获取线索
* @author DB
* @since 2024/2/18
*/
@Test
public void getClueList() throws WxErrorException {
WxCpService cpService = WxCpConfiguration.getCpService(1000024);
WxCpExternalContactService externalContactService = cpService.getExternalContactService();
String[] userIds = {"YiHaiNan","ChenShuJie","ChenWei","GuTingTing","9106a48341c538f2f634343241c7e37a","LanShengYao","LiMei","LiuYe","MaYaLan","NiXuMei","PanYanXia","YangTingHong","ZhangCongTang","ZhaoSuMin"};
List<WxCpExternalContactBatchInfo.ExternalContactInfo> externalData = getExternalData(null,externalContactService, null, userIds);
List<ExportClueData> exportClueDataList = new ArrayList<>();
externalData.forEach(item->{
ExportClueData exportClueData = new ExportClueData();
exportClueData.setType(item.getExternalContact().getType() == 1 ? "微信用户" : "企业微信用户");
exportClueData.setUserid(item.getFollowInfo().getUserId());
exportClueData.setName(item.getExternalContact().getName());
exportClueData.setExternalUserid(item.getExternalContact().getExternalUserId());
exportClueDataList.add(exportClueData);
});
List<ExportClueData> filterExportClueDataList = new ArrayList<>();
exportClueDataList.stream().collect(Collectors.groupingBy(ExportClueData::getExternalUserid))
.forEach((key, value) ->{
if(value.size() > 1){
filterExportClueDataList.add(value.get(0));
}
});
Map<String, ExportClueData> externalUserMap = filterExportClueDataList.stream().collect(Collectors.toMap(ExportClueData::getExternalUserid, item -> item));
WxCpUserExternalGroupChatList wxCpUserExternalGroupChatList = externalContactService.listGroupChat(1000, null, 0, userIds);
wxCpUserExternalGroupChatList.getGroupChatList().forEach(item->{
try {
WxCpUserExternalGroupChatInfo groupChatInfo = externalContactService.getGroupChat(item.getChatId(), 1);
WxCpUserExternalGroupChatInfo.GroupChat groupChat = groupChatInfo.getGroupChat();
List<String> collect = groupChat.getMemberList().stream().map(WxCpUserExternalGroupChatInfo.GroupMember::getUserId).collect(Collectors.toList());
collect.forEach(inner->{
ExportClueData exportClueData = externalUserMap.get(inner);
if (exportClueData != null){
exportClueData.setGroupName(groupChatInfo.getGroupChat().getName());
}
});
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
});
File file = new File("D:\\Lost\\桌面\\线索池数据.xlsx");
EasyExcel.write(file, ExportClueData.class)
.sheet("已知线索池")
.doWrite(() -> {
// 分页查询数据
return filterExportClueDataList;
});
}
private List<WxCpExternalContactBatchInfo.ExternalContactInfo> getExternalData(List<WxCpExternalContactBatchInfo.ExternalContactInfo> allExternalContactList, WxCpExternalContactService externalContactService, String nextCursor, String[] userIds) throws WxErrorException {
WxCpExternalContactBatchInfo contactDetailBatch = externalContactService.getContactDetailBatch(userIds, nextCursor, null);
List<WxCpExternalContactBatchInfo.ExternalContactInfo> externalContactList = contactDetailBatch.getExternalContactList();
if (allExternalContactList != null){
allExternalContactList.addAll(externalContactList);
} else {
allExternalContactList = externalContactList;
}
if (StringUtils.isNotBlank(contactDetailBatch.getNextCursor())) {
return getExternalData(allExternalContactList, externalContactService, contactDetailBatch.getNextCursor(), userIds);
} else {
return allExternalContactList;
}
}
@Data
public class ExportClueData{
/**
* 联系人名称
*/
@ExcelProperty(value = "联系人名称")
private String name;
/**
* 客户群名
*/
@ExcelProperty(value = "客户群名")
private String groupName;
/**
* 联系人类型
*/
@ExcelProperty(value = "联系人类型")
private String type;
/**
* 联系人userid
*/
@ExcelProperty(value = "联系人userid")
@JSONField(name = "external_userid")
private String externalUserid;
/**
* 系统微信用户id
*/
@ExcelProperty(value = "系统微信用户id")
private String userid;
/**
* 校区名
*/
@ExcelProperty(value = "校区名")
private String storeName;
/**
* 校区id
*/
@ExcelProperty(value = "校区id")
private String storeId;
}
}

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -12,18 +11,18 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "AgreeOrRejectEnforceFinishBo对象")
@Schema(description = "AgreeOrRejectEnforceFinishBo对象")
public class AgreeOrRejectEnforceFinishBo {
/**
* 工单id
*/
@ApiModelProperty(value = "工单id")
@Schema(description = "工单id")
private String id;
/**
* 同意或拒绝
*/
@ApiModelProperty(value = "同意或拒绝")
@Schema(description = "同意或拒绝")
private Boolean agreeOrReject;
}

View File

@ -1,13 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
* @version 1.0.0
@ -15,33 +13,33 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索跟进请求对象")
@Schema(description = "线索跟进请求对象")
public class ClueFollowUpBo {
/**
* 线索id
*/
@NotBlank(message = "线索id不能为空")
@ApiModelProperty(value = "线索id",required = true)
@Schema(description = "线索id",required = true)
private String clueId;
/**
* 记录内容
*/
@NotBlank(message = "记录内容不能为空")
@ApiModelProperty(value = "记录内容",required = true)
@Schema(description = "记录内容",required = true)
private String recordContent;
/**
* 记录文件地址
*/
@ApiModelProperty(value = "记录文件地址")
@Schema(description = "记录文件地址")
private String recordFileUrl;
/**
* 更进状态(0:待跟进1:已歇业2:无法联系3:无意向4:已拜访5:跟进中6:已成交
*/
@NotNull(message = "跟进状态不能为空")
@ApiModelProperty(value = "更进状态(0:待跟进、1:已歇业、2:无法联系、3:无意向、4:已拜访、5:跟进中、6:已成交",required = true)
@Schema(description = "更进状态(0:待跟进、1:已歇业、2:无法联系、3:无意向、4:已拜访、5:跟进中、6:已成交",required = true)
private Integer followStatus;
}

View File

@ -1,13 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.sql.Date;
import java.time.LocalDate;
/**
@ -17,35 +15,35 @@ import java.time.LocalDate;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "校区延期请求对象")
@Schema(description = "校区延期请求对象")
public class CluePutOffBo {
/**
* 线索id
*/
@NotBlank(message = "线索id不能为空")
@ApiModelProperty(value = "线索id",required = true)
@Schema(description = "线索id",requiredMode = Schema.RequiredMode.REQUIRED)
private String clueId;
/**
* 延期原因
*/
@NotBlank(message = "延期原因不能为空")
@ApiModelProperty(value = "延期原因",required = true)
@Schema(description = "延期原因",requiredMode = Schema.RequiredMode.REQUIRED)
private String putOffReason;
/**
* 延期文件路径
*/
@NotBlank(message = "延期文件路径不能为空")
@ApiModelProperty(value = "延期文件路径",required = true)
@Schema(description = "延期文件路径",requiredMode = Schema.RequiredMode.REQUIRED)
private String putOffFileUrl;
/**
* 延期到期日期
*/
@NotNull(message = "不能为空")
@ApiModelProperty(value = "延期到期日期",required = true)
@Schema(description = "延期到期日期",requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDate putOffDate;
}

View File

@ -1,11 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* @author DB
@ -14,35 +13,35 @@ import javax.validation.constraints.NotBlank;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索更新请求对象")
@Schema(description = "线索更新请求对象")
public class ClueUpdateBo {
/**
* 线索id
*/
@NotBlank(message = "线索id不能为空")
@ApiModelProperty(value = "线索id",required = true)
@Schema(description = "线索id",requiredMode = Schema.RequiredMode.REQUIRED)
private String clueId;
/**
* 新校区名
*/
@NotBlank(message = "校区名不能为空")
@ApiModelProperty(value = "校区名",required = true)
@Schema(description = "校区名",requiredMode = Schema.RequiredMode.REQUIRED)
private String newStoreName;
/**
* 新负责人
*/
@NotBlank(message = "负责人不能为空")
@ApiModelProperty(value = "负责人",required = true)
@Schema(description = "负责人",requiredMode = Schema.RequiredMode.REQUIRED)
private String newPersonCharge;
/**
* 新手机号
*/
@NotBlank(message = "手机号不能为空")
@ApiModelProperty(value = "手机号",required = true)
@Schema(description = "手机号",requiredMode = Schema.RequiredMode.REQUIRED)
private String newPhone;
@ -50,7 +49,7 @@ public class ClueUpdateBo {
* 新校区地址
*/
@NotBlank(message = "校区地址不能为空")
@ApiModelProperty(value = "校区地址",required = true)
@Schema(description = "校区地址",requiredMode = Schema.RequiredMode.REQUIRED)
private String newStoreAddr;
}

View File

@ -1,11 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 部门表Bo
@ -15,63 +13,61 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysDept对象", description = "部门表")
public class DeptBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "部门表")
public class DeptBo {
/**
* 部门id
*/
@ApiModelProperty("部门id")
@Schema(description ="部门id")
private String id;
/**
* 父部门id
*/
@ApiModelProperty("父部门id")
@Schema(description ="父部门id")
private String parentId;
/**
* 部门名称
*/
@ApiModelProperty(value = "部门名称",required = true)
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
/**
* 排序
*/
@ApiModelProperty(value = "排序",required = true)
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer orderNo;
/**
* 负责人
*/
@ApiModelProperty("负责人")
@Schema(description ="负责人")
private String leader;
/**
* 电话
*/
@ApiModelProperty("电话")
@Schema(description ="电话")
private String phone;
/**
* 邮箱
*/
@ApiModelProperty("邮箱")
@Schema(description ="邮箱")
private String email;
/**
* 部门状态:1正常,0停用
*/
@ApiModelProperty(value = "部门状态:1正常,0停用",required = true)
@Schema(description = "部门状态:1正常,0停用", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status;
/**
* 备注
*/
@ApiModelProperty("备注")
@Schema(description ="备注")
private String remark;
}

View File

@ -1,33 +1,27 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author DB
* @Description:
* @create 2023-05-09 20:51
* @since 2023-05-09 20:51
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysDeptListBo对象", description = "部门树查询参数对象")
public class DeptListBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "部门树查询参数对象")
public class DeptListBo {
/**
* 部门名称
*/
@ApiModelProperty("部门名称")
@Schema(description ="部门名称")
private String name;
/**
* 部门状态:0正常,1停用
*/
@ApiModelProperty("部门状态:0正常,1停用")
@Schema(description ="部门状态:0正常,1停用")
private Boolean status;
}

View File

@ -1,13 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
@ -18,42 +16,40 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Duty对象", description = "值班表")
public class DutyBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "值班表")
public class DutyBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 服务员工id
*/
@NotBlank(message = "服务员工id不能为空")
@ApiModelProperty(value = "服务员工id",required = true)
@Schema(description = "服务员工id", requiredMode = Schema.RequiredMode.REQUIRED)
private String serviceStaffId;
/**
* 技术员工id
*/
@NotBlank(message = "技术员工id不能为空")
@ApiModelProperty(value = "技术员工id",required = true)
@Schema(description = "技术员工id", requiredMode = Schema.RequiredMode.REQUIRED)
private String technologyStaffId;
/**
* 值班日期
*/
@NotEmpty(message = "值班日期不能为空")
@ApiModelProperty(value = "值班日期",required = true)
@Schema(description = "值班日期", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> dutyDate;
/**
* 备注
*/
@ApiModelProperty("备注")
@Schema(description ="备注")
private String remark;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/11 11:43
@ -15,15 +12,13 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Duty对象", description = "值班表")
public class DutyListBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "值班表")
public class DutyListBo {
/**
* 值班月份
*/
@ApiModelProperty("值班月份")
@Schema(description = "值班月份")
private String dutyMoth;
}

View File

@ -1,11 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* @author DB
@ -14,20 +13,20 @@ import javax.validation.constraints.NotBlank;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "EnforceFinishWorkOrderBo对象", description = "强制办结工单")
@Schema(description = "强制办结工单")
public class EnforceFinishWorkOrderBo {
/**
* 工单id
*/
@NotBlank(message = "工单id不能为空")
@ApiModelProperty(value = "工单id", required = true)
@Schema(description = "工单id", requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 强制办结原因
*/
@NotBlank(message = "强制办结原因不能为空")
@ApiModelProperty(value = "强制办结原因", required = true)
@Schema(description = "强制办结原因", requiredMode = Schema.RequiredMode.REQUIRED)
private String enforceFinishReason;
}

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -14,24 +13,24 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FinanceReimburseAuditPageBo对象", description = "财务报销审核请求参数")
public class FinanceReimburseAuditPageBo implements Serializable {
@Schema(description = "财务报销审核请求参数")
public class FinanceReimburseAuditPageBo {
/**
* 状态0:审批中;1:下款中;2:已下发-1:驳回
*/
@ApiModelProperty(value = "状态0:审批中;1:下款中;2:已下发-1:驳回")
@Schema(description = "状态0:审批中;1:下款中;2:已下发-1:驳回")
private Integer status;
/**
* 申请类型
*/
@ApiModelProperty(value = "申请类型")
@Schema(description = "申请类型")
private String typeId;
/**
* 查询
*/
@ApiModelProperty(value = "查询")
@Schema(description = "查询")
private String query;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author DB
* @createTime 2023/09/20 16:43
@ -14,19 +11,19 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FinanceReimbursePageBo对象", description = "财务报销请求参数")
public class FinanceReimbursePageBo implements Serializable {
@Schema(description = "财务报销请求参数")
public class FinanceReimbursePageBo {
/**
* 状态0:审批中;1:下款中;2:已下发-1:驳回
*/
@ApiModelProperty(value = "状态0:审批中;1:下款中;2:已下发-1:驳回")
@Schema(description = "状态0:审批中;1:下款中;2:已下发-1:驳回")
private Integer status;
/**
* 申请类型
*/
@ApiModelProperty(value = "申请类型")
@Schema(description = "申请类型")
private String typeId;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* Description: 修改用户密码bo
@ -16,29 +14,27 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "ModifyUserPasswordBo对象", description = "修改用户密码bo")
public class ModifyUserPasswordBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema( description = "修改用户密码bo")
public class ModifyUserPasswordBo {
/**
* 用户id
*/
@NotBlank(message = "用户id不能为空")
@ApiModelProperty(value = "用户id",required = true)
@Schema(description = "用户id",requiredMode = Schema.RequiredMode.REQUIRED)
private String userId;
/**
* 旧密码
*/
@NotBlank(message = "旧密码不能为空")
@ApiModelProperty(value = "旧密码",required = true)
@Schema(description = "旧密码",requiredMode = Schema.RequiredMode.REQUIRED)
private String oldPassword;
/**
* 新密码
*/
@NotBlank(message = "新密码不能为空")
@ApiModelProperty(value = "新密码",required = true)
@Schema(description = "新密码",requiredMode = Schema.RequiredMode.REQUIRED)
private String newPassword;
}

View File

@ -1,12 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
@ -15,20 +14,20 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "OperationStatusBo对象")
@Schema(description = "OperationStatusBo对象")
public class OperationStatusBo {
/**
* 员工id
*/
@NotBlank(message = "员工id不能为空")
@ApiModelProperty(value = "员工id",required = true)
@Schema(description = "员工id",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 操作状态
*/
@NotNull(message = "操作状态不能为空")
@ApiModelProperty(value = "操作状态",required = true)
@Schema(description = "操作状态",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isOperation;
}

View File

@ -1,12 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
@ -15,20 +14,20 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "延期审核请求对象")
@Schema(description = "延期审核请求对象")
public class PutOffAuditBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键",required = true)
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 审核结果
*/
@NotNull(message = "审核结果不能为空")
@ApiModelProperty(value = "审核结果",required = true)
@Schema(description = "审核结果",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean auditResult;
}

View File

@ -1,14 +1,12 @@
package com.cpop.oam.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
@ -19,21 +17,21 @@ import java.sql.Date;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "ReimburseStatusBo", description = "报销申请请求参数")
public class ReimburseApplicationBo implements Serializable {
@Schema(description = "报销申请请求参数")
public class ReimburseApplicationBo {
/**
* 申请类型
*/
@NotBlank(message = "申请类型不能为空")
@ApiModelProperty(value = "申请类型",required = true)
@Schema(description = "申请类型",requiredMode = Schema.RequiredMode.REQUIRED)
private String typeId;
/**
* 报销日期
*/
@NotNull(message = "报销日期不能为空")
@ApiModelProperty(value = "报销日期",required = true)
@Schema(description = "报销日期",requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date reportDate;
@ -41,26 +39,26 @@ public class ReimburseApplicationBo implements Serializable {
* 申请说明
*/
@NotBlank(message = "申请说明不能为空")
@ApiModelProperty(value = "申请说明",required = true)
@Schema(description = "申请说明",requiredMode = Schema.RequiredMode.REQUIRED)
private String remarks;
/**
* 申请金额
*/
@NotNull(message = "申请金额不能为空")
@ApiModelProperty(value = "申请金额",required = true)
@Schema(description = "申请金额",requiredMode = Schema.RequiredMode.REQUIRED)
private BigDecimal price;
/**
* 附件
*/
@ApiModelProperty(value = "附件")
@Schema(description = "附件")
private String attachmentUrl;
/**
* 报销申请id
*/
@ApiModelProperty(value = "报销申请id")
@Schema(description = "报销申请id")
private String id;
}

View File

@ -1,13 +1,11 @@
package com.cpop.oam.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@ -17,28 +15,28 @@ import java.time.LocalDateTime;
* @description
*/
@Data
@ApiModel(value = "报销下款")
public class ReimbursePayBo implements Serializable {
@Schema(description = "报销下款")
public class ReimbursePayBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键",required = true)
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 下发金额
*/
@NotNull(message = "下发金额不能为空")
@ApiModelProperty(value = "下发金额",required = true)
@Schema(description = "下发金额",requiredMode = Schema.RequiredMode.REQUIRED)
private BigDecimal stageAmount;
/**
* 下款时间
*/
@NotNull(message = "下款时间不能为空")
@ApiModelProperty(value = "下款时间",required = true)
@Schema(description = "下款时间",requiredMode = Schema.RequiredMode.REQUIRED)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private LocalDateTime paymentTime;
}

View File

@ -1,11 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author DB
@ -13,20 +11,20 @@ import java.io.Serializable;
* @description
*/
@Data
@ApiModel(value = "报销驳回")
public class ReimburseRejectBo implements Serializable {
@Schema(description = "报销驳回")
public class ReimburseRejectBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 驳回原因
*/
@NotBlank(message = "驳回原因不能为空")
@ApiModelProperty(value = "驳回原因")
@Schema(description = "驳回原因")
private String rejectReason;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;
/**
@ -16,13 +14,13 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "ReimburseStatusBo", description = "")
public class ReimburseStatusBo implements Serializable {
@Schema(description = "报销状态bo")
public class ReimburseStatusBo {
/**
* 更新状态ids
*/
@NotEmpty(message = "更新状态ids不能为空")
@ApiModelProperty(value = "更新状态ids", required = true)
@Schema(description = "更新状态ids", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> ids;
}

View File

@ -1,10 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author DB
@ -12,18 +11,18 @@ import java.io.Serializable;
* @description
*/
@Data
public class ReimburseTypeBo implements Serializable {
public class ReimburseTypeBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 报销类型
*/
@NotBlank(message = "报销类型不能为空")
@ApiModelProperty(value = "报销类型",required = true)
@Schema(description = "报销类型",requiredMode = Schema.RequiredMode.REQUIRED)
private String typeName;
}

View File

@ -1,11 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
@ -15,98 +14,98 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SignGoalBo对象", description = "签约指标")
@Schema(description = "签约指标")
public class SignGoalBo {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 员工id
*/
@ApiModelProperty(value = "员工id")
@Schema(description = "员工id")
private String staffId;
/**
* 签约区域集合
*/
@NotEmpty(message = "签约区域集合不能为空")
@ApiModelProperty(value = "签约区域集合")
@Schema(description = "签约区域集合")
private List<String> signAreaList;
/**
* 一月目标
*/
@ApiModelProperty(value = "一月目标")
@Schema(description = "一月目标")
private Integer janGoal;
/**
* 二月目标
*/
@ApiModelProperty(value = "二月目标")
@Schema(description = "二月目标")
private Integer febGoal;
/**
* 三月目标
*/
@ApiModelProperty(value = "三月目标")
@Schema(description = "三月目标")
private Integer marGoal;
/**
* 四月目标
*/
@ApiModelProperty(value = "四月目标")
@Schema(description = "四月目标")
private Integer aprGoal;
/**
* 五月目标
*/
@ApiModelProperty(value = "五月目标")
@Schema(description = "五月目标")
private Integer mayGoal;
/**
* 六月目标
*/
@ApiModelProperty(value = "六月目标")
@Schema(description = "六月目标")
private Integer junGoal;
/**
* 七月目标
*/
@ApiModelProperty(value = "七月目标")
@Schema(description = "七月目标")
private Integer julGoal;
/**
* 八月目标
*/
@ApiModelProperty(value = "八月目标")
@Schema(description = "八月目标")
private Integer augGoal;
/**
* 九月目标
*/
@ApiModelProperty(value = "九月目标")
@Schema(description = "九月目标")
private Integer sepGoal;
/**
* 十月目标
*/
@ApiModelProperty(value = "十月目标")
@Schema(description = "十月目标")
private Integer octGoal;
/**
* 十一月目标
*/
@ApiModelProperty(value = "十一月目标")
@Schema(description = "十一月目标")
private Integer novGoal;
/**
* 十二月目标
*/
@ApiModelProperty(value = "十二月目标")
@Schema(description = "十二月目标")
private Integer decGoal;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
@ -15,20 +13,20 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SignGoalConfigInfoBo对象", description = "签约指标配置信息")
@Schema(description = "签约指标配置信息")
public class SignGoalConfigInfoBo {
/**
* 跟进间隔
*/
@NotNull(message = "跟进间隔不能为空")
@ApiModelProperty(value = "跟进间隔",required = true)
@Schema(description = "跟进间隔",requiredMode = Schema.RequiredMode.REQUIRED)
private String followUpInterval;
/**
* 签约间隔
*/
@NotNull(message = "签约间隔不能为空")
@ApiModelProperty(value = "签约间隔",required = true)
@Schema(description = "签约间隔",requiredMode = Schema.RequiredMode.REQUIRED)
private String signInterval;
}

View File

@ -1,14 +1,12 @@
package com.cpop.oam.business.bo;
import com.cpop.core.anno.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* 员工表Bo
@ -18,22 +16,20 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Staff对象", description = "员工表")
public class StaffBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "员工表")
public class StaffBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 姓名不能为空
*/
@NotBlank(message = "姓名不能为空")
@ApiModelProperty("姓名")
@Schema(description ="姓名")
private String name;
/**
@ -41,86 +37,86 @@ public class StaffBo implements Serializable {
*/
@StringArrayConvert
@NotBlank(message = "部门不能为空")
@ApiModelProperty(value = "部门id",required = true)
@Schema(description = "部门id",requiredMode = Schema.RequiredMode.REQUIRED)
private String deptId;
/**
* 用户id
*/
@ApiModelProperty("用户id")
@Schema(description ="用户id")
private String userId;
/**
* 员工类型(0:技术人员;1:售后人员;2:管理人员)
*/
@NotNull(message = "员工类型不能为空")
@ApiModelProperty(value = "员工类型(0:技术人员;1:售后人员;2:管理人员)",required = true)
@Schema(description = "员工类型(0:技术人员;1:售后人员;2:管理人员)",requiredMode = Schema.RequiredMode.REQUIRED)
private Integer staffType;
/**
* 用户名
*/
@NotBlank(message = "用户名不能为空")
@ApiModelProperty(value = "用户名",required = true)
@Schema(description = "用户名",requiredMode = Schema.RequiredMode.REQUIRED)
private String userName;
/**
* 密码
*/
@NotBlank(message = "密码不能为空")
@ApiModelProperty(value = "密码",required = true)
@Schema(description = "密码",requiredMode = Schema.RequiredMode.REQUIRED)
private String password;
/**
* 昵称
*/
@ApiModelProperty(value = "昵称")
@Schema(description = "昵称")
private String nickName;
/**
* 邮箱
*/
@ApiModelProperty(value = "邮箱")
@Schema(description = "邮箱")
private String email;
/**
* 手机号
*/
@NotBlank(message = "手机号不能为空")
@ApiModelProperty(value = "手机号",required = true)
@Schema(description = "手机号",requiredMode = Schema.RequiredMode.REQUIRED)
private String phoneNumber;
/**
* 性别(0:;1:)
*/
@NotNull(message = "性别不能为空")
@ApiModelProperty(value = "性别(0:男;1:女)",required = true)
@Schema(description = "性别(0:男;1:女)",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean sex;
/**
* 头像
*/
@ApiModelProperty(value = "头像")
@Schema(description = "头像")
private String avatar;
/**
* 状态(0:停用;1:启用)
*/
@NotNull(message = "状态不能为空")
@ApiModelProperty(value = "状态(0:停用;1:启用)",required = true)
@Schema(description = "状态(0:停用;1:启用)",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status;
/**
* 角色id
*/
@NotBlank(message = "角色id不能为空")
@ApiModelProperty(value = "角色id",required = true)
@Schema(description = "角色id",requiredMode = Schema.RequiredMode.REQUIRED)
private String roleId;
/**
* 企业微信用户id
*/
@ApiModelProperty(value = "企业微信用户id",required = true)
@Schema(description = "企业微信用户id",requiredMode = Schema.RequiredMode.REQUIRED)
private String wxCpUserId;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/11 15:23
@ -15,26 +12,24 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "系统用户", description = "系统用户(员工)")
public class StaffPageBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "系统用户(员工)")
public class StaffPageBo {
/**
* 姓名
*/
@ApiModelProperty("姓名")
@Schema(description ="姓名")
private String name;
/**
* 部门id
*/
@ApiModelProperty("部门id")
@Schema(description ="部门id")
private String deptId;
/**
* 员工类型
*/
@ApiModelProperty("员工类型")
@Schema(description ="员工类型")
private Integer staffType;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author: DB
@ -15,30 +13,28 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysConfigInfoBo对象", description = "系统配置信息")
public class SysConfigInfoBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "系统配置信息")
public class SysConfigInfoBo {
/**
* 任务审核员工手机号
*/
@NotBlank(message = "任务审核员工手机号不能为空")
@ApiModelProperty(value = "任务审核员工手机号", required = true)
@Schema(description = "任务审核员工手机号", requiredMode = Schema.RequiredMode.REQUIRED)
private String auditStaffPhone;
/**
* 核销管理员工手机号
*/
@NotBlank(message = "核销管理员工手机号不能为空")
@ApiModelProperty(value = "核销管理员工手机号", required = true)
@Schema(description = "核销管理员工手机号", requiredMode = Schema.RequiredMode.REQUIRED)
private String cancelAfterVerificationStaffPhone;
/**
* 测试员工手机号
*/
@NotBlank(message = "测试员工手机号不能为空")
@ApiModelProperty(value = "测试员工手机号", required = true)
@Schema(description = "测试员工手机号", requiredMode = Schema.RequiredMode.REQUIRED)
private String testStaffPhone;
}

View File

@ -1,14 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
@ -17,25 +12,25 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskArchivingPagBo")
@Schema(description = "TaskArchivingPagBo")
public class TaskArchivingPagBo {
/**
* 主体
*/
@ApiModelProperty("主体")
@Schema(description ="主体")
private String subject;
/**
* 任务内容
*/
@ApiModelProperty("任务内容")
@Schema(description ="任务内容")
private String taskContent;
/**
* 是否已归档
*/
@NotNull(message = "不能为空")
@ApiModelProperty(value = "任务内容",required = true)
@Schema(description = "任务内容",requiredMode = Schema.RequiredMode.REQUIRED)
Boolean isFinish;
}

View File

@ -1,14 +1,11 @@
package com.cpop.oam.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
/**
* 任务审核对象
@ -18,33 +15,33 @@ import java.time.LocalDate;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskAudit对象", description = "任务审核对象")
@Schema(description = "任务审核对象")
public class TaskAuditCommentsBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键", required = true)
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 是否通过
*/
@NotNull(message = "是否通过不能为空")
@ApiModelProperty(value = "是否通过", required = true)
@Schema(description = "是否通过", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isPass;
/**
* 任务评级(0:A;1:B;2:C;3:D;4:E)
*/
@ApiModelProperty("任务评级")
@Schema(description ="任务评级")
private String taskRating;
/**
* 任务权重
*/
@ApiModelProperty("任务权重(任务绩点)")
@Schema(description ="任务权重(任务绩点)")
private Integer taskWeight;
public void setTaskWeight(String taskWeight) {
@ -54,7 +51,7 @@ public class TaskAuditCommentsBo {
/**
* 备注(不通过时可以写入备注)
*/
@ApiModelProperty("备注(不通过时可以写入备注)")
@Schema(description ="备注(不通过时可以写入备注)")
private String remark;
}

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
@ -15,7 +14,7 @@ import java.time.LocalDate;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "任务日报对象", description = "任务日报对象")
@Schema(description = "任务日报对象")
public class TaskDailyPaperBo {
/**

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* OAM-任务-需求表Bo
@ -16,40 +14,40 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskDemand对象", description = "OAM-任务-需求表")
@Schema(description = "OAM-任务-需求表")
public class TaskDemandBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 品牌id
*/
@NotBlank(message = "品牌不能为空")
@ApiModelProperty(value = "品牌id", required = true)
@Schema(description = "品牌id", requiredMode = Schema.RequiredMode.REQUIRED)
private String brandId;
/**
* 校区id
*/
@NotBlank(message = "校区不能为空")
@ApiModelProperty(value = "校区id", required = true)
@Schema(description = "校区id", requiredMode = Schema.RequiredMode.REQUIRED)
private String storeId;
/**
* 任务内容
*/
@NotBlank(message = "任务内容不能为空")
@ApiModelProperty(value = "任务内容", required = true)
@Schema(description = "任务内容", requiredMode = Schema.RequiredMode.REQUIRED)
private String taskContent;
/**
* 附件地址
*/
@ApiModelProperty("附件地址")
@Schema(description = "附件地址")
private String attachmentUrl;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/30 15:44
@ -15,25 +12,25 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysDept对象", description = "部门表")
@Schema(description = "部门表")
public class TaskDemandPageBo {
/**
* 任务内容
*/
@ApiModelProperty("任务内容")
@Schema(description ="任务内容")
private String taskContent;
/**
* 品牌或校区
*/
@ApiModelProperty("品牌或校区")
@Schema(description ="品牌或校区")
private String brandOrStore;
/**
* 任务状态
*/
@ApiModelProperty(value = "任务查询状态(待评估:0;待领取:1;处理中:2;已解决:3)", required = true)
@Schema(description = "任务查询状态(待评估:0;待领取:1;处理中:2;已解决:3)", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer taskStatus;
}

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -13,13 +12,13 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskDemandUrgentBo对象")
@Schema(description = "TaskDemandUrgentBo对象")
public class TaskDemandUrgentBo {
/**
* 需求id
*/
@ApiModelProperty("需求id")
@Schema(description ="需求id")
private String id;

View File

@ -1,12 +1,11 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* Description:
@ -16,26 +15,26 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task项对象", description = "Task项对象")
@Schema(description = "Task项对象")
public class TaskItemBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键",required = true)
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 任务项(0:待开发;1:待测试:2:待部署;3:已归档)
*/
@NotNull(message = "任务项不能为空")
@ApiModelProperty(value = "任务项(0:待开发;1:待测试:2:待部署;3:已归档;-1:逾期)",required = true)
@Schema(description = "任务项(0:待开发;1:待测试:2:待部署;3:已归档;-1:逾期)",requiredMode = Schema.RequiredMode.REQUIRED)
private Integer taskItem;
/**
* 测试转部署文件路径
*/
@ApiModelProperty(value = "测试转部署文件路径")
@Schema(description = "测试转部署文件路径")
private String testToFinishUrl;
}

View File

@ -1,10 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* Task迭代对象
@ -14,30 +13,30 @@ import javax.validation.constraints.NotBlank;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task迭代对象")
@Schema(description = "Task迭代对象")
public class TaskIterationBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 任务主体
*/
@NotBlank(message = "任务主体不能为空")
@ApiModelProperty(value = "任务主体", required = true)
@Schema(description = "任务主体", requiredMode = Schema.RequiredMode.REQUIRED)
private String subject;
/**任务内容 */
@NotBlank(message = "任务内容不能为空")
@ApiModelProperty(value = "任务内容", required = true)
@Schema(description = "任务内容", requiredMode = Schema.RequiredMode.REQUIRED)
private String taskContent;
/**
* 附件地址
*/
@ApiModelProperty("附件地址")
@Schema(description ="附件地址")
private String attachmentUrl;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/15 16:21
@ -15,20 +12,18 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task列表返回对象", description = "OAM-任务表")
public class TaskMonthStatisticsBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "OAM-任务表")
public class TaskMonthStatisticsBo {
/**
* 主要负责员工id
*/
@ApiModelProperty("技术员工id")
@Schema(description ="技术员工id")
private String technologyStaffId;
/**
* 任务月份
*/
@ApiModelProperty("任务月份")
@Schema(description ="任务月份")
private String taskMoth;
}

View File

@ -1,13 +1,12 @@
package com.cpop.oam.business.bo;
import com.cpop.core.anno.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* @author DB
@ -16,21 +15,21 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task进度对象", description = "Task进度对象")
@Schema(description = "Task进度对象")
public class TaskProgressBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键",required = true)
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)
*/
@NotNull(message = "任务进度不能为空")
@ApiModelProperty(value = "任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)",required = true)
@Schema(description = "任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)",requiredMode = Schema.RequiredMode.REQUIRED)
@StringArrayConvert
private String taskProgress;
}

View File

@ -1,14 +1,13 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* OAM-任务-关联员工任务组表Bo
@ -18,29 +17,27 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskStaffGroup对象", description = "OAM-任务-关联员工任务组表")
public class TaskStaffGroupBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "OAM-任务-关联员工任务组表")
public class TaskStaffGroupBo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 任务id
*/
@NotBlank(message = "任务id不能为空")
@ApiModelProperty(value = "任务id", required = true)
@Schema(description = "任务id", requiredMode = Schema.RequiredMode.REQUIRED)
private String taskId;
/**
* 员工id
*/
@NotBlank(message = "员工id不能为空")
@ApiModelProperty(value = "员工id", required = true)
@Schema(description = "员工id", requiredMode = Schema.RequiredMode.REQUIRED)
private String staffId;
/**
@ -48,7 +45,7 @@ public class TaskStaffGroupBo implements Serializable {
*/
@Min(value = 0)
@NotNull(message = "绩点不能为空")
@ApiModelProperty(value = "绩点", required = true)
@Schema(description = "绩点", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer gradePoint;
}

View File

@ -1,11 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
/**
* TaskWorkOrderRecord对象
@ -15,27 +14,27 @@ import javax.validation.constraints.NotBlank;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "TaskWorkOrderRecord对象", description = "任务-工单-记录表")
@Schema(description = "任务-工单-记录表")
public class TaskWorkOrderRecordBo {
/**
* 任务工单id
*/
@NotBlank(message = "任务工单id不能为空")
@ApiModelProperty(value = "任务工单id", required = true)
@Schema(description = "任务工单id", requiredMode = Schema.RequiredMode.REQUIRED)
private String taskWorkOrderId;
/**
* 记录内容
*/
@NotBlank(message = "记录内容不能为空")
@ApiModelProperty(value = "记录内容", required = true)
@Schema(description = "记录内容", requiredMode = Schema.RequiredMode.REQUIRED)
private String recordText;
/**
* 附件地址
*/
@ApiModelProperty(value = "附件地址", required = true)
@Schema(description = "附件地址", requiredMode = Schema.RequiredMode.REQUIRED)
private String attachmentUrl;
}

View File

@ -1,13 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/29 16:00
@ -16,27 +13,27 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task转交对象", description = "Task转交对象")
@Schema(description = "Task转交对象")
public class TransferTaskBo {
/**
* 主键
*/
@NotBlank(message = "主键不能为空")
@ApiModelProperty(value = "主键",required = true)
@Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED)
private String id;
/**
* 原负责人
*/
@NotBlank(message = "原负责人不能为空")
@ApiModelProperty(value = "原负责人",required = true)
@Schema(description = "原负责人",requiredMode = Schema.RequiredMode.REQUIRED)
private String responsibleStaffId;
/**
* 新负责人
*/
@NotBlank(message = "新负责人不能为空")
@ApiModelProperty(value = "新负责人",required = true)
@Schema(description = "新负责人",requiredMode = Schema.RequiredMode.REQUIRED)
private String newResponsibleStaffId;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.bo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @author: DB
@ -15,51 +13,49 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysUserLogeBo对象", description = "用户操作日志分页请求参数")
public class SysUserLogBo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "用户操作日志分页请求参数")
public class UserLogBo {
/**
* 操作用户
*/
@ApiModelProperty("操作用户")
@Schema(description ="操作用户")
private String operationUserName;
/**
* 操作终端的IP地址
*/
@ApiModelProperty("操作终端的IP地址")
@Schema(description ="操作终端的IP地址")
private String devIp;
/**
* 结果 -1:失败 1:成功
*/
@ApiModelProperty("结果 -1:失败 1:成功")
@Schema(description ="结果 -1:失败 1:成功")
private Integer result;
/**
* 日志级别,0-提示1-一般2-危险3-高危
*/
@ApiModelProperty("日志级别,0-提示1-一般2-危险3-高危")
@Schema(description ="日志级别,0-提示1-一般2-危险3-高危")
private Integer level;
/**
* 行为类别1-一般行为2-异常行为
*/
@ApiModelProperty("行为类别1-一般行为2-异常行为")
@Schema(description ="行为类别1-一般行为2-异常行为")
private Integer actionType;
/**
* 时间字段
*/
@ApiModelProperty("时间字段")
@Schema(description ="时间字段")
private String fieldTime;
/**
* 用户id
*/
@NotBlank(message = "用户id不能为空")
@ApiModelProperty(value = "用户id",required = true)
@Schema(description = "用户id",requiredMode = Schema.RequiredMode.REQUIRED)
private String userId;
}

View File

@ -26,7 +26,7 @@ import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
/**
@ -99,9 +99,9 @@ public class BackstageBusinessController {
@Operation(summary = "获取市场部员工")
public R<List<StaffVo>> getBusinessStaff() {
List<StaffVo> list = SpringUtils.getBean(StaffService.class).queryChain()
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.STAFF_TYPE.eq(1))
.and(SYS_USER.STATUS.eq(1))
.and(USER.STATUS.eq(1))
.listAs(StaffVo.class);
return R.ok(list);
}

View File

@ -4,9 +4,9 @@ import com.cpop.api.cloudDb.core.dto.*;
import com.cpop.api.cloudDb.handler.*;
import com.cpop.core.base.entity.R;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
* @since 2024-01-09 16:01
*/
@RestController
@Api(tags = "云数据查询接口")
@Tag(name = "云数据查询接口")
@RequestMapping("/backstage/cloudData")
public class BackstageCloudDataController {
@ -53,14 +53,14 @@ public class BackstageCloudDataController {
* @param customerId 客户id
* @return R<Page<CloudCustomerDto>>
*/
@ApiOperation("获取客户分页")
@Operation(summary = "获取客户分页")
@GetMapping("/getCustomerPage")
public R<Page<CloudCustomerDto>> getCustomerPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId) {
public R<Page<CloudCustomerDto>> getCustomerPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId) {
Page<CloudCustomerDto> pageList = cloudCustomerStudentHandler.getCustomerPage(page, pageSize, startDate, endDate, storeId, customerId);
return R.ok(pageList);
}
@ -77,15 +77,15 @@ public class BackstageCloudDataController {
* @param customerId 客户id
* @return R<Page<CloudCustomerDto>>
*/
@ApiOperation("获取学员分页")
@Operation(summary = "获取学员分页")
@GetMapping("/getStudentPage")
public R<Page<CloudStudentDto>> getStudentPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId,
@ApiParam("学员id") @RequestParam(value = "studentId", required = false) String studentId) {
public R<Page<CloudStudentDto>> getStudentPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId,
@Parameter(description = "学员id") @RequestParam(value = "studentId", required = false) String studentId) {
Page<CloudStudentDto> studentPage = cloudCustomerStudentHandler.getStudentPage(page, pageSize, startDate, endDate, storeId, customerId, studentId);
return R.ok(studentPage);
}
@ -102,15 +102,15 @@ public class BackstageCloudDataController {
* @param courseId 课程id
* @return R<Page<CloudCourseDto>>
*/
@ApiOperation("获取课程分页")
@Operation(summary = "获取课程分页")
@GetMapping("/getCoursePage")
public R<Page<CloudCourseDto>> getCoursePage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("课程id") @RequestParam(value = "courseId", required = false) String courseId,
@ApiParam("班id") @RequestParam(value = "classId", required = false) String classId) {
public R<Page<CloudCourseDto>> getCoursePage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "课程id") @RequestParam(value = "courseId", required = false) String courseId,
@Parameter(description = "班id") @RequestParam(value = "classId", required = false) String classId) {
Page<CloudCourseDto> coursePage = cloudCourseHandler.getCoursePage(page, pageSize, startDate, endDate, storeId, courseId, classId);
return R.ok(coursePage);
}
@ -129,16 +129,16 @@ public class BackstageCloudDataController {
* @param courseId 课程id
* @return R<CloudCourseStudentListDto>
*/
@ApiOperation("获取学员上课")
@Operation(summary = "获取学员上课")
@GetMapping("/getCourseStudentList")
public R<CloudCourseStudentListDto> getCourseStudentList(@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId,
@ApiParam("学员id") @RequestParam(value = "studentId", required = false) String studentId,
@ApiParam("课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@ApiParam("教室id") @RequestParam(value = "classId", required = false) String classId,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("课程id") @RequestParam(value = "courseId", required = false) String courseId) {
public R<CloudCourseStudentListDto> getCourseStudentList(@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId,
@Parameter(description = "学员id") @RequestParam(value = "studentId", required = false) String studentId,
@Parameter(description = "课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@Parameter(description = "教室id") @RequestParam(value = "classId", required = false) String classId,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "课程id") @RequestParam(value = "courseId", required = false) String courseId) {
CloudCourseStudentListDto studentListDto = cloudCourseHandler.getCourseStudentList(customerId, studentId, cardId, classId, startDate, endDate, storeId, courseId);
return R.ok(studentListDto);
}
@ -155,14 +155,14 @@ public class BackstageCloudDataController {
* @param classId 教室id
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取班级分页")
@Operation(summary = "获取班级分页")
@GetMapping("/getClassPage")
public R<Page<CloudClassDto>> getClassPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("教室id") @RequestParam(value = "classId", required = false) String classId) {
public R<Page<CloudClassDto>> getClassPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "教室id") @RequestParam(value = "classId", required = false) String classId) {
Page<CloudClassDto> classPage = cloudClassHandler.getClassPage(page, pageSize, startDate, endDate, storeId, classId);
return R.ok(classPage);
}
@ -180,14 +180,14 @@ public class BackstageCloudDataController {
* @param classId 教室id
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取班级学员分页")
@Operation(summary = "获取班级学员分页")
@GetMapping("/getClassStudentPage")
public R<Page<CloudClassStudentDto>> getClassStudentPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("教室id") @RequestParam(value = "classId", required = false) String classId) {
public R<Page<CloudClassStudentDto>> getClassStudentPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "教室id") @RequestParam(value = "classId", required = false) String classId) {
Page<CloudClassStudentDto> classStudentPage = cloudClassHandler.getClassStudentPage(page, pageSize, startDate, endDate, storeId, classId);
return R.ok(classStudentPage);
}
@ -206,16 +206,16 @@ public class BackstageCloudDataController {
* @param orderId 订单id
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取订单分页")
@Operation(summary = "获取订单分页")
@GetMapping("/getOrderPage")
public R<Page<CloudOrderDto>> getOrderPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId,
@ApiParam("课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@ApiParam("订单id") @RequestParam(value = "orderId", required = false) String orderId) {
public R<Page<CloudOrderDto>> getOrderPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId,
@Parameter(description = "课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@Parameter(description = "订单id") @RequestParam(value = "orderId", required = false) String orderId) {
Page<CloudOrderDto> orderPage = cloudOrderHandler.getOrderPage(page, pageSize, startDate, endDate, storeId, customerId, cardId, orderId);
return R.ok(orderPage);
}
@ -235,17 +235,17 @@ public class BackstageCloudDataController {
* @param cardStatus 课卡状态
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取课卡分页")
@Operation(summary = "获取课卡分页")
@GetMapping("/getClassCardPage")
public R<Page<CloudClassCardDto>> getClassCardPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId,
@ApiParam("课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@ApiParam("课卡类型") @RequestParam(value = "cardType", required = false) String cardType,
@ApiParam("课卡状态") @RequestParam(value = "cardStatus", required = false) Integer cardStatus) {
public R<Page<CloudClassCardDto>> getClassCardPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId,
@Parameter(description = "课卡id") @RequestParam(value = "cardId", required = false) String cardId,
@Parameter(description = "课卡类型") @RequestParam(value = "cardType", required = false) String cardType,
@Parameter(description = "课卡状态") @RequestParam(value = "cardStatus", required = false) Integer cardStatus) {
Page<CloudClassCardDto> classCardPage = cloudClassCardHandler.getClassCardPage(page, pageSize, startDate, endDate, storeId, customerId, cardId, cardType, cardStatus);
return R.ok(classCardPage);
}
@ -263,15 +263,15 @@ public class BackstageCloudDataController {
* @param cardId 课卡id
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取课卡记录分页")
@Operation(summary = "获取课卡记录分页")
@GetMapping("/getClassCardRecordPage")
public R<Page<CloudClassCardRecordDto>> getClassCardRecordPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("客户id") @RequestParam(value = "customerId", required = false) String customerId,
@ApiParam("课卡id") @RequestParam(value = "cardId", required = false) String cardId) {
public R<Page<CloudClassCardRecordDto>> getClassCardRecordPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "客户id") @RequestParam(value = "customerId", required = false) String customerId,
@Parameter(description = "课卡id") @RequestParam(value = "cardId", required = false) String cardId) {
Page<CloudClassCardRecordDto> classCardRecordPage = cloudClassCardHandler.getClassCardRecordPage(page, pageSize, startDate, endDate, storeId, customerId, cardId);
return R.ok(classCardRecordPage);
}
@ -288,14 +288,14 @@ public class BackstageCloudDataController {
* @param staffId 员工id
* @return R<Page<CloudClassDto>>
*/
@ApiOperation("获取班级分页")
@Operation(summary = "获取班级分页")
@GetMapping("/getStoreStaffPage")
public R<Page<CloudStaffDto>> getStoreStaffPage(@ApiParam("分页参数") @RequestParam("page") Integer page,
@ApiParam("分页参数") @RequestParam("pageSize") Integer pageSize,
@ApiParam("开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@ApiParam("结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@ApiParam("校区Id") @RequestParam("storeId") String storeId,
@ApiParam("员工id") @RequestParam(value = "staffId", required = false) String staffId) {
public R<Page<CloudStaffDto>> getStoreStaffPage(@Parameter(description = "分页参数") @RequestParam("page") Integer page,
@Parameter(description = "分页参数") @RequestParam("pageSize") Integer pageSize,
@Parameter(description = "开始日期") @RequestParam(value = "startDate", required = false) String startDate,
@Parameter(description = "结束日期") @RequestParam(value = "endDate", required = false) String endDate,
@Parameter(description = "校区Id") @RequestParam("storeId") String storeId,
@Parameter(description = "员工id") @RequestParam(value = "staffId", required = false) String staffId) {
Page<CloudStaffDto> storeStaffPage = cloudStaffHandler.getStoreStaffPage(page, pageSize, startDate, endDate, storeId, staffId);
return R.ok(storeStaffPage);
}

View File

@ -6,27 +6,26 @@ import com.cpop.oam.business.bo.ClueFollowUpBo;
import com.cpop.oam.business.bo.CluePutOffBo;
import com.cpop.oam.business.bo.ClueUpdateBo;
import com.cpop.oam.business.service.ClueRecordService;
import com.cpop.oam.business.service.ClueService;
import com.cpop.oam.business.service.StaffService;
import com.cpop.oam.business.vo.*;
import com.cpop.system.business.entity.DictData;
import com.cpop.system.business.service.DictDataService;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import com.cpop.oam.business.service.ClueService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.*;
import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.ClueRecordTableDef.CLUE_RECORD;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.mybatisflex.core.query.QueryMethods.distinct;
/**
* 线索表 控制层
@ -35,7 +34,7 @@ import static com.mybatisflex.core.query.QueryMethods.distinct;
* @since 2024-02-19
*/
@RestController
@Api(tags = "线索接口")
@Tag(name = "线索接口")
@RequestMapping("/backstage/clue")
public class BackstageClueController {
@ -51,16 +50,16 @@ public class BackstageClueController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("个人线索分页")
@Operation(summary = "个人线索分页")
@GetMapping("/getPersonCluePage")
public R<Page<CluePageVo>> getPersonCluePage(@ApiParam(value = "线索状态") @RequestParam(value = "clueStatus", required = false) Integer clueStatus,
@ApiParam(value = "地区") @RequestParam(value = "city", required = false) String city,
@ApiParam(value = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@ApiParam(value = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@ApiParam(value = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone,
@ApiParam(value = "员工id") @RequestParam(value = "staffId", required = false) String staffId,
@ApiParam(value = "签约月份") @RequestParam(value = "signMonth", required = false) String signMonth,
@ApiParam(value = "更进状态") @RequestParam(value = "followStatus", required = false) Integer followStatus) {
public R<Page<CluePageVo>> getPersonCluePage(@Parameter(description = "线索状态") @RequestParam(value = "clueStatus", required = false) Integer clueStatus,
@Parameter(description = "地区") @RequestParam(value = "city", required = false) String city,
@Parameter(description = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@Parameter(description = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@Parameter(description = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone,
@Parameter(description = "员工id") @RequestParam(value = "staffId", required = false) String staffId,
@Parameter(description = "签约月份") @RequestParam(value = "signMonth", required = false) String signMonth,
@Parameter(description = "更进状态") @RequestParam(value = "followStatus", required = false) Integer followStatus) {
Page<CluePageVo> pageVo = clueService.getPersonCluePage(clueStatus, city, brandId, storeId, chargeOrPhone, staffId, signMonth,followStatus);
return R.ok(pageVo);
}
@ -72,10 +71,10 @@ public class BackstageClueController {
* @param signMonth 签约月份
* @return R<PersonSignGoalVo>
*/
@ApiOperation("获取个人签约目标")
@Operation(summary = "获取个人签约目标")
@GetMapping("/getPersonSignGoal")
public R<PersonSignGoalVo> getPersonSignGoal(@ApiParam(value = "签约月份") @RequestParam(value = "signMonth", required = false) String signMonth,
@ApiParam(value = "员工id") @RequestParam(value = "staffId", required = false) String staffId) {
public R<PersonSignGoalVo> getPersonSignGoal(@Parameter(description = "签约月份") @RequestParam(value = "signMonth", required = false) String signMonth,
@Parameter(description = "员工id") @RequestParam(value = "staffId", required = false) String staffId) {
PersonSignGoalVo vo = clueService.getPersonSignGoal(signMonth, staffId);
return R.ok(vo);
}
@ -87,7 +86,7 @@ public class BackstageClueController {
* @param bo 请求对象
* @return R<Void>
*/
@ApiOperation("线索跟进")
@Operation(summary = "线索跟进")
@PostMapping("/clueFollowUp")
public R<Void> clueFollowUp(@Validated @RequestBody ClueFollowUpBo bo) {
clueService.clueFollowUp(bo);
@ -101,9 +100,9 @@ public class BackstageClueController {
* @param clueId 线索id
* @return R<List<ClueFollowUpRecordVo>>
*/
@ApiOperation("线索跟进记录")
@Operation(summary = "线索跟进记录")
@GetMapping("/getClueFollowUpRecord")
public R<List<ClueFollowUpRecordVo>> getClueFollowUpRecord(@ApiParam(value = "线索id") @RequestParam(value = "clueId") String clueId) {
public R<List<ClueFollowUpRecordVo>> getClueFollowUpRecord(@Parameter(description = "线索id") @RequestParam(value = "clueId") String clueId) {
List<ClueFollowUpRecordVo> vos = clueRecordService.listAs(QueryWrapper.create()
.select(CLUE_RECORD.CREATE_TIME, CLUE_RECORD.RECORD_CONTENT, CLUE_RECORD.RECORD_FILE_URL)
.select(STAFF.NAME.as(ClueFollowUpRecordVo::getStaffName))
@ -122,9 +121,9 @@ public class BackstageClueController {
* @param clueId 线索id
* @return R<List<ClueRecordVo>>
*/
@ApiOperation("线索记录")
@Operation(summary = "线索记录")
@GetMapping("/getClueRecordList")
public R<List<ClueRecordVo>> getClueRecordList(@ApiParam(value = "线索id") @RequestParam(value = "clueId") String clueId) {
public R<List<ClueRecordVo>> getClueRecordList(@Parameter(description = "线索id") @RequestParam(value = "clueId") String clueId) {
List<ClueRecordVo> vos = clueRecordService.listAs(QueryWrapper.create()
.select(CLUE_RECORD.CREATE_TIME, CLUE_RECORD.RECORD_CONTENT,CLUE_RECORD.RECORD_TYPE)
.and(CLUE_RECORD.CLUE_ID.eq(clueId))
@ -140,7 +139,7 @@ public class BackstageClueController {
* @param bo 请求对象
* @return R<Void>
*/
@ApiOperation("线索更新")
@Operation(summary = "线索更新")
@PostMapping("/clueUpdate")
public R<Void> clueUpdate(@Validated @RequestBody ClueUpdateBo bo) {
clueService.clueUpdate(bo);
@ -154,9 +153,9 @@ public class BackstageClueController {
* @param clueId 线索id
* @return R<List<ClueFollowUpRecordVo>>
*/
@ApiOperation("线索更新记录")
@Operation(summary = "线索更新记录")
@GetMapping("/getClueUpdateRecord")
public R<ClueUpdateVo> getClueUpdateRecord(@ApiParam(value = "线索id") @RequestParam(value = "clueId") String clueId) {
public R<ClueUpdateVo> getClueUpdateRecord(@Parameter(description = "线索id") @RequestParam(value = "clueId") String clueId) {
ClueUpdateVo vo = clueService.getClueUpdateRecord(clueId);
return R.ok(vo);
}
@ -168,7 +167,7 @@ public class BackstageClueController {
* @param bo 请求对象
* @return R<Void>
*/
@ApiOperation("线索延期")
@Operation(summary = "线索延期")
@PostMapping("/cluePutOff")
public R<Void> cluePutOff(@Validated @RequestBody CluePutOffBo bo) {
clueService.cluePutOff(bo);
@ -182,9 +181,9 @@ public class BackstageClueController {
* @param clueId 线索id
* @return R<List<CluePutOffVo>>
*/
@ApiOperation("线索延期记录")
@Operation(summary = "线索延期记录")
@GetMapping("/getCluePutOffRecord")
public R<List<CluePutOffVo>> getCluePutOffRecord(@ApiParam(value = "线索id") @RequestParam(value = "clueId") String clueId) {
public R<List<CluePutOffVo>> getCluePutOffRecord(@Parameter(description = "线索id") @RequestParam(value = "clueId") String clueId) {
List<CluePutOffVo> vos = clueService.getCluePutOffRecord(clueId);
return R.ok(vos);
}
@ -196,9 +195,9 @@ public class BackstageClueController {
* @param id 线索id
* @return R<Void>
*/
@ApiOperation("线索脱离")
@Operation(summary = "线索脱离")
@PutMapping("/clueDetachment/{id}")
public R<Void> clueDetachment(@PathVariable @ApiParam(value = "线索id") String id) {
public R<Void> clueDetachment(@PathVariable @Parameter(description = "线索id") String id) {
clueService.clueDetachment(id);
return R.ok();
}
@ -209,12 +208,12 @@ public class BackstageClueController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("地区线索分页")
@Operation(summary = "地区线索分页")
@GetMapping("/getAreaCluePage")
public R<Page<CluePageVo>> getAreaCluePage(@ApiParam(value = "地区") @RequestParam(value = "city", required = false) String city,
@ApiParam(value = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@ApiParam(value = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@ApiParam(value = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
public R<Page<CluePageVo>> getAreaCluePage(@Parameter(description = "地区") @RequestParam(value = "city", required = false) String city,
@Parameter(description = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@Parameter(description = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@Parameter(description = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
Page<CluePageVo> pageVo = clueService.getAreaCluePage( city, brandId, storeId, chargeOrPhone);
return R.ok(pageVo);
}
@ -225,12 +224,12 @@ public class BackstageClueController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("公共线索分页")
@Operation(summary = "公共线索分页")
@GetMapping("/getPublicCluePage")
public R<Page<CluePageVo>> getPublicCluePage(@ApiParam(value = "地区") @RequestParam(value = "city", required = false) String city,
@ApiParam(value = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@ApiParam(value = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@ApiParam(value = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
public R<Page<CluePageVo>> getPublicCluePage(@Parameter(description = "地区") @RequestParam(value = "city", required = false) String city,
@Parameter(description = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@Parameter(description = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@Parameter(description = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
Page<CluePageVo> pageVo = clueService.getPublicCluePage( city, brandId, storeId, chargeOrPhone);
return R.ok(pageVo);
}
@ -242,9 +241,9 @@ public class BackstageClueController {
* @param id 线索id
* @return R<Void>
*/
@ApiOperation("线索领取")
@Operation(summary = "线索领取")
@PutMapping("/clueCollection/{id}")
public R<Void> clueCollection(@PathVariable @ApiParam(value = "线索id") String id) {
public R<Void> clueCollection(@PathVariable @Parameter(description = "线索id") String id) {
clueService.clueCollection(id);
return R.ok();
}
@ -255,12 +254,12 @@ public class BackstageClueController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("我的开发分页")
@Operation(summary = "我的开发分页")
@GetMapping("/getMyDevCluePage")
public R<Page<CluePageVo>> getMyDevCluePage(@ApiParam(value = "地区") @RequestParam(value = "city", required = false) String city,
@ApiParam(value = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@ApiParam(value = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@ApiParam(value = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
public R<Page<CluePageVo>> getMyDevCluePage(@Parameter(description = "地区") @RequestParam(value = "city", required = false) String city,
@Parameter(description = "品牌") @RequestParam(value = "brandId", required = false) String brandId,
@Parameter(description = "校区") @RequestParam(value = "storeId", required = false) String storeId,
@Parameter(description = "负责人或手机号") @RequestParam(value = "chargeOrPhone", required = false) String chargeOrPhone) {
Page<CluePageVo> pageVo = clueService.getMyDevCluePage( city, brandId, storeId, chargeOrPhone);
return R.ok(pageVo);
}
@ -271,7 +270,7 @@ public class BackstageClueController {
* @since 2024/2/27
* @return R<Page<CluePageVo>>
*/
@ApiOperation("获取区域列表")
@Operation(summary = "获取区域列表")
@GetMapping("/getAreaList")
public R<List<Map<String,String>>> getAreaList() {
List<DictData> dictDataByDictType = SpringUtils.getBean(DictDataService.class).getDictDataByDictType("oam_clue_area")
@ -297,12 +296,12 @@ public class BackstageClueController {
* @return R<List<StaffVo>>
*/
@GetMapping("/getMarketStaff")
@ApiOperation("获取市场部员工")
@Operation(summary = "获取市场部员工")
public R<List<StaffVo>> getBusinessStaff() {
List<StaffVo> list = SpringUtils.getBean(StaffService.class).queryChain()
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.STAFF_TYPE.in(1, 2))
.and(SYS_USER.STATUS.eq(1))
.and(USER.STATUS.eq(1))
.listAs(StaffVo.class);
return R.ok(list);
}

View File

@ -13,17 +13,18 @@ import com.cpop.system.business.service.StoreService;
import com.cpop.system.business.vo.BrandListVo;
import com.cpop.system.business.vo.SysFileVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@ -37,7 +38,7 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
* @since 2023-12-10
*/
@RestController
@Api(tags = "数据导入接口")
@Tag(name = "数据导入接口")
@RequestMapping("/backstage/dataImport")
public class BackstageDataImportController {
@ -58,7 +59,7 @@ public class BackstageDataImportController {
* @return R<Page<DataImportPageVo>>
*/
@GetMapping("/getDataImportPage")
@ApiOperation("数据导入分页查询")
@Operation(summary = "数据导入分页查询")
public R<Page<DataImportPageVo>> getDataImportPage(DataImportPageBo bo) {
Page<DataImportPageVo> page = dataImportService.getDataImportPage(bo);
return R.ok(page);
@ -71,9 +72,9 @@ public class BackstageDataImportController {
* @author DB
* @since 2023-11-30 17:59:29
*/
@ApiOperation("获取品牌列表")
@Operation(summary = "获取品牌列表")
@GetMapping("/getBrandList")
public R<List<BrandListVo>> getBrandList(@ApiParam("品牌名") String brandName) {
public R<List<BrandListVo>> getBrandList(@Parameter(description = "品牌名") String brandName) {
List<BrandListVo> list = brandService.queryChain().and(BRAND.BRAND_NAME.like(brandName)).listAs(BrandListVo.class);
return R.ok(list);
}
@ -85,9 +86,9 @@ public class BackstageDataImportController {
* @author DB
* @since 2023-11-30 18:00:08
*/
@ApiOperation("获取校区/店铺列表")
@Operation(summary = "获取校区/店铺列表")
@GetMapping("/getStoreList")
public R<List<StoreListVo>> getStoreList(@ApiParam("品牌id") String brandId) {
public R<List<StoreListVo>> getStoreList(@Parameter(description = "品牌id") String brandId) {
List<StoreListVo> list = storeService.queryChain().and(STORE.BRAND_ID.eq(brandId)).listAs(StoreListVo.class);
return R.ok(list);
}
@ -100,7 +101,7 @@ public class BackstageDataImportController {
* @return boolean
*/
@PostMapping("/insertDataImport")
@ApiOperation("新增数据导入")
@Operation(summary = "新增数据导入")
public R<Void> insertDataImport(@RequestBody @Validated DataImportBo bo) {
dataImportService.insertDataImport(bo);
return R.ok();
@ -113,8 +114,8 @@ public class BackstageDataImportController {
* @return {@code true} 删除成功{@code false} 删除失败
*/
@DeleteMapping("/removeById/{id}")
@ApiOperation("根据主键删除未导入数据记录")
public R<Void> removeById(@PathVariable @ApiParam("数据导入主键") String id) {
@Operation(summary = "根据主键删除未导入数据记录")
public R<Void> removeById(@PathVariable @Parameter(description = "数据导入主键") String id) {
dataImportService.removeById(id);
return R.ok();
}
@ -126,7 +127,7 @@ public class BackstageDataImportController {
* @param file 文件
* @return R<SysFileVo>
*/
@ApiOperation("检查上传的文件")
@Operation(summary = "检查上传的文件")
@PostMapping("/checkImportData")
public R<SysFileVo> checkImportData(@RequestParam("file") MultipartFile file){
SysFileVo sysFileVo = dataImportService.checkImportData(file);
@ -139,9 +140,9 @@ public class BackstageDataImportController {
* @since 2023/12/10
* @return R<Void>
*/
@ApiOperation("立即导入")
@Operation(summary = "立即导入")
@PutMapping("/importNow/{id}")
public R<Void> importNow(@PathVariable @ApiParam("数据导入主键") String id) {
public R<Void> importNow(@PathVariable @Parameter(description = "数据导入主键") String id) {
dataImportService.importNow(id);
return R.ok();
}
@ -152,14 +153,14 @@ public class BackstageDataImportController {
* @since 2023/12/10
* @param response 响应
*/
@ApiOperation("模板下载")
@Operation(summary = "模板下载")
@GetMapping("/download")
public void download(HttpServletResponse response) throws IOException {
// 这里注意 有同学反应使用swagger 会导致各种问题请直接用浏览器或者用postman
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
// 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系
String fileName = URLEncoder.encode("数据导入模板", "UTF-8").replaceAll("\\+", "%20");
String fileName = URLEncoder.encode("数据导入模板", StandardCharsets.UTF_8).replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), DataImportDto.class).sheet("模板").doWrite(new ArrayList<>());
}

View File

@ -1,14 +1,13 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.oam.business.service.DeptService;
import com.cpop.oam.business.vo.DeptVo;
import com.cpop.core.base.entity.R;
import com.cpop.oam.business.bo.DeptBo;
import com.cpop.oam.business.bo.DeptListBo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.cpop.oam.business.service.DeptService;
import com.cpop.oam.business.vo.DeptVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -21,7 +20,7 @@ import java.util.List;
* @since 2023-09-08
*/
@RestController
@Api(tags = "系统部门模块")
@Tag(name = "系统部门模块")
@RequestMapping("/backstage/dept")
public class BackstageDeptController {
@ -29,14 +28,13 @@ public class BackstageDeptController {
private DeptService deptService;
/**
* @Description: 查询部门树列表
* 查询部门树列表
* @param bo 请求参数
* @return R<List<SysDeptVo>>
* @Author DB
* @Date: 2023/5/9 20:45
* @author DB
* @since 2023/5/9 20:45
*/
@PreAuthorize("@aps.hasPermission('system:dept:list')")
@ApiOperation("查询部门树列表")
@Operation(summary = "查询部门树列表")
@GetMapping("/getDeptTreeList")
public R<List<DeptVo>> getDeptTreeList(DeptListBo bo) {
List<DeptVo> list = deptService.getDeptTreeList(bo);
@ -44,14 +42,13 @@ public class BackstageDeptController {
}
/**
* @Description: 新增部门
* 新增部门
* @param bo 请求参数
* @return R<Void>
* @Author DB
* @Date: 2023/5/9 20:47
* @author DB
* @since 2023/5/9 20:47
*/
@PreAuthorize("@aps.hasPermission('system:dept:insert')")
@ApiOperation("新增部门")
@Operation(summary = "新增部门")
@PostMapping("/insertDept")
public R<Void> insertDept(@Validated @RequestBody DeptBo bo) {
deptService.insertDept(bo);
@ -59,14 +56,13 @@ public class BackstageDeptController {
}
/**
* @Description: 修改部门
* 修改部门
* @param bo 请求参数
* @return R<Void>
* @Author DB
* @Date: 2023/5/9 20:47
* @author DB
* @since 2023/5/9 20:47
*/
@PreAuthorize("@aps.hasPermission('system:dept:update')")
@ApiOperation("修改部门")
@Operation(summary = "修改部门")
@PutMapping("/updateDept")
public R<Void> updateDept(@Validated @RequestBody DeptBo bo) {
deptService.updateDept(bo);
@ -74,13 +70,12 @@ public class BackstageDeptController {
}
/**
* @Description: 删除部门
* 删除部门
* @param id 主键
* @Author DB
* @Date: 2023/5/9 20:48
* @author DB
* @since 2023/5/9 20:48
*/
@PreAuthorize("@aps.hasPermission('system:dept:remove')")
@ApiOperation("删除部门")
@Operation(summary = "删除部门")
@DeleteMapping("/removeDept/{id}")
public R<Void> removeDept(@PathVariable String id) {
deptService.removeDept(id);

View File

@ -8,16 +8,15 @@ import com.cpop.oam.business.service.StaffService;
import com.cpop.oam.business.vo.DutyListVo;
import com.cpop.oam.business.vo.StaffVo;
import com.mybatisflex.core.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
/**
@ -27,7 +26,7 @@ import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
* @since 2023-09-14
*/
@RestController
@Api(tags = "值班日历模块")
@Tag(name = "值班日历模块")
@RequestMapping("/backstage/duty")
public class BackstageDutyController {
@ -38,14 +37,13 @@ public class BackstageDutyController {
private StaffService staffService;
/**
* @Description: 查询值班列表(当月)
* 查询值班列表(当月)
* @param bo 请求参数
* @return: R<List<DutyListVo>>
* @Author: DB
* @Date: 2023/5/11 16:39
* @return R<List<DutyListVo>>
* @author DB
* @since 2023/5/11 16:39
**/
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:list')")
@ApiOperation("查询值班列表(当月)")
@Operation(summary = "查询值班列表(当月)")
@GetMapping("/getDutyList")
public R<List<DutyListVo>> getDutyList(DutyListBo bo) {
List<DutyListVo> list = dutyService.getDutyList(bo);
@ -53,14 +51,13 @@ public class BackstageDutyController {
}
/**
* @Description: 新增值班
* 新增值班
* @param bo 请求参数
* @return: R<Void>
* @Author: DB
* @Date: 2023/5/18 9:50
* @return R<Void>
* @author DB
* @since 2023/5/18 9:50
**/
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:management')")
@ApiOperation("新增值班")
@Operation(summary = "新增值班")
@PostMapping("/insertDuty")
public R<Void> insertDuty(@RequestBody @Validated DutyBo bo) {
dutyService.insertDuty(bo);
@ -68,14 +65,13 @@ public class BackstageDutyController {
}
/**
* @descriptions 删除值班信息
* 删除值班信息
* @author DB
* @date 2023/09/14 18:16
* @since 2023/09/14 18:16
* @param dutyDate 值班日期
* @return com.pupu.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:management')")
@ApiOperation("删除值班信息")
@Operation(summary = "删除值班信息")
@DeleteMapping("/removeDutyByDate/{dutyDate}")
public R<Void> removeDutyByDate(@PathVariable String dutyDate) {
dutyService.removeDutyByDate(dutyDate);
@ -83,12 +79,12 @@ public class BackstageDutyController {
}
/**
* @Description: 查询服务员工列表
* @return: R<List<OamStaffVo>>
* @Author: DB
* @Date: 2023/5/11 17:49
* 查询服务员工列表
* @return R<List<OamStaffVo>>
* @author DB
* @since 2023/5/11 17:49
**/
@ApiOperation("查询服务员工列表")
@Operation(summary = "查询服务员工列表")
@GetMapping("/getServiceStaffList")
public R<List<StaffVo>> getServiceStaffList() {
List<StaffVo> list = staffService.getServiceStaffList();
@ -96,21 +92,21 @@ public class BackstageDutyController {
}
/**
* @Description: 查询技术员工列表
* @return: R<PageVo<StaffPageVo>>
* @Author: DB
* @Date: 2023/5/11 17:50
* 查询技术员工列表
* @return R<PageVo<StaffPageVo>>
* @author DB
* @since 2023/5/11 17:50
**/
@ApiOperation("查询技术员工列表")
@Operation(summary = "查询技术员工列表")
@GetMapping("/getTechnologyStaffList")
public R<List<StaffVo>> getTechnologyStaffList() {
List<StaffVo> list = staffService.listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME, STAFF.USER_ID, STAFF.STAFF_TYPE)
.from(STAFF)
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.STAFF_TYPE.eq(0))
//不查询停用的员工
.and(SYS_USER.STATUS.eq(true)),
.and(USER.STATUS.eq(true)),
StaffVo.class);
return R.ok(list);
}

View File

@ -1,7 +1,7 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.R;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.*;
import com.cpop.oam.business.entity.FinanceReimburseType;
import com.cpop.oam.business.service.FinanceReimburseService;
@ -10,10 +10,9 @@ import com.cpop.oam.business.service.FinanceReimburseTypeService;
import com.cpop.oam.business.vo.*;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -29,7 +28,7 @@ import static com.cpop.oam.business.entity.table.FinanceReimburseTableDef.FINANC
* @since 2023-09-20
*/
@RestController
@Api(tags = "财务报销模块")
@Tag(name = "财务报销模块")
@RequestMapping("/backstage/financeReimburse")
public class BackstageFinanceReimburseController {
@ -43,14 +42,13 @@ public class BackstageFinanceReimburseController {
private FinanceReimburseStageService financeReimburseStageService;
/**
* @Description: 财务报销模块-报销分页列表
* 财务报销模块-报销分页列表
* @param bo 请求参数
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@PreAuthorize("@aps.hasPermission('financial:application:list')")
@ApiOperation("财务报销模块-报销申请分页列表")
@Operation(summary = "财务报销模块-报销申请分页列表")
@GetMapping("/getFinanceReimbursePage")
public R<Page<FinanceReimbursePageVo>> getFinanceReimbursePage(FinanceReimbursePageBo bo) {
Page<FinanceReimbursePageVo> pageVo = financeReimburseService.getFinanceReimbursePage(bo);
@ -58,12 +56,12 @@ public class BackstageFinanceReimburseController {
}
/**
* @Description: 财务报销模块-报销类型列表
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* 财务报销模块-报销类型列表
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@ApiOperation("财务报销模块-报销类型列表")
@Operation(summary = "财务报销模块-报销类型列表")
@GetMapping("/getFinanceReimburseTypeList")
public R<List<FinanceReimburseTypeListVo>> getFinanceReimburseTypeList() {
List<FinanceReimburseTypeListVo> list = financeReimburseTypeService.listAs(QueryWrapper.create(), FinanceReimburseTypeListVo.class);
@ -71,13 +69,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 新增报销申请
* 新增报销申请
* @author DB
* @date 2023/09/21 15:55
* @since 2023/09/21 15:55
* @param bo 请求参数
* @return com.pupu.core.base.R<java.lang.Void>
*/
@ApiOperation("新增报销申请")
@Operation(summary = "新增报销申请")
@PostMapping("/insertReimburseApplication")
public R<Void> insertReimburseApplication(@RequestBody @Validated ReimburseApplicationBo bo) {
financeReimburseService.insertReimburseApplication(bo);
@ -91,7 +89,7 @@ public class BackstageFinanceReimburseController {
* @param bo 请求
* @return R<Void>
*/
@ApiOperation("修改报销申请")
@Operation(summary = "修改报销申请")
@PutMapping("/updateReimburseApplication")
public R<Void> updateReimburseApplication(@RequestBody @Validated ReimburseApplicationBo bo) {
financeReimburseService.updateReimburseApplication(bo);
@ -105,8 +103,7 @@ public class BackstageFinanceReimburseController {
* @author DB
* @since : 2023/5/30 15:44
**/
@PreAuthorize("@aps.hasPermission('financial:audit:list')")
@ApiOperation("财务报销模块-报销审核分页列表")
@Operation(summary = "财务报销模块-报销审核分页列表")
@GetMapping("/getReimburseAuditPage")
public R<Page<FinanceReimburseAuditPageVo>> getReimburseAuditPage(FinanceReimburseAuditPageBo bo) {
Page<FinanceReimburseAuditPageVo> pageVo = financeReimburseService.getReimburseAuditPage(bo);
@ -114,12 +111,12 @@ public class BackstageFinanceReimburseController {
}
/**
* @Description: 修改报销状态
* 修改报销状态
* @param bo 请求参数
* @Author: DB
* @Date: 2023/5/10 16:01
* @author DB
* @since 2023/5/10 16:01
**/
@ApiOperation("修改报销状态")
@Operation(summary = "修改报销状态")
@PutMapping("/updateReimburseStatus")
public R<Void> updateReimburseStatus(@RequestBody @Validated ReimburseStatusBo bo) {
financeReimburseService.updateReimburseStatus(bo);
@ -127,13 +124,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 新增报销类型
* 新增报销类型
* @author DB
* @date 2023/09/21 15:55
* @since 2023/09/21 15:55
* @param bo 请求参数
* @return com.pupu.core.base.R<java.lang.Void>
*/
@ApiOperation("新增报销类型")
@Operation(summary = "新增报销类型")
@PostMapping("/insertReimburseType")
public R<Void> insertReimburseApplication(@RequestBody @Validated ReimburseTypeBo bo) {
financeReimburseTypeService.save(BeanUtils.mapToClass(bo, FinanceReimburseType.class));
@ -141,13 +138,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 修改报销类型
* 修改报销类型
* @author DB
* @date 2023/09/08 15:20
* @since 2023/09/08 15:20
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@ApiOperation("修改报销类型")
@Operation(summary = "修改报销类型")
@PutMapping("/updateReimburseType")
public R<Void> updateReimburseType(@RequestBody @Validated ReimburseTypeBo bo) {
financeReimburseTypeService.updateById(BeanUtils.mapToClass(bo, FinanceReimburseType.class));
@ -155,13 +152,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 删除报销类型
* 删除报销类型
* @author DB
* @date 2023/09/12 16:57
* @since 2023/09/12 16:57
* @param id 主键
* @return com.jambox.core.base.R<java.lang.Void>
*/
@ApiOperation("删除报销类型")
@Operation(summary = "删除报销类型")
@DeleteMapping("/removeReimburseTypeById/{id}")
public R<Void> removeReimburseTypeById(@PathVariable String id) {
financeReimburseTypeService.removeById(id);
@ -169,23 +166,23 @@ public class BackstageFinanceReimburseController {
}
/**
* @Description: 财务报销模块-个人报销统计
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* 财务报销模块-个人报销统计
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@ApiOperation("财务报销模块-个人报销统计")
@Operation(summary = "财务报销模块-个人报销统计")
@GetMapping("/getPersonStatistic")
public R<ReimbursePersonStatisticVo> getPersonStatistic() {
return R.ok(financeReimburseService.getPersonStatistic());
}
/**
* @Description: 审核员工申请报销
* @Author: DB
* @Date: 2023/5/10 16:01
* 审核员工申请报销
* @author DB
* @since 2023/5/10 16:01
**/
@ApiOperation("审核员工申请报销")
@Operation(summary = "审核员工申请报销")
@PutMapping("/auditReimburseApplication/{id}")
public R<Void> auditReimburseApplication(@PathVariable String id) {
financeReimburseService.updateChain().set(FINANCE_REIMBURSE.STATUS, 1).where(FINANCE_REIMBURSE.ID.eq(id)).update();
@ -193,13 +190,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 报销驳回
* 报销驳回
* @author DB
* @date 2023/09/08 15:20
* @since 2023/09/08 15:20
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@ApiOperation("报销驳回")
@Operation(summary = "报销驳回")
@PutMapping("/reimburseReject")
public R<Void> reimburseReject(@RequestBody @Validated ReimburseRejectBo bo) {
financeReimburseService.updateChain()
@ -211,13 +208,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @descriptions 报销下款
* 报销下款
* @author DB
* @date 2023/09/08 15:20
* @since 2023/09/08 15:20
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@ApiOperation("报销下款")
@Operation(summary = "报销下款")
@PutMapping("/reimbursePay")
public R<Void> reimbursePay(@RequestBody @Validated ReimbursePayBo bo) {
financeReimburseService.reimbursePay(bo);
@ -225,13 +222,13 @@ public class BackstageFinanceReimburseController {
}
/**
* @Description: 财务报销模块-报销分页列表
* 财务报销模块-报销分页列表
* @param id 报销主键
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@ApiOperation("财务报销模块-报销详情记录列表")
@Operation(summary = "财务报销模块-报销详情记录列表")
@GetMapping("/getReimburseRecordList/{id}")
public R<List<FinanceReimburseRecordListVo>> getReimburseRecordList(@PathVariable String id) {
List<FinanceReimburseRecordListVo> list = financeReimburseStageService.listAs(QueryWrapper.create()

View File

@ -4,15 +4,13 @@ import com.cpop.core.base.entity.R;
import com.cpop.core.utils.SpringUtils;
import com.cpop.oam.business.bo.MallStaffBo;
import com.cpop.oam.business.service.OamMallService;
import com.cpop.system.business.vo.BrandListVo;
import com.cpop.oam.business.vo.MallStaffPageVo;
import com.cpop.system.business.service.BrandService;
import com.cpop.system.business.vo.BrandListVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -20,26 +18,25 @@ import java.util.List;
/**
* @author DB
* @createTime 2023/11/09 14:40
* @description
* @since 2023/11/09 14:40
*/
@RestController
@Api(tags = "商城管理模块")
@Tag(name = "商城管理模块")
@RequestMapping("/backstage/oamMall")
@Deprecated(since = "1.1.0")
public class BackstageOamMallController {
@Autowired
private OamMallService oamMallService;
/**
* @descriptions 查询商城管理员分页列表
* 查询商城管理员分页列表
* @author DB
* @date 2023/11/09 15:33
* @since 2023/11/09 15:33
* @param brandIds 品牌id集合
* @param name 姓名
* @return: com.cpop.core.base.entity.R<com.mybatisflex.core.paginate.Page<com.cpop.oam.business.vo.MallStaffPageVo>>
* @return com.cpop.core.base.entity.R<com.mybatisflex.core.paginate.Page<com.cpop.oam.business.vo.MallStaffPageVo>>
*/
@PreAuthorize("@aps.hasPermission('mall:admin:list')")
@ApiOperation("查询商城管理员分页列表")
@GetMapping("/getMallStaffPage")
public R<Page<MallStaffPageVo>> getMallStaffPage(String brandIds, String name) {
Page<MallStaffPageVo> page = oamMallService.getMallStaffPage(brandIds, name);
@ -47,12 +44,11 @@ public class BackstageOamMallController {
}
/**
* @descriptions 查询品牌列表
* 查询品牌列表
* @author DB
* @date 2023/11/10 11:45
* @return: com.cpop.core.base.entity.R<java.util.List<com.cpop.system.business.vo.BrandListVo>>
* @since 2023/11/10 11:45
* @return com.cpop.core.base.entity.R<java.util.List<com.cpop.system.business.vo.BrandListVo>>
*/
@ApiOperation("查询品牌列表")
@GetMapping("/getBrandList")
public R<List<BrandListVo>> getBrandList() {
List<BrandListVo> list = SpringUtils.getBean(BrandService.class).queryChain().listAs(BrandListVo.class);
@ -60,29 +56,27 @@ public class BackstageOamMallController {
}
/**
* @descriptions 用户名是否存在
* 用户名是否存在
* @author DB
* @date 2023/11/10 12:03
* @since 2023/11/10 12:03
* @param username 用户名
* @param id id
* @param userType 用户类型
* @return: com.cpop.core.base.entity.R<java.lang.Void>
* @return com.cpop.core.base.entity.R<java.lang.Void>
*/
@ApiOperation("用户名是否存在")
@GetMapping("/isAccountExist")
public R<Void> isAccountExist(@ApiParam("用户名") String username, @ApiParam("userId") String id, @ApiParam("用户类型") String userType) {
SpringUtils.getBean(CoreService.class).isAccountExist(username, id, userType);
public R<Void> isAccountExist(@Parameter(description = "用户名") String username, @Parameter(description = "userId") String id, @Parameter(description = "用户类型") String userType) {
//SpringUtils.getBean(UserService.class).isAccountExist(username, id, userType);
return R.ok();
}
/**
* @descriptions 新增管理员
* 新增管理员
* @author DB
* @date 2023/09/08 14:04
* @since 2023/09/08 14:04
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@ApiOperation("新增管理员")
@PostMapping("/insertAdmin")
public R<Void> insertAdmin(@RequestBody @Validated MallStaffBo bo) {
oamMallService.insertAdmin(bo);
@ -90,13 +84,12 @@ public class BackstageOamMallController {
}
/**
* @descriptions 删除管理员
* 删除管理员
* @author DB
* @date 2023/11/10 14:33
* @since 2023/11/10 14:33
* @param id 主键
* @return: com.cpop.core.base.entity.R<java.lang.Void>
* @return com.cpop.core.base.entity.R<java.lang.Void>
*/
@ApiOperation("删除管理员")
@DeleteMapping("/removeAdmin/{id}")
public R<Void> removeAdmin(@PathVariable String id) {
oamMallService.removeAdmin(id);

View File

@ -5,9 +5,8 @@ import com.cpop.oam.business.bo.PutOffAuditBo;
import com.cpop.oam.business.service.CluePutOffService;
import com.cpop.oam.business.vo.PutOffAuditPageVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -17,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
* @version 1.0.0
* @since 2024-02-21 13:40
*/
@Api(tags = "延期审核接口")
@Tag(name = "延期审核接口")
@RestController
@RequestMapping("/backstage/putOff")
public class BackstagePutOffController {
@ -31,7 +30,7 @@ public class BackstagePutOffController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("延期审核分页")
@Operation(summary = "延期审核分页")
@GetMapping("/getPutOffAuditPage")
public R<Page<PutOffAuditPageVo>> getPutOffAuditPage() {
Page<PutOffAuditPageVo> pageVo = cluePutOffService.getPutOffAuditPage();
@ -45,7 +44,7 @@ public class BackstagePutOffController {
* @param bo 通过与驳回
* @return R<Void>
*/
@ApiOperation("延期审核选择")
@Operation(summary = "延期审核选择")
@PutMapping("/putOffAuditSelect")
public R<Void> putOffAuditSelect(@RequestBody @Validated PutOffAuditBo bo) {
cluePutOffService.putOffAuditSelect(bo);

View File

@ -1,15 +1,18 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.R;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysConfig;
import com.cpop.core.base.table.Config;
import com.cpop.core.service.ConfigService;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
import com.cpop.oam.business.bo.*;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.SignGoalBo;
import com.cpop.oam.business.bo.SignGoalConfigInfoBo;
import com.cpop.oam.business.service.CommonService;
import com.cpop.oam.business.service.SignAreaService;
import com.cpop.oam.business.service.SignGoalService;
import com.cpop.oam.business.vo.SignGoalConfigInfoVo;
import com.cpop.oam.business.vo.SignGoalPageVo;
import com.cpop.oam.framework.constant.OamConfigKey;
@ -17,27 +20,18 @@ import com.cpop.oam.framework.enums.OamConfigEnum;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.DbChain;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import com.cpop.oam.business.service.SignGoalService;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import static com.cpop.core.base.table.table.SysConfigTableDef.SYS_CONFIG;
import static com.cpop.core.base.table.table.ConfigTableDef.CONFIG;
import static com.cpop.oam.business.entity.table.SignAreaTableDef.SIGN_AREA;
/**
@ -47,7 +41,7 @@ import static com.cpop.oam.business.entity.table.SignAreaTableDef.SIGN_AREA;
* @since 2024-02-19
*/
@RestController
@Api(tags = "签约目标接口")
@Tag(name = "签约目标接口")
@RequestMapping("/backstage/signGoal")
public class BackstageSignGoalController {
@ -60,7 +54,7 @@ public class BackstageSignGoalController {
* @since 2024/2/19
* @return R<Page<SignGoalPageVo>>
*/
@ApiOperation("签约指标分页")
@Operation(summary = "签约指标分页")
@GetMapping("/getSignGoalPage")
public R<Page<SignGoalPageVo>> getSignGoalPage() {
Page<SignGoalPageVo> pageVo = signGoalService.getSignGoalPage();
@ -74,10 +68,10 @@ public class BackstageSignGoalController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("设置签约间隔配置信息")
@Operation(summary = "设置签约间隔配置信息")
@PutMapping("/setSignConfigInfo")
public R<Void> setSignConfigInfo(@RequestBody @Validated SignGoalConfigInfoBo bo) {
CoreService coreService = SpringUtils.getBean(CoreService.class);
ConfigService configService = SpringUtils.getBean(ConfigService.class);
CommonService commonService = SpringUtils.getBean(CommonService.class);
// 遍历属性名与值
try {
@ -86,17 +80,15 @@ public class BackstageSignGoalController {
// 获取枚举
OamConfigEnum sysConfigEnum = OamConfigEnum.matchField(field.getName());
if (null != sysConfigEnum) {
SysConfig sysConfig = new SysConfig();
Config sysConfig = new Config();
sysConfig.setConfigName(sysConfigEnum.getName())
.setConfigKey(sysConfigEnum.getKey())
.setConfigValue(field.get(bo).toString());
// 修改
if (DbChain.table(SYS_CONFIG)
.where(SYS_CONFIG.CONFIG_KEY.eq(sysConfig.getConfigKey()))
.count() > 0) {
coreService.updateConfig(sysConfig);
if (DbChain.table(CONFIG).where(CONFIG.CONFIG_KEY.eq(sysConfig.getConfigKey())).count() > 0) {
configService.updateById(sysConfig);
} else {
coreService.insertConfig(sysConfig);
configService.save(sysConfig);
}
// 更新缓存
SpringUtils.getBean(RedisService.class).setCacheObject(commonService.getCacheKey(sysConfigEnum.getKey()), sysConfig.getConfigValue());
@ -114,11 +106,11 @@ public class BackstageSignGoalController {
* @since 2024/2/19
* @return R<SignGoalConfigInfoVo>
*/
@ApiOperation("获取签约间隔配置信息")
@Operation(summary = "获取签约间隔配置信息")
@GetMapping("/getSignConfigInfo")
public R<SignGoalConfigInfoVo> getSignConfigInfo() {
RedisService redisService = SpringUtils.getBean(RedisService.class);
CoreService coreService = SpringUtils.getBean(CoreService.class);
ConfigService configService = SpringUtils.getBean(ConfigService.class);
CommonService commonService = SpringUtils.getBean(CommonService.class);
Map<String, String> configMap = new HashMap<>(8);
Arrays.asList(OamConfigKey.SIGN_GOAL).forEach(item -> {
@ -129,11 +121,11 @@ public class BackstageSignGoalController {
configMap.put(sysConfigEnum.getField(), cacheInfo);
} else {
// 查询系统
SysConfig sysConfig = coreService.selectConfigByKey(item);
if (null != sysConfig) {
Config config = configService.getById(item);
if (null != config) {
// 获取枚举
OamConfigEnum sysConfigEnum = OamConfigEnum.matchKey(item);
configMap.put(sysConfigEnum.getField(), sysConfig.getConfigValue());
configMap.put(sysConfigEnum.getField(), config.getConfigValue());
}
}
});
@ -149,7 +141,7 @@ public class BackstageSignGoalController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("新增签约指标")
@Operation(summary = "新增签约指标")
@PostMapping("/insertSignGoal")
public R<Void> insertSignGoal(@RequestBody @Validated SignGoalBo bo) {
signGoalService.insertSignGoal(bo);
@ -163,7 +155,7 @@ public class BackstageSignGoalController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("修改签约指标")
@Operation(summary = "修改签约指标")
@PutMapping("/updateSignGoal")
public R<Void> updateSignGoal(@RequestBody @Validated SignGoalBo bo) {
signGoalService.updateSignGoal(bo);
@ -177,7 +169,7 @@ public class BackstageSignGoalController {
* @param id 主键
* @return R<Void>
*/
@ApiOperation("删除签约指标")
@Operation(summary = "删除签约指标")
@DeleteMapping("/removeSignGoal/{id}")
public R<Void> removeSignGoal(@PathVariable String id) {
signGoalService.removeById(id);

View File

@ -1,10 +1,6 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.system.framework.enums.InitRoleEnum;
import com.cpop.system.business.service.RoleService;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.cpop.common.constant.Constants;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.core.anno.OperationLog;
import com.cpop.core.base.entity.R;
import com.cpop.core.base.enums.OperationLogEnum;
@ -13,10 +9,13 @@ import com.cpop.oam.business.bo.*;
import com.cpop.oam.business.service.DeptService;
import com.cpop.oam.business.service.StaffService;
import com.cpop.oam.business.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.cpop.system.business.service.RoleService;
import com.cpop.system.framework.enums.InitRoleEnum;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -32,7 +31,7 @@ import static com.cpop.system.business.entity.table.RoleTableDef.ROLE;
* @since 2023-09-07
*/
@RestController
@Api(tags = "员工账号管理模块")
@Tag(name = "员工账号管理模块")
@RequestMapping("/backstage/staff")
public class BackstageStaffController {
@ -43,14 +42,13 @@ public class BackstageStaffController {
private DeptService deptService;
/**
* @descriptions 查询员工分页列表
* 查询员工分页列表
* @author DB
* @date 2023/09/07 18:07
* @since 2023/09/07 18:07
* @param bo 请求参数
* @return R<Page<SysStaffPageVo>>
*/
@PreAuthorize("@aps.hasPermission('system:account:list')")
@ApiOperation("查询员工分页列表")
@Operation(summary = "查询员工分页列表")
@GetMapping("/getStaffPageList")
public R<Page<StaffPageVo>> getStaffPageList(StaffPageBo bo) {
Page<StaffPageVo> pageVo = staffService.getStaffPageList(bo);
@ -58,15 +56,14 @@ public class BackstageStaffController {
}
/**
* @descriptions 新增员工
* 新增员工
* @author DB
* @date 2023/09/08 14:04
* @since 2023/09/08 14:04
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('system:account:insert')")
@OperationLog(operationLogEnumType= OperationLogEnum.INSERT_OAM_STAFF)
@ApiOperation("新增员工")
@Operation(summary = "新增员工")
@PostMapping("/insertStaff")
public R<Void> insertStaff(@RequestBody @Validated StaffBo bo) {
staffService.insertStaff(bo);
@ -74,15 +71,14 @@ public class BackstageStaffController {
}
/**
* @descriptions 修改员工
* 修改员工
* @author DB
* @date 2023/09/08 15:20
* @since 2023/09/08 15:20
* @param bo 请求参数
* @return com.jambox.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('system:account:update')")
@OperationLog(operationLogEnumType= OperationLogEnum.UPDATE_OAM_STAFF)
@ApiOperation("修改员工")
@Operation(summary = "修改员工")
@PutMapping("/updateStaff")
public R<Void> updateStaff(@RequestBody @Validated StaffBo bo) {
staffService.updateStaff(bo);
@ -90,15 +86,14 @@ public class BackstageStaffController {
}
/**
* @descriptions 删除员工
* 删除员工
* @author DB
* @date 2023/09/12 16:57
* @since 2023/09/12 16:57
* @param id 主键
* @return com.jambox.core.base.R<java.lang.Void>
*/
@PreAuthorize("@aps.hasPermission('system:account:remove')")
@OperationLog(operationLogEnumType= OperationLogEnum.REMOVE_OAM_STAFF)
@ApiOperation("删除员工")
@Operation(summary = "删除员工")
@DeleteMapping("/removeStaffById/{id}")
public R<Void> removeStaffById(@PathVariable String id) {
staffService.removeStaffById(id);
@ -106,13 +101,13 @@ public class BackstageStaffController {
}
/**
* @descriptions 查询部门树列表
* 查询部门树列表
* @author DB
* @date 2023/09/08 18:19
* @since 2023/09/08 18:19
* @param bo 请求参数
* @return com.jambox.core.base.R<List<DeptVo>>
*/
@ApiOperation("查询部门树列表")
@Operation(summary = "查询部门树列表")
@GetMapping("/getDeptTreeList")
public R<List<DeptVo>> getDeptTreeList(DeptListBo bo) {
List<DeptVo> list = deptService.getDeptTreeList(bo);
@ -121,28 +116,27 @@ public class BackstageStaffController {
/**
* 获取所有角色信息
*/
@ApiOperation("获取所有角色信息")
@Operation(summary = "获取所有角色信息")
@GetMapping("/getAllRoleList")
public R<List<RoleVo>> getAllSysRoleList() {
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
List<RoleVo> list = SpringUtils.getBean(RoleService.class).listAs(QueryWrapper.create()
.where(ROLE.STATUS.eq(true))
.and(ROLE.ID.ne(InitRoleEnum.SUPER_OAM_ROLE.getId()))
.and(ROLE.USER_TYPE.eq(loginUser.getUserType()))
.and(ROLE.USER_TYPE.eq(StpUtil.getSession().get("userType")))
.orderBy(ROLE.ORDER_NO.asc())
, RoleVo.class);
return R.ok(list);
}
/**
* @Description: 用户名是否存在
* 用户名是否存在
* @param username 用户名
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/5/11 10:09
* @return R<Void>
* @author DB
* @since 2023/5/11 10:09
**/
@ApiOperation("用户名是否存在")
@Operation(summary = "用户名是否存在")
@GetMapping("/isAccountExist")
public R<Void> isAccountExist(String username, String id) {
staffService.isAccountExist(username, id);
@ -150,14 +144,13 @@ public class BackstageStaffController {
}
/**
* @Description: 获取员工信息
* @param id
* @return: R<StaffVo>
* @Author: DB
* @Date: 2023/5/17 10:33
* 获取员工信息
* @param id 主键
* @return R<StaffVo>
* @author DB
* @since 2023/5/17 10:33
**/
@PreAuthorize("@aps.hasPermission('system:account:info')")
@ApiOperation("获取员工信息")
@Operation(summary = "获取员工信息")
@GetMapping("/getStaffInfo/{id}")
public R<StaffInfoVo> getStaffInfo(@PathVariable String id) {
StaffInfoVo staffInfo = staffService.getStaffInfo(id);
@ -165,30 +158,28 @@ public class BackstageStaffController {
}
/**
* @Description: 获取用户操作日志分页
* 获取用户操作日志分页
* @param bo 请求参数
* @return: R<PageVo<SysOperationLogVo>>
* @Author: DB
* @Date: 2023/5/12 14:30
* @return R<PageVo<SysOperationLogVo>>
* @author DB
* @since 2023/5/12 14:30
**/
@PreAuthorize("@aps.hasPermission('system:account:list')")
@ApiOperation("获取用户操作日志分页")
@Operation(summary = "获取用户操作日志分页")
@GetMapping("/getUserLogList")
public R<Page<SysOperationLogVo>> getUserLogList(@Validated SysUserLogBo bo) {
Page<SysOperationLogVo> list = staffService.getUserLogList(bo);
public R<Page<OperationLogVo>> getUserLogList(@Validated UserLogBo bo) {
Page<OperationLogVo> list = staffService.getUserLogList(bo);
return R.ok(list);
}
/**
* @Description: 修改系统用户密码
* 修改系统用户密码
* @param bo 请求参数
* @return: AjaxResult<Void>
* @Author: DB
* @Date: 2023/5/12 16:00
* @return AjaxResult<Void>
* @author DB
* @since 2023/5/12 16:00
**/
@PreAuthorize("@aps.hasPermission('system:account:update')")
@OperationLog(operationLogEnumType= OperationLogEnum.MODIFY_OAM_STAFF_PASSWORD)
@ApiOperation("修改系统用户密码")
@Operation(summary = "修改系统用户密码")
@PutMapping("/modifyUserPassword")
public R<Void> modifyUserPassword(@Validated @RequestBody ModifyUserPasswordBo bo) {
staffService.modifyUserPassword(bo);
@ -202,7 +193,7 @@ public class BackstageStaffController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("修改运维状态")
@Operation(summary = "修改运维状态")
@PutMapping("/changeOperationStatus")
public R<Void> changeOperationStatus(@Validated @RequestBody OperationStatusBo bo) {
staffService.changeOperationStatus(bo);

View File

@ -1,7 +1,7 @@
package com.cpop.oam.business.controller.backstage;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.R;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.jambox.business.bo.PlugBo;
import com.cpop.jambox.business.entity.StorePlug;
import com.cpop.jambox.business.service.PlugService;
@ -12,9 +12,9 @@ import com.cpop.jambox.business.vo.StorePlugListVo;
import com.cpop.oam.business.bo.ChangePlugOpenBo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -31,8 +31,9 @@ import static com.cpop.jambox.business.entity.table.StorePlugTableDef.STORE_PLUG
* @since 2023-12-29
*/
@RestController
@Api(tags = "校区-插件记录表接口")
@Tag(name = "校区-插件记录表接口")
@RequestMapping("/backstage/storePlug")
@Deprecated(since = "1.1.0")
public class BackstageStorePlugController {
@Autowired
@ -48,7 +49,7 @@ public class BackstageStorePlugController {
* @return R<Page<PlugPageVo>>
*/
@GetMapping("/getPlugPage")
@ApiOperation("查询插件分页")
@Operation(summary = "查询插件分页")
public R<Page<PlugPageVo>> getPlugPage() {
Page<PlugPageVo> page = plugService.getPlugPage();
return R.ok(page);
@ -62,7 +63,7 @@ public class BackstageStorePlugController {
* @return R<PlugVo>
*/
@GetMapping("/getPlugById/{id}")
@ApiOperation("查询插件详情")
@Operation(summary = "查询插件详情")
public R<PlugVo> getPlugById(@PathVariable String id) {
PlugVo vo = plugService.getOneAs(QueryWrapper.create().where(PLUG.ID.eq(id)), PlugVo.class);
return R.ok(vo);
@ -75,7 +76,7 @@ public class BackstageStorePlugController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("新增插件")
@Operation(summary = "新增插件")
@PostMapping("/insertPlug")
public R<Void> insertPlug(@RequestBody @Validated PlugBo bo) {
plugService.insertPlug(bo);
@ -89,7 +90,7 @@ public class BackstageStorePlugController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("修改插件")
@Operation(summary = "修改插件")
@PutMapping("/updatePlug")
public R<Void> updateStaff(@RequestBody @Validated PlugBo bo) {
plugService.updatePlug(bo);
@ -103,7 +104,7 @@ public class BackstageStorePlugController {
* @param id 主键
* @return R<Void>
*/
@ApiOperation("删除插件")
@Operation(summary = "删除插件")
@DeleteMapping("/removePlugById/{id}")
public R<Void> removeStaffById(@PathVariable String id) {
plugService.removeById(id);
@ -117,8 +118,8 @@ public class BackstageStorePlugController {
* @param storeId storeId
*/
@GetMapping("/getStorePlugList")
@ApiOperation("查询校区插件列表")
public R<List<StorePlugListVo>> getStorePlugList(@ApiParam("品牌id") String brandId, @ApiParam("校区id") String storeId) {
@Operation(summary = "查询校区插件列表")
public R<List<StorePlugListVo>> getStorePlugList(@Parameter(description = "品牌id") String brandId, @Parameter(description = "校区id") String storeId) {
List<StorePlugListVo> list = storePlugService.getStorePlugList(brandId, storeId);
return R.ok(list);
}
@ -127,7 +128,7 @@ public class BackstageStorePlugController {
* 插件开启与关闭
*/
@PutMapping("/changePlugOpen")
@ApiOperation("插件开启与关闭")
@Operation(summary = "插件开启与关闭")
public R<Void> changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) {
StorePlug storePlug = BeanUtils.mapToClass(bo, StorePlug.class);
if (bo.getIsOpen()){

View File

@ -6,10 +6,9 @@ import com.cpop.core.base.enums.OperationLogEnum;
import com.cpop.oam.business.bo.SysConfigInfoBo;
import com.cpop.oam.business.service.CommonService;
import com.cpop.oam.business.vo.ConfigInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -18,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
* @createTime 2023/09/13 12:00
* @description
*/
@Api(tags = "系统配置模块")
@Tag(name = "系统配置模块")
@RestController
@RequestMapping("/backstage/sysConfig")
public class BackstageSysConfigController {
@ -32,8 +31,7 @@ public class BackstageSysConfigController {
* @author DB
* @Date: 2023/7/7 0007 16:27
*/
@PreAuthorize("@aps.hasPermission('system:config:list')")
@ApiOperation("获取系统配置信息")
@Operation(summary = "获取系统配置信息")
@GetMapping("/getSysConfigInfo")
public R<ConfigInfoVo> getSysConfigInfo() {
ConfigInfoVo vo = commonService.getSysConfigInfo();
@ -42,13 +40,12 @@ public class BackstageSysConfigController {
/**
* @param bo 请求参数
* @Description: 设置系统配置信息
* @return: R<Void>
* @Author: DB
* @Date: 2023/5/11 15:48
* 设置系统配置信息
* @author DB
* @since 2023/5/11 15:48
**/
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_OAM_CONFIG)
@ApiOperation("设置系统配置信息")
@Operation(summary = "设置系统配置信息")
@PutMapping("/setSysConfigInfo")
public R<Void> setSysConfigInfo(@RequestBody @Validated SysConfigInfoBo bo) {
commonService.setSysConfigInfo(bo);

View File

@ -5,18 +5,17 @@ import com.cpop.oam.business.bo.TaskDemandBo;
import com.cpop.oam.business.bo.TaskDemandPageBo;
import com.cpop.oam.business.bo.TaskDemandUrgentBo;
import com.cpop.oam.business.service.TaskDemandService;
import com.cpop.oam.business.vo.TaskDemandUrgentVo;
import com.cpop.system.business.vo.BrandListVo;
import com.cpop.oam.business.vo.StoreListVo;
import com.cpop.oam.business.vo.TaskDemandPageVo;
import com.cpop.oam.business.vo.TaskDemandUrgentVo;
import com.cpop.system.business.service.BrandService;
import com.cpop.system.business.service.StoreService;
import com.cpop.system.business.vo.BrandListVo;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -32,7 +31,7 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
* @since 2023-09-18
*/
@RestController
@Api(tags = "工单模块-需求")
@Tag(name = "工单模块-需求")
@RequestMapping("/backstage/taskDemand")
public class BackstageTaskDemandController {
@ -51,8 +50,7 @@ public class BackstageTaskDemandController {
* @param bo 查询参数
* @since 2023-11-30 17:26:24
*/
@PreAuthorize("@aps.hasPermission('oamTask:taskDemand:list')")
@ApiOperation("工单模块-需求-需求分页列表")
@Operation(summary = "工单模块-需求-需求分页列表")
@GetMapping("/getTaskDemandPage")
public R<Page<TaskDemandPageVo>> getTaskDemandPage(TaskDemandPageBo bo) {
Page<TaskDemandPageVo> pageVo = taskDemandService.getTaskDemandPage(bo);
@ -65,10 +63,9 @@ public class BackstageTaskDemandController {
* @param bo 请求参数
* @since 2023-11-30 17:27:24
*/
@ApiOperation("工单模块-需求-新增需求")
@Operation(summary = "工单模块-需求-新增需求")
@PostMapping("/insertDemandTask")
public R<Void> insertDemandTask(@RequestBody @Validated
TaskDemandBo bo) {
public R<Void> insertDemandTask(@RequestBody @Validated TaskDemandBo bo) {
taskDemandService.insertTaskDemand(bo);
return R.ok();
}
@ -79,10 +76,9 @@ public class BackstageTaskDemandController {
* @param bo 请求参数
* @since 2023-11-30 18:26:42
*/
@ApiOperation("工单模块-需求-修改需求")
@Operation(summary = "工单模块-需求-修改需求")
@PutMapping("/updateDemandTask")
public R<Void> updateDemandTask(@RequestBody @Validated
TaskDemandBo bo) {
public R<Void> updateDemandTask(@RequestBody @Validated TaskDemandBo bo) {
taskDemandService.updateDemandTask(bo);
return R.ok();
}
@ -93,10 +89,9 @@ public class BackstageTaskDemandController {
* @param demandId 需求id
* @since 2023-11-30 20:30:54
*/
@ApiOperation("工单模块-需求-删除需求")
@Operation(summary = "工单模块-需求-删除需求")
@DeleteMapping("/removeDemandTask/{demandId}")
public R<Void> removeDemandTask(@PathVariable @ApiParam(value = "需求id")
String demandId) {
public R<Void> removeDemandTask(@PathVariable @Parameter(description = "需求id") String demandId) {
taskDemandService.removeDemandTask(demandId);
return R.ok();
}
@ -107,12 +102,10 @@ public class BackstageTaskDemandController {
* @param brandName 品牌名
* @since 2023-11-30 17:59:29
*/
@ApiOperation("工单模块-工单提交-获取品牌列表")
@Operation(summary = "工单模块-工单提交-获取品牌列表")
@GetMapping("/getBrandList")
public R<List<BrandListVo>> getBrandList(@ApiParam("品牌名")
String brandName) {
List<BrandListVo> list =
brandService.queryChain().and(BRAND.BRAND_NAME.like(brandName)).listAs(BrandListVo.class);
public R<List<BrandListVo>> getBrandList(@Parameter(description = "品牌名") String brandName) {
List<BrandListVo> list = brandService.queryChain().and(BRAND.BRAND_NAME.like(brandName)).listAs(BrandListVo.class);
return R.ok(list);
}
@ -122,10 +115,9 @@ public class BackstageTaskDemandController {
* @param brandId 品牌id
* @since 2023-11-30 18:00:08
*/
@ApiOperation("工单模块-工单提交-获取校区/店铺列表")
@Operation(summary = "工单模块-工单提交-获取校区/店铺列表")
@GetMapping("/getStoreList")
public R<List<StoreListVo>> getStoreList(@ApiParam("品牌id")
String brandId) {
public R<List<StoreListVo>> getStoreList(@Parameter(description = "品牌id") String brandId) {
List<StoreListVo> list = storeService.queryChain().and(STORE.BRAND_ID.eq(brandId)).listAs(StoreListVo.class);
return R.ok(list);
}
@ -137,7 +129,7 @@ public class BackstageTaskDemandController {
* @param bo 请求参数
* @return R<Void>
*/
@ApiOperation("工单模块-需求-需求加急")
@Operation(summary = "工单模块-需求-需求加急")
@PutMapping("/demandUrgent")
public R<TaskDemandUrgentVo> demandUrgent(@RequestBody @Validated TaskDemandUrgentBo bo) {
TaskDemandUrgentVo vo = taskDemandService.demandUrgent(bo);

View File

@ -8,12 +8,11 @@ import com.cpop.oam.business.service.TaskStaffGroupService;
import com.cpop.oam.business.service.TaskWorkOrderService;
import com.cpop.oam.business.vo.*;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -27,7 +26,7 @@ import java.util.List;
* @since 2023-09-15
*/
@RestController
@Api(tags = "技术模块-技术")
@Tag(name = "技术模块-技术")
@RequestMapping("/backstage/taskTechnology")
public class BackstageTaskTechnologyController {
@ -49,8 +48,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-30 19:41:32
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-今日事务-获取个人工单列表")
@Operation(summary = "技术模块-今日事务-获取个人工单列表")
@GetMapping("/getPersonWorkOrder")
public R<List<TaskWorkOrderPersonVo>> getPersonWorkOrder() {
List<TaskWorkOrderPersonVo> list = taskWorkOrderService.getPersonWorkOrder();
@ -64,9 +62,9 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-29 11:25:28
*/
@ApiOperation("技术模块-今日事务-工单记录列表")
@Operation(summary = "技术模块-今日事务-工单记录列表")
@GetMapping("/getWorkOrderRecordList/{workOrderId}")
public R<List<TaskWorkOrderRecordListVo>> getWorkOrderRecordList(@PathVariable @ApiParam("工单id") String workOrderId) {
public R<List<TaskWorkOrderRecordListVo>> getWorkOrderRecordList(@PathVariable @Parameter(description = ("工单id")) String workOrderId) {
List<TaskWorkOrderRecordListVo> list = taskWorkOrderService.getWorkOrderRecordList(workOrderId);
return R.ok(list);
}
@ -78,7 +76,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-29 11:33:35
*/
@ApiOperation("技术模块-今日事务-新增工单记录")
@Operation(summary = "技术模块-今日事务-新增工单记录")
@PostMapping("/insertWorkOrderRecord")
public R<Void> insertWorkOrderRecord(@RequestBody @Validated TaskWorkOrderRecordBo bo) {
//是否是第一个
@ -93,8 +91,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-30 21:11:47
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-任务归档-获取任务归档分页")
@Operation(summary = "技术模块-任务归档-获取任务归档分页")
@GetMapping("/getTaskArchivingPage")
public R<Page<TaskArchivingPagVo>> getTaskArchivingPage(TaskArchivingPagBo bo) {
Page<TaskArchivingPagVo> page = taskService.getTaskArchivingPage(bo);
@ -108,10 +105,9 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-30 21:49:05
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:deploy')")
@ApiOperation("技术模块-任务归档-设置任务归档")
@Operation(summary = "技术模块-任务归档-设置任务归档")
@PutMapping("/setTaskArchiving/{taskId}")
public R<Void> setTaskArchiving(@PathVariable @ApiParam("任务id") String taskId) {
public R<Void> setTaskArchiving(@PathVariable @Parameter(description = ("任务id")) String taskId) {
taskService.setTaskArchiving(taskId);
return R.ok();
}
@ -125,13 +121,11 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-11-30 22:21:58
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-任务领取-获取领取任务分页")
@Operation(summary = "技术模块-任务领取-获取领取任务分页")
@GetMapping("/getToBeClaimedPage")
public R<Page<TaskToBeClaimedPageVo>> getToBeClaimedPage(@ApiParam(value = "主体")
String subject, @ApiParam(value = "任务内容")
String taskContent, @RequestParam("taskGetStatus") @ApiParam(value = "任务领取状态(0:待领取;1:待评估;2:审核不通过)", required = true)
Integer taskGetStatus) {
public R<Page<TaskToBeClaimedPageVo>> getToBeClaimedPage(@Parameter(description = "主体") String subject,
@Parameter(description = "任务内容") String taskContent,
@RequestParam("taskGetStatus") @Parameter(description = "任务领取状态(0:待领取;1:待评估;2:审核不通过)", required = true) Integer taskGetStatus) {
Page<TaskToBeClaimedPageVo> list = taskService.getToBeClaimedPage(subject, taskContent, taskGetStatus);
return R.ok(list);
}
@ -143,11 +137,9 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-12-01 09:45:08
*/
//@PreAuthorize("@aps.hasPermission('oamTask:iterateTask:insert')")
@ApiOperation("技术模块-任务领取-新增迭代任务")
@Operation(summary = "技术模块-任务领取-新增迭代任务")
@PostMapping("/insertIterationTask")
public R<Void> insertIterationTask(@RequestBody @Validated
TaskIterationBo bo) {
public R<Void> insertIterationTask(@RequestBody @Validated TaskIterationBo bo) {
taskService.insertIterationTask(bo);
return R.ok();
}
@ -159,10 +151,9 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-12-01 10:15:28
*/
//@PreAuthorize("@aps.hasPermission('oamTask:iterateTask:update')")
@ApiOperation("技术模块-任务领取-技术人员领取任务")
@Operation(summary = "技术模块-任务领取-技术人员领取任务")
@PutMapping("/claimTask/{id}")
public R<Void> claimTask(@PathVariable @ApiParam("任务id") String id) {
public R<Void> claimTask(@PathVariable @Parameter(description = "任务id") String id) {
taskService.claimTask(id);
return R.ok();
}
@ -174,8 +165,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023-12-01 10:35:31
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:audit')")
@ApiOperation("技术模块-任务领取-任务审核")
@Operation(summary = "技术模块-任务领取-任务审核")
@PutMapping("/setTaskAuditComments")
public R<Void> setTaskAuditComments(@RequestBody @Validated TaskAuditCommentsBo bo) {
taskService.setTaskAuditComments(bo);
@ -189,12 +179,11 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-今日事务-个人任务分页列表")
@Operation(summary = "技术模块-今日事务-个人任务分页列表")
@GetMapping("/getPersonTaskPage")
public R<Page<PersonTaskPageVo>> getPersonTaskPage(@RequestParam(value = "staffId", required = false) @ApiParam("员工id") String staffId,
@RequestParam(value = "startDate", required = false) @ApiParam("开始日期") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate,
@RequestParam(value = "endDate", required = false) @ApiParam("结束日期") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate) {
public R<Page<PersonTaskPageVo>> getPersonTaskPage(@RequestParam(value = "staffId", required = false) @Parameter(description = ("员工id")) String staffId,
@RequestParam(value = "startDate", required = false) @Parameter(description = "开始日期") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate,
@RequestParam(value = "endDate", required = false) @Parameter(description = ("结束日期")) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate) {
Page<PersonTaskPageVo> list = taskService.getPersonTaskPage(staffId, startDate, endDate);
return R.ok(list);
}
@ -207,7 +196,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-任务成员组列表")
@Operation(summary = "技术模块-今日事务-任务成员组列表")
@GetMapping("/getTaskStaffGroupList/{taskId}")
public R<List<TaskStaffGroupVo>> getTaskStaffGroupList(@PathVariable String taskId) {
List<TaskStaffGroupVo> list = taskStaffGroupService.getTaskStaffGroupList(taskId);
@ -221,7 +210,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-查询技术员工列表")
@Operation(summary = "技术模块-今日事务-查询技术员工列表")
@GetMapping("/getTechnologyStaffList")
public R<List<StaffVo>> getTechnologyStaffList() {
List<StaffVo> list = staffService.getTechnologyStaffList();
@ -236,7 +225,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-新增任务小组成员")
@Operation(summary = "技术模块-今日事务-新增任务小组成员")
@PostMapping("/insertTaskStaffGroup")
public R<Void> insertTaskStaffGroup(@RequestBody @Validated TaskStaffGroupBo bo) {
taskStaffGroupService.insertTaskStaffGroup(bo);
@ -251,7 +240,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-修改任务负责人")
@Operation(summary = "技术模块-今日事务-修改任务负责人")
@PutMapping("/updateTaskResponsibleStaff")
public R<Void> updateTaskResponsibleStaff(@RequestBody @Validated TransferTaskBo bo) {
taskService.updateTaskResponsibleStaff(bo);
@ -266,7 +255,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-修改员工任务绩点")
@Operation(summary = "技术模块-今日事务-修改员工任务绩点")
@PutMapping("/updateStaffGradePoint")
public R<Void> updateStaffGradePoint(@RequestBody @Validated TaskStaffGroupBo bo) {
taskStaffGroupService.updateStaffGradePoint(bo);
@ -281,7 +270,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-删除成员组")
@Operation(summary = "技术模块-今日事务-删除成员组")
@DeleteMapping("/removeTaskStaffGroup/{id}")
public R<Void> removeTaskStaffGroup(@PathVariable String id) {
taskStaffGroupService.removeTaskStaffGroupById(id);
@ -296,7 +285,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-更新任务进度")
@Operation(summary = "技术模块-今日事务-更新任务进度")
@PutMapping("/updateTaskProgress")
public R<Void> updateTaskProgress(@RequestBody @Validated TaskProgressBo bo) {
taskService.updateTaskProgress(bo);
@ -311,7 +300,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@ApiOperation("技术模块-今日事务-转交任务")
@Operation(summary = "技术模块-今日事务-转交任务")
@PutMapping("/updateTaskItem")
public R<Void> updateTaskItem(@RequestBody @Validated TaskItemBo bo) {
taskService.updateTaskItem(bo);
@ -326,8 +315,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/04
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-数据统计-获取月度任务统计列表")
@Operation(summary = "技术模块-数据统计-获取月度任务统计列表")
@GetMapping("/getTaskMonthStatistics")
public R<TaskMonthStatisticsVo> getTaskMonthStatistics(TaskMonthStatisticsBo bo) {
return R.ok(taskService.getTaskMonthStatistics(bo));
@ -340,7 +328,7 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/05
*/
@ApiOperation("技术模块-数据统计-获取任务日报")
@Operation(summary = "技术模块-数据统计-获取任务日报")
@GetMapping("/getTaskDailyPaper")
public R<String> getTaskDailyPaper(TaskDailyPaperBo bo) {
String dailyPaper = taskService.getTaskDailyPaper(bo);
@ -354,12 +342,11 @@ public class BackstageTaskTechnologyController {
* @author DB
* @since 2023/12/05
*/
@PreAuthorize("@aps.hasPermission('oamTask:technology:list')")
@ApiOperation("技术模块-今日事务-个人绩点")
@Operation(summary = "技术模块-今日事务-个人绩点")
@GetMapping("/getIndividualGpa")
public R<TaskIndividualGpaVo> getIndividualGpa(@RequestParam(value = "staffId", required = false) @ApiParam("员工id") String staffId,
@RequestParam(value = "startDate", required = false) @ApiParam("开始日期") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate,
@RequestParam(value = "endDate", required = false) @ApiParam("结束日期") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate) {
public R<TaskIndividualGpaVo> getIndividualGpa(@RequestParam(value = "staffId", required = false) @Parameter(description = "员工id") String staffId,
@RequestParam(value = "startDate", required = false) @Parameter(description = ("开始日期")) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startDate,
@RequestParam(value = "endDate", required = false) @Parameter(description = ("结束日期")) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate endDate) {
TaskIndividualGpaVo vo = taskService.getIndividualGpa(staffId, startDate, endDate);
return R.ok(vo);
}
@ -372,7 +359,7 @@ public class BackstageTaskTechnologyController {
* @return R<Void>
*/
@PutMapping("/enforceFinishWorkOrder")
@ApiOperation("强制办结工单")
@Operation(summary = "强制办结工单")
public R<Void> enforceFinishWorkOrder(@RequestBody @Validated EnforceFinishWorkOrderBo bo) {
taskWorkOrderService.enforceFinishWorkOrder(bo);
return R.ok();

View File

@ -1,16 +1,14 @@
package com.cpop.oam.business.service;
import com.cpop.core.base.table.SysUser;
import com.cpop.core.base.table.User;
import com.cpop.oam.business.bo.*;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.oam.business.entity.Staff;
import com.cpop.oam.business.vo.OperationLogVo;
import com.cpop.oam.business.vo.StaffInfoVo;
import com.cpop.oam.business.vo.StaffPageVo;
import com.cpop.oam.business.vo.StaffVo;
import com.cpop.oam.business.vo.SysOperationLogVo;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import java.util.List;
@ -38,7 +36,7 @@ public interface StaffService extends IService<Staff> {
* @date 2023/09/08 14:12
* @param bo 请求参数
*/
SysUser insertStaff(StaffBo bo);
User insertStaff(StaffBo bo);
/**
* @descriptions 修改员工
@ -82,7 +80,7 @@ public interface StaffService extends IService<Staff> {
* @Author: DB
* @Date: 2023/5/12 14:30
**/
Page<SysOperationLogVo> getUserLogList(SysUserLogBo bo);
Page<OperationLogVo> getUserLogList(UserLogBo bo);
/**
* @Description: 修改系统用户密码

View File

@ -1,17 +1,18 @@
package com.cpop.oam.business.service.impl;
import cn.dev33.satoken.session.SaSession;
import cn.dev33.satoken.stp.StpUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.utils.DateUtils;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.BusinessDisposeBo;
import com.cpop.oam.business.bo.BusinessDistributeBo;
import com.cpop.oam.business.bo.BusinessInfoPageBo;
@ -35,7 +36,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.net.ssl.HttpsURLConnection;
import java.io.*;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -53,10 +55,8 @@ import static com.cpop.oam.business.entity.table.ClueTableDef.CLUE;
import static com.cpop.oam.business.entity.table.SignGoalTableDef.SIGN_GOAL;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.system.business.entity.table.StoreLicenseTableDef.STORE_LICENSE;
import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
import static com.mybatisflex.core.query.QueryMethods.distinct;
/**
* Oam-事务表 服务层实现
@ -77,14 +77,12 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
@Override
public Page<BusinessPageVo> getBusinessPage(Integer status) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
//查询员工
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
SaSession session = StpUtil.getSession();
QueryWrapper queryWrapper = QueryWrapper.create();
//运营人员
if (loginUserInfo.getInteger("staffType") == 1) {
queryWrapper
.leftJoin(BUSINESS_STAFF).on(BUSINESS_STAFF.BUSINESS_ID.eq(BUSINESS.ID))
.and(BUSINESS_STAFF.STAFF_ID.eq(loginUserInfo.getString("id")));
if (session.getInt("staffType") == 1) {
queryWrapper.leftJoin(BUSINESS_STAFF).on(BUSINESS_STAFF.BUSINESS_ID.eq(BUSINESS.ID))
.and(BUSINESS_STAFF.STAFF_ID.eq(session.getString("id")));
}
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
queryWrapper.select(BUSINESS.ID, BUSINESS.BUSINESS_LEVEL, BUSINESS.BUSINESS_TYPE, BUSINESS.DESC, BUSINESS.START_DATE, BUSINESS.END_DATE, BUSINESS.ALL_SURPLUS_QUANTITY, BUSINESS.REMARK, BUSINESS.STATUS)
@ -105,8 +103,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
@Transactional(rollbackFor = Exception.class)
public void businessDistribute(BusinessDistributeBo bo) {
Business business = BeanUtils.mapToClass(bo, Business.class);
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
business.setInitiatorId(loginUserInfo.getString("id"))
business.setInitiatorId(StpUtil.getSession().getString("id"))
.setStartDate(bo.getStartAndEnd().get(0))
.setEndDate(bo.getStartAndEnd().get(1));
this.save(business);
@ -206,15 +203,14 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
*/
private Page<BusinessInfoPageVo> getButtJoint(BusinessInfoPageBo bo) {
//获取当前员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
QueryWrapper queryWrapper = QueryWrapper.create();
SaSession session = StpUtil.getSession();
//运营人员
if (loginUserInfo.getInteger("staffType") == 1) {
queryWrapper.and(BUSINESS_STAFF.STAFF_ID.eq(loginUserInfo.getString("id")));
if (session.getInt("staffType") == 1) {
queryWrapper.and(BUSINESS_STAFF.STAFF_ID.eq(session.getString("id")));
}
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return SpringUtils.getBean(BusinessDetailService.class).getMapper().paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()),
queryWrapper
return SpringUtils.getBean(BusinessDetailService.class).getMapper().paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()), queryWrapper
//事务详情
.select(BUSINESS_DETAIL.ID, BUSINESS_DETAIL.DETAIL_STATUS, BUSINESS_DETAIL.DETAIL_DESC, BUSINESS_DETAIL.DETAIL_RECORD_TIME)
//员工
@ -222,19 +218,17 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
//品牌
.select(BRAND.BRAND_NAME)
//校区
.select(STORE.STORE_NAME, STORE.PERSON_CHARGE, STORE.PHONE, STORE.ID.as(BusinessInfoPageVo::getStoreId))
//营业执照
.select(STORE_LICENSE.LICENSE_NAME, STORE_LICENSE.LICENSE_USER_NAME, STORE_LICENSE.LICENSE_ADDR)
.select(STORE.STORE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.PERSON_CHARGE_NAME, STORE.ID.as(BusinessInfoPageVo::getStoreId),
STORE.LICENSE_FIRM_NAME,STORE.LICENSE_USERNAME,STORE.LICENSE_ADDR)
.leftJoin(BUSINESS_STAFF).on(BUSINESS_STAFF.ID.eq(BUSINESS_DETAIL.BUSINESS_STAFF_ID))
.leftJoin(STAFF).on(STAFF.ID.eq(BUSINESS_STAFF.STAFF_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(BUSINESS_DETAIL.BRAND_ID))
.leftJoin(STORE).on(STORE.ID.eq(BUSINESS_DETAIL.STORE_ID))
.leftJoin(STORE_LICENSE).on(STORE_LICENSE.STORE_ID.eq(STORE.ID))
.where(BUSINESS_DETAIL.BUSINESS_ID.eq(bo.getId()))
//品牌或校区名模糊查询
.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore())))
.and(BRAND.BRAND_NAME.likeLeft(bo.getBrandOrStore()).or(STORE.STORE_NAME.likeLeft(bo.getBrandOrStore())))
//校区地址或校区名模糊查询
.and(STORE_LICENSE.LICENSE_NAME.like(bo.getAddrOrName()).or(STORE_LICENSE.LICENSE_ADDR.like(bo.getAddrOrName())))
.and(STORE.LICENSE_FIRM_NAME.likeLeft(bo.getAddrOrName()).or(STORE.LICENSE_ADDR.likeLeft(bo.getAddrOrName())))
.and(BUSINESS_DETAIL.DETAIL_STATUS.eq(bo.getDetailStatus()))
.and(BUSINESS_STAFF.STAFF_ID.in(bo.getStaffIds())),
BusinessInfoPageVo.class);
@ -251,6 +245,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
public void businessDispose(BusinessDisposeBo bo) {
BusinessDetailService businessDetailService = SpringUtils.getBean(BusinessDetailService.class);
BusinessDetail businessDetail;
SaSession session = StpUtil.getSession();
//查询当前事务
if (StringUtils.isNotBlank(bo.getId())){
businessDetail = businessDetailService.queryChain().where(BUSINESS_DETAIL.ID.eq(bo.getId())).one();
@ -261,11 +256,10 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
businessDetail = new BusinessDetail();
//获取校区数据
Store store = SpringUtils.getBean(StoreService.class).getById(bo.getStoreId());
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
//获取事务员工
BusinessStaff businessStaff = SpringUtils.getBean(BusinessStaffService.class).getOne(QueryWrapper.create()
.where(BUSINESS_STAFF.BUSINESS_ID.eq(bo.getBusinessId()))
.and(BUSINESS_STAFF.STAFF_ID.eq(loginUserInfo.getString("id"))));
.and(BUSINESS_STAFF.STAFF_ID.eq(session.getString("id"))));
businessDetail.setBrandId(store.getBrandId()).setStoreId(store.getId()).setBusinessId(bo.getBusinessId());
businessDetail.setDetailStatus(bo.getDetailStatus()).setDetailDesc(bo.getDetailDesc()).setDetailRecordTime(LocalDateTime.now())
.setBusinessStaffId(businessStaff.getId());
@ -283,11 +277,10 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
}
business.setAllSurplusQuantity(business.getAllSurplusQuantity() - 1);
this.updateById(business);
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
SpringUtils.getBean(BusinessStaffService.class).updateChain()
.setRaw(BUSINESS_STAFF.SURPLUS_QUANTITY, "surplus_quantity - 1")
.where(BUSINESS_STAFF.BUSINESS_ID.eq(businessDetail.getBusinessId()))
.and(BUSINESS_STAFF.STAFF_ID.eq(loginUserInfo.getString("id")))
.and(BUSINESS_STAFF.STAFF_ID.eq(session.getString("id")))
.update();
}
@ -303,25 +296,8 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
@Override
public void businessRemove(BusinessRemoveBo bo) {
Business business = this.getById(bo.getBusinessId());
if (bo.getId() == null) {
//将校区改为测试校区
SpringUtils.getBean(StoreService.class).updateChain()
.set(STORE.IS_TEST, true)
.where(STORE.ID.eq(bo.getStoreId()))
.update();
} else {
BusinessDetailService businessDetailService = SpringUtils.getBean(BusinessDetailService.class);
BusinessDetail businessDetail = businessDetailService.getById(bo.getId());
//机构签约
if (business.getBusinessType() == 1) {
//将校区改为测试校区
SpringUtils.getBean(StoreService.class).updateChain()
.set(STORE.IS_TEST, true)
.where(STORE.ID.eq(businessDetail.getStoreId()))
.update();
}
businessDetailService.removeById(bo.getId());
}
BusinessDetailService businessDetailService = SpringUtils.getBean(BusinessDetailService.class);
businessDetailService.removeById(bo.getId());
//所有任务都完成
if (business.getAllSurplusQuantity() - 1 == 0) {
business.setStatus(1);
@ -339,7 +315,6 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
*/
@Override
public PersonBusinessInfoVo getPersonBusinessInfoById(String id) {
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
return this.getOneAs(QueryWrapper.create()
.select(BUSINESS.BUSINESS_LEVEL,BUSINESS.BUSINESS_TYPE,BUSINESS.DESC,BUSINESS.START_DATE,BUSINESS.END_DATE,BUSINESS.REMARK)
.select(STAFF.NAME.as(PersonBusinessInfoVo::getInitiatorName))
@ -347,7 +322,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
.leftJoin(STAFF).on(STAFF.ID.eq(BUSINESS.INITIATOR_ID))
.leftJoin(BUSINESS_STAFF).on(BUSINESS_STAFF.BUSINESS_ID.eq(BUSINESS.ID))
.where(BUSINESS.ID.eq(id))
.and(BUSINESS_STAFF.STAFF_ID.eq(loginUserInfo.getString("id"))),
.and(BUSINESS_STAFF.STAFF_ID.eq(StpUtil.getSession().getString("id"))),
PersonBusinessInfoVo.class);
}
@ -363,18 +338,12 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.pageAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
QueryWrapper.create()
.select(STORE.ID, STORE.STORE_NAME, STORE.PERSON_CHARGE, STORE.PHONE, STORE.BRAND_ID)
.select(STORE.ID, STORE.STORE_NAME, STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.BRAND_ID,STORE.LICENSE_PIC_URL)
.select(BRAND.BRAND_NAME)
.select(STORE_LICENSE.LICENSE_PIC_URL)
.from(STORE)
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.leftJoin(STORE_LICENSE).on(STORE_LICENSE.STORE_ID.eq(STORE.ID))
.leftJoin(STORE_SIGN).on(STORE_SIGN.ID.eq(STORE.SIGN_ID))
.where(STORE.SIGN_ID.isNull())
.and(STORE.IS_TEST.eq(false))
.and(STORE.STORE_NAME.like(params)
.or(STORE.PERSON_CHARGE.like(params)
.or(STORE.PHONE.eq(params))))
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.and(STORE.STORE_NAME.likeLeft(params).or(STORE.PERSON_CHARGE_NAME.likeLeft(params).or(STORE.PERSON_CHARGE_PHONE.eq(params))))
.and(STORE.CREATE_TIME.ge(LocalDate.parse("2023-12-01", DateTimeFormatter.ofPattern("yyyy-MM-dd"))))
.orderBy(STORE.CREATE_TIME.desc()),
BusinessUnSignPageVo.class);
@ -389,18 +358,13 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
@Override
@Transactional(rollbackFor = Exception.class)
public void storeSign(String id) {
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
SaSession session = StpUtil.getSession();
StoreSign storeSign = new StoreSign();
storeSign.setStoreId(id);
storeSign.setSignStaffId(loginUserInfo.getString("id"));
storeSign.setSignStaffId(session.getString("id"));
storeSign.setSignMonth(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM")));
StoreSignService storeSignService = SpringUtils.getBean(StoreSignService.class);
storeSignService.save(storeSign);
SpringUtils.getBean(StoreService.class).updateChain()
.set(STORE.SIGN_ID,storeSign.getId())
.set(STORE.HAVE_COUNSELOR,true)
.where(STORE.ID.eq(id))
.update();
//线索归档
ClueService clueService = SpringUtils.getBean(ClueService.class);
Clue clue = clueService.queryChain().where(CLUE.STORE_ID.eq(id)).one();
@ -411,7 +375,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
clueRecord.setRecordType(5)
.setClueId(clue.getId())
.setRecordContent("机构签约")
.setRecordStaffId(loginUserInfo.getString("id"));
.setRecordStaffId(session.getString("id"));
SpringUtils.getBean(ClueRecordServiceImpl.class).save(clueRecord);
//签约目标更新
LocalDate now = LocalDate.now();
@ -419,7 +383,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
int year = now.getYear();
SignGoalService signGoalService = SpringUtils.getBean(SignGoalService.class);
SignGoal signGoal = signGoalService.getOne(QueryWrapper.create()
.where(SIGN_GOAL.STAFF_ID.eq(loginUserInfo.getString("id")))
.where(SIGN_GOAL.STAFF_ID.eq(session.getString("id")))
.and(SIGN_GOAL.YEAR.eq(year)));
changeMonthGoal(signGoal,month);
signGoalService.updateById(signGoal);

View File

@ -1,23 +1,20 @@
package com.cpop.oam.business.service.impl;
import com.alibaba.fastjson.JSONObject;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.oam.business.bo.PutOffAuditBo;
import com.cpop.oam.business.entity.Clue;
import com.cpop.oam.business.entity.CluePutOff;
import com.cpop.oam.business.entity.ClueRecord;
import com.cpop.oam.business.mapper.CluePutOffMapper;
import com.cpop.oam.business.service.CluePutOffService;
import com.cpop.oam.business.service.ClueRecordService;
import com.cpop.oam.business.service.ClueService;
import com.cpop.oam.business.vo.CluePageVo;
import com.cpop.oam.business.vo.PutOffAuditPageVo;
import com.cpop.system.business.service.StoreRenewService;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.oam.business.entity.CluePutOff;
import com.cpop.oam.business.mapper.CluePutOffMapper;
import com.cpop.oam.business.service.CluePutOffService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -52,7 +49,7 @@ public class CluePutOffServiceImpl extends ServiceImpl<CluePutOffMapper, CluePut
QueryWrapper.create()
.select(CLUE_PUT_OFF.ID,CLUE_PUT_OFF.PUT_OFF_STAFF_ID,CLUE_PUT_OFF.PUT_OFF_REASON,CLUE_PUT_OFF.PUT_OFF_FILE_URL,CLUE_PUT_OFF.CREATE_TIME,CLUE_PUT_OFF.PUT_OFF_DATE)
.select(CLUE.RECEIPT_TIME,CLUE.STORE_ID,CLUE.CITY)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE,STORE.PHONE)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE_NAME,STORE.PERSON_CHARGE_PHONE)
.select(BRAND.BRAND_NAME)
.select(STORE_SIGN.EXPIRE_DATE)
// 跟进间隔
@ -82,16 +79,15 @@ public class CluePutOffServiceImpl extends ServiceImpl<CluePutOffMapper, CluePut
@Override
@Transactional(rollbackFor = Exception.class)
public void putOffAuditSelect(PutOffAuditBo bo) {
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
CluePutOff cluePutOff = this.getById(bo.getId());
this.updateChain()
.set(CLUE_PUT_OFF.AUDIT_STATUS, bo.getAuditResult() ? 1 : 2)
.set(CLUE_PUT_OFF.AUDIT_STAFF_ID,loginUserInfo.getString("id"))
.set(CLUE_PUT_OFF.AUDIT_STAFF_ID, StpUtil.getLoginIdAsString())
.where(CLUE_PUT_OFF.ID.eq(bo.getId()))
.update();
//添加记录
ClueRecord clueRecord = new ClueRecord();
clueRecord.setRecordStaffId(loginUserInfo.getString("id"))
clueRecord.setRecordStaffId(StpUtil.getLoginIdAsString())
.setRecordType(7)
.setRecordContent(bo.getAuditResult() ? "延期通过" : "延期拒绝")
.setClueId(cluePutOff.getClueId());
@ -99,14 +95,15 @@ public class CluePutOffServiceImpl extends ServiceImpl<CluePutOffMapper, CluePut
//通过
if (bo.getAuditResult()){
//校区延期
StoreRenewBo storeRenewBo = new StoreRenewBo();
//TODO校区延期
/*StoreRenewBo storeRenewBo = new StoreRenewBo();
Clue clue = SpringUtils.getBean(ClueService.class).getById(cluePutOff.getClueId());
storeRenewBo.setStoreId(clue.getStoreId())
.setRenewDesc(cluePutOff.getPutOffReason())
.setRenewType(1)
.setRenewDate(cluePutOff.getPutOffDate())
.setAnnexUrl(cluePutOff.getPutOffFileUrl());
SpringUtils.getBean(StoreRenewService.class).storeRenew(storeRenewBo);
SpringUtils.getBean(StoreRenewService.class).storeRenew(storeRenewBo);*/
}
}
}

View File

@ -1,19 +1,23 @@
package com.cpop.oam.business.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.ClueFollowUpBo;
import com.cpop.oam.business.bo.CluePutOffBo;
import com.cpop.oam.business.bo.ClueUpdateBo;
import com.cpop.oam.business.entity.*;
import com.cpop.oam.business.mapper.ClueMapper;
import com.cpop.oam.business.service.*;
import com.cpop.oam.business.vo.*;
import com.cpop.oam.business.vo.CluePageVo;
import com.cpop.oam.business.vo.CluePutOffVo;
import com.cpop.oam.business.vo.ClueUpdateVo;
import com.cpop.oam.business.vo.PersonSignGoalVo;
import com.cpop.oam.framework.constant.OamRedisConstant;
import com.cpop.system.business.entity.DictData;
import com.cpop.system.business.entity.Store;
@ -23,15 +27,15 @@ import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryOrderBy;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.cpop.oam.business.mapper.ClueMapper;
import io.swagger.models.auth.In;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.locks.Lock;
import java.util.stream.Collectors;
@ -77,8 +81,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
if (StringUtils.isNotBlank(staffId)) {
queryWrapper.and(CLUE.RESPONSIBLE_STAFF_ID.eq(staffId));
} else {
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
queryWrapper.and(CLUE.RESPONSIBLE_STAFF_ID.eq(loginUserInfo.getString("id")));
queryWrapper.and(CLUE.RESPONSIBLE_STAFF_ID.eq(StpUtil.getSession().getString("id")));
}
if (StringUtils.isNotBlank(city) && StringUtils.equals("其他", city)) {
int year = LocalDate.now().getYear();
@ -100,7 +103,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
queryWrapper
.select(CLUE.CITY,CLUE.ID,CLUE.CREATE_TIME,CLUE.DEV_STAFF_ID,CLUE.LAST_FOLLOW_UP_TIME,CLUE.LAST_FOLLOW_UP_CONTENT,CLUE.RECEIPT_TIME,CLUE.STORE_ID,CLUE.CLUE_STATUS,
CLUE.FOLLOW_STATUS)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE,STORE.PHONE)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE_NAME,STORE.PERSON_CHARGE_PHONE)
.select(BRAND.BRAND_NAME)
.select(STORE_SIGN.EXPIRE_DATE,STORE_SIGN.CREATE_TIME.as(CluePageVo::getStoreSignTime))
// 跟进间隔
@ -116,7 +119,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
//校区
.and(CLUE.STORE_ID.eq(storeId))
.and(CLUE.FOLLOW_STATUS.eq(followStatus))
.and(STORE.PERSON_CHARGE.likeLeft(chargeOrPhone).or(STORE.PHONE.eq(chargeOrPhone)))
.and(STORE.PERSON_CHARGE_NAME.likeLeft(chargeOrPhone).or(STORE.PERSON_CHARGE_PHONE.eq(chargeOrPhone)))
.and(STORE_SIGN.SIGN_MONTH.eq(signMonth))
.orderBy(changeOrderColumn(pageDomain)),
CluePageVo.class,
@ -178,9 +181,9 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
if (StringUtils.isNotBlank(staffId)) {
queryWrapper.and(SIGN_GOAL.STAFF_ID.eq(staffId));
} else {
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
queryWrapper.and(SIGN_GOAL.STAFF_ID.eq(loginUserInfo.getString("id")));
staffId = loginUserInfo.getString("id");
String id = StpUtil.getSession().getString("id");
queryWrapper.and(SIGN_GOAL.STAFF_ID.eq(id));
staffId = id;
}
SignGoalService signGoalService = SpringUtils.getBean(SignGoalService.class);
if (StringUtils.isBlank(signMonth)) {
@ -258,8 +261,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
public void clueFollowUp(ClueFollowUpBo bo) {
ClueRecord clueRecord = BeanUtils.mapToClass(bo, ClueRecord.class);
clueRecord.setRecordType(2);
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
clueRecord.setRecordStaffId(loginUserInfo.getString("id"));
clueRecord.setRecordStaffId(StpUtil.getSession().getString("id"));
SpringUtils.getBean(ClueRecordService.class).save(clueRecord);
SpringUtils.getBean(ClueService.class).updateChain()
.set(CLUE.LAST_FOLLOW_UP_TIME, LocalDateTime.now())
@ -286,24 +288,24 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
StoreService storeService = SpringUtils.getBean(StoreService.class);
Store store = storeService.getById(clue.getStoreId());
ClueUpdate clueUpdate = BeanUtils.mapToClass(bo,ClueUpdate.class);
clueUpdate.setOldPersonCharge(store.getPersonCharge())
.setOldPhone(store.getPhone())
clueUpdate.setOldPersonCharge(store.getPersonChargeName())
.setOldPhone(store.getPersonChargePhone())
.setOldStoreAddr(store.getStoreAddr())
.setOldStoreName(store.getStoreName());
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
clueUpdate.setUpdateStaffId(loginUserInfo.getString("id"));
String id = StpUtil.getSession().getString("id");
clueUpdate.setUpdateStaffId(id);
//保存记录
SpringUtils.getBean(ClueUpdateService.class).save(clueUpdate);
ClueRecord clueRecord = new ClueRecord();
clueRecord.setClueId(bo.getClueId())
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(id)
.setRecordType(6)
.setRecordContent("校区更新");
SpringUtils.getBean(ClueRecordService.class).save(clueRecord);
//更新校区
store.setStoreName(bo.getNewStoreName())
.setPersonCharge(bo.getNewPersonCharge())
.setPhone(bo.getNewPhone())
.setPersonChargeName(bo.getNewPersonCharge())
.setPersonChargePhone(bo.getNewPhone())
.setStoreAddr(bo.getNewStoreAddr());
storeService.updateById(store);
}
@ -331,8 +333,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
Clue clue = this.getById(clueId);
Store store = SpringUtils.getBean(StoreService.class).getById(clue.getStoreId());
clueUpdateVo.setStoreName(store.getStoreName())
.setPhone(store.getPhone())
.setPersonCharge(store.getPersonCharge())
.setPhone(store.getPersonChargePhone())
.setPersonCharge(store.getPersonChargeName())
.setStoreAddr(store.getStoreAddr());
return clueUpdateVo;
}
@ -347,7 +349,6 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
@Transactional(rollbackFor = Exception.class)
public void cluePutOff(CluePutOffBo bo) {
//查询延期记录
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
CluePutOffService cluePutOffService = SpringUtils.getBean(CluePutOffService.class);
long count = cluePutOffService.count(QueryWrapper.create()
.where(CLUE_PUT_OFF.AUDIT_STATUS.eq(0))
@ -355,13 +356,13 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
if (count > 0) {
throw new ServiceException("该线索在审核中,请勿重复提交");
}
String id = StpUtil.getSession().getString("id");
CluePutOff cluePutOff = BeanUtils.mapToClass(bo, CluePutOff.class);
cluePutOff.setAuditStatus(0)
.setPutOffStaffId(loginUserInfo.getString("id"));
cluePutOff.setAuditStatus(0).setPutOffStaffId(id);
cluePutOffService.save(cluePutOff);
ClueRecord clueRecord = new ClueRecord();
clueRecord.setClueId(bo.getClueId())
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(id)
.setRecordType(7)
.setRecordContent(bo.getPutOffReason());
SpringUtils.getBean(ClueRecordService.class).save(clueRecord);
@ -424,10 +425,9 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
.set(CLUE.RECEIPT_TIME,null)
.where(CLUE.ID.eq(clue.getId()))
.update();
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
ClueRecord clueRecord = new ClueRecord();
clueRecord.setClueId(id)
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(StpUtil.getLoginIdAsString())
.setRecordType(4)
.setRecordContent("主动脱离");
SpringUtils.getBean(ClueRecordService.class).save(clueRecord);
@ -448,12 +448,11 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
QueryWrapper queryWrapper = QueryWrapper.create();
//获取员工区域信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
int year = LocalDate.now().getYear();
List<String> cityList = SpringUtils.getBean(SignAreaService.class).queryChain()
.select(distinct(SIGN_AREA.CITY))
.leftJoin(SIGN_GOAL).on(SIGN_GOAL.ID.eq(SIGN_AREA.SIGN_GOAL_ID))
.where(SIGN_GOAL.STAFF_ID.eq(loginUserInfo.getString("id")))
.where(SIGN_GOAL.STAFF_ID.eq(StpUtil.getLoginIdAsString()))
.and(SIGN_GOAL.YEAR.eq(year))
.listAs(String.class);
if (cityList == null || cityList.isEmpty()){
@ -461,7 +460,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
}
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()), queryWrapper
.select(CLUE.CITY,CLUE.ID,CLUE.CREATE_TIME,CLUE.DEV_STAFF_ID,CLUE.LAST_FOLLOW_UP_TIME,CLUE.LAST_FOLLOW_UP_CONTENT,CLUE.RECEIPT_TIME,CLUE.STORE_ID,CLUE.LAST_RECEIPT_TIME,CLUE.LAST_RECEIPT_STAFF_ID)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE,STORE.PHONE)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE_NAME,STORE.PERSON_CHARGE_PHONE)
.select(BRAND.BRAND_NAME)
.select(STORE_SIGN.EXPIRE_DATE,STORE_SIGN.CREATE_TIME.as(CluePageVo::getStoreSignTime))
// 跟进间隔
@ -477,7 +476,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
.and(BRAND.ID.eq(brandId))
//校区
.and(CLUE.STORE_ID.eq(storeId))
.and(STORE.PERSON_CHARGE.likeLeft(chargeOrPhone).or(STORE.PHONE.eq(chargeOrPhone)))
.and(STORE.PERSON_CHARGE_NAME.likeLeft(chargeOrPhone).or(STORE.PERSON_CHARGE_PHONE.eq(chargeOrPhone)))
.and(CLUE.RESPONSIBLE_STAFF_ID.isNull())
.orderBy(CLUE.CREATE_TIME.desc()),
CluePageVo.class,
@ -541,7 +540,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
}*/
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()), queryWrapper
.select(CLUE.CITY,CLUE.ID,CLUE.CREATE_TIME,CLUE.DEV_STAFF_ID,CLUE.LAST_FOLLOW_UP_TIME,CLUE.LAST_FOLLOW_UP_CONTENT,CLUE.RECEIPT_TIME,CLUE.STORE_ID,CLUE.LAST_RECEIPT_TIME,CLUE.LAST_RECEIPT_STAFF_ID)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE,STORE.PHONE)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE_NAME,STORE.PERSON_CHARGE_PHONE)
.select(BRAND.BRAND_NAME)
.select(STORE_SIGN.EXPIRE_DATE,STORE_SIGN.CREATE_TIME.as(CluePageVo::getStoreSignTime))
// 跟进间隔
@ -556,7 +555,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
.and(BRAND.ID.eq(brandId))
//校区
.and(CLUE.STORE_ID.eq(storeId))
.and(STORE.PERSON_CHARGE.likeLeft(chargeOrPhone).or(STORE.PHONE.eq(chargeOrPhone)))
.and(STORE.PERSON_CHARGE_NAME.likeLeft(chargeOrPhone).or(STORE.PERSON_CHARGE_PHONE.eq(chargeOrPhone)))
.and(CLUE.RESPONSIBLE_STAFF_ID.isNull())
.orderBy(CLUE.CREATE_TIME.desc()),
CluePageVo.class,
@ -611,24 +610,24 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
if (StringUtils.isNotBlank(clue.getResponsibleStaffId())){
throw new ServiceException("当前线索已被领取,请刷新页面后重试");
}
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
String loginIdAsString = StpUtil.getLoginIdAsString();
if (StringUtils.isBlank(clue.getDevStaffId())) {
clue.setDevStaffId(loginUserInfo.getString("id"));
clue.setDevStaffId(loginIdAsString);
}
LocalDateTime now = LocalDateTime.now();
String content = "员工" + loginUserInfo.getString("name") + "领取了该线索";
clue.setResponsibleStaffId(loginUserInfo.getString("id"))
String content = "员工" + StpUtil.getSession().getString("name") + "领取了该线索";
clue.setResponsibleStaffId(loginIdAsString)
.setReceiptTime(now)
.setLastFollowUpTime(now)
.setLastFollowUpContent(content)
.setLastReceiptStaffId(loginUserInfo.getString("id"))
.setLastReceiptStaffId(loginIdAsString)
.setLastReceiptTime(now);
this.updateById(clue);
//插入记录
ClueRecord clueRecord = new ClueRecord();
clueRecord.setClueId(id)
.setRecordType(1)
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(loginIdAsString)
.setRecordContent(content);
SpringUtils.getBean(ClueRecordService.class).save(clueRecord);
}catch (Exception e) {
@ -658,7 +657,6 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
public Page<CluePageVo> getMyDevCluePage(String city, String brandId, String storeId, String chargeOrPhone) {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
QueryWrapper queryWrapper = QueryWrapper.create();
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
if (StringUtils.isNotBlank(city) && StringUtils.equals("其他", city)) {
List<String> dictValues = SpringUtils.getBean(DictDataService.class).getDictDataByDictType("oam_clue_area")
.stream().map(DictData::getDictValue).collect(Collectors.toList());
@ -673,11 +671,10 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
} else if (StringUtils.isNotBlank(city)) {
queryWrapper.and(CLUE.CITY.eq(city));
}
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()),
queryWrapper
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(),pageDomain.getPageSize()), queryWrapper
.select(CLUE.CITY,CLUE.ID,CLUE.CREATE_TIME,CLUE.DEV_STAFF_ID,CLUE.LAST_FOLLOW_UP_TIME,CLUE.LAST_FOLLOW_UP_CONTENT,CLUE.RECEIPT_TIME,CLUE.STORE_ID,CLUE.RESPONSIBLE_STAFF_ID,
CLUE.CLUE_STATUS)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE,STORE.PHONE)
.select(STORE.STORE_NAME,STORE.STORE_ADDR,STORE.PERSON_CHARGE_NAME,STORE.PERSON_CHARGE_PHONE)
.select(BRAND.BRAND_NAME)
.select(STORE_SIGN.CREATE_TIME.as(CluePageVo::getStoreSignTime))
// 跟进间隔
@ -688,12 +685,12 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
.leftJoin(STORE).on(STORE.ID.eq(CLUE.STORE_ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.and(CLUE.DEV_STAFF_ID.eq(loginUserInfo.getString("id")))
.and(CLUE.DEV_STAFF_ID.eq(StpUtil.getLoginIdAsString()))
//品牌
.and(BRAND.ID.eq(brandId))
//校区
.and(CLUE.STORE_ID.eq(storeId))
.and(STORE.PERSON_CHARGE.likeLeft(chargeOrPhone).or(STORE.PHONE.eq(chargeOrPhone)))
.and(STORE.PERSON_CHARGE_NAME.likeLeft(chargeOrPhone).or(STORE.PERSON_CHARGE_PHONE.eq(chargeOrPhone)))
.orderBy(CLUE.CREATE_TIME.desc()),
CluePageVo.class,
//开发员工

View File

@ -1,29 +1,30 @@
package com.cpop.oam.business.service.impl;
import com.mybatisflex.core.row.DbChain;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysConfig;
import com.cpop.core.base.table.Config;
import com.cpop.core.service.ConfigService;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.SysConfigInfoBo;
import com.cpop.oam.business.service.CommonService;
import com.cpop.oam.business.vo.ConfigInfoVo;
import com.cpop.oam.framework.constant.OamConfigKey;
import com.cpop.oam.framework.enums.OamConfigEnum;
import com.mybatisflex.core.row.DbChain;
import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import java.lang.reflect.Field;
import java.util.*;
import static com.cpop.core.base.table.table.SysConfigTableDef.SYS_CONFIG;
import static com.cpop.core.base.table.table.ConfigTableDef.CONFIG;
/**
* @author DB
* @createTime 2023/09/13 12:45
* @description
* @since 2023/09/13 12:45
*/
@Service("oamCommonService")
public class CommonServiceImpl implements CommonService {
@ -47,12 +48,12 @@ public class CommonServiceImpl implements CommonService {
List<String> signGoalList = Arrays.asList(OamConfigKey.SIGN_GOAL);
keys.addAll(signGoalList);
// 加载OAM配置参数
List<SysConfig> configsList = DbChain.table(SYS_CONFIG)
.select(SYS_CONFIG.ALL_COLUMNS)
.where(SYS_CONFIG.CONFIG_KEY.in(keys))
.listAs(SysConfig.class);
List<Config> configsList = DbChain.table(CONFIG)
.select(CONFIG.ALL_COLUMNS)
.where(CONFIG.CONFIG_KEY.in(keys))
.listAs(Config.class);
if (!configsList.isEmpty()) {
for (SysConfig config : configsList) {
for (Config config : configsList) {
SpringUtils.getBean(RedisService.class)
.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
}
@ -90,15 +91,15 @@ public class CommonServiceImpl implements CommonService {
}
/**
* @Description: 获取系统配置信息
* 获取系统配置信息
* @return R<OpenPlatformConfigVo>
* @author DB
* @Date: 2023/7/7 0007 16:27
* @since 2023/7/7 0007 16:27
*/
@Override
public ConfigInfoVo getSysConfigInfo() {
RedisService redisService = SpringUtils.getBean(RedisService.class);
CoreService coreService = SpringUtils.getBean(CoreService.class);
ConfigService configService = SpringUtils.getBean(ConfigService.class);
// 获取企业微信信息
Map<String, String> configMap = new HashMap<>(8);
Arrays.asList(OamConfigKey.WORK_WX_INFO).forEach(item -> {
@ -109,7 +110,7 @@ public class CommonServiceImpl implements CommonService {
configMap.put(sysConfigEnum.getField(), cacheInfo);
} else {
// 查询系统
SysConfig sysConfig = coreService.selectConfigByKey(item);
Config sysConfig = configService.getById(item);
if (null != sysConfig) {
// 获取枚举
OamConfigEnum sysConfigEnum = OamConfigEnum.matchKey(item);
@ -124,14 +125,13 @@ public class CommonServiceImpl implements CommonService {
/**
* @param bo 请求参数
* @Description: 设置系统配置信息
* @return: R<Void>
* @Author: DB
* @Date: 2023/5/11 15:48
* 设置系统配置信息
* @author DB
* @since 2023/5/11 15:48
**/
@Override
public void setSysConfigInfo(SysConfigInfoBo bo) {
CoreService coreService = SpringUtils.getBean(CoreService.class);
ConfigService configService = SpringUtils.getBean(ConfigService.class);
// 遍历属性名与值
try {
for (Field field : bo.getClass().getDeclaredFields()) {
@ -139,17 +139,17 @@ public class CommonServiceImpl implements CommonService {
// 获取枚举
OamConfigEnum sysConfigEnum = OamConfigEnum.matchField(field.getName());
if (null != sysConfigEnum) {
SysConfig sysConfig = new SysConfig();
Config sysConfig = new Config();
sysConfig.setConfigName(sysConfigEnum.getName())
.setConfigKey(sysConfigEnum.getKey())
.setConfigValue(field.get(bo).toString());
// 修改
if (DbChain.table(SYS_CONFIG)
.where(SYS_CONFIG.CONFIG_KEY.eq(sysConfig.getConfigKey()))
if (DbChain.table(CONFIG)
.where(CONFIG.CONFIG_KEY.eq(sysConfig.getConfigKey()))
.count() > 0) {
coreService.updateConfig(sysConfig);
configService.updateById(sysConfig);
} else {
coreService.insertConfig(sysConfig);
configService.save(sysConfig);
}
// 更新缓存
SpringUtils.getBean(RedisService.class)

View File

@ -1,7 +1,7 @@
package com.cpop.oam.business.service.impl;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.MessageUtils;
import com.cpop.core.utils.SpringUtils;
@ -12,18 +12,11 @@ import com.cpop.oam.business.mapper.DeptMapper;
import com.cpop.oam.business.service.DeptService;
import com.cpop.oam.business.service.StaffMidDeptService;
import com.cpop.oam.business.vo.DeptVo;
import com.cpop.oam.framework.config.wxCp.WxCpConfiguration;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.row.RowUtil;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.WxCpDepart;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
@ -107,7 +100,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements De
* @Date: 2023/5/9 20:55
*/
private boolean hasChild(List<DeptVo> list, DeptVo t) {
return getChildList(list, t).size() > 0;
return !getChildList(list, t).isEmpty();
}
/**

View File

@ -1,10 +1,9 @@
package com.cpop.oam.business.service.impl;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.common.utils.DateUtils;
import com.cpop.common.utils.StringUtils;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.oam.business.bo.DutyBo;
import com.cpop.oam.business.bo.DutyListBo;
import com.cpop.oam.business.dto.StaffDto;
@ -22,14 +21,16 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.sql.Date;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.DutyTableDef.DUTY;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
@ -109,7 +110,8 @@ public class DutyServiceImpl extends ServiceImpl<DutyMapper, Duty> implements Du
//开始日期结束日期
String startDate = bo.getDutyDate().get(0);
String endDate = bo.getDutyDate().get(1);
List<String> dateList = DateUtils.getDatesBetweenTwoDatesT(Date.valueOf(startDate), Date.valueOf(endDate));
//TODO
/*List<String> dateList = DateUtils.getDatesBetweenTwoDatesT(Date.valueOf(startDate), Date.valueOf(endDate));
//先删后存
this.remove(QueryWrapper.create().where(DUTY.DUTY_DATE.ge(startDate).and(DUTY.DUTY_DATE.le(endDate))));
List<Duty> entityList = new ArrayList<Duty>();
@ -120,7 +122,7 @@ public class DutyServiceImpl extends ServiceImpl<DutyMapper, Duty> implements Du
.setTechnologyStaffId(bo.getTechnologyStaffId());
entityList.add(entity);
});
this.saveBatch(entityList);
this.saveBatch(entityList);*/
}
/**
@ -147,8 +149,8 @@ public class DutyServiceImpl extends ServiceImpl<DutyMapper, Duty> implements Du
Duty one = this.queryChain().where(DUTY.DUTY_DATE.eq(now)).one();
if (one != null) {
//获取当天技术值班人员
StaffDto staff = DbChain.table(SYS_USER).select(SYS_USER.PHONE_NUMBER, STAFF.NAME).from(SYS_USER)
.leftJoin(STAFF).on(STAFF.USER_ID.eq(SYS_USER.ID))
StaffDto staff = DbChain.table(USER).select(USER.PHONE_NUMBER, STAFF.NAME).from(USER)
.leftJoin(STAFF).on(STAFF.USER_ID.eq(USER.ID))
.where(STAFF.ID.eq(one.getTechnologyStaffId())).oneAs(StaffDto.class);
//技术售后群提醒
try {

View File

@ -1,15 +1,16 @@
package com.cpop.oam.business.service.impl;
import com.alibaba.fastjson.JSONObject;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysConfig;
import com.cpop.core.base.table.Config;
import com.cpop.core.service.ConfigService;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.*;
import com.cpop.oam.business.entity.FinanceReimburse;
import com.cpop.oam.business.entity.FinanceReimburseStage;
@ -36,7 +37,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.FinanceReimburseStageTableDef.FINANCE_REIMBURSE_STAGE;
import static com.cpop.oam.business.entity.table.FinanceReimburseTableDef.FINANCE_REIMBURSE;
import static com.cpop.oam.business.entity.table.FinanceReimburseTypeTableDef.FINANCE_REIMBURSE_TYPE;
@ -52,16 +53,15 @@ import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMapper, FinanceReimburse> implements FinanceReimburseService {
/**
* @Description: 财务报销模块-报销分页列表
* 财务报销模块-报销分页列表
* @param bo 请求参数
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@Override
public Page<FinanceReimbursePageVo> getFinanceReimbursePage(FinanceReimbursePageBo bo) {
//获取当前登陆用户信息
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
QueryWrapper queryWrapper = QueryWrapper.create();
if (bo.getStatus()!=null){
@ -80,9 +80,9 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
.from(FINANCE_REIMBURSE)
.leftJoin(FINANCE_REIMBURSE_TYPE).on(FINANCE_REIMBURSE_TYPE.ID.eq(FINANCE_REIMBURSE.TYPE_ID))
.leftJoin(STAFF).on(STAFF.ID.eq(FINANCE_REIMBURSE.STAFF_ID))
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
//用户id
.where(SYS_USER.ID.eq(loginUser.getUserId()))
.where(USER.ID.eq(StpUtil.getSession().getString("userId")))
//类型
.and(FINANCE_REIMBURSE.TYPE_ID.eq(bo.getTypeId()))
.orderBy(FINANCE_REIMBURSE.UPDATE_TIME.desc()),
@ -90,11 +90,11 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
}
/**
* @Description: 财务报销模块-报销审核分页列表
* 财务报销模块-报销审核分页列表
* @param bo 请求参数
* @return: R<Page<FinanceReimbursePageVo>>
* @Author: DB
* @Date: 2023/5/30 15:44
* @return R<Page<FinanceReimbursePageVo>>
* @author DB
* @since 2023/5/30 15:44
**/
@Override
public Page<FinanceReimburseAuditPageVo> getReimburseAuditPage(FinanceReimburseAuditPageBo bo) {
@ -106,7 +106,7 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
.from(FINANCE_REIMBURSE)
.leftJoin(FINANCE_REIMBURSE_TYPE).on(FINANCE_REIMBURSE_TYPE.ID.eq(FINANCE_REIMBURSE.TYPE_ID))
.leftJoin(STAFF).on(STAFF.ID.eq(FINANCE_REIMBURSE.STAFF_ID))
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
//类型
.and(FINANCE_REIMBURSE.TYPE_ID.eq(bo.getTypeId()))
//理由
@ -170,22 +170,21 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
@Override
public void insertReimburseApplication(ReimburseApplicationBo bo) {
//获取申请员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
FinanceReimburse financeReimburse = BeanUtils.mapToClass(bo, FinanceReimburse.class);
financeReimburse.setStaffId(loginUserInfo.getString("id"))
financeReimburse.setStaffId(StpUtil.getLoginIdAsString())
.setStatus(0);
this.save(financeReimburse);
//提醒审核员工
try {
List<String> phoneList = new ArrayList<>();
phoneList.add(loginUserInfo.getString("phoneNumber"));
phoneList.add(StpUtil.getSession().getString("phone"));
// 获取审核管理员手机号
RedisService redisService = SpringUtils.getBean(RedisService.class);
CommonService commonService = SpringUtils.getBean(CommonService.class);
String auditStaffPhone = redisService.getCacheObject(commonService.getCacheKey(OamConfigEnum.CANCEL_AFTER_VERIFICATION_STAFF_PHONE.getKey()));
if (StringUtils.isBlank(auditStaffPhone)) {
SysConfig sysConfig = SpringUtils.getBean(CoreService.class).selectConfigByKey(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()));
auditStaffPhone = sysConfig.getConfigValue();
Config config = SpringUtils.getBean(ConfigService.class).getById(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()));
auditStaffPhone = config.getConfigValue();
redisService.setCacheObject(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()), auditStaffPhone);
}
phoneList.add(auditStaffPhone);
@ -220,10 +219,9 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
@Override
public ReimbursePersonStatisticVo getPersonStatistic() {
//读取员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
List<FinanceReimburse> list = this.list(QueryWrapper.create()
.where(FINANCE_REIMBURSE.STAFF_ID.eq(loginUserInfo.getString("id")))
.and(FINANCE_REIMBURSE.STATUS.ne(-1)));
.where(FINANCE_REIMBURSE.STAFF_ID.eq(StpUtil.getLoginIdAsString())
.and(FINANCE_REIMBURSE.STATUS.ne(-1))));
//统计
ReimbursePersonStatisticVo vo = new ReimbursePersonStatisticVo();
vo.setUnPay(list.stream().filter(s -> s.getStatus() != 2).map(FinanceReimburse::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add));

View File

@ -1,6 +1,6 @@
package com.cpop.oam.business.service.impl;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.utils.SpringUtils;

View File

@ -1,17 +1,17 @@
package com.cpop.oam.business.service.impl;
import cn.dev33.satoken.secure.BCrypt;
import cn.dev33.satoken.stp.StpUtil;
import com.alibaba.fastjson.JSONObject;
import com.cpop.common.constant.Constants;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.entity.loginInfo.OamStaffLoginInfo;
import com.cpop.core.base.enums.UserType;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysUser;
import com.cpop.core.base.table.User;
import com.cpop.core.constant.Constants;
import com.cpop.core.service.RedisService;
import com.cpop.core.service.UserService;
import com.cpop.core.utils.*;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.core.utils.uuid.IdUtils;
import com.cpop.jambox.framework.constant.JamboxCloudUrl;
import com.cpop.oam.business.bo.*;
@ -20,10 +20,7 @@ import com.cpop.oam.business.entity.StaffMidDept;
import com.cpop.oam.business.mapper.StaffMapper;
import com.cpop.oam.business.service.StaffMidDeptService;
import com.cpop.oam.business.service.StaffService;
import com.cpop.oam.business.vo.StaffInfoVo;
import com.cpop.oam.business.vo.StaffPageVo;
import com.cpop.oam.business.vo.StaffVo;
import com.cpop.oam.business.vo.SysOperationLogVo;
import com.cpop.oam.business.vo.*;
import com.cpop.oam.framework.constant.OamConfigKey;
import com.cpop.oam.framework.enums.OamConfigEnum;
import com.mybatisflex.core.paginate.Page;
@ -33,7 +30,6 @@ import com.mybatisflex.core.row.DbChain;
import com.mybatisflex.core.row.Row;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate;
@ -44,8 +40,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static com.cpop.core.base.table.table.SysOperationLogTableDef.SYS_OPERATION_LOG;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.OperationLogTableDef.OPERATION_LOG;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.StaffMidDeptTableDef.STAFF_MID_DEPT;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.cpop.system.business.entity.table.RoleTableDef.ROLE;
@ -63,9 +59,9 @@ import static com.mybatisflex.core.query.QueryMethods.groupConcat;
public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements StaffService {
/**
* @descriptions 查询员工分页列表
* 查询员工分页列表
* @author DB
* @date 2023/09/07 18:11
* @since 2023/09/07 18:11
* @param bo 请求参数
* @return com.mybatisflex.core.paginate.Page<com.jambox.system.business.vo.SysStaffPageVo>
*/
@ -76,12 +72,12 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
, QueryWrapper.create()
//去重
.select(distinct(STAFF.ALL_COLUMNS))
.select(SYS_USER.USER_NAME,SYS_USER.NICK_NAME, SYS_USER.EMAIL, SYS_USER.PHONE_NUMBER, SYS_USER.SEX, SYS_USER.AVATAR, SYS_USER.STATUS, SYS_USER.PASSWORD)
.select(USER.USER_NAME,USER.NICK_NAME, USER.EMAIL, USER.PHONE_NUMBER, USER.SEX, USER.AVATAR, USER.STATUS, USER.PASSWORD)
.select(ROLE.ROLE_NAME)
//将部门id分组
.select(groupConcat(STAFF_MID_DEPT.DEPT_ID).as(StaffPageVo::getDeptId))
.from(STAFF)
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.leftJoin(ROLE).on(ROLE.ID.eq(STAFF.ROLE_ID))
//左联中间表
.leftJoin(STAFF_MID_DEPT).on(STAFF_MID_DEPT.STAFF_ID.eq(STAFF.ID))
@ -91,46 +87,37 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
.and(STAFF.STAFF_TYPE.eq(bo.getStaffType()))
//部门id
.and(STAFF_MID_DEPT.DEPT_ID.eq(bo.getDeptId()))
.and(SYS_USER.USER_NAME.ne(Constants.SUPER_ADMIN).or(SYS_USER.USER_NAME.isNull()))
.and(USER.USER_NAME.ne(Constants.SUPER_ADMIN).or(USER.USER_NAME.isNull()))
.groupBy(STAFF.ID)
, StaffPageVo.class);
}
/**
* @descriptions 新增员工
* 新增员工
* @author DB
* @date 2023/09/08 14:12
* @since 2023/09/08 14:12
* @param bo 请求参数
*/
@Override
@Transactional(rollbackFor = Exception.class)
public SysUser insertStaff(StaffBo bo) {
public User insertStaff(StaffBo bo) {
//先添加用户信息
SysUser sysUser;
User user;
if (validatedUserInfo(bo)) {
throw new ServiceException(MessageUtils.message("i18n_alert_userOrPhoneOrEmailIsExist"));
} else {
//用户名-手机-邮箱都需要做唯一校验
sysUser = BeanUtils.mapToClass(bo, SysUser.class);
user = BeanUtils.mapToClass(bo, User.class);
//解密与重设密码
sysUser.setRsaPassword(bo.getPassword());
decryptAndResetPasswords(sysUser);
sysUser.setId(IdUtils.fastSimpleUUID());
//获取当前创建人员信息
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
if (loginUser == null){
sysUser.setCreateUserId("1");
sysUser.setUpdateUserId("1");
} else {
sysUser.setCreateUserId(loginUser.getUserId());
sysUser.setUpdateUserId(loginUser.getUserId());
}
sysUser.setUserType(UserType.OAM_USER.toString());
SpringUtils.getBean(CoreService.class).insertSysUser(sysUser);
user.setRsaPassword(bo.getPassword());
decryptAndResetPasswords(user);
user.setId(IdUtils.fastSimpleUUID());
user.setUserType(UserType.OAM_USER.toString());
SpringUtils.getBean(UserService.class).save(user);
}
//再添加员工信息
Staff sysStaff = BeanUtils.mapToClass(bo, Staff.class);
sysStaff.setUserId(sysUser.getId());
sysStaff.setUserId(user.getId());
this.save(sysStaff);
//批量导入部门信息
List<String> deptList = Arrays.asList(bo.getDeptId().split(","));
@ -141,23 +128,23 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
staffMidDeptList.add(staffMidDept);
});
SpringUtils.getBean(StaffMidDeptService.class).saveBatch(staffMidDeptList);
return sysUser;
return user;
}
/**
* @Description: 用户名-手机-邮箱都需要做唯一校验
* 用户名-手机-邮箱都需要做唯一校验
* @param bo 请求参数
* @return Boolean 通过/未通过
* @Author DB
* @Date: 2023/5/11 11:02
* @author DB
* @since 2023/5/11 11:02
**/
private Boolean validatedUserInfo(StaffBo bo) {
long count = this.count(QueryWrapper.create()
//用户名
.where(SYS_USER.USER_NAME.eq(bo.getUserName()).or(SYS_USER.PHONE_NUMBER.eq(bo.getPhoneNumber())))
.where(USER.USER_NAME.eq(bo.getUserName()).or(USER.PHONE_NUMBER.eq(bo.getPhoneNumber())))
//手机号
.and(SYS_USER.USER_TYPE.eq(UserType.OAM_USER.toString()))
.from(SYS_USER));
.and(USER.USER_TYPE.eq(UserType.OAM_USER.toString()))
.from(USER));
if (StringUtils.isNotBlank(bo.getUserId())) {
return count > 1;
} else {
@ -166,22 +153,22 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
}
/**
* @Description: 解密与重设密码
* @param sysUser 系统用户
* @Author: DB
* @Date: 2023/5/11 11:03
* 解密与重设密码
* @param user 系统用户
* @author DB
* @since 2023/5/11 11:03
**/
private void decryptAndResetPasswords(SysUser sysUser) {
private void decryptAndResetPasswords(User user) {
//先用rsa解密
String password = SpringUtils.getBean(RsaUtils.class).decrypt(sysUser.getPassword());
String password = SpringUtils.getBean(RsaUtils.class).decrypt(user.getPassword());
//再加密
sysUser.setPassword(SpringUtils.getBean(PasswordEncoder.class).encode(password));
user.setPassword(BCrypt.hashpw(password, BCrypt.gensalt()));
}
/**
* @descriptions 修改员工
* 修改员工
* @author DB
* @date 2023/09/08 15:21
* @since 2023/09/08 15:21
* @param bo 请求参数
*/
@Override
@ -191,13 +178,11 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
if (validatedUserInfo(bo)) {
throw new ServiceException(MessageUtils.message("i18n_alert_userOrPhoneOrEmailIsExist"));
} else {
SysUser sysUser = BeanUtils.mapToClass(bo, SysUser.class);
sysUser.setId(bo.getUserId());
User user = BeanUtils.mapToClass(bo, User.class);
user.setId(bo.getUserId());
//密码在这里不做修改
sysUser.setPassword(null);
sysUser.setUpdateUserId(SecurityUtils.getInstance().getLoginUser().getUserId());
sysUser.setUpdateTime(LocalDateTime.now());
SpringUtils.getBean(CoreService.class).updateSysUser(sysUser);
user.setPassword(null);
SpringUtils.getBean(UserService.class).updateById(user);
}
//再修改员工信息
Staff sysStaff = BeanUtils.mapToClass(bo, Staff.class);
@ -218,17 +203,17 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
RedisService redisService = SpringUtils.getBean(RedisService.class);
JSONObject jsonObject = redisService.getCacheObject(UserType.OAM_USER.getKey() + bo.getUserName());
if (jsonObject != null) {
LoginUser loginUser = jsonObject.getObject("user", LoginUser.class);
OamStaffLoginInfo staffLoginInfo = BeanUtils.mapToClass(bo, OamStaffLoginInfo.class);
//TODO修改缓存
/* OamStaffLoginInfo staffLoginInfo = BeanUtils.mapToClass(bo, OamStaffLoginInfo.class);
loginUser.setUser(staffLoginInfo);
redisService.setCacheObject(UserType.OAM_USER.getKey() + loginUser.getUsername(), loginUser);
redisService.setCacheObject(UserType.OAM_USER.getKey() + loginUser.getUsername(), loginUser);*/
}
}
/**
* @descriptions 删除员工
* 删除员工
* @author DB
* @date 2023/09/08 17:43
* @since 2023/09/08 17:43
* @param id 主键
*/
@Override
@ -239,18 +224,17 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
throw new ServiceException("获取员工信息失败,请联系相关人员");
}
//删除用户
SpringUtils.getBean(CoreService.class).removeSysUserById(sysStaff.getUserId());
SpringUtils.getBean(UserService.class).removeById(sysStaff.getUserId());
//删除员工
this.removeById(id);
}
/**
* @Description: 用户名是否存在
* 用户名是否存在
* @param username 用户名
* @param id 主键
* @return: R<Void>
* @Author: DB
* @Date: 2023/5/11 10:09
* @author DB
* @since 2023/5/11 10:09
**/
@Override
public void isAccountExist(String username, String id) {
@ -258,75 +242,73 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
return;
}
if (this.count(QueryWrapper.create()
.where(SYS_USER.USER_NAME.eq(username))
.and(SYS_USER.ID.ne(id))) > 0) {
.where(USER.USER_NAME.eq(username))
.and(USER.ID.ne(id))) > 0) {
throw new ServiceException(MessageUtils.message("i18n_alert_userIsExist"));
}
}
/**
* @Description: 获取员工信息
* 获取员工信息
* @param id 主键
* @return: StaffInfoVo
* @Author: DB
* @Date: 2023/5/17 10:36
* @return StaffInfoVo
* @author DB
* @since 2023/5/17 10:36
**/
@Override
public StaffInfoVo getStaffInfo(String id) {
return this.getOneAs(QueryWrapper.create()
.select(STAFF.ALL_COLUMNS)
.select(SYS_USER.USER_NAME, SYS_USER.NICK_NAME, SYS_USER.SEX, SYS_USER.PHONE_NUMBER, SYS_USER.ID.as("userId"))
.select(USER.USER_NAME, USER.NICK_NAME, USER.SEX, USER.PHONE_NUMBER, USER.ID.as("userId"))
.select(ROLE.ROLE_NAME)
.from(STAFF)
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.leftJoin(ROLE).on(ROLE.ID.eq(STAFF.ROLE_ID))
.where(STAFF.ID.eq(id))
, StaffInfoVo.class);
}
/**
* @Description: 获取用户操作日志分页
* 获取用户操作日志分页
* @param bo 请求参数
* @return: R<PageVo<SysOperationLogVo>>
* @Author: DB
* @Date: 2023/5/12 14:30
* @return R<PageVo<SysOperationLogVo>>
* @author DB
* @since 2023/5/12 14:30
**/
@Override
public Page<SysOperationLogVo> getUserLogList(SysUserLogBo bo) {
public Page<OperationLogVo> getUserLogList(UserLogBo bo) {
QueryWrapper queryWrapper = QueryWrapper.create();
queryWrapper.and(SYS_OPERATION_LOG.OPERATION_USER_ID.eq(bo.getUserId()))
.and(SYS_OPERATION_LOG.OPERATION_USER_NAME.like(bo.getOperationUserName()))
.and(SYS_OPERATION_LOG.DEV_IP.eq(bo.getDevIp()))
.and(SYS_OPERATION_LOG.RESULT.eq(bo.getResult()))
.and(SYS_OPERATION_LOG.LEVEL.eq(bo.getLevel()))
.and(SYS_OPERATION_LOG.ACTION_TYPE.eq(bo.getActionType()));
queryWrapper.and(OPERATION_LOG.OPERATION_USER_ID.eq(bo.getUserId()))
.and(OPERATION_LOG.OPERATION_USER_NAME.like(bo.getOperationUserName()))
.and(OPERATION_LOG.DEV_IP.eq(bo.getDevIp()))
.and(OPERATION_LOG.RESULT.eq(bo.getResult()))
.and(OPERATION_LOG.LEVEL.eq(bo.getLevel()))
.and(OPERATION_LOG.ACTION_TYPE.eq(bo.getActionType()));
if (StringUtils.isNotBlank(bo.getFieldTime())){
String[] split = bo.getFieldTime().split(",");
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
queryWrapper.and(SYS_OPERATION_LOG.CREATE_TIME.ge(LocalDateTime.parse(split[0], df)))
.and(SYS_OPERATION_LOG.CREATE_TIME.le(LocalDateTime.parse(split[1], df)));
queryWrapper.and(OPERATION_LOG.CREATE_TIME.ge(LocalDateTime.parse(split[0], df)))
.and(OPERATION_LOG.CREATE_TIME.le(LocalDateTime.parse(split[1], df)));
}
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
Page<Row> page = Db.paginate("cp_sys_operation_log", pageDomain.getPageNum(), pageDomain.getPageSize(), queryWrapper);
return page.map(row -> row.toEntity(SysOperationLogVo.class));
return page.map(row -> row.toEntity(OperationLogVo.class));
}
/**
* @Description: 修改系统用户密码
* 修改系统用户密码
* @param bo 请求参数
* @return: AjaxResult<Void>
* @Author: DB
* @Date: 2023/5/12 16:00
* @author DB
* @since 2023/5/12 16:00
**/
@Override
public void modifyUserPassword(ModifyUserPasswordBo bo) {
//只允许超级管理员或自己修改面膜
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
String userName = loginUser.getUsername();
String userName = StpUtil.getSession().getString("username");
//同数据库密码进行比较
SysUser user = DbChain.table(SYS_USER)
.where(SYS_USER.ID.eq(bo.getUserId()))
.oneAs(SysUser.class);
User user = DbChain.table(USER)
.where(USER.ID.eq(bo.getUserId()))
.oneAs(User.class);
if (!StringUtils.equals(userName, Constants.SUPER_ADMIN) || !StringUtils.equals(userName, user.getUserName())) {
throw new ServiceException("非超级管理员不允许修改他人密码");
}
@ -335,9 +317,9 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
String oldPassword = rsaUtils.decrypt(bo.getOldPassword());
if (BCrypt.checkpw(oldPassword, user.getPassword())) {
//存入系统
DbChain.table(SYS_USER)
.set(SYS_USER.PASSWORD,SpringUtils.getBean(PasswordEncoder.class).encode(rsaUtils.decrypt(bo.getNewPassword())))
.where(SYS_USER.ID.eq(bo.getUserId()))
DbChain.table(USER)
.set(USER.PASSWORD,SpringUtils.getBean(BCrypt.hashpw(bo.getNewPassword(), BCrypt.gensalt())))
.where(USER.ID.eq(bo.getUserId()))
.update();
} else {
throw new ServiceException(MessageUtils.message("i18n_alert_oldPasswordIsWrong"));
@ -345,20 +327,20 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
}
/**
* @Description: 查询服务员工列表
* @return: R<List<OamStaffVo>>
* @Author: DB
* @Date: 2023/5/11 17:49
* 查询服务员工列表
* @return R<List<OamStaffVo>>
* @author DB
* @since 2023/5/11 17:49
**/
@Override
public List<StaffVo> getServiceStaffList() {
return SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME, STAFF.USER_ID, STAFF.STAFF_TYPE)
.from(STAFF)
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.STAFF_TYPE.eq(1))
//不查询停用的员工
.and(SYS_USER.STATUS.eq(true)),
.and(USER.STATUS.eq(true)),
StaffVo.class);
}
@ -375,11 +357,11 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
return this.listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME, STAFF.USER_ID, STAFF.STAFF_TYPE)
.from(STAFF)
.leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.STAFF_TYPE.eq(0))
//不查询停用的员工
.and(SYS_USER.STATUS.eq(true))
.and(SYS_USER.PHONE_NUMBER.notIn(Arrays.asList(testStaffPhone.split(",")))),
.and(USER.STATUS.eq(true))
.and(USER.PHONE_NUMBER.notIn(Arrays.asList(testStaffPhone.split(",")))),
StaffVo.class);
}
@ -393,15 +375,15 @@ public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> implements
public void changeOperationStatus(OperationStatusBo bo) {
//获取用户信息
Staff staff = this.getById(bo.getId());
SysUser sysUser = DbChain.table(SYS_USER).select(SYS_USER.PHONE_NUMBER).where(SYS_USER.ID.eq(staff.getUserId())).oneAs(SysUser.class);
User User = DbChain.table(USER).select(USER.PHONE_NUMBER).where(USER.ID.eq(staff.getUserId())).oneAs(User.class);
JSONObject jsonBody = new JSONObject();
if (bo.getIsOperation()) {
jsonBody.put("_type", "oamAdd");
jsonBody.put("name", staff.getName());
jsonBody.put("phone", sysUser.getPhoneNumber());
jsonBody.put("phone", User.getPhoneNumber());
} else {
jsonBody.put("_type", "oamDel");
jsonBody.put("phone", sysUser.getPhoneNumber());
jsonBody.put("phone", User.getPhoneNumber());
}
JSONObject jsonObject = SpringUtils.getBean(RestTemplate.class).postForObject(JamboxCloudUrl.COMMON_CARD_URL, jsonBody, JSONObject.class);
assert jsonObject != null;

View File

@ -2,18 +2,19 @@ package com.cpop.oam.business.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaQrcodeService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import com.alibaba.fastjson.JSONObject;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.common.constant.Constants;
import com.cpop.common.utils.StringUtils;
import com.cpop.common.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.enums.UserType;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.table.SysConfig;
import com.cpop.core.base.table.Config;
import com.cpop.core.constant.Constants;
import com.cpop.core.service.ConfigService;
import com.cpop.core.service.RedisService;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.TaskDemandBo;
import com.cpop.oam.business.bo.TaskDemandPageBo;
import com.cpop.oam.business.bo.TaskDemandUrgentBo;
@ -39,7 +40,7 @@ import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.cpop.oam.business.entity.table.TaskDemandTableDef.TASK_DEMAND;
import static com.cpop.oam.business.entity.table.TaskTableDef.TASK;
@ -91,8 +92,7 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
}
// 重新定义列表
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
queryWrapper
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), queryWrapper
.select(TASK_DEMAND.ID,
TASK_DEMAND.BRAND_ID,
TASK_DEMAND.STORE_ID,
@ -131,24 +131,24 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
TaskDemandPageVo.class,
// 记录员工名
item -> item.field(TaskDemandPageVo::getRecordStaffName)
.queryWrapper(recordStaffName -> queryWrapper.create()
.queryWrapper(recordStaffName -> QueryWrapper.create()
.select(STAFF.NAME.as(TaskDemandPageVo::getRecordStaffName))
.from(STAFF)
.where(STAFF.ID.eq(recordStaffName.getRecordStaffId()))),
// 更新人员
item -> item.field(TaskDemandPageVo::getUpdateStaffName)
.queryWrapper(updateStaffName -> queryWrapper.create()
.queryWrapper(updateStaffName -> QueryWrapper.create()
.select(STAFF.NAME.as(TaskDemandPageVo::getUpdateStaffName))
.from(STAFF)
.leftJoin(SYS_USER)
.on(SYS_USER.ID.eq(STAFF.USER_ID))
.where(SYS_USER.ID.eq(updateStaffName.getUpdateUserId()))
.and(SYS_USER.USER_TYPE.eq(UserType.OAM_USER.toString()))
.leftJoin(USER)
.on(USER.ID.eq(STAFF.USER_ID))
.where(USER.ID.eq(updateStaffName.getUpdateUserId()))
.and(USER.USER_TYPE.eq(UserType.OAM_USER.toString()))
.limit(1)),
// 任务接收员工
item -> item.field(TaskDemandPageVo::getResponsibleStaffName).queryWrapper(responsibleStaffName -> {
if (StringUtils.isNotBlank(responsibleStaffName.getResponsibleStaffId())) {
return queryWrapper.create()
return QueryWrapper.create()
.select(STAFF.NAME.as(TaskDemandPageVo::getResponsibleStaffId))
.from(STAFF)
.where(STAFF.ID.eq(responsibleStaffName.getResponsibleStaffId()));
@ -170,9 +170,8 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
// 添加任务
Task task = BeanUtils.mapToClass(bo, Task.class);
// 当前操作员工
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
// 默认待审核
task.setTaskStatus(0).setTaskItem(0).setTaskType(1).setRecordStaffId(loginUserInfo.getString("id")).setSubject("果酱盒子");
task.setTaskStatus(0).setTaskItem(0).setTaskType(1).setRecordStaffId(StpUtil.getLoginIdAsString()).setSubject("果酱盒子");
TaskService taskService = SpringUtils.getBean(TaskService.class);
taskService.save(task);
// 添加需求
@ -185,7 +184,7 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
CommonService commonService = SpringUtils.getBean(CommonService.class);
String auditStaffPhone = redisService.getCacheObject(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()));
if (StringUtils.isBlank(auditStaffPhone)) {
SysConfig sysConfig = SpringUtils.getBean(CoreService.class).selectConfigByKey(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()));
Config sysConfig = SpringUtils.getBean(ConfigService.class).getById(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()));
auditStaffPhone = sysConfig.getConfigValue();
redisService.setCacheObject(commonService.getCacheKey(OamConfigEnum.AUDIT_STAFF_PHONE.getKey()), auditStaffPhone);
}
@ -193,7 +192,7 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
List<String> phoneList = new ArrayList<String>();
phoneList.add(auditStaffPhone);
// 同时通知发起人
phoneList.add(loginUserInfo.getString("phoneNumber"));
phoneList.add(StpUtil.getSession().getString("phone"));
try {
SpringUtils.getBean(WebHookSendHandler.class)
.webHookSendText(WebHookKeyConstant.PRODUCT_BOT,

View File

@ -1,9 +1,7 @@
package com.cpop.oam.business.service.impl;
import com.alibaba.fastjson.JSONObject;
import cn.dev33.satoken.stp.StpUtil;
import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.core.base.entity.PageDomain;
import com.cpop.core.base.exception.ServiceException;
import com.cpop.core.base.exception.UtilException;
@ -11,6 +9,8 @@ import com.cpop.core.service.RedisService;
import com.cpop.core.utils.QuartzUtils;
import com.cpop.core.utils.SpringUtils;
import com.cpop.core.utils.SqlUtils;
import com.cpop.core.utils.StringUtils;
import com.cpop.core.utils.bean.BeanUtils;
import com.cpop.oam.business.bo.*;
import com.cpop.oam.business.dto.TaskWorkOrderReceiveDealPauseDto;
import com.cpop.oam.business.entity.*;
@ -42,7 +42,7 @@ import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.core.base.table.table.UserTableDef.USER;
import static com.cpop.oam.business.entity.table.DutyTableDef.DUTY;
import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF;
import static com.cpop.oam.business.entity.table.TaskStaffGroupTableDef.TASK_STAFF_GROUP;
@ -223,15 +223,13 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
}
// 获取值班员工
DutyService dutyService = SpringUtils.getBean(DutyService.class);
Duty duty = dutyService.getOne(QueryWrapper.create().where(DUTY.DUTY_DATE.eq(DateUtils.getDate())));
Duty duty = dutyService.getOne(QueryWrapper.create().where(DUTY.DUTY_DATE.eq(LocalDate.now())));
if (duty == null) {
throw new ServiceException("当天没有值班员工,请联系相关人员添加值班信息!");
}
// 添加任务
Task task = new Task();
BeanUtils.copyBeanProp(task, bo);
// 读取员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
// 默认待接受
task.setTaskStatus(1)
// 默认开发中
@ -239,7 +237,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
.setTaskWeight(0)
// 工单不参与评级
.setTaskRating("N")
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(StpUtil.getLoginIdAsString())
.setResponsibleStaffId(duty.getTechnologyStaffId());
TaskService taskService = SpringUtils.getBean(TaskService.class);
taskService.save(task);
@ -257,7 +255,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
TaskWorkOrderRecord workOrderRecord = new TaskWorkOrderRecord();
workOrderRecord.setTaskWorkOrderId(entity.getId())
.setRecordText(bo.getTaskContent())
.setRecordStaffId(loginUserInfo.getString("id"))
.setRecordStaffId(StpUtil.getLoginIdAsString())
.setAttachmentUrl(bo.getAttachmentUrl());
SpringUtils.getBean(TaskWorkOrderRecordService.class).save(workOrderRecord);
// 通知值班员工
@ -266,7 +264,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
if (technologyStaffInfo != null) {
// 企微通知值班人员
List<String> phoneList = new ArrayList<String>();
phoneList.add(loginUserInfo.getString("phoneNumber"));
phoneList.add(StpUtil.getSession().getString("phone"));
phoneList.add(technologyStaffInfo.getPhoneNumber());
try {
SpringUtils.getBean(WebHookSendHandler.class)
@ -482,14 +480,14 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
.select(TASK_WORK_ORDER_RECORD.ALL_COLUMNS)
.select(STAFF.NAME.as(TaskWorkOrderRecordListVo::getRecordStaffName),
STAFF.STAFF_TYPE.as(TaskWorkOrderRecordListVo::getRecordStaffType))
.select(SYS_USER.AVATAR.as(TaskWorkOrderRecordListVo::getAvatar))
.select(USER.AVATAR.as(TaskWorkOrderRecordListVo::getAvatar))
.from(TASK_WORK_ORDER_RECORD)
// 员工表
.leftJoin(STAFF)
.on(STAFF.ID.eq(TASK_WORK_ORDER_RECORD.RECORD_STAFF_ID))
// 系统用户表
.leftJoin(SYS_USER)
.on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER)
.on(USER.ID.eq(STAFF.USER_ID))
.where(TASK_WORK_ORDER_RECORD.TASK_WORK_ORDER_ID.eq(workOrderId))
.orderBy(TASK_WORK_ORDER_RECORD.CREATE_TIME.asc()),
TaskWorkOrderRecordListVo.class);
@ -512,14 +510,13 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
// 插入工单记录
TaskWorkOrderRecord taskWorkOrderRecord = BeanUtils.mapToClass(bo, TaskWorkOrderRecord.class);
// 读取员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
taskWorkOrderRecord.setRecordStaffId(loginUserInfo.getString("id"));
taskWorkOrderRecord.setRecordStaffId(StpUtil.getLoginIdAsString());
// 插入记录
SpringUtils.getBean(TaskWorkOrderRecordService.class).save(taskWorkOrderRecord);
//判断插入记录用户类型
List<String> phoneList = new ArrayList<>();
StaffService staffService = SpringUtils.getBean(StaffService.class);
if (loginUserInfo.getInteger("staffType") == 1) {
if (StpUtil.getSession().getInt("staffType") == 1) {
// 负责人手机号
StaffInfoVo responsibleStaff = staffService.getStaffInfo(task.getResponsibleStaffId());
phoneList.add(responsibleStaff.getPhoneNumber());
@ -528,7 +525,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
StaffInfoVo recordStaff = SpringUtils.getBean(StaffService.class).getStaffInfo(task.getRecordStaffId());
phoneList.add(recordStaff.getPhoneNumber());
}
phoneList.add(loginUserInfo.getString("phoneNumber"));
phoneList.add(StpUtil.getSession().getString("phone"));
// 通知记录
try {
SpringUtils.getBean(WebHookSendHandler.class).webHookSendText(WebHookKeyConstant.ORDER_INFO_BOT, phoneList,
@ -597,8 +594,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
TaskWorkOrder workOrder = this.getById(workOrderId);
// 获取任务
Task task = SpringUtils.getBean(TaskService.class).getById(workOrder.getTaskId());
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
if (!StringUtils.equals(task.getRecordStaffId(), loginUserInfo.getString("id"))) {
if (!StringUtils.equals(task.getRecordStaffId(), StpUtil.getLoginIdAsString())) {
throw new ServiceException("当前操作员工不是当前工单提交人,请联系提交人操作");
}
TaskDemandBo taskDemandBo = new TaskDemandBo();
@ -646,10 +642,9 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
// 插入工单暂停记录
TaskWorkOrderRecord taskWorkOrderRecord = new TaskWorkOrderRecord();
//暂停时间
String pauseExpireTime = "工单已暂停到:" + bo.getPauseExpireTime().format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
String pauseExpireTime = "工单已暂停到:" + bo.getPauseExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// 读取员工信息
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
taskWorkOrderRecord.setRecordStaffId(loginUserInfo.getString("id"))
taskWorkOrderRecord.setRecordStaffId(StpUtil.getLoginIdAsString())
.setTaskWorkOrderId(bo.getWorkOrderId())
.setRecordText(pauseExpireTime);
// 插入记录
@ -658,7 +653,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
StaffInfoVo responsibleStaff = SpringUtils.getBean(StaffService.class).getStaffInfo(task.getResponsibleStaffId());
List<String> phoneList = new ArrayList<>();
phoneList.add(responsibleStaff.getPhoneNumber());
phoneList.add(loginUserInfo.getString("phoneNumber"));
phoneList.add(StpUtil.getSession().getString("phone"));
// 通知记录
try {
SpringUtils.getBean(WebHookSendHandler.class)
@ -671,7 +666,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
}
// 更新工单信息
this.updateChain()
.set(TASK_WORK_ORDER.PAUSE_STAFF_ID, loginUserInfo.getString("id"))
.set(TASK_WORK_ORDER.PAUSE_STAFF_ID, StpUtil.getLoginIdAsString())
.set(TASK_WORK_ORDER.PAUSE_EXPIRE_TIME, bo.getPauseExpireTime())
.set(TASK_WORK_ORDER.PAUSE_RECORD_TIME, LocalDateTime.now())
.where(TASK_WORK_ORDER.ID.eq(bo.getWorkOrderId()))
@ -729,8 +724,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
public void workOrderFinish(String workOrderId) {
// 获取工单信息
TaskWorkOrder taskWorkOrder = this.getById(workOrderId);
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
taskWorkOrder.setFinishStaffId(loginUserInfo.getString("id"));
taskWorkOrder.setFinishStaffId(StpUtil.getLoginIdAsString());
LocalDateTime finishTime = LocalDateTime.now();
taskWorkOrder.setFinishTime(finishTime);
// 设置工单完成
@ -745,9 +739,9 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
// 插入工单暂停记录
TaskWorkOrderRecord taskWorkOrderRecord = new TaskWorkOrderRecord();
//暂停时间
String finishTimeString = "\n工单办结,时间为:" + finishTime.format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
String finishTimeString = "\n工单办结,时间为:" + finishTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// 读取员工信息
taskWorkOrderRecord.setRecordStaffId(loginUserInfo.getString("id"))
taskWorkOrderRecord.setRecordStaffId(StpUtil.getLoginIdAsString())
.setTaskWorkOrderId(workOrderId)
.setRecordText(finishTimeString);
// 插入记录
@ -759,10 +753,10 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
staffIds.add(task.getRecordStaffId());
Map<String, StaffInfoVo> staffMap = staffService.listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME)
.select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.from(STAFF)
.leftJoin(SYS_USER)
.on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER)
.on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.ID.in(staffIds)),
StaffInfoVo.class)
.stream().collect(Collectors.toMap(StaffInfoVo::getId, item -> item));
@ -798,7 +792,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
public List<TaskWorkOrderPersonVo> getPersonWorkOrder() {
// 获取值班员工
DutyService dutyService = SpringUtils.getBean(DutyService.class);
Duty duty = dutyService.getOne(QueryWrapper.create().where(DUTY.DUTY_DATE.eq(DateUtils.getDate())));
Duty duty = dutyService.getOne(QueryWrapper.create().where(DUTY.DUTY_DATE.eq(LocalDate.now())));
if (duty == null) {
throw new ServiceException("当天没有值班员工,请联系相关人员添加值班信息!");
}
@ -841,9 +835,8 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
Task task = SpringUtils.getBean(TaskService.class).queryChain()
.leftJoin(TASK_WORK_ORDER).on(TASK_WORK_ORDER.TASK_ID.eq(TASK.ID))
.where(TASK_WORK_ORDER.ID.eq(taskWorkOrderId)).one();
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
//判断当前登陆用户是否是当前工单的负责员工
if (StringUtils.equals(loginUserInfo.getString("id"), task.getResponsibleStaffId())) {
if (StringUtils.equals(StpUtil.getLoginIdAsString(), task.getResponsibleStaffId())) {
//查询负责员工的记录数
long count = SpringUtils.getBean(TaskWorkOrderRecordService.class).queryChain()
.where(TASK_WORK_ORDER_RECORD.TASK_WORK_ORDER_ID.eq(taskWorkOrderId))
@ -966,8 +959,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
public void enforceFinishWorkOrder(EnforceFinishWorkOrderBo bo) {
// 获取工单信息
TaskWorkOrder taskWorkOrder = this.getById(bo.getId());
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
taskWorkOrder.setEnforceFinishStaffId(loginUserInfo.getString("id"));
taskWorkOrder.setEnforceFinishStaffId(StpUtil.getLoginIdAsString());
LocalDateTime finishTime = LocalDateTime.now();
taskWorkOrder.setEnforceFinishTime(finishTime);
taskWorkOrder.setEnforceFinishReason(bo.getEnforceFinishReason());
@ -976,8 +968,8 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
try {
LocalDateTime jobExecuteTime = quartzUtils.getJobExecuteTime(QuartzEnums.WORK_ORDER_OVERTIME_TASK.getName() + bo.getId(), QuartzEnums.WORK_ORDER_OVERTIME_TASK.getGroup());
Duration duration = Duration.between(finishTime, jobExecuteTime);
Long minutes = duration.toMinutes();
taskWorkOrder.setEnforceFinishSurplusTime(minutes.intValue());
long minutes = duration.toMinutes();
taskWorkOrder.setEnforceFinishSurplusTime((int) minutes);
} catch (SchedulerException e) {
throw new UtilException(e);
}
@ -997,9 +989,9 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
this.updateById(taskWorkOrder);
// 插入工单暂停记录
TaskWorkOrderRecord taskWorkOrderRecord = new TaskWorkOrderRecord();
String finishTimeString = "提交工单办结申请,时间为:" + finishTime.format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
String finishTimeString = "提交工单办结申请,时间为:" + finishTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
// 读取员工信息
taskWorkOrderRecord.setRecordStaffId(loginUserInfo.getString("id"))
taskWorkOrderRecord.setRecordStaffId(StpUtil.getLoginIdAsString())
.setTaskWorkOrderId(bo.getId())
.setRecordText(finishTimeString);
// 插入记录
@ -1011,10 +1003,10 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
staffIds.add(task.getRecordStaffId());
Map<String, StaffInfoVo> staffMap = staffService.listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME)
.select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.from(STAFF)
.leftJoin(SYS_USER)
.on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER)
.on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.ID.in(staffIds)),
StaffInfoVo.class)
.stream().collect(Collectors.toMap(StaffInfoVo::getId, item -> item));
@ -1051,24 +1043,23 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
TaskWorkOrder workOrder = this.getById(bo.getId());
TaskService taskService = SpringUtils.getBean(TaskService.class);
Task task = taskService.getById(workOrder.getTaskId());
JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
String finishString;
//同意
if (bo.getAgreeOrReject()){
task.setTaskStatus(9);
task.setTaskItem(3);
taskService.updateById(task);
workOrder.setFinishStaffId(loginUserInfo.getString("id"));
workOrder.setFinishStaffId(StpUtil.getLoginIdAsString());
workOrder.setFinishTime(workOrder.getEnforceFinishTime());
this.updateById(workOrder);
finishString = "\n工单办结申请通过,办结时间为:" + workOrder.getFinishTime().format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS));
finishString = "\n工单办结申请通过,办结时间为:" + workOrder.getFinishTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
} else {
//拒绝继续计时
task.setTaskStatus(2);
task.setTaskItem(0);
taskService.updateById(task);
LocalDateTime now = LocalDateTime.now();
finishString = "\n工单办结申请未通过,工单到期时间为:" + now.plusMinutes(workOrder.getEnforceFinishSurplusTime().longValue()).format(DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD_HH_MM_SS)) +
finishString = "\n工单办结申请未通过,工单到期时间为:" + now.plusMinutes(workOrder.getEnforceFinishSurplusTime().longValue()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) +
"\n工单到期剩余时间为:" + workOrder.getEnforceFinishSurplusTime() + "分钟";
//重新发起工单超时任务
startOrUpdateWorkOrderOvertimeTask(workOrder.getId(), false, now, workOrder.getEnforceFinishSurplusTime());
@ -1076,7 +1067,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
// 插入工单暂停记录
TaskWorkOrderRecord taskWorkOrderRecord = new TaskWorkOrderRecord();
// 读取员工信息
taskWorkOrderRecord.setRecordStaffId(loginUserInfo.getString("id"))
taskWorkOrderRecord.setRecordStaffId(StpUtil.getLoginIdAsString())
.setTaskWorkOrderId(workOrder.getId())
.setRecordText(finishString);
// 插入记录
@ -1088,10 +1079,10 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl<TaskWorkOrderMapper, T
staffIds.add(task.getRecordStaffId());
Map<String, StaffInfoVo> staffMap = staffService.listAs(QueryWrapper.create()
.select(STAFF.ID, STAFF.NAME)
.select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
.from(STAFF)
.leftJoin(SYS_USER)
.on(SYS_USER.ID.eq(STAFF.USER_ID))
.leftJoin(USER)
.on(USER.ID.eq(STAFF.USER_ID))
.where(STAFF.ID.in(staffIds)),
StaffInfoVo.class)
.stream().collect(Collectors.toMap(StaffInfoVo::getId, item -> item));

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -15,31 +14,31 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索跟进记录返回对象")
@Schema(description = "线索跟进记录返回对象")
public class ClueFollowUpRecordVo {
/**
* 记录内容
*/
@ApiModelProperty(value = "记录内容")
@Schema(description = "记录内容")
private String recordContent;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 员工名
*/
@ApiModelProperty(value = "员工名")
@Schema(description = "员工名")
private String staffName;
/**
* 记录文件
*/
@ApiModelProperty(value = "记录文件")
@Schema(description = "记录文件")
private String recordFileUrl;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -17,130 +15,130 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索分页返回对象")
@Schema(description = "线索分页返回对象")
public class CluePageVo {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 校区id
*/
@ApiModelProperty(value = "校区id")
@Schema(description = "校区id")
private String storeId;
/**
* 校区名
*/
@ApiModelProperty(value = "校区名")
@Schema(description = "校区名")
private String storeName;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌id")
@Schema(description = "品牌id")
private String brandName;
/**
* 地区/
*/
@ApiModelProperty(value = "地区(省/市)")
@Schema(description = "地区(省/市)")
private String city;
/**
* 店铺/校区地址
*/
@ApiModelProperty(value = "店铺/校区地址")
@Schema(description = "店铺/校区地址")
private String storeAddr;
/**
* 负责人
*/
@ApiModelProperty(value = "负责人")
@Schema(description = "负责人")
private String personCharge;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号")
@Schema(description = "手机号")
private String phone;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 负责员工id
*/
@ApiModelProperty(value = "负责员工id")
@Schema(description = "负责员工id")
private String responsibleStaffId;
/**
* 负责员工id
*/
@ApiModelProperty(value = "负责员工id")
@Schema(description = "负责员工id")
private String responsibleStaffName;
/**
* 开发员工id
*/
@ApiModelProperty(value = "开发员工id")
@Schema(description = "开发员工id")
private String devStaffId;
/**
* 开发员工id
*/
@ApiModelProperty(value = "开发员工id")
@Schema(description = "开发员工id")
private String devStaffName;
/**
* 最后跟进时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "最后跟进时间")
@Schema(description = "最后跟进时间")
private LocalDateTime lastFollowUpTime;
/**
* 最后跟进内容
*/
@ApiModelProperty(value = "最后跟进内容")
@Schema(description = "最后跟进内容")
private String lastFollowUpContent;
/**
* 接收时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "接收时间")
@Schema(description = "接收时间")
private LocalDateTime receiptTime;
/**
* 跟进间隔
*/
@ApiModelProperty(value = "跟进间隔")
@Schema(description = "跟进间隔")
private Integer followUpInterval;
/**
* 签约间隔
*/
@ApiModelProperty(value = "签约间隔")
@Schema(description = "签约间隔")
private Integer signInterval;
/**
* 脱离间隔
*/
@ApiModelProperty(value = "脱离间隔")
@Schema(description = "脱离间隔")
private Integer putOffInterval;
/**
* 签约状态(0:待签约;1:已签约;2:警告线索)
*/
@ApiModelProperty(value = "签约状态(0:待签约;1:已签约;2:警告线索)")
@Schema(description = "签约状态(0:待签约;1:已签约;2:警告线索)")
private Integer clueStatus;
/**
@ -153,19 +151,19 @@ public class CluePageVo {
* 最后接收时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "最后接收时间")
@Schema(description = "最后接收时间")
private String lastReceiptTime;
/**
* 最后接收员工id
*/
@ApiModelProperty(value = "最后接收员工id")
@Schema(description = "最后接收员工id")
private String lastReceiptStaffId;
/**
* 最后接收员工姓名
*/
@ApiModelProperty(value = "最后接收员工姓名")
@Schema(description = "最后接收员工姓名")
private String lastReceiptStaffName;
/**
@ -177,7 +175,7 @@ public class CluePageVo {
/**
* 更进状态(0:待跟进1:已歇业2:无法联系3:无意向4:已拜访5:跟进中6:已成交
*/
@ApiModelProperty(value = "更进状态(0:待跟进、1:已歇业、2:无法联系、3:无意向、4:已拜访、5:跟进中、6:已成交")
@Schema(description = "更进状态(0:待跟进、1:已歇业、2:无法联系、3:无意向、4:已拜访、5:跟进中、6:已成交")
private Integer followStatus;
}

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
@ -17,62 +16,62 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索延期返回对象")
@Schema(description = "线索延期返回对象")
public class CluePutOffVo {
/**
* 延期到期日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "延期到期日期")
@Schema(description = "延期到期日期")
private LocalDate putOffDate;
/**
* 审核状态(0:待审核,1:审核通过,2:审核不通过)
*/
@ApiModelProperty(value = "审核状态(0:待审核,1:审核通过,2:审核不通过)")
@Schema(description = "审核状态(0:待审核,1:审核通过,2:审核不通过)")
private Integer auditStatus;
/**
* 延迟员工id
*/
@ApiModelProperty(value = "延迟员工id")
@Schema(description = "延迟员工id")
private String putOffStaffId;
/**
* 延迟员工名
*/
@ApiModelProperty(value = "延迟员工名")
@Schema(description = "延迟员工名")
private String putOffStaffName;
/**
* 审核员工id
*/
@ApiModelProperty(value = "审核员工id")
@Schema(description = "审核员工id")
private String auditStaffId;
/**
* 审核员工名
*/
@ApiModelProperty(value = "审核员工名")
@Schema(description = "审核员工名")
private String auditStaffName;
/**
* 延期原因
*/
@ApiModelProperty(value = "延期原因")
@Schema(description = "延期原因")
private String putOffReason;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 延期附件
*/
@ApiModelProperty(value = "延期附件")
@Schema(description = "延期附件")
private String putOffFileUrl;
}

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -15,25 +14,25 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索记录返回对象")
@Schema(description = "线索记录返回对象")
public class ClueRecordVo {
/**
* 记录内容
*/
@ApiModelProperty(value = "记录内容")
@Schema(description = "记录内容")
private String recordContent;
/**
* 记录类型(0:创建;1:领取;2:跟进;3:转交;4:脱离;5:成交;6:更新)
*/
@ApiModelProperty(value = "记录类型(0:创建;1:领取;2:跟进;3:转交;4:脱离;5:成交;6:更新)")
@Schema(description = "记录类型(0:创建;1:领取;2:跟进;3:转交;4:脱离;5:成交;6:更新)")
private Integer recordType;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -17,102 +16,102 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索更新记录返回对象")
@Schema(description = "线索更新记录返回对象")
public class ClueUpdateVo {
/**
* 店铺/校区地址
*/
@ApiModelProperty("店铺/校区地址")
@Schema(description = "店铺/校区地址")
private String storeAddr;
/**
* 负责人
*/
@ApiModelProperty("负责人")
@Schema(description ="负责人")
private String personCharge;
/**
* 手机号
*/
@ApiModelProperty("手机号")
@Schema(description ="手机号")
private String phone;
/**
* 店铺/校区名
*/
@ApiModelProperty("店铺/校区名")
@Schema(description ="店铺/校区名")
private String storeName;
/**
* 更新记录
*/
@ApiModelProperty("更新记录")
@Schema(description ="更新记录")
private List<ClueUpdateRecordVo> recordVos;
@Data
@ApiModel(value = "线索更新记录返回对象")
@Schema(description = "线索更新记录返回对象")
public static class ClueUpdateRecordVo{
/**
* 旧校区名
*/
@ApiModelProperty("旧校区名")
@Schema(description ="旧校区名")
private String oldStoreName;
/**
* 新校区名
*/
@ApiModelProperty("新校区名")
@Schema(description ="新校区名")
private String newStoreName;
/**
* 旧负责人
*/
@ApiModelProperty("旧负责人")
@Schema(description ="旧负责人")
private String oldPersonCharge;
/**
* 新负责人
*/
@ApiModelProperty("新负责人")
@Schema(description ="新负责人")
private String newPersonCharge;
/**
* 旧手机号
*/
@ApiModelProperty("旧手机号")
@Schema(description ="旧手机号")
private String oldPhone;
/**
* 新手机号
*/
@ApiModelProperty("新手机号")
@Schema(description ="新手机号")
private String newPhone;
/**
* 旧校区地址
*/
@ApiModelProperty("旧校区地址")
@Schema(description ="旧校区地址")
private String oldStoreAddr;
/**
* 新校区地址
*/
@ApiModelProperty("新校区地址")
@Schema(description ="新校区地址")
private String newStoreAddr;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 员工名
*/
@ApiModelProperty(value = "员工名")
@Schema(description = "员工名")
private String staffName;
}
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author: DB
* @Date: 2023/07/07/16:43
@ -14,26 +11,24 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysConfigInfoVo对象", description = "系统配置信息")
public class ConfigInfoVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "系统配置信息")
public class ConfigInfoVo {
/**
* 任务审核员工手机号
*/
@ApiModelProperty("任务审核员工手机号")
@Schema(description ="任务审核员工手机号")
private String auditStaffPhone;
/**
* 核销管理员工手机号
*/
@ApiModelProperty("核销管理员工手机号")
@Schema(description ="核销管理员工手机号")
private String cancelAfterVerificationStaffPhone;
/**
* 测试员工手机号
*/
@ApiModelProperty("测试员工手机号")
@Schema(description ="测试员工手机号")
private String testStaffPhone;
}

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -15,49 +14,49 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "DataImportPageVo对象")
@Schema(description = "DataImportPageVo对象")
public class DataImportPageVo {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌")
@Schema(description = "品牌")
private String brandName;
/**
* 校区
*/
@ApiModelProperty(value = "校区")
@Schema(description = "校区")
private String storeName;
/**
* 导入文件地址
*/
@ApiModelProperty(value = "导入文件地址")
@Schema(description = "导入文件地址")
private String fileUrl;
/**
* 是否清空
*/
@ApiModelProperty(value = "是否清空")
@Schema(description = "是否清空")
private Boolean isClear;
/**
* 导入状态
*/
@ApiModelProperty(value = "导入状态")
@Schema(description = "导入状态")
private Boolean importStatus;
/**
* 上传时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty(value = "上传时间")
@Schema(description = "上传时间")
private LocalDateTime createTime;
}

View File

@ -2,12 +2,10 @@ package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@ -20,76 +18,74 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysDept对象", description = "部门表")
public class DeptVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "部门表")
public class DeptVo {
/**
* 部门id
*/
@ApiModelProperty("部门id")
@Schema(description ="部门id")
private String id;
/**
* 父部门id
*/
@ApiModelProperty("父部门id")
@Schema(description ="父部门id")
private String parentId;
/**
* 部门名称
*/
@ApiModelProperty("部门名称")
@Schema(description ="部门名称")
private String name;
/**
* 排序
*/
@ApiModelProperty("排序")
@Schema(description ="排序")
private Integer orderNo;
/**
* 负责人
*/
@ApiModelProperty("负责人")
@Schema(description ="负责人")
private String leader;
/**
* 电话
*/
@ApiModelProperty("电话")
@Schema(description ="电话")
private String phone;
/**
* 邮箱
*/
@ApiModelProperty("邮箱")
@Schema(description ="邮箱")
private String email;
/**
* 部门状态:1正常,0停用
*/
@ApiModelProperty("部门状态:1正常,0停用")
@Schema(description ="部门状态:1正常,0停用")
private Boolean status;
/**
* 子部门
*/
@Column(ignore = true)
@ApiModelProperty("子部门集合")
@Schema(description ="子部门集合")
private List<DeptVo> children = new ArrayList<DeptVo>();
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty("更新时间")
@Schema(description ="更新时间")
private LocalDateTime updateTime;
/**
* 备注
*/
@ApiModelProperty("备注")
@Schema(description ="备注")
private String remark;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDate;
/**
@ -17,51 +15,49 @@ import java.time.LocalDate;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "DutyList返回对象", description = "值班表")
public class DutyListVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "值班表")
public class DutyListVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 服务员工id
*/
@ApiModelProperty("服务员工id")
@Schema(description ="服务员工id")
private String serviceStaffId;
/**
* 服务员工名称
*/
@ApiModelProperty("服务员工名称")
@Schema(description ="服务员工名称")
private String serviceStaffName;
/**
* 技术员工id
*/
@ApiModelProperty("技术员工id")
@Schema(description ="技术员工id")
private String technologyStaffId;
/**
* 技术员工名称
*/
@ApiModelProperty("技术员工名称")
@Schema(description ="技术员工名称")
private String technologyStaffName;
/**
* 值班日期
*/
@ApiModelProperty("值班日期")
@Schema(description ="值班日期")
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private LocalDate dutyDate;
/**
* 备注
*/
@ApiModelProperty("备注")
@Schema(description ="备注")
private String remark;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.time.LocalDateTime;
@ -18,80 +16,80 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FinanceReimbursePageVo对象", description = "财务报销返回参数")
public class FinanceReimburseAuditPageVo implements Serializable {
@Schema(description = "财务报销返回参数")
public class FinanceReimburseAuditPageVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 提交人
*/
@ApiModelProperty("提交人id")
@Schema(description ="提交人id")
private String staffId;
/**
* 提交人
*/
@ApiModelProperty("提交人")
@Schema(description ="提交人")
private String staffName;
/**
* 状态0:审批中;1:下款中;2:已下发-1:驳回
*/
@ApiModelProperty("状态0:审批中;1:下款中;2:已下发-1:驳回")
@Schema(description ="状态0:审批中;1:下款中;2:已下发-1:驳回")
private Integer status;
/**
* 申请类型id
*/
@ApiModelProperty("申请类型id")
@Schema(description ="申请类型id")
private String typeId;
/**
* 申请类型
*/
@ApiModelProperty("申请类型")
@Schema(description ="申请类型")
private String typeName;
/**
* 报销日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("报销日期")
@Schema(description ="报销日期")
private Date reportDate;
/**
* 申请说明
*/
@ApiModelProperty("申请说明")
@Schema(description ="申请说明")
private String remarks;
/**
* 申请金额
*/
@ApiModelProperty("申请金额")
@Schema(description ="申请金额")
private BigDecimal price;
/**
* 附件
*/
@ApiModelProperty("附件")
@Schema(description ="附件")
private String attachmentUrl;
/**
* 驳回原因
*/
@ApiModelProperty("驳回原因")
@Schema(description ="驳回原因")
private String rejectReason;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
@Schema(description ="创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private LocalDateTime createTime;

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Date;
import java.time.LocalDateTime;
@ -18,80 +16,80 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FinanceReimbursePageVo对象", description = "财务报销返回参数")
public class FinanceReimbursePageVo implements Serializable {
@Schema(description = "财务报销返回参数")
public class FinanceReimbursePageVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 提交人
*/
@ApiModelProperty("提交人id")
@Schema(description ="提交人id")
private String staffId;
/**
* 提交人
*/
@ApiModelProperty("提交人")
@Schema(description ="提交人")
private String staffName;
/**
* 状态0:审批中;1:下款中;2:已下发-1:驳回
*/
@ApiModelProperty("状态0:审批中;1:下款中;2:已下发-1:驳回")
@Schema(description ="状态0:审批中;1:下款中;2:已下发-1:驳回")
private Integer status;
/**
* 申请类型id
*/
@ApiModelProperty("申请类型id")
@Schema(description ="申请类型id")
private String typeId;
/**
* 申请类型
*/
@ApiModelProperty("申请类型")
@Schema(description ="申请类型")
private String typeName;
/**
* 报销日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty("报销日期")
@Schema(description ="报销日期")
private Date reportDate;
/**
* 申请说明
*/
@ApiModelProperty("申请说明")
@Schema(description ="申请说明")
private String remarks;
/**
* 申请金额
*/
@ApiModelProperty("申请金额")
@Schema(description ="申请金额")
private BigDecimal price;
/**
* 附件
*/
@ApiModelProperty("附件")
@Schema(description ="附件")
private String attachmentUrl;
/**
* 驳回原因
*/
@ApiModelProperty("驳回原因")
@Schema(description ="驳回原因")
private String rejectReason;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
@Schema(description ="创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private LocalDateTime createTime;

View File

@ -1,11 +1,9 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@ -15,31 +13,31 @@ import java.time.LocalDateTime;
* @description
*/
@Data
@ApiModel(value = "财务报销记录列表")
public class FinanceReimburseRecordListVo implements Serializable {
@Schema(description = "财务报销记录列表")
public class FinanceReimburseRecordListVo {
/**
* id
*/
@ApiModelProperty(value = "id")
@Schema(description = "id")
private String id;
/**
* 报销记录id
*/
@ApiModelProperty(value = "报销记录id")
@Schema(description = "报销记录id")
private String financeReimburseId;
/**
* 阶段金额
*/
@ApiModelProperty(value = "阶段金额")
@Schema(description = "阶段金额")
private BigDecimal stageAmount;
/**
* 下发时间
*/
@ApiModelProperty(value = "下发时间")
@Schema(description = "下发时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private LocalDateTime paymentTime;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* @author DB
* @createTime 2023/09/20 17:20
@ -14,18 +11,18 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "FinanceReimbursePageVo对象", description = "财务报销返回参数")
public class FinanceReimburseTypeListVo implements Serializable {
@Schema(description = "财务报销返回参数")
public class FinanceReimburseTypeListVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 类型名
*/
@ApiModelProperty("类型名")
@Schema(description ="类型名")
private String typeName;
}

View File

@ -1,12 +1,10 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
@ -17,81 +15,79 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysOperationLog对象", description = "操作日志表")
public class SysOperationLogVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "操作日志表")
public class OperationLogVo {
/**
* ID
*/
@ApiModelProperty("ID")
@Schema(description ="ID")
private String id;
/**
* 用户ID
*/
@ApiModelProperty("用户ID")
@Schema(description ="用户ID")
private String operationUserId;
/**
* 操作用户
*/
@ApiModelProperty("操作用户")
@Schema(description ="操作用户")
private String operationUserName;
/**
* 操作码
*/
@ApiModelProperty("操作码")
@Schema(description ="操作码")
private Integer code;
/**
* 操作信息
*/
@ApiModelProperty("操作信息")
@Schema(description ="操作信息")
private String info;
/**
* 操作终端的IP地址
*/
@ApiModelProperty("操作终端的IP地址")
@Schema(description ="操作终端的IP地址")
private String devIp;
/**
* 结果 -1:失败 1:成功
*/
@ApiModelProperty("结果 -1:失败 1:成功")
@Schema(description ="结果 -1:失败 1:成功")
private Boolean result;
/**
* 日志级别,0-提示1-一般2-危险3-高危
*/
@ApiModelProperty("日志级别,0-提示1-一般2-危险3-高危")
@Schema(description ="日志级别,0-提示1-一般2-危险3-高危")
private Integer level;
/**
* 行为类别1-一般行为2-异常行为
*/
@ApiModelProperty("行为类别1-一般行为2-异常行为")
@Schema(description ="行为类别1-一般行为2-异常行为")
private Integer actionType;
/**
* 失败原因
*/
@ApiModelProperty("失败原因")
@Schema(description ="失败原因")
private String failReason;
/**
* 操作描述
*/
@ApiModelProperty("操作描述")
@Schema(description ="操作描述")
private String description;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@ApiModelProperty("创建时间")
@Schema(description ="创建时间")
private LocalDateTime createTime;
}

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -12,30 +11,30 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "个人签约目标返回对象")
@Schema(description = "个人签约目标返回对象")
public class PersonSignGoalVo {
/**
* 目标数
*/
@ApiModelProperty(value = "目标数")
@Schema(description = "目标数")
private Integer goalNum = 0;
/**
* 完成数
*/
@ApiModelProperty(value = "完成数")
@Schema(description = "完成数")
private Integer finishNum = 0;
/**
* 签约数
*/
@ApiModelProperty(value = "签约数")
@Schema(description = "签约数")
private Integer signNum = 0;
/**
* 总数
*/
@ApiModelProperty(value = "总数")
@Schema(description = "总数")
private Integer totalNum = 0;
}

View File

@ -2,12 +2,10 @@ package com.cpop.oam.business.vo;
import com.cpop.core.anno.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -19,77 +17,75 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "Task对象", description = "OAM-任务表")
public class PersonTaskPageVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "OAM-任务表")
public class PersonTaskPageVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 主要负责员工名
*/
@ApiModelProperty("主要负责员工名")
@Schema(description ="主要负责员工名")
private String responsibleStaffName;
/**
* 任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:已完成;4:逾期;)
*/
@ApiModelProperty("任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:已完成;4:逾期;5:暂停;6:逾期完成;7:接收超时;8:待部署;9:待归档;10:审核不通过)")
@Schema(description ="任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:已完成;4:逾期;5:暂停;6:逾期完成;7:接收超时;8:待部署;9:待归档;10:审核不通过)")
private Integer taskStatus;
/**
* 任务项(0:待开发;1:待测试:2:待部署;3:已归档)
*/
@ApiModelProperty("任务项(0:待开发;1:待测试:2:待部署;3:已归档)")
@Schema(description ="任务项(0:待开发;1:待测试:2:待部署;3:已归档)")
private Integer taskItem;
/**
* 任务项(0:待开发;1:待测试:2:待部署;3:已归档)
*/
@StringArrayConvert
@ApiModelProperty("任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)")
@Schema(description ="任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)")
private String taskProgress;
/**
* 主体
*/
@ApiModelProperty("主体")
@Schema(description ="主体")
private String subject;
/**
* 任务内容
*/
@ApiModelProperty("任务内容")
@Schema(description ="任务内容")
private String taskContent;
/**
* 任务评级(0:A;1:B;2:C;3:D;4:E)
*/
@ApiModelProperty("任务评级(0:A;1:B;2:C;3:D;4:E)")
@Schema(description ="任务评级(0:A;1:B;2:C;3:D;4:E)")
private String taskRating;
/**
* 个人任务绩点
*/
@ApiModelProperty("个人任务绩点")
@Schema(description ="个人任务绩点")
private Integer gradePoint;
/**
* 预期完成日期
*/
@ApiModelProperty("预期完成日期")
@Schema(description ="预期完成日期")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private LocalDate expectedCompletionDate;
/**
* 任务接收时间
*/
@ApiModelProperty("任务接收时间")
@Schema(description ="任务接收时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime taskReceiptTime;
}

View File

@ -1,8 +1,7 @@
package com.cpop.oam.business.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -16,100 +15,100 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "线索延期返回对象")
@Schema(description = "线索延期返回对象")
public class PutOffAuditPageVo {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 校区id
*/
@ApiModelProperty(value = "校区id")
@Schema(description = "校区id")
private String storeId;
/**
* 校区名
*/
@ApiModelProperty(value = "校区名")
@Schema(description = "校区名")
private String storeName;
/**
* 品牌id
*/
@ApiModelProperty(value = "品牌id")
@Schema(description = "品牌id")
private String brandName;
/**
* 地区/
*/
@ApiModelProperty(value = "地区(省/市)")
@Schema(description = "地区(省/市)")
private String city;
/**
* 店铺/校区地址
*/
@ApiModelProperty(value = "店铺/校区地址")
@Schema(description = "店铺/校区地址")
private String storeAddr;
/**
* 负责人
*/
@ApiModelProperty(value = "负责人")
@Schema(description = "负责人")
private String personCharge;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号")
@Schema(description = "手机号")
private String phone;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 到期日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "到期日期")
@Schema(description = "到期日期")
private LocalDate expireDate;
/**
* 延期原因
*/
@ApiModelProperty(value = "延期原因")
@Schema(description = "延期原因")
private String putOffReason;
/**
* 延期文件路径
*/
@ApiModelProperty(value = "延期文件路径")
@Schema(description = "延期文件路径")
private String putOffFileUrl;
/**
* 延期到期日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(value = "延期到期日期")
@Schema(description = "延期到期日期")
private LocalDate putOffDate;
/**
* 延迟员工id
*/
@ApiModelProperty(value = "延迟员工id")
@Schema(description = "延迟员工id")
private String putOffStaffId;
/**
* 延迟员工id
*/
@ApiModelProperty(value = "延迟员工id")
@Schema(description = "延迟员工id")
private String putOffStaffName;
}

View File

@ -1,11 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
@ -15,18 +13,18 @@ import java.math.BigDecimal;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "个人报销统计")
public class ReimbursePersonStatisticVo implements Serializable {
@Schema(description = "个人报销统计")
public class ReimbursePersonStatisticVo {
/**
* 未核销金额
*/
@ApiModelProperty("未核销金额")
@Schema(description = "未核销金额")
private BigDecimal unPay;
/**
* 已核销金额
*/
@ApiModelProperty("已核销金额")
@Schema(description = "已核销金额")
private BigDecimal havePay;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 系统角色表Vo输出
*
@ -15,45 +12,43 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SysRole对象", description = "角色信息")
public class RoleVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "角色信息")
public class RoleVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@ Schema(description ="主键")
private String id;
/**
* 角色名称
*/
@ApiModelProperty("角色名称")
@ Schema(description ="角色名称")
private String roleName;
/**
* 角色值
*/
@ApiModelProperty("角色值")
@ Schema(description ="角色值")
private String roleValue;
/**
* 状态 0:禁用 1正常
*/
@ApiModelProperty("状态 0:禁用 1正常")
@ Schema(description ="状态 0:禁用 1正常")
private Boolean status;
/**
* 备注
*/
@ApiModelProperty("备注")
@ Schema(description ="备注")
private String remark;
/**
* 排序
*/
@ApiModelProperty("排序")
@ Schema(description ="排序")
private Integer orderNo;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* @author DB
* @version 1.0.0
@ -14,19 +11,19 @@ import javax.validation.constraints.NotNull;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SignGoalConfigInfoVo对象", description = "签约指标配置信息")
@Schema(description = "签约指标配置信息")
public class SignGoalConfigInfoVo {
/**
* 跟进间隔
*/
@ApiModelProperty(value = "跟进间隔")
@Schema(description = "跟进间隔")
private String followUpInterval;
/**
* 签约间隔
*/
@ApiModelProperty(value = "签约间隔")
@Schema(description = "签约间隔")
private String signInterval;
}

View File

@ -1,8 +1,6 @@
package com.cpop.oam.business.vo;
import com.mybatisflex.annotation.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -15,180 +13,180 @@ import java.util.List;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "SignGoalPageVo对象", description = "签约目标分页对象")
@Schema(description = "签约目标分页对象")
public class SignGoalPageVo {
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@Schema(description = "主键")
private String id;
/**
* 员工名
*/
@ApiModelProperty(value = "员工名")
@Schema(description = "员工名")
private String staffName;
/**
* 员工Id
*/
@ApiModelProperty(value = "员工Id")
@Schema(description = "员工Id")
private String staffId;
/**
* 签约区域
*/
@ApiModelProperty(value = "签约区域")
@Schema(description = "签约区域")
private List<String> signArea;
/**
* 年份
*/
@ApiModelProperty(value = "年份")
@Schema(description = "年份")
private Integer year;
/**
* 一月目标
*/
@ApiModelProperty(value = "一月目标")
@Schema(description = "一月目标")
private Integer janGoal;
/**
* 一月完成
*/
@ApiModelProperty(value = "一月完成")
@Schema(description = "一月完成")
private Integer janFinish;
/**
* 二月目标
*/
@ApiModelProperty(value = "二月目标")
@Schema(description = "二月目标")
private Integer febGoal;
/**
* 二月完成
*/
@ApiModelProperty(value = "二月完成")
@Schema(description = "二月完成")
private Integer febFinish;
/**
* 三月目标
*/
@ApiModelProperty(value = "三月目标")
@Schema(description = "三月目标")
private Integer marGoal;
/**
* 三月完成
*/
@ApiModelProperty(value = "三月完成")
@Schema(description = "三月完成")
private Integer marFinish;
/**
* 四月目标
*/
@ApiModelProperty(value = "四月目标")
@Schema(description = "四月目标")
private Integer aprGoal;
/**
* 四月完成
*/
@ApiModelProperty(value = "四月完成")
@Schema(description = "四月完成")
private Integer aprFinish;
/**
* 五月目标
*/
@ApiModelProperty(value = "五月目标")
@Schema(description = "五月目标")
private Integer mayGoal;
/**
* 五月完成
*/
@ApiModelProperty(value = "五月完成")
@Schema(description = "五月完成")
private Integer mayFinish;
/**
* 六月目标
*/
@ApiModelProperty(value = "六月目标")
@Schema(description = "六月目标")
private Integer junGoal;
/**
* 六月完成
*/
@ApiModelProperty(value = "六月完成")
@Schema(description = "六月完成")
private Integer junFinish;
/**
* 七月目标
*/
@ApiModelProperty(value = "七月目标")
@Schema(description = "七月目标")
private Integer julGoal;
/**
* 七月完成
*/
@ApiModelProperty(value = "七月完成")
@Schema(description = "七月完成")
private Integer julFinish;
/**
* 八月目标
*/
@ApiModelProperty(value = "八月目标")
@Schema(description = "八月目标")
private Integer augGoal;
/**
* 八月完成
*/
@ApiModelProperty(value = "八月完成")
@Schema(description = "八月完成")
private Integer augFinish;
/**
* 九月目标
*/
@ApiModelProperty(value = "九月目标")
@Schema(description = "九月目标")
private Integer sepGoal;
/**
* 九月完成
*/
@ApiModelProperty(value = "九月完成")
@Schema(description = "九月完成")
private Integer sepFinish;
/**
* 十月目标
*/
@ApiModelProperty(value = "十月目标")
@Schema(description = "十月目标")
private Integer octGoal;
/**
* 十月完成
*/
@ApiModelProperty(value = "十月完成")
@Schema(description = "十月完成")
private Integer octFinish;
/**
* 十一月目标
*/
@ApiModelProperty(value = "十一月目标")
@Schema(description = "十一月目标")
private Integer novGoal;
/**
* 十一月完成
*/
@ApiModelProperty(value = "十一月完成")
@Schema(description = "十一月完成")
private Integer novFinish;
/**
* 十二月目标
*/
@ApiModelProperty(value = "十二月目标")
@Schema(description = "十二月目标")
private Integer decGoal;
/**
* 十二月完成
*/
@ApiModelProperty(value = "十二月完成")
@Schema(description = "十二月完成")
private Integer decFinish;
}

View File

@ -1,12 +1,9 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* Description:
* date: 2023/5/17 10:34
@ -15,68 +12,66 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "StaffInfo对象", description = "员工信息")
public class StaffInfoVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "员工信息")
public class StaffInfoVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 姓名
*/
@ApiModelProperty("姓名")
@Schema(description ="姓名")
private String name;
/**
* 用户id
*/
@ApiModelProperty("用户id")
@Schema(description ="用户id")
private String userId;
/**
* 用户名
*/
@ApiModelProperty(value = "用户名")
@Schema(description = "用户名")
private String userName;
/**
* 昵称
*/
@ApiModelProperty(value = "昵称")
@Schema(description = "昵称")
private String nickName;
/**
* 手机号
*/
@ApiModelProperty(value = "手机号")
@Schema(description = "手机号")
private String phoneNumber;
/**
* 性别(0:;1:)
*/
@ApiModelProperty(value = "性别(0:男;1:女)")
@Schema(description = "性别(0:男;1:女)")
private Boolean sex;
/**
* 角色id
*/
@ApiModelProperty(value = "角色id")
@Schema(description = "角色id")
private String roleId;
/**
* 角色名
*/
@ApiModelProperty(value = "角色名")
@Schema(description = "角色名")
private String roleName;
/**
* 头像
*/
@ApiModelProperty(value = "头像")
@Schema(description = "头像")
private String avatar;
}

View File

@ -2,12 +2,10 @@ package com.cpop.oam.business.vo;
import com.cpop.core.anno.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
@ -18,112 +16,110 @@ import java.time.LocalDateTime;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "系统员工返回对象", description = "系统用户(员工)信息")
public class StaffPageVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "系统用户(员工)信息")
public class StaffPageVo {
/**
* 主键
*/
@ApiModelProperty("主键")
@Schema(description ="主键")
private String id;
/**
* 姓名
*/
@ApiModelProperty("姓名")
@Schema(description ="姓名")
private String name;
/**
* 用户名
*/
@ApiModelProperty("用户名")
@Schema(description ="用户名")
private String userName;
/**
* 部门id
*/
@StringArrayConvert
@ApiModelProperty("部门id")
@Schema(description ="部门id")
private String deptId;
/**
* 用户id
*/
@ApiModelProperty("用户id")
@Schema(description ="用户id")
private String userId;
/**
* 员工类型
*/
@ApiModelProperty("员工类型")
@Schema(description ="员工类型")
private Integer staffType;
/**
* 昵称
*/
@ApiModelProperty("昵称")
@Schema(description ="昵称")
private String nickName;
/**
* 邮箱
*/
@ApiModelProperty("邮箱")
@Schema(description ="邮箱")
private String email;
/**
* 手机号
*/
@ApiModelProperty("手机号")
@Schema(description ="手机号")
private String phoneNumber;
/**
* 性别(0:;1:)
*/
@ApiModelProperty("性别(0:男;1:女)")
@Schema(description ="性别(0:男;1:女)")
private Boolean sex;
/**
* 头像
*/
@ApiModelProperty("头像")
@Schema(description ="头像")
private String avatar;
/**
* 状态(0:停用;1:启用)
*/
@ApiModelProperty("状态(0:停用;1:启用)")
@Schema(description ="状态(0:停用;1:启用)")
private Boolean status;
/**
* 角色id
*/
@ApiModelProperty("角色id")
@Schema(description ="角色id")
private String roleId;
/**
* 角色名
*/
@ApiModelProperty("角色名")
@Schema(description ="角色名")
private String roleName;
/**
* 更新时间
*/
@ApiModelProperty("更新时间")
@Schema(description ="更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private LocalDateTime updateTime;
/**
* 密码
*/
@ApiModelProperty("密码")
@Schema(description ="密码")
private String password;
/**
* 是否是运维账号
*/
@ApiModelProperty("是否是运维账号")
@Schema(description ="是否是运维账号")
private Boolean isOperation;
}

View File

@ -1,6 +1,6 @@
package com.cpop.oam.business.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
@ -13,7 +13,7 @@ import java.io.Serializable;
*/
@Data
@Accessors(chain = true)
@ApiModel(value = "校区/店铺对象", description = "校区/店铺对象")
@Schema(description = "校区/店铺对象")
public class StoreListVo implements Serializable {
/**

Some files were not shown because too many files have changed in this diff Show More