协议签订数据权限修改
This commit is contained in:
parent
4eaae591de
commit
140f7c02e1
|
|
@ -52,12 +52,16 @@ public class SelectController {
|
||||||
@ApiOperation(value = "根据工程名称查询所属项目部下拉选")
|
@ApiOperation(value = "根据工程名称查询所属项目部下拉选")
|
||||||
@PostMapping("getDepartList")
|
@PostMapping("getDepartList")
|
||||||
public AjaxResult getDepartList(@RequestBody BmUnit bmUnit) {
|
public AjaxResult getDepartList(@RequestBody BmUnit bmUnit) {
|
||||||
|
Long deptId = typeService.getUserDeptId();
|
||||||
|
bmUnit.setCompanyId(deptId);
|
||||||
return service.getDepartList(bmUnit);
|
return service.getDepartList(bmUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "协议往来单位下拉选")
|
@ApiOperation(value = "协议往来单位下拉选")
|
||||||
@PostMapping("getAgreementUnitList")
|
@PostMapping("getAgreementUnitList")
|
||||||
public AjaxResult getAgreementUnitList(@RequestBody BmUnit bmUnit) {
|
public AjaxResult getAgreementUnitList(@RequestBody BmUnit bmUnit) {
|
||||||
|
Long deptId = typeService.getUserDeptId();
|
||||||
|
bmUnit.setCompanyId(deptId);
|
||||||
return service.getAgreementUnitList(bmUnit);
|
return service.getAgreementUnitList(bmUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,4 +192,6 @@ public interface LossAssignMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int deleteApplyDetails(Integer id);
|
int deleteApplyDetails(Integer id);
|
||||||
|
|
||||||
|
int updateLossDate(@Param("maId")Long maId, @Param("agreementId") Integer agreementId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ public class LossAssignServiceImpl implements LossAssignService {
|
||||||
private void extractedDept(LossAssignInfo lossAssignInfo) {
|
private void extractedDept(LossAssignInfo lossAssignInfo) {
|
||||||
String deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId().toString();
|
String deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId().toString();
|
||||||
Set<String> targetUnits = new HashSet<>(Arrays.asList(
|
Set<String> targetUnits = new HashSet<>(Arrays.asList(
|
||||||
"101", "102", "309", "327", "330", "333", "337", "338",
|
"102", "327", "330", "333", "337", "338",
|
||||||
"339", "340", "341", "342", "344", "345", "346", "347",
|
"339", "340", "341", "342", "344", "345", "346", "347",
|
||||||
"348", "349"
|
"348", "349"
|
||||||
));
|
));
|
||||||
|
|
@ -618,6 +618,12 @@ public class LossAssignServiceImpl implements LossAssignService {
|
||||||
if (result == 0) {
|
if (result == 0) {
|
||||||
throw new ServiceException("更新设备状态失败");
|
throw new ServiceException("更新设备状态失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//截至租赁费用
|
||||||
|
result = mapper.updateLossDate(details.getMaId(), details.getAgreementId());
|
||||||
|
if (result == 0) {
|
||||||
|
throw new ServiceException("更新设备状态丢失日期失败");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 更新任务状态为已完成
|
// 更新任务状态为已完成
|
||||||
updateWorkflowStatus(lossAssignInfo.getId(), 2);
|
updateWorkflowStatus(lossAssignInfo.getId(), 2);
|
||||||
|
|
|
||||||
|
|
@ -1644,7 +1644,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitName != null and unitName != ''">
|
<if test="unitName != null and unitName != ''">
|
||||||
AND bu.unit_name = #{unitName}
|
AND bu.unit_name = #{unitName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
|
|
@ -1664,7 +1666,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitName != null and unitName != ''">
|
<if test="unitName != null and unitName != ''">
|
||||||
AND bu.unit_name = #{unitName}
|
AND bu.unit_name = #{unitName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -1684,6 +1688,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitName != null and unitName != ''">
|
<if test="unitName != null and unitName != ''">
|
||||||
AND bu.unit_name = #{unitName}
|
AND bu.unit_name = #{unitName}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
) ff
|
) ff
|
||||||
ORDER BY
|
ORDER BY
|
||||||
LEVEL
|
LEVEL
|
||||||
|
|
@ -1723,6 +1730,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitId != null">
|
<if test="unitId != null">
|
||||||
AND bu.unit_id = #{unitId}
|
AND bu.unit_id = #{unitId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
|
|
||||||
|
|
@ -1746,6 +1756,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitId != null">
|
<if test="unitId != null">
|
||||||
AND bu.unit_id = #{unitId}
|
AND bu.unit_id = #{unitId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -1768,6 +1781,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitId != null">
|
<if test="unitId != null">
|
||||||
AND bu.unit_id = #{unitId}
|
AND bu.unit_id = #{unitId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="companyId != null ">
|
||||||
|
AND bu.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
) ff
|
) ff
|
||||||
ORDER BY
|
ORDER BY
|
||||||
LEVEL
|
LEVEL
|
||||||
|
|
|
||||||
|
|
@ -205,6 +205,10 @@
|
||||||
where ma_id = #{maId}
|
where ma_id = #{maId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateLossDate">
|
||||||
|
update slt_agreement_info set end_time = now() where ma_id = #{maId} and agreement_id = #{agreementId} and status = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteDirectApplyDetails">
|
<delete id="deleteDirectApplyDetails">
|
||||||
update bm_loss_assign_details
|
update bm_loss_assign_details
|
||||||
set del_flag = '0'
|
set del_flag = '0'
|
||||||
|
|
@ -249,7 +253,7 @@
|
||||||
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
|
LEFT JOIN lease_apply_info lai ON lai.id = sai.lease_id
|
||||||
WHERE
|
WHERE
|
||||||
sai.agreement_id = #{agreementId} AND sai.status = '0'
|
sai.agreement_id = #{agreementId} AND sai.status = '0'
|
||||||
AND mt.jiju_type = '2' AND sai.ma_id is not null
|
AND mt.manage_type = 0 AND sai.ma_id is not null
|
||||||
AND mm.ma_status = '2'
|
AND mm.ma_status = '2'
|
||||||
<if test="typeId != null">
|
<if test="typeId != null">
|
||||||
AND sai.type_id = #{typeId}
|
AND sai.type_id = #{typeId}
|
||||||
|
|
@ -562,7 +566,7 @@
|
||||||
WHERE sai.agreement_id = #{agreementId} AND sai.STATUS = '0'
|
WHERE sai.agreement_id = #{agreementId} AND sai.STATUS = '0'
|
||||||
) AS sai_filtered
|
) AS sai_filtered
|
||||||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||||
WHERE mt.parent_id IS NOT NULL and mt.jiju_type = '2'
|
WHERE mt.parent_id IS NOT NULL and mt.manage_type = 0
|
||||||
|
|
||||||
UNION ALL -- 二级父节点
|
UNION ALL -- 二级父节点
|
||||||
|
|
||||||
|
|
@ -575,7 +579,7 @@
|
||||||
) AS sai_filtered
|
) AS sai_filtered
|
||||||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||||
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
WHERE mt2.parent_id IS NOT NULL and mt.jiju_type = '2'
|
WHERE mt2.parent_id IS NOT NULL and mt.manage_type = 0
|
||||||
|
|
||||||
UNION ALL -- 一级父节点
|
UNION ALL -- 一级父节点
|
||||||
|
|
||||||
|
|
@ -589,7 +593,7 @@
|
||||||
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
INNER JOIN ma_type mt ON mt.type_id = sai_filtered.type_id
|
||||||
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
INNER JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
INNER JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
INNER JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
WHERE mt3.parent_id IS NOT NULL and mt.jiju_type = '2'
|
WHERE mt3.parent_id IS NOT NULL and mt.manage_type = 0
|
||||||
) AS all_nodes
|
) AS all_nodes
|
||||||
);
|
);
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue