提交代码
parent
b1853ed84b
commit
1a776f79ea
|
@ -27,7 +27,7 @@ public class ProProjectApplyDetail extends BaseEntity
|
||||||
|
|
||||||
/** 大类主键 */
|
/** 大类主键 */
|
||||||
@Excel(name = "大类主键")
|
@Excel(name = "大类主键")
|
||||||
private Long superTypeId;
|
private String superTypeKey;
|
||||||
|
|
||||||
/** 大类名称 */
|
/** 大类名称 */
|
||||||
@Excel(name = "大类名称")
|
@Excel(name = "大类名称")
|
||||||
|
@ -96,14 +96,14 @@ public class ProProjectApplyDetail extends BaseEntity
|
||||||
{
|
{
|
||||||
return applyId;
|
return applyId;
|
||||||
}
|
}
|
||||||
public void setSuperTypeId(Long superTypeId)
|
public void setSuperTypeKey(String superTypeKey)
|
||||||
{
|
{
|
||||||
this.superTypeId = superTypeId;
|
this.superTypeKey = superTypeKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getSuperTypeId()
|
public String getSuperTypeKey()
|
||||||
{
|
{
|
||||||
return superTypeId;
|
return superTypeKey;
|
||||||
}
|
}
|
||||||
public void setSuperTypeName(String superTypeName)
|
public void setSuperTypeName(String superTypeName)
|
||||||
{
|
{
|
||||||
|
@ -219,7 +219,7 @@ public class ProProjectApplyDetail extends BaseEntity
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("applyId", getApplyId())
|
.append("applyId", getApplyId())
|
||||||
.append("superTypeId", getSuperTypeId())
|
.append("superTypeId", getSuperTypeKey())
|
||||||
.append("superTypeName", getSuperTypeName())
|
.append("superTypeName", getSuperTypeName())
|
||||||
.append("typeId", getTypeId())
|
.append("typeId", getTypeId())
|
||||||
.append("typeName", getTypeName())
|
.append("typeName", getTypeName())
|
||||||
|
|
|
@ -2,10 +2,15 @@ package com.yanzhu.project.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.yanzhu.base.domain.BaseAssetsType;
|
||||||
|
import com.yanzhu.base.mapper.BaseAssetsTypeMapper;
|
||||||
|
import com.yanzhu.common.core.domain.entity.SysDictData;
|
||||||
import com.yanzhu.common.core.domain.entity.SysUser;
|
import com.yanzhu.common.core.domain.entity.SysUser;
|
||||||
import com.yanzhu.common.enums.ShiFouEnum;
|
import com.yanzhu.common.enums.ShiFouEnum;
|
||||||
import com.yanzhu.common.utils.DateUtils;
|
import com.yanzhu.common.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.utils.DictUtils;
|
||||||
import com.yanzhu.common.utils.SecurityUtils;
|
import com.yanzhu.common.utils.SecurityUtils;
|
||||||
|
import com.yanzhu.system.mapper.SysDictDataMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -28,6 +33,9 @@ public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProProjectApplyMapper proProjectApplyMapper;
|
private ProProjectApplyMapper proProjectApplyMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BaseAssetsTypeMapper baseAssetsTypeMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目申请
|
* 查询项目申请
|
||||||
*
|
*
|
||||||
|
@ -132,10 +140,21 @@ public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
||||||
Long id = proProjectApply.getId();
|
Long id = proProjectApply.getId();
|
||||||
if (StringUtils.isNotNull(proProjectApplyDetailList))
|
if (StringUtils.isNotNull(proProjectApplyDetailList))
|
||||||
{
|
{
|
||||||
|
String superTypeName = DictUtils.getDictLabel("sys_process_category", proProjectApply.getApplyType());
|
||||||
List<ProProjectApplyDetail> list = new ArrayList<ProProjectApplyDetail>();
|
List<ProProjectApplyDetail> list = new ArrayList<ProProjectApplyDetail>();
|
||||||
for (ProProjectApplyDetail proProjectApplyDetail : proProjectApplyDetailList)
|
for (ProProjectApplyDetail proProjectApplyDetail : proProjectApplyDetailList)
|
||||||
{
|
{
|
||||||
proProjectApplyDetail.setApplyId(id);
|
proProjectApplyDetail.setApplyId(id);
|
||||||
|
proProjectApplyDetail.setSuperTypeKey(proProjectApply.getApplyType());
|
||||||
|
proProjectApplyDetail.setSuperTypeName(superTypeName);
|
||||||
|
//资产
|
||||||
|
BaseAssetsType baseAssetsType = baseAssetsTypeMapper.selectBaseAssetsTypeById(proProjectApplyDetail.getAssetsId());
|
||||||
|
proProjectApplyDetail.setAssetsName(baseAssetsType.getName());
|
||||||
|
//资产类型
|
||||||
|
BaseAssetsType parentAssetsType = baseAssetsTypeMapper.selectBaseAssetsTypeById(baseAssetsType.getParentId());
|
||||||
|
proProjectApplyDetail.setTypeId(parentAssetsType.getId());
|
||||||
|
proProjectApplyDetail.setTypeName(parentAssetsType.getName());
|
||||||
|
proProjectApplyDetail.setIsDel(ShiFouEnum.FOU.getCode());
|
||||||
list.add(proProjectApplyDetail);
|
list.add(proProjectApplyDetail);
|
||||||
}
|
}
|
||||||
if (list.size() > 0)
|
if (list.size() > 0)
|
||||||
|
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<resultMap type="ProProjectApplyDetail" id="ProProjectApplyDetailResult">
|
<resultMap type="ProProjectApplyDetail" id="ProProjectApplyDetailResult">
|
||||||
<result property="id" column="sub_id" />
|
<result property="id" column="sub_id" />
|
||||||
<result property="applyId" column="sub_apply_id" />
|
<result property="applyId" column="sub_apply_id" />
|
||||||
<result property="superTypeId" column="sub_super_type_id" />
|
<result property="superTypeKey" column="sub_super_type_key" />
|
||||||
<result property="superTypeName" column="sub_super_type_name" />
|
<result property="superTypeName" column="sub_super_type_name" />
|
||||||
<result property="typeId" column="sub_type_id" />
|
<result property="typeId" column="sub_type_id" />
|
||||||
<result property="typeName" column="sub_type_name" />
|
<result property="typeName" column="sub_type_name" />
|
||||||
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectProProjectApplyById" parameterType="Long" resultMap="ProProjectApplyProProjectApplyDetailResult">
|
<select id="selectProProjectApplyById" parameterType="Long" resultMap="ProProjectApplyProProjectApplyDetailResult">
|
||||||
select a.id, a.dept_id, a.proj_id, a.proj_name, a.par_proj_name, a.apply_type, a.apply_status, a.apply_reason, a.apply_files, a.apply_user, a.use_time, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
select a.id, a.dept_id, a.proj_id, a.proj_name, a.par_proj_name, a.apply_type, a.apply_status, a.apply_reason, a.apply_files, a.apply_user, a.use_time, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||||
b.id as sub_id, b.apply_id as sub_apply_id, b.super_type_id as sub_super_type_id, b.super_type_name as sub_super_type_name, b.type_id as sub_type_id, b.type_name as sub_type_name, b.assets_id as sub_assets_id, b.assets_name as sub_assets_name, b.assets_unit as sub_assets_unit, b.number as sub_number, b.use_time as sub_use_time, b.use_reason as sub_use_reason, b.price as sub_price, b.total_price as sub_total_price, b.is_del as sub_is_del, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
|
b.id as sub_id, b.apply_id as sub_apply_id, b.super_type_key as sub_super_type_key, b.super_type_name as sub_super_type_name, b.type_id as sub_type_id, b.type_name as sub_type_name, b.assets_id as sub_assets_id, b.assets_name as sub_assets_name, b.assets_unit as sub_assets_unit, b.number as sub_number, b.use_time as sub_use_time, b.use_reason as sub_use_reason, b.price as sub_price, b.total_price as sub_total_price, b.is_del as sub_is_del, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
|
||||||
from pro_project_apply a
|
from pro_project_apply a
|
||||||
left join pro_project_apply_detail b on b.apply_id = a.id
|
left join pro_project_apply_detail b on b.apply_id = a.id
|
||||||
where a.id = #{id}
|
where a.id = #{id}
|
||||||
|
@ -164,9 +164,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<insert id="batchProProjectApplyDetail">
|
<insert id="batchProProjectApplyDetail">
|
||||||
insert into pro_project_apply_detail( id, apply_id, super_type_id, super_type_name, type_id, type_name, assets_id, assets_name, assets_unit, number, use_time, use_reason, price, total_price, is_del, create_by, create_time, update_by, update_time, remark) values
|
insert into pro_project_apply_detail( id, apply_id, super_type_key, super_type_name, type_id, type_name, assets_id, assets_name, assets_unit, number, use_time, use_reason, price, total_price, is_del, create_by, create_time, update_by, update_time, remark) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.id}, #{item.applyId}, #{item.superTypeId}, #{item.superTypeName}, #{item.typeId}, #{item.typeName}, #{item.assetsId}, #{item.assetsName}, #{item.assetsUnit}, #{item.number}, #{item.useTime}, #{item.useReason}, #{item.price}, #{item.totalPrice}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
( #{item.id}, #{item.applyId}, #{item.superTypeKey}, #{item.superTypeName}, #{item.typeId}, #{item.typeName}, #{item.assetsId}, #{item.assetsName}, #{item.assetsUnit}, #{item.number}, #{item.useTime}, #{item.useReason}, #{item.price}, #{item.totalPrice}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
</mapper>
|
</mapper>
|
|
@ -569,17 +569,19 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.procInsId || this.ids; // 暂不支持删除多个流程
|
const ids = row.procInsId || this.ids; // 暂不支持删除多个流程
|
||||||
|
const that = this;
|
||||||
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
|
this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
that.loading = true;
|
||||||
return delDeployment(ids);
|
return delDeployment(ids);
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
that.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
that.$modal.msgSuccess("删除成功");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
|
|
|
@ -65,9 +65,7 @@
|
||||||
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
:fileType="['pdf', 'png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx']"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-divider content-position="left" style="margin-left"
|
<el-divider content-position="left" style="margin-left">申请明细信息</el-divider>
|
||||||
>项目申请明细信息</el-divider
|
|
||||||
>
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -110,17 +108,13 @@
|
||||||
>
|
>
|
||||||
<el-option-group
|
<el-option-group
|
||||||
v-for="group in AssetsTypeOptions"
|
v-for="group in AssetsTypeOptions"
|
||||||
:key="group.id + ''"
|
:key="group.id"
|
||||||
:label="
|
:label="group.name"
|
||||||
group.name + ' [' + group.deptId ? '项目自定义' : '系统默认' + '] '
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in group.childrenAssetsTypeList"
|
v-for="item in group.childrenAssetsTypeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="
|
:label="item.name"
|
||||||
item.name + ' [' + group.deptId ? '项目自定义' : '系统默认' + '] '
|
|
||||||
"
|
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
@ -144,7 +138,7 @@
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in unitOptions"
|
v-for="(item, index) in getUnitOptions(scope.row.assetsId)"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item"
|
:label="item"
|
||||||
:value="item"
|
:value="item"
|
||||||
|
@ -250,7 +244,6 @@ export default {
|
||||||
options: {},
|
options: {},
|
||||||
taskTitle: null,
|
taskTitle: null,
|
||||||
taskOpen: false,
|
taskOpen: false,
|
||||||
daterangeMarksTime: [],
|
|
||||||
proProjectApplyDetailList: [],
|
proProjectApplyDetailList: [],
|
||||||
// 子表选中数据
|
// 子表选中数据
|
||||||
checkedProProjectApplyDetail: [],
|
checkedProProjectApplyDetail: [],
|
||||||
|
@ -273,7 +266,7 @@ export default {
|
||||||
this.projectOptions = response.data;
|
this.projectOptions = response.data;
|
||||||
if (response.data.length > 0) {
|
if (response.data.length > 0) {
|
||||||
this.form.projId = response.data[0].id;
|
this.form.projId = response.data[0].id;
|
||||||
this.form.projName = response.data[0].projName;
|
this.form.projName = response.data[0].name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -290,7 +283,7 @@ export default {
|
||||||
projectChage(val) {
|
projectChage(val) {
|
||||||
for (let i = 0; i < this.projectOptions.length; i++) {
|
for (let i = 0; i < this.projectOptions.length; i++) {
|
||||||
if (this.projectOptions[i].id == val) {
|
if (this.projectOptions[i].id == val) {
|
||||||
this.form.projName = this.projectOptions[i].projName;
|
this.form.projName = this.projectOptions[i].name;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,12 +291,20 @@ export default {
|
||||||
doCanel() {
|
doCanel() {
|
||||||
this.onOpen = false;
|
this.onOpen = false;
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
this.checkedProProjectApplyDetail = [];
|
||||||
|
this.proProjectApplyDetailList = [];
|
||||||
|
this.form = {};
|
||||||
|
},
|
||||||
show(options) {
|
show(options) {
|
||||||
|
this.reset();
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.initMyProject();
|
this.initMyProject();
|
||||||
//物资设备类需要输入规格
|
//物资设备类需要输入规格
|
||||||
if (options.category == 1) {
|
if (options.category == 1) {
|
||||||
this.showAssetsVersion = true;
|
this.showAssetsVersion = true;
|
||||||
|
} else {
|
||||||
|
this.showAssetsVersion = false;
|
||||||
}
|
}
|
||||||
this.initCategoryAssetsType(options.category);
|
this.initCategoryAssetsType(options.category);
|
||||||
this.title = options.name;
|
this.title = options.name;
|
||||||
|
@ -415,19 +416,23 @@ export default {
|
||||||
x++
|
x++
|
||||||
) {
|
) {
|
||||||
if (this.AssetsTypeOptions[i].childrenAssetsTypeList[x].id == val) {
|
if (this.AssetsTypeOptions[i].childrenAssetsTypeList[x].id == val) {
|
||||||
this.unitOptions = this.AssetsTypeOptions[i].childrenAssetsTypeList[x].unit;
|
if (this.getUnitOptions(val) == null) {
|
||||||
if (this.unitOptions.length > 0) {
|
this.unitOptions.push({
|
||||||
|
id: val,
|
||||||
|
data: this.AssetsTypeOptions[i].childrenAssetsTypeList[x].unit.split(","),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.AssetsTypeOptions.forEach((item) => {
|
},
|
||||||
item.userinfoList.forEach((u) => {
|
getUnitOptions(val) {
|
||||||
if (u.phonenumber == val) {
|
for (let i = 0; i < this.unitOptions.length; i++) {
|
||||||
this.form.superviseUserName = u.nickName + " [" + u.jobTypeName + "] ";
|
if (this.unitOptions[i].id == val) {
|
||||||
}
|
return this.unitOptions[i].data;
|
||||||
});
|
}
|
||||||
});
|
}
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue