Commit 0af2839f authored by 耿迪迪's avatar 耿迪迪

任务下发问题修改 gengdidi

parent 89278990
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TWorkOrderMapper;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.mapper.TEnterpriseInfoMapper;
import com.zehong.system.mapper.TWorkOrderMapper;
import com.zehong.system.service.ITWorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 燃气任务Service业务层处理
......@@ -21,6 +25,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Autowired
private TWorkOrderMapper tWorkOrderMapper;
@Autowired
private TEnterpriseInfoMapper tEnterpriseInfoMapper;
/**
* 查询燃气任务
*
......@@ -56,6 +63,21 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
tWorkOrder.setCreateTime(DateUtils.getNowDate());
tWorkOrder.setCreateBy(SecurityUtils.getUsername());
Long enterpriseId = SecurityUtils.getLoginUser().getUser().getDeptId();
if(null != enterpriseId){
if("-2".equals(enterpriseId.toString())){
tWorkOrder.setWorkCreateEnterpriseId("-2");
tWorkOrder.setWorkCreateEnterpriseName("政府部门");
}else{
TEnterpriseInfo enterpriseInfo = tEnterpriseInfoMapper.selectTEnterpriseInfoById(enterpriseId);
if(null != enterpriseInfo && StringUtils.isNotEmpty(enterpriseInfo.getEnterpriseName())){
tWorkOrder.setWorkCreateEnterpriseId(enterpriseId.toString());
tWorkOrder.setWorkCreateEnterpriseName(enterpriseInfo.getEnterpriseName());
}
}
}
return tWorkOrderMapper.insertTWorkOrder(tWorkOrder);
}
......
......@@ -137,6 +137,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workCreateEnterpriseId != null">work_create_enterprise_id = #{workCreateEnterpriseId},</if>
<if test="workAssignEnterproseName != null">work_assign_enterprose_name = #{workAssignEnterproseName},</if>
<if test="workAssignEnterproseId != null">work_assign_enterprose_id = #{workAssignEnterproseId},</if>
<if test="workAssignManId == null">work_assign_man_id = null,</if>
<if test="workAssignManId != null">work_assign_man_id = #{workAssignManId},</if>
<if test="workAssignMan != null">work_assign_man = #{workAssignMan},</if>
<if test="workStatus != null">work_status = #{workStatus},</if>
......
......@@ -237,7 +237,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="12" v-show="isDetail">
<el-form-item label="创建单位" prop="inspectionDate">
<el-input v-model="form.workCreateEnterpriseName" placeholder="请输入创建单位名称" :disabled="isDetail"/>
</el-form-item>
......@@ -714,13 +714,20 @@ export default {
},
//获取指派人
selectInspection(userId,type){
let userName = this.inspectors.find(val=>val.userId == userId).userName;
if("edit" == type){
this.form.workAssignMan = userName;
if(userId){
let userName = this.inspectors.find(val=>val.userId == userId).userName;
if("edit" == type){
this.form.workAssignMan = userName;
}else{
this.workForm.workAssignMan = userName;
}
}else{
this.workForm.workAssignMan = userName;
if("edit" == type){
this.form.workAssignMan = "";
}else{
this.workForm.workAssignMan = "";
}
}
},
/*//选择任务类型
selectWorkType(workType){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment