diff
This commit is contained in:
@ -241,23 +241,23 @@ public class ProcessSectionController {
|
||||
*/
|
||||
@RequestMapping("/getProcessSection4Select.do")
|
||||
public String getProcessSection4Select(HttpServletRequest request, Model model) {
|
||||
String companyId = request.getParameter("companyId");
|
||||
String companyId = request.getParameter("companyId"); // 默认查询JSBZ???
|
||||
Company company = this.companyService.selectByPrimaryKey(companyId);
|
||||
|
||||
String wherestr = "where 1=1 and active='" + CommString.Active_True + "' ";
|
||||
if (company.getType().equals(CommString.UNIT_TYPE_COMPANY)) {
|
||||
if (company != null && company.getType().equals(CommString.UNIT_TYPE_COMPANY)) { // "C";//公司
|
||||
String bizs = "";//公司下属所有厂id
|
||||
List<Unit> blist = this.unitService.getParentCompanyChildrenBizByUnitid(companyId);
|
||||
if (blist != null && blist.size() > 0) {
|
||||
for (int i = 0; i < blist.size(); i++) {
|
||||
if (blist.get(i).getType().equals(CommString.UNIT_TYPE_BIZ)) {
|
||||
if (blist.get(i).getType().equals(CommString.UNIT_TYPE_BIZ)) { // "B";//水厂
|
||||
bizs += blist.get(i).getId() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
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.getType().equals(CommString.UNIT_TYPE_BIZ)) {
|
||||
} else if (company != null && company.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 +272,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.getType().equals(CommString.UNIT_TYPE_COMPANY)) {
|
||||
if (company != null && company.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.getType().equals(CommString.UNIT_TYPE_BIZ)) {
|
||||
} else if (company != null && company.getType().equals(CommString.UNIT_TYPE_BIZ)) { // "B";//水厂
|
||||
jsonObject.put("text", processSections.get(i).getSname());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user