bug
This commit is contained in:
@ -279,10 +279,8 @@ public class EquipmentPlanController {
|
||||
if (company != null) {
|
||||
model.addAttribute("companyName", company.getSname());
|
||||
}
|
||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
||||
if (user != null) {
|
||||
model.addAttribute("userName", user.getCaption());
|
||||
}
|
||||
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||
model.addAttribute("userName", userNames);
|
||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||
if (equipmentPlanType_big != null) {
|
||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||
@ -308,10 +306,8 @@ public class EquipmentPlanController {
|
||||
if (company != null) {
|
||||
model.addAttribute("companyName", company.getSname());
|
||||
}
|
||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
||||
if (user != null) {
|
||||
model.addAttribute("userName", user.getCaption());
|
||||
}
|
||||
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||
model.addAttribute("userName", userNames);
|
||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||
if (equipmentPlanType_big != null) {
|
||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||
@ -422,10 +418,8 @@ public class EquipmentPlanController {
|
||||
if (company != null) {
|
||||
model.addAttribute("companyName", company.getSname());
|
||||
}
|
||||
User user = userService.getUserById(equipmentPlan.getAuditId());
|
||||
if (user != null) {
|
||||
model.addAttribute("userName", user.getCaption());
|
||||
}
|
||||
String userNames = userService.getUserNamesByUserIds(equipmentPlan.getAuditId());
|
||||
model.addAttribute("userName", userNames);
|
||||
EquipmentPlanType equipmentPlanType_big = equipmentPlanTypeService.selectById(equipmentPlan.getPlanTypeBig());
|
||||
if (equipmentPlanType_big != null) {
|
||||
model.addAttribute("planTypeBigName", equipmentPlanType_big.getName());
|
||||
|
||||
@ -123,7 +123,9 @@ public class PipelineDataController {
|
||||
@RequestMapping("/deletes.do")
|
||||
public String dodeletes(HttpServletRequest request, Model model,
|
||||
@RequestParam(value = "ids") String ids) {
|
||||
int result = this.pipelineDataService.deleteByWhere("where id in (" + ids + ")");
|
||||
// 移除末尾逗号,防止SQL语法错误
|
||||
String cleanIds = ids.replaceAll("[,\\s]+$", "").replaceAll("^[,\\s]+", "");
|
||||
int result = this.pipelineDataService.deleteByWhere("where id in (" + cleanIds + ")");
|
||||
model.addAttribute("result", result);
|
||||
return "result";
|
||||
}
|
||||
|
||||
@ -242,10 +242,11 @@ public class ProcessSectionController {
|
||||
@RequestMapping("/getProcessSection4Select.do")
|
||||
public String getProcessSection4Select(HttpServletRequest request, Model model) {
|
||||
String companyId = request.getParameter("companyId"); // 默认查询JSBZ???
|
||||
Company company = this.companyService.selectByPrimaryKey(companyId);
|
||||
// 使用unitService获取Unit信息,因为companyId来自tb_unit表
|
||||
Unit unit = this.unitService.getUnitById(companyId);
|
||||
|
||||
String wherestr = "where 1=1 and active='" + CommString.Active_True + "' ";
|
||||
if (company != null && company.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
||||
if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
||||
String bizs = "";//公司下属所有厂id
|
||||
List<Unit> blist = this.unitService.getParentCompanyChildrenBizByUnitid(companyId);
|
||||
if (blist != null && blist.size() > 0) {
|
||||
@ -257,7 +258,7 @@ public class ProcessSectionController {
|
||||
}
|
||||
bizs = bizs.replace(",", "','");
|
||||
wherestr += " and (unit_id='" + ProcessSection.UnitId_Sys + "' or (code not in (select code from tb_process_section where unit_id='" + ProcessSection.UnitId_Sys + "')) and unit_id in ('" + bizs + "') ) ";
|
||||
} else if (company != null && company.getType().equals(CommString.UNIT_TYPE_BIZ)) { // B 水厂
|
||||
} else if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_BIZ)) { // B 水厂
|
||||
wherestr += " and unit_id='" + companyId + "' ";
|
||||
}
|
||||
if (request.getParameter("search_name") != null && !request.getParameter("search_name").isEmpty()) {
|
||||
@ -272,13 +273,13 @@ public class ProcessSectionController {
|
||||
for (int i = 0; i < processSections.size(); i++) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", processSections.get(i).getCode());
|
||||
if (company != null && company.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
||||
if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
||||
if (!processSections.get(i).getUnitId().equals(ProcessSection.UnitId_Sys)) {
|
||||
jsonObject.put("text", processSections.get(i).getSname() + "(" + processSections.get(i).getCompanySname() + ")");
|
||||
} else {
|
||||
jsonObject.put("text", processSections.get(i).getSname());
|
||||
}
|
||||
} else if (company != null && company.getType().equals(CommString.UNIT_TYPE_BIZ)) { // "B";//水厂
|
||||
} else if (unit != null && unit.getType().equals(CommString.UNIT_TYPE_BIZ)) { // "B";//水厂
|
||||
jsonObject.put("text", processSections.get(i).getSname());
|
||||
}
|
||||
|
||||
|
||||
@ -852,11 +852,13 @@ public class UserController {
|
||||
public String userForSelectByCompany(HttpServletRequest request, Model model) {
|
||||
String userIds = request.getParameter("userIds");
|
||||
String jobIds = request.getParameter("jobIds");
|
||||
String displayDept = request.getParameter("displayDept");
|
||||
if (userIds != null && !userIds.isEmpty()) {
|
||||
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
|
||||
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',',','" + userIds + ",')");
|
||||
model.addAttribute("users", JSONArray.fromObject(list));
|
||||
}
|
||||
model.addAttribute("jobIds", jobIds);
|
||||
model.addAttribute("displayDept", displayDept);
|
||||
return "user/userForSelectByCompany";
|
||||
}
|
||||
|
||||
@ -1255,6 +1257,7 @@ public class UserController {
|
||||
model.addAttribute("users", JSONArray.fromObject(list));
|
||||
}
|
||||
model.addAttribute("jobIds", jobIds);
|
||||
model.addAttribute("displayDept", request.getParameter("displayDept"));
|
||||
return "user/userForSelectByWorkOrder";
|
||||
}
|
||||
|
||||
@ -1454,6 +1457,7 @@ public class UserController {
|
||||
model.addAttribute("users", JSONArray.fromObject(list));
|
||||
}
|
||||
model.addAttribute("jobIds", jobIds);
|
||||
model.addAttribute("displayDept", request.getParameter("displayDept"));
|
||||
return "user/userSelectLayer";
|
||||
}
|
||||
|
||||
|
||||
@ -88,7 +88,10 @@
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function(index, item) {
|
||||
datas += item.id + ",";
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item.id;
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
|
||||
@ -234,7 +234,8 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
{
|
||||
formId: "addForm",
|
||||
hiddenId: "userId",
|
||||
textId: "userName"
|
||||
textId: "userName",
|
||||
displayDept: "true"
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
|
||||
@ -47,6 +47,11 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding: 8px;
|
||||
width: 140px;
|
||||
text-align: left;
|
||||
}
|
||||
.detail-row {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
@ -253,7 +258,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
function initdeTail(list) {
|
||||
let temp = `<div >`
|
||||
list.forEach((item, index) => {
|
||||
temp += `<div><div class="AAA">` + item.deptName + `</div>`
|
||||
temp += `<div class="detail-row"><div class="AAA">` + item.deptName + `</div>`
|
||||
temp += `<div class="AAA">` + item.userName + `</div>`
|
||||
temp += `<div class="AAA">` + item.pass + `</div>`
|
||||
temp += `<div class="AAA">` + item.time + `</div></div>`
|
||||
@ -426,8 +431,10 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label ">查看其它会签意见</label>
|
||||
<div class="col-sm-10">
|
||||
<div id="deTail"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-left: 39px">
|
||||
<div id="fileList"></div>
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,12 @@
|
||||
if(datas_name!=""){
|
||||
datas_name+=",";
|
||||
}
|
||||
datas_name+=item.caption;
|
||||
// 支持通过参数控制显示部门名称还是用户名称
|
||||
var displayField = item.caption;
|
||||
if('${param.displayDept}' === 'true' && item._pname) {
|
||||
displayField = item._pname;
|
||||
}
|
||||
datas_name+=displayField;
|
||||
});
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(datas);
|
||||
$('#${param.formId} #${param.textId}').val(datas_name);
|
||||
|
||||
Reference in New Issue
Block a user