![]()
diff --git a/fuintAdmin_zt/src/views/components/Service/index.vue b/fuintAdmin_zt/src/views/components/Service/index.vue
index 22f3abb45..a75bfb88f 100644
--- a/fuintAdmin_zt/src/views/components/Service/index.vue
+++ b/fuintAdmin_zt/src/views/components/Service/index.vue
@@ -165,12 +165,16 @@
+
+
+
@@ -448,7 +452,7 @@
enterThePetrolStation() {
- if (this.from.status == 'jy') {
+ if (this.from.status === 'jy') {
this.$message('该油站已被禁用');
return
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java
index 722d1c0b2..38e74b1e2 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/OilPresetPricesMapper.java
@@ -21,6 +21,13 @@ public interface OilPresetPricesMapper extends BaseMapper
{
*/
public IPage selectOilPresetPricesList(Page page, @Param("presetPrices") OilPresetPrices presetPrices);
+
+ /**
+ * 将过期等待任务全部标为已失效
+ * @return
+ */
+ int editWaitByTime();
+
/**
* 根据id查询员工信息
* @param id
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml
index 9fe242be9..d8c30cc68 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilPresetPricesMapper.xml
@@ -100,5 +100,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update oil_preset_prices set job_id = #{jobId} where preset_id = #{presetId}
+
+ update oil_preset_prices set state = 'lose' where state = 'wait' and effective_time < now()
+
\ No newline at end of file
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java
index a74d26f17..3868c0f05 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/service/impl/OilPresetPricesServiceImpl.java
@@ -43,9 +43,19 @@ public class OilPresetPricesServiceImpl extends ServiceImpl selectOilPresetPricesList(Page page, OilPresetPrices presetPrices) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
presetPrices.setStoreId(nowAccountInfo.getStoreId());
+ editWaitByTime();
+
return baseMapper.selectOilPresetPricesList(page, presetPrices);
}
+ /**
+ * 将过期等待任务全部标为已失效
+ * @return
+ */
+ public boolean editWaitByTime() {
+ return baseMapper.editWaitByTime()>0;
+ }
+
@Override
public OilPresetPrices selectOilPresetPricesById(Integer id) {
return baseMapper.selectOilPresetPricesById(id);
@@ -66,8 +76,6 @@ public class OilPresetPricesServiceImpl extends ServiceImpl
and (csi.store_name like concat('%',#{chainStoreInfo.storeName},'%') or ms.name like concat('%',#{chainStoreInfo.storeName},'%'))
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java
index d691553cb..7cc061a80 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/store/service/impl/StoreServiceImpl.java
@@ -403,8 +403,8 @@ public class StoreServiceImpl extends ServiceImpl implem
res.put(flag,false);
return res;
}
-// if (redisTemplate.hasKey(flag)) {
- if (true) {
+ if (redisTemplate.hasKey(flag)) {
+// if (true) {
// 找到站长的
Map param = new HashMap();
@@ -445,13 +445,8 @@ public class StoreServiceImpl extends ServiceImpl implem
return res;
}
-// mtStoreMapper.getAccountByRole(12);
- // 生成token
- // 返回token
-
-
-// redisTemplate.delete(flag);
+ redisTemplate.delete(flag);
return res;
} else {
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java
index 886586984..44b21eb7a 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/LJStoreServiceImpl.java
@@ -128,6 +128,7 @@ public class LJStoreServiceImpl extends ServiceImpl impl
// 查询店铺列表信息
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("status","qy");
+ queryWrapper.eq("if_delete","0");
queryWrapper.eq("chain_store_id",chainStoreId);
List list = baseMapper.selectList(queryWrapper);
double earthRadius = 6371; // 地球半径,单位为公里
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java
index 2c9e0e669..7cad76c06 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/storeInformation/service/impl/QRCodeServiceImpl.java
@@ -94,9 +94,9 @@ public class QRCodeServiceImpl extends ServiceImpl impleme
if (ObjectUtil.isEmpty(qrCode1)){
qrCode.setStoreId(store.getId());
qrCode.setChainStoreId(store.getChainStoreId());
-// 带有店铺id 跳转首页
+ // 带有店铺id 跳转首页
qrCode.setCollection("https://www.tuofeng.cc/oilIndex?storeId="+store.getChainStoreId());
-// 带有店铺id 跳转一键加油页面
+ // 带有店铺id 跳转一键加油页面
qrCode.setPayment("https://www.tuofeng.cc/oilRefuel?storeId="+store.getChainStoreId());
row = baseMapper.insert(qrCode);
IndexBanner indexBanner = new IndexBanner();
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/controller/SysDeptController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/controller/SysDeptController.java
index f1b53fad5..57c580613 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/controller/SysDeptController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/controller/SysDeptController.java
@@ -85,26 +85,6 @@ public class SysDeptController extends BaseController
return getFailureResult("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
int row = deptService.insertDept(dept);
- SysDept sysDept = deptService.selectSysDeptByName(dept.getDeptName());
- if (ObjectUtil.isNotEmpty(sysDept)){
- LJStore store = storeService.selectStoreByDeptId(sysDept.getDeptId());
- QRCode qrCode = new QRCode();
- iqrCodeService.insertQRCode(qrCode,store.getId());
- LJUserGrade userGrade = new LJUserGrade();
- userGrade.setStoreId(store.getId());
- userGrade.setGrade(1);
- userGrade.setName("普通会员");
- userGrade.setStatus("qy");
- userGrade.setGrowthValue(1);
- userGrade.setPreferential("自定义优惠");
- userGrade.setGasolineDiscount("无优惠");
- userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]");
- userGrade.setDieselDiscount("无优惠");
- userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]");
- userGrade.setNaturalGasDiscount("无优惠");
- userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]");
- userGradeService.insertUserGrade(userGrade,store.getId());
- }
return getSuccessResult(row);
}
@@ -115,6 +95,7 @@ public class SysDeptController extends BaseController
public ResponseObject edit(@Validated @RequestBody SysDept dept)
{
Long deptId = dept.getDeptId();
+ Long parentId = dept.getParentId();
if (!deptService.checkDeptNameUnique(dept))
{
return getFailureResult("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
@@ -127,6 +108,9 @@ public class SysDeptController extends BaseController
{
return getFailureResult("该部门包含未停用的子部门!");
}
+ else if (StringUtils.equals(UserConstants.DEPT_NORMAL, dept.getStatus()) && deptService.selectStatusByParentId(parentId) > 0) {
+ return getFailureResult("该部门的父级部门未启用!");
+ }
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
dept.setCreateBy(nowAccountInfo.getId().toString());
return getSuccessResult(deptService.updateDept(dept));
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/SysDeptMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/SysDeptMapper.java
index f07c9c0f5..3f973cb98 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/SysDeptMapper.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/SysDeptMapper.java
@@ -54,6 +54,9 @@ public interface SysDeptMapper extends BaseMapper
*/
public int selectNormalChildrenDeptById(Long deptId);
+
+ int selectStatusByParentId(Long parentId);
+
/**
* 是否存在子节点
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/xml/SysDeptMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/xml/SysDeptMapper.xml
index e1f2f5c4e..3f6eee40d 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/xml/SysDeptMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/mapper/xml/SysDeptMapper.xml
@@ -64,7 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
update sys_dept set status = 'jy' where turnover_time > NOW() and turnoverType = 2
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/ISysDeptService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/ISysDeptService.java
index 95e3b89fa..a749a3712 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/ISysDeptService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/ISysDeptService.java
@@ -63,6 +63,12 @@ public interface ISysDeptService extends IService
*/
public int selectNormalChildrenDeptById(Long deptId);
+ /**
+ * 查询是否有父级部门未启用
+ * @param parentId
+ * @return
+ */
+ int selectStatusByParentId(Long parentId);
/**
* 是否存在部门子节点
*
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java
index 66f430b56..265ce6b59 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/system/dept/service/impl/SysDeptServiceImpl.java
@@ -9,12 +9,19 @@ import com.fuint.business.store.entity.ChainStoreInfo;
import com.fuint.business.store.entity.MtStore;
import com.fuint.business.store.service.ChainStoreInfoService;
import com.fuint.business.store.service.StoreService;
+import com.fuint.business.storeInformation.entity.LJStore;
+import com.fuint.business.storeInformation.entity.QRCode;
+import com.fuint.business.storeInformation.service.ILJStoreService;
+import com.fuint.business.storeInformation.service.IQRCodeService;
+import com.fuint.business.userManager.entity.LJUserGrade;
+import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.constant.UserConstants;
import com.fuint.common.domain.TreeSelect;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.Convert;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
+import com.fuint.framework.exception.BusinessCheckException;
import com.fuint.system.dept.entity.SysDept;
import com.fuint.system.dept.mapper.SysDeptMapper;
import com.fuint.system.dept.service.ISysDeptService;
@@ -26,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
/**
@@ -140,6 +148,16 @@ public class SysDeptServiceImpl extends ServiceImpl imple
return baseMapper.selectNormalChildrenDeptById(deptId);
}
+ /**
+ * 查询是否有父级部门未启用
+ * @param parentId
+ * @return
+ */
+ @Override
+ public int selectStatusByParentId(Long parentId) {
+ return baseMapper.selectStatusByParentId(parentId);
+ }
+
/**
* 是否存在子节点
*
@@ -192,7 +210,10 @@ public class SysDeptServiceImpl extends ServiceImpl imple
return baseMapper.selectOne(queryWrapper);
}
-
+ @Autowired
+ private IQRCodeService iqrCodeService;
+ @Autowired
+ private LJUserGradeService userGradeService;
/**
* 新增保存部门信息
*
@@ -228,6 +249,25 @@ public class SysDeptServiceImpl extends ServiceImpl imple
store.setChainStoreId(chainStoreInfo.getId());
store.setContractDeptId(dept.getDeptId());
storeService.save(store);
+
+
+ QRCode qrCode = new QRCode();
+ iqrCodeService.insertQRCode(qrCode,store.getId());
+ LJUserGrade userGrade = new LJUserGrade();
+ userGrade.setStoreId(store.getId());
+ userGrade.setGrade(1);
+ userGrade.setName("普通会员");
+ userGrade.setStatus("qy");
+ userGrade.setGrowthValue(1);
+ userGrade.setPreferential("自定义优惠");
+ userGrade.setGasolineDiscount("无优惠");
+ userGrade.setGasolineRule("[{\"gasolineRule1\":1,\"gasolineRule2\":1,\"gasolineRule3\":1}]");
+ userGrade.setDieselDiscount("无优惠");
+ userGrade.setDieselRule("[{\"dieselRule1\":1,\"dieselRule2\":1,\"dieselRule3\":1}]");
+ userGrade.setNaturalGasDiscount("无优惠");
+ userGrade.setNaturalGasRule("[{\"naturalGas1\":1,\"naturalGas2\":1,\"naturalGas3\":1}]");
+ userGradeService.insertUserGrade(userGrade,store.getId());
+
}else {
throw new Exception("数据有误,请联系管理员");
}
@@ -269,6 +309,7 @@ public class SysDeptServiceImpl extends ServiceImpl imple
* @return 结果
*/
@Override
+ @Transactional
public int updateDept(SysDept dept)
{
SysDept newParentDept = baseMapper.selectDeptById(dept.getParentId());
@@ -285,12 +326,17 @@ public class SysDeptServiceImpl extends ServiceImpl imple
queryWrapper.eq(ChainStoreInfo::getContractDeptId,dept.getDeptId());
ChainStoreInfo chainStoreInfo = chainStoreService.getOne(queryWrapper);
chainStoreInfo.setStoreName(dept.getDeptName());
+ chainStoreInfo.setStatus(dept.getStatus());
chainStoreService.updateById(chainStoreInfo);
}else if (dept.getDeptType().equals("3")){
LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(MtStore::getContractDeptId,dept.getDeptId());
MtStore store = storeService.getOne(queryWrapper);
+ if (ObjectUtil.isEmpty(store)) {
+ throw new RuntimeException("该油站不存在!");
+ }
store.setName(dept.getDeptName());
+ store.setStatus(dept.getStatus());
storeService.updateById(store);
}
int result = baseMapper.updateById(dept);
@@ -309,7 +355,9 @@ public class SysDeptServiceImpl extends ServiceImpl imple
*/
private void updateParentDeptStatusNormal(SysDept dept)
{
- baseMapper.updateDeptStatusNormal(dept.getAncestors());
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(dept.getAncestors()).append(",").append(dept.getDeptId());
+ baseMapper.updateDeptStatusNormal(stringBuilder.toString());
}
/**
diff --git a/fuintBackend/fuint-application/src/main/resources/application.properties b/fuintBackend/fuint-application/src/main/resources/application.properties
index 1caed276c..ea3374b24 100644
--- a/fuintBackend/fuint-application/src/main/resources/application.properties
+++ b/fuintBackend/fuint-application/src/main/resources/application.properties
@@ -2,7 +2,7 @@
server.port=8008
env.profile=dev
#env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
-env.properties.path=D:/oil/oil/oilSystem/fuintBackend/configure/
+env.properties.path=D:/code/oilSystem/fuintBackend/configure/
diff --git a/fuintCashierWeb/.env.development b/fuintCashierWeb/.env.development
index 65f43be4b73d4304ffec3d03f0c3696e2c501b2d..0c1d6d4a1a407c09a3fda577588e4bae517e1c77 100644
GIT binary patch
delta 32
dcmZ3;w2)~7C!>V9g_VVYfrY+07Xvcj0sv!f1N;C0
delta 32
dcmZ3;w2)~7C!>Usp_PS!g@L|07Xvcj0svxN1MmO<
diff --git a/gasStation-uni/pages/index/index.vue b/gasStation-uni/pages/index/index.vue
index edf0c8149..ea3ca8cd8 100644
--- a/gasStation-uni/pages/index/index.vue
+++ b/gasStation-uni/pages/index/index.vue
@@ -70,8 +70,8 @@
¥ {{oilInfo.oilPrice}}
- 国际价
- ¥ {{oilInfo.oilPrice}}
+ 国标价
+ ¥ {{oilInfo.gbPrice}}