Commit 0686500f by wangling

结果列表批注功能修改

parent 61b55f51
......@@ -39,11 +39,21 @@ public class PzxxServiceImpl implements PzxxService {
@Override
public String updatePzxx(TbStPzxx tbStPzxx) {
String message = "updateFail";
String flag = tbStPzxx.getFlag();
String message = "";
if("0".equals(flag)){
message = "updateFail";
}else {
message = "deleteFail";
}
try{
Integer count = pzxxMapper.updatePzxx(tbStPzxx);
if(count > 0){
message = "updateSuccess";
if("0".equals(flag)){
message = "updateSuccess";
}else {
message = "deleteSuccess";
}
}
}catch (Exception e){
e.printStackTrace();
......
......@@ -122,7 +122,7 @@
<if test="pzNr != null and pzNr !=''"> PZ_NR = #{pzNr},</if>
</if>
<if test='flag=="1"'>
<if test="xxscPdbz != null and xxscPdbz !=''"> XXSC_PDBZ = '1',</if>
XXSC_PDBZ = '1',
</if>
GXSJ = sysdate
WHERE XXZJBH = #{xxzjbh}
......
......@@ -261,7 +261,7 @@
</if>
order by td.SF_FZXYR desc nulls last,td.SF_GWRY desc nulls last,td.name desc nulls last,td.xxzjbh,t.DJSJ desc
) t3
left join TB_ST_PZXX pz on t3.taskId = pz.TASK_ID and (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
left join TB_ST_PZXX pz on t3.taskId = pz.TASK_ID and pz.XXSC_PDBZ = '0' and (t3.ZJHM = pz.OBJECT_VALUE or t3.SJHM = pz.OBJECT_VALUE)
) t1
where rownum <![CDATA[ <= ]]> #{endNum}
) t2
......
......@@ -992,7 +992,7 @@ function insertAnnotation(obj){
$(".w").css("margin-left",'50px');
var index=$(obj).parents("tr").index();
var num=(index+1)*7;
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>批注内容</span><span class='editicon'><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this)'></i></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text'/></p></div></div>";
var divWrap="<div class='insert insert"+index+"'><p class='line'></p><p class='line2'></p><div class='content'><p><span class='user'>批注内容</span><span class='editicon'><i class=\"fa fa-file-excel-o\" aria-hidden=\"true\" title='保存' onclick='savaPzxx(this,"+index+")' style='margin-right:5px;'></i><i class=\"fa fa-trash-o\" aria-hidden=\"true\" title='删除' onclick='deleteAnnotations(this,'1')'></i></span><span class='editDate'>2019.02.14 12:00:00</span></p><p><input type='text'/></p></div></div>";
var X=$(obj).parents("td").offset().top,Y=$(obj).parents("td").offset().left,Y2=$(".w").offset().left+1200;
console.log(X+","+Y+","+Y2+","+$(obj).parents("td").index());
$("body").append(divWrap);
......@@ -1069,24 +1069,28 @@ function savaPzxx(obj,ind){
}
//删除批注信息
function deleteAnnotations(obj,xxzjbh){
alert("xxzjbh============="+xxzjbh);
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "pzNr":pznr, "taskId":taskId, "pzrPolicemanid":fsrjh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='success'){
$.messager.alert({title: '提示', msg: "删除成功!"});
$(obj).parents(".insert").remove();
}else{
$.messager.alert({title: '提示', msg: "删除失败!"});
if(xxzjbh == '1'){
$.messager.alert({title: '提示', msg: "删除成功!"});
$(obj).parents(".insert").remove();
} else {
$.ajax({
method: 'post',
url: '/updatePzxx',
dateType: 'json',
data: {"xxzjbh":xxzjbh, "yhCate":"00", "projectName":"刑专智慧侦查脑图"},
success: function (message) {
if(message=='deleteSuccess'){
$.messager.alert({title: '提示', msg: "删除成功!"});
$(obj).parents(".insert").remove();
}else{
$.messager.alert({title: '提示', msg: "删除失败!"});
}
},
error: function (e) {
$.messager.alert({title: '提示', msg: "出错:" + e});
}
},
error: function (e) {
$.messager.alert({title: '提示', msg: "出错:" + e});
}
});
});
}
}
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