Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
ed53ab08fb
|
|
@ -76,6 +76,11 @@ public class ProjectController {
|
|||
// Map<String, Object> params = request.getParams();
|
||||
// params.put("companyId",companyId);
|
||||
|
||||
request.getParams().put("generalProId", request.getParams().get("orgId"));
|
||||
|
||||
String orgIdStr = SecurityUtils.getLoginUser().getSysUser().getOrgId();
|
||||
request.getParams().put("orgId", orgIdStr);
|
||||
|
||||
SelfPermissionSettingUtils.getSelfPermission(request);
|
||||
|
||||
String orgId = (String) request.getParams().get("orgId");
|
||||
|
|
|
|||
|
|
@ -35,4 +35,6 @@ public interface ProjectGeneralDao {
|
|||
int getProCount(@Param("params") Map<String, Object> params);
|
||||
/** 专业工程查询页面 */
|
||||
List<ProjectGeneralBean> getProList(@Param("params") Map<String, Object> params, @Param("offset") Integer offset, @Param("limit") Integer limit);
|
||||
|
||||
ProjectGeneralBean getGeneralInfoByName(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ public class ProjectBean {
|
|||
/**
|
||||
* 总工程名称
|
||||
*/
|
||||
@Excel(name = "总包工程")
|
||||
private String proGeneralName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ package com.bonus.bmw.basic.service;
|
|||
|
||||
import com.bonus.bmw.basic.dao.CompanyDao;
|
||||
import com.bonus.bmw.basic.dao.ProjectDao;
|
||||
import com.bonus.bmw.basic.dao.ProjectGeneralDao;
|
||||
import com.bonus.bmw.basic.entity.ProjectBean;
|
||||
import com.bonus.bmw.basic.entity.ProjectGeneralBean;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -21,6 +23,8 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
|
||||
private final CompanyDao companyDao;
|
||||
|
||||
private final ProjectGeneralDao projectGeneralDao;
|
||||
|
||||
@Override
|
||||
public String importData(List<ProjectBean> list) {
|
||||
if (list.size()>0){
|
||||
|
|
@ -49,6 +53,8 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
return "第" + (i+1) + "行业主姓名为空,导入失败";
|
||||
}else if (StringUtils.isEmpty(bean.getCompanyName())){
|
||||
return "第" + (i+1) + "行公司名称为空,导入失败";
|
||||
}else if (StringUtils.isBlank(bean.getProGeneralName())){
|
||||
return "第" + (i+1) + "行总包工程为空,导入失败";
|
||||
}
|
||||
|
||||
switch (bean.getProStatus()){
|
||||
|
|
@ -89,6 +95,13 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
return "第" + (i+1) + "行,对应的业主姓名不存在,导入失败";
|
||||
}
|
||||
|
||||
ProjectGeneralBean projectGeneralBean = projectGeneralDao.getGeneralInfoByName(bean.getProGeneralName().trim());
|
||||
if (projectGeneralBean != null){
|
||||
list.get(i).setProGeneralId(projectGeneralBean.getProGeneralId());
|
||||
}else{
|
||||
return "第" + (i+1) + "行,对应的总包工程不存在,导入失败";
|
||||
}
|
||||
|
||||
}
|
||||
int result = projectDao.importData(list);
|
||||
return result > 0 ? "成功导入" + result + "条数据,保存成功" : "导入失败" ;
|
||||
|
|
|
|||
|
|
@ -107,4 +107,8 @@
|
|||
AND bpg.id = #{params.proGeneralId}
|
||||
) aa
|
||||
</select>
|
||||
|
||||
<select id="getGeneralInfoByName" resultType="com.bonus.bmw.basic.entity.ProjectGeneralBean">
|
||||
select id as proGeneralId from bm_project_general where name = #{name}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -12,13 +12,13 @@
|
|||
</insert>
|
||||
|
||||
<insert id="importData">
|
||||
INSERT INTO `bm_project`( `name`, `abbreviation`, `pro_type`,
|
||||
INSERT INTO `bm_project`( `project_general_id`, `name`, `abbreviation`, `pro_type`,
|
||||
`company_id`, `owner_id`, `power_grid`, `project_address`, `lon`, `lat`,
|
||||
`pro_status`, `plan_start_time`, `plan_stop_time`, `create_time`, `update_time`, `is_active`)
|
||||
VALUES
|
||||
<foreach item="item" collection="list" separator="," index="index" >
|
||||
(
|
||||
#{item.name},#{item.abbreviation},#{item.proType},#{item.companyId},#{item.ownerId},
|
||||
#{item.proGeneralId}, #{item.name},#{item.abbreviation},#{item.proType},#{item.companyId},#{item.ownerId},
|
||||
#{item.powerGrid},#{item.projectAddress},#{item.lon},#{item.lat},
|
||||
#{item.proStatusCode},#{item.planStartTime},#{item.planStopTime},now(),now(),'1'
|
||||
)
|
||||
|
|
@ -88,6 +88,9 @@
|
|||
<if test="params.orgId != null and params.orgId != '' and params.roleLevel > 3">
|
||||
AND bp.company_id = #{params.orgId}
|
||||
</if>
|
||||
<if test="params.generalProId != null and params.generalProId != ''">
|
||||
AND bp.project_general_id in (${params.generalProId})
|
||||
</if>
|
||||
<if test="params.subId != null and params.subId !='' ">
|
||||
AND bsc.sub_id = #{params.subId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -599,19 +599,14 @@
|
|||
|
||||
<select id="getProRank" resultType="com.bonus.bmw.homePage.entity.ProMsgBean">
|
||||
select a.* from (
|
||||
select a.*, bp.name as proName, pm.id as subComId,
|
||||
pm.name as SubComName from (
|
||||
select pro_id as proId, count(DISTINCT sub_id) as subNum from bm_sub_contract
|
||||
where is_active = 1
|
||||
GROUP BY pro_id
|
||||
) a
|
||||
LEFT JOIN bm_project bp ON bp.id = a.proId AND bp.is_active = '1'
|
||||
left join (
|
||||
SELECT po.id, po.`name`
|
||||
FROM bm_project_general AS po
|
||||
WHERE po.is_active = '1'
|
||||
) pm on pm.id = bp.project_general_id
|
||||
ORDER BY a.subNum DESC
|
||||
select bs.id as subComId, bs.sub_name as SubComName, a.proNum as subNum, '' as proId
|
||||
from (
|
||||
select sub_id as subId, count(pro_id) as proNum from bm_sub_contract
|
||||
where is_active = 1
|
||||
GROUP BY sub_id
|
||||
) a
|
||||
LEFT JOIN bm_subcontractor bs ON bs.id = a.subId AND bs.is_active = '1'
|
||||
ORDER BY a.proNum DESC
|
||||
) a limit 5
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@
|
|||
left join bm_subcontractor bs on bs.id = bsb.sub_id
|
||||
left join bm_project bp on bp.id = bsb.pro_id
|
||||
where bsb.id in (${params.salaryId})
|
||||
and sbud.bank_number is not null AND sbud.bank_number!="" and sbud.bank_name is not null AND sbud.bank_name !=""
|
||||
<if test="params.salaryName != null and params.salaryName != '' ">
|
||||
and bsb.name like concat('%',#{params.salaryName},'%')
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -59,26 +59,27 @@
|
|||
|
||||
WHERE bsc.is_active = '1' and td.`value` = #{params.month} and fcpe.eva_date is not null
|
||||
</select>
|
||||
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubEvaBean" >
|
||||
SELECT
|
||||
bsc.`id` as id,
|
||||
bp.`NAME` as proName,
|
||||
bs.sub_name as subName,
|
||||
bsc.contract_name as contractName,
|
||||
COUNT(bsr.id) AS teamNumber,
|
||||
td.`value` AS evaMonth,
|
||||
fcpe.eva_grade AS evaGrade,
|
||||
fcpe.eva_name AS evaName,
|
||||
fcpe.eva_date AS evaDate,
|
||||
fcpe.eva_id as evaId,
|
||||
fcpe.eva_year as evaYear
|
||||
|
||||
<sql id="listRef">
|
||||
SELECT
|
||||
bsc.`id` as id,
|
||||
bp.`NAME` as proName,
|
||||
bs.sub_name as subName,
|
||||
bsc.contract_name as contractName,
|
||||
COUNT(bsr.id) AS teamNumber,
|
||||
td.`value` AS evaMonth,
|
||||
fcpe.eva_grade AS evaGrade,
|
||||
fcpe.eva_name AS evaName,
|
||||
fcpe.eva_date AS evaDate,
|
||||
fcpe.eva_id as evaId,
|
||||
fcpe.eva_year as evaYear
|
||||
FROM
|
||||
`bm_sub_contract` bsc
|
||||
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1'
|
||||
LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1'
|
||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '3' and bsr.is_active = '1'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
|
||||
LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
|
||||
`bm_sub_contract` bsc
|
||||
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1'
|
||||
LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1'
|
||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '3' and bsr.is_active = '1'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
|
||||
LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
|
||||
|
||||
WHERE bsc.is_active = '1' and td.`value` = #{params.month}
|
||||
<if test="params != null and params != ''">
|
||||
|
|
@ -91,21 +92,15 @@
|
|||
|
||||
</if>
|
||||
GROUP BY bsc.id
|
||||
limit #{offset}, #{limit}
|
||||
</sql>
|
||||
|
||||
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubEvaBean" >
|
||||
<include refid="listRef"></include>
|
||||
limit #{offset}, #{limit}
|
||||
</select>
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
`bm_sub_contract` bsc
|
||||
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1'
|
||||
LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1'
|
||||
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '1' and bsr.is_active = '3'
|
||||
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
|
||||
LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
|
||||
|
||||
WHERE bsc.is_active = '1' and td.`value` = #{params.month}
|
||||
select count(*) from (<include refid="listRef"></include>) as c
|
||||
</select>
|
||||
<select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
|
||||
select
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@
|
|||
COUNT(DISTINCT IF(bste.`level` = '2',TRUE,NULL)) AS bLevelNumber,
|
||||
COUNT(DISTINCT IF(bste.`level` = '3',TRUE,NULL)) AS cLevelNumber,
|
||||
COUNT(DISTINCT IF(bste.`level` = '4',TRUE,NULL)) AS dLevelNumber,
|
||||
IF(bste.create_time IS NULL,NULL,bste.create_time) AS conEvaTime
|
||||
IF(bste.create_time IS NULL,NULL,bste.create_time) AS conEvaTime,
|
||||
bst.team_name
|
||||
FROM
|
||||
bm_sub_contract bsc
|
||||
LEFT JOIN bm_project bp ON bsc.pro_id = bp.id
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
LEFT JOIN bm_sub_relation bsr1 ON bsc.id = bsr1.sub_contract_id AND bsr1.type = '3'
|
||||
LEFT JOIN bm_sub_team_eva bste ON bsr1.v = bste.team_id
|
||||
LEFT JOIN sys_user su ON bsr.`value` = su.id
|
||||
LEFT JOIN bm_sub_team bst on bste.team_id = bst.id
|
||||
WHERE bsc.is_complete = '1' and bsr1.id is not null
|
||||
GROUP BY bsc.id
|
||||
limit #{offset},#{limit}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -133,6 +133,16 @@ $(function () {
|
|||
|
||||
//新增工程
|
||||
function addProject(formData) {
|
||||
var ownerDept = $("#ownerDept").val();
|
||||
var ownerName = $("#ownerName").val();
|
||||
if(ownerDept == '-1' || ownerDept == '') {
|
||||
layer.msg("业主单位不能为空");
|
||||
return;
|
||||
}
|
||||
if(ownerName == '-1' || ownerName == '') {
|
||||
layer.msg("业主姓名不能为空");
|
||||
return;
|
||||
}
|
||||
// 加载提示
|
||||
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
|
|
@ -165,6 +175,16 @@ function addProject(formData) {
|
|||
|
||||
//修改工程
|
||||
function updateProject(formData) {
|
||||
var ownerDept = $("#ownerDept").val();
|
||||
var ownerName = $("#ownerName").val();
|
||||
if(ownerDept == '-1' || ownerDept == '') {
|
||||
layer.msg("业主单位不能为空");
|
||||
return;
|
||||
}
|
||||
if(ownerName == '-1' || ownerName == '') {
|
||||
layer.msg("业主姓名不能为空");
|
||||
return;
|
||||
}
|
||||
// 加载提示
|
||||
addLoadingMsg = top.layer.msg('数据上传中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
|
||||
// form请求地址
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ function subQuarterEvaContentInit() {
|
|||
html += '<tr>';
|
||||
html += '<th rowspan="1" colspan="1">机具管理10分。半年评价周期内,按结算中丢失公司施工机具,丢失原值每万元扣1分,扣完为止。</th>';
|
||||
html += '<th rowspan="1" colspan="1">10</th>';
|
||||
html += '<th rowspan="1" colspan="1"><input class="textInput" type="text" id="b08" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,\'\')}else{this.value=this.value.replace(/\\D/g,\'\')}" onafterpaste="isNums()"></th>';
|
||||
html += '<th rowspan="1" colspan="1"><input class="textInput" type="text" id="b08" onblur="checkScore(this)" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,\'\')}else{this.value=this.value.replace(/\\D/g,\'\')}" onafterpaste="isNums()"></th>';
|
||||
html += '<th rowspan="1" colspan="1"><input class="textInput" type="text" id="r08" ></th>';
|
||||
html += '<th rowspan="1" colspan="1"></th>';
|
||||
html += '</tr>';
|
||||
|
|
@ -324,6 +324,16 @@ function subQuarterEvaContentInit() {
|
|||
$("#tb0").append(html);
|
||||
}
|
||||
|
||||
function checkScore(obj) {
|
||||
var inputScore = $(obj).val();
|
||||
if($.isNumeric(inputScore)) {
|
||||
var num1 = parseFloat(inputScore);
|
||||
if(num1 > 10) {
|
||||
layer.alert("评分不能大于10分");
|
||||
$(obj).val("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//循环追加核心人员列表表头
|
||||
function subCorePersonEvaluatetop(list) {
|
||||
|
|
|
|||
|
|
@ -92,8 +92,9 @@ function init() {
|
|||
return c;
|
||||
}
|
||||
},
|
||||
{"data": "contractName", "defaultContent": "","width":"15%"},
|
||||
{"data": "subName", "defaultContent": "","width":"10%"},
|
||||
{"data": "contractName", "defaultContent": "","width":"12%"},
|
||||
{"data": "subName", "defaultContent": "","width":"8%"},
|
||||
{"data": "teamName", "defaultContent": "","width":"8%"},
|
||||
{"data": "proName", "defaultContent": "","width":"10%"},
|
||||
{"data": "corePersonName","defaultContent":"","width":"6%"},
|
||||
{"data": "teamNumber", "defaultContent": "","width":"4%"},
|
||||
|
|
@ -124,7 +125,7 @@ function init() {
|
|||
}
|
||||
},
|
||||
{
|
||||
"width":"8%",
|
||||
"width":"6%",
|
||||
"render": function (data, type, row) {
|
||||
let isFinish = row['finish'];
|
||||
let html = '';
|
||||
|
|
|
|||
|
|
@ -78,7 +78,11 @@ layui.use(['form', 'table', 'upload'], function () {
|
|||
console.log(index); //得到文件索引
|
||||
console.log(file.name); //得到文件对象
|
||||
$("#preview1").css("display", "");
|
||||
$('#demo1').append('<img src="' + result + '" id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">');
|
||||
if(file.name.endsWith(".xls") || file.name.endsWith(".docx") || file.name.endsWith(".xlsx") || file.name.endsWith(".pdf")) {
|
||||
$('#demo1').append('<span id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">' + file.name+ '</span>');
|
||||
}else {
|
||||
$('#demo1').append('<img src="' + result + '" id="' + index + '" alt="' + file.name + '" style="height: 80px;width: 80px;margin-right: 10px" class="layui-upload-img ">');
|
||||
}
|
||||
$('#' + index).bind('dblclick', function () {//双击删除指定预上传图片
|
||||
delete files[index];//删除指定图片
|
||||
$(this).remove();
|
||||
|
|
|
|||
|
|
@ -795,7 +795,7 @@ function proInformationLevelECharts(listRank) {
|
|||
let titleName = [];
|
||||
let data = [];
|
||||
for (let i = 0; i < listRank.length; i++) {
|
||||
titleName.push([[listRank[i].proName]]);
|
||||
titleName.push([[listRank[i].subComName]]);
|
||||
data.push([listRank[i].subNum]);
|
||||
}
|
||||
// var myColor = ['#FFA94C', '#8167F5', '#24D2D3', '#52C1F5', '#FF7A8C'];
|
||||
|
|
@ -809,7 +809,7 @@ function proInformationLevelECharts(listRank) {
|
|||
if (i >= 5) {
|
||||
break;
|
||||
} else {
|
||||
$("#proName" + i).text(titleName[i]);
|
||||
$("#subComName" + i).text(titleName[i]);
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@
|
|||
<td>
|
||||
<form class="layui-form" style="margin-top: 1%;margin-left: -2%;" onsubmit="return false">
|
||||
<div class="form-group">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label" >公司:</label>
|
||||
<div class="layui-input-inline" >
|
||||
<!-- <select id="companyId" name="companyId" lay-filter="companyId" >-->
|
||||
<!-- <div class="layui-inline">-->
|
||||
<!-- <label class="layui-form-label" >公司:</label>-->
|
||||
<!-- <div class="layui-input-inline" >-->
|
||||
<!--<!– <select id="companyId" name="companyId" lay-filter="companyId" >–>-->
|
||||
<!--<!– </select>–>-->
|
||||
<!-- <select id="orgId" name="orgId" lay-search="" lay-filter="orgId" >-->
|
||||
<!-- </select>-->
|
||||
<select id="orgId" name="orgId" lay-search="" lay-filter="orgId" >
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-inline" >
|
||||
<label class="layui-form-label" >工程:</label>
|
||||
|
|
|
|||
|
|
@ -59,13 +59,14 @@
|
|||
<th>序号</th>
|
||||
<th>分包合同名称</th>
|
||||
<th>分包商名称</th>
|
||||
<th>班组名称</th>
|
||||
<th>工程名称</th>
|
||||
<th>现场负责人</th>
|
||||
<th>备案班组数量</th>
|
||||
<th>已评价</th>
|
||||
<th>未评价</th>
|
||||
<th>评价结果</th>
|
||||
<th>是否全部完成评价</th>
|
||||
<th>是否全部<br/>完成评价</th>
|
||||
<th>合同履行完成时间</th>
|
||||
<th>评价完成时间</th>
|
||||
<th>操作</th>
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
<div class="grid-demo grid-demo-bg1"><img src='../../../img/fileIcon/No.1.png' width="25" height="20"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo" id="proName0"></div>
|
||||
<div class="grid-demo" id="subComName0"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo grid-demo-bg1" id="subNum0"></div>
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
<div class="grid-demo grid-demo-bg1"><img src='../../../img/fileIcon/No.2.png' width="25" height="20"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo" id="proName1"></div>
|
||||
<div class="grid-demo" id="subComName1"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo grid-demo-bg1" id="subNum1"></div>
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
<div class="grid-demo grid-demo-bg1"><img src='../../../img/fileIcon/No.3.png' width="25" height="20"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo" id="proName2"></div>
|
||||
<div class="grid-demo" id="subComName2"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo grid-demo-bg1" id="subNum2"></div>
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
<div class="grid-demo grid-demo-bg1"><img src='../../../img/fileIcon/No.4.png' width="25" height="20"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo" id="proName3"></div>
|
||||
<div class="grid-demo" id="subComName3"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo grid-demo-bg1" id="subNum3"></div>
|
||||
|
|
@ -261,7 +261,7 @@
|
|||
<div class="grid-demo grid-demo-bg1"><img src='../../../img/fileIcon/No.5.png' width="25" height="20"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo" id="proName4"></div>
|
||||
<div class="grid-demo" id="subComName4"></div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="grid-demo grid-demo-bg1" id="subNum4"></div>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ public class SelectController {
|
|||
@CrossOrigin
|
||||
@Log(title = "查询工程-orgId", businessType = BusinessType.SELECT)
|
||||
public R getProByOrgId(SelectBean o){
|
||||
// 前端穿的orgId实际是工程id,用工程id去查org信息肯定对不上。
|
||||
o.setProId(o.getOrgId());
|
||||
o.setOrgId(null);
|
||||
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
||||
return service.getProByOrgId(o);
|
||||
}
|
||||
|
|
@ -161,6 +164,10 @@ public class SelectController {
|
|||
@CrossOrigin
|
||||
@Log(title = "查询公司和子公司", businessType = BusinessType.SELECT)
|
||||
public R getCompanyAndSubCompany(SelectBean o){
|
||||
//api 从名字上看是查公司和子公司,但实际的sql却查的是工程信息,
|
||||
// 存在歧义,下面这一行代码[o.setOrgId(null)]是根据sql语句来改的,
|
||||
// 前端穿的orgId实际是工程id,用工程id去查org信息肯定对不上。
|
||||
o.setOrgId(null);
|
||||
SelfPermissionSettingUtils.getSelfPermissionByOrgId(o);
|
||||
return service.getCompanyAndSubCompany(o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,19 +42,33 @@
|
|||
</select>
|
||||
|
||||
<select id="getCompanyAndSubCompany" resultType="com.bonus.system.api.domain.SelectBean">
|
||||
<!-- SELECT-->
|
||||
<!-- id,-->
|
||||
<!-- `NAME`-->
|
||||
<!-- FROM-->
|
||||
<!-- bm_project_general bpg-->
|
||||
<!-- left join bm_project bp on-->
|
||||
<!-- WHERE is_active = '1'-->
|
||||
<!-- <if test="orgId != null and orgId != '' and roleLevel < 3 and roleLevel > 1">-->
|
||||
<!-- AND FIND_IN_SET(id,getParentList(#{orgId}))-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="orgId != null and orgId != '' and roleLevel >= 3">-->
|
||||
<!-- AND FIND_IN_SET(id,getParentList(#{orgId}))-->
|
||||
<!-- limit 1,1-->
|
||||
<!-- </if>-->
|
||||
SELECT
|
||||
id,
|
||||
`NAME`
|
||||
distinct
|
||||
bpg.id,
|
||||
bpg.NAME
|
||||
FROM
|
||||
bm_project_general
|
||||
WHERE is_active = '1'
|
||||
<if test="orgId != null and orgId != '' and roleLevel < 3 and roleLevel > 1">
|
||||
AND FIND_IN_SET(id,getParentList(#{orgId}))
|
||||
</if>
|
||||
<if test="orgId != null and orgId != '' and roleLevel >= 3">
|
||||
AND FIND_IN_SET(id,getParentList(#{orgId}))
|
||||
limit 1,1
|
||||
bm_project_general bpg
|
||||
left join bm_project bp on bpg.id = bp.project_general_id
|
||||
WHERE bpg.is_active = '1'
|
||||
and bp.is_active = '1'
|
||||
<if test="orgId != null and orgId != ''">
|
||||
and (bp.company_id = #{orgId} or bp.two_com_id = #{orgId})
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getPrincipal" resultType="com.bonus.system.api.domain.SelectBean">
|
||||
|
|
@ -81,7 +95,10 @@
|
|||
SELECT bp.id,bp.name FROM bm_project bp
|
||||
WHERE bp.is_active = '1'
|
||||
<if test="orgId != null and orgId != ''">
|
||||
AND bp.project_general_id = #{orgId}
|
||||
AND (bp.company_id = #{orgId} or bp.two_com_id = #{orgId})
|
||||
</if>
|
||||
<if test="proId != null and proId != ''">
|
||||
AND bp.project_general_id = #{proId}
|
||||
</if>
|
||||
<if test="type != null and type != '' and type == 1">
|
||||
AND bp.pro_type in ('基建变电','基建线路','配网')
|
||||
|
|
|
|||
Loading…
Reference in New Issue