Commit c0837a59 authored by 耿迪迪's avatar 耿迪迪

任务问题修改 gengdidi

parent 886765d8
......@@ -92,6 +92,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
tWorkOrder.setUpdateTime(DateUtils.getNowDate());
tWorkOrder.setUpdateBy(SecurityUtils.getUsername());
/*if(StringUtils.isNotEmpty(tWorkOrder.getIconUrl()) || StringUtils.isNotEmpty(tWorkOrder.getRectificationResult())){
tWorkOrder.setWorkStatus("2");
}*/
return tWorkOrderMapper.updateTWorkOrder(tWorkOrder);
}
......
......@@ -34,39 +34,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTWorkOrderVo">
select work_id, work_title, work_type, work_content, work_create_enterprise_name, work_create_enterprise_id, work_assign_enterprose_name, work_assign_enterprose_id, work_assign_man_id, work_assign_man, work_status, inspection_date, inspection_route, problem_description, icon_url, rectification_plan, rectification_result, responsible_unit, responsible_person, expiry_date, create_by, create_time, update_by, update_time, is_del, remarks from t_work_order
SELECT
workOrder.work_id,
workOrder.work_title,
workOrder.work_type,
workOrder.work_content,
workOrder.work_create_enterprise_name,
workOrder.work_create_enterprise_id,
info.enterprise_name AS work_assign_enterprose_name,
workOrder.work_assign_enterprose_id,
workOrder.work_assign_man_id,
usr.user_name AS work_assign_man,
workOrder.work_status,
workOrder.inspection_date,
workOrder.inspection_route,
workOrder.problem_description,
workOrder.icon_url,
workOrder.rectification_plan,
workOrder.rectification_result,
workOrder.responsible_unit,
workOrder.responsible_person,
workOrder.expiry_date,
workOrder.create_by,
workOrder.create_time,
workOrder.update_by,
workOrder.update_time,
workOrder.is_del,
workOrder.remarks
FROM
t_work_order workOrder
LEFT JOIN sys_user usr ON usr.user_id = workOrder.work_assign_man_id
LEFT JOIN t_enterprise_info info ON info.enterprise_id = workOrder.work_assign_enterprose_id
</sql>
<select id="selectTWorkOrderList" parameterType="TWorkOrder" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/>
<where>
<if test="workTitle != null and workTitle != ''"> and work_title like concat('%', #{workTitle}, '%')</if>
<if test="workType != null and workType != ''"> and work_type = #{workType}</if>
<if test="workContent != null and workContent != ''"> and work_content = #{workContent}</if>
<if test="workCreateEnterpriseName != null and workCreateEnterpriseName != ''"> and work_create_enterprise_name like concat('%', #{workCreateEnterpriseName}, '%')</if>
<if test="workCreateEnterpriseId != null and workCreateEnterpriseId != ''"> and work_create_enterprise_id = #{workCreateEnterpriseId}</if>
<if test="workAssignEnterproseName != null and workAssignEnterproseName != ''"> and work_assign_enterprose_name like concat('%', #{workAssignEnterproseName}, '%')</if>
<if test="workAssignEnterproseId != null "> and work_assign_enterprose_id = #{workAssignEnterproseId}</if>
<if test="workAssignManId != null "> and work_assign_man_id = #{workAssignManId}</if>
<if test="workAssignMan != null and workAssignMan != ''"> and work_assign_man = #{workAssignMan}</if>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
<if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
<if test="inspectionRoute != null and inspectionRoute != ''"> and inspection_route = #{inspectionRoute}</if>
<if test="problemDescription != null and problemDescription != ''"> and problem_description = #{problemDescription}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="rectificationPlan != null and rectificationPlan != ''"> and rectification_plan = #{rectificationPlan}</if>
<if test="rectificationResult != null and rectificationResult != ''"> and rectification_result = #{rectificationResult}</if>
<if test="responsibleUnit != null and responsibleUnit != ''"> and responsible_unit = #{responsibleUnit}</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
<if test="expiryDate != null "> and expiry_date = #{expiryDate}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="workTitle != null and workTitle != ''"> and workOrder.work_title like concat('%', #{workTitle}, '%')</if>
<if test="workType != null and workType != ''"> and workOrder.work_type = #{workType}</if>
<if test="workContent != null and workContent != ''"> and workOrder.work_content = #{workContent}</if>
<if test="workCreateEnterpriseName != null and workCreateEnterpriseName != ''"> and workOrder.work_create_enterprise_name like concat('%', #{workCreateEnterpriseName}, '%')</if>
<if test="workCreateEnterpriseId != null and workCreateEnterpriseId != ''"> and workOrder.work_create_enterprise_id = #{workCreateEnterpriseId}</if>
<if test="workAssignEnterproseName != null and workAssignEnterproseName != ''"> and info.work_assign_enterprose_name like concat('%', #{workAssignEnterproseName}, '%')</if>
<if test="workAssignEnterproseId != null "> and workOrder.work_assign_enterprose_id = #{workAssignEnterproseId}</if>
<if test="workAssignManId != null "> and workOrder.work_assign_man_id = #{workAssignManId}</if>
<if test="workAssignMan != null and workAssignMan != ''"> and user.work_assign_man = #{workAssignMan}</if>
<if test="workStatus != null and workStatus != ''"> and workOrder.work_status = #{workStatus}</if>
<if test="inspectionDate != null "> and workOrder.inspection_date = #{inspectionDate}</if>
<if test="inspectionRoute != null and inspectionRoute != ''"> and workOrder.inspection_route = #{inspectionRoute}</if>
<if test="problemDescription != null and problemDescription != ''"> and workOrder.problem_description = #{problemDescription}</if>
<if test="iconUrl != null and iconUrl != ''"> and workOrder.icon_url = #{iconUrl}</if>
<if test="rectificationPlan != null and rectificationPlan != ''"> and workOrder.rectification_plan = #{rectificationPlan}</if>
<if test="rectificationResult != null and rectificationResult != ''"> and workOrder.rectification_result = #{rectificationResult}</if>
<if test="responsibleUnit != null and responsibleUnit != ''"> and workOrder.responsible_unit = #{responsibleUnit}</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and workOrder.responsible_person = #{responsiblePerson}</if>
<if test="expiryDate != null "> and workOrder.expiry_date = #{expiryDate}</if>
<if test="isDel != null and isDel != ''"> and workOrder.is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and workOrder.remarks = #{remarks}</if>
</where>
ORDER BY workOrder.create_time DESC
</select>
<select id="selectTWorkOrderById" parameterType="Long" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/>
where work_id = #{workId}
where workOrder.work_id = #{workId}
</select>
<insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId">
......@@ -137,7 +169,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 and workAssignMan == ''">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>
......
......@@ -132,6 +132,7 @@
type="text"
icon="el-icon-edit"
@click="workDetail(scope.row)"
v-hasPermi="['system:order:edit']"
>详情</el-button>
<el-button v-if="scope.row.workStatus == '0' || scope.row.workStatus == '1'"
size="mini"
......@@ -152,24 +153,28 @@
type="text"
icon="el-icon-edit"
@click="workIssue(scope.row)"
v-hasPermi="['system:order:edit']"
>任务下发</el-button>
<el-button v-if=" 'inpector'== roleType && scope.row.workStatus == '0'"
size="mini"
type="text"
icon="el-icon-edit"
@click="takingOrder(scope.row)"
v-hasPermi="['system:order:edit']"
>接单</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '1'"
<el-button v-if="'zhengfu'!= roleType && (scope.row.workStatus == '0' || scope.row.workStatus == '1')"
size="mini"
type="text"
icon="el-icon-edit"
@click="feedbookWork(scope.row)"
v-hasPermi="['system:order:edit']"
>反馈</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '2'"
size="mini"
type="text"
icon="el-icon-edit"
@click="sortWork(scope.row)"
v-hasPermi="['system:order:edit']"
>归档</el-button>
</template>
</el-table-column>
......@@ -377,8 +382,8 @@
</el-col>
</el-row>
<el-form-item label="整改方案" prop="rectificationPlan" v-show="feedBookForm.workType=='3'">
<el-input v-model="form.rectificationPlan" type="textarea" placeholder="请输入整改方案" />
<el-form-item label="整改方案" prop="rectificationPlan" v-if="feedBookForm.workType=='3'">
<el-input v-model="feedBookForm.rectificationPlan" type="textarea" placeholder="请输入整改方案" />
</el-form-item>
<el-form-item label="反馈图片" prop="iconUrl">
......@@ -387,13 +392,12 @@
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
:readOnly= "isDetail"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
<el-input v-show="false" disabled v-model="feedBookForm.iconUrl"></el-input>
</el-form-item>
<el-form-item label="反馈信息" prop="rectificationResult">
<el-input v-model="form.rectificationResult" type="textarea" placeholder="反馈信息" />
<el-input v-model="feedBookForm.rectificationResult" type="textarea" placeholder="反馈信息" />
</el-form-item>
</el-form>
......@@ -510,16 +514,18 @@ export default {
//反馈校验
feedBookRules: {
iconUrl: [
{ required: true, message: "指派单位", trigger: "blur" }
{ required: true, message: "反馈图片", trigger: "change" }
],
rectificationResult: [
{ required: true, message: "指派人", trigger: "blur" }
rectificationResult:[
{ required: true, message: "反馈信息", trigger: "blur" }
]
},
roleType: "zhengfu",
workForm:{},
workOpen: false,
feedBookForm: {},
feedBookForm: {
iconUrl: ""
},
feedBookOpen: false
};
},
......@@ -681,7 +687,8 @@ export default {
}).catch(() => {});
},
getFileInfo(res){
this.form.iconUrl = res.url;
this.feedBookForm.iconUrl = res.url;
//this.$set(this.feedBookForm,'iconUrl',res.url)
},
listRemove(e) {
this.form.iconUrl = "";
......@@ -739,13 +746,14 @@ export default {
},*/
//详情
workDetail(row){
getOrder(row.workId).then(response => {
this.isDetail=true;
this.open = true;
this.title = "燃气任务详情";
this.form = row;
this.form = response.data;
this.getEnterpriseLists();
this.getInspectionUserList(row.workAssignEnterproseId);
this.getInspectionUserList(response.data.workAssignEnterproseId);
});
},
//任务下发
workIssue(row){
......@@ -790,18 +798,19 @@ export default {
feedbookWork(row){
this.title = "反馈信息";
this.feedBookOpen = true;
//this.feedBookForm = {};
this.feedBookForm.workId = row.workId;
this.feedBookForm.workTitle = row.workTitle;
this.feedBookForm.workType = row.workType;
if(row.iconUrl){
/*if(row.iconUrl){
this.feedBookForm.iconUrl = row.iconUrl;
}
if(row.rectificationPlan){
}*/
/*if(row.rectificationPlan){
this.feedBookForm.rectificationPlan = row.rectificationPlan;
}
if(row.rectificationResult){
this.feedBookForm.rectificationResult = row.rectificationResult;
}
}*/
//this.feedBookForm = row;
this.getEnterpriseLists();
},
......@@ -847,7 +856,7 @@ export default {
this.$refs["feedBookForm"].validate(valid => {
if (valid) {
if (this.feedBookForm.workId != null) {
this.feedBookForm.workStatus = '2';
//this.feedBookForm.workStatus = '2';
updateOrder(this.feedBookForm).then(response => {
this.msgSuccess("反馈成功");
this.feedBookOpen = false;
......
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