功能完善

This commit is contained in:
bns_han 2024-03-06 17:59:51 +08:00
parent 89f30114a8
commit 14dedcf440
5 changed files with 267 additions and 28 deletions

View File

@ -68,7 +68,7 @@
<if test="wpName != null and wpName != ''">and mt3.type_name = #{wpName}</if> <if test="wpName != null and wpName != ''">and mt3.type_name = #{wpName}</if>
<if test="isBind != null and isBind != ''">and b.is_bind = #{isBind}</if> <if test="isBind != null and isBind != ''">and b.is_bind = #{isBind}</if>
ORDER BY b.is_bind ASC,a.bind_time DESC,b.create_time DESC ORDER BY b.is_bind ASC,b.label_id DESC
</select> </select>
<select id="selecthistoryList" parameterType="com.bonus.sgzb.base.vo.MaLabelBindVO" resultMap="MaLabelBindVOResult"> <select id="selecthistoryList" parameterType="com.bonus.sgzb.base.vo.MaLabelBindVO" resultMap="MaLabelBindVOResult">
SELECT b.label_id,a.id,b.is_bind,b.label_code,a.bind_time,b.label_type,mt.type_id,mt.type_name, SELECT b.label_id,a.id,b.is_bind,b.label_code,a.bind_time,b.label_type,mt.type_id,mt.type_name,

View File

@ -26,6 +26,10 @@ public class PurchaseCheckInfo extends BaseEntity
@ApiModelProperty(value = "任务ID") @ApiModelProperty(value = "任务ID")
private Long taskId; private Long taskId;
/** 类型id */
@ApiModelProperty(value = "类型id")
private Long typeId;
@ApiModelProperty(value = "采购单号") @ApiModelProperty(value = "采购单号")
@Excel(name = "采购单号") @Excel(name = "采购单号")
private String code; private String code;
@ -100,6 +104,12 @@ public class PurchaseCheckInfo extends BaseEntity
@ApiModelProperty(value = "数据所属组织") @ApiModelProperty(value = "数据所属组织")
private Integer companyId; private Integer companyId;
@ApiModelProperty(value="开始时间")
private String startTime;
@ApiModelProperty(value="结束时间")
private String endTime;
public String getKeyWord() { public String getKeyWord() {
return keyWord; return keyWord;
} }
@ -289,6 +299,30 @@ public class PurchaseCheckInfo extends BaseEntity
this.inputStatus = inputStatus; this.inputStatus = inputStatus;
} }
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
this.typeId = typeId;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

View File

@ -23,18 +23,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectPurchaseCheckInfoList" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckInfo" resultMap="PurchaseCheckInfoResult"> <select id="selectPurchaseCheckInfoList" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckInfo" resultMap="PurchaseCheckInfoResult">
select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time, pci.update_by, select pci.id,pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.create_by, pci.create_time,
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,su.user_name purchaserName,tk.task_status taskStatus pci.update_by,
pci.update_time, pci.remark, pci.company_id ,dict.name purchasingStatus,tk.code,su.user_name
purchaserName,tk.task_status taskStatus
from purchase_check_info pci from purchase_check_info pci
left join tm_task tk on pci.task_id = tk.task_id left join tm_task tk on pci.task_id = tk.task_id
left join (select id,name from sys_dic where p_id = 23) dict on tk.task_status = dict.id left join (select id,name from sys_dic where p_id = 23) dict on tk.task_status = dict.id
left join sys_user su on pci.purchaser = su.user_id left join sys_user su on pci.purchaser = su.user_id
LEFT JOIN purchase_check_details pcd on pcd.task_id=pci.task_id
where task_type = 23 where task_type = 23
<if test="keyWord != null and keyWord != ''"> and tk.code like concat('%',#{keyWord},'%')</if> <if test="keyWord != null and keyWord != ''">
<if test="purchaseTime != null and purchaseTime != ''"> and pci.purchase_time = #{purchaseTime}</if> and (tk.code like concat('%',#{keyWord},'%') or
<if test="arrivalTime != null and arrivalTime != ''"> and pci.arrival_time = #{arrivalTime}</if> su.user_name like concat('%',#{keyWord},'%')
<if test="purchaser != null "> and pci.purchaser = #{purchaser}</if> )
<if test="companyId != null "> and pci.company_id = #{companyId}</if> </if>
<if test="purchaseTime != null and purchaseTime != ''">and pci.purchase_time = #{purchaseTime}</if>
<if test="arrivalTime != null and arrivalTime != ''">and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null ">and pci.purchaser = #{purchaser}</if>
<if test="companyId != null ">and pci.company_id = #{companyId}</if>
<if test="typeId != null">AND #{typeId} IN (SELECT mt2.type_id
FROM purchase_check_details pcd
LEFT JOIN ma_type mt on mt.type_id=pcd.type_id
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
WHERE pcd.task_id = pci.task_id
)
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND ((pci.purchase_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))
or (pci.arrival_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')))
</if>
GROUP BY pcd.task_id
order by pci.create_time desc order by pci.create_time desc
</select> </select>

View File

@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.sgzb.material.mapper.ScrapRecordMapper">
<select id="getScrapRecordList" resultType="com.bonus.sgzb.material.domain.ScrapRecord">
SELECT sad.id,
unit.unit_name as unitName,
lot.lot_name as proName,
tt.`code`,
tt2.`code` as sourceCode,
mt2.type_name as typeName,
mt.type_name as typeModelName,
mt.unit_name as unit,
mm.ma_code as maCode,
sad.audit_time as scrapTime,
sad.scrap_num as scrapNum,
sad.remark,
su.user_name as userName
FROM scrap_apply_details sad
LEFT JOIN tm_task tt on tt.task_id = sad.task_id
LEFT JOIN repair_audit_details rad on rad.id = sad.parent_id
LEFT JOIN tm_task tt2 on tt2.task_id = rad.task_id
LEFT JOIN tm_task_agreement tta on tta.task_id = sad.task_id
LEFT JOIN bm_agreement_info bai on bai.agreement_id = tta.agreement_id
LEFT JOIN bm_project_lot lot on lot.lot_id = bai.project_id
LEFT JOIN bm_unit_info unit on unit.unit_id = bai.unit_id
LEFT JOIN ma_type mt on mt.type_id = sad.type_id
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id
LEFT JOIN sys_user su on su.user_id = sad.audit_by
WHERE sad.scrap_source = '2'
<if test="keyWord != null and keyWord != ''">
and (unit.unit_name like concat('%',#{keyWord},'%') or
lot.lot_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt.unit_name like concat('%',#{keyWord},'%') or
mm.ma_code like concat('%',#{keyWord},'%') or
su.user_name like concat('%',#{keyWord},'%'))
</if>
<if test="typeName != null and typeName != ''">
and mt2.type_name like concat('%',#{typeName},'%')
</if>
<if test="typeModelName != null and typeModelName != ''">
and mt.type_name like concat('%',#{typeModelName},'%')
</if>
<if test="unitId != null">
and unit.unit_id = #{unitId}
</if>
<if test="proId != null">
and lot.lot_id = #{proId}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if>
UNION ALL
SELECT sad.id,
unit.unit_name as unitName,
lot.lot_name as proName,
tt.`code`,
tt2.`code` as sourceCode,
mt2.type_name as typeName,
mt.type_name as typeModelName,
mt.unit_name as unit,
mm.ma_code as maCode,
sad.audit_time as scrapTime,
sad.scrap_num as scrapNum,
sad.remark,
su.user_name as userName
FROM scrap_apply_details sad
LEFT JOIN tm_task tt on tt.task_id = sad.task_id
LEFT JOIN back_apply_info baif on baif.id = sad.parent_id
LEFT JOIN tm_task tt2 on tt2.task_id = baif.task_id
LEFT JOIN tm_task_agreement tta on tta.task_id = sad.task_id
LEFT JOIN bm_agreement_info bai on bai.agreement_id = tta.agreement_id
LEFT JOIN bm_project_lot lot on lot.lot_id = bai.project_id
LEFT JOIN bm_unit_info unit on unit.unit_id = bai.unit_id
LEFT JOIN ma_type mt on mt.type_id = sad.type_id
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm on mm.ma_id = sad.ma_id
LEFT JOIN sys_user su on su.user_id = sad.audit_by
WHERE sad.scrap_source = '1'
<if test="keyWord != null and keyWord != ''">
and (unit.unit_name like concat('%',#{keyWord},'%') or
lot.lot_name like concat('%',#{keyWord},'%') or
mt2.type_name like concat('%',#{keyWord},'%') or
mt.type_name like concat('%',#{keyWord},'%') or
mt.unit_name like concat('%',#{keyWord},'%') or
mm.ma_code like concat('%',#{keyWord},'%') or
su.user_name like concat('%',#{keyWord},'%'))
</if>
<if test="typeName != null and typeName != ''">
and mt2.type_name like concat('%',#{typeName},'%')
</if>
<if test="typeModelName != null and typeModelName != ''">
and mt.type_name like concat('%',#{typeModelName},'%')
</if>
<if test="unitId != null">
and unit.unit_id = #{unitId}
</if>
<if test="proId != null">
and lot.lot_id = #{proId}
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND sad.audit_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
</if>
</select>
</mapper>

View File

@ -1,6 +1,33 @@
<template> <template>
<div class="app-container" id="newDevicesList"> <div class="app-container" id="newDevicesList">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="日期">
<el-date-picker
v-model="queryParams.time"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="设备类型" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择设备类型"
clearable filterable
style="width: 240px"
>
<el-option
v-for="typeItem in typesList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
</el-select>
</el-form-item>
<el-form-item label="关键字" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input
v-model="queryParams.keyWord" v-model="queryParams.keyWord"
@ -265,7 +292,9 @@
<script> <script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"; import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { listPurchaseCheckInfo,getPurchaseCheckInfo,getAcceptanceForm } from "@/api/store/newBuy"; import { listPurchaseCheckInfo,getPurchaseCheckInfo,getAcceptanceForm } from "@/api/store/newBuy";
import { getRepairedList, getRepairedDetailList, inputByType,getTypeList } from "@/api/store/warehousing";
import vueEasyPrint from 'vue-easy-print'; import vueEasyPrint from 'vue-easy-print';
import {getLeaseAuditListAll} from "@/api/claimAndRefund/receive";
export default { export default {
// name: "NewDevicesList", // name: "NewDevicesList",
@ -285,6 +314,9 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
typesList: [],
modelList: [],
// //
typeList: [], typeList: [],
// //
@ -297,6 +329,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
time:null, //
name: undefined, name: undefined,
}, },
openPrint: false, openPrint: false,
@ -317,19 +350,60 @@ export default {
}, },
created() { created() {
//refresh //refresh
const refresh = this.$route.query && this.$route.query.refresh; // const refresh = this.$route.query && this.$route.query.refresh;
console.log(refresh,'111111111') // console.log(refresh,'111111111')
if(refresh){ // if(refresh){
this.queryParams.keyWord = '' // this.queryParams.keyWord = ''
this.getList(); // this.queryParams.typeId = ''
} // this.getList();
// this.getTypeList();
// }
this.getList(); this.getList();
this.getTypeList();
}, },
methods: { methods: {
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typesList = response.data;
}
);
getTypeList({level:'4'}).then(response => {
this.modelList = response.data;
}
);
},
/** 查询字典类型列表 */ /** 查询字典类型列表 */
// async getList() {
// this.loading = true;
//
// const params = {
// keyWord:this.queryParams.keyWord,
// startTime:this.queryParams.time && this.queryParams.time[0],
// endTime:this.queryParams.time && this.queryParams.time[1],
// typId:this.queryParams.typId,
// pageSize: this.queryParams.pageSize,
// pageNum: this.queryParams.pageNum
// }
//
// const res = await listPurchaseCheckInfo(params)
// this.loading = false;
// this.typeList = res.data.rows;
// this.total = res.data.total;
//
// },
getList() { getList() {
this.loading = true; this.loading = true;
listPurchaseCheckInfo(this.addDateRange(this.queryParams, this.dateRange)).then(response => { const params = {
keyWord:this.queryParams.keyWord,
startTime:this.queryParams.time && this.queryParams.time[0],
endTime:this.queryParams.time && this.queryParams.time[1],
typeId:this.queryParams.typeId,
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
listPurchaseCheckInfo(this.addDateRange(params)).then(response => {
this.typeList = response.rows; this.typeList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;