Compare commits
994 Commits
1323 changed files with 113845 additions and 1000 deletions
@ -0,0 +1,25 @@ |
|||||
|
|
||||
|
update tbs_budget_condition set brand_id = SUBSTRING_INDEX(target_level_path_ids,'_',1) |
||||
|
update tbs_budget set center_combo = concat(center_type,'_',center_id) |
||||
|
|
||||
|
update vtb_verification v |
||||
|
left join tbs_activity act on act.id = v.activity_id |
||||
|
set v.activity_code = act.activity_code |
||||
|
where v.verification_main_code like 'DHX%' |
||||
|
|
||||
|
|
||||
|
select tbs_budget.id from tbs_budget |
||||
|
LEFT JOIN tbs_budget_condition |
||||
|
on tbs_budget_condition.budget_id = tbs_budget.id |
||||
|
where tbs_budget.del_flag = 0 |
||||
|
and tbs_budget_condition.del_flag = 0 |
||||
|
and tbs_budget.condition_flag = 0 |
||||
|
and tbs_budget_condition.id is not null |
||||
|
GROUP BY tbs_budget.id |
||||
|
|
||||
|
|
||||
|
|
||||
|
update tbs_budget set condition_flag = 1 |
||||
|
where id in ( |
||||
|
) |
||||
|
|
@ -0,0 +1,25 @@ |
|||||
|
package com.qs.serve.common.config.properties; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Author: YenHex |
||||
|
* @Date: 2021/3/3 |
||||
|
* @Version: 1.0 |
||||
|
**/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "aliyun.oss") |
||||
|
public class AliYunOssProperties { |
||||
|
|
||||
|
private String bucket; |
||||
|
private String accessKeyId; |
||||
|
private String accessKeySecret; |
||||
|
private String endpoint; |
||||
|
private String prefix; |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.qs.serve.common.config.properties; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/7 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "project.apis") |
||||
|
public class ProjectApisProperties { |
||||
|
|
||||
|
/** 支付接口 */ |
||||
|
private String costToPay; |
||||
|
|
||||
|
/** 同步核销的支付状态 */ |
||||
|
private String checkPayStatus; |
||||
|
|
||||
|
/** 调度系统-发货单 */ |
||||
|
private String diaoduPlanOrder; |
||||
|
|
||||
|
/** 嘉士利接口,spu转换sku */ |
||||
|
private String spuToSku; |
||||
|
|
||||
|
/** |
||||
|
* 原是生成销路通apt的中间表,替换伟成的接口直接生成 |
||||
|
*/ |
||||
|
private String policySyncCate; |
||||
|
|
||||
|
private String policySyncInv; |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
package com.qs.serve.common.config.properties; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @Author: YenHex |
||||
|
* @Date: 2021/3/3 |
||||
|
* @Version: 1.0 |
||||
|
**/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "project") |
||||
|
public class ProjectProperties { |
||||
|
|
||||
|
private String hostUrl; |
||||
|
|
||||
|
private String webUrl; |
||||
|
|
||||
|
private String pcWebLocal; |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.qs.serve.common.config.properties; |
||||
|
|
||||
|
import lombok.Getter; |
||||
|
import lombok.Setter; |
||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: YenHex |
||||
|
* @Date: 2021/3/3 |
||||
|
* @Version: 1.0 |
||||
|
**/ |
||||
|
@Getter |
||||
|
@Setter |
||||
|
@Component |
||||
|
@ConfigurationProperties(prefix = "project.seeyon") |
||||
|
public class SeeYonProperties { |
||||
|
|
||||
|
private Boolean enable; |
||||
|
|
||||
|
private String url; |
||||
|
|
||||
|
private String extApi; |
||||
|
|
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
package com.qs.serve.common.framework.annotations; |
||||
|
|
||||
|
public @interface TagField { |
||||
|
} |
@ -1,60 +0,0 @@ |
|||||
package com.qs.serve.common.framework.interceptor; |
|
||||
|
|
||||
import com.qs.serve.common.framework.redis.RedisService; |
|
||||
import com.qs.serve.common.framework.security.model.LoginUser; |
|
||||
import com.qs.serve.common.framework.security.model.LoginUserDTO; |
|
||||
import com.qs.serve.common.model.consts.GySysConst; |
|
||||
import com.qs.serve.common.model.consts.RedisCacheKeys; |
|
||||
import com.qs.serve.common.util.JsonUtil; |
|
||||
import org.springframework.context.annotation.Configuration; |
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; |
|
||||
import org.springframework.security.core.context.SecurityContextHolder; |
|
||||
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; |
|
||||
import org.springframework.web.servlet.HandlerInterceptor; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
import javax.servlet.http.HttpServletResponse; |
|
||||
import java.io.IOException; |
|
||||
import java.util.Objects; |
|
||||
|
|
||||
/** |
|
||||
* API接口身份拦截器 |
|
||||
* @author YenHex |
|
||||
*/ |
|
||||
@Configuration(proxyBeanMethods = false) |
|
||||
public class ApiAuthInterceptor implements HandlerInterceptor { |
|
||||
|
|
||||
|
|
||||
@Resource private RedisService redisService; |
|
||||
|
|
||||
@Override |
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { |
|
||||
String token = request.getHeader(GySysConst.APP_TOKEN_PROP); |
|
||||
String loginUserJson = redisService.getString(RedisCacheKeys.LOGIN_KEY_WX+token); |
|
||||
if(loginUserJson!=null){ |
|
||||
LoginUser loginUser = Objects.requireNonNull(JsonUtil.jsonToPojo(loginUserJson, LoginUserDTO.class)).loginUser(); |
|
||||
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities()); |
|
||||
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); |
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication); |
|
||||
return true; |
|
||||
} |
|
||||
try { |
|
||||
response.setHeader("Access-Control-Allow-Origin", "*"); |
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true"); |
|
||||
response.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS"); |
|
||||
response.setHeader("Access-Control-Max-Age", "86400"); |
|
||||
response.setHeader("Access-Control-Allow-Headers", "*"); |
|
||||
response.setStatus(200); |
|
||||
response.setCharacterEncoding("UTF-8"); |
|
||||
response.setCharacterEncoding("UTF-8"); |
|
||||
response.setContentType("application/json;charset=UTF-8"); |
|
||||
response.getWriter().print("{\"status\":401,\"msg\":\"用户信息无效或过期了\"}"); |
|
||||
response.getWriter().flush(); |
|
||||
} catch (IOException e) { |
|
||||
e.printStackTrace(); |
|
||||
} |
|
||||
return false; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -0,0 +1,30 @@ |
|||||
|
package com.qs.serve.common.framework.redis; |
||||
|
|
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.data.redis.cache.RedisCache; |
||||
|
import org.springframework.data.redis.cache.RedisCacheConfiguration; |
||||
|
import org.springframework.data.redis.cache.RedisCacheManager; |
||||
|
import org.springframework.data.redis.cache.RedisCacheWriter; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
|
import java.time.Duration; |
||||
|
|
||||
|
@Slf4j |
||||
|
public class TtlRedisCacheManager extends RedisCacheManager { |
||||
|
public TtlRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration) { |
||||
|
super(cacheWriter, defaultCacheConfiguration); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
protected RedisCache createRedisCache(String name, RedisCacheConfiguration cacheConfig) { |
||||
|
log.debug("TtlRedisCacheManager keyName:{}",name); |
||||
|
String[] cells = StringUtils.delimitedListToStringArray(name, "="); |
||||
|
name = cells[0]; |
||||
|
if (cells.length > 1) { |
||||
|
long ttl = Long.parseLong(cells[1]); |
||||
|
// 根据传参设置缓存失效时间,默认单位是秒
|
||||
|
cacheConfig = cacheConfig.entryTtl(Duration.ofSeconds(ttl)); |
||||
|
} |
||||
|
return super.createRedisCache(name, cacheConfig); |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.qs.serve.common.model; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/7/31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AmountDTO { |
||||
|
|
||||
|
private String id; |
||||
|
|
||||
|
private BigDecimal amount; |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.qs.serve.common.model.annotation; |
||||
|
|
||||
|
import java.lang.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/25 |
||||
|
*/ |
||||
|
@Target({ElementType.FIELD}) |
||||
|
@Retention(RetentionPolicy.RUNTIME) |
||||
|
@Documented |
||||
|
public @interface BusinessDifference { |
||||
|
|
||||
|
/** |
||||
|
* 字段备注 |
||||
|
* @return |
||||
|
*/ |
||||
|
String value() default ""; |
||||
|
|
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BiCommonCounter { |
||||
|
|
||||
|
/** |
||||
|
* 横轴下标的ID |
||||
|
*/ |
||||
|
private String label; |
||||
|
|
||||
|
private Long counts; |
||||
|
|
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BiMonthCounter { |
||||
|
|
||||
|
private String months; |
||||
|
private Long counts; |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChartAxisColumn { |
||||
|
|
||||
|
/** 列Id */ |
||||
|
String columnId; |
||||
|
|
||||
|
/** 列名 */ |
||||
|
String columnName; |
||||
|
|
||||
|
/** 系列坐标值合计 */ |
||||
|
Double total; |
||||
|
|
||||
|
public static List<ChartAxisColumn> buildMonthsOfYear(){ |
||||
|
List<ChartAxisColumn> axisColumnList = new ArrayList<>(); |
||||
|
for (long i = 1; i < 13; i++) { |
||||
|
ChartAxisColumn axisColumn = new ChartAxisColumn(); |
||||
|
if(i>9){ |
||||
|
axisColumn.setColumnId(i+""); |
||||
|
}else { |
||||
|
axisColumn.setColumnId("0"+i); |
||||
|
} |
||||
|
axisColumn.setColumnName(i+"月"); |
||||
|
axisColumnList.add(axisColumn); |
||||
|
} |
||||
|
return axisColumnList; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,148 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChartDataVo { |
||||
|
|
||||
|
/** |
||||
|
* 列(饼状图的主要参数) |
||||
|
*/ |
||||
|
List<ChartAxisColumn> axisColumnList; |
||||
|
|
||||
|
/** |
||||
|
* 系列 |
||||
|
*/ |
||||
|
List<ChartSeriesItem> seriesItemList; |
||||
|
|
||||
|
/** |
||||
|
* 分组 |
||||
|
*/ |
||||
|
List<ChartGroupItem> groupItemList; |
||||
|
|
||||
|
|
||||
|
public void initAxisColumnTotal(){ |
||||
|
for (int i = 0; i < axisColumnList.size(); i++) { |
||||
|
ChartAxisColumn axisColumn = axisColumnList.get(i); |
||||
|
BigDecimal total = BigDecimal.ZERO; |
||||
|
if(seriesItemList!=null&&seriesItemList.size()>0){ |
||||
|
for (ChartSeriesItem seriesItem : seriesItemList) { |
||||
|
double value = seriesItem.getValues().get(i); |
||||
|
total = total.add(new BigDecimal(value+"")); |
||||
|
} |
||||
|
} |
||||
|
axisColumn.setTotal(total.doubleValue()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static ChartDataVo buildStateChartData(List<BiCommonCounter> stateCounterList, Map<String,String> stateMap){ |
||||
|
ChartDataVo chartDataVo = new ChartDataVo(); |
||||
|
List<ChartAxisColumn> axisColumnList = new ArrayList<>(); |
||||
|
List<ChartSeriesItem> seriesItemList = new ArrayList<>(); |
||||
|
List<ChartGroupItem> groupItemList = new ArrayList<>(); |
||||
|
ChartGroupItem groupItem = new ChartGroupItem(); |
||||
|
groupItem.setGroupId(100L); |
||||
|
groupItem.setGroupName("默认"); |
||||
|
groupItemList.add(groupItem); |
||||
|
for (String stateNum : stateMap.keySet()) { |
||||
|
String label = stateMap.get(stateNum); |
||||
|
ChartAxisColumn axisColumn = new ChartAxisColumn(); |
||||
|
axisColumn.setColumnId(stateNum); |
||||
|
axisColumn.setColumnName(label); |
||||
|
axisColumnList.add(axisColumn); |
||||
|
} |
||||
|
List<Double> values = new ArrayList<>(); |
||||
|
for (ChartAxisColumn chartAxisColumn : axisColumnList) { |
||||
|
Double currVal = 0.0; |
||||
|
for (BiCommonCounter counter : stateCounterList) { |
||||
|
if(chartAxisColumn.getColumnId().equals(counter.getLabel())){ |
||||
|
currVal = counter.getCounts().doubleValue(); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
values.add(currVal); |
||||
|
} |
||||
|
ChartSeriesItem seriesItem = new ChartSeriesItem(); |
||||
|
seriesItem.setGroupId(groupItem.getGroupId()); |
||||
|
seriesItem.setGroupName(groupItem.getGroupName()); |
||||
|
seriesItem.setValues(values); |
||||
|
seriesItemList.add(seriesItem); |
||||
|
//更新total
|
||||
|
chartDataVo.setAxisColumnList(axisColumnList); |
||||
|
chartDataVo.setGroupItemList(groupItemList); |
||||
|
chartDataVo.setSeriesItemList(seriesItemList); |
||||
|
chartDataVo.initAxisColumnTotal(); |
||||
|
return chartDataVo; |
||||
|
} |
||||
|
|
||||
|
public void tes(){ |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public void buildStateMap(Map<String,String> stateMap){ |
||||
|
init(); |
||||
|
for (String stateNum : stateMap.keySet()) { |
||||
|
String label = stateMap.get(stateNum); |
||||
|
ChartAxisColumn axisColumn = new ChartAxisColumn(); |
||||
|
axisColumn.setColumnId(stateNum); |
||||
|
axisColumn.setColumnName(label); |
||||
|
this.axisColumnList.add(axisColumn); |
||||
|
} |
||||
|
} |
||||
|
public void buildStateMapOfMonths(){ |
||||
|
init(); |
||||
|
this.axisColumnList = ChartAxisColumn.buildMonthsOfYear(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 先调用buildStateMap |
||||
|
* @param groupId |
||||
|
* @param groupName |
||||
|
* @param stateCounterList |
||||
|
*/ |
||||
|
public void addData(Long groupId,String groupName,List<BiCommonCounter> stateCounterList){ |
||||
|
ChartGroupItem groupItem = new ChartGroupItem(); |
||||
|
groupItem.setGroupId(groupId); |
||||
|
groupItem.setGroupName(groupName); |
||||
|
groupItemList.add(groupItem); |
||||
|
List<Double> values = new ArrayList<>(); |
||||
|
for (ChartAxisColumn chartAxisColumn : axisColumnList) { |
||||
|
Double currVal = 0.0; |
||||
|
for (BiCommonCounter counter : stateCounterList) { |
||||
|
if(chartAxisColumn.getColumnId().equals(counter.getLabel())){ |
||||
|
currVal = counter.getCounts().doubleValue(); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
values.add(currVal); |
||||
|
} |
||||
|
ChartSeriesItem seriesItem = new ChartSeriesItem(); |
||||
|
seriesItem.setGroupId(groupItem.getGroupId()); |
||||
|
seriesItem.setGroupName(groupItem.getGroupName()); |
||||
|
seriesItem.setValues(values); |
||||
|
seriesItemList.add(seriesItem); |
||||
|
this.initAxisColumnTotal(); |
||||
|
} |
||||
|
|
||||
|
private void init(){ |
||||
|
if(axisColumnList==null){ |
||||
|
axisColumnList = new ArrayList<>(); |
||||
|
} |
||||
|
if(seriesItemList==null){ |
||||
|
seriesItemList = new ArrayList<>(); |
||||
|
} |
||||
|
if(groupItemList==null){ |
||||
|
groupItemList = new ArrayList<>(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChartGroupItem { |
||||
|
|
||||
|
/** 组id */ |
||||
|
private Long groupId; |
||||
|
|
||||
|
/** 组名 */ |
||||
|
private String groupName; |
||||
|
|
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ChartSeriesItem { |
||||
|
|
||||
|
|
||||
|
/** 组id */ |
||||
|
Long groupId; |
||||
|
|
||||
|
/** 组名 */ |
||||
|
String groupName; |
||||
|
|
||||
|
/** |
||||
|
* 值列表(列对应axisColumns) |
||||
|
*/ |
||||
|
List<Double> values; |
||||
|
|
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package com.qs.serve.common.model.chart; |
||||
|
|
||||
|
import com.qs.serve.common.util.JsonUtil; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Random; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/2/17 |
||||
|
*/ |
||||
|
public class PrintChart { |
||||
|
|
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
|
||||
|
//eg. 统计最近5年入学人数,并区分男女数量
|
||||
|
ChartDataVo chartDataVo = new ChartDataVo(); |
||||
|
|
||||
|
List<ChartAxisColumn> axisColumnList = new ArrayList<>(); |
||||
|
List<ChartSeriesItem> seriesItemList = new ArrayList<>(); |
||||
|
List<ChartGroupItem> groupItemList = new ArrayList<>(); |
||||
|
|
||||
|
ChartGroupItem groupItem = new ChartGroupItem(); |
||||
|
groupItem.setGroupId(100L); |
||||
|
groupItem.setGroupName("男学生"); |
||||
|
groupItemList.add(groupItem); |
||||
|
|
||||
|
ChartGroupItem groupItem2 = new ChartGroupItem(); |
||||
|
groupItem2.setGroupId(200L); |
||||
|
groupItem2.setGroupName("女学生"); |
||||
|
groupItemList.add(groupItem2); |
||||
|
|
||||
|
for (long i = 1; i <= 5; i++) { |
||||
|
ChartAxisColumn axisColumn = new ChartAxisColumn(); |
||||
|
axisColumn.setColumnId(i+""); |
||||
|
axisColumn.setColumnName("202"+i+"年"); |
||||
|
axisColumnList.add(axisColumn); |
||||
|
} |
||||
|
|
||||
|
Random random = new Random(); |
||||
|
for (ChartGroupItem chartGroupItem : groupItemList) { |
||||
|
ChartSeriesItem seriesItem = new ChartSeriesItem(); |
||||
|
seriesItem.setGroupId(chartGroupItem.getGroupId()); |
||||
|
seriesItem.setGroupName(chartGroupItem.getGroupName()); |
||||
|
List<Double> values = new ArrayList<>(); |
||||
|
for (int i = 0; i < axisColumnList.size(); i++) { |
||||
|
double result = random.nextInt(1000)+3000; |
||||
|
values.add(result); |
||||
|
} |
||||
|
seriesItem.setValues(values); |
||||
|
seriesItemList.add(seriesItem); |
||||
|
} |
||||
|
//更新total
|
||||
|
for (int i = 0; i < axisColumnList.size(); i++) { |
||||
|
ChartAxisColumn axisColumn = axisColumnList.get(i); |
||||
|
BigDecimal total = BigDecimal.ZERO; |
||||
|
for (ChartSeriesItem seriesItem : seriesItemList) { |
||||
|
double value = seriesItem.getValues().get(i); |
||||
|
total = total.add(new BigDecimal(value+"")); |
||||
|
} |
||||
|
axisColumn.setTotal(total.doubleValue()); |
||||
|
} |
||||
|
chartDataVo.setAxisColumnList(axisColumnList); |
||||
|
chartDataVo.setGroupItemList(groupItemList); |
||||
|
chartDataVo.setSeriesItemList(seriesItemList); |
||||
|
String v = JsonUtil.objectToJson(chartDataVo); |
||||
|
System.out.println(v); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.qs.serve.common.model.consts; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/19 |
||||
|
*/ |
||||
|
public interface ApplyTypeConst { |
||||
|
|
||||
|
String CostBill = "CostBill"; |
||||
|
String CheckCost = "CheckCost"; |
||||
|
String ReleasePolicy = "ReleasePolicy"; |
||||
|
|
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.qs.serve.common.model.consts; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/1/30 |
||||
|
*/ |
||||
|
public interface BudgetLogRollbackFlag { |
||||
|
|
||||
|
/** 正常(标记为最新记录) */ |
||||
|
Integer State_0 = 0; |
||||
|
|
||||
|
/** 回退 */ |
||||
|
Integer State_1 = 1; |
||||
|
|
||||
|
/** 回退已处理 */ |
||||
|
Integer State_2 = 2; |
||||
|
|
||||
|
/** 删除已处理 */ |
||||
|
Integer State_3 = 3; |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.qs.serve.common.model.consts; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/2/15 |
||||
|
*/ |
||||
|
public interface ResultFlag { |
||||
|
|
||||
|
int OK = 1; |
||||
|
int NOT = 0; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.qs.serve.common.model.consts; |
||||
|
|
||||
|
/** |
||||
|
* 系统配置 |
||||
|
* @author YenHex |
||||
|
* @since 2022/11/12 |
||||
|
*/ |
||||
|
public interface SysConfigKey { |
||||
|
|
||||
|
/** 费用超支 */ |
||||
|
String TbsBudgetOverspend = "TbsBudgetOverspend"; |
||||
|
|
||||
|
/** 活动预计核销日期 */ |
||||
|
String ActivityPreCheckDays = "ActivityPreCheckDays"; |
||||
|
|
||||
|
String DateCheckApplyExcelYear = "DateCheckApplyExcelYear"; |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/5 |
||||
|
*/ |
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class DateSplitDTO { |
||||
|
|
||||
|
Integer days; |
||||
|
|
||||
|
LocalDate startDate; |
||||
|
|
||||
|
LocalDate endDate; |
||||
|
|
||||
|
Integer yearMonth; |
||||
|
|
||||
|
Integer sort; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DiffFieldVal { |
||||
|
|
||||
|
String field; |
||||
|
String comment; |
||||
|
String orgValue; |
||||
|
String newValue; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/5/17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HeaderOption { |
||||
|
|
||||
|
private String name; |
||||
|
// private String width;
|
||||
|
// private String prefix;
|
||||
|
// private String suffix;
|
||||
|
private Boolean isSum; |
||||
|
private Integer decimalLength; |
||||
|
private String align; |
||||
|
private List<HeaderOption> children; |
||||
|
|
||||
|
public HeaderOption(String name){ |
||||
|
this.name = name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/5/17 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class RowParam { |
||||
|
|
||||
|
private Integer startIndex; |
||||
|
private Integer size; |
||||
|
|
||||
|
public RowParam(Integer startIndex, Integer size) { |
||||
|
this.startIndex = startIndex; |
||||
|
this.size = size; |
||||
|
} |
||||
|
|
||||
|
public RowParam(boolean pageable) { |
||||
|
this.size = PageUtil.getPageSize(); |
||||
|
this.startIndex = (PageUtil.getPageNum()-1)*size; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
public class TargetDTO { |
||||
|
String targetId; |
||||
|
String targetCode; |
||||
|
String targetName; |
||||
|
|
||||
|
public TargetDTO(String targetId, String targetCode, String targetName) { |
||||
|
this.targetId = targetId; |
||||
|
this.targetCode = targetCode; |
||||
|
this.targetName = targetName; |
||||
|
} |
||||
|
|
||||
|
//拜访相关业务
|
||||
|
String localX; |
||||
|
String localY; |
||||
|
String address; |
||||
|
String mapAddress; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.qs.serve.common.model.dto; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/7 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TargetObjectDTO { |
||||
|
String targetType; |
||||
|
String targetId; |
||||
|
|
||||
|
String targetCode; |
||||
|
String targetName; |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.qs.serve.common.model.enums; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Getter; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/1/30 |
||||
|
*/ |
||||
|
@Getter |
||||
|
@AllArgsConstructor |
||||
|
public enum BudgetLogOptFlag { |
||||
|
|
||||
|
/** 0-预算新增 */ |
||||
|
State_0(0,true), |
||||
|
|
||||
|
/** 1-费用申请(费用申请,预算调减) */ |
||||
|
State_1(1,false), |
||||
|
|
||||
|
/** 2-预算调增 */ |
||||
|
State_2(2,true), |
||||
|
|
||||
|
/** 3-预算调减 */ |
||||
|
State_3(3,false), |
||||
|
|
||||
|
/** 4-费用释放(预算调增) */ |
||||
|
State_4(4,true), |
||||
|
|
||||
|
/** 5-费用申请调增(费用申请,预算调增) */ |
||||
|
State_5(5,true), |
||||
|
|
||||
|
/** 6-费用申请调减(费用申请,预算调减) */ |
||||
|
State_6(6,false), |
||||
|
|
||||
|
/** 已取消 7-销售区域迁移调增 */ |
||||
|
State_7(7,false), |
||||
|
|
||||
|
/** 已取消 8-销售区域迁移调减 */ |
||||
|
State_8(8,false), |
||||
|
|
||||
|
/** 已取消 9-行政区域迁移调增 */ |
||||
|
State_9(9,false), |
||||
|
|
||||
|
/** 已取消 10-行政区域迁移调减 */ |
||||
|
State_10(10,false), |
||||
|
|
||||
|
/** 11-政策申请 */ |
||||
|
State_11(11,false), |
||||
|
|
||||
|
/** 12-政策申请调增(政策申请,预算调增) */ |
||||
|
State_12(12,true), |
||||
|
|
||||
|
/** 13-政策因费用申请调增(政策申请,预算转移) */ |
||||
|
State_13(13,true), |
||||
|
|
||||
|
/** 14-政策申请释放(被拒绝后,政策释放) */ |
||||
|
State_14(14,true), |
||||
|
|
||||
|
/** 15-费用申请释放(被拒绝后,预算增加) */ |
||||
|
State_15(15,true), |
||||
|
|
||||
|
/** 16-政策释放(释放操作,预算增加) */ |
||||
|
State_16(16,true); |
||||
|
|
||||
|
/** |
||||
|
* 编码 |
||||
|
*/ |
||||
|
private Integer code; |
||||
|
|
||||
|
/** |
||||
|
* 是否取反,添加预算 |
||||
|
*/ |
||||
|
private boolean addBudget; |
||||
|
|
||||
|
private final static List<Integer> finalBudgetOptFlag = Arrays.asList(0, 2, 3); |
||||
|
|
||||
|
public final static List<Integer> finalCostOptFlag = Arrays.asList(1,4,5,6); |
||||
|
|
||||
|
public final static List<Integer> finalPolicyOptFlag = Arrays.asList(11,12,13,14,15); |
||||
|
|
||||
|
/** |
||||
|
* 预算规划,状态0,2,3,新增、调增、调减 |
||||
|
*/ |
||||
|
public static List<Integer> getFinalBudgetOptFlag(){ |
||||
|
return finalBudgetOptFlag; |
||||
|
} |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.qs.serve.common.model.enums; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/9/13 |
||||
|
*/ |
||||
|
public class MonthValues { |
||||
|
|
||||
|
public static final int[] Q1 = {1,2,3}; |
||||
|
public static final int[] Q2 = {4,5,6}; |
||||
|
public static final int[] Q3 = {7,8,9}; |
||||
|
public static final int[] Q4 = {10,11,12}; |
||||
|
|
||||
|
|
||||
|
|
||||
|
public static int[] getQArr(Integer val){ |
||||
|
for (int i = 0; i < Q1.length; i++) { |
||||
|
if(val==Q1[i]){ |
||||
|
return Q1; |
||||
|
} |
||||
|
} |
||||
|
for (int i = 0; i < Q2.length; i++) { |
||||
|
if(val==Q2[i]){ |
||||
|
return Q2; |
||||
|
} |
||||
|
} |
||||
|
for (int i = 0; i < Q3.length; i++) { |
||||
|
if(val==Q3[i]){ |
||||
|
return Q3; |
||||
|
} |
||||
|
} |
||||
|
for (int i = 0; i < Q4.length; i++) { |
||||
|
if(val==Q4[i]){ |
||||
|
return Q4; |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
package com.qs.serve.common.model.oa; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2024/1/12 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OaFormMainProcess { |
||||
|
|
||||
|
private String targetId; |
||||
|
|
||||
|
/** |
||||
|
* 上次文件 |
||||
|
*/ |
||||
|
private List<OaUploadFile> uploadFiles; |
||||
|
|
||||
|
/** |
||||
|
* data |
||||
|
*/ |
||||
|
private Object data; |
||||
|
|
||||
|
/** |
||||
|
* 员工号 |
||||
|
*/ |
||||
|
private String senderLoginName; |
||||
|
|
||||
|
/** |
||||
|
* 模板编码 |
||||
|
*/ |
||||
|
private String templateCode; |
||||
|
|
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.qs.serve.common.model.oa; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2024/1/12 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OaUploadFile { |
||||
|
|
||||
|
/** |
||||
|
* 表单控件名称 |
||||
|
*/ |
||||
|
private String field; |
||||
|
|
||||
|
/** |
||||
|
* 附件文件名 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 附件url |
||||
|
*/ |
||||
|
private String url; |
||||
|
|
||||
|
} |
@ -0,0 +1,79 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import com.qs.serve.common.framework.mybatis.join.annotations.BindEntity; |
||||
|
import com.qs.serve.common.model.annotation.BusinessDifference; |
||||
|
import com.qs.serve.common.model.dto.DiffFieldVal; |
||||
|
import com.qs.serve.modules.bms.entity.BmsSupplierContacts; |
||||
|
import com.qs.serve.modules.sys.entity.SysBusinessLog; |
||||
|
import lombok.SneakyThrows; |
||||
|
|
||||
|
import java.lang.annotation.Annotation; |
||||
|
import java.lang.reflect.Field; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/25 |
||||
|
*/ |
||||
|
public class BusinessDifferenceUtil { |
||||
|
|
||||
|
@SneakyThrows |
||||
|
public static <T> List<DiffFieldVal> getDifferenceList(T orgVal, T newVal){ |
||||
|
List<DiffFieldVal> diffFieldValList = new ArrayList<>(); |
||||
|
if(orgVal==null||newVal==null){ |
||||
|
return diffFieldValList; |
||||
|
} |
||||
|
Class<?> clazz = null; |
||||
|
try { |
||||
|
clazz = Class.forName(orgVal.getClass().getName()); |
||||
|
} catch (ClassNotFoundException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
if(clazz==null){return diffFieldValList;} |
||||
|
Field[] fields = clazz.getDeclaredFields(); |
||||
|
for (Field field : fields) { |
||||
|
for (Annotation annotation : field.getAnnotations()) { |
||||
|
if(annotation instanceof BusinessDifference){ |
||||
|
BusinessDifference busDiff = (BusinessDifference) annotation; |
||||
|
field.setAccessible(true); |
||||
|
Object orgValue = field.get(orgVal); |
||||
|
Object newValue = field.get(newVal); |
||||
|
if(newValue==null){ |
||||
|
continue; |
||||
|
} |
||||
|
if(orgValue==null){ |
||||
|
orgValue = ""; |
||||
|
} |
||||
|
if(!orgValue.equals(newValue)){ |
||||
|
DiffFieldVal fieldVal = new DiffFieldVal(); |
||||
|
fieldVal.setField(field.getName()); |
||||
|
fieldVal.setNewValue(newValue.toString()); |
||||
|
fieldVal.setOrgValue(orgValue.toString()); |
||||
|
fieldVal.setComment(busDiff.value()); |
||||
|
diffFieldValList.add(fieldVal); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return diffFieldValList; |
||||
|
} |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
BmsSupplierContacts supplierContacts = new BmsSupplierContacts(); |
||||
|
supplierContacts.setContactsName("名称1"); |
||||
|
supplierContacts.setContactsPost("setContactsPost"); |
||||
|
|
||||
|
|
||||
|
BmsSupplierContacts supplierContacts2 = new BmsSupplierContacts(); |
||||
|
supplierContacts2.setContactsName("名称2"); |
||||
|
supplierContacts2.setContactsNumber("123456"); |
||||
|
supplierContacts2.setContactsPost("setContactsPost"); |
||||
|
|
||||
|
List<DiffFieldVal> diffFieldValList =BusinessDifferenceUtil.getDifferenceList(supplierContacts,supplierContacts2); |
||||
|
for (DiffFieldVal fieldVal : diffFieldValList) { |
||||
|
System.out.println(JsonUtil.objectToJson(fieldVal)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,146 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import com.qs.serve.common.config.DevEnvironmentConfig; |
||||
|
import com.qs.serve.common.framework.redis.RedisService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Getter; |
||||
|
import org.springframework.beans.BeansException; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.format.DateTimeFormatter; |
||||
|
|
||||
|
/** |
||||
|
* 生成编号 |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/25 |
||||
|
*/ |
||||
|
public class CodeGenUtil { |
||||
|
|
||||
|
@Getter |
||||
|
@AllArgsConstructor |
||||
|
public enum SourceKey{ |
||||
|
CostApply("cost_apply"), |
||||
|
SalePlan("SalePlan"), |
||||
|
Activity("activity"), |
||||
|
OmsOrder("OmsOrder"), |
||||
|
Verification("verification"), |
||||
|
Policy("policy"), |
||||
|
Budget("Budget"), |
||||
|
BudgetChange("BudgetChange"), |
||||
|
BudgetBatch("BudgetBatch"), |
||||
|
AgreeCheck("AgreeCheck"), |
||||
|
PolicyItem("policy_item"); |
||||
|
private String code; |
||||
|
} |
||||
|
|
||||
|
@Getter |
||||
|
@AllArgsConstructor |
||||
|
public enum SourceDataKey{ |
||||
|
TagInfo("T","TagInfo"), |
||||
|
SaleRegion("S","SaleRegion"), |
||||
|
BizRegion("B","BizRegion"), |
||||
|
ActivityPayCondition("K","ActivityPayCondition"); |
||||
|
private String prefix; |
||||
|
private String code; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
private static final int split_num = 1000; |
||||
|
|
||||
|
|
||||
|
final static String[] digits2 = { |
||||
|
"A" , "B" , "C" , "D" , "E" , |
||||
|
"F" , "G" , "H" ,"J" , "K" , |
||||
|
"L" , "M" , "N" , "P" , |
||||
|
"Q" , "R" , "T" , "U" , "V" , "W" , |
||||
|
"X" , "Y" |
||||
|
}; |
||||
|
|
||||
|
public static Long getIdx(String key){ |
||||
|
RedisService redisService = SpringUtils.getBean(RedisService.class); |
||||
|
Long value = redisService.getLong(key); |
||||
|
if(value==null){ |
||||
|
redisService.set(key,1); |
||||
|
value = 1L; |
||||
|
}else { |
||||
|
value++; |
||||
|
} |
||||
|
redisService.set(key,value); |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public synchronized static String generate(SourceKey sourceKey){ |
||||
|
try { |
||||
|
LocalDate localDateTime = LocalDate.now(); |
||||
|
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyyMMdd"); |
||||
|
String localTime = df.format(localDateTime); |
||||
|
localTime = localTime.substring(2); |
||||
|
String key = "code_index:"+sourceKey.getCode()+":"+localTime; |
||||
|
return localTime + getCommonValue(key); |
||||
|
} catch (BeansException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
return IdUtil.getSnowflakeNextIdStr(); |
||||
|
} |
||||
|
|
||||
|
public static String getCommonValue(String key){ |
||||
|
Long value = getIdx(key); |
||||
|
String digitsNum = ""; |
||||
|
String appendStr = value+""; |
||||
|
if(value>split_num){ |
||||
|
appendStr = (value%100)+""; |
||||
|
Long d = value/split_num; |
||||
|
digitsNum = digits2[d.intValue()]; |
||||
|
} |
||||
|
StringBuilder appendZeros = new StringBuilder(); |
||||
|
for (int i = (appendStr+digitsNum).length(); i < 3; i++) { |
||||
|
appendZeros.append("0"); |
||||
|
} |
||||
|
//用于区分测试环境数据
|
||||
|
String subflex = DevEnvironmentConfig.isDev()?"T":""; |
||||
|
return digitsNum + appendZeros + appendStr+subflex; |
||||
|
} |
||||
|
|
||||
|
public synchronized static String getDataCode(SourceDataKey dataKey){ |
||||
|
String key = "code_data_index:"+dataKey.getCode(); |
||||
|
String commonVal = getCommonValue(key); |
||||
|
return dataKey.getPrefix() + commonVal; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 32个字符,用来表示32进制 |
||||
|
*/ |
||||
|
final static char[] digits = { |
||||
|
'0' , '1' , '2' , '3' , '4' , '5' , |
||||
|
'6' , '7' , '8' , '9' , 'A' , 'B' , |
||||
|
'C' , 'D' , 'E' , 'F' , 'G' , 'H' , |
||||
|
'J' , 'K' , 'L' , 'M' , 'N' , 'P' , |
||||
|
'Q' , 'R' , 'T' , 'U' , 'V' , 'W' , |
||||
|
'X' , 'Y' |
||||
|
}; |
||||
|
|
||||
|
/** |
||||
|
* 10=>32 |
||||
|
* @param val |
||||
|
* @return |
||||
|
*/ |
||||
|
static String digits32(long val) { |
||||
|
// 32=2^5=二进制100000
|
||||
|
int shift = 5; |
||||
|
// numberOfLeadingZeros 获取long值从高位连续为0的个数,比如val=0,则返回64
|
||||
|
// 此处mag=long值二进制减去高位0之后的长度
|
||||
|
int mag = Long.SIZE - Long.numberOfLeadingZeros(val); |
||||
|
int len = Math.max(((mag + (shift - 1)) / shift), 1); |
||||
|
char[] buf = new char[len]; |
||||
|
do { |
||||
|
// &31相当于%32
|
||||
|
buf[--len] = digits[((int) val) & 31]; |
||||
|
val >>>= shift; |
||||
|
} while (val != 0 && len > 0); |
||||
|
return new String(buf); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import com.qs.serve.common.model.dto.DateSplitDTO; |
||||
|
import lombok.experimental.UtilityClass; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 分割时间DTO工具类 |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/5 |
||||
|
*/ |
||||
|
@UtilityClass |
||||
|
public class DateSplitUtil { |
||||
|
|
||||
|
public static List<DateSplitDTO> getSplitDto(LocalDate sDate, LocalDate eDate){ |
||||
|
int diffYear = eDate.getYear() - sDate.getYear(); |
||||
|
int diffMonthOfYear = eDate.getMonthValue() - sDate.getMonthValue(); |
||||
|
int diffMonth = diffYear * 12 + diffMonthOfYear; |
||||
|
//最后一个月的年月数
|
||||
|
int lastYearMonth = eDate.getYear()*100 + eDate.getMonthValue(); |
||||
|
int firstYearMonth = sDate.getYear()*100 + sDate.getMonthValue(); |
||||
|
if(diffMonth<1){ |
||||
|
//同一个月
|
||||
|
int days = eDate.getDayOfMonth() - sDate.getDayOfMonth() + 1; |
||||
|
DateSplitDTO splitDTO = new DateSplitDTO(days,sDate,eDate,lastYearMonth,1); |
||||
|
return Arrays.asList(splitDTO); |
||||
|
}else { |
||||
|
List<DateSplitDTO> dateSplitDTOS = new ArrayList<>(); |
||||
|
for (int i = 0; i < diffMonth+2; i++) { |
||||
|
int sort = i+1; |
||||
|
LocalDate newStartDate = sDate.plusMonths(i); |
||||
|
int currYearMonth = newStartDate.getYear()*100 + newStartDate.getMonthValue(); |
||||
|
//第一个月
|
||||
|
if(firstYearMonth==currYearMonth){ |
||||
|
int days = sDate.lengthOfMonth() - sDate.getDayOfMonth() + 1; |
||||
|
//当月最后一天
|
||||
|
LocalDate endLocalDate = LocalDate.of(sDate.getYear(),sDate.getMonth(),sDate.lengthOfMonth()); |
||||
|
DateSplitDTO splitDTO = new DateSplitDTO(days,sDate,endLocalDate,currYearMonth,sort); |
||||
|
dateSplitDTOS.add(splitDTO); |
||||
|
}else if(currYearMonth==lastYearMonth){ |
||||
|
int days = eDate.getDayOfMonth(); |
||||
|
//当月第一天
|
||||
|
LocalDate startDate = newStartDate.withDayOfMonth(1); |
||||
|
DateSplitDTO splitDTO = new DateSplitDTO(days,startDate,eDate,currYearMonth,sort); |
||||
|
dateSplitDTOS.add(splitDTO); |
||||
|
break; |
||||
|
}else { |
||||
|
int days = newStartDate.lengthOfMonth(); |
||||
|
//当月第一天
|
||||
|
LocalDate startDate = newStartDate.withDayOfMonth(1); |
||||
|
//当月最后一天
|
||||
|
LocalDate endLocalDate = LocalDate.of(newStartDate.getYear(),newStartDate.getMonth(),newStartDate.lengthOfMonth()); |
||||
|
DateSplitDTO splitDTO = new DateSplitDTO(days,startDate,endLocalDate,currYearMonth,sort); |
||||
|
dateSplitDTOS.add(splitDTO); |
||||
|
} |
||||
|
} |
||||
|
return dateSplitDTOS; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,147 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import lombok.experimental.UtilityClass; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.http.HttpEntity; |
||||
|
import org.apache.http.ParseException; |
||||
|
import org.apache.http.client.ClientProtocolException; |
||||
|
import org.apache.http.client.HttpClient; |
||||
|
import org.apache.http.client.methods.CloseableHttpResponse; |
||||
|
import org.apache.http.client.methods.HttpGet; |
||||
|
import org.apache.http.client.methods.HttpPost; |
||||
|
import org.apache.http.entity.StringEntity; |
||||
|
import org.apache.http.impl.client.CloseableHttpClient; |
||||
|
import org.apache.http.impl.client.HttpClientBuilder; |
||||
|
import org.apache.http.impl.client.HttpClients; |
||||
|
import org.apache.http.protocol.HTTP; |
||||
|
import org.apache.http.util.EntityUtils; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.util.HashMap; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2022/11/23 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@UtilityClass |
||||
|
public class HttpUtil { |
||||
|
|
||||
|
private final static String CONTENT_TYPE = "application/json"; |
||||
|
private final static String CHARSET = "UTF-8"; |
||||
|
private final static String EN_CONING = "UTF-8"; |
||||
|
|
||||
|
public static String doPost(String url, String jsonStr, HashMap<String,String> headers) { |
||||
|
CloseableHttpClient client = HttpClientBuilder.create().build(); |
||||
|
CloseableHttpResponse response = null; |
||||
|
String errorMsg = null; |
||||
|
try { |
||||
|
//设post请求
|
||||
|
HttpPost post = new HttpPost(url); |
||||
|
//创建请求实体传参
|
||||
|
if(jsonStr!=null){ |
||||
|
StringEntity postingString = new StringEntity(jsonStr,CHARSET); |
||||
|
postingString.setContentEncoding(EN_CONING); |
||||
|
//设置post请求参数
|
||||
|
post.setEntity(postingString); |
||||
|
} |
||||
|
post.addHeader(HTTP.CONTENT_TYPE,CONTENT_TYPE); |
||||
|
if (headers != null) { |
||||
|
for (String key : headers.keySet()) { |
||||
|
post.addHeader(key,headers.get(key)); |
||||
|
} |
||||
|
} |
||||
|
//执行post请求
|
||||
|
response = client.execute(post); |
||||
|
//访问成功状态码为200
|
||||
|
if (response.getStatusLine().getStatusCode() == 200) { |
||||
|
return EntityUtils.toString(response.getEntity()); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
errorMsg = e.getMessage(); |
||||
|
e.printStackTrace(); |
||||
|
}finally { |
||||
|
try { |
||||
|
client.close(); |
||||
|
if(response!=null){ |
||||
|
response.close(); |
||||
|
} |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
return errorMsg; |
||||
|
} |
||||
|
|
||||
|
public static String doGet(String url, HashMap<String,String> headers) { |
||||
|
CloseableHttpClient httpclient = HttpClients.createDefault(); |
||||
|
try { |
||||
|
HttpGet httpget = new HttpGet(url); |
||||
|
httpget.addHeader(HTTP.CONTENT_TYPE,CONTENT_TYPE); |
||||
|
if (headers != null) { |
||||
|
for (String key : headers.keySet()) { |
||||
|
httpget.addHeader(key,headers.get(key)); |
||||
|
} |
||||
|
} |
||||
|
CloseableHttpResponse response = httpclient.execute(httpget); |
||||
|
try { |
||||
|
if (response.getStatusLine().getStatusCode() == 200) { |
||||
|
return EntityUtils.toString(response.getEntity()); |
||||
|
} |
||||
|
} finally { |
||||
|
response.close(); |
||||
|
} |
||||
|
} catch (ClientProtocolException e) { |
||||
|
e.printStackTrace(); |
||||
|
} catch (ParseException e) { |
||||
|
e.printStackTrace(); |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} finally { |
||||
|
try { |
||||
|
httpclient.close(); |
||||
|
} catch (IOException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
public static String createUrl(HashMap<String,String> param){ |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
for (String key : param.keySet()) { |
||||
|
sb.append("&"+key+"="+param.get(key)); |
||||
|
} |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
|
||||
|
public static R<String> doGetResult(String url,HashMap<String,String> headers){ |
||||
|
String result = HttpUtil.doGet(url,headers); |
||||
|
log.debug("url:{},result:{}",url,result); |
||||
|
if(result==null){ |
||||
|
Assert.throwEx("远程服务连接失败"); |
||||
|
} |
||||
|
JSONObject jsonObject = JSONObject.parseObject(result); |
||||
|
Integer status = jsonObject.getInteger("status"); |
||||
|
String msg = jsonObject.getString("msg"); |
||||
|
String data = jsonObject.getString("data"); |
||||
|
return new R(status,msg,data); |
||||
|
} |
||||
|
|
||||
|
public static R<String> doPostResult(String url, String jsonStr, HashMap<String,String> headers){ |
||||
|
String result = HttpUtil.doPost(url,jsonStr,headers); |
||||
|
log.debug("url:{},result:{}",url,result); |
||||
|
if(result==null){ |
||||
|
log.warn("jsonStr:{}",jsonStr); |
||||
|
Assert.throwEx("远程服务连接失败"); |
||||
|
} |
||||
|
JSONObject jsonObject = JSONObject.parseObject(result); |
||||
|
Integer status = jsonObject.getInteger("status"); |
||||
|
String msg = jsonObject.getString("msg"); |
||||
|
String data = jsonObject.getString("data"); |
||||
|
return new R(status,msg,data); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,107 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
|
import java.sql.*; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 原生JDBC工具类 |
||||
|
* @Author JcYen |
||||
|
* @Date 2021/6/4 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
public class JdbcUtil { |
||||
|
|
||||
|
private static final String[] FILTER_WORD = new String[]{"truncate","create","alter","eval","delete","sp_password"}; |
||||
|
|
||||
|
/** |
||||
|
* 执行SQL(为安全,拦截delete语句) |
||||
|
* @param username |
||||
|
* @param password |
||||
|
* @param url |
||||
|
* @param driverName |
||||
|
* @param sql |
||||
|
* @return |
||||
|
*/ |
||||
|
public static List<Map<String,Object>> query(String username, String password, String url, String driverName, String sql) { |
||||
|
//检查SQL,防止SQL执行DDL语句
|
||||
|
doSqlFilter(sql); |
||||
|
List<Map<String,Object>> list = new ArrayList(); |
||||
|
Connection conn = null; |
||||
|
Statement stmt = null; |
||||
|
ResultSet rs = null; |
||||
|
try { |
||||
|
Class.forName(driverName); |
||||
|
conn = DriverManager.getConnection(url, username, password); |
||||
|
stmt = conn.createStatement(); |
||||
|
log.debug("JDBC工具类 Preparing SQL: {}",url); |
||||
|
rs = stmt.executeQuery(sql); |
||||
|
ResultSetMetaData md = rs.getMetaData(); |
||||
|
int columnCount = md.getColumnCount(); |
||||
|
while (rs.next()) { |
||||
|
Map<String,Object> rowData = new HashMap<>(); |
||||
|
for (int i = 1; i <= columnCount; i++) { |
||||
|
rowData.put(md.getColumnName(i), rs.getObject(i)); |
||||
|
} |
||||
|
list.add(rowData); |
||||
|
} |
||||
|
} catch (ClassNotFoundException e) { |
||||
|
log.warn(e.getMessage()); |
||||
|
} catch (SQLException throwables) { |
||||
|
log.error(throwables.getMessage()); |
||||
|
}finally { |
||||
|
if(rs!=null){ |
||||
|
try { |
||||
|
rs.close(); |
||||
|
} catch (SQLException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
if (stmt!=null){ |
||||
|
try { |
||||
|
stmt.close(); |
||||
|
} catch (SQLException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
if(conn!=null){ |
||||
|
try { |
||||
|
conn.close(); |
||||
|
} catch (SQLException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
rs = null; |
||||
|
stmt = null; |
||||
|
conn = null; |
||||
|
} |
||||
|
return list; |
||||
|
} |
||||
|
|
||||
|
private static void doSqlFilter(String sql){ |
||||
|
boolean unsafe = false; |
||||
|
String[] parts = sql.split(" "); |
||||
|
for (String part : parts) { |
||||
|
if(unsafe){ break; } |
||||
|
if(StringUtils.isEmpty(part)){ |
||||
|
continue; |
||||
|
} |
||||
|
part = part.trim(); |
||||
|
for (String filterWord : FILTER_WORD) { |
||||
|
if(part.equalsIgnoreCase(filterWord)){ |
||||
|
unsafe = true; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
if(unsafe){ |
||||
|
//AssertUtil.("非法SQL被拦截 ==> "+sql);
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import lombok.experimental.UtilityClass; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/8 |
||||
|
*/ |
||||
|
@UtilityClass |
||||
|
public class JumpToUtil { |
||||
|
|
||||
|
public static String getJumpUrl(String host, String templateCode, String targetId) { |
||||
|
return host + "/#/jump?jumpType=apiApproval" + |
||||
|
"&targetCode="+templateCode |
||||
|
+"&targetId="+targetId; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
package com.qs.serve.common.util; |
||||
|
|
||||
|
import com.qs.serve.common.framework.exception.BusinessException; |
||||
|
import lombok.experimental.UtilityClass; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.hibernate.validator.HibernateValidator; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
|
||||
|
import javax.validation.ConstraintViolation; |
||||
|
import javax.validation.Validation; |
||||
|
import javax.validation.Validator; |
||||
|
import javax.validation.ValidatorFactory; |
||||
|
import java.util.List; |
||||
|
import java.util.Set; |
||||
|
/** |
||||
|
* validate方法中校验工具类 |
||||
|
* <p> |
||||
|
* 只要在实体中加上相应的validate的相关注解即可 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author Zed |
||||
|
*/ |
||||
|
@UtilityClass |
||||
|
public class ValidateTools { |
||||
|
/** |
||||
|
* 初始化检查器 |
||||
|
*/ |
||||
|
private static final ValidatorFactory VALIDATOR_FACTORY = Validation.byProvider(HibernateValidator.class).configure().failFast(false).buildValidatorFactory(); |
||||
|
private static final Validator VALIDATOR = VALIDATOR_FACTORY.getValidator(); |
||||
|
/** |
||||
|
* 校验返回异常信息 |
||||
|
* |
||||
|
* @param t 实体 |
||||
|
* @param <T> 实体泛型 |
||||
|
*/ |
||||
|
public static <T> String validStr(T t) { |
||||
|
// 构造返回信息
|
||||
|
StringBuilder validMessage = new StringBuilder(); |
||||
|
// 检查实体T
|
||||
|
Set<ConstraintViolation<T>> set = VALIDATOR.validate(t); |
||||
|
// 循环set,获取检查结果
|
||||
|
for (ConstraintViolation<T> vo : set) { |
||||
|
validMessage.append(vo.getMessage()).append(";"); |
||||
|
} |
||||
|
return validMessage.toString(); |
||||
|
} |
||||
|
/** |
||||
|
* 校验实体抛出异常 |
||||
|
* |
||||
|
* @param t 实体 |
||||
|
* @param <T> 实体泛型 |
||||
|
*/ |
||||
|
public static <T> void valid(T t) { |
||||
|
String validStr = validStr(t); |
||||
|
// 抛出业务异常
|
||||
|
if (StringUtils.isNotBlank(validStr)) { |
||||
|
throw new BusinessException(validStr,500); |
||||
|
} |
||||
|
} |
||||
|
/** |
||||
|
* 校验集合抛出异常 |
||||
|
* |
||||
|
* @param list 列表 |
||||
|
* @param <T> 实体泛型 |
||||
|
*/ |
||||
|
public static <T> void valid(List<T> list) { |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
throw new BusinessException("数据不存在!",500); |
||||
|
} |
||||
|
// 构造返回信息
|
||||
|
StringBuilder validMessageTotal = new StringBuilder(); |
||||
|
// 遍历
|
||||
|
for (int i = 0; i < list.size(); i++) { |
||||
|
String validStr = validStr(list.get(i)); |
||||
|
if (StringUtils.isNotBlank(validStr)) { |
||||
|
String msg = String.format("第%d条数据校验结果:[%s]\n", i + 1, validStr); |
||||
|
validMessageTotal.append(msg); |
||||
|
} |
||||
|
} |
||||
|
// 抛出业务异常
|
||||
|
if (StringUtils.isNotBlank(validMessageTotal.toString())) { |
||||
|
throw new BusinessException(validMessageTotal.toString(),500); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.qs.serve.common.util.model; |
||||
|
|
||||
|
import com.fasterxml.jackson.core.JacksonException; |
||||
|
import com.fasterxml.jackson.core.JsonParser; |
||||
|
import com.fasterxml.jackson.databind.DeserializationContext; |
||||
|
import com.fasterxml.jackson.databind.JsonDeserializer; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.format.DateTimeFormatter; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/7/25 |
||||
|
*/ |
||||
|
public class QsJsonLocalDateTimeDeserializer extends JsonDeserializer<LocalDateTime> { |
||||
|
|
||||
|
final DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
||||
|
|
||||
|
@Override |
||||
|
public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JacksonException { |
||||
|
String val = jsonParser.getText(); |
||||
|
if (val==null||val.isEmpty()){ |
||||
|
return null; |
||||
|
} |
||||
|
return LocalDateTime.parse(val,df); |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.qs.serve.controller.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/8 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SyLoginParam { |
||||
|
|
||||
|
/** |
||||
|
* 模板编码 |
||||
|
*/ |
||||
|
private String templateCode; |
||||
|
|
||||
|
/** |
||||
|
* 表单data的exsp5字段值 |
||||
|
*/ |
||||
|
private String key; |
||||
|
|
||||
|
/** |
||||
|
* 致远员工id |
||||
|
*/ |
||||
|
private String syId; |
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
package com.qs.serve.controller.util; |
||||
|
|
||||
|
import com.qs.serve.modules.tbs.common.TbsSeeYonConst; |
||||
|
import lombok.experimental.UtilityClass; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/6/12 |
||||
|
*/ |
||||
|
@UtilityClass |
||||
|
public class SyKeyLoginUtil { |
||||
|
|
||||
|
/** |
||||
|
* 获取待审批详情 |
||||
|
* @param templateCode |
||||
|
* @param targetId |
||||
|
* @param affairId |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getPreCheckUrl(String templateCode,String targetId,String affairId){ |
||||
|
if(templateCode.equals(TbsSeeYonConst.CostApplyConf.Code()) |
||||
|
||templateCode.equals(TbsSeeYonConst.CostApplyContractConf.Code())){ |
||||
|
return "my-expense-application-approval-pending-detail?expenseApplicationId="+targetId+"&approvalId="+affairId; |
||||
|
} |
||||
|
|
||||
|
if(templateCode.equals(TbsSeeYonConst.CheckCostAgreeConf.Code())){ |
||||
|
return "my-expense-application-agreement-terms-approval-pending-detail?agreementTermsId="+targetId+"&approvalId="+affairId; |
||||
|
} |
||||
|
|
||||
|
// if(templateCode.equals(TbsSeeYonConst.CostCheckConf.Code())){
|
||||
|
// return "my-expense-application-activity-write-off-approval-pending-detail?" +
|
||||
|
// "expenseApplicationId=382658" + //费用id
|
||||
|
// "&writeOffId=1936474" + //核销id
|
||||
|
// "&activityId=2277848" + //活动id
|
||||
|
// "&approvalId="+affairId;
|
||||
|
// }
|
||||
|
if(templateCode.equals(TbsSeeYonConst.PolicyConf.Code())){ |
||||
|
return "my-policy-application-approval-pending-detail?policyApplicationId=" + targetId + |
||||
|
"&approvalId="+affairId; |
||||
|
} |
||||
|
return "404"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取核销待审批详情 |
||||
|
* @param costApplyId |
||||
|
* @param activityId |
||||
|
* @param verificationId |
||||
|
* @param affairId |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getPreCheckUrl4Verification(Long costApplyId, |
||||
|
Long activityId, |
||||
|
Long verificationId, |
||||
|
String affairId){ |
||||
|
return "my-expense-application-activity-write-off-approval-pending-detail?" + |
||||
|
"expenseApplicationId=" + costApplyId+ //费用id
|
||||
|
"&writeOffId=" + verificationId +//核销id
|
||||
|
"&activityId=" + activityId +//活动id
|
||||
|
"&approvalId="+affairId; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取已审批详情 |
||||
|
* @param templateCode |
||||
|
* @param targetId |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getCheckedDetailUrl(String templateCode,String targetId){ |
||||
|
if(templateCode.equals(TbsSeeYonConst.CostApplyConf.Code())){ |
||||
|
return "my-expense-application-approval-approved-detail?expenseApplicationId="+targetId |
||||
|
+"&approvalId=0"; |
||||
|
} |
||||
|
if(templateCode.equals(TbsSeeYonConst.PolicyConf.Code())){ |
||||
|
return "my-policy-application-approval-approved-detail?policyApplicationId=" + targetId + |
||||
|
"&approvalId=0"; |
||||
|
} |
||||
|
return "404"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取核销待审批详情 |
||||
|
* @param costApplyId |
||||
|
* @param activityId |
||||
|
* @param verificationId |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getCheckedDetailUrl4Verification(Long costApplyId, |
||||
|
Long activityId, |
||||
|
Long verificationId){ |
||||
|
return "my-expense-application-activity-write-off-approval-approved-detail?" + |
||||
|
"expenseApplicationId=" + costApplyId+ //费用id
|
||||
|
"&writeOffId=" + verificationId +//核销id
|
||||
|
"&activityId=" + activityId +//活动id
|
||||
|
"&approvalId=0"; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取个人申请详情 |
||||
|
* @param templateCode |
||||
|
* @param targetId |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getMyDetailUrl(String templateCode,String targetId){ |
||||
|
if(templateCode.equals(TbsSeeYonConst.CostApplyConf.Code())){ |
||||
|
return "my-expense-application-detail?id="+targetId; |
||||
|
} |
||||
|
if(templateCode.equals(TbsSeeYonConst.PolicyConf.Code())){ |
||||
|
return "my-policy-application-detail?id="+targetId; |
||||
|
} |
||||
|
return "404"; |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.qs.serve.modules.base; |
||||
|
|
||||
|
import cn.hutool.crypto.digest.DigestUtil; |
||||
|
import com.qs.serve.common.util.HttpUtil; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.io.UnsupportedEncodingException; |
||||
|
import java.net.URLEncoder; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2024/1/26 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class TianYiYunSmsService { |
||||
|
|
||||
|
private final String url = "http://sms.189ek.com/yktsms/send?"; |
||||
|
|
||||
|
@Value("${tianyi.sms.appid}") |
||||
|
private String appId; |
||||
|
|
||||
|
@Value("${tianyi.sms.appKey}") |
||||
|
private String appKey; |
||||
|
|
||||
|
public void send(String phone,String code){ |
||||
|
//需要发送的手机号(多个号码以英文逗号 “,”分隔) 一次性最多 100 个号码
|
||||
|
String mobiles = phone; |
||||
|
String content = "【嘉士利】验证码"+code; |
||||
|
String sign = DigestUtil.md5Hex(appId+mobiles+content+appKey); |
||||
|
try { |
||||
|
String msg = URLEncoder.encode(content,"utf-8"); |
||||
|
String params = "appid="+ appId + |
||||
|
"&mobile="+ mobiles + |
||||
|
"&msg=" + msg + |
||||
|
"&sign=" + sign + |
||||
|
"&extPort="; |
||||
|
String result = HttpUtil.doPost(url+params,"{}",null); |
||||
|
log.debug("sms result = > {}",result); |
||||
|
} catch (UnsupportedEncodingException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,122 @@ |
|||||
|
package com.qs.serve.modules.base.controller; |
||||
|
|
||||
|
import cn.hutool.crypto.SecureUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.SysLog; |
||||
|
import com.qs.serve.common.model.consts.GySysConst; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.model.enums.BizType; |
||||
|
import com.qs.serve.common.model.enums.SystemModule; |
||||
|
import com.qs.serve.common.util.AuthContextUtils; |
||||
|
import com.qs.serve.common.util.CopierUtil; |
||||
|
import com.qs.serve.common.util.ValidateTools; |
||||
|
import com.qs.serve.modules.bms.entity.bo.BmsSupplierBatchBo; |
||||
|
import com.qs.serve.modules.bms.mapper.BmsSupplierMapper; |
||||
|
import com.qs.serve.modules.bms.service.BmsSupplierService; |
||||
|
import com.qs.serve.modules.goods.entity.bo.GoodsSpuBatchTasteBo; |
||||
|
import com.qs.serve.modules.goods.service.GoodsSpuService; |
||||
|
import com.qs.serve.modules.sys.entity.SysUser; |
||||
|
import com.qs.serve.modules.sys.entity.bo.SysUserBatchBo; |
||||
|
import com.qs.serve.modules.sys.entity.bo.SysUserBo; |
||||
|
import com.qs.serve.modules.sys.service.SysRoleService; |
||||
|
import com.qs.serve.modules.sys.service.SysUserSalesService; |
||||
|
import com.qs.serve.modules.sys.service.SysUserService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
|
||||
|
/** |
||||
|
* 【嘉士利对接】 |
||||
|
* @author YenHex |
||||
|
* @since 2022/10/28 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
//@RestController
|
||||
|
//@RequestMapping("/jsl")
|
||||
|
public class JslApiController { |
||||
|
|
||||
|
private SysUserService sysUserService; |
||||
|
private SysRoleService sysRoleService; |
||||
|
private BmsSupplierService bmsSupplierService; |
||||
|
private SysUserSalesService sysUserSalesService; |
||||
|
private GoodsSpuService goodsSpuService; |
||||
|
|
||||
|
/** |
||||
|
* 客户档案 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/supplier/editBatch")
|
||||
|
//@SysLog(module = SystemModule.BASE, title = "供应商", biz = BizType.INSERT)
|
||||
|
@PreAuthorize("hasRole('bms:supplier:insert')") |
||||
|
public R<?> editBatch(@RequestBody @Valid BmsSupplierBatchBo param){ |
||||
|
bmsSupplierService.editBatch(param); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 业务员档案 |
||||
|
* @param batchBo |
||||
|
* @return |
||||
|
*/ |
||||
|
//@SysLog(title = "人员",desc = "用户新增",biz = BizType.INSERT)
|
||||
|
//@PostMapping("/user/editBatch")
|
||||
|
//@PreAuthorize("hasRole('sys:user:insert')")
|
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public R<?> saveBatch(@RequestBody @Valid SysUserBatchBo batchBo){ |
||||
|
for (SysUserBo userBo : batchBo.getUserList()) { |
||||
|
SysUser dbData = sysUserService.getById(userBo.getId()); |
||||
|
SysUser param = CopierUtil.copy(userBo,dbData==null?new SysUser():dbData); |
||||
|
//设置普通管理员
|
||||
|
param.setSuperFlag(0); |
||||
|
param.setTenantId(AuthContextUtils.getTenant()); |
||||
|
param.setAccount(param.getMobile()); |
||||
|
param.setPassword(SecureUtil.md5(GySysConst.DEFAULT_PASSWORD)); |
||||
|
if(param.getMobile()!=null){ |
||||
|
param.setAccount(param.getMobile()); |
||||
|
} |
||||
|
//检查手机号是否已用
|
||||
|
LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.ne(SysUser::getId,userBo.getId()); |
||||
|
wrapper.eq(SysUser::getMobile,param.getMobile()); |
||||
|
Long count = sysUserService.count(wrapper); |
||||
|
if(count>0L){ |
||||
|
return R.error("手机号已被注册"); |
||||
|
} |
||||
|
if(dbData == null){ |
||||
|
sysUserService.save(param); |
||||
|
}else { |
||||
|
sysUserService.updateById(param); |
||||
|
} |
||||
|
// if(param.getId()!=null&& com.qs.serve.common.util.CollectionUtil.isNotEmpty(userBo.getRoleIds())){
|
||||
|
// sysRoleService.saveUserRole4Edit(userBo.getRoleIds(),param.getId());
|
||||
|
// }
|
||||
|
} |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* (批量)编辑口味品类SPU,建议每次小于50条 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/saveBatchTasteSpu")
|
||||
|
//@SysLog(module = SystemModule.GOODS, title = "spu", biz = BizType.INSERT)
|
||||
|
//@PreAuthorize("hasRole('goods:spu:insert')")
|
||||
|
public R<?> saveBatchTasteSpu(@RequestBody GoodsSpuBatchTasteBo param){ |
||||
|
ValidateTools.valid(param.getTasteProducts()); |
||||
|
return R.ok(goodsSpuService.saveBatchTasteSpu(param)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.qs.serve.modules.baz.common; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2023/4/7 |
||||
|
*/ |
||||
|
public interface BazTargetTypeConsts { |
||||
|
|
||||
|
String POINT = "point"; |
||||
|
String CUSTOMER = "customer"; |
||||
|
|
||||
|
} |
@ -0,0 +1,148 @@ |
|||||
|
package com.qs.serve.modules.baz.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.SysLog; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.model.enums.BizType; |
||||
|
import com.qs.serve.common.model.enums.SystemModule; |
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import com.qs.serve.common.util.CopierUtil; |
||||
|
import com.qs.serve.common.util.StringUtils; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitFlow; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitFlowService; |
||||
|
import com.qs.serve.modules.bms.entity.BmsSupplierVisitForm; |
||||
|
import com.qs.serve.modules.bms.service.BmsSupplierVisitFormService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import com.qs.serve.modules.baz.entity.BazVisit; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitService; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 拜访模块 拜访 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("baz/visit") |
||||
|
public class BazVisitController { |
||||
|
|
||||
|
private BazVisitService bazVisitService; |
||||
|
|
||||
|
private BazVisitFlowService bazVisitFlowService; |
||||
|
|
||||
|
private BmsSupplierVisitFormService bmsSupplierVisitFormService; |
||||
|
|
||||
|
/** |
||||
|
* 列表 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list") |
||||
|
public R<List<BazVisit>> getList(BazVisit param){ |
||||
|
LambdaQueryWrapper<BazVisit> lqw = new LambdaQueryWrapper<>(param); |
||||
|
List<BazVisit> list = bazVisitService.list(lqw); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取第一个流程 |
||||
|
* @param visitId |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getFirstFlow/{visitId}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.QUERY) |
||||
|
public R<BazVisitFlow> getFirstFlow(@PathVariable("visitId") String visitId){ |
||||
|
LambdaQueryWrapper<BazVisitFlow> lqw = new LambdaQueryWrapper<>(); |
||||
|
lqw.eq(BazVisitFlow::getFlowSort,1); |
||||
|
lqw.eq(BazVisitFlow::getVisitId,visitId); |
||||
|
BazVisitFlow bazVisitFlow = bazVisitFlowService.getOne(lqw,false); |
||||
|
if(bazVisitFlow.getFormId()!=null&&!bazVisitFlow.getFormId().equals(0L)){ |
||||
|
BmsSupplierVisitForm visitForm = bmsSupplierVisitFormService.getById(bazVisitFlow.getFormId()); |
||||
|
bazVisitFlow.setFormInfo(visitForm); |
||||
|
}else { |
||||
|
bazVisitFlow.setFormId(null); |
||||
|
} |
||||
|
return R.ok(bazVisitFlow); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 翻页 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@GetMapping("/page")
|
||||
|
@PreAuthorize("hasRole('baz:visit:query')") |
||||
|
public R<PageVo<BazVisit>> getPage(BazVisit param){ |
||||
|
LambdaQueryWrapper<BazVisit> lqw = new LambdaQueryWrapper<>(param); |
||||
|
PageUtil.startPage(); |
||||
|
List<BazVisit> list = bazVisitService.list(lqw); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* ID查询 |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
//@GetMapping("/getById/{id}")
|
||||
|
//@SysLog(module = SystemModule.BAZ, title = "拜访", biz = BizType.QUERY)
|
||||
|
@PreAuthorize("hasRole('baz:visit:query')") |
||||
|
public R<BazVisit> getById(@PathVariable("id") String id){ |
||||
|
BazVisit bazVisit = bazVisitService.getById(id); |
||||
|
return R.ok(bazVisit); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 更新 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/updateById")
|
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访", biz = BizType.UPDATE) |
||||
|
@PreAuthorize("hasRole('baz:visit:update')") |
||||
|
public R<?> updateById(@RequestBody @Valid BazVisit param){ |
||||
|
boolean result = bazVisitService.updateById(param); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/save")
|
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访", biz = BizType.INSERT) |
||||
|
@PreAuthorize("hasRole('baz:visit:insert')") |
||||
|
public R<?> save(@RequestBody @Valid BazVisit param){ |
||||
|
boolean result = bazVisitService.save(param); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
//@DeleteMapping("/deleteById/{ids}")
|
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访", biz = BizType.DELETE) |
||||
|
@PreAuthorize("hasRole('baz:visit:delete')") |
||||
|
public R<?> deleteById(@PathVariable("ids") String ids){ |
||||
|
List<Long> idsLong = StringUtils.splitIdLong(ids); |
||||
|
boolean result = bazVisitService.removeByIds(idsLong); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,153 @@ |
|||||
|
package com.qs.serve.modules.baz.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.SysLog; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.model.enums.BizType; |
||||
|
import com.qs.serve.common.model.enums.SystemModule; |
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import com.qs.serve.common.util.CopierUtil; |
||||
|
import com.qs.serve.common.util.StringUtils; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitFlowSortBo; |
||||
|
import com.qs.serve.modules.bms.entity.BmsSupplierVisitForm; |
||||
|
import com.qs.serve.modules.bms.service.BmsSupplierVisitFormService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import com.qs.serve.modules.baz.entity.so.BazVisitFlowSo; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitFlowBo; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitFlow; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitFlowService; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.Comparator; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 拜访模块 拜访流程 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("baz/visitFlow") |
||||
|
public class BazVisitFlowController { |
||||
|
|
||||
|
private BazVisitFlowService bazVisitFlowService; |
||||
|
private BmsSupplierVisitFormService visitFormService; |
||||
|
|
||||
|
/** |
||||
|
* 列表 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list") |
||||
|
public R<List<BazVisitFlow>> getList(BazVisitFlowSo param){ |
||||
|
BazVisitFlow entity = CopierUtil.copy(param,new BazVisitFlow()); |
||||
|
LambdaQueryWrapper<BazVisitFlow> lqw = new LambdaQueryWrapper<>(entity); |
||||
|
lqw.orderByAsc(BazVisitFlow::getFlowSort); |
||||
|
List<BazVisitFlow> list = bazVisitFlowService.list(lqw); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 翻页 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/page") |
||||
|
public R<PageVo<BazVisitFlow>> getPage(BazVisitFlowSo param){ |
||||
|
BazVisitFlow entity = CopierUtil.copy(param,new BazVisitFlow()); |
||||
|
LambdaQueryWrapper<BazVisitFlow> lqw = new LambdaQueryWrapper<>(entity); |
||||
|
PageUtil.startPage(); |
||||
|
lqw.orderByAsc(BazVisitFlow::getFlowSort); |
||||
|
List<BazVisitFlow> list = bazVisitFlowService.list(lqw); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* ID查询 |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getById/{id}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.QUERY) |
||||
|
public R<BazVisitFlow> getById(@PathVariable("id") String id){ |
||||
|
BazVisitFlow bazVisitFlow = bazVisitFlowService.getById(id); |
||||
|
if(bazVisitFlow.getFormId()!=null&&!bazVisitFlow.getFormId().equals(0L)){ |
||||
|
BmsSupplierVisitForm visitForm = visitFormService.getById(bazVisitFlow.getFormId()); |
||||
|
bazVisitFlow.setFormInfo(visitForm); |
||||
|
}else { |
||||
|
bazVisitFlow.setFormId(null); |
||||
|
} |
||||
|
return R.ok(bazVisitFlow); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 更新 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/updateById") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.UPDATE) |
||||
|
public R<?> updateById(@RequestBody @Valid BazVisitFlowBo param){ |
||||
|
if(param.getId()==null){ |
||||
|
return R.error2(); |
||||
|
} |
||||
|
bazVisitFlowService.modify(param); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/save") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.INSERT) |
||||
|
public R<?> save(@RequestBody @Valid BazVisitFlowBo param){ |
||||
|
param.setId(null); |
||||
|
BazVisitFlow visitFlow = bazVisitFlowService.modify(param); |
||||
|
return R.ok(visitFlow); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 更新排序 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/sort") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.INSERT) |
||||
|
public R<?> sort(@RequestBody @Valid BazVisitFlowSortBo param){ |
||||
|
List<BazVisitFlowSortBo.Item> items = param.getSortValues(); |
||||
|
items.sort(Comparator.comparingInt(BazVisitFlowSortBo.Item::getSortValue)); |
||||
|
for (int i = 0; i < items.size(); i++) { |
||||
|
BazVisitFlowSortBo.Item item = items.get(i); |
||||
|
BazVisitFlow visitFlow = new BazVisitFlow(); |
||||
|
visitFlow.setId(item.getId()); |
||||
|
visitFlow.setFlowSort(i+1); |
||||
|
bazVisitFlowService.updateById(visitFlow); |
||||
|
} |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@DeleteMapping("/deleteById/{ids}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访流程", biz = BizType.DELETE) |
||||
|
public R<?> deleteById(@PathVariable("ids") String ids){ |
||||
|
List<Long> idsLong = StringUtils.splitIdLong(ids); |
||||
|
boolean result = bazVisitFlowService.removeByIds(idsLong); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,146 @@ |
|||||
|
package com.qs.serve.modules.baz.controller; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.SysLog; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.model.enums.BizType; |
||||
|
import com.qs.serve.common.model.enums.SystemModule; |
||||
|
import com.qs.serve.common.util.AuthContextUtils; |
||||
|
import com.qs.serve.common.util.PageUtil; |
||||
|
import com.qs.serve.common.util.CopierUtil; |
||||
|
import com.qs.serve.common.util.StringUtils; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInstanceFlow; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitInstanceFlowService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import com.qs.serve.modules.baz.entity.so.BazVisitInstanceSo; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInstance; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitInstanceService; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 拜访模块 拜访实例 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("baz/visitInstance") |
||||
|
public class BazVisitInstanceController { |
||||
|
|
||||
|
private BazVisitInstanceService bazVisitInstanceService; |
||||
|
private BazVisitInstanceFlowService bazVisitInstanceFlowService; |
||||
|
|
||||
|
/** |
||||
|
* 翻页 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/page") |
||||
|
public R<PageVo<BazVisitInstance>> getPage(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance query = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryStartDate().atStartOfDay()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
PageUtil.startPage(); |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.selectBazVisitInstanceList(query); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 列表 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list") |
||||
|
public R<List<BazVisitInstance>> getList(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance query = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryStartDate().atStartOfDay()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.selectBazVisitInstanceList(query); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* ID查询 |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getById/{id}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.QUERY) |
||||
|
public R<BazVisitInstance> getById(@PathVariable("id") String id){ |
||||
|
BazVisitInstance bazVisitInstance = bazVisitInstanceService.getById(id); |
||||
|
LambdaQueryWrapper<BazVisitInstanceFlow> lqw = new LambdaQueryWrapper<>(); |
||||
|
lqw.eq(BazVisitInstanceFlow::getVisitInstanceId,id); |
||||
|
List<BazVisitInstanceFlow> flowList = bazVisitInstanceFlowService.list(lqw); |
||||
|
bazVisitInstance.setFlowList(flowList); |
||||
|
return R.ok(bazVisitInstance); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* ID查询(流程项) |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getByFlowId/{id}") |
||||
|
public R<BazVisitInstanceFlow> getByFlowId(@PathVariable("id") String id){ |
||||
|
BazVisitInstanceFlow instanceFlow = bazVisitInstanceFlowService.getById(id); |
||||
|
BazVisitInstance visitInstance = bazVisitInstanceService.getById(instanceFlow.getVisitInstanceId()); |
||||
|
instanceFlow.setInstanceMainInfo(visitInstance); |
||||
|
return R.ok(instanceFlow); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 更新 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/updateById")
|
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.UPDATE) |
||||
|
public R<?> updateById(@RequestBody @Valid BazVisitInstance param){ |
||||
|
boolean result = bazVisitInstanceService.updateById(param); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
//@PostMapping("/save")
|
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.INSERT) |
||||
|
public R<?> save(@RequestBody @Valid BazVisitInstance param){ |
||||
|
boolean result = bazVisitInstanceService.save(param); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@DeleteMapping("/deleteById/{ids}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.DELETE) |
||||
|
public R<?> deleteById(@PathVariable("ids") String ids){ |
||||
|
List<Long> idsLong = StringUtils.splitIdLong(ids); |
||||
|
boolean result = bazVisitInstanceService.removeByIds(idsLong); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,231 @@ |
|||||
|
package com.qs.serve.modules.baz.controller.my; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.qs.serve.common.model.annotation.SysLog; |
||||
|
import com.qs.serve.common.model.dto.PageVo; |
||||
|
import com.qs.serve.common.model.dto.R; |
||||
|
import com.qs.serve.common.model.enums.BizType; |
||||
|
import com.qs.serve.common.model.enums.SystemModule; |
||||
|
import com.qs.serve.common.util.*; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisit; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInstance; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazCreateVisitInstanceBo; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitInstanceFlowBo; |
||||
|
import com.qs.serve.modules.baz.entity.so.BazVisitInstanceSo; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitInstanceService; |
||||
|
import com.qs.serve.modules.baz.service.BazVisitService; |
||||
|
import com.qs.serve.modules.sys.service.SysPostService; |
||||
|
import com.qs.serve.modules.sys.service.SysPostUserService; |
||||
|
import com.qs.serve.modules.sys.service.SysUserSalesService; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
import java.time.LocalDate; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 拜访模块 拜访实例(我的) |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@AllArgsConstructor |
||||
|
@RestController |
||||
|
@RequestMapping("baz/myVisitInstance") |
||||
|
public class BazMyVisitInstanceController { |
||||
|
|
||||
|
private BazVisitInstanceService bazVisitInstanceService; |
||||
|
private BazVisitService visitService; |
||||
|
private SysPostUserService postUserService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 翻页 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/page") |
||||
|
public R<PageVo<BazVisitInstance>> getPage(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance entity = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
LambdaQueryWrapper<BazVisitInstance> lqw = new LambdaQueryWrapper<>(entity); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
lqw.ge(BazVisitInstance::getCreateTime,param.getQueryStartDate()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
lqw.le(BazVisitInstance::getCreateTime,param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
PageUtil.startPage(); |
||||
|
lqw.eq(BazVisitInstance::getVisitorId, AuthContextUtils.getSysUserId()); |
||||
|
lqw.orderByDesc(BazVisitInstance::getCreateTime); |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.list(lqw); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 翻页(我的部下) |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/page4Under") |
||||
|
public R<PageVo<BazVisitInstance>> page4Under(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance entity = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
LambdaQueryWrapper<BazVisitInstance> lqw = new LambdaQueryWrapper<>(entity); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
lqw.ge(BazVisitInstance::getCreateTime,param.getQueryStartDate()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
lqw.le(BazVisitInstance::getCreateTime,param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
List<String> userIds = postUserService.listByChildIds(AuthContextUtils.getSysUserId()); |
||||
|
if(userIds.size()<1){ |
||||
|
return R.byEmptyList(); |
||||
|
} |
||||
|
String userId = AuthContextUtils.getSysUserId(); |
||||
|
PageUtil.startPage(); |
||||
|
lqw.in(BazVisitInstance::getVisitorId, userIds); |
||||
|
lqw.ne(BazVisitInstance::getVisitorId,userId); |
||||
|
lqw.orderByDesc(BazVisitInstance::getCreateTime); |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.list(lqw); |
||||
|
return R.byPageHelperList(list); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 列表 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list") |
||||
|
public R<List<BazVisitInstance>> getList(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance query = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryStartDate().atStartOfDay()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
param.setVisitorId(AuthContextUtils.getSysUserId()); |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.selectBazVisitInstanceList(query); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 列表(我的部下) |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/list4Under") |
||||
|
public R<List<BazVisitInstance>> list4Under(BazVisitInstanceSo param){ |
||||
|
BazVisitInstance query = CopierUtil.copy(param,new BazVisitInstance()); |
||||
|
if(param.getQueryStartDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryStartDate().atStartOfDay()); |
||||
|
} |
||||
|
if(param.getQueryEndDate()!=null){ |
||||
|
query.setQueryEndDate(param.getQueryEndDate().atTime(23,59,59)); |
||||
|
} |
||||
|
List<String> userIds = postUserService.listByChildIds(AuthContextUtils.getSysUserId()); |
||||
|
if(userIds.size()<1){ |
||||
|
return R.ok(); |
||||
|
} |
||||
|
String userId = AuthContextUtils.getSysUserId(); |
||||
|
PageUtil.startPage(); |
||||
|
query.setQueryUserIds(userIds); |
||||
|
query.setIgnoreUserId(userId); |
||||
|
List<BazVisitInstance> list = bazVisitInstanceService.selectBazVisitInstanceList(query); |
||||
|
return R.ok(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取用户未完成拜访数量 |
||||
|
* @param visitId 拜访id |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/getCounter") |
||||
|
public R<?> getPage(Long visitId){ |
||||
|
LambdaQueryWrapper<BazVisitInstance> lqw = new LambdaQueryWrapper<>(); |
||||
|
lqw.eq(BazVisitInstance::getVisitId,visitId); |
||||
|
lqw.eq(BazVisitInstance::getVisitorId,AuthContextUtils.getSysUserId()); |
||||
|
lqw.eq(BazVisitInstance::getVisitState,0); |
||||
|
long unFinished = bazVisitInstanceService.count(lqw); |
||||
|
Map<String,Object> map = new HashMap<>(); |
||||
|
map.put("unFinished",unFinished); |
||||
|
return R.ok(map,"ok"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 统计创建数量(用于判断当天是否提交) |
||||
|
* @param visitId |
||||
|
* @param targetId |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("/countCreate") |
||||
|
public R<?> getPage(String visitId,String targetId){ |
||||
|
BazVisit bazVisit = visitService.getById(visitId); |
||||
|
LambdaQueryWrapper<BazVisitInstance> limitVisitLqw = new LambdaQueryWrapper<>(); |
||||
|
limitVisitLqw.eq(BazVisitInstance::getVisitorId,AuthContextUtils.getSysUserId()); |
||||
|
limitVisitLqw.eq(BazVisitInstance::getTargetType,bazVisit.getTargetType()); |
||||
|
limitVisitLqw.eq(BazVisitInstance::getTargetId,targetId); |
||||
|
limitVisitLqw.ge(BazVisitInstance::getCreateTime, LocalDate.now()); |
||||
|
long count = bazVisitInstanceService.count(limitVisitLqw); |
||||
|
return R.ok(count); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 创建流程 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/create") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.INSERT) |
||||
|
public R<BazVisitInstance> save(@RequestBody @Valid BazCreateVisitInstanceBo param){ |
||||
|
BazVisitInstance result = bazVisitInstanceService.create(param); |
||||
|
return R.ok(result); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 提交流程 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/submitFlow") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.INSERT) |
||||
|
public R<BazVisitInstance> save(@RequestBody @Valid BazVisitInstanceFlowBo param){ |
||||
|
bazVisitInstanceService.submit(param); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 完成流程 |
||||
|
* @param id |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("/finished/{instanceId}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.INSERT) |
||||
|
public R<BazVisitInstance> finished(@PathVariable("instanceId")Long id){ |
||||
|
bazVisitInstanceService.finished(id); |
||||
|
return R.ok(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
@DeleteMapping("/deleteById/{ids}") |
||||
|
@SysLog(module = SystemModule.BAZ, title = "拜访实例", biz = BizType.DELETE) |
||||
|
public R<?> deleteById(@PathVariable("ids") String ids){ |
||||
|
List<Long> idsLong = StringUtils.splitIdLong(ids); |
||||
|
LambdaQueryWrapper<BazVisitInstance> lqw = new LambdaQueryWrapper<>(); |
||||
|
lqw.in(BazVisitInstance::getId,idsLong); |
||||
|
lqw.eq(BazVisitInstance::getVisitorId, AuthContextUtils.getSysUserId()); |
||||
|
boolean result = bazVisitInstanceService.remove(lqw); |
||||
|
return R.isTrue(result); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,95 @@ |
|||||
|
package com.qs.serve.modules.baz.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("baz_visit") |
||||
|
public class BazVisit implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 拜访名称 */ |
||||
|
@NotBlank(message = "拜访名称不能为空") |
||||
|
@Length(max = 255,message = "拜访名称长度不能超过255字") |
||||
|
private String visitName; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
@NotBlank(message = "目标类型不能为空") |
||||
|
@Length(max = 255,message = "目标类型长度不能超过255字") |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
|
||||
|
public static BazVisit toNewObject(BazVisit source){ |
||||
|
BazVisit visit = new BazVisit(); |
||||
|
visit.setId(source.getId()); |
||||
|
visit.setVisitName(source.getVisitName()); |
||||
|
visit.setTargetType(source.getTargetType()); |
||||
|
visit.setRemark(source.getRemark()); |
||||
|
visit.setCreateTime(source.getCreateTime()); |
||||
|
visit.setUpdateTime(source.getUpdateTime()); |
||||
|
visit.setTenantId(source.getTenantId()); |
||||
|
visit.setDelFlag(source.getDelFlag()); |
||||
|
visit.setCreateBy(source.getCreateBy()); |
||||
|
visit.setUpdateBy(source.getUpdateBy()); |
||||
|
return visit; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,125 @@ |
|||||
|
package com.qs.serve.modules.baz.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitFlowBo; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访流程 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("baz_visit_flow") |
||||
|
public class BazVisitFlow implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 拜访id */ |
||||
|
@NotNull(message = "拜访id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 拜访名称 */ |
||||
|
private String visitName; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
@NotBlank(message = "目标类型不能为空") |
||||
|
@Length(max = 255,message = "目标类型长度不能超过255字") |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 流程名称 */ |
||||
|
@NotBlank(message = "流程名称不能为空") |
||||
|
@Length(max = 255,message = "流程名称长度不能超过255字") |
||||
|
private String flowTitle; |
||||
|
|
||||
|
/** 排序 */ |
||||
|
private Integer flowSort; |
||||
|
|
||||
|
/** 业务类型:0-普通;1->签到;2-签退;3->小结 */ |
||||
|
private Integer flowBizType; |
||||
|
|
||||
|
/** 是否可忽略 */ |
||||
|
@NotNull(message = "是否可忽略不能为空") |
||||
|
private Integer ignoreFlag; |
||||
|
|
||||
|
/** 是否定位 */ |
||||
|
@NotNull(message = "是否定位不能为空") |
||||
|
private Integer positionState; |
||||
|
|
||||
|
/** 是否拍照 */ |
||||
|
@NotNull(message = "是否拍照不能为空") |
||||
|
private Integer photoState; |
||||
|
|
||||
|
/** 表单id (0表示空值)*/ |
||||
|
@NotNull(message = "表单id不能为空") |
||||
|
private Long formId; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private Object formInfo; |
||||
|
|
||||
|
public static BazVisitFlow toNewObject(BazVisitFlowBo source){ |
||||
|
BazVisitFlow visitFlow = new BazVisitFlow(); |
||||
|
visitFlow.setId(source.getId()); |
||||
|
visitFlow.setVisitId(source.getVisitId()); |
||||
|
visitFlow.setFlowTitle(source.getFlowTitle()); |
||||
|
visitFlow.setIgnoreFlag(source.getIgnoreFlag()); |
||||
|
visitFlow.setPositionState(source.getPositionState()); |
||||
|
visitFlow.setPhotoState(source.getPhotoState()); |
||||
|
visitFlow.setFormId(source.getFormId()); |
||||
|
visitFlow.setRemark(source.getRemark()); |
||||
|
return visitFlow; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,119 @@ |
|||||
|
package com.qs.serve.modules.baz.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 供应商拜访信息 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-10 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("baz_visit_info") |
||||
|
public class BazVisitInfo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 访问id */ |
||||
|
@NotNull(message = "访问id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
@NotBlank(message = "目标类型不能为空") |
||||
|
@Length(max = 255,message = "目标类型长度不能超过255字") |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
@NotNull(message = "目标id不能为空") |
||||
|
private String targetId; |
||||
|
|
||||
|
private String userId; |
||||
|
|
||||
|
/** 拜访次数 */ |
||||
|
@NotNull(message = "拜访次数不能为空") |
||||
|
private Integer visitCount; |
||||
|
|
||||
|
/** 上次拜访时间 */ |
||||
|
@Length(max = 0,message = "上次拜访时间长度不能超过0字") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime lastVisitTime; |
||||
|
|
||||
|
/** 计划下一次拜访时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
||||
|
private LocalDate nextVisitDate; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
|
||||
|
public static BazVisitInfo toNewObject(BazVisitInfo source){ |
||||
|
BazVisitInfo visitInfo = new BazVisitInfo(); |
||||
|
visitInfo.setId(source.getId()); |
||||
|
visitInfo.setVisitId(source.getVisitId()); |
||||
|
visitInfo.setTargetType(source.getTargetType()); |
||||
|
visitInfo.setTargetId(source.getTargetId()); |
||||
|
visitInfo.setVisitCount(source.getVisitCount()); |
||||
|
visitInfo.setLastVisitTime(source.getLastVisitTime()); |
||||
|
visitInfo.setNextVisitDate(source.getNextVisitDate()); |
||||
|
visitInfo.setRemark(source.getRemark()); |
||||
|
visitInfo.setCreateTime(source.getCreateTime()); |
||||
|
visitInfo.setUpdateTime(source.getUpdateTime()); |
||||
|
visitInfo.setTenantId(source.getTenantId()); |
||||
|
visitInfo.setDelFlag(source.getDelFlag()); |
||||
|
visitInfo.setCreateBy(source.getCreateBy()); |
||||
|
visitInfo.setUpdateBy(source.getUpdateBy()); |
||||
|
return visitInfo; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,193 @@ |
|||||
|
package com.qs.serve.modules.baz.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.qs.serve.common.model.dto.TargetDTO; |
||||
|
import com.qs.serve.modules.sys.entity.SysUser; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName("baz_visit_instance") |
||||
|
public class BazVisitInstance implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 标题 */ |
||||
|
@NotBlank(message = "标题不能为空") |
||||
|
@Length(max = 255,message = "标题长度不能超过255字") |
||||
|
private String title; |
||||
|
|
||||
|
/** 拜访类型id */ |
||||
|
@NotNull(message = "拜访类型id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
@NotBlank(message = "目标类型不能为空") |
||||
|
@Length(max = 255,message = "目标类型长度不能超过255字") |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 拜访状态:0-进行中;1-完成 */ |
||||
|
@NotNull(message = "拜访状态:0-进行中;1-完成不能为空") |
||||
|
private Integer visitState; |
||||
|
|
||||
|
/** 拜访人id */ |
||||
|
@NotBlank(message = "拜访人id不能为空") |
||||
|
@Length(max = 255,message = "拜访人id长度不能超过255字") |
||||
|
private String visitorId; |
||||
|
|
||||
|
/** 拜访人编码 */ |
||||
|
@NotBlank(message = "拜访人编码不能为空") |
||||
|
@Length(max = 255,message = "拜访人编码长度不能超过255字") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String visitorCode; |
||||
|
|
||||
|
/** 拜访人 */ |
||||
|
@NotBlank(message = "拜访人不能为空") |
||||
|
@Length(max = 255,message = "拜访人长度不能超过255字") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String visitorName; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
@NotBlank(message = "目标id不能为空") |
||||
|
@Length(max = 255,message = "目标id长度不能超过255字") |
||||
|
private String targetId; |
||||
|
|
||||
|
/** 目标i编码 */ |
||||
|
@Length(max = 255,message = "目标i编码长度不能超过255字") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 目标名称 */ |
||||
|
@NotBlank(message = "目标名称不能为空") |
||||
|
@Length(max = 255,message = "目标名称长度不能超过255字") |
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String targetName; |
||||
|
|
||||
|
private String targetLocalX; |
||||
|
private String targetLocalY; |
||||
|
private String targetAddress; |
||||
|
private String targetMapAddress; |
||||
|
|
||||
|
/** 遗失定位标识 */ |
||||
|
private Integer missLocalFlag; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime finishedTime; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
@TableField(condition = SqlCondition.LIKE) |
||||
|
private String positionStatusContent; |
||||
|
|
||||
|
private String positionStatus; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private List<?> flowList; |
||||
|
|
||||
|
/** 拜访小结 */ |
||||
|
@TableField(exist = false) |
||||
|
private String summary; |
||||
|
|
||||
|
/** 签到时间 */ |
||||
|
@TableField(exist = false) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime signTime; |
||||
|
|
||||
|
/** 签退时间 */ |
||||
|
@TableField(exist = false) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime outTime; |
||||
|
|
||||
|
/** 查询开始时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
||||
|
@TableField(exist = false) |
||||
|
private LocalDateTime queryStartDate; |
||||
|
|
||||
|
/** 查询结束时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
||||
|
@TableField(exist = false) |
||||
|
private LocalDateTime queryEndDate; |
||||
|
|
||||
|
/** 查询用户ID */ |
||||
|
@TableField(exist = false) |
||||
|
private List<String> queryUserIds; |
||||
|
|
||||
|
/** 忽略的用户ID */ |
||||
|
@TableField(exist = false) |
||||
|
private String ignoreUserId; |
||||
|
|
||||
|
public static BazVisitInstance toNewObject(BazVisit source, TargetDTO targetDTO, SysUser sysUser){ |
||||
|
BazVisitInstance visitInstance = new BazVisitInstance(); |
||||
|
//visitInstance.setTitle(source.getTitle());
|
||||
|
visitInstance.setVisitId(source.getId()); |
||||
|
visitInstance.setTargetType(source.getTargetType()); |
||||
|
visitInstance.setVisitState(0); |
||||
|
visitInstance.setVisitorId(sysUser.getId()); |
||||
|
visitInstance.setVisitorCode(sysUser.getCode()); |
||||
|
visitInstance.setVisitorName(sysUser.getName()); |
||||
|
visitInstance.setTargetId(targetDTO.getTargetId()); |
||||
|
visitInstance.setTargetCode(targetDTO.getTargetCode()); |
||||
|
visitInstance.setTargetName(targetDTO.getTargetName()); |
||||
|
visitInstance.setRemark(source.getRemark()); |
||||
|
return visitInstance; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,212 @@ |
|||||
|
package com.qs.serve.modules.baz.entity; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.*; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler; |
||||
|
import com.qs.serve.common.model.dto.TargetDTO; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitInstanceFlowBo; |
||||
|
import com.qs.serve.modules.sys.entity.SysUser; |
||||
|
import lombok.Data; |
||||
|
import org.apache.ibatis.type.JdbcType; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例流程 实体类 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
@TableName(value = "baz_visit_instance_flow",autoResultMap = true) |
||||
|
public class BazVisitInstanceFlow implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
@TableId(type = IdType.AUTO) |
||||
|
private Long id; |
||||
|
|
||||
|
/** 拜访实例id */ |
||||
|
@NotNull(message = "拜访实例id不能为空") |
||||
|
private Long visitInstanceId; |
||||
|
|
||||
|
/** 拜访id */ |
||||
|
@NotNull(message = "拜访id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
@NotBlank(message = "目标类型不能为空") |
||||
|
@Length(max = 255,message = "目标类型长度不能超过255字") |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
@NotBlank(message = "目标id不能为空") |
||||
|
@Length(max = 255,message = "目标id长度不能超过255字") |
||||
|
private String targetId; |
||||
|
|
||||
|
/** 目标编码 */ |
||||
|
@Length(max = 255,message = "目标编码长度不能超过255字") |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 目标名称 */ |
||||
|
@NotBlank(message = "目标名称不能为空") |
||||
|
@Length(max = 255,message = "目标名称长度不能超过255字") |
||||
|
private String targetName; |
||||
|
|
||||
|
/** 目标地址id */ |
||||
|
@Length(max = 255,message = "目标地址id长度不能超过255字") |
||||
|
private String targetAddressId; |
||||
|
|
||||
|
/** 流程名称 */ |
||||
|
@NotBlank(message = "流程名称不能为空") |
||||
|
@Length(max = 255,message = "流程名称长度不能超过255字") |
||||
|
private String flowTitle; |
||||
|
|
||||
|
/** 业务类型:0-普通;1->签到;2-签退;3->小结 */ |
||||
|
private Integer flowBizType; |
||||
|
|
||||
|
/** 排序 */ |
||||
|
private Integer flowSort; |
||||
|
|
||||
|
/** 状态:0-进行中;1-完成;2-跳过 */ |
||||
|
private Integer flowState; |
||||
|
|
||||
|
/** 是否可忽略当前流程 */ |
||||
|
private Integer ignoreFlag; |
||||
|
|
||||
|
/** 是否定位 */ |
||||
|
private Integer positionState; |
||||
|
|
||||
|
/** 是否拍照 */ |
||||
|
private Integer photoState; |
||||
|
|
||||
|
/** 表单id(0表示空值) */ |
||||
|
private Long formId; |
||||
|
|
||||
|
/** 表单Json */ |
||||
|
@Length(max = 0,message = "表单Json长度不能超过0字") |
||||
|
private String formJson; |
||||
|
|
||||
|
/** 输入值 */ |
||||
|
@Length(max = 255,message = "输入值长度不能超过255字") |
||||
|
private String valInputValue; |
||||
|
|
||||
|
/** 地图地址 */ |
||||
|
private String mapAddress; |
||||
|
|
||||
|
/** 纬度 */ |
||||
|
@Length(max = 255,message = "纬度长度不能超过255字") |
||||
|
private String valLocalX; |
||||
|
|
||||
|
/** 经度 */ |
||||
|
@Length(max = 255,message = "经度长度不能超过255字") |
||||
|
private String valLocalY; |
||||
|
|
||||
|
/** 拍照图片地址 */ |
||||
|
@TableField(typeHandler = SplitStringTypeHandler.class,jdbcType= JdbcType.VARCHAR) |
||||
|
private String[] valPhotoUrls; |
||||
|
|
||||
|
/** 表单填写json */ |
||||
|
@Length(max = 0,message = "表单填写json长度不能超过0字") |
||||
|
private String valFormValue; |
||||
|
|
||||
|
/** 拜访人id */ |
||||
|
@NotBlank(message = "拜访人id不能为空") |
||||
|
@Length(max = 255,message = "拜访人id长度不能超过255字") |
||||
|
private String visitorId; |
||||
|
|
||||
|
/** 拜访人编码 */ |
||||
|
@NotBlank(message = "拜访人编码不能为空") |
||||
|
@Length(max = 255,message = "拜访人编码长度不能超过255字") |
||||
|
private String visitorCode; |
||||
|
|
||||
|
/** 拜访人 */ |
||||
|
@NotBlank(message = "拜访人不能为空") |
||||
|
@Length(max = 255,message = "拜访人长度不能超过255字") |
||||
|
private String visitorName; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
private LocalDateTime submitTime; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private LocalDateTime createTime; |
||||
|
|
||||
|
/** 最后更新时间 */ |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private LocalDateTime updateTime; |
||||
|
|
||||
|
/** 所属租户 */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 逻辑删除标记(0:显示;1:隐藏) */ |
||||
|
@JsonIgnore |
||||
|
@JsonProperty |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String createBy; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@TableField(fill = FieldFill.UPDATE) |
||||
|
private String updateBy; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private Object instanceMainInfo; |
||||
|
|
||||
|
public static BazVisitInstanceFlow toNewObject(BazVisitFlow source, TargetDTO targetDTO, SysUser user){ |
||||
|
BazVisitInstanceFlow visitInstanceFlow = new BazVisitInstanceFlow(); |
||||
|
visitInstanceFlow.setVisitId(source.getVisitId()); |
||||
|
visitInstanceFlow.setTargetType(source.getTargetType()); |
||||
|
visitInstanceFlow.setTargetId(targetDTO.getTargetId()); |
||||
|
visitInstanceFlow.setTargetCode(targetDTO.getTargetCode()); |
||||
|
visitInstanceFlow.setTargetName(targetDTO.getTargetName()); |
||||
|
visitInstanceFlow.setFlowTitle(source.getFlowTitle()); |
||||
|
visitInstanceFlow.setFlowBizType(source.getFlowBizType()); |
||||
|
visitInstanceFlow.setFlowSort(source.getFlowSort()); |
||||
|
visitInstanceFlow.setIgnoreFlag(source.getIgnoreFlag()); |
||||
|
visitInstanceFlow.setPositionState(source.getPositionState()); |
||||
|
visitInstanceFlow.setPhotoState(source.getPhotoState()); |
||||
|
visitInstanceFlow.setFormId(source.getFormId()); |
||||
|
visitInstanceFlow.setVisitorId(user.getId()); |
||||
|
visitInstanceFlow.setVisitorCode(user.getCode()); |
||||
|
visitInstanceFlow.setVisitorName(user.getName()); |
||||
|
return visitInstanceFlow; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public void initInputValues(BazVisitInstanceFlowBo source){ |
||||
|
this.setTargetAddressId(source.getTargetAddressId()); |
||||
|
//this.setFormJson(source.getFormJson());
|
||||
|
this.setValInputValue(source.getValInputValue()); |
||||
|
this.setValLocalX(source.getValLocalX()); |
||||
|
this.setValLocalY(source.getValLocalY()); |
||||
|
this.setValPhotoUrls(source.getValPhotoUrls()); |
||||
|
this.setValFormValue(source.getValFormValue()); |
||||
|
this.setMapAddress(source.getMapAddress()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,41 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.bo; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例 Bo |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazCreateVisitInstanceBo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 拜访类型id */ |
||||
|
@NotNull(message = "拜访类型id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
@NotBlank(message = "目标id不能为空") |
||||
|
@Length(max = 255,message = "目标id长度不能超过255字") |
||||
|
private String targetId; |
||||
|
|
||||
|
/** 首次提交信息对象 */ |
||||
|
private BazVisitInstanceFlowBo firstFlowSubmit; |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,69 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.bo; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访流程 Bo |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitFlowBo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 拜访id 值:1-> 网点打开 */ |
||||
|
@NotNull(message = "拜访id不能为空") |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 流程名称 */ |
||||
|
@NotBlank(message = "流程名称不能为空") |
||||
|
@Length(max = 255,message = "流程名称长度不能超过255字") |
||||
|
private String flowTitle; |
||||
|
|
||||
|
/** 排序 */ |
||||
|
@NotNull(message = "排序不能为空") |
||||
|
private Integer flowSort; |
||||
|
|
||||
|
/** 业务类型:0-普通;1->签到;2-签退;3->小结 */ |
||||
|
@NotNull(message = "排序不能为空") |
||||
|
private Integer flowBizType; |
||||
|
|
||||
|
/** 是否可忽略 */ |
||||
|
@NotNull(message = "是否可忽略不能为空") |
||||
|
private Integer ignoreFlag; |
||||
|
|
||||
|
/** 是否定位 */ |
||||
|
@NotNull(message = "是否定位不能为空") |
||||
|
private Integer positionState; |
||||
|
|
||||
|
/** 是否拍照 */ |
||||
|
@NotNull(message = "是否拍照不能为空") |
||||
|
private Integer photoState; |
||||
|
|
||||
|
/** 表单id */ |
||||
|
private Long formId; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,30 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.bo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
/** |
||||
|
* 拜访流程 Bo |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitFlowSortBo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
private List<Item> sortValues; |
||||
|
|
||||
|
@Data |
||||
|
public static class Item{ |
||||
|
Integer sortValue; |
||||
|
Long id; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,61 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.bo; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例流程 Bo |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitInstanceFlowBo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 实例的流程id(首次提交可忽略) */ |
||||
|
@NotNull(message = "拜访实例id不能为空") |
||||
|
private Long instanceFlowId; |
||||
|
|
||||
|
/** 目标地址id(用不上可忽略) */ |
||||
|
@Length(max = 255,message = "目标地址id长度不能超过255字") |
||||
|
private String targetAddressId; |
||||
|
|
||||
|
/** 输入值(用不上可忽略) */ |
||||
|
private String valInputValue; |
||||
|
|
||||
|
/** 地图地址 */ |
||||
|
private String mapAddress; |
||||
|
|
||||
|
/** 纬度 */ |
||||
|
@Length(max = 255,message = "纬度长度不能超过255字") |
||||
|
private String valLocalX; |
||||
|
|
||||
|
/** 经度 */ |
||||
|
@Length(max = 255,message = "经度长度不能超过255字") |
||||
|
private String valLocalY; |
||||
|
|
||||
|
/** 拍照图片地址 */ |
||||
|
private String[] valPhotoUrls; |
||||
|
|
||||
|
/** 表单填写json */ |
||||
|
private String valFormValue; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
@Length(max = 255,message = "备注长度不能超过255字") |
||||
|
private String remark; |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,57 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.so; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访流程 查询参数 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitFlowSo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 拜访id */ |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标类型 */ |
||||
|
private String targetType; |
||||
|
|
||||
|
/** 流程名称 */ |
||||
|
private String flowTitle; |
||||
|
|
||||
|
/** 排序 */ |
||||
|
private Integer flowSort; |
||||
|
|
||||
|
/** 是否可忽略 */ |
||||
|
private Integer ignoreFlag; |
||||
|
|
||||
|
/** 是否定位 */ |
||||
|
private Integer positionState; |
||||
|
|
||||
|
/** 是否拍照 */ |
||||
|
private Integer photoState; |
||||
|
|
||||
|
/** 表单id */ |
||||
|
private Long formId; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
private String remark; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,90 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.so; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例流程 查询参数 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitInstanceFlowSo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 拜访实例id */ |
||||
|
private Long visitInstanceId; |
||||
|
|
||||
|
/** 拜访id */ |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
private String targetId; |
||||
|
|
||||
|
/** 目标编码 */ |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 目标名称 */ |
||||
|
private String targetName; |
||||
|
|
||||
|
/** 目标地址id */ |
||||
|
private String targetAddressId; |
||||
|
|
||||
|
/** 流程名称 */ |
||||
|
private String flowTitle; |
||||
|
|
||||
|
/** 排序 */ |
||||
|
private Integer flowSort; |
||||
|
|
||||
|
/** 是否可忽略当前流程 */ |
||||
|
private Integer ignoreFlag; |
||||
|
|
||||
|
/** 是否定位 */ |
||||
|
private Integer positionState; |
||||
|
|
||||
|
/** 是否拍照 */ |
||||
|
private Integer photoState; |
||||
|
|
||||
|
/** 表单id(0表示空值) */ |
||||
|
private Long formId; |
||||
|
|
||||
|
/** 表单Json */ |
||||
|
private String formJson; |
||||
|
|
||||
|
/** 输入值 */ |
||||
|
private String valInputValue; |
||||
|
|
||||
|
/** 纬度 */ |
||||
|
private String valLocalX; |
||||
|
|
||||
|
/** 经度 */ |
||||
|
private String valLocalY; |
||||
|
|
||||
|
/** 拍照图片地址 */ |
||||
|
private String valPhotoUrls; |
||||
|
|
||||
|
/** 表单填写json */ |
||||
|
private String valFormValue; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
private String remark; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,74 @@ |
|||||
|
package com.qs.serve.modules.baz.entity.so; |
||||
|
|
||||
|
import java.time.LocalDate; |
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.time.LocalDateTime; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例 查询参数 |
||||
|
* @author YenHex |
||||
|
* @since 2023-04-07 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BazVisitInstanceSo implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** id */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 标题 */ |
||||
|
private String title; |
||||
|
|
||||
|
/** 拜访类型id */ |
||||
|
private Long visitId; |
||||
|
|
||||
|
/** 拜访状态:0-进行中;1-完成 */ |
||||
|
private Integer visitState; |
||||
|
|
||||
|
/** 拜访人id */ |
||||
|
private String visitorId; |
||||
|
|
||||
|
/** 拜访人编码 */ |
||||
|
private String visitorCode; |
||||
|
|
||||
|
/** 拜访人 */ |
||||
|
private String visitorName; |
||||
|
|
||||
|
/** 目标id */ |
||||
|
private String targetId; |
||||
|
|
||||
|
/** 目标i编码 */ |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 目标名称 */ |
||||
|
private String targetName; |
||||
|
|
||||
|
/** 遗失定位标识 */ |
||||
|
private Integer missLocalFlag; |
||||
|
|
||||
|
private String summary; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
||||
|
private LocalDate queryStartDate; |
||||
|
|
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
||||
|
private LocalDate queryEndDate; |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.baz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitFlow; |
||||
|
|
||||
|
/** |
||||
|
* 拜访流程 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-07 |
||||
|
*/ |
||||
|
public interface BazVisitFlowMapper extends BaseMapper<BazVisitFlow> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.baz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInfo; |
||||
|
|
||||
|
/** |
||||
|
* 供应商拜访信息 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-10 |
||||
|
*/ |
||||
|
public interface BazVisitInfoMapper extends BaseMapper<BazVisitInfo> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.baz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInstanceFlow; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例流程 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-07 |
||||
|
*/ |
||||
|
public interface BazVisitInstanceFlowMapper extends BaseMapper<BazVisitInstanceFlow> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,19 @@ |
|||||
|
package com.qs.serve.modules.baz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitInstance; |
||||
|
import com.qs.serve.modules.baz.entity.so.BazVisitInstanceSo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 拜访实例 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-07 |
||||
|
*/ |
||||
|
public interface BazVisitInstanceMapper extends BaseMapper<BazVisitInstance> { |
||||
|
|
||||
|
List<BazVisitInstance> selectBazVisitInstanceList(@Param("query") BazVisitInstance param); |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
package com.qs.serve.modules.baz.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisit; |
||||
|
|
||||
|
/** |
||||
|
* 拜访 Mapper |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-07 |
||||
|
*/ |
||||
|
public interface BazVisitMapper extends BaseMapper<BazVisit> { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
package com.qs.serve.modules.baz.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.qs.serve.modules.baz.entity.BazVisitFlow; |
||||
|
import com.qs.serve.modules.baz.entity.bo.BazVisitFlowBo; |
||||
|
|
||||
|
/** |
||||
|
* 拜访流程 服务接口 |
||||
|
* @author YenHex |
||||
|
* @date 2023-04-07 |
||||
|
*/ |
||||
|
public interface BazVisitFlowService extends IService<BazVisitFlow> { |
||||
|
|
||||
|
BazVisitFlow modify(BazVisitFlowBo param); |
||||
|
|
||||
|
} |
||||
|
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue