修改唯一检验,修改权限问题

master
CJYXTX\27961 7 months ago
parent 7dca6c60d0
commit 1aaf1e7817

@ -241,5 +241,4 @@ wx:
nxhs:
url: 'http://222.71.165.188:8808'
# url: 'http://192.168.0.166:8808'
token: '8bd2aa89033ead51c505e44994e42189'

@ -172,7 +172,7 @@ xxl:
max: 100
# xxl-job服务端地址
admin:
addresses: http://127.0.0.1:30020/xxl-job-admin/
addresses: http://222.71.165.188:30020/xxl-job-admin/
executor:
address: ''
appname: xxl-job-executor-sample1
@ -195,6 +195,5 @@ xxl:
nxhs:
# url: 'http://118.195.155.9:8808'
url: 'http://222.71.165.188:8808'
url: 'http://118.195.155.9:8808'
token: '8bd2aa89033ead51c505e44994e42189'

@ -14,6 +14,9 @@
<result column="client_name" jdbcType="VARCHAR" property="clientName" />
<result column="client_mobile" jdbcType="VARCHAR" property="clientMobile" />
<result column="f_creator_user_id" jdbcType="VARCHAR" property="creatorUserId" />
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
<result column="organize_json_id" jdbcType="VARCHAR" property="organizeJsonId" />
<result column="client_address_id" jdbcType="VARCHAR" property="clientAddressId" />
<result column="appointment_time_start" jdbcType="TIMESTAMP" property="appointmentTimeStart" />
<result column="appointment_time_end" jdbcType="TIMESTAMP" property="appointmentTimeEnd" />
@ -49,7 +52,8 @@
creator_time, client_address_id, appointment_time_start, appointment_time_end, staffs_id,
staffs_name, consult_time_start, consult_time_end, receive_time, settle_time, remark,
star_score, comment, comment_pics, response_star, attitude_star, price_star, is_user_deleted,
is_deleted, undefined1, undefined2, undefined3, undefined4, f_flow_id,predict_weight,longitude,latitude,distance,f_creator_user_id
is_deleted, undefined1, undefined2, undefined3, undefined4, f_flow_id,predict_weight,longitude,latitude,distance,f_creator_user_id,
company_id,organize_json_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
@ -73,7 +77,8 @@
comment, comment_pics, response_star,
attitude_star, price_star, is_user_deleted,
is_deleted, undefined1, undefined2,
undefined3, undefined4, f_flow_id ,predict_weight,longitude,latitude,distance,f_creator_user_id
undefined3, undefined4, f_flow_id ,predict_weight,longitude,latitude,distance,f_creator_user_id,
company_id,organize_json_id
)
values (#{id,jdbcType=VARCHAR}, #{recycleStationId,jdbcType=VARCHAR}, #{orderNumber,jdbcType=VARCHAR},
#{orderTypeId,jdbcType=VARCHAR}, #{orderAmount,jdbcType=DECIMAL}, #{orderClientStatusId,jdbcType=VARCHAR},
@ -92,7 +97,9 @@
, #{latitude,jdbcType=VARCHAR}
, #{distance,jdbcType=VARCHAR}
, #{creatorUserId,jdbcType=VARCHAR}
)
, #{companyId,jdbcType=VARCHAR}
, #{organizeJsonId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="jnpf.entity.RecycleOrderEntity">
insert into nx_recycle_order
@ -214,6 +221,12 @@
<if test="creatorUserId != null">
f_creator_user_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="organize_json_id != null">
organize_json_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">

@ -144,6 +144,12 @@ public class EnterpriseAccountBillServiceImpl extends ServiceImpl<EnterpriseAcco
}
}
if(isPc){
if (!userProvider.get().getIsAdministrator()){
enterpriseAccountBillNum++;
enterpriseAccountBillQueryWrapper.lambda().like(EnterpriseAccountBillEntity::getEnterpriseId,userProvider.get().getOrganizeId());
}
if(ObjectUtil.isNotEmpty(enterpriseAccountBillPagination.getBillNumber())){
enterpriseAccountBillNum++;

@ -164,14 +164,13 @@ public class NxProductServiceImpl extends ServiceImpl<NxProductMapper, NxProduct
nxProductQueryWrapper.lambda().notIn(NxProductEntity::getId,nxProductPagination.getExcludeIdList());
}
if(ObjectUtil.isNotEmpty(nxProductPagination.getCompanyId())){
nxProductNum++;
String value = nxProductPagination.getCompanyId() instanceof List ?
JsonUtil.getObjectToString(nxProductPagination.getCompanyId()) :
String.valueOf(nxProductPagination.getCompanyId());
nxProductQueryWrapper.lambda().like(NxProductEntity::getCompanyId,value);
}
// if(ObjectUtil.isNotEmpty(nxProductPagination.getCompanyId())){
// nxProductNum++;
// String value = nxProductPagination.getCompanyId() instanceof List ?
// JsonUtil.getObjectToString(nxProductPagination.getCompanyId()) :
// String.valueOf(nxProductPagination.getCompanyId());
// nxProductQueryWrapper.lambda().like(NxProductEntity::getCompanyId,value);
// }
if(ObjectUtil.isNotEmpty(nxProductPagination.getName())){

@ -144,6 +144,12 @@ public class NxWalletServiceImpl extends ServiceImpl<NxWalletMapper, NxWalletEnt
}
}
if(isPc){
if (!userProvider.get().getIsAdministrator()){
nxWalletNum++;
nxWalletQueryWrapper.lambda().like(NxWalletEntity::getBuinessId,userProvider.get().getOrganizeId());
}
if(ObjectUtil.isNotEmpty(nxWalletPagination.getCode())){
nxWalletNum++;

@ -1,7 +1,11 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSON;
import jnpf.constant.PermissionConst;
import jnpf.entity.*;
import jnpf.mapper.RecycleOrderMapper;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.recycleorder.*;
@ -45,6 +49,8 @@ public class RecycleOrderServiceImpl extends ServiceImpl<RecycleOrderMapper, Rec
@Autowired
private UserProvider userProvider;
@Autowired
private OrganizeService organizeService;
@Override
public List<RecycleOrderEntity> getList(RecycleOrderPagination recycleOrderPagination){
@ -455,7 +461,6 @@ public class RecycleOrderServiceImpl extends ServiceImpl<RecycleOrderMapper, Rec
recycleOrderForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(RecycleOrderConstant.getFormData(),recycleOrderForm),RecycleOrderForm.class);
RecycleOrderEntity entity = JsonUtil.getJsonToBean(recycleOrderForm, RecycleOrderEntity.class);
if(isSave){
String mainId = RandomUtil.uuId() ;
entity.setOrderNumber(generaterSwapUtil.getBillNumber("order", false));
@ -464,6 +469,35 @@ public class RecycleOrderServiceImpl extends ServiceImpl<RecycleOrderMapper, Rec
entity.setCreatorUserId(userInfo.getUserId());
entity.setLastModifyTime(null);
entity.setLastModifyUserId(null);
String companyId = "";
List<String> organizeIdList = new ArrayList<>();
if(userInfo != null && StringUtil.isNotEmpty(userInfo.getOrganizeId())){
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
if (organizeEntity==null){
// organizeEntity.setId("-1");
organizeIdList.add("-1");
}else {
organizeIdList.add(organizeEntity.getId());
if(PermissionConst.DEPARTMENT.equals(organizeEntity.getCategory())){
userInfo.setDepartmentId(organizeEntity.getId());
do {
//获取父组织
organizeEntity = organizeService.getInfo(organizeEntity.getParentId());
organizeIdList.add(organizeEntity.getId());
}while (PermissionConst.DEPARTMENT.equals(organizeEntity.getCategory()));
companyId = organizeEntity.getId();
}else{
companyId = organizeEntity.getId();
}
}
}
organizeIdList.add("96240625-934F-490B-8AA6-0BC775B18468");
Collections.reverse(organizeIdList);
String organizeId = JSON.toJSONString(organizeIdList);
entity.setCompanyId(companyId);
entity.setOrganizeJsonId(organizeId);
}else{
entity.setOrderNumber(generaterSwapUtil.getBillNumber("order", false));
entity.setCreatorTime(DateUtil.getNowDate());

@ -306,6 +306,18 @@ public class RecycleStationStaffServiceImpl extends ServiceImpl<RecycleStationSt
if(StringUtil.isEmpty(form.getMobilePhone())){
return "回收员手机不能为空";
}
if(StringUtil.isNotEmpty(form.getMobilePhone())){
form.setMobilePhone(form.getMobilePhone().trim());
QueryWrapper<RecycleStationStaffEntity> mobilePhoneWrapper=new QueryWrapper<>();
mobilePhoneWrapper.lambda().eq(RecycleStationStaffEntity::getMobilePhone,form.getMobilePhone());
if (isUp){
mobilePhoneWrapper.lambda().ne(RecycleStationStaffEntity::getId, id);
}
if((int) this.count(mobilePhoneWrapper)>0){
countRecover = "该手机号已被注册";
}
}
return countRecover;
}
/**
@ -317,6 +329,8 @@ public class RecycleStationStaffServiceImpl extends ServiceImpl<RecycleStationSt
@Override
@Transactional
public void saveOrUpdate(RecycleStationStaffForm recycleStationStaffForm,String id, boolean isSave) throws Exception{
UserInfo userInfo=userProvider.get();
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
recycleStationStaffForm = JsonUtil.getJsonToBean(

@ -426,13 +426,12 @@ public class NxWalletController {
OrganizeCrModel organizeCrModel=new OrganizeCrModel();
organizeCrModel= JSONObject.parseObject(organizeEntityList.get(0).getPropertyJson(),OrganizeCrModel.class);
// organizeCrModel.getManagerTelePhone();
//修改人手机号是否等于商户创建人的手机号
boolean areEqual = userUserAccountId.equals(organizeCrModel.getManagerTelePhone());
if (areEqual==false){
return ActionResult.fail("修改数据状态失败,该按钮需要商户管理员修改");
if (!userProvider.get().getIsAdministrator()){
return ActionResult.fail("修改数据状态失败,该按钮需要平台管理员修改");
}else {
entity.setOrderStatus(status);
final String POST_URL = this.appUrl + "/api/index/recharge-balance";
HttpPost httpPost = new HttpPost(POST_URL);
// 设置请求头部信息

@ -8,7 +8,7 @@
*/
module.exports = {
// 开发环境接口配置
APIURl: 'http://127.0.0.1:50000'
APIURl: 'http://127.0.0.1:30000'
// 测试环境接口配置
// APIURl: 'http://222.71.165.187:50000'
}

@ -1,7 +1,7 @@
const { APIURl } = require('./apiUrl')
// const UPLOAD_DOMAIN = process.env.NODE_ENV === 'development' ? 'http://222.71.165.188:8808' : 'http://222.71.165.188:8808';
const UPLOAD_DOMAIN = process.env.NODE_ENV === 'development' ? 'http://222.71.165.188:8808' : 'http://118.195.155.9:8808';
// const UPLOAD_DOMAIN = process.env.NODE_ENV === 'development' ? 'http://222.71.165.188:8808' : 'http://222.71.165.188:8808'; //3333专用
const UPLOAD_DOMAIN = process.env.NODE_ENV === 'development' ? 'http://222.71.165.188:8808' : 'http://118.195.155.9:8808'; //5555专用
const UPLOAD_URL = UPLOAD_DOMAIN + '/api/file';
const UPLOAD_KEY = '8bd2aa89033ead51c505e44994e42189'

@ -124,7 +124,7 @@
<el-input v-model="dataForm.propertyJson.managerTelePhone"></el-input>
</el-form-item>
<el-form-item label="验证码" prop="code">
<el-input v-model="dataForm.code"></el-input>
<el-input v-model="dataForm.code" disabled></el-input>
</el-form-item>
<el-form-item label="商户名称" prop="name">
<el-input v-model="dataForm.fullName"></el-input>
@ -265,7 +265,7 @@ export default {
parentId: "96240625-934F-490B-8AA6-0BC775B18468", //id
fullName: "", //
enCode: "", //
code: "", //
code: "000000", //
pictures: [], //logo
societyPictures: [], //
registrantPictures: [], //2

@ -181,10 +181,10 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.recycleId" @change="
changeData('nxpricerecycle-recycleId', scope.$index)
" :rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.nxpricerecyclerecycleId" placeholder="请选择" hasPage propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField="station_name"
:field="'recycleId' + scope.$index" interfaceId="534688845753483781" :pageSize="20"
" :rowIndex="scope.$index" :formData="dataForm" :templateJson="interfaceRes.nxpricerecyclerecycleId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField="station_name" :field="'recycleId' + scope.$index"
interfaceId="534688845753483781" :pageSize="20"
:columnOptions="nxpricerecyclerecycleIdcolumnOptions" clearable :style="{ width: '100%' }">
</JnpfPopupSelect>
</template>

@ -1,114 +1,58 @@
<template>
<el-dialog
:title="!dataForm.id ? '新建' : '编辑'"
:close-on-click-modal="false"
append-to-body
:visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center"
lock-scroll
width="600px"
>
<template>
<el-dialog :title="!dataForm.id ? '新建' : '编辑'" :close-on-click-modal="false" append-to-body :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
<el-row :gutter="15" class="">
<el-form
ref="formRef"
:model="dataForm"
:rules="dataRule"
size="small"
label-width="100px"
label-position="right"
>
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="12">
<jnpf-form-tip-item label="编码" prop="code">
<JnpfInput
v-model="dataForm.code"
@change="changeData('code', -1)"
placeholder="系统自动生成"
readonly
:style="{ width: '100%' }"
>
<JnpfInput v-model="dataForm.code" @change="changeData('code', -1)" placeholder="系统自动生成" readonly
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="名称" prop="name">
<JnpfInput
v-model="dataForm.name"
@change="changeData('name', -1)"
placeholder="请输入"
clearable
:style="{ width: '100%' }"
>
<JnpfInput v-model="dataForm.name" @change="changeData('name', -1)" placeholder="请输入" clearable
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="规格" prop="spec">
<JnpfInput
v-model="dataForm.spec"
@change="changeData('spec', -1)"
placeholder="请输入"
clearable
:style="{ width: '100%' }"
>
<JnpfInput v-model="dataForm.spec" @change="changeData('spec', -1)" placeholder="请输入" clearable
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12">
<jnpf-form-tip-item label="库存单位" prop="unit">
<JnpfSelect
v-model="dataForm.unit"
@change="changeData('unit', -1)"
placeholder="请选择"
clearable
:style="{ width: '100%' }"
:options="unitOptions"
:props="unitProps"
>
<JnpfSelect v-model="dataForm.unit" @change="changeData('unit', -1)" placeholder="请选择" clearable
:style="{ width: '100%' }" :options="unitOptions" :props="unitProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="描述" prop="description">
<JnpfInput
v-model="dataForm.description"
@change="changeData('description', -1)"
placeholder="请输入"
clearable
:style="{ width: '100%' }"
>
<JnpfInput v-model="dataForm.description" @change="changeData('description', -1)" placeholder="请输入"
clearable :style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="图片" prop="photo">
<JnpfUploadImg
v-model="dataForm.photo"
@change="changeData('photo', -1)"
:fileSize="10"
sizeUnit="MB"
:limit="1"
pathType="defaultPath"
:isAccount="0"
>
<JnpfUploadImg v-model="dataForm.photo" @change="changeData('photo', -1)" :fileSize="10" sizeUnit="MB"
:limit="1" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog
v-if="selectDialogVisible"
:config="currTableConf"
:formData="dataForm"
ref="selectDialog"
@select="addForSelect"
@close="selectDialogVisible = false"
/>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
<span slot="footer" class="dialog-footer">
<div class="upAndDown-button" v-if="dataForm.id">
@ -119,17 +63,11 @@
{{ "下一条" }}
</el-button>
</div>
<el-button
type="primary"
@click="dataFormSubmit(2)"
:loading="continueBtnLoading"
>
{{ !dataForm.id ? "确定并新增" : "确定并继续" }}</el-button
>
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
{{ !dataForm.id ? "确定并新增" : "确定并继续" }}</el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">
</el-button
>
</el-button>
</span>
</el-dialog>
</template>
@ -252,7 +190,7 @@ export default {
this.initDefaultData();
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm));
},
mounted() {},
mounted() { },
methods: {
prev() {
this.index--;
@ -330,7 +268,7 @@ export default {
}
}
},
dataAll() {},
dataAll() { },
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll));
},
@ -370,7 +308,7 @@ export default {
this.$store.commit("generator/UPDATE_RELATION_DATA", {});
},
//
initDefaultData() {},
initDefaultData() { },
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0;

@ -117,14 +117,6 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="上传凭证图片" prop="photo">
<JnpfUploadImg v-model="dataForm.photo" @change="changeData('photo', -1)" :fileSize="10"
sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="上传凭证图片" prop="photo">
<JnpfUploadImg v-model="dataForm.photo" @change="changeData('photo', -1)" :fileSize="10"

@ -15,8 +15,8 @@ const name = defaultSettings.title || '西夏聚宝' // page title
// For example, Mac: sudo npm run
// You can change the port by the following method:
// port = 3000 npm run dev OR npm run dev --port = 3000
const port = process.env.port || process.env.npm_config_port || 4000 // dev port
//const port = process.env.port || process.env.npm_config_port || 4000 // test port
const port = process.env.port || process.env.npm_config_port || 5000 // dev port //生产
// const port = process.env.port || process.env.npm_config_port || 4000 // test port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {

Loading…
Cancel
Save