Merge branch 'master' into cc_20250623_desk
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author su'zh
|
||||||
|
* 审批操作类型枚举
|
||||||
|
*/
|
||||||
|
public enum AuditOperationTypeEnum {
|
||||||
|
/**
|
||||||
|
* 申请操作
|
||||||
|
*/
|
||||||
|
APPLY(1, "申请"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批通过
|
||||||
|
*/
|
||||||
|
APPROVE(2, "审批成功"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批拒绝
|
||||||
|
*/
|
||||||
|
REJECT(3, "审批失败");
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
AuditOperationTypeEnum(Integer code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static AuditOperationTypeEnum getByCode(Integer code) {
|
||||||
|
for (AuditOperationTypeEnum value : values()) {
|
||||||
|
if (value.getCode().equals(code)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,9 @@ public enum AuditStatusEnum {
|
|||||||
|
|
||||||
TODO(0, "待处理"),
|
TODO(0, "待处理"),
|
||||||
PASS(1, "通过"),
|
PASS(1, "通过"),
|
||||||
REJECT(2, "拒绝");
|
REJECT(2, "拒绝"),
|
||||||
|
cancel(3, "取消资格"),;
|
||||||
|
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ package com.cool.store.enums;
|
|||||||
public enum ContentSubjectEnum {
|
public enum ContentSubjectEnum {
|
||||||
HY_CULTURE("沪姨文化"),
|
HY_CULTURE("沪姨文化"),
|
||||||
PARTNER_SAYS("加盟商说"),
|
PARTNER_SAYS("加盟商说"),
|
||||||
BRAND_NEWS("品牌动态")
|
BRAND_NEWS("品牌动态"),
|
||||||
|
MINI_PRE_FRIED("小程序预炸产品")
|
||||||
;
|
;
|
||||||
|
|
||||||
private String subjectName;
|
private String subjectName;
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ public enum ErrorCodeEnum {
|
|||||||
SHOP_HAVE_NOT_OVER_ACCORDING(1511014,"该加盟商下有未结束跟进的门店,请先结束门店",null),
|
SHOP_HAVE_NOT_OVER_ACCORDING(1511014,"该加盟商下有未结束跟进的门店,请先结束门店",null),
|
||||||
MOBILE_NOT_EXIST(151016,"手机号不存在,请先维护手机号!",null),
|
MOBILE_NOT_EXIST(151016,"手机号不存在,请先维护手机号!",null),
|
||||||
|
|
||||||
|
IS_EXIST_CLAIM(1511018,"存在已认领的账单,不能删除门店",null),
|
||||||
API_CALL_ERROR(1511020,"接口调用错误",null),
|
API_CALL_ERROR(1511020,"接口调用错误",null),
|
||||||
ADD_PAY_INFO_FAIL(1511021,"添加缴费信息失败",null),
|
ADD_PAY_INFO_FAIL(1511021,"添加缴费信息失败",null),
|
||||||
UPDATE_ERROR(1511022,"修改信息失败",null),
|
UPDATE_ERROR(1511022,"修改信息失败",null),
|
||||||
@@ -275,6 +276,13 @@ public enum ErrorCodeEnum {
|
|||||||
XGJ_COLLECTION_STATUS_COMPLETE(1511027,"新管家收费状态已完成,请确认!",null),
|
XGJ_COLLECTION_STATUS_COMPLETE(1511027,"新管家收费状态已完成,请确认!",null),
|
||||||
PAY_AMOUNT_ERROR(1511028,"缴费金额不能大于未缴金额",null),
|
PAY_AMOUNT_ERROR(1511028,"缴费金额不能大于未缴金额",null),
|
||||||
|
|
||||||
|
|
||||||
|
PRE_FRY_PRODUCT_NOT_EXIST(1511029,"预炸品不存在",null),
|
||||||
|
PRE_FRY_RECORD_EXIST(1511030,"当前门店已存在同类型预炸资质申请记录",null),
|
||||||
|
PRE_FRY_APPLY_NOT_EXIST(1511030,"预炸资质申请信息不存在",null),
|
||||||
|
CURRENT_STAGE_NOT_OPERATION(1511030,"当前有更优选择,请确认!",null),
|
||||||
|
PRODUCTS_STATUS(1511031,"包含下架的产品,请重新选择后提交!",null),
|
||||||
|
PRODUCTS_CODE_EXIST(1511032,"产品编码已存在!",null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸产品申请类型枚举
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 16:01
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum PreFryApplyTypeEnum {
|
||||||
|
HAS_REFRIGERATED_DISPLAY(1, "有冷藏展示柜"),
|
||||||
|
HAS_NORMAL_DISPLAY(2, "有常温展示柜"),
|
||||||
|
NO_DISPLAY(3, "无展示柜");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
PreFryApplyTypeEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static PreFryApplyTypeEnum getByCode(int code) {
|
||||||
|
for (PreFryApplyTypeEnum type : values()) {
|
||||||
|
if (type.code == code) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescriptionByCode(int code) {
|
||||||
|
PreFryApplyTypeEnum type = getByCode(code);
|
||||||
|
return type != null ? type.description : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 15:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum PreFryStageEnum {
|
||||||
|
PRE_FRY_COMPLETED(1, "预炸完成"),
|
||||||
|
STORED_IN_DISPLAY_CABINET(2, "存入展示柜"),
|
||||||
|
STORED_IN_FRIDGE(3, "放入冰箱"),
|
||||||
|
TAKEN_OUT_NEXT_DAY(4, "次日拿出"),
|
||||||
|
DISCARDED(5, "报废");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
PreFryStageEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static PreFryStageEnum getByCode(int code) {
|
||||||
|
for (PreFryStageEnum stage : values()) {
|
||||||
|
if (stage.code == code) {
|
||||||
|
return stage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescriptionByCode(int code) {
|
||||||
|
PreFryStageEnum stage = getByCode(code);
|
||||||
|
return stage != null ? stage.description : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/24 10:46
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ViolationEnum {
|
||||||
|
|
||||||
|
COOLING_TIME_EXCEEDED(1, "冷却时间小于15分钟或大于25分钟未放入冷藏柜"),
|
||||||
|
STORAGE_TIME_EXCEEDED(2, "冰箱内取出时间距离预炸完成时间超过24小时"),;
|
||||||
|
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String description;
|
||||||
|
|
||||||
|
ViolationEnum(int code, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static ViolationEnum getByCode(int code) {
|
||||||
|
for (ViolationEnum violation : values()) {
|
||||||
|
if (violation.code == code) {
|
||||||
|
return violation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescriptionByCode(int code) {
|
||||||
|
ViolationEnum violation = getByCode(code);
|
||||||
|
return violation != null ? violation.description : "";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -168,4 +168,12 @@ public class CoolDateUtils {
|
|||||||
|
|
||||||
return lastMonthSameDay.format(getDateFormatter(DATE_FORMAT_DAY));
|
return lastMonthSameDay.format(getDateFormatter(DATE_FORMAT_DAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static long getMinutesBetween(Date startDate, Date endDate) {
|
||||||
|
Instant start = startDate.toInstant();
|
||||||
|
Instant end = endDate.toInstant();
|
||||||
|
Duration duration = Duration.between(start, end);
|
||||||
|
return duration.toMinutes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.cool.store.mapper.PreFriedProductsMapper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:11
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFriedProductsDAO {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsMapper preFriedProductsMapper;
|
||||||
|
|
||||||
|
public int createProduct(PreFriedProductsDO preFriedProductsDO){
|
||||||
|
return preFriedProductsMapper.insertSelective(preFriedProductsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateProduct(PreFriedProductsDO product) {
|
||||||
|
return preFriedProductsMapper.forceUpdate(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFriedProductsDO> selectByProductIds( List<Long> productIds) {
|
||||||
|
if (CollectionUtils.isEmpty(productIds)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.selectByProductIds(productIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PreFriedProductsDO queryById(Long id){
|
||||||
|
return preFriedProductsMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreFriedProductsDO queryByProductCode(String productCode){
|
||||||
|
if (StringUtils.isEmpty(productCode)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.queryByProductCode(productCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFriedProductsDO> selectByCondition(String productCode, String productName, Integer status){
|
||||||
|
return preFriedProductsMapper.selectByCondition(productCode,productName,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除(带业务校验)
|
||||||
|
*/
|
||||||
|
public int batchDeleteProducts(List<Long> ids, String userId) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.batchDelete(ids,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
*/
|
||||||
|
public int batchUpdateProductStatus(List<Long> ids, Integer status, String userId) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.batchUpdateStatus(ids, status,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int forceUpdate(PreFriedProductsDO preFriedProductsDO, String userId) {
|
||||||
|
if (preFriedProductsDO!=null&&preFriedProductsDO.getId()!=null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return preFriedProductsMapper.forceUpdate(preFriedProductsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFryApprovalRecordsMapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:12
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryApprovalRecordsDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryApprovalRecordsMapper preFryApprovalRecordsMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int createApprovalRecord(PreFryApprovalRecordsDO preFryApprovalRecordsDO) {
|
||||||
|
return preFryApprovalRecordsMapper.insertSelective(preFryApprovalRecordsDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询申请的所有审批记录(按时间正序)
|
||||||
|
*/
|
||||||
|
public List<PreFryApprovalRecordsDO> getRecordsByApplyId(Long applyId) {
|
||||||
|
if (applyId == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryApprovalRecordsMapper.selectByApplyId(applyId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFryQualificationApplyMapper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:12
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryQualificationApplyDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyMapper preFryQualificationApplyMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询资质申请
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PreFryQualificationApplyDO queryById(Long id) {
|
||||||
|
//校验ID不为空
|
||||||
|
if (id == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增资质申请
|
||||||
|
* @param preFryQualificationApplyDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int createQualificationApply(PreFryQualificationApplyDO preFryQualificationApplyDO) {
|
||||||
|
return preFryQualificationApplyMapper.insertSelective(preFryQualificationApplyDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制修改资质申请 非空置为空
|
||||||
|
* @param preFryQualificationApplyDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateForce(PreFryQualificationApplyDO preFryQualificationApplyDO) {
|
||||||
|
return preFryQualificationApplyMapper.updateForce(preFryQualificationApplyDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询申请记录列表
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录列表
|
||||||
|
*/
|
||||||
|
public List<PreFryQualificationApplyDO> listByStoreCode(String storeCode) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.listByStoreCode(storeCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PreFryQualificationApplyDO selectByStoreCodeAndType(String storeCode, Integer applyType) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)|| applyType==null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectByStoreCodeAndType(storeCode,applyType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定门店applyType最小的申请记录
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录
|
||||||
|
*/
|
||||||
|
public PreFryQualificationApplyDO getMinApplyTypeByStoreCode(String storeCode) {
|
||||||
|
// 参数校验
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED, "门店编码不能为空");
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.selectMinApplyTypeByStoreCode(storeCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ApplyManagementDTO> selectApplyManagementList(ApplyManagementQueryDTO query) {
|
||||||
|
return preFryQualificationApplyMapper.selectApplyManagementList(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApplyDetailDTO getApplyDetail(Long id) {
|
||||||
|
if (id==null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
return preFryQualificationApplyMapper.getDetail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.dto.pre.fry.DailyFryCountDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryRecordQueryDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryRecordsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ViolationDTO;
|
||||||
|
import com.cool.store.entity.PreFryRecordsDO;
|
||||||
|
import com.cool.store.mapper.PreFryRecordsMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryRecordsDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PreFryRecordsMapper preFryRecordsMapper;
|
||||||
|
|
||||||
|
public int insert(PreFryRecordsDO record) {
|
||||||
|
if (Objects.isNull(record)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public int batchInsert(List<PreFryRecordsDO> records) {
|
||||||
|
if (CollectionUtils.isEmpty(records)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.batchInsert(records);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public PreFryRecordsDO queryById(Long id) {
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFryRecordsDO> queryByIds(List<Long> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.selectByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int batchUpdateStageByIds( List<Long> ids,
|
||||||
|
Integer currentStage){
|
||||||
|
if (CollectionUtils.isEmpty(ids)) {
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.batchUpdateStageByIds(ids,currentStage);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFryRecordsDO> selectByStoreAndDateStage(String storeCode,
|
||||||
|
Integer applyType, String queryDate){
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.selectByStoreAndDateStage(storeCode,applyType,queryDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DailyFryCountDTO> selectDailyFryCountInCurrentMonth(String storeCode,Long time) {
|
||||||
|
if (StringUtils.isEmpty(storeCode)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return preFryRecordsMapper.selectDailyFryCountInCurrentMonth(storeCode,time);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<PreFryRecordsDTO> selectByQueryDTO(PreFryRecordQueryDTO dto) {
|
||||||
|
return preFryRecordsMapper.selectByQueryDTO(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void batchUpdateViolation(List<ViolationDTO> violationList) {
|
||||||
|
if (CollectionUtils.isEmpty(violationList)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
preFryRecordsMapper.batchUpdateViolation(violationList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryStageImagesDTO;
|
||||||
|
import com.cool.store.entity.PreFryStageChangesDO;
|
||||||
|
import com.cool.store.mapper.PreFryStageChangesMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PreFryStageChangesDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryStageChangesMapper preFryStageChangesMapper;
|
||||||
|
|
||||||
|
public int batchInsert(List<PreFryStageChangesDO> records){
|
||||||
|
if (CollectionUtils.isEmpty(records)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return preFryStageChangesMapper.batchInsert(records);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<PreFryStageImagesDTO> selectByRecordId( Long recordId){
|
||||||
|
if (recordId == null){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return preFryStageChangesMapper.selectByRecordId(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PreFryStageImagesDTO> selectByRecordIdList( List<Long> recordIdList){
|
||||||
|
if (recordIdList == null){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return preFryStageChangesMapper.selectByRecordIdList(recordIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFriedProductsMapper extends Mapper<PreFriedProductsDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询预炸产品
|
||||||
|
* @param productCode 产品编码模糊查询
|
||||||
|
* @param productName 产品名称模糊查询
|
||||||
|
* @param status 上下架状态(0下架 1上架)
|
||||||
|
* @return 产品列表
|
||||||
|
*/
|
||||||
|
List<PreFriedProductsDO> selectByCondition(
|
||||||
|
@Param("productCode") String productCode,
|
||||||
|
@Param("productName") String productName,
|
||||||
|
@Param("status") Integer status);
|
||||||
|
|
||||||
|
|
||||||
|
PreFriedProductsDO queryByProductCode(@Param("productCode") String productCode);
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param ids 产品ID列表
|
||||||
|
* @param userId 操作人ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchDelete(@Param("ids") List<Long> ids,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
* @param ids 产品ID列表
|
||||||
|
* @param status 目标状态(0下架 1上架)
|
||||||
|
* @param userId 操作人ID
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int batchUpdateStatus(@Param("ids") List<Long> ids,
|
||||||
|
@Param("status") Integer status,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数据
|
||||||
|
* @param product
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int forceUpdate(@Param("product") PreFriedProductsDO product);
|
||||||
|
|
||||||
|
List<PreFriedProductsDO> selectByProductIds(@Param("productIds") List<Long> productIds);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryApprovalRecordsMapper extends Mapper<PreFryApprovalRecordsDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请ID查询审批记录(按创建时间正序)
|
||||||
|
* @param applyId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryApprovalRecordsDO> selectByApplyId(@Param("applyId") Long applyId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ApplyManagementQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryQualificationApplyMapper extends Mapper<PreFryQualificationApplyDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制修改
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateForce(PreFryQualificationApplyDO entity);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryQualificationApplyDO> listByStoreCode(@Param("storeCode") String storeCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码查询与申请类型查询
|
||||||
|
* @param storeCode
|
||||||
|
* @param applyType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PreFryQualificationApplyDO selectByStoreCodeAndType(@Param("storeCode") String storeCode,
|
||||||
|
@Param("applyType") Integer applyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定门店applyType最小的申请记录
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
* @return 申请记录
|
||||||
|
*/
|
||||||
|
PreFryQualificationApplyDO selectMinApplyTypeByStoreCode(@Param("storeCode") String storeCode);
|
||||||
|
|
||||||
|
|
||||||
|
List<ApplyManagementDTO> selectApplyManagementList(ApplyManagementQueryDTO query);
|
||||||
|
|
||||||
|
|
||||||
|
ApplyDetailDTO getDetail(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.DailyFryCountDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryRecordQueryDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryRecordsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.ViolationDTO;
|
||||||
|
import com.cool.store.entity.PreFryRecordsDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryRecordsMapper extends Mapper<PreFryRecordsDO> {
|
||||||
|
|
||||||
|
int batchInsert(List<PreFryRecordsDO> records);
|
||||||
|
|
||||||
|
int batchUpdateStageByIds(@Param("ids") List<Long> ids,
|
||||||
|
@Param("currentStage") Integer currentStage);
|
||||||
|
|
||||||
|
List<PreFryRecordsDO> selectByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
List<PreFryRecordsDO> selectByStoreAndDateStage(
|
||||||
|
@Param("storeCode") String storeCode,
|
||||||
|
@Param("applyType") Integer applyType,
|
||||||
|
@Param("queryDate") String queryDate);
|
||||||
|
|
||||||
|
|
||||||
|
List<DailyFryCountDTO> selectDailyFryCountInCurrentMonth(@Param("storeCode") String storeCode,@Param("time") Long time);
|
||||||
|
|
||||||
|
|
||||||
|
List<PreFryRecordsDTO> selectByQueryDTO(@Param("query") PreFryRecordQueryDTO dto);
|
||||||
|
|
||||||
|
void batchUpdateViolation(@Param("list") List<ViolationDTO> violationList);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.PreFryStageImagesDTO;
|
||||||
|
import com.cool.store.entity.PreFryStageChangesDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface PreFryStageChangesMapper extends Mapper<PreFryStageChangesDO> {
|
||||||
|
|
||||||
|
|
||||||
|
int batchInsert(List<PreFryStageChangesDO> records);
|
||||||
|
|
||||||
|
List<PreFryStageImagesDTO> selectByRecordId(@Param("recordId") Long recordId);
|
||||||
|
|
||||||
|
List<PreFryStageImagesDTO> selectByRecordIdList(@Param("recordIdList") List<Long> recordIdList);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
and update_time <= #{endTime}
|
and update_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
and subject != 'MINI_PRE_FRIED'
|
||||||
order by update_time desc
|
order by update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PreFriedProductsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFriedProductsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="product_code" jdbcType="VARCHAR" property="productCode" />
|
||||||
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||||||
|
<result column="product_image" jdbcType="VARCHAR" property="productImage" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="sort_order" jdbcType="INTEGER" property="sortOrder" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
<result column="created_user_id" jdbcType="VARCHAR" property="createdUserId" />
|
||||||
|
<result column="updated_User_id" jdbcType="VARCHAR" property="updatedUserId" />
|
||||||
|
<result column="deleted" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByCondition" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fried_products where deleted = 0
|
||||||
|
<!-- 产品编码模糊查询 -->
|
||||||
|
<if test="productCode != null and productCode != ''">
|
||||||
|
AND product_code LIKE CONCAT('%', #{productCode}, '%')
|
||||||
|
</if>
|
||||||
|
<!-- 产品名称模糊查询 -->
|
||||||
|
<if test="productName != null and productName != ''">
|
||||||
|
AND product_name LIKE CONCAT('%', #{productName}, '%')
|
||||||
|
</if>
|
||||||
|
<!-- 上下架状态(注意字段类型是 BIT) -->
|
||||||
|
<if test="status != null">
|
||||||
|
AND status = #{status}
|
||||||
|
</if>
|
||||||
|
<!-- 默认按创建时间倒序 -->
|
||||||
|
ORDER BY sort_order DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryByProductCode" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fried_products
|
||||||
|
where deleted = 0
|
||||||
|
<if test="productCode != null and productCode != ''">
|
||||||
|
AND product_code = #{productCode}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<delete id="batchDelete">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET deleted = 1,
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{userId}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="batchUpdateStatus">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET status = #{status},
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{userId}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="selectByProductIds" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fried_products
|
||||||
|
where id IN
|
||||||
|
<foreach collection="productIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="forceUpdate">
|
||||||
|
UPDATE xfsg_pre_fried_products
|
||||||
|
SET
|
||||||
|
product_code = #{product.productCode},
|
||||||
|
product_name = #{product.productName},
|
||||||
|
product_image = #{product.productImage},
|
||||||
|
status = #{product.status},
|
||||||
|
sort_order = #{product.sortOrder},
|
||||||
|
updated_time = NOW(),
|
||||||
|
updated_user_id = #{product.updatedUserId}
|
||||||
|
WHERE id = #{product.id}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PreFryApprovalRecordsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryApprovalRecordsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="apply_id" jdbcType="BIGINT" property="applyId" />
|
||||||
|
<result column="record_type" jdbcType="TINYINT" property="recordType" />
|
||||||
|
<result column="operation_status" jdbcType="TINYINT" property="operationStatus" />
|
||||||
|
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 根据申请ID查询审批记录 -->
|
||||||
|
<select id="selectByApplyId" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_approval_records
|
||||||
|
WHERE apply_id = #{applyId}
|
||||||
|
ORDER BY created_time ASC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PreFryQualificationApplyMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryQualificationApplyDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="apply_code" jdbcType="VARCHAR" property="applyCode" />
|
||||||
|
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||||
|
<result column="apply_type" jdbcType="TINYINT" property="applyType" />
|
||||||
|
<result column="refrigerator_photo" jdbcType="VARCHAR" property="refrigeratorPhoto" />
|
||||||
|
<result column="refrigerator_plate_photo" jdbcType="VARCHAR" property="refrigeratorPlatePhoto" />
|
||||||
|
<result column="protective_cover_photo" jdbcType="VARCHAR" property="protectiveCoverPhoto" />
|
||||||
|
<result column="cold_storage_box_photo" jdbcType="VARCHAR" property="coldStorageBoxPhoto" />
|
||||||
|
<result column="audit_status" jdbcType="TINYINT" property="auditStatus" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
<result column="created_user_id" jdbcType="VARCHAR" property="createdUserId" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateForce" parameterType="com.cool.store.entity.PreFryQualificationApplyDO">
|
||||||
|
UPDATE xfsg_pre_fry_qualification_apply
|
||||||
|
SET store_code = #{storeCode},
|
||||||
|
apply_type = #{applyType},
|
||||||
|
refrigerator_photo = #{refrigeratorPhoto},
|
||||||
|
refrigerator_plate_photo = #{refrigeratorPlatePhoto},
|
||||||
|
protective_cover_photo = #{protectiveCoverPhoto},
|
||||||
|
cold_storage_box_photo = #{coldStorageBoxPhoto},
|
||||||
|
audit_status = #{auditStatus},
|
||||||
|
updated_time = NOW()
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="listByStoreCode" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByStoreCodeAndType" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode} and apply_type = #{applyType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectMinApplyTypeByStoreCode" resultMap="BaseResultMap">
|
||||||
|
SELECT *
|
||||||
|
FROM xfsg_pre_fry_qualification_apply
|
||||||
|
WHERE store_code = #{storeCode} and audit_status = 1
|
||||||
|
ORDER BY apply_type ASC
|
||||||
|
LIMIT 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectApplyManagementList" resultType="com.cool.store.dto.pre.fry.ApplyManagementDTO">
|
||||||
|
SELECT
|
||||||
|
a.id AS id,
|
||||||
|
a.store_code AS storeCode,
|
||||||
|
b.store_name AS storeName,
|
||||||
|
a.apply_code AS applyCode,
|
||||||
|
a.apply_type AS applyType,
|
||||||
|
a.created_user_id AS createUserId,
|
||||||
|
c.username AS createUserName,
|
||||||
|
c.mobile AS createUserMobile,
|
||||||
|
a.created_time AS createTime,
|
||||||
|
a.audit_status AS auditStatus
|
||||||
|
FROM
|
||||||
|
xfsg_pre_fry_qualification_apply a
|
||||||
|
LEFT JOIN store_${enterpriseId} b ON a.store_code = b.store_num
|
||||||
|
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||||
|
<where>
|
||||||
|
<if test="applyCode !=null and applyCode != ''">
|
||||||
|
and a.apply_code LIKE CONCAT('%', #{applyCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="storeCode != null and storeCode != ''">
|
||||||
|
AND a.store_code LIKE CONCAT('%', #{storeCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="storeName != null and storeName != ''">
|
||||||
|
AND b.store_name LIKE CONCAT('%', #{storeName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="createUserName != null and createUserName != ''">
|
||||||
|
AND c.username LIKE CONCAT('%', #{createUserName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="createUserMobile != null and createUserMobile != ''">
|
||||||
|
AND c.mobile LIKE CONCAT('%', #{createUserMobile}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="auditStatus != null">
|
||||||
|
AND a.audit_status = #{auditStatus}
|
||||||
|
</if>
|
||||||
|
<if test="applyType != null">
|
||||||
|
AND a.apply_type = #{applyType}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeStart != null">
|
||||||
|
AND a.created_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null">
|
||||||
|
AND a.created_time <![CDATA[<=]]> #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY a.created_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetail" resultType="com.cool.store.dto.pre.fry.ApplyDetailDTO">
|
||||||
|
SELECT
|
||||||
|
a.id AS id,
|
||||||
|
a.store_code AS storeCode,
|
||||||
|
a.refrigerator_photo as refrigeratorPhoto,
|
||||||
|
a.refrigerator_plate_photo AS refrigeratorPlatePhoto,
|
||||||
|
a.protective_cover_photo AS protectiveCoverPhoto,
|
||||||
|
a.cold_storage_box_photo AS coldStorageBoxPhoto,
|
||||||
|
b.store_name AS storeName,
|
||||||
|
a.apply_code AS applyCode,
|
||||||
|
a.apply_type AS applyType,
|
||||||
|
a.created_user_id AS createUserId,
|
||||||
|
c.username AS createUserName,
|
||||||
|
c.mobile AS createUserMobile,
|
||||||
|
a.created_time AS createTime,
|
||||||
|
a.audit_status AS auditStatus
|
||||||
|
FROM
|
||||||
|
xfsg_pre_fry_qualification_apply a
|
||||||
|
LEFT JOIN store_${enterpriseId} b ON a.store_code = b.store_num
|
||||||
|
LEFT JOIN xfsg_line_info c ON c.partner_id = a.created_user_id
|
||||||
|
where a.id= #{id}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PreFryRecordsMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryRecordsDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||||
|
<result column="product_id" jdbcType="INTEGER" property="productId" />
|
||||||
|
<result column="record_code" jdbcType="VARCHAR" property="recordCode" />
|
||||||
|
<result column="fry_date" jdbcType="DATE" property="fryDate" />
|
||||||
|
<result column="fry_complete_time" jdbcType="TIMESTAMP" property="fryCompleteTime" />
|
||||||
|
<result column="latest_sale_time" jdbcType="TIMESTAMP" property="latestSaleTime" />
|
||||||
|
<result column="current_stage" jdbcType="TINYINT" property="currentStage" />
|
||||||
|
<result column="current_apply_type" jdbcType="TINYINT" property="currentApplyType" />
|
||||||
|
<result column="violation_flag" jdbcType="TINYINT" property="violationFlag" />
|
||||||
|
<result column="violation_reason" jdbcType="VARCHAR" property="violationReason" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO xfsg_pre_fry_records
|
||||||
|
(store_code, product_code, fry_date, fry_complete_time,
|
||||||
|
latest_sale_time, current_stage, current_apply_type, created_time, updated_time)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.storeCode}, #{item.productCode}, #{item.fryDate},
|
||||||
|
#{item.fryCompleteTime}, #{item.latestSaleTime}, #{item.currentStage},#{item.currentApplyType},
|
||||||
|
NOW(), NOW())
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="batchUpdateStageByIds">
|
||||||
|
UPDATE xfsg_pre_fry_records
|
||||||
|
SET current_stage = #{currentStage},
|
||||||
|
updated_time = NOW()
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="selectByIds" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fry_records
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
ORDER BY created_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByStoreAndDateStage" resultMap="BaseResultMap">
|
||||||
|
SELECT * FROM xfsg_pre_fry_records
|
||||||
|
WHERE store_code = #{storeCode} and current_apply_type = #{applyType}
|
||||||
|
AND ( (fry_date = DATE_SUB(#{queryDate}, INTERVAL 1 DAY) AND current_stage IN (3,4,5))
|
||||||
|
OR (fry_date = #{queryDate}))
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDailyFryCountInCurrentMonth" resultType="com.cool.store.dto.pre.fry.DailyFryCountDTO">
|
||||||
|
SELECT
|
||||||
|
fry_date as fryDate,
|
||||||
|
COUNT(*) as count
|
||||||
|
FROM xfsg_pre_fry_records
|
||||||
|
WHERE store_code = #{storeCode}
|
||||||
|
AND fry_date BETWEEN DATE_FORMAT(FROM_UNIXTIME(#{time}/1000), '%Y-%m-01')
|
||||||
|
AND LAST_DAY(FROM_UNIXTIME(#{time}/1000))
|
||||||
|
GROUP BY fry_date
|
||||||
|
ORDER BY fry_date
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByQueryDTO" resultType="com.cool.store.dto.pre.fry.PreFryRecordsDTO">
|
||||||
|
SELECT
|
||||||
|
a.id as id,
|
||||||
|
a.record_code as recordCode,
|
||||||
|
a.current_stage as currentStage,
|
||||||
|
a.fry_date as fryDate,
|
||||||
|
a.violation_flag as violationFlag,
|
||||||
|
a.violation_reason as violationReason,
|
||||||
|
b.product_name as productName,
|
||||||
|
b.product_code as productCode,
|
||||||
|
c.store_name as storeName,
|
||||||
|
c.store_num as storeCode
|
||||||
|
FROM xfsg_pre_fry_records a
|
||||||
|
LEFT JOIN xfsg_pre_fried_products b ON a.product_id = b.id
|
||||||
|
LEFT JOIN store_${enterpriseId} c ON a.store_code = c.store_num
|
||||||
|
<where>
|
||||||
|
<if test="query.recordCode != null and query.recordCode != ''">
|
||||||
|
AND a.record_code LIKE CONCAT('%', #{query.recordCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.storeCode != null and query.storeCode != ''">
|
||||||
|
AND a.store_code LIKE CONCAT('%', #{query.storeCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.storeName != null and query.storeName != ''">
|
||||||
|
AND c.store_name LIKE CONCAT('%', #{query.storeName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.productCode != null and query.productCode != ''">
|
||||||
|
AND b.product_code LIKE CONCAT('%', #{query.productCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.productName != null and query.productName != ''">
|
||||||
|
AND b.product_name LIKE CONCAT('%', #{query.productName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="query.currentStage != null">
|
||||||
|
AND a.current_stage = #{query.currentStage}
|
||||||
|
</if>
|
||||||
|
<if test="query.fryStartDate != null and query.fryEndDate != null">
|
||||||
|
AND a.fry_date BETWEEN #{query.fryStartDate} AND #{query.fryEndDate}
|
||||||
|
</if>
|
||||||
|
<if test="query.violationFlag != null">
|
||||||
|
AND a.violation_flag = #{query.violationFlag}
|
||||||
|
</if>
|
||||||
|
<if test="query.violationReason != null">
|
||||||
|
AND a.violation_reason LIKE CONCAT('%,', #{query.violationReason}, ',%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY a.created_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="batchUpdateViolation">
|
||||||
|
UPDATE xfsg_pre_fry_records
|
||||||
|
SET
|
||||||
|
violation_flag = CASE id
|
||||||
|
<foreach collection="list" item="item">
|
||||||
|
WHEN #{item.id} THEN #{item.violationFlag}
|
||||||
|
</foreach>
|
||||||
|
ELSE violation_flag
|
||||||
|
END,
|
||||||
|
violation_reason = CASE id
|
||||||
|
<foreach collection="list" item="item">
|
||||||
|
WHEN #{item.id} THEN #{item.violationReason}
|
||||||
|
</foreach>
|
||||||
|
ELSE violation_reason
|
||||||
|
END,
|
||||||
|
updated_time = NOW()
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="list" item="item" open="(" separator="," close=")">
|
||||||
|
#{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PreFryStageChangesMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryStageChangesDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
|
<result column="record_id" jdbcType="INTEGER" property="recordId" />
|
||||||
|
<result column="stage" jdbcType="TINYINT" property="stage" />
|
||||||
|
<result column="image1" jdbcType="VARCHAR" property="image1" />
|
||||||
|
<result column="image2" jdbcType="VARCHAR" property="image2" />
|
||||||
|
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||||
|
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
INSERT INTO xfsg_pre_fry_stage_changes
|
||||||
|
(record_id, stage, image1, image2, operator_name, remark, created_time, updated_time)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.recordId}, #{item.stage}, #{item.image1}, #{item.image2},
|
||||||
|
#{item.operatorName}, #{item.remark}, NOW(), NOW())
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByRecordId" resultType="com.cool.store.dto.pre.fry.PreFryStageImagesDTO">
|
||||||
|
SELECT id, record_id, image1, image2, created_time,stage
|
||||||
|
FROM xfsg_pre_fry_stage_changes
|
||||||
|
WHERE record_id = #{recordId}
|
||||||
|
ORDER BY created_time asc
|
||||||
|
</select>
|
||||||
|
<select id="selectByRecordIdList" resultType="com.cool.store.dto.pre.fry.PreFryStageImagesDTO">
|
||||||
|
SELECT id, record_id, image1, image2, created_time,stage
|
||||||
|
FROM xfsg_pre_fry_stage_changes
|
||||||
|
<where>
|
||||||
|
and record_id in
|
||||||
|
<foreach collection="recordIdList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
ORDER BY created_time asc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -3,6 +3,6 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll
|
|||||||
jdbc.user= coolstore
|
jdbc.user= coolstore
|
||||||
jdbc.password = CSCErYcXniNYm7bT
|
jdbc.password = CSCErYcXniNYm7bT
|
||||||
|
|
||||||
table.name = xfsg_invoicing
|
table.name = xfsg_pre_fry_stage_changes
|
||||||
table.object.class = InvoicingDO
|
table.object.class = PreFryStageChangesDO
|
||||||
table.mapper = InvoicingMapper
|
table.mapper = PreFryStageChangesMapper
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 14:58
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddPreFryRecordsDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
@NotEmpty(message = "门店编码不能为空")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废")
|
||||||
|
private Integer currentStage;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请类型 选择的类型 不是最高类型")
|
||||||
|
@NotNull(message = "申请类型不能为空")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty("批量数据")
|
||||||
|
private List<AddPreFryRecordsDetailDTO> records;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 14:55
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddPreFryRecordsDetailDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("记录ID")
|
||||||
|
private Long recordId;
|
||||||
|
@ApiModelProperty("产品ID")
|
||||||
|
@NotNull(message = "产品ID不能为空")
|
||||||
|
private Long productId;
|
||||||
|
@ApiModelProperty("图片1")
|
||||||
|
private String image1;
|
||||||
|
@ApiModelProperty("图片2")
|
||||||
|
private String image2;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 17:29
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyAuditDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态:1-通过,2-拒绝")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
private String auditRemark;
|
||||||
|
|
||||||
|
private Long id ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 15:24
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyDTO {
|
||||||
|
@ApiModelProperty("从新提交时需要带上ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜")
|
||||||
|
@Max(3)@Min(1)
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty("展示柜照片URL")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty("展示柜铭牌图片URL")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty("(防绳罩、防尘罩)图片URL")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty("冷藏盒图片URL")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 17:14
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyDetailDTO extends ApplyManagementDTO{
|
||||||
|
|
||||||
|
@ApiModelProperty( "展示柜照片URL")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty( "展示柜铭牌图片URL")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty( "(防绳罩、防尘罩)图片URL")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
@ApiModelProperty( "冷藏盒图片URL")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 16:44
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApplyManagementDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("门店Code")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("申请单号")
|
||||||
|
private String applyCode;
|
||||||
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜 ")
|
||||||
|
private Integer applyType;
|
||||||
|
@ApiModelProperty("申请人ID")
|
||||||
|
private String createUserId;
|
||||||
|
@ApiModelProperty("申请人名称")
|
||||||
|
private String createUserName;
|
||||||
|
@ApiModelProperty("申请人手机号")
|
||||||
|
private String createUserMobile;
|
||||||
|
@ApiModelProperty("申请时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApplyManagementQueryDTO extends PageBasicInfo {
|
||||||
|
@ApiModelProperty("门店编码(模糊)")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称(模糊)")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("申请人姓名(模糊)")
|
||||||
|
private String createUserName;
|
||||||
|
@ApiModelProperty("申请人手机号(模糊)")
|
||||||
|
private String createUserMobile;
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer auditStatus;
|
||||||
|
@ApiModelProperty("申请类型")
|
||||||
|
private Integer applyType;
|
||||||
|
@ApiModelProperty("申请日期开始时间")
|
||||||
|
private Date createTimeStart;
|
||||||
|
@ApiModelProperty("申请日期结束时间")
|
||||||
|
private Date createTimeEnd;
|
||||||
|
@ApiModelProperty("申请编号")
|
||||||
|
private String applyCode;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ApprovalRecordDTO {
|
||||||
|
@ApiModelProperty("申请ID")
|
||||||
|
private Long applyId;
|
||||||
|
@ApiModelProperty("备注-拒绝时填写")
|
||||||
|
private String remark;
|
||||||
|
@ApiModelProperty("操作状态1-通过 2-拒绝")
|
||||||
|
private Integer operationStatus;
|
||||||
|
@ApiModelProperty("记录类型:1-申请提交,2-审批操作")
|
||||||
|
private Integer recordType;
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 16:22
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ApprovalRecordListDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("记录ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("记录类型(1=申请,2=通过,3=拒绝)")
|
||||||
|
private Integer recordType;
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 19:04
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DailyFryCountDTO {
|
||||||
|
|
||||||
|
private Date fryDate;
|
||||||
|
private Integer count;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 18:24
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FryRecordsQueryDTO extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("当前日期")
|
||||||
|
private Date currentDate;
|
||||||
|
@ApiModelProperty("申请类型")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsBatchDTO {
|
||||||
|
@ApiModelProperty("产品ID列表")
|
||||||
|
private List<Long> ids;
|
||||||
|
@ApiModelProperty("上下架状态0-下架 1-上架 删除时 不需要传递")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:55
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsDTO {
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("产品图片")
|
||||||
|
private String productImage;
|
||||||
|
@ApiModelProperty("上下架状态0-下架 1-上架")
|
||||||
|
private Integer status;
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sortOrder;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:28
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsDetailDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("产品编号")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
@ApiModelProperty("产品图片URL")
|
||||||
|
private String productImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("上架状态:0-下架,1-上架")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("排序")
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("修改人")
|
||||||
|
private String updatedUserId;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:56
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFriedProductsQueryDTO extends PageBasicInfo {
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("产品状态")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 9:59
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryQualificationApplyDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("申请类型:1-有冷藏展示柜,2-有常温展示柜,3-无展示柜")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核状态:0-审批中,1-审核通过,2-审核不通过")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 20:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryRecordQueryDTO extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("预炸记录编码")
|
||||||
|
private String recordCode;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@ApiModelProperty("状态 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废")
|
||||||
|
private Integer currentStage;
|
||||||
|
@ApiModelProperty("预炸开始时间")
|
||||||
|
private Date fryStartDate;
|
||||||
|
@ApiModelProperty("预炸结束时间")
|
||||||
|
private Date fryEndDate;
|
||||||
|
@ApiModelProperty("是否违规 0-未违规 1违规")
|
||||||
|
private Integer violationFlag;
|
||||||
|
@ApiModelProperty("违规原因")
|
||||||
|
private Integer violationReason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 21:10
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryRecordsDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("预炸记录ID")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("预炸记录编码")
|
||||||
|
private String recordCode;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("产品编码")
|
||||||
|
private String productCode;
|
||||||
|
@ApiModelProperty("产品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("当前状态")
|
||||||
|
private Integer currentStage;
|
||||||
|
@ApiModelProperty("预炸完成时间")
|
||||||
|
private Date fryDate;
|
||||||
|
@ApiModelProperty("是否违规")
|
||||||
|
private Integer violationFlag;
|
||||||
|
@ApiModelProperty("违规原因")
|
||||||
|
private String violationReason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 17:23
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryRecordsDetailDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty( "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty( "门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
@ApiModelProperty( "门店名称")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸产品id")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸产品编码")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸产品名称")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸记录编码")
|
||||||
|
private String recordCode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸产品图片")
|
||||||
|
private String productImageUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty( "预炸完成时间")
|
||||||
|
private Date fryCompleteTime;
|
||||||
|
|
||||||
|
@ApiModelProperty( "最迟售卖时间")
|
||||||
|
private Date latestSaleTime;
|
||||||
|
|
||||||
|
@ApiModelProperty( "当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废")
|
||||||
|
private Integer currentStage;
|
||||||
|
|
||||||
|
@ApiModelProperty( "申请类型")
|
||||||
|
private Integer currentApplyType;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否违规")
|
||||||
|
private Integer violationFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("违规原因")
|
||||||
|
private String violationReason;
|
||||||
|
|
||||||
|
@ApiModelProperty( "状态记录")
|
||||||
|
private List<PreFryStageImagesDTO> stageHistory;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 14:31
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PreFryStageImagesDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("ID")
|
||||||
|
private Integer id;
|
||||||
|
@ApiModelProperty("记录ID")
|
||||||
|
private Long recordId;
|
||||||
|
@ApiModelProperty("当前阶段")
|
||||||
|
private Integer stage;
|
||||||
|
@ApiModelProperty("图片1")
|
||||||
|
private String image1;
|
||||||
|
@ApiModelProperty("图片2")
|
||||||
|
private String image2;
|
||||||
|
@ApiModelProperty("时间")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.dto.pre.fry;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/24 10:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ViolationDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Integer violationFlag;
|
||||||
|
|
||||||
|
private String violationReason;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,250 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fried_products")
|
||||||
|
public class PreFriedProductsDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品编号
|
||||||
|
*/
|
||||||
|
@Column(name = "product_code")
|
||||||
|
private String productCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名称
|
||||||
|
*/
|
||||||
|
@Column(name = "product_name")
|
||||||
|
private String productName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "product_image")
|
||||||
|
private String productImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@Column(name = "sort_order")
|
||||||
|
private Integer sortOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "created_user_id")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_User_id")
|
||||||
|
private String updatedUserId;
|
||||||
|
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
public Integer getDeleted() {
|
||||||
|
return deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleted(Integer deleted) {
|
||||||
|
this.deleted = deleted;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品编号
|
||||||
|
*
|
||||||
|
* @return product_code - 产品编号
|
||||||
|
*/
|
||||||
|
public String getProductCode() {
|
||||||
|
return productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品编号
|
||||||
|
*
|
||||||
|
* @param productCode 产品编号
|
||||||
|
*/
|
||||||
|
public void setProductCode(String productCode) {
|
||||||
|
this.productCode = productCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品名称
|
||||||
|
*
|
||||||
|
* @return product_name - 产品名称
|
||||||
|
*/
|
||||||
|
public String getProductName() {
|
||||||
|
return productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品名称
|
||||||
|
*
|
||||||
|
* @param productName 产品名称
|
||||||
|
*/
|
||||||
|
public void setProductName(String productName) {
|
||||||
|
this.productName = productName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品图片URL
|
||||||
|
*
|
||||||
|
* @return product_image - 产品图片URL
|
||||||
|
*/
|
||||||
|
public String getProductImage() {
|
||||||
|
return productImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置产品图片URL
|
||||||
|
*
|
||||||
|
* @param productImage 产品图片URL
|
||||||
|
*/
|
||||||
|
public void setProductImage(String productImage) {
|
||||||
|
this.productImage = productImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上架状态:0-下架,1-上架
|
||||||
|
*
|
||||||
|
* @return status - 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置上架状态:0-下架,1-上架
|
||||||
|
*
|
||||||
|
* @param status 上架状态:0-下架,1-上架
|
||||||
|
*/
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取排序
|
||||||
|
*
|
||||||
|
* @return sort_order - 排序
|
||||||
|
*/
|
||||||
|
public Integer getSortOrder() {
|
||||||
|
return sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置排序
|
||||||
|
*
|
||||||
|
* @param sortOrder 排序
|
||||||
|
*/
|
||||||
|
public void setSortOrder(Integer sortOrder) {
|
||||||
|
this.sortOrder = sortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建人
|
||||||
|
*
|
||||||
|
* @return created_user_id - 创建人
|
||||||
|
*/
|
||||||
|
public String getCreatedUserId() {
|
||||||
|
return createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建人
|
||||||
|
*
|
||||||
|
* @param createdUserId 创建人
|
||||||
|
*/
|
||||||
|
public void setCreatedUserId(String createdUserId) {
|
||||||
|
this.createdUserId = createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取修改人
|
||||||
|
*
|
||||||
|
* @return updated_User_id - 修改人
|
||||||
|
*/
|
||||||
|
public String getUpdatedUserId() {
|
||||||
|
return updatedUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置修改人
|
||||||
|
*
|
||||||
|
* @param updatedUserId 修改人
|
||||||
|
*/
|
||||||
|
public void setUpdatedUserId(String updatedUserId) {
|
||||||
|
this.updatedUserId = updatedUserId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_approval_records")
|
||||||
|
public class PreFryApprovalRecordsDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的申请ID
|
||||||
|
*/
|
||||||
|
@Column(name = "apply_id")
|
||||||
|
private Long applyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
@Column(name = "record_type")
|
||||||
|
private Integer recordType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
@Column(name = "operation_status")
|
||||||
|
private Integer operationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人名称
|
||||||
|
*/
|
||||||
|
@Column(name = "operator_name")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取关联的申请ID
|
||||||
|
*
|
||||||
|
* @return apply_id - 关联的申请ID
|
||||||
|
*/
|
||||||
|
public Long getApplyId() {
|
||||||
|
return applyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置关联的申请ID
|
||||||
|
*
|
||||||
|
* @param applyId 关联的申请ID
|
||||||
|
*/
|
||||||
|
public void setApplyId(Long applyId) {
|
||||||
|
this.applyId = applyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取记录类型:1-申请提交,2-审批操作
|
||||||
|
*
|
||||||
|
* @return record_type - 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
public Integer getRecordType() {
|
||||||
|
return recordType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置记录类型:1-申请提交,2-审批操作
|
||||||
|
*
|
||||||
|
* @param recordType 记录类型:1-申请提交,2-审批操作
|
||||||
|
*/
|
||||||
|
public void setRecordType(Integer recordType) {
|
||||||
|
this.recordType = recordType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作状态:1-通过 2-拒绝
|
||||||
|
*
|
||||||
|
* @return operation_status - 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
public Integer getOperationStatus() {
|
||||||
|
return operationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置操作状态:1-通过 2-拒绝
|
||||||
|
*
|
||||||
|
* @param operationStatus 操作状态:1-通过 2-拒绝
|
||||||
|
*/
|
||||||
|
public void setOperationStatus(Integer operationStatus) {
|
||||||
|
this.operationStatus = operationStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处理人名称
|
||||||
|
*
|
||||||
|
* @return operator_name - 处理人名称
|
||||||
|
*/
|
||||||
|
public String getOperatorName() {
|
||||||
|
return operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置处理人名称
|
||||||
|
*
|
||||||
|
* @param operatorName 处理人名称
|
||||||
|
*/
|
||||||
|
public void setOperatorName(String operatorName) {
|
||||||
|
this.operatorName = operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取处理备注
|
||||||
|
*
|
||||||
|
* @return remark - 处理备注
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置处理备注
|
||||||
|
*
|
||||||
|
* @param remark 处理备注
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,264 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_qualification_apply")
|
||||||
|
public class PreFryQualificationApplyDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "apply_code")
|
||||||
|
private String applyCode;
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
@Column(name = "apply_type")
|
||||||
|
private Integer applyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "refrigerator_photo")
|
||||||
|
private String refrigeratorPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "refrigerator_plate_photo")
|
||||||
|
private String refrigeratorPlatePhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "protective_cover_photo")
|
||||||
|
private String protectiveCoverPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "cold_storage_box_photo")
|
||||||
|
private String coldStorageBoxPhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
@Column(name = "audit_status")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@Column(name = "created_user_id")
|
||||||
|
private String createdUserId;
|
||||||
|
|
||||||
|
|
||||||
|
public String getCreatedUserId() {
|
||||||
|
return createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedUserId(String createdUserId) {
|
||||||
|
this.createdUserId = createdUserId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplyCode() {
|
||||||
|
return applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApplyCode(String applyCode) {
|
||||||
|
this.applyCode = applyCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店编码
|
||||||
|
*
|
||||||
|
* @return store_code - 门店编码
|
||||||
|
*/
|
||||||
|
public String getStoreCode() {
|
||||||
|
return storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置门店编码
|
||||||
|
*
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
*/
|
||||||
|
public void setStoreCode(String storeCode) {
|
||||||
|
this.storeCode = storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*
|
||||||
|
* @return apply_type - 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
public Integer getApplyType() {
|
||||||
|
return applyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*
|
||||||
|
* @param applyType 申请类型:1-有冷藏展示柜 ,2-有常温展示柜,3-无展示柜
|
||||||
|
*/
|
||||||
|
public void setApplyType(Integer applyType) {
|
||||||
|
this.applyType = applyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取冷藏展示柜照片URL
|
||||||
|
*
|
||||||
|
* @return refrigerator_photo - 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
public String getRefrigeratorPhoto() {
|
||||||
|
return refrigeratorPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置冷藏展示柜照片URL
|
||||||
|
*
|
||||||
|
* @param refrigeratorPhoto 冷藏展示柜照片URL
|
||||||
|
*/
|
||||||
|
public void setRefrigeratorPhoto(String refrigeratorPhoto) {
|
||||||
|
this.refrigeratorPhoto = refrigeratorPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取展示柜铭牌图片URL
|
||||||
|
*
|
||||||
|
* @return refrigerator_plate_photo - 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
public String getRefrigeratorPlatePhoto() {
|
||||||
|
return refrigeratorPlatePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置展示柜铭牌图片URL
|
||||||
|
*
|
||||||
|
* @param refrigeratorPlatePhoto 展示柜铭牌图片URL
|
||||||
|
*/
|
||||||
|
public void setRefrigeratorPlatePhoto(String refrigeratorPlatePhoto) {
|
||||||
|
this.refrigeratorPlatePhoto = refrigeratorPlatePhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取(防绳罩、防尘罩)图片URL
|
||||||
|
*
|
||||||
|
* @return protective_cover_photo - (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
public String getProtectiveCoverPhoto() {
|
||||||
|
return protectiveCoverPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置(防绳罩、防尘罩)图片URL
|
||||||
|
*
|
||||||
|
* @param protectiveCoverPhoto (防绳罩、防尘罩)图片URL
|
||||||
|
*/
|
||||||
|
public void setProtectiveCoverPhoto(String protectiveCoverPhoto) {
|
||||||
|
this.protectiveCoverPhoto = protectiveCoverPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取冷藏盒图片URL
|
||||||
|
*
|
||||||
|
* @return cold_storage_box_photo - 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
public String getColdStorageBoxPhoto() {
|
||||||
|
return coldStorageBoxPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置冷藏盒图片URL
|
||||||
|
*
|
||||||
|
* @param coldStorageBoxPhoto 冷藏盒图片URL
|
||||||
|
*/
|
||||||
|
public void setColdStorageBoxPhoto(String coldStorageBoxPhoto) {
|
||||||
|
this.coldStorageBoxPhoto = coldStorageBoxPhoto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*
|
||||||
|
* @return audit_status - 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
public Integer getAuditStatus() {
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*
|
||||||
|
* @param auditStatus 审核状态:0-审批中,1-审核通过,2-审核不通过
|
||||||
|
*/
|
||||||
|
public void setAuditStatus(Integer auditStatus) {
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_records")
|
||||||
|
public class PreFryRecordsDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸产品id
|
||||||
|
*/
|
||||||
|
@Column(name = "product_id")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
@Column(name = "record_code")
|
||||||
|
private String recordCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸日期
|
||||||
|
*/
|
||||||
|
@Column(name = "fry_date")
|
||||||
|
private Date fryDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预炸完成时间
|
||||||
|
*/
|
||||||
|
@Column(name = "fry_complete_time")
|
||||||
|
private Date fryCompleteTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最迟售卖时间
|
||||||
|
*/
|
||||||
|
@Column(name = "latest_sale_time")
|
||||||
|
private Date latestSaleTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
@Column(name = "current_stage")
|
||||||
|
private Integer currentStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交时所属 申请类型
|
||||||
|
*/
|
||||||
|
@Column(name = "current_apply_type")
|
||||||
|
private Integer currentApplyType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
@Column(name = "violation_flag")
|
||||||
|
private Integer violationFlag;
|
||||||
|
@Column(name = "violation_reason")
|
||||||
|
private String violationReason;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getViolationFlag() {
|
||||||
|
return violationFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViolationFlag(Integer violationFlag) {
|
||||||
|
this.violationFlag = violationFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getViolationReason() {
|
||||||
|
return violationReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setViolationReason(String violationReason) {
|
||||||
|
this.violationReason = violationReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCurrentApplyType() {
|
||||||
|
return currentApplyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentApplyType(Integer currentApplyType) {
|
||||||
|
this.currentApplyType = currentApplyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecordCode() {
|
||||||
|
return recordCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecordCode(String recordCode) {
|
||||||
|
this.recordCode = recordCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主键ID
|
||||||
|
*
|
||||||
|
* @return id - 主键ID
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置主键ID
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店编码
|
||||||
|
*
|
||||||
|
* @return store_code - 门店编码
|
||||||
|
*/
|
||||||
|
public String getStoreCode() {
|
||||||
|
return storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置门店编码
|
||||||
|
*
|
||||||
|
* @param storeCode 门店编码
|
||||||
|
*/
|
||||||
|
public void setStoreCode(String storeCode) {
|
||||||
|
this.storeCode = storeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸产品编码
|
||||||
|
*
|
||||||
|
* @return product_id - 预炸产品编码
|
||||||
|
*/
|
||||||
|
public Long getProductId() {
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸产品编码
|
||||||
|
*
|
||||||
|
* @param productId 预炸产品编码
|
||||||
|
*/
|
||||||
|
public void setProductId(Long productId) {
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸日期
|
||||||
|
*
|
||||||
|
* @return fry_date - 预炸日期
|
||||||
|
*/
|
||||||
|
public Date getFryDate() {
|
||||||
|
return fryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸日期
|
||||||
|
*
|
||||||
|
* @param fryDate 预炸日期
|
||||||
|
*/
|
||||||
|
public void setFryDate(Date fryDate) {
|
||||||
|
this.fryDate = fryDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取预炸完成时间
|
||||||
|
*
|
||||||
|
* @return fry_complete_time - 预炸完成时间
|
||||||
|
*/
|
||||||
|
public Date getFryCompleteTime() {
|
||||||
|
return fryCompleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置预炸完成时间
|
||||||
|
*
|
||||||
|
* @param fryCompleteTime 预炸完成时间
|
||||||
|
*/
|
||||||
|
public void setFryCompleteTime(Date fryCompleteTime) {
|
||||||
|
this.fryCompleteTime = fryCompleteTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最迟售卖时间
|
||||||
|
*
|
||||||
|
* @return latest_sale_time - 最迟售卖时间
|
||||||
|
*/
|
||||||
|
public Date getLatestSaleTime() {
|
||||||
|
return latestSaleTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置最迟售卖时间
|
||||||
|
*
|
||||||
|
* @param latestSaleTime 最迟售卖时间
|
||||||
|
*/
|
||||||
|
public void setLatestSaleTime(Date latestSaleTime) {
|
||||||
|
this.latestSaleTime = latestSaleTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @return current_stage - 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public Integer getCurrentStage() {
|
||||||
|
return currentStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @param currentStage 当前产品阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public void setCurrentStage(Integer currentStage) {
|
||||||
|
this.currentStage = currentStage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,219 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "xfsg_pre_fry_stage_changes")
|
||||||
|
public class PreFryStageChangesDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
@Column(name = "record_id")
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
private Integer stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片1
|
||||||
|
*/
|
||||||
|
private String image1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片2
|
||||||
|
*/
|
||||||
|
private String image2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人名称
|
||||||
|
*/
|
||||||
|
@Column(name = "operator_name")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "created_time")
|
||||||
|
private Date createdTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "updated_time")
|
||||||
|
private Date updatedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主键ID
|
||||||
|
*
|
||||||
|
* @return id - 主键ID
|
||||||
|
*/
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置主键ID
|
||||||
|
*
|
||||||
|
* @param id 主键ID
|
||||||
|
*/
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取关联的预炸记录ID
|
||||||
|
*
|
||||||
|
* @return record_id - 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
public Long getRecordId() {
|
||||||
|
return recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置关联的预炸记录ID
|
||||||
|
*
|
||||||
|
* @param recordId 关联的预炸记录ID
|
||||||
|
*/
|
||||||
|
public void setRecordId(Long recordId) {
|
||||||
|
this.recordId = recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @return stage - 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public Integer getStage() {
|
||||||
|
return stage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*
|
||||||
|
* @param stage 阶段:1-预炸完成,2-存入展示柜,3-放入冰箱,4-次日拿出,5-报废
|
||||||
|
*/
|
||||||
|
public void setStage(Integer stage) {
|
||||||
|
this.stage = stage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片1
|
||||||
|
*
|
||||||
|
* @return image1 - 图片1
|
||||||
|
*/
|
||||||
|
public String getImage1() {
|
||||||
|
return image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置图片1
|
||||||
|
*
|
||||||
|
* @param image1 图片1
|
||||||
|
*/
|
||||||
|
public void setImage1(String image1) {
|
||||||
|
this.image1 = image1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片2
|
||||||
|
*
|
||||||
|
* @return image2 - 图片2
|
||||||
|
*/
|
||||||
|
public String getImage2() {
|
||||||
|
return image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置图片2
|
||||||
|
*
|
||||||
|
* @param image2 图片2
|
||||||
|
*/
|
||||||
|
public void setImage2(String image2) {
|
||||||
|
this.image2 = image2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取操作人名称
|
||||||
|
*
|
||||||
|
* @return operator_name - 操作人名称
|
||||||
|
*/
|
||||||
|
public String getOperatorName() {
|
||||||
|
return operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置操作人名称
|
||||||
|
*
|
||||||
|
* @param operatorName 操作人名称
|
||||||
|
*/
|
||||||
|
public void setOperatorName(String operatorName) {
|
||||||
|
this.operatorName = operatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取备注
|
||||||
|
*
|
||||||
|
* @return remark - 备注
|
||||||
|
*/
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置备注
|
||||||
|
*
|
||||||
|
* @param remark 备注
|
||||||
|
*/
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取创建时间
|
||||||
|
*
|
||||||
|
* @return created_time - 创建时间
|
||||||
|
*/
|
||||||
|
public Date getCreatedTime() {
|
||||||
|
return createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置创建时间
|
||||||
|
*
|
||||||
|
* @param createdTime 创建时间
|
||||||
|
*/
|
||||||
|
public void setCreatedTime(Date createdTime) {
|
||||||
|
this.createdTime = createdTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取更新时间
|
||||||
|
*
|
||||||
|
* @return updated_time - 更新时间
|
||||||
|
*/
|
||||||
|
public Date getUpdatedTime() {
|
||||||
|
return updatedTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置更新时间
|
||||||
|
*
|
||||||
|
* @param updatedTime 更新时间
|
||||||
|
*/
|
||||||
|
public void setUpdatedTime(Date updatedTime) {
|
||||||
|
this.updatedTime = updatedTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PreFriedProductsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增产品
|
||||||
|
* @param dto 产品信息
|
||||||
|
* @return 产品ID
|
||||||
|
*/
|
||||||
|
Long createProduct(PreFriedProductsDTO dto, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改产品
|
||||||
|
* @param dto
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long updateProduct(PreFriedProductsDTO dto, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除(逻辑删除)
|
||||||
|
* @param batchDTO 包含ID列表和操作人
|
||||||
|
* @return 成功数量
|
||||||
|
*/
|
||||||
|
int batchDelete(PreFriedProductsBatchDTO batchDTO, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量上下架
|
||||||
|
* @param batchDTO 包含ID列表、目标状态和操作人
|
||||||
|
* @return 成功数量
|
||||||
|
*/
|
||||||
|
int batchUpdateStatus(PreFriedProductsBatchDTO batchDTO, String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询产品列表
|
||||||
|
* @param queryDTO 查询条件
|
||||||
|
* @return 产品列表
|
||||||
|
*/
|
||||||
|
PageInfo<PreFriedProductsDetailDTO> queryProducts(PreFriedProductsQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PreFriedProductsDetailDTO queryById(Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PreFryQualificationApplyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交预炸资质申请
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long submitApply(ApplyDTO request, PartnerUserInfoVO user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新提交预炸资质申请
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long reSubmitApply(ApplyDTO request, PartnerUserInfoVO user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店编码和申请类型查询
|
||||||
|
* @param storeCode
|
||||||
|
* @param applyType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ApplyDTO getByStoreCodeAndApplyType(String storeCode, Integer applyType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据申请记录id查询审批记录
|
||||||
|
* @param recordId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ApprovalRecordDTO> getApprovalRecordById(Long recordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理页面列表
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取申请详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ApplyDetailDTO getApplyDetail(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* audit
|
||||||
|
* @param applyAuditDTO
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean audit(ApplyAuditDTO applyAuditDTO, LoginUserInfo currentUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店申请最小的applyType
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getMinApplyType(String storeCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据门店查询当前申请类型状态
|
||||||
|
* @param storeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PreFryQualificationApplyDTO> getListByStoreCode(String storeCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 14:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PreFryRecordsService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入
|
||||||
|
* @param addPreFryRecordsDTO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean batchInsert(AddPreFryRecordsDTO addPreFryRecordsDTO, PartnerUserInfoVO user);
|
||||||
|
|
||||||
|
|
||||||
|
PageInfo<PreFryRecordsDetailDTO> ListByStoreCodeAndDate(FryRecordsQueryDTO dto);
|
||||||
|
|
||||||
|
PreFryRecordsDetailDTO getById(Long id);
|
||||||
|
|
||||||
|
List<DailyFryCountDTO> queryByStoreCode(String storeCode, Long time);
|
||||||
|
|
||||||
|
PageInfo<PreFryRecordsDTO> queryByQueryDTO(PreFryRecordQueryDTO dto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -337,6 +337,7 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
}
|
}
|
||||||
FranchiseFeePayInfoResponse response = new FranchiseFeePayInfoResponse();
|
FranchiseFeePayInfoResponse response = new FranchiseFeePayInfoResponse();
|
||||||
BeanUtil.copyProperties(linePay, response);
|
BeanUtil.copyProperties(linePay, response);
|
||||||
|
response.setPayTime(DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, linePay.getPayTime()));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.dao.PreFriedProductsDAO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.entity.PreFriedProductsDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.PreFriedProductsMapper;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/20 19:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PreFriedProductsServiceImpl implements PreFriedProductsService {
|
||||||
|
@Resource
|
||||||
|
private PreFriedProductsDAO preFriedProductsDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createProduct(PreFriedProductsDTO dto, String userId) {
|
||||||
|
if (dto==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO preFriedProductsDO = preFriedProductsDAO.queryByProductCode(dto.getProductCode());
|
||||||
|
if (preFriedProductsDO!=null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRODUCTS_CODE_EXIST);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO product = convertToDO(dto);
|
||||||
|
product.setCreatedTime(new Date());
|
||||||
|
product.setCreatedUserId(userId);
|
||||||
|
preFriedProductsDAO.createProduct(product);
|
||||||
|
return product.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long updateProduct(PreFriedProductsDTO dto, String userId) {
|
||||||
|
if (dto==null||dto.getId() == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO preFriedProductsDO = preFriedProductsDAO.queryByProductCode(dto.getProductCode());
|
||||||
|
if (preFriedProductsDO!=null && !preFriedProductsDO.getId().equals(dto.getId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRODUCTS_CODE_EXIST);
|
||||||
|
}
|
||||||
|
PreFriedProductsDO product = convertToDO(dto);
|
||||||
|
product.setUpdatedTime(new Date());
|
||||||
|
product.setUpdatedUserId(userId);
|
||||||
|
preFriedProductsDAO.updateProduct( product);
|
||||||
|
return product.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchDelete(PreFriedProductsBatchDTO batchDTO, String userId) {
|
||||||
|
validateBatchOperation(batchDTO);
|
||||||
|
return preFriedProductsDAO.batchDeleteProducts(batchDTO.getIds(), userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchUpdateStatus(PreFriedProductsBatchDTO batchDTO, String userId) {
|
||||||
|
validateBatchOperation(batchDTO);
|
||||||
|
if (batchDTO.getStatus() == null || (batchDTO.getStatus() != 0 && batchDTO.getStatus() != 1)) {
|
||||||
|
throw new IllegalArgumentException("状态值必须为0或1");
|
||||||
|
}
|
||||||
|
return preFriedProductsDAO.batchUpdateProductStatus(
|
||||||
|
batchDTO.getIds(),
|
||||||
|
batchDTO.getStatus(),
|
||||||
|
userId
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreFriedProductsDetailDTO> queryProducts(PreFriedProductsQueryDTO queryDTO) {
|
||||||
|
PageHelper.startPage(queryDTO.getPageNum(),queryDTO.getPageSize());
|
||||||
|
List<PreFriedProductsDO> dos = preFriedProductsDAO.selectByCondition(
|
||||||
|
queryDTO.getProductCode(),
|
||||||
|
queryDTO.getProductName(),
|
||||||
|
queryDTO.getStatus()
|
||||||
|
);
|
||||||
|
PageInfo preFriedProductsDOPageInfo = new PageInfo<>(dos);
|
||||||
|
List<PreFriedProductsDetailDTO> preFriedProductsDTOS = convertToDTOs(dos);
|
||||||
|
preFriedProductsDOPageInfo.setList(preFriedProductsDTOS);
|
||||||
|
return preFriedProductsDOPageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PreFriedProductsDetailDTO queryById(Long id) {
|
||||||
|
//查询详情
|
||||||
|
PreFriedProductsDO product = preFriedProductsDAO.queryById(id);
|
||||||
|
if (product == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_PRODUCT_NOT_EXIST);
|
||||||
|
}
|
||||||
|
return convertToDTO(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转换方法
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private PreFriedProductsDO convertToDO(PreFriedProductsDTO dto) {
|
||||||
|
PreFriedProductsDO product = new PreFriedProductsDO();
|
||||||
|
BeanUtils.copyProperties(dto, product);
|
||||||
|
return product;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<PreFriedProductsDetailDTO> convertToDTOs(List<PreFriedProductsDO> dos) {
|
||||||
|
return dos.stream().map(this::convertToDTO).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private PreFriedProductsDetailDTO convertToDTO(PreFriedProductsDO product) {
|
||||||
|
if (product != null) {
|
||||||
|
PreFriedProductsDetailDTO dto = new PreFriedProductsDetailDTO();
|
||||||
|
BeanUtils.copyProperties(product, dto);
|
||||||
|
return dto;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateBatchOperation(PreFriedProductsBatchDTO batchDTO) {
|
||||||
|
if (batchDTO.getIds() == null || batchDTO.getIds().isEmpty()) {
|
||||||
|
throw new IllegalArgumentException("ID列表不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.PreFryApprovalRecordsDAO;
|
||||||
|
import com.cool.store.dao.PreFryQualificationApplyDAO;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.entity.PreFryApprovalRecordsDO;
|
||||||
|
import com.cool.store.entity.PreFryQualificationApplyDO;
|
||||||
|
import com.cool.store.enums.AuditOperationTypeEnum;
|
||||||
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 14:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PreFryQualificationApplyServiceImpl implements PreFryQualificationApplyService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||||
|
@Resource
|
||||||
|
private PreFryApprovalRecordsDAO preFryApprovalRecordsDAO;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long submitApply(ApplyDTO request, PartnerUserInfoVO user) {
|
||||||
|
// 1. 参数校验
|
||||||
|
validateRequest(request);
|
||||||
|
|
||||||
|
|
||||||
|
// 2. 检查是否已有同类型申请
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(request.getStoreCode(), request.getApplyType());
|
||||||
|
if(preFryQualificationApplyDO!=null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_RECORD_EXIST);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 创建申请记录
|
||||||
|
PreFryQualificationApplyDO apply = createApplyRecord(request,user);
|
||||||
|
|
||||||
|
// 4. 创建审批操作记录
|
||||||
|
createApprovalRecord(apply.getId(), AuditOperationTypeEnum.APPLY.getCode(),1, user.getUsername(),"");
|
||||||
|
|
||||||
|
return apply.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long reSubmitApply(ApplyDTO request, PartnerUserInfoVO user) {
|
||||||
|
// 1. 参数校验
|
||||||
|
validateRequest(request);
|
||||||
|
// 2. 检查是否已有同类型申请
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(request.getStoreCode(), request.getApplyType());
|
||||||
|
if(preFryQualificationApplyDO!=null&& !preFryQualificationApplyDO.getId().equals(request.getId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_RECORD_EXIST);
|
||||||
|
}
|
||||||
|
// 3. 创建申请记录
|
||||||
|
PreFryQualificationApplyDO old = preFryQualificationApplyDAO.queryById(request.getId());
|
||||||
|
old.setApplyType(request.getApplyType());
|
||||||
|
old.setColdStorageBoxPhoto(request.getColdStorageBoxPhoto());
|
||||||
|
old.setProtectiveCoverPhoto(request.getProtectiveCoverPhoto());
|
||||||
|
old.setRefrigeratorPlatePhoto(request.getRefrigeratorPlatePhoto());
|
||||||
|
old.setRefrigeratorPhoto(request.getRefrigeratorPhoto());
|
||||||
|
old.setAuditStatus(AuditStatusEnum.TODO.getCode());
|
||||||
|
old.setUpdatedTime(new Date());
|
||||||
|
|
||||||
|
preFryQualificationApplyDAO.updateForce(old);
|
||||||
|
// 4. 创建审批操作记录
|
||||||
|
createApprovalRecord(old.getId(), AuditOperationTypeEnum.APPLY.getCode(),1, user.getUsername(),"");
|
||||||
|
|
||||||
|
return old.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplyDTO getByStoreCodeAndApplyType(String storeCode, Integer applyType) {
|
||||||
|
if (applyType == null|| StringUtils.isEmpty(storeCode)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.selectByStoreCodeAndType(storeCode, applyType);
|
||||||
|
if (preFryQualificationApplyDO != null) {
|
||||||
|
ApplyDTO applyDTO = new ApplyDTO();
|
||||||
|
BeanUtils.copyProperties(preFryQualificationApplyDO, applyDTO);
|
||||||
|
return applyDTO;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ApprovalRecordDTO> getApprovalRecordById(Long recordId) {
|
||||||
|
if (recordId == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryApprovalRecordsDO> records = preFryApprovalRecordsDAO.getRecordsByApplyId(recordId);
|
||||||
|
List<ApprovalRecordDTO> result = new ArrayList<>();
|
||||||
|
if (records != null){
|
||||||
|
records.forEach(record -> {
|
||||||
|
ApprovalRecordDTO recordDTO = new ApprovalRecordDTO();
|
||||||
|
BeanUtils.copyProperties(record, recordDTO);
|
||||||
|
result.add(recordDTO);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<ApplyManagementDTO> queryApplyManagementList(ApplyManagementQueryDTO query) {
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
List<ApplyManagementDTO> applyManagementDTOS = preFryQualificationApplyDAO.selectApplyManagementList(query);
|
||||||
|
return new PageInfo<>(applyManagementDTOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplyDetailDTO getApplyDetail(Long id) {
|
||||||
|
ApplyDetailDTO applyDetail = preFryQualificationApplyDAO.getApplyDetail(id);
|
||||||
|
if (applyDetail==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_APPLY_NOT_EXIST);
|
||||||
|
}
|
||||||
|
return applyDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean audit(ApplyAuditDTO applyAuditDTO, LoginUserInfo currentUser) {
|
||||||
|
PreFryQualificationApplyDO preFryQualificationApplyDO = preFryQualificationApplyDAO.queryById(applyAuditDTO.getId());
|
||||||
|
if (preFryQualificationApplyDO==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_APPLY_NOT_EXIST);
|
||||||
|
}
|
||||||
|
preFryQualificationApplyDO.setAuditStatus(applyAuditDTO.getAuditStatus());
|
||||||
|
preFryQualificationApplyDAO.updateForce(preFryQualificationApplyDO);
|
||||||
|
createApprovalRecord(applyAuditDTO.getId(), 2,applyAuditDTO.getAuditStatus(),currentUser.getName(),applyAuditDTO.getAuditRemark());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getMinApplyType(String storeCode) {
|
||||||
|
PreFryQualificationApplyDO minApplyTypeByStoreCode = preFryQualificationApplyDAO.getMinApplyTypeByStoreCode(storeCode);
|
||||||
|
if (minApplyTypeByStoreCode == null){
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return minApplyTypeByStoreCode.getApplyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PreFryQualificationApplyDTO> getListByStoreCode(String storeCode) {
|
||||||
|
if (StringUtils.isBlank(storeCode)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryQualificationApplyDO> preFryQualificationApplyDOS = preFryQualificationApplyDAO.listByStoreCode(storeCode);
|
||||||
|
List<PreFryQualificationApplyDTO> preFryQualificationApplyDTOS = new ArrayList<>();
|
||||||
|
preFryQualificationApplyDOS.forEach(x->{
|
||||||
|
PreFryQualificationApplyDTO preFryQualificationApplyDTO = new PreFryQualificationApplyDTO();
|
||||||
|
preFryQualificationApplyDTO.setId(x.getId());
|
||||||
|
preFryQualificationApplyDTO.setApplyType(x.getApplyType());
|
||||||
|
preFryQualificationApplyDTO.setAuditStatus(x.getAuditStatus());
|
||||||
|
preFryQualificationApplyDTO.setStoreCode(x.getStoreCode());
|
||||||
|
preFryQualificationApplyDTOS.add(preFryQualificationApplyDTO);
|
||||||
|
});
|
||||||
|
return preFryQualificationApplyDTOS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void validateRequest(ApplyDTO request) {
|
||||||
|
if (request == null || StringUtils.isBlank(request.getStoreCode())
|
||||||
|
|| request.getApplyType() == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private PreFryQualificationApplyDO createApplyRecord(ApplyDTO request,PartnerUserInfoVO user) {
|
||||||
|
PreFryQualificationApplyDO apply = new PreFryQualificationApplyDO();
|
||||||
|
BeanUtils.copyProperties(request, apply);
|
||||||
|
apply.setAuditStatus(AuditStatusEnum.TODO.getCode());
|
||||||
|
apply.setCreatedTime(new Date());
|
||||||
|
apply.setCreatedUserId(user.getPartnerId());
|
||||||
|
apply.setApplyCode(getPreFlyQualificationApplyCode());
|
||||||
|
preFryQualificationApplyDAO.createQualificationApply(apply);
|
||||||
|
return apply;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createApprovalRecord(Long applyId, Integer recordType,Integer operationStatus,String userName,String remark) {
|
||||||
|
PreFryApprovalRecordsDO record = new PreFryApprovalRecordsDO();
|
||||||
|
record.setApplyId(applyId);
|
||||||
|
record.setRecordType(recordType);
|
||||||
|
record.setOperationStatus(operationStatus);
|
||||||
|
record.setOperatorName(userName);
|
||||||
|
record.setRemark(remark);
|
||||||
|
record.setCreatedTime(new Date());
|
||||||
|
preFryApprovalRecordsDAO.createApprovalRecord(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPreFlyQualificationApplyCode() {
|
||||||
|
//当前日期
|
||||||
|
String today = CoolDateUtils.getToday();
|
||||||
|
return "13" + today + String.format("%04d", ThreadLocalRandom.current().nextInt(100000));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,326 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.entity.*;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.PreFryApplyTypeEnum;
|
||||||
|
import com.cool.store.enums.PreFryStageEnum;
|
||||||
|
import com.cool.store.enums.ViolationEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.PreFryRecordsService;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.cool.store.enums.PreFryStageEnum.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 14:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PreFryRecordsServiceImpl implements PreFryRecordsService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryRecordsDAO preFryRecordsDAO;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryStageChangesDAO preFryStageChangesDAO;
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyDAO preFryQualificationApplyDAO;
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsDAO preFriedProductsDAO;
|
||||||
|
@Resource
|
||||||
|
StoreDao storeDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean batchInsert(AddPreFryRecordsDTO addPreFryRecordsDTO, PartnerUserInfoVO user) {
|
||||||
|
if (CollectionUtils.isEmpty(addPreFryRecordsDTO.getRecords())|| CollectionUtils.isEmpty(addPreFryRecordsDTO.getRecords())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
//查询门店当前最高优先级申请类型
|
||||||
|
PreFryQualificationApplyDO minApplyTypeByStoreCode = preFryQualificationApplyDAO.getMinApplyTypeByStoreCode(addPreFryRecordsDTO.getStoreCode());
|
||||||
|
if (minApplyTypeByStoreCode==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRE_FRY_APPLY_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (addPreFryRecordsDTO!=null&&CollectionUtils.isNotEmpty(addPreFryRecordsDTO.getRecords())){
|
||||||
|
List<Long> productList = addPreFryRecordsDTO.getRecords().stream().map(AddPreFryRecordsDetailDTO::getProductId).collect(Collectors.toList());
|
||||||
|
List<PreFriedProductsDO> preFriedProductsDOS = preFriedProductsDAO.selectByProductIds(productList);
|
||||||
|
//校验是否包含下架的产品 recordId是空的时候是新增 是有新增的时候限制
|
||||||
|
if (preFriedProductsDOS.stream().anyMatch(e->e.getStatus()==0)&&addPreFryRecordsDTO.getRecords().get(0).getRecordId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PRODUCTS_STATUS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//如果出现优先级升高的情况 优先级低的只有报废可选择 1的优先级最高 3最低
|
||||||
|
if (minApplyTypeByStoreCode.getApplyType()<addPreFryRecordsDTO.getApplyType()
|
||||||
|
&&addPreFryRecordsDTO.getCurrentStage()!= DISCARDED.getCode()){
|
||||||
|
//当前有更优选择,请确认
|
||||||
|
throw new ServiceException(ErrorCodeEnum.CURRENT_STAGE_NOT_OPERATION);
|
||||||
|
}
|
||||||
|
//只有当最高类型是1/3且是预炸完成 或者 2 且放入展示柜 新增一条预炸记录 其他情况只新增阶段记录表
|
||||||
|
List<PreFryStageChangesDO> list = new ArrayList<>();
|
||||||
|
if (addPreFryRecordsFlag(minApplyTypeByStoreCode.getApplyType(), addPreFryRecordsDTO.getCurrentStage())){
|
||||||
|
addPreFryRecordsDTO.getRecords().forEach(x->{
|
||||||
|
if (x.getProductId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFryRecordsDO preFryRecordsDO = new PreFryRecordsDO();
|
||||||
|
preFryRecordsDO.setStoreCode(addPreFryRecordsDTO.getStoreCode());
|
||||||
|
preFryRecordsDO.setProductId(x.getProductId());
|
||||||
|
preFryRecordsDO.setFryDate(new Date());
|
||||||
|
preFryRecordsDO.setRecordCode(getRecordCode());
|
||||||
|
preFryRecordsDO.setFryCompleteTime(new Date());
|
||||||
|
preFryRecordsDO.setLatestSaleTime(getLatestSaleTime(minApplyTypeByStoreCode.getApplyType()));
|
||||||
|
preFryRecordsDO.setCurrentStage(addPreFryRecordsDTO.getCurrentStage());
|
||||||
|
preFryRecordsDO.setCurrentApplyType(minApplyTypeByStoreCode.getApplyType());
|
||||||
|
preFryRecordsDAO.insert(preFryRecordsDO);
|
||||||
|
PreFryStageChangesDO preFryStageChangesDO = new PreFryStageChangesDO();
|
||||||
|
preFryStageChangesDO.setStage(preFryRecordsDO.getCurrentStage());
|
||||||
|
preFryStageChangesDO.setRecordId(preFryRecordsDO.getId());
|
||||||
|
preFryStageChangesDO.setImage1(x.getImage1());
|
||||||
|
preFryStageChangesDO.setImage2(x.getImage2());
|
||||||
|
preFryStageChangesDO.setOperatorName(user.getUsername());
|
||||||
|
list.add(preFryStageChangesDO);
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
List<Long> recordList= new ArrayList<>();
|
||||||
|
addPreFryRecordsDTO.getRecords().forEach(x->{
|
||||||
|
if (x.getRecordId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
PreFryStageChangesDO preFryStageChangesDO = new PreFryStageChangesDO();
|
||||||
|
preFryStageChangesDO.setStage(addPreFryRecordsDTO.getCurrentStage());
|
||||||
|
preFryStageChangesDO.setRecordId(x.getRecordId());
|
||||||
|
preFryStageChangesDO.setImage1(x.getImage1());
|
||||||
|
preFryStageChangesDO.setImage2(x.getImage2());
|
||||||
|
preFryStageChangesDO.setOperatorName(user.getUsername());
|
||||||
|
preFryStageChangesDO.setCreatedTime(new Date());
|
||||||
|
recordList.add(x.getRecordId());
|
||||||
|
list.add(preFryStageChangesDO);
|
||||||
|
});
|
||||||
|
preFryRecordsDAO.batchUpdateStageByIds(recordList,addPreFryRecordsDTO.getCurrentStage());
|
||||||
|
handleViolationFlag(recordList,addPreFryRecordsDTO.getApplyType(),addPreFryRecordsDTO.getCurrentStage(),list);
|
||||||
|
}
|
||||||
|
preFryStageChangesDAO.batchInsert(list);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void handleViolationFlag(List<Long> recordList ,Integer applyType,Integer currentStage,List<PreFryStageChangesDO> list) {
|
||||||
|
//如果最高级优先级是冷藏展示柜 计算是否违规 冷却时间小于15分钟或者大于25分钟 违规 冰箱取出时间距离预炸完成时间超过24小时
|
||||||
|
if (PreFryApplyTypeEnum.HAS_REFRIGERATED_DISPLAY.getCode()==applyType&&
|
||||||
|
(STORED_IN_DISPLAY_CABINET.getCode()==currentStage||STORED_IN_FRIDGE.getCode()==currentStage)){
|
||||||
|
List<PreFryRecordsDO> records = preFryRecordsDAO.queryByIds(recordList);
|
||||||
|
Map<Long,PreFryRecordsDO> recordMap = records.stream().collect(Collectors.toMap(PreFryRecordsDO::getId, data->data));
|
||||||
|
//list 转为 map 记录id与创建时间
|
||||||
|
Map<Long,Date> listMap = list.stream().collect(Collectors.toMap(PreFryStageChangesDO::getRecordId, PreFryStageChangesDO::getCreatedTime));
|
||||||
|
List<ViolationDTO> violationList = new ArrayList<>();
|
||||||
|
if (STORED_IN_DISPLAY_CABINET.getCode()==currentStage){
|
||||||
|
recordList.forEach(x->{
|
||||||
|
PreFryRecordsDO preFryRecordsDO = recordMap.get(x);
|
||||||
|
Long time = getTime(preFryRecordsDO.getFryCompleteTime(), listMap.get(x));
|
||||||
|
if (time!=null&&(time<15||time>25)){
|
||||||
|
ViolationDTO violationDTO = new ViolationDTO();
|
||||||
|
violationDTO.setId(x);
|
||||||
|
violationDTO.setViolationFlag(ViolationEnum.COOLING_TIME_EXCEEDED.getCode());
|
||||||
|
violationDTO.setViolationReason(String.format(",%d,", ViolationEnum.COOLING_TIME_EXCEEDED.getCode()));
|
||||||
|
violationList.add(violationDTO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else if (STORED_IN_FRIDGE.getCode()==currentStage){
|
||||||
|
recordList.forEach(x->{
|
||||||
|
PreFryRecordsDO preFryRecordsDO = recordMap.get(x);
|
||||||
|
Long time = getTime(preFryRecordsDO.getFryCompleteTime(), listMap.get(x));
|
||||||
|
if (time!=null&&time>24*60){
|
||||||
|
ViolationDTO violationDTO = new ViolationDTO();
|
||||||
|
violationDTO.setId(x);
|
||||||
|
violationDTO.setViolationFlag(ViolationEnum.STORAGE_TIME_EXCEEDED.getCode());
|
||||||
|
if (StringUtils.isEmpty(preFryRecordsDO.getViolationReason())){
|
||||||
|
violationDTO.setViolationReason(String.format(",%d,", ViolationEnum.STORAGE_TIME_EXCEEDED.getCode()));
|
||||||
|
}else {
|
||||||
|
violationDTO.setViolationReason(preFryRecordsDO.getViolationReason()+String.format("%d,", ViolationEnum.STORAGE_TIME_EXCEEDED.getCode()));
|
||||||
|
}
|
||||||
|
violationList.add(violationDTO);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!violationList.isEmpty()) {
|
||||||
|
preFryRecordsDAO.batchUpdateViolation(violationList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long getTime(Date startTime,Date endTime){
|
||||||
|
if (startTime==null||endTime==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return CoolDateUtils.getMinutesBetween(startTime,endTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreFryRecordsDetailDTO> ListByStoreCodeAndDate(FryRecordsQueryDTO dto) {
|
||||||
|
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||||
|
if (dto.getCurrentDate()==null|| StringUtils.isBlank(dto.getStoreCode())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryRecordsDO> preFryRecordsDOS = preFryRecordsDAO.selectByStoreAndDateStage(dto.getStoreCode(),dto.getApplyType(), DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,dto.getCurrentDate()));
|
||||||
|
PageInfo result = new PageInfo<>(preFryRecordsDOS);
|
||||||
|
if (CollectionUtils.isEmpty(preFryRecordsDOS)){
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
List<Long> recordIdList = preFryRecordsDOS.stream().map(PreFryRecordsDO::getId).collect(Collectors.toList());
|
||||||
|
List<PreFryStageImagesDTO> stageImagesDTOS = preFryStageChangesDAO.selectByRecordIdList(recordIdList);
|
||||||
|
List<Long> productIdList = preFryRecordsDOS.stream().map(PreFryRecordsDO::getProductId).collect(Collectors.toList());
|
||||||
|
List<PreFriedProductsDO> preFriedProductsDOS = preFriedProductsDAO.selectByProductIds(productIdList);
|
||||||
|
Map<Long, PreFriedProductsDO> preFriedProductsDOSMap = preFriedProductsDOS.stream().collect(Collectors.toMap(PreFriedProductsDO::getId, x -> x));
|
||||||
|
//将数据根据recordId分组 并根据id排序
|
||||||
|
Map<Long, List<PreFryStageImagesDTO>> stageImagesDTOMap =
|
||||||
|
stageImagesDTOS.stream().collect(Collectors.groupingBy(PreFryStageImagesDTO::getRecordId));
|
||||||
|
List<PreFryRecordsDetailDTO> list = new ArrayList<>();
|
||||||
|
preFryRecordsDOS.forEach(x->{
|
||||||
|
PreFryRecordsDetailDTO preFryRecordsDetailDTO = new PreFryRecordsDetailDTO();
|
||||||
|
preFryRecordsDetailDTO.setId(x.getId());
|
||||||
|
preFryRecordsDetailDTO.setStoreCode(x.getStoreCode());
|
||||||
|
preFryRecordsDetailDTO.setProductId(x.getProductId());
|
||||||
|
preFryRecordsDetailDTO.setProductCode(preFriedProductsDOSMap.getOrDefault(x.getProductId(),new PreFriedProductsDO()).getProductCode());
|
||||||
|
preFryRecordsDetailDTO.setProductName(preFriedProductsDOSMap.getOrDefault(x.getProductId(),new PreFriedProductsDO()).getProductName());
|
||||||
|
preFryRecordsDetailDTO.setProductImageUrl(preFriedProductsDOSMap.getOrDefault(x.getProductId(),new PreFriedProductsDO()).getProductImage());
|
||||||
|
preFryRecordsDetailDTO.setFryCompleteTime(x.getFryCompleteTime());
|
||||||
|
preFryRecordsDetailDTO.setLatestSaleTime(x.getLatestSaleTime());
|
||||||
|
preFryRecordsDetailDTO.setCurrentStage(x.getCurrentStage());
|
||||||
|
preFryRecordsDetailDTO.setCurrentApplyType(x.getCurrentApplyType());
|
||||||
|
preFryRecordsDetailDTO.setStageHistory(stageImagesDTOMap.getOrDefault(x.getId(),new ArrayList<>()));
|
||||||
|
list.add(preFryRecordsDetailDTO);
|
||||||
|
});
|
||||||
|
result.setList( list);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PreFryRecordsDetailDTO getById(Long id) {
|
||||||
|
PreFryRecordsDO preFryRecordsDO = preFryRecordsDAO.queryById(id);
|
||||||
|
if (preFryRecordsDO == null) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
List<PreFryStageImagesDTO> preFryStageImagesDTOS = preFryStageChangesDAO.selectByRecordId(id);
|
||||||
|
PreFriedProductsDO preFriedProductsDO = preFriedProductsDAO.queryById(preFryRecordsDO.getProductId());
|
||||||
|
StoreDO store = storeDao.getByStoreNum(preFryRecordsDO.getStoreCode());
|
||||||
|
PreFryRecordsDetailDTO preFryRecordsDetailDTO = new PreFryRecordsDetailDTO();
|
||||||
|
if (store != null) {
|
||||||
|
preFryRecordsDetailDTO.setStoreName(store.getStoreName());
|
||||||
|
}
|
||||||
|
preFryRecordsDetailDTO.setId(preFryRecordsDO.getId());
|
||||||
|
preFryRecordsDetailDTO.setStoreCode(preFryRecordsDO.getStoreCode());
|
||||||
|
preFryRecordsDetailDTO.setProductId(preFryRecordsDO.getProductId());
|
||||||
|
preFryRecordsDetailDTO.setRecordCode(preFryRecordsDO.getRecordCode());
|
||||||
|
if (preFriedProductsDO!=null){
|
||||||
|
preFryRecordsDetailDTO.setProductName(preFriedProductsDO.getProductName());
|
||||||
|
preFryRecordsDetailDTO.setProductImageUrl(preFriedProductsDO.getProductImage());
|
||||||
|
preFryRecordsDetailDTO.setProductCode(preFriedProductsDO.getProductCode());
|
||||||
|
}
|
||||||
|
preFryRecordsDetailDTO.setFryCompleteTime(preFryRecordsDO.getFryCompleteTime());
|
||||||
|
preFryRecordsDetailDTO.setLatestSaleTime(preFryRecordsDO.getLatestSaleTime());
|
||||||
|
preFryRecordsDetailDTO.setCurrentStage(preFryRecordsDO.getCurrentStage());
|
||||||
|
preFryRecordsDetailDTO.setCurrentApplyType(preFryRecordsDO.getCurrentApplyType());
|
||||||
|
preFryRecordsDetailDTO.setViolationFlag(preFryRecordsDO.getViolationFlag());
|
||||||
|
preFryRecordsDetailDTO.setViolationReason(getViolationReasonChinese(preFryRecordsDO.getViolationReason()));
|
||||||
|
preFryRecordsDetailDTO.setStageHistory(preFryStageImagesDTOS);
|
||||||
|
return preFryRecordsDetailDTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DailyFryCountDTO> queryByStoreCode(String storeCode,Long time) {
|
||||||
|
return preFryRecordsDAO.selectDailyFryCountInCurrentMonth(storeCode, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PreFryRecordsDTO> queryByQueryDTO(PreFryRecordQueryDTO dto) {
|
||||||
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||||
|
List<PreFryRecordsDTO> preFryRecordQueryDTOS = preFryRecordsDAO.selectByQueryDTO(dto);
|
||||||
|
preFryRecordQueryDTOS.forEach(x->{
|
||||||
|
x.setViolationReason(getViolationReasonChinese(x.getViolationReason()));
|
||||||
|
});
|
||||||
|
PageInfo<PreFryRecordsDTO> preFryRecordQueryDTOPageInfo = new PageInfo<>(preFryRecordQueryDTOS);
|
||||||
|
return preFryRecordQueryDTOPageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Boolean addPreFryRecordsFlag(Integer applyType,Integer stage){
|
||||||
|
if (applyType== PreFryApplyTypeEnum.HAS_REFRIGERATED_DISPLAY.getCode() && stage== PRE_FRY_COMPLETED.getCode()){
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}else if (applyType == PreFryApplyTypeEnum.NO_DISPLAY.getCode() && stage== PRE_FRY_COMPLETED.getCode()){
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
if (applyType==PreFryApplyTypeEnum.HAS_NORMAL_DISPLAY.getCode() && stage== STORED_IN_DISPLAY_CABINET.getCode()){
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
return Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Date getLatestSaleTime(Integer applyType) {
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
if (applyType == PreFryApplyTypeEnum.HAS_REFRIGERATED_DISPLAY.getCode()) {
|
||||||
|
// 冷藏展示柜加24小时
|
||||||
|
calendar.add(Calendar.HOUR_OF_DAY, 24);
|
||||||
|
} else {
|
||||||
|
// 常温展示柜或无展示柜加4小时
|
||||||
|
calendar.add(Calendar.HOUR_OF_DAY, 4);
|
||||||
|
}
|
||||||
|
return calendar.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecordCode() {
|
||||||
|
//当前日期
|
||||||
|
String today = CoolDateUtils.getToday();
|
||||||
|
return "14" + today + String.format("%04d", ThreadLocalRandom.current().nextInt(100000));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据违规原因字符串获取中文描述
|
||||||
|
* @param violationReason 违规原因字符串,格式如 ",1,2,"、",1," 或 ",2,"
|
||||||
|
* @return 格式化后的中文违规原因,如 "冷却时间超标,存储时间超标"
|
||||||
|
*/
|
||||||
|
public String getViolationReasonChinese(String violationReason) {
|
||||||
|
if (StringUtils.isBlank(violationReason)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分割字符串并过滤有效数字
|
||||||
|
List<Integer> reasonCodes = Arrays.stream(violationReason.split(","))
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.map(String::trim)
|
||||||
|
.map(Integer::valueOf)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// 转换为中文描述
|
||||||
|
return reasonCodes.stream()
|
||||||
|
.map(code -> ViolationEnum.getByCode(code))
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.map(ViolationEnum::getDescription)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -34,6 +34,7 @@ import com.github.pagehelper.PageInfo;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -59,6 +60,8 @@ import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ShopServiceImpl implements ShopService {
|
public class ShopServiceImpl implements ShopService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LinePayDAO linePayDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private OldShopDAO oldShopDAO;
|
private OldShopDAO oldShopDAO;
|
||||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
@@ -231,10 +234,16 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
// //进入选址不允许删除操作
|
// //进入选址不允许删除操作
|
||||||
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
// }
|
// }
|
||||||
// ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_3);
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
// if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||||
// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
|
||||||
// }
|
}
|
||||||
|
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(request.getShopId());
|
||||||
|
if (ListUtils.emptyIfNull(franchiseFeePayInfoByShopId)
|
||||||
|
.stream()
|
||||||
|
.anyMatch(lineInfoDO->lineInfoDO.getXgjClaimStatus().equals(ClaimStatusEnum.CLAIMED.getCode()))){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.IS_EXIST_CLAIM);
|
||||||
|
}
|
||||||
// if (Objects.nonNull(shopInfo.getPointId())) {
|
// if (Objects.nonNull(shopInfo.getPointId())) {
|
||||||
// PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
// PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||||
// if (Objects.nonNull(pointInfo) && SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())) {
|
// if (Objects.nonNull(pointInfo) && SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())) {
|
||||||
|
|||||||
@@ -203,9 +203,9 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
|||||||
* @param millis 毫秒数
|
* @param millis 毫秒数
|
||||||
* @return 时间
|
* @return 时间
|
||||||
*/
|
*/
|
||||||
public static String getDateByMillis(long millis) {
|
public static String getDateByMillis(long millis,String format) {
|
||||||
//12小时制
|
//12小时制
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
date.setTime(millis);
|
date.setTime(millis);
|
||||||
return simpleDateFormat.format(date);
|
return simpleDateFormat.format(date);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class OpenApiValidateFilter implements Filter {
|
|||||||
}
|
}
|
||||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||||
//statusRefresh 放开不需要验签
|
//statusRefresh 放开不需要验签
|
||||||
if(uri.startsWith("/zxjp/open/v1/statusRefresh")){
|
if(uri.startsWith("/zxjp/open/v1/")){
|
||||||
filterChain.doFilter(servletRequest, response);
|
filterChain.doFilter(servletRequest, response);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryRecordsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 20:36
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-预炸记录-PC")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/pre/record/")
|
||||||
|
public class PCPreFryRecordsController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryRecordsService preFryRecordsService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸品管理记录")
|
||||||
|
@PostMapping("/queryByQueryDTO")
|
||||||
|
public ResponseResult<PageInfo<PreFryRecordsDTO>> queryByQueryDTO(@RequestBody @Validated PreFryRecordQueryDTO dto) {
|
||||||
|
log.info("预炸品管理记录:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryRecordsService.queryByQueryDTO(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸记录详情列表")
|
||||||
|
@GetMapping("/queryById")
|
||||||
|
public ResponseResult<PreFryRecordsDetailDTO> queryById(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("预炸记录详情:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryRecordsService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsBatchDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.request.AddPointDetailRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:19
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/pre/fry/")
|
||||||
|
public class PreFryController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsService preFriedProductsService;
|
||||||
|
|
||||||
|
@ApiOperation("新增预炸品")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public ResponseResult<Long> createProduct(@RequestBody @Validated PreFriedProductsDTO dto) {
|
||||||
|
log.info("新增预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.createProduct( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改预炸品")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResponseResult<Long> updateProduct(@RequestBody @Validated PreFriedProductsDTO dto) {
|
||||||
|
log.info("修改预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.updateProduct( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除预炸品")
|
||||||
|
@PostMapping("/batchDelete")
|
||||||
|
public ResponseResult<Integer> batchDelete(@RequestBody @Validated PreFriedProductsBatchDTO dto) {
|
||||||
|
log.info("批量删除预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.batchDelete( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("批量上下架商品")
|
||||||
|
@PostMapping("/batchUpdateStatus")
|
||||||
|
public ResponseResult<Integer> batchUpdateStatus(@RequestBody @Validated PreFriedProductsBatchDTO dto) {
|
||||||
|
log.info("批量删除预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.batchUpdateStatus( dto, CurrentUserHolder.getUser().getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品列表")
|
||||||
|
@PostMapping("/queryProducts")
|
||||||
|
public ResponseResult<PageInfo<PreFriedProductsDetailDTO>> queryProducts(@RequestBody @Validated PreFriedProductsQueryDTO dto) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryProducts(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品详情")
|
||||||
|
@GetMapping("/queryById")
|
||||||
|
public ResponseResult<PreFriedProductsDetailDTO> queryById(@RequestParam(required = true, value = "productId") Long productId) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(productId));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryById(productId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 18:03
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-申请")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/pre/apply/")
|
||||||
|
public class PreFryQualificationApplyController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyService preFryQualificationApplyService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请管理列表")
|
||||||
|
@PostMapping("/queryApplyManagementList")
|
||||||
|
public ResponseResult<PageInfo<ApplyManagementDTO>> queryApplyManagementList(@RequestBody @Validated ApplyManagementQueryDTO dto) {
|
||||||
|
log.info("预炸资质申请管理列表:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.queryApplyManagementList( dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据申请ID获取审批记录列表")
|
||||||
|
@GetMapping("/getApprovalRecordById")
|
||||||
|
public ResponseResult<List<ApprovalRecordDTO>> getApprovalRecordById(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("根据申请ID获取审批记录列表:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApprovalRecordById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请详情")
|
||||||
|
@GetMapping("/getApplyDetail")
|
||||||
|
public ResponseResult<ApplyDetailDTO> getApplyDetail(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApplyDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("申请审批 取消资格")
|
||||||
|
@PostMapping("/audit")
|
||||||
|
public ResponseResult<Boolean> audit(@RequestBody @Validated ApplyAuditDTO dto) {
|
||||||
|
log.info("预炸资质申请管理列表:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.audit(dto,CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsDetailDTO;
|
||||||
|
import com.cool.store.dto.pre.fry.PreFriedProductsQueryDTO;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFriedProductsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
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.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 13:38
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-小程序端")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/pre/fry/")
|
||||||
|
public class MiniPreFryController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFriedProductsService preFriedProductsService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询预炸品列表")
|
||||||
|
@PostMapping("/queryProducts")
|
||||||
|
public ResponseResult<PageInfo<PreFriedProductsDetailDTO>> queryProducts(@RequestBody @Validated PreFriedProductsQueryDTO dto) {
|
||||||
|
log.info("查询预炸品:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFriedProductsService.queryProducts(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryQualificationApplyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/21 18:11
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-申请-小程序")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/pre/apply/")
|
||||||
|
public class MiniPreFryQualificationApplyController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryQualificationApplyService preFryQualificationApplyService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请提交")
|
||||||
|
@PostMapping("/submitApply")
|
||||||
|
public ResponseResult<Long> submitApply(@RequestBody @Validated ApplyDTO dto) {
|
||||||
|
log.info("预炸资质申请提交:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.submitApply( dto, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请重新提交")
|
||||||
|
@PostMapping("/reSubmitApply")
|
||||||
|
public ResponseResult<Long> reSubmitApply(@RequestBody @Validated ApplyDTO dto) {
|
||||||
|
log.info("预炸资质申请重新提交:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.reSubmitApply( dto, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸资质申请详情")
|
||||||
|
@GetMapping("/getApplyDetail")
|
||||||
|
public ResponseResult<ApplyDetailDTO> getApplyDetail(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("预炸资质申请详情:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApplyDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("根据门店编码和类型查询申请详情")
|
||||||
|
@GetMapping("/getByStoreCodeAndApplyType")
|
||||||
|
public ResponseResult<ApplyDTO> getByStoreCodeAndApplyType(@RequestParam(required = true, value = "storeCode") String storeCode,
|
||||||
|
@RequestParam(required = true, value = "applyType") Integer applyType) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getByStoreCodeAndApplyType(storeCode,applyType));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据申请ID获取审批记录列表")
|
||||||
|
@GetMapping("/getApprovalRecordById")
|
||||||
|
public ResponseResult<List<ApprovalRecordDTO>> getApprovalRecordById(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("根据申请ID获取审批记录列表:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getApprovalRecordById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取门店最高优先级申请类型")
|
||||||
|
@GetMapping("/getMinApplyType")
|
||||||
|
public ResponseResult<Integer> getMinApplyType(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getMinApplyType(storeCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据门店编码获取申请类型审批状态")
|
||||||
|
@GetMapping("/getListByStoreCode")
|
||||||
|
public ResponseResult<List<PreFryQualificationApplyDTO>> getListByStoreCode(@RequestParam(required = true, value = "storeCode") String storeCode) {
|
||||||
|
return ResponseResult.success(preFryQualificationApplyService.getListByStoreCode(storeCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.pre.fry.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.PreFryRecordsService;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/6/23 19:00
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "预炸-预炸记录")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/pre/record/")
|
||||||
|
public class PreFryRecordsController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PreFryRecordsService preFryRecordsService;
|
||||||
|
|
||||||
|
@ApiOperation("预炸记录-按日期查询是否有预炸记录")
|
||||||
|
@GetMapping("/queryByStoreCode")
|
||||||
|
public ResponseResult<List<DailyFryCountDTO>> queryByStoreCode(@RequestParam(required = true, value = "storeCode") String storeCode,
|
||||||
|
@RequestParam(required = true, value = "time") Long time) {
|
||||||
|
log.info("预炸记录-按日期查询是否有预炸记录:{}", JSONObject.toJSONString(storeCode));
|
||||||
|
return ResponseResult.success(preFryRecordsService.queryByStoreCode(storeCode,time));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸记录详情列表")
|
||||||
|
@GetMapping("/queryById")
|
||||||
|
public ResponseResult<PreFryRecordsDetailDTO> queryById(@RequestParam(required = true, value = "id") Long id) {
|
||||||
|
log.info("预炸记录详情:{}", JSONObject.toJSONString(id));
|
||||||
|
return ResponseResult.success(preFryRecordsService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("预炸批量新增")
|
||||||
|
@PostMapping("/batchAdd")
|
||||||
|
public ResponseResult<Boolean> batchInsert(@RequestBody @Validated AddPreFryRecordsDTO dto) {
|
||||||
|
log.info("批量新增:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryRecordsService.batchInsert(dto, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("预炸列表 根据门店编码与日期查询")
|
||||||
|
@PostMapping("/ListByStoreCodeAndDate")
|
||||||
|
public ResponseResult<PageInfo<PreFryRecordsDetailDTO>> ListByStoreCodeAndDate(@RequestBody @Validated FryRecordsQueryDTO dto) {
|
||||||
|
log.info("预炸列表 根据门店编码与日期查询:{}", JSONObject.toJSONString(dto));
|
||||||
|
return ResponseResult.success(preFryRecordsService.ListByStoreCodeAndDate(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#mysql config
|
#mysql config
|
||||||
default.datasource.url=jdbc:mysql://store10-coolstore.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_10027?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
default.datasource.url=jdbc:mysql://zx-coolstore.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_10027?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||||
default.datasource.username=coolstore
|
default.datasource.username=coolstore
|
||||||
default.datasource.password=CSCErYcXniNYm7bT
|
default.datasource.password=CSCErYcXniNYm7bT
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user