优化
This commit is contained in:
@@ -61,7 +61,7 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.create_time DESC");
|
||||
JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.device_faultclass_code DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
if (!StrUtil.isEmpty(search)) {
|
||||
where = " AND (workprocedure_code like '%" + search + "%' OR workprocedure_name like '%" + search + "%' ) ";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "update_time desc");
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "workprocedure_code");
|
||||
final JSONObject json = rb.pageResult();
|
||||
return json;
|
||||
}
|
||||
@@ -108,13 +108,15 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(WorkProcedureDto dto) {
|
||||
WorkProcedureDto entity = this.findById(dto.getWorkprocedure_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
String workprocedure_code = entity.getWorkprocedure_code();
|
||||
WorkProcedureDto byCode = this.findByCode(workprocedure_code);
|
||||
if (ObjectUtil.isNotEmpty(byCode) && !dto.getWorkprocedure_id().equals(byCode.getWorkprocedure_id()))
|
||||
throw new BadRequestException("存在相同的编码!");
|
||||
|
||||
if (entity == null) {
|
||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
}
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
|
||||
String workprocedure_code = dto.getWorkprocedure_code();
|
||||
JSONObject old = wo.query("is_delete='0' and workprocedure_code='"+workprocedure_code+"' and workprocedure_id<>'"+dto.getWorkprocedure_id()+"'").uniqueResult(0);
|
||||
if(old!=null){
|
||||
throw new BadRequestException("存在相同的编码!");
|
||||
}
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
|
||||
@@ -123,7 +125,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.update(json);
|
||||
}
|
||||
|
||||
@@ -83,8 +83,12 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
if (StrUtil.isNotEmpty(begin_time)) {
|
||||
map.put("begin_time", begin_time.substring(0,10));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(end_time)) {
|
||||
map.put("end_time", end_time.substring(0,10));
|
||||
}
|
||||
map.put("vbillcode", vbillcode);
|
||||
map.put("receive_code", receive_code);
|
||||
map.put("supp_code", supp_code);
|
||||
|
||||
@@ -60,7 +60,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
|
||||
String now = DateUtil.now();
|
||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||
Long deptId = currentUser.getDeptId();
|
||||
|
||||
WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表
|
||||
JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"'").uniqueResult(0);
|
||||
if(old!=null){
|
||||
throw new BadRequestException("已存在相同编码的工厂日历!");
|
||||
}
|
||||
//插入主表
|
||||
String factorycalendar_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
whereJson.put("factorycalendar_id", factorycalendar_id);
|
||||
@@ -81,6 +85,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(JSONObject whereJson) {
|
||||
String factorycalendar_id = whereJson.getString("factorycalendar_id");
|
||||
WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表
|
||||
JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"' and factorycalendar_id<>'"+whereJson.getString("factorycalendar_id")+"'").uniqueResult(0);
|
||||
if(old!=null){
|
||||
throw new BadRequestException("已存在相同编码的工厂日历!");
|
||||
}
|
||||
|
||||
//查询旧的终止年份
|
||||
JSONObject old_jo = WQLObject.getWQLObject("PDM_BI_FactoryCalendar").query("factorycalendar_id = '" + factorycalendar_id + "'").uniqueResult(0);
|
||||
|
||||
@@ -117,6 +117,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (StrUtil.isNotEmpty(map.get("remark"))) {
|
||||
map.put("remark", "%" + map.get("remark") + "%");
|
||||
}
|
||||
String begin_time = map.get("begin_time");
|
||||
String end_time = map.get("end_time");
|
||||
if (StrUtil.isNotEmpty(begin_time)) {
|
||||
map.put("begin_time", begin_time.substring(0,10));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(end_time)) {
|
||||
map.put("end_time", end_time.substring(0,10));
|
||||
}
|
||||
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_code");
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -89,9 +89,11 @@
|
||||
<el-form-item label="创建日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery()"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="captemplate_name" min-width="130" label="产能模板名称"/>
|
||||
<el-table-column prop="detail_count" min-width="130" label="明细数"/>
|
||||
<el-table-column prop="detail_count" min-width="90" label="明细数"/>
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -97,7 +97,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" min-width="130" label="创建人"/>
|
||||
<el-table-column prop="create_time" min-width="100" label="创建时间"/>
|
||||
<el-table-column prop="create_time" min-width="150" label="创建时间"/>
|
||||
<el-table-column prop="update_optname" min-width="150" label="修改人"/>
|
||||
<el-table-column prop="update_time" min-width="150" label="修改时间"/>
|
||||
</el-table>
|
||||
|
||||
@@ -18,22 +18,6 @@
|
||||
placeholder="选择时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键设备" prop="device_id">
|
||||
<el-select
|
||||
v-model="infoscope.device_id"
|
||||
size="mini"
|
||||
placeholder="关键设备"
|
||||
class="filter-item"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in Devices"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/></el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型:" prop="holidayType">
|
||||
<el-select v-model="infoscope.holidayType" size="small" placeholder="请选择类型" clearable>
|
||||
<el-option label="休息日" value="01" />
|
||||
|
||||
@@ -123,18 +123,6 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="初始日期" prop="factorycale_startdate">
|
||||
<el-date-picker
|
||||
v-model="form.factorycale_startdate"
|
||||
type="date"
|
||||
:disabled="crud.status.edit > 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
@change="pickStartDay"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-bottom: 5px;">
|
||||
<el-col :span="12">
|
||||
@@ -161,6 +149,18 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" style="margin-bottom: 5px;">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="初始日期" prop="factorycale_startdate">
|
||||
<el-date-picker
|
||||
v-model="form.factorycale_startdate"
|
||||
type="date"
|
||||
:disabled="crud.status.edit > 0"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
@change="pickStartDay"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="关键设备" prop="device_id">
|
||||
<el-select
|
||||
|
||||
@@ -11,7 +11,15 @@
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-M-dd HH:mm:ss"/>
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
@@ -43,15 +51,15 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column show-overflow-tooltip prop="receive_date" label="日期" min-width="110"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="单据号" min-width="120"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" min-width="100" label="物料编号"/>
|
||||
<el-table-column show-overflow-tooltip min-width="135" prop="material_name" label="物料名称"/>
|
||||
<el-table-column show-overflow-tooltip prop="class_desc" label="物料类别"/>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次"/>
|
||||
<el-table-column show-overflow-tooltip prop="receive_qty" :formatter="crud.formatNum3" label="重量"/>
|
||||
<el-table-column show-overflow-tooltip prop="need_qty" :formatter="crud.formatNum3" label="待入重量"/>
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位"/>
|
||||
<el-table-column prop="receive_date" label="日期" min-width="140"/>
|
||||
<el-table-column prop="source_bill_code" label="单据号" min-width="120"/>
|
||||
<el-table-column prop="material_code" min-width="150" label="物料编号"/>
|
||||
<el-table-column min-width="135" prop="material_name" label="物料名称"/>
|
||||
<el-table-column prop="class_desc" label="物料类别"/>
|
||||
<el-table-column prop="pcsn" label="批次"/>
|
||||
<el-table-column prop="receive_qty" :formatter="crud.formatNum3" label="重量"/>
|
||||
<el-table-column prop="need_qty" :formatter="crud.formatNum3" label="待入重量"/>
|
||||
<el-table-column prop="qty_unit_name" label="重量单位"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
@@ -74,7 +82,7 @@ import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: {crudOperation, rrOperation, pagination, DateRangePicker},
|
||||
components: {crudOperation, rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户',
|
||||
|
||||
@@ -108,17 +108,6 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="audit_flag"
|
||||
@click="audit"
|
||||
>
|
||||
审核
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
|
||||
@@ -12,7 +12,15 @@
|
||||
<div class="head-container">
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
@@ -66,11 +74,10 @@
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { rrOperation, pagination, DateRangePicker },
|
||||
components: { rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', url: 'api/checkoutbill/addDtl', optShow: {
|
||||
add: false,
|
||||
|
||||
Reference in New Issue
Block a user