回收柜事件 -优化

master
guochaojie 4 months ago
parent 62eb54be87
commit 85d10e202f

@ -5,11 +5,11 @@ import jnpf.entity.RecycleDeviceEventEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-01
* 2024-07-02
*/
public interface RecycleDeviceEventMapper extends BaseMapper<RecycleDeviceEventEntity> {

@ -7,11 +7,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
*
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-01
* 2024-07-02
*/
public interface RecycleDeviceEventService extends IService<RecycleDeviceEventEntity> {
List<RecycleDeviceEventEntity> getList(RecycleDeviceEventPagination recycleDeviceEventPagination);

@ -44,11 +44,11 @@ import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
*
*
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-01
* 2024-07-02
*/
@Service
public class RecycleDeviceEventServiceImpl extends ServiceImpl<RecycleDeviceEventMapper, RecycleDeviceEventEntity> implements RecycleDeviceEventService {
@ -361,16 +361,13 @@ public class RecycleDeviceEventServiceImpl extends ServiceImpl<RecycleDeviceEven
if (isSave) {
String mainId = RandomUtil.uuId();
entity.setCompanyId(userInfo.getOrganizeId());
entity.setCreateUserId(userInfo.getUserId());
entity.setCreateTime(DateUtil.getNowDate());
entity.setOrganizeJsonId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "all"));
entity.setDepartmentId(userEntity.getPositionId());
entity.setId(mainId);
} else {
entity.setCreateUserId(userInfo.getUserId());
entity.setCreateTime(DateUtil.getNowDate());
entity.setOrganizeJsonId(generaterSwapUtil.getCurrentOrgIds(userInfo.getOrganizeId(), "all"));
entity.setDepartmentId(userEntity.getPositionId());
}
this.saveOrUpdate(entity);

@ -97,6 +97,7 @@ public class RecycleDeviceEventController {
try{
recycleDeviceEventService.saveOrUpdate(recycleDeviceEventForm, null ,true);
}catch(Exception e){
e.printStackTrace();
return ActionResult.fail("新增数据失败");
}
return ActionResult.success("创建成功");
@ -123,6 +124,7 @@ public class RecycleDeviceEventController {
try{
recycleDeviceEventService.saveOrUpdate(recycleDeviceEventForm,id,false);
}catch(Exception e){
e.printStackTrace();
return ActionResult.fail("修改数据失败");
}
return ActionResult.success("更新成功");

@ -9,7 +9,7 @@ import java.util.Date;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-01
* @ 2024-07-02
*/
@Data
@TableName("nx_recycle_device_event")
@ -52,10 +52,10 @@ public class RecycleDeviceEventEntity {
private String organizeJsonId;
@TableField("F_FLOW_ID")
private String flowId;
@TableField("ORDER_NO")
@TableField(value = "ORDER_NO" , updateStrategy = FieldStrategy.IGNORED)
private String orderNo;
@TableField("PHONE")
@TableField(value = "PHONE" , updateStrategy = FieldStrategy.IGNORED)
private String phone;
@TableField("ORDER_TYPE")
@TableField(value = "ORDER_TYPE" , updateStrategy = FieldStrategy.IGNORED)
private String orderType;
}

@ -6,11 +6,11 @@ import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-01
* @ 2024-07-02
*/
@Data
public class RecycleDeviceEventForm {
@ -29,6 +29,15 @@ public class RecycleDeviceEventForm {
/** 事件类型 **/
@JsonProperty("eventType")
private Object eventType;
/** 订单号 **/
@JsonProperty("orderNo")
private String orderNo;
/** 订单类型 **/
@JsonProperty("orderType")
private String orderType;
/** 手机号 **/
@JsonProperty("phone")
private String phone;
/** 发生时间 **/
@JsonProperty("eventTime")
private String eventTime;
@ -47,10 +56,4 @@ public class RecycleDeviceEventForm {
/** 创建时间 **/
@JsonProperty("createTime")
private String createTime;
/** 所属组织 **/
@JsonProperty("organizeJsonId")
private Object organizeJsonId;
/** 部门 **/
@JsonProperty("departmentId")
private String departmentId;
}

@ -7,11 +7,11 @@ import java.util.List;
/**
*
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-01
* @ 2024-07-02
*/
@Data
public class RecycleDeviceEventPagination extends Pagination {
@ -36,6 +36,9 @@ public class RecycleDeviceEventPagination extends Pagination {
/** 本地调用 */
@JsonProperty("isLocal")
private Object isLocal;
/** 订单号 */
@JsonProperty("orderNo")
private Object orderNo;
/** 事件结果 */
@JsonProperty("eventResult")
private Object eventResult;

@ -27,7 +27,25 @@
<el-col :span="24" >
<jnpf-form-tip-item label="事件类型"
prop="eventType" >
<p>{{ dataForm.eventType }} </p>
<p>{{dataForm.eventType}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="订单号"
prop="orderNo" >
<p>{{dataForm.orderNo}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="订单类型"
prop="orderType" >
<p>{{ dataForm.orderType }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="手机号"
prop="phone" >
<p>{{dataForm.phone}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
@ -66,18 +84,6 @@
<p>{{dataForm.createTime}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="所属组织"
prop="organizeJsonId" >
<p>{{dataForm.organizeJsonId}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="部门"
prop="departmentId" >
<p>{{dataForm.departmentId}}</p>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row>
@ -109,21 +115,23 @@
bucketCode : "",
doorNum : "",
eventType : "",
orderNo : '',
orderType : '',
phone : '',
eventTime : '',
eventDesc : '',
isLocal : '',
eventResult : '',
createUserId : "",
createTime : "",
organizeJsonId : "",
departmentId : "",
},
deviceCodeProps:{"label":"device_name","value":"device_code" },
bucketCodeProps:{"label":"bucket_name","value":"bucket_code" },
doorNumOptions:[{"fullName":"1号","id":"1"},{"fullName":"2号","id":"2"},{"fullName":"3号","id":"3"},{"fullName":"4号","id":"4"},{"fullName":"5号","id":"5"},{"fullName":"6号","id":"6"},{"fullName":"7号","id":"7"},{"fullName":"8号","id":"8"},{"fullName":"9号","id":"9"},{"fullName":"10号","id":"10"},{"fullName":"11号","id":"11"},{"fullName":"12号","id":"12"}],
doorNumProps:{"label":"fullName","value":"id" },
eventTypeOptions:[{"fullName":"登录成功","id":"login"},{"fullName":"配置变更","id":"change"},{"fullName":"重启设备","id":"reboot"},{"fullName":"重启应用","id":"restart"},{"fullName":"更新应用","id":"update"},{"fullName":"投递开门","id":"deliveryOpen"},{"fullName":"投递关门","id":"deliveryClose"},{"fullName":"延时关门","id":"delay"},{"fullName":"清运开门","id":"cleanOpen"},{"fullName":"抓拍","id":"snapshot"},{"fullName":"秤体校准","id":"adjust"},{"fullName":"秤体清零","id":"clear"},{"fullName":"获取状态","id":"status"}],
eventTypeProps:{"label":"fullName","value":"id" },
eventTypeProps:{"label":"fullName","value":"enCode" },
orderTypeOptions:[{"fullName":"投递单","id":"1"},{"fullName":"清运单","id":"2"}],
orderTypeProps:{"label":"fullName","value":"id" },
isLocalOptions:[{"fullName":"本地","id":"1"},{"fullName":"远程","id":"2"}],
isLocalProps:{"label":"fullName","value":"id" },
eventResultOptions:[{"fullName":"成功","id":"1"},{"fullName":"失败","id":"0"}],

File diff suppressed because one or more lines are too long

@ -40,6 +40,30 @@
<JnpfSelect v-model="dataForm.eventType" @change="changeData('eventType',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}' :options="eventTypeOptions" :props="eventTypeProps" >
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="订单号" prop="orderNo" >
<JnpfInput v-model="dataForm.orderNo" @change="changeData('orderNo',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="订单类型" prop="orderType" >
<JnpfRadio v-model="dataForm.orderType" @change="changeData('orderType',-1)"
optionType="button" direction="horizontal" size="small" :options="orderTypeOptions" :props="orderTypeProps" >
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="手机号" prop="phone" >
<JnpfInput v-model="dataForm.phone" @change="changeData('phone',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -88,22 +112,6 @@
label="创建时间" prop="createTime" >
<JnpfOpenData v-model="dataForm.createTime" @change="changeData('createTime',-1)"
placeholder="系统自动生成" readonly :style='{"width":"100%"}' type="currTime" >
</JnpfOpenData>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="所属组织" prop="organizeJsonId" >
<JnpfOpenData v-model="dataForm.organizeJsonId" @change="changeData('organizeJsonId',-1)"
placeholder="系统自动生成" readonly :style='{"width":"100%"}' type="currOrganize" showLevel="all" >
</JnpfOpenData>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="部门" prop="departmentId" >
<JnpfOpenData v-model="dataForm.departmentId" @change="changeData('departmentId',-1)"
placeholder="系统自动生成" readonly :style='{"width":"100%"}' type="currPosition" >
</JnpfOpenData>
</jnpf-form-tip-item>
</el-col>
@ -175,14 +183,15 @@
bucketCode : undefined,
doorNum : undefined,
eventType : undefined,
orderNo : undefined,
orderType : undefined,
phone : undefined,
eventTime : undefined,
eventDesc : undefined,
isLocal : undefined,
eventResult : undefined,
createUserId : undefined,
createTime : undefined,
organizeJsonId : undefined,
departmentId : undefined,
},
tableRequiredData: {},
dataRule:
@ -194,8 +203,10 @@
bucketCodeProps:{"label":"bucket_name","value":"bucket_code" },
doorNumOptions:[{"fullName":"1号","id":"1"},{"fullName":"2号","id":"2"},{"fullName":"3号","id":"3"},{"fullName":"4号","id":"4"},{"fullName":"5号","id":"5"},{"fullName":"6号","id":"6"},{"fullName":"7号","id":"7"},{"fullName":"8号","id":"8"},{"fullName":"9号","id":"9"},{"fullName":"10号","id":"10"},{"fullName":"11号","id":"11"},{"fullName":"12号","id":"12"}],
doorNumProps:{"label":"fullName","value":"id" },
eventTypeOptions:[{"fullName":"登录成功","id":"login"},{"fullName":"配置变更","id":"change"},{"fullName":"重启设备","id":"reboot"},{"fullName":"重启应用","id":"restart"},{"fullName":"更新应用","id":"update"},{"fullName":"投递开门","id":"deliveryOpen"},{"fullName":"投递关门","id":"deliveryClose"},{"fullName":"延时关门","id":"delay"},{"fullName":"清运开门","id":"cleanOpen"},{"fullName":"抓拍","id":"snapshot"},{"fullName":"秤体校准","id":"adjust"},{"fullName":"秤体清零","id":"clear"},{"fullName":"获取状态","id":"status"}],
eventTypeProps:{"label":"fullName","value":"id" },
eventTypeOptions:[],
eventTypeProps:{"label":"fullName","value":"enCode" },
orderTypeOptions:[{"fullName":"投递单","id":"1"},{"fullName":"清运单","id":"2"}],
orderTypeProps:{"label":"fullName","value":"id" },
isLocalOptions:[{"fullName":"本地","id":"1"},{"fullName":"远程","id":"2"}],
isLocalProps:{"label":"fullName","value":"id" },
eventResultOptions:[{"fullName":"成功","id":"1"},{"fullName":"失败","id":"0"}],
@ -207,14 +218,15 @@
bucketCode:[{"dataType":"varchar","defaultValue":"","field":"device_code","fieldName":"","id":"ow3vw72","jnpfKey":"select","relationField":"deviceCode","required":"0"}] ,
doorNum:[] ,
eventType:[] ,
orderNo:[] ,
orderType:[] ,
phone:[] ,
eventTime:[] ,
eventDesc:[] ,
isLocal:[] ,
eventResult:[] ,
createUserId:[] ,
createTime:[] ,
organizeJsonId:[] ,
departmentId:[] ,
},
}
},
@ -308,6 +320,7 @@
dataAll(){
this.getdeviceCodeOptions();
this.getbucketCodeOptions();
this.geteventTypeOptions();
},
getdeviceCodeOptions() {
const index = this.childIndex
@ -359,6 +372,11 @@
this.changeDataFormData(1,'bucketCode','bucketCode',index,'')
})
},
geteventTypeOptions() {
getDictionaryDataSelector('577809052780746757').then(res => {
this.eventTypeOptions = res.data.list
})
},
clearData(){
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},

@ -35,6 +35,11 @@
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="订单号">
<el-input v-model="query.orderNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="事件结果">
<JnpfSelect v-model="query.eventResult" placeholder="请选择" clearable
@ -103,12 +108,11 @@
{{ scope.row.doorNum}}
</template>
</el-table-column>
<el-table-column label="事件类型" prop="eventType" algin="left"
<el-table-column
prop="eventType"
label="事件类型" align="left"
>
<template slot-scope="scope">
{{ scope.row.eventType}}
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="eventTime"
label="发生时间" align="left"
@ -139,6 +143,22 @@
<el-table-column
prop="createTime"
label="创建时间" align="left"
>
</el-table-column>
<el-table-column
prop="phone"
label="手机号" align="left"
>
</el-table-column>
<el-table-column label="订单类型" prop="orderType" algin="left"
>
<template slot-scope="scope">
{{ scope.row.orderType}}
</template>
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号" align="left"
>
</el-table-column>
<el-table-column label="操作"
@ -218,6 +238,7 @@
deviceCode:undefined,
eventType:undefined,
isLocal:undefined,
orderNo:undefined,
eventResult:undefined,
eventTime:undefined,
},
@ -249,8 +270,10 @@
bucketCodeProps:{"label":"bucket_name","value":"bucket_code" },
doorNumOptions:[{"fullName":"1号","id":"1"},{"fullName":"2号","id":"2"},{"fullName":"3号","id":"3"},{"fullName":"4号","id":"4"},{"fullName":"5号","id":"5"},{"fullName":"6号","id":"6"},{"fullName":"7号","id":"7"},{"fullName":"8号","id":"8"},{"fullName":"9号","id":"9"},{"fullName":"10号","id":"10"},{"fullName":"11号","id":"11"},{"fullName":"12号","id":"12"}],
doorNumProps:{"label":"fullName","value":"id" },
eventTypeOptions:[{"fullName":"登录成功","id":"login"},{"fullName":"配置变更","id":"change"},{"fullName":"重启设备","id":"reboot"},{"fullName":"重启应用","id":"restart"},{"fullName":"更新应用","id":"update"},{"fullName":"投递开门","id":"deliveryOpen"},{"fullName":"投递关门","id":"deliveryClose"},{"fullName":"延时关门","id":"delay"},{"fullName":"清运开门","id":"cleanOpen"},{"fullName":"抓拍","id":"snapshot"},{"fullName":"秤体校准","id":"adjust"},{"fullName":"秤体清零","id":"clear"},{"fullName":"获取状态","id":"status"}],
eventTypeProps:{"label":"fullName","value":"id" },
eventTypeOptions:[],
eventTypeProps:{"label":"fullName","value":"enCode" },
orderTypeOptions:[{"fullName":"投递单","id":"1"},{"fullName":"清运单","id":"2"}],
orderTypeProps:{"label":"fullName","value":"id" },
isLocalOptions:[{"fullName":"本地","id":"1"},{"fullName":"远程","id":"2"}],
isLocalProps:{"label":"fullName","value":"id" },
eventResultOptions:[{"fullName":"成功","id":"1"},{"fullName":"失败","id":"0"}],
@ -269,6 +292,7 @@
this.getColumnList(),
this.initSearchDataAndListData()
this.getdeviceCodeOptions();
this.geteventTypeOptions();
this.queryData = JSON.parse(JSON.stringify(this.query))
},
methods: {
@ -425,6 +449,11 @@
this.deviceCodeOptions = data
})
},
geteventTypeOptions() {
getDictionaryDataSelector('577809052780746757').then(res => {
this.eventTypeOptions = res.data.list
})
},
goDetail(id){
this.detailVisible = true
this.$nextTick(() => {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save