bug
This commit is contained in:
parent
4237f313e8
commit
ed7b346706
@ -1018,23 +1018,25 @@ export default {
|
|||||||
// 是否开启等级功能
|
// 是否开启等级功能
|
||||||
getISEnableLevel(){
|
getISEnableLevel(){
|
||||||
getChainStoreConfig().then(response => {
|
getChainStoreConfig().then(response => {
|
||||||
this.isEnableLevel = response.data.isEnableLevel;
|
if (response.data) {
|
||||||
this.clear = response.data.isMonthClear;
|
this.isEnableLevel = response.data.isEnableLevel;
|
||||||
if (response.data.gasGrowthValue){
|
this.clear = response.data.isMonthClear;
|
||||||
this.gasGrowthValue = response.data.gasGrowthValue;
|
if (response.data.gasGrowthValue) {
|
||||||
}
|
this.gasGrowthValue = response.data.gasGrowthValue;
|
||||||
if (response.data.dieselGrowthValue) {
|
}
|
||||||
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
if (response.data.dieselGrowthValue) {
|
||||||
}
|
this.dieselGrowthValue = response.data.dieselGrowthValue;
|
||||||
if (response.data.naturalGrowthValue) {
|
}
|
||||||
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
if (response.data.naturalGrowthValue) {
|
||||||
}
|
this.naturalGrowthValue = response.data.naturalGrowthValue;
|
||||||
if (response.data.isEnableLevel=="no"){
|
}
|
||||||
this.level1 = true;
|
if (response.data.isEnableLevel == "no") {
|
||||||
this.level2 = false;
|
this.level1 = true;
|
||||||
}else {
|
this.level2 = false;
|
||||||
this.level1 = false;
|
} else {
|
||||||
this.level2 = true;
|
this.level1 = false;
|
||||||
|
this.level2 = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// getSysConfig('is_enable_level').then(response => {
|
// getSysConfig('is_enable_level').then(response => {
|
||||||
@ -1116,7 +1118,7 @@ export default {
|
|||||||
// 查询连锁店配置信息
|
// 查询连锁店配置信息
|
||||||
getClearConfig(){
|
getClearConfig(){
|
||||||
getChainStoreConfig().then(response => {
|
getChainStoreConfig().then(response => {
|
||||||
this.clear = response.data.levelClearRule;
|
if (response.data) this.clear = response.data.levelClearRule;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 修改清算规则
|
// 修改清算规则
|
||||||
|
@ -489,6 +489,7 @@
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.form.id) {
|
if (!this.form.id) {
|
||||||
|
this.form.storeId = this.id;
|
||||||
this.form.posPrem = JSON.stringify(this.form.posPrem);
|
this.form.posPrem = JSON.stringify(this.form.posPrem);
|
||||||
this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
this.form.appletPrem = JSON.stringify(this.form.appletPrem);
|
||||||
addStaff(this.form).then(response => {
|
addStaff(this.form).then(response => {
|
||||||
|
@ -117,7 +117,7 @@ public class LJStaffController extends BaseController {
|
|||||||
@PostMapping("/mobile")
|
@PostMapping("/mobile")
|
||||||
public ResponseObject staffByMobile(@Validated @RequestBody Map<String ,String > map){
|
public ResponseObject staffByMobile(@Validated @RequestBody Map<String ,String > map){
|
||||||
String mobile = map.get("mobile");
|
String mobile = map.get("mobile");
|
||||||
LJStaff staff = mtStaffService.selectStaffByMobile(mobile);
|
LJStaff staff = mtStaffService.selectStaffByMobile(mobile,null);
|
||||||
return getSuccessResult(staff);
|
return getSuccessResult(staff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public interface ILJStaffService extends IService<LJStaff> {
|
|||||||
* @param mobile
|
* @param mobile
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public LJStaff selectStaffByMobile(String mobile);
|
public LJStaff selectStaffByMobile(String mobile,Integer storeId);
|
||||||
public LJStaff selectStaffByMobile2(String mobile);
|
public LJStaff selectStaffByMobile2(String mobile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,6 +19,8 @@ import com.fuint.common.util.TokenUtil;
|
|||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import com.fuint.module.backendApi.controller.BackendFileController;
|
import com.fuint.module.backendApi.controller.BackendFileController;
|
||||||
import com.fuint.repository.model.TAccount;
|
import com.fuint.repository.model.TAccount;
|
||||||
|
import com.fuint.system.role.entity.TDuty;
|
||||||
|
import com.fuint.system.role.service.DutyService;
|
||||||
import com.fuint.utils.Digests;
|
import com.fuint.utils.Digests;
|
||||||
import com.fuint.utils.Encodes;
|
import com.fuint.utils.Encodes;
|
||||||
import jdk.nashorn.internal.parser.Token;
|
import jdk.nashorn.internal.parser.Token;
|
||||||
@ -28,6 +30,7 @@ import org.springframework.mock.web.MockMultipartFile;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@ -45,6 +48,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
private AccountService accountService;
|
private AccountService accountService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private QrCodeUtils qrCodeUtils;
|
private QrCodeUtils qrCodeUtils;
|
||||||
|
@Resource
|
||||||
|
private DutyService tDutyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询员工信息
|
* 根据条件分页查询员工信息
|
||||||
@ -126,11 +131,14 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LJStaff selectStaffByMobile(String mobile) {
|
public LJStaff selectStaffByMobile(String mobile,Integer storeId) {
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
if (ObjectUtil.isEmpty(storeId)){
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
storeId = nowAccountInfo.getStoreId();
|
||||||
|
}
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
queryWrapper.eq("mobile",mobile);
|
queryWrapper.eq("mobile",mobile);
|
||||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
queryWrapper.eq("store_id",storeId);
|
||||||
queryWrapper.eq("if_delete","0");
|
queryWrapper.eq("if_delete","0");
|
||||||
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
LJStaff staff = baseMapper.selectOne(queryWrapper);
|
||||||
return staff;
|
return staff;
|
||||||
@ -176,19 +184,19 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertStaff(LJStaff staff) {
|
public int insertStaff(LJStaff staff) {
|
||||||
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile());
|
|
||||||
if (ObjectUtil.isNotEmpty(staff2)) return 0;
|
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
if (ObjectUtil.isNotEmpty(staff.getStoreId())) {
|
if (ObjectUtil.isNotEmpty(staff.getStoreId())) {
|
||||||
storeId = staff.getStoreId();
|
storeId = staff.getStoreId();
|
||||||
}
|
}
|
||||||
|
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile(),storeId);
|
||||||
|
if (ObjectUtil.isNotEmpty(staff2)) return 0;
|
||||||
staff.setStoreId(storeId);
|
staff.setStoreId(storeId);
|
||||||
if (StringUtils.isNotEmpty(staff.getRefundPassword())){
|
if (StringUtils.isNotEmpty(staff.getRefundPassword())){
|
||||||
this.entryptPassword(staff);
|
this.entryptPassword(staff);
|
||||||
}
|
}
|
||||||
int row = baseMapper.insert(staff);
|
int row = baseMapper.insert(staff);
|
||||||
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile());
|
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),storeId);
|
||||||
if (ObjectUtil.isNotEmpty(staff1)){
|
if (ObjectUtil.isNotEmpty(staff1)){
|
||||||
// 添加员工码
|
// 添加员工码
|
||||||
staff1.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId());
|
staff1.setStaffCode("https://www.tuofeng.cc/oilRefuel?storeId="+storeId+"&staffId="+staff1.getId());
|
||||||
@ -221,15 +229,16 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
}else {
|
}else {
|
||||||
account.setPassword("123456");
|
account.setPassword("123456");
|
||||||
}
|
}
|
||||||
|
TDuty tDuty = new TDuty();
|
||||||
accountService.createAccountInfo(account,null);
|
tDuty.setDutyId(Integer.valueOf(staff1.getRoleId()));
|
||||||
|
accountService.createAccountInfo(account,tDutyService.getDutyList(tDuty));
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int addStaff(LJStaff staff,TAccount tAccount) {
|
public int addStaff(LJStaff staff,TAccount tAccount) {
|
||||||
int row = baseMapper.insert(staff);
|
int row = baseMapper.insert(staff);
|
||||||
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile());
|
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),null);
|
||||||
if (ObjectUtil.isNotEmpty(staff1)){
|
if (ObjectUtil.isNotEmpty(staff1)){
|
||||||
tAccount.setStaffId(staff1.getId());
|
tAccount.setStaffId(staff1.getId());
|
||||||
accountService.updateAccount(tAccount);
|
accountService.updateAccount(tAccount);
|
||||||
@ -245,8 +254,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
@Override
|
@Override
|
||||||
public int updateStaff(LJStaff staff) {
|
public int updateStaff(LJStaff staff) {
|
||||||
int row = 0;
|
int row = 0;
|
||||||
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile());
|
LJStaff staff1 = this.selectStaffByMobile(staff.getMobile(),staff.getStoreId());
|
||||||
if (ObjectUtil.isNotEmpty(staff1) && staff1.getId() != staff.getId()){
|
if (ObjectUtil.isNotEmpty(staff1) && !staff1.getId().equals(staff.getId())){
|
||||||
row = 0;
|
row = 0;
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
@ -48,17 +48,19 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
|
|||||||
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
||||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
if (ObjectUtil.isNotEmpty(chainStoreConfig)) {
|
||||||
if (isEnableLevel.equals("yes")){
|
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||||
if (ObjectUtil.isNotEmpty(userVo.getGradeId())){
|
if (isEnableLevel.equals("yes")) {
|
||||||
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId());
|
if (ObjectUtil.isNotEmpty(userVo.getGradeId())) {
|
||||||
if (!ljUserGrade.getIfRechargeCoupon().equals("1")){
|
LJUserGrade ljUserGrade = ljUserGradeService.selectUserGradeById(userVo.getGradeId());
|
||||||
return new ArrayList<MtUserGradeChild>();
|
if (!ljUserGrade.getIfRechargeCoupon().equals("1")) {
|
||||||
|
return new ArrayList<MtUserGradeChild>();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("user_grade_id", userVo.getGradeId());
|
||||||
|
return baseMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("user_grade_id",userVo.getGradeId());
|
|
||||||
return baseMapper.selectList(queryWrapper);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new ArrayList<MtUserGradeChild>();
|
return new ArrayList<MtUserGradeChild>();
|
||||||
|
@ -285,6 +285,9 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
|
|||||||
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getPermissionType())) {
|
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getPermissionType())) {
|
||||||
lambdaQueryWrapper.like(TDuty::getPermissionType,tDuty.getPermissionType());
|
lambdaQueryWrapper.like(TDuty::getPermissionType,tDuty.getPermissionType());
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(tDuty) && ObjectUtil.isNotEmpty(tDuty.getDutyId())) {
|
||||||
|
lambdaQueryWrapper.eq(TDuty::getDutyId,tDuty.getDutyId());
|
||||||
|
}
|
||||||
|
|
||||||
return baseMapper.selectList(lambdaQueryWrapper);
|
return baseMapper.selectList(lambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user