This commit is contained in:
cun-nan 2024-07-27 11:58:41 +08:00
parent f0f45c6dfa
commit c54811e52a
10 changed files with 653 additions and 508 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

View File

@ -131,9 +131,9 @@
label="规则名称"
align="center"
width="120">
<!-- <template slot-scope="scope">-->
<!-- <div style="color: #409EFF;cursor: pointer">{{ scope.row.ruleName }}</div>-->
<!-- </template>-->
<!-- <template slot-scope="scope">-->
<!-- <div style="color: #409EFF;cursor: pointer">{{ scope.row.ruleName }}</div>-->
<!-- </template>-->
</el-table-column>
<el-table-column
@ -252,7 +252,7 @@
<el-input type="textarea" v-model="formRule.description" placeholder="请输入规则描述" autocomplete="off"
style="width: 350px"></el-input>
</el-form-item>
<el-form-item label="规则类型" :label-width="formLabelWidth">
<el-form-item label="规则类型" :label-width="formLabelWidth" prop="ruleType">
<div style="display: flex">
<div class="xz_box" :class=" {'active' : formRule.ruleType == 1 } " @click="formRule.ruleType = 1"><i
class="el-icon-aim"></i> 按比例分账
@ -274,7 +274,7 @@
<el-option
v-for="(item1,i) in merchantList"
:key="item1.id"
:label="item1.remark ? (item1.merchantName+''+item1.remark+'') : (item1.merchantName+'--')"
:label="item1.mchntCd ? (item1.merchantName+''+item1.mchntCd+'') : (item1.merchantName+'--')"
:value="item1.id"></el-option>
</el-select>
</el-form-item>
@ -300,7 +300,7 @@
<el-option
v-for="(item1,i) in merchantList"
:key="item1.id"
:label="item1.remark ? (item1.merchantName+''+item1.remark+'') : (item1.merchantName+'--')"
:label="item1.mchntCd ? (item1.merchantName+''+item1.mchntCd+'') : (item1.merchantName+'--')"
:value="item1.id"></el-option>
</el-select>
</el-form-item>
@ -344,9 +344,9 @@
style="width: 100%;"></el-date-picker>
</el-form-item>
<div style="width: 15px"></div>
<!-- <el-form-item prop="date2">-->
<!-- <el-time-picker placeholder="选择时间" v-model="ruleForm.date2" style="width: 100%;"></el-time-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item prop="date2">-->
<!-- <el-time-picker placeholder="选择时间" v-model="ruleForm.date2" style="width: 100%;"></el-time-picker>-->
<!-- </el-form-item>-->
</div>
<div style="margin-left: 80px">启用成功后其他规则的规则状态变为停用</div>
@ -724,6 +724,9 @@ export default {
ruleName: [
{required: true, message: '请输入规则名称', trigger: 'blur'},
],
ruleType: [
{required: true, message: '请选择规则类型', trigger: 'blur'},
],
}
}
},

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.OilConfig;
import com.fuint.api.fuyou.entity.PaymentRuleConfig;
import com.fuint.api.fuyou.mapper.PaymentRuleConfigMapper;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.service.OilConfigService;
import com.fuint.api.fuyou.service.PaymentRuleConfigService;
import com.fuint.api.fuyou.vo.OilConfigVo;
@ -24,6 +25,8 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
@Autowired
private OilConfigService oilConfigService;
@Autowired
private MerchantConfigService merchantConfigService;
@Override
public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) {
@ -106,6 +109,10 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
baseMapper.updateById(paymentRuleConfig);
}
int i = 1;
if (ruleConfig.getStatus().equals("jy")){
// 将其他使用的账户关掉
merchantConfigService.updateMerchOrter(ruleConfig.getStoreId());
}
if (ruleConfig.getStatus().equals("qy") && ruleConfig.getRuleType().equals("1")){
i = oilConfigService.judgmentProportion1(ruleConfig.getStoreId(), ruleConfig.getId());
}

View File

@ -131,4 +131,7 @@ public class LJStaff extends BaseEntity implements Serializable {
//码牌绑定状态 0未绑定 1已绑定
@TableField(exist = false)
private String tagStatus;
// 登录账号
@TableField(exist = false)
private String accountName;
}

View File

@ -234,7 +234,11 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
account.setAccountKey(timestamp+randomString);
account.setAccountName(staff.getMobile());
if (ObjectUtil.isNotEmpty(staff.getAccountName())){
account.setAccountName(staff.getAccountName());
}else {
account.setAccountName(staff.getMobile());
}
account.setAccountStatus(1);
account.setRealName(staff.getRealName());
account.setRoleIds(staff.getRoleId());

View File

@ -375,4 +375,8 @@ public class BackendStoreController extends BaseController {
return getSuccessResult(storeService.getStoreAmountByTime(store));
}
@GetMapping("/getStoreByDeptId/{deptId}")
public ResponseObject getStoreByDeptId(@PathVariable Integer deptId){
return getSuccessResult(storeService.getStoreByDeptId(deptId));
}
}

View File

@ -137,4 +137,6 @@ public interface StoreService extends IService<MtStore> {
* @return
*/
List<StoreNumVo> getStoreAmountByTime(MtStore store);
List<MtStore> getStoreByDeptId(Integer deptId);
}

View File

@ -754,6 +754,14 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
return baseMapper.selectStoreNum(store,storeIds);
}
@Override
public List<MtStore> getStoreByDeptId(Integer deptId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("if_delete","0");
queryWrapper.eq("contract_dept_id",deptId);
return baseMapper.selectList(queryWrapper);
}
// 将在部门里面删除的在油站中删除
public void beachDelStore() {
LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper();