feat():重构领料上报

master
jiyufei 2 months ago
parent 8592c2d48a
commit 4ad7bfee01

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
* 2024-08-19
*/
public interface YysRequisitionReportMapper extends BaseMapper<YysRequisitionReportEntity> {

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
* 2024-08-19
*/
public interface YysRequisitionReportService extends IService<YysRequisitionReportEntity> {
List<YysRequisitionReportEntity> getList(YysRequisitionReportPagination yysRequisitionReportPagination);

@ -36,7 +36,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-08-07
* 2024-08-19
*/
@Service
public class YysRequisitionReportServiceImpl extends ServiceImpl<YysRequisitionReportMapper, YysRequisitionReportEntity> implements YysRequisitionReportService{
@ -275,15 +275,12 @@ public class YysRequisitionReportServiceImpl extends ServiceImpl<YysRequisitionR
id = form.getId();
}
//主表字段验证
if(StringUtil.isEmpty(form.getProductCode())){
return "产品编码不能为空";
}
if(StringUtil.isNotEmpty(form.getProductName())){
form.setProductName(form.getProductName().trim());
QueryWrapper<YysRequisitionReportEntity> productNameWrapper=new QueryWrapper<>();
productNameWrapper.lambda().eq(YysRequisitionReportEntity::getProductName,form.getProductName());
//假删除标志
productNameWrapper.lambda().isNull(YysRequisitionReportEntity::getDeleteMark);
productNameWrapper.lambda().isNull(YysRequisitionReportEntity::getDeletemark);
if (isUp){
productNameWrapper.lambda().ne(YysRequisitionReportEntity::getId, id);
}

@ -54,7 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Slf4j
@RestController
@ -170,9 +170,6 @@ public class YysRequisitionReportController {
case "deviceName" :
entitys.add(new ExcelExportEntity("设备名称" ,"deviceName"));
break;
case "sort" :
entitys.add(new ExcelExportEntity("顺序号" ,"sort"));
break;
case "post" :
entitys.add(new ExcelExportEntity("班次" ,"post"));
break;
@ -197,6 +194,9 @@ public class YysRequisitionReportController {
case "classBalance" :
entitys.add(new ExcelExportEntity("本班结存" ,"classBalance"));
break;
case "sort" :
entitys.add(new ExcelExportEntity("顺序号" ,"sort"));
break;
default:
break;
}

@ -9,17 +9,17 @@ import java.util.Date;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Data
@TableName("yys_requisition_report")
public class YysRequisitionReportEntity {
@TableId(value ="ID" )
private String id;
@TableField(value = "WORK_ID" , updateStrategy = FieldStrategy.IGNORED)
@TableField("WORK_ID")
private String workId;
@TableField(value = "MANUFACTURE_TIME" , updateStrategy = FieldStrategy.IGNORED)
private Date manufactureTime;
private String manufactureTime;
@TableField(value = "DEVICE_CODE" , updateStrategy = FieldStrategy.IGNORED)
private String deviceCode;
@TableField(value = "DEVICE_NAME" , updateStrategy = FieldStrategy.IGNORED)

@ -11,7 +11,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Data
public class YysRequisitionReportExcelErrorVO extends YysRequisitionReportExcelVO{

@ -17,7 +17,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Data
public class YysRequisitionReportExcelVO{

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Data
public class YysRequisitionReportForm {
@ -29,12 +29,9 @@ public class YysRequisitionReportForm {
/** 设备名称 **/
@JsonProperty("deviceName")
private String deviceName;
/** 顺序号 **/
@JsonProperty("sort")
private BigDecimal sort;
/** 班次 **/
@JsonProperty("post")
private Object post;
private String post;
/** 开始时间 **/
@JsonProperty("startTime")
private String startTime;
@ -56,4 +53,7 @@ public class YysRequisitionReportForm {
/** 本班结存 **/
@JsonProperty("classBalance")
private String classBalance;
/** 顺序号 **/
@JsonProperty("sort")
private BigDecimal sort;
}

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-08-07
* @ 2024-08-19
*/
@Data
public class YysRequisitionReportPagination extends Pagination {

@ -30,15 +30,6 @@
<p>{{dataForm.deviceName}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="顺序号"
prop="sort" >
<JnpfNumber v-model="dataForm.sort"
placeholder="顺序号" disabled
:min="1" :step="1" >
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="班次"
prop="post" >
@ -87,6 +78,15 @@
<p>{{dataForm.classBalance}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="顺序号"
prop="sort" >
<JnpfNumber v-model="dataForm.sort"
placeholder="顺序号" disabled
:min="1" :step="1" >
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row>
@ -114,18 +114,16 @@
manufactureTime : '',
deviceCode : "",
deviceName : '',
sort : 1,
post : "1",
post : "",
startTime : '',
endTime : '',
productCode : '',
productCode : "",
productName : '',
model : '',
duty : '',
classBalance : '',
sort : 1,
},
postOptions:[{"fullName":"旺季白班","id":"1"},{"fullName":"旺季晚班","id":"2"}],
postProps:{"label":"fullName","value":"id" },
}
},

File diff suppressed because one or more lines are too long

@ -36,10 +36,9 @@
<el-col :span="8">
<jnpf-form-tip-item label="生产日期" prop="manufactureTime">
<JnpfDatePicker v-model="dataForm.manufactureTime"
@change="changeData('manufactureTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择生产日期" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
@change="changeData('manufactureTime', -1)" :startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择生产日期" clearable
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
@ -48,11 +47,10 @@
<JnpfPopupSelect v-model="dataForm.deviceCode" @change="changeData('deviceCode', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.deviceCode"
placeholder="请选择设备编码" propsValue="device_code" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='device_code' field='deviceCode'
popupType="dialog" relationField='device_name' field='deviceCode'
interfaceId="590497496266971845" :pageSize="20"
:columnOptions="deviceCodecolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
@ -62,27 +60,23 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="顺序号" prop="sort">
<JnpfInputNumber v-model="dataForm.sort" @change="changeData('sort', -1)"
placeholder="顺序号" :min="1" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="班次" prop="post">
<JnpfSelect v-model="dataForm.post" @change="changeData('post', -1)" placeholder="请选择班次"
clearable :style='{ "width": "100%" }' :options="postOptions" :props="postProps">
</JnpfSelect>
<JnpfPopupSelect v-model="dataForm.post" @change="changeData('post', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.post"
placeholder="请选择班次" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='classes_name' field='post'
interfaceId="595237502952944325" :pageSize="20" :columnOptions="postcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="开始时间" prop="startTime">
<JnpfTimePicker v-model="dataForm.startTime" @change="changeData('startTime', -1)"
:startTime="time(false, 1, 1, '', 'HH:mm', '')"
:endTime="time(false, 1, 1, '', 'HH:mm', '')" placeholder="请选择开始时间" clearable
:style='{ "width": "100%" }' format="HH:mm">
:startTime="time(false, 1, 1, '', 'HH:mm', '')" :endTime="time(false, 1, 1, '', 'HH:mm', '')"
placeholder="请选择开始时间" clearable :style='{ "width": "100%" }' format="HH:mm">
</JnpfTimePicker>
</jnpf-form-tip-item>
</el-col>
@ -90,17 +84,20 @@
<el-col :span="8">
<jnpf-form-tip-item label="结束时间" prop="endTime">
<JnpfTimePicker v-model="dataForm.endTime" @change="changeData('endTime', -1)"
:startTime="time(false, 1, 1, '', 'HH:mm', '')"
:endTime="time(false, 1, 1, '', 'HH:mm', '')" placeholder="请选择结束时间" clearable
:style='{ "width": "100%" }' format="HH:mm">
:startTime="time(false, 1, 1, '', 'HH:mm', '')" :endTime="time(false, 1, 1, '', 'HH:mm', '')"
placeholder="请选择结束时间" clearable :style='{ "width": "100%" }' format="HH:mm">
</JnpfTimePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="产品编码" prop="productCode">
<JnpfInput v-model="dataForm.productCode" @change="changeData('productCode', -1)"
placeholder="请输入产品编码" clearable :style='{ "width": "100%" }'>
</JnpfInput>
<JnpfPopupSelect v-model="dataForm.productCode" @change="changeData('productCode', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.productCode"
placeholder="请选择产品编码" hasPage propsValue="material_id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='material_name'
field='productCode' interfaceId="593079067666820933" :pageSize="20"
:columnOptions="productCodecolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
@ -119,8 +116,8 @@
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="当班领用" prop="duty">
<JnpfInput v-model="dataForm.duty" @change="changeData('duty', -1)"
placeholder="请输入当班领用" clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.duty" @change="changeData('duty', -1)" placeholder="请输入当班领用"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -131,6 +128,13 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="顺序号" prop="sort">
<JnpfInputNumber v-model="dataForm.sort" @change="changeData('sort', -1)"
placeholder="顺序号" :min="1" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
@ -185,8 +189,7 @@ export default {
manufactureTime: undefined,
deviceCode: undefined,
deviceName: undefined,
sort: 1,
post: "1",
post: undefined,
startTime: undefined,
endTime: undefined,
productCode: undefined,
@ -194,6 +197,7 @@ export default {
model: undefined,
duty: undefined,
classBalance: undefined,
sort: 1,
version: 0,
},
tableRequiredData: {},
@ -216,7 +220,7 @@ export default {
post: [
{
required: true,
message: '请至少选择一个',
message: '请选择班次',
trigger: 'change'
},
],
@ -237,8 +241,8 @@ export default {
productCode: [
{
required: true,
message: '请输入产品编码',
trigger: 'blur'
message: '请选择产品编码',
trigger: 'change'
},
],
model: [
@ -250,15 +254,14 @@ export default {
],
},
deviceCodecolumnOptions: [{ "label": "设备编码", "value": "device_code" }, { "label": "设备名称", "value": "device_name" }, { "label": "设备类型", "value": "device_desc" },],
postOptions: [{ "fullName": "旺季白班", "id": "1" }, { "fullName": "旺季晚班", "id": "2" }, { "fullName": "淡季白班", "id": "3" }, { "fullName": "淡季晚班", "id": "4" }],
postProps: { "label": "fullName", "value": "id" },
postcolumnOptions: [{ "label": "班次名称", "value": "classes_name" }, { "label": "开始时间", "value": "start_time" }, { "label": "结束时间", "value": "end_time" }, { "label": "时长", "value": "classes_duration" },],
productCodecolumnOptions: [{ "label": "产品编码", "value": "material_id" }, { "label": "产品名称", "value": "material_name" },],
childIndex: -1,
isEdit: false,
interfaceRes: {
manufactureTime: [],
deviceCode: [],
deviceName: [],
sort: [],
post: [],
startTime: [],
endTime: [],
@ -267,6 +270,7 @@ export default {
model: [],
duty: [],
classBalance: [],
sort: [],
},
}
},

@ -10,33 +10,20 @@
</JnpfDateRangePicker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品编码">
<el-input v-model="query.productCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品名称">
<el-input v-model="query.productName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="设备名称">
<el-input v-model="query.deviceName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
收起
</el-button>
</el-form-item>
</el-col>
</el-form>
@ -96,13 +83,13 @@
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
<!-- <el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> -->
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button> -->
</el-button>
</template>
</el-table-column>
</JNPF-table>
@ -161,14 +148,12 @@ export default {
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
manufactureTime: undefined,
productCode: undefined,
productName: undefined,
deviceName: undefined,
},
@ -194,10 +179,10 @@ export default {
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
postOptions: [{ "fullName": "旺季白班", "id": "1" }, { "fullName": "旺季晚班", "id": "2" }],
postProps: { "label": "fullName", "value": "id" },
interfaceRes: {
deviceCode: [],
post: [],
productCode: [],
},
}
},

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