报价记录表问题修改

This commit is contained in:
z 2025-01-21 14:30:21 +08:00
parent f97cf8d705
commit d609be3717
15 changed files with 108 additions and 76 deletions

View File

@ -33,7 +33,7 @@ public class MasterPageReqVO extends PageParam {
private String jyMaster;
@Schema(description = "借用人")
private Long jyUser;
private String jyUser;
@Schema(description = "借用类型", example = "1")
private Integer jyType;

View File

@ -53,4 +53,13 @@ public class MasterRespVO {
@ExcelProperty("借用日期")
private LocalDateTime jyDate;
@Schema(description = "借用人")
@ExcelProperty("借用人")
private String jyUsers;
@Schema(description = "借用部门")
@ExcelProperty("借用部门")
private String jyBms;
@Schema(description = "借用物料名称")
@ExcelProperty("借用物料名称")
private String jyMasters;
}

View File

@ -11,7 +11,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.time.LocalDateTime;

View File

@ -2,10 +2,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 基础信息-报价记录新增/修改 Request VO")

View File

@ -40,6 +40,8 @@ public class TaskPlanJDBaoBiaoPageReqVO extends PageParam {
@Schema(description = "工序名称")
private String procdureName;
@Schema(description = "类型")
private String type;
@Schema(description = "总预计工时")
private BigDecimal workTime;

View File

@ -60,5 +60,11 @@ public class MasterDO extends BaseDO {
* 借用时间
*/
private LocalDateTime jyDate;
@TableField(exist = false)
private String jyUsers;
@TableField(exist = false)
private String jyBms;
@TableField(exist = false)
private String jyMasters;
}

View File

@ -125,7 +125,8 @@ public class TaskDispatchDetailDO extends BaseDO {
private String planCode;
@TableField(exist = false)
private String procdureName;
@TableField(exist = false)
private String type;
/**
* 预计工时
*/

View File

@ -2,12 +2,19 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.master;
import java.util.*;
import cn.hutool.core.util.ObjectUtil;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.apache.ibatis.annotations.Mapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
import org.springframework.util.StringUtils;
/**
* 借用主 Mapper
@ -18,16 +25,18 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*;
public interface MasterMapper extends BaseMapperX<MasterDO> {
default PageResult<MasterDO> selectPage(MasterPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<MasterDO>()
.betweenIfPresent(MasterDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(MasterDO::getJyBm, reqVO.getJyBm())
.eqIfPresent(MasterDO::getJyYt, reqVO.getJyYt())
.eqIfPresent(MasterDO::getRem, reqVO.getRem())
.eqIfPresent(MasterDO::getJyMaster, reqVO.getJyMaster())
.eqIfPresent(MasterDO::getJyUser, reqVO.getJyUser())
.eqIfPresent(MasterDO::getJyType, reqVO.getJyType())
.eqIfPresent(MasterDO::getNum, reqVO.getNum())
.orderByDesc(MasterDO::getId));
MPJLambdaWrapper<MasterDO> query = new MPJLambdaWrapper<>();
query.selectAll(MasterDO.class)
.select("b.nickname as jyUsers,c.name as jyBms,d.name as jyMasters")
.leftJoin(AdminUserDO.class,"b",AdminUserDO::getId,MasterDO::getJyUser)
.leftJoin(DeptDO.class,"c",DeptDO::getId,MasterDO::getJyBm)
.leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterDO::getJyMaster);
query.eq(!ObjectUtil.isEmpty(reqVO.getJyYt()), MasterDO::getJyYt, reqVO.getJyYt())
.eq(!ObjectUtil.isEmpty(reqVO.getJyType()), MasterDO::getJyType, reqVO.getJyType())
.like(!ObjectUtil.isEmpty(reqVO.getJyBm()), DeptDO::getName, reqVO.getJyBm())
.like(!ObjectUtil.isEmpty(reqVO.getJyMaster()), MaterialDO::getName, reqVO.getJyMaster())
.like(!ObjectUtil.isEmpty(reqVO.getJyUser()), AdminUserDO::getNickname, reqVO.getJyUser());
return selectPage(reqVO,query);
}
}

View File

@ -1,13 +1,11 @@
package com.chanko.yunxi.mes.module.heli.service.pricequoterecord;
import java.util.*;
import javax.validation.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
/**
* 基础信息-报价记录 Service 接口

View File

@ -5,16 +5,16 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrder
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.dal.mysql.pricequoterecord.PricequoterecordMapper;

View File

@ -23,6 +23,7 @@
f.name AS procdureName,
t.work_time AS workTime,
t.owner,
b.dispatch_type as type,
t.amount AS amount,
COALESCE(SUM(CASE WHEN h.work_time IS NULL THEN 0 ELSE h.work_time END), 0) AS bgWorkTime,
COALESCE(SUM(CASE WHEN h.amount IS NULL THEN 0 ELSE h.amount END), 0) AS bgAmount,

View File

@ -212,7 +212,7 @@ const formData = ref({
projectName: undefined,
salesman: undefined,
clientActuality: undefined,
winTheBiddingTime: [],
winTheBiddingTime: undefined,
winTheResult: undefined,
winTheGrasp: undefined,
craftInfos: [],
@ -344,6 +344,9 @@ const submitForm = async (active) => {
//
formData.value.active = active
await formRef.value.validate()
if (formData.value.winTheBiddingTime.length==0){
formData.value.winTheBiddingTime=''
}
//
formLoading.value = true

View File

@ -94,15 +94,15 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="借用人" align="center" prop="jyUser" >
<template #default="scope">
{{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}
</template>
<el-table-column label="借用人" align="center" prop="jyUsers" >
<!-- <template #default="scope">-->
<!-- {{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="借用部门" align="center" prop="jyBm" >
<template #default="scope">
{{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}
</template>
<el-table-column label="借用部门" align="center" prop="jyBms" >
<!-- <template #default="scope">-->
<!-- {{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}-->
<!-- </template>-->
</el-table-column>
<el-table-column
label="单据日期"
@ -122,10 +122,10 @@
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="num" />
<el-table-column label="借用物料名称" align="center" prop="jyMaster" width="180">
<template #default="scope">
{{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}
</template>
<el-table-column label="借用物料名称" align="center" prop="jyMasters" width="180">
<!-- <template #default="scope">-->
<!-- {{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="rem" />
<el-table-column label="操作" align="center">

View File

@ -94,15 +94,15 @@
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" show-summary :summary-method="getSummaries">
<el-table-column label="主键" align="center" prop="id" />
<el-table-column label="借用人" align="center" prop="jyUser" >
<template #default="scope">
{{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}
</template>
<el-table-column label="借用人" align="center" prop="jyUsers" >
<!-- <template #default="scope">-->
<!-- {{ userList.find((user) => user.id === scope.row.jyUser)?.nickname }}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="借用部门" align="center" prop="jyBm" >
<template #default="scope">
{{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}
</template>
<el-table-column label="借用部门" align="center" prop="jyBms" >
<!-- <template #default="scope">-->
<!-- {{deptList.find((dept)=>dept.id==scope.row.jyBm)?.name}}-->
<!-- </template>-->
</el-table-column>
<el-table-column
label="单据日期"
@ -123,32 +123,32 @@
</el-table-column>
<el-table-column label="数量" align="center" prop="num" />
<el-table-column label="借出数量" align="center" prop="quantityLent" />
<el-table-column label="借用物料名称" align="center" prop="jyMaster" width="160">
<template #default="scope">
{{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}
</template>
<el-table-column label="借用物料名称" align="center" prop="jyMasters" width="160">
<!-- <template #default="scope">-->
<!-- {{materialList.find((material)=>material.id==scope.row.jyMaster)?.name}}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="rem" />
<el-table-column label="操作" align="center" width="140">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['heli:master:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['heli:master:delete']"
>
删除
</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="140">-->
<!-- <template #default="scope">-->
<!-- <el-button-->
<!-- link-->
<!-- type="primary"-->
<!-- @click="openForm('update', scope.row.id)"-->
<!-- v-hasPermi="['heli:master:update']"-->
<!-- >-->
<!-- 编辑-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- link-->
<!-- type="danger"-->
<!-- @click="handleDelete(scope.row.id)"-->
<!-- v-hasPermi="['heli:master:delete']"-->
<!-- >-->
<!-- 删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- 分页 -->
<Pagination
@ -207,8 +207,10 @@ const getList = async () => {
list.value.map(item=>{
if (item.jyType=="4"){
item.quantityLent= Number(-Math.abs(item.num));
}else {
}else if (item.jyType=="1"){
item.quantityLent= Number(item.num);
}else {
item.quantityLent=0
}
})
total.value = data.total

View File

@ -91,6 +91,11 @@
<el-table-column label="项目编号" align="center" prop="projectCode" width="240px" />
<el-table-column label="项目名称" align="center" prop="projectName" width="240px"/>
<el-table-column label="报工类型" align="center" prop="planType" width="160px">
<template #default="scope">
{{scope.row.type=='ASSEMBLE'?"装配任务派工单":"生产任务派工单"}}
</template>
</el-table-column>
<el-table-column label="生产计划号" align="center" prop="taskNo" width="240px"/>
<el-table-column label="生产状态" align="center" prop="planType" >
<template #default="scope">