公司关系,逻辑优化
This commit is contained in:
@@ -7,6 +7,7 @@ import com.zt.plat.module.base.controller.admin.base.vo.CompanyRelativityPageReq
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelaDeptDO;
|
||||
import com.zt.plat.module.base.dal.dataobject.base.CompanyRelativityDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -27,4 +28,6 @@ public interface CompanyRelativityMapper extends BaseMapperX<CompanyRelativityDO
|
||||
}
|
||||
|
||||
List<CompanyRelaDeptDO> getPageByReq(CompanyRelativityPageReqVO pageReqVO);
|
||||
|
||||
void removeByIds(@Param("ids")List<Long> ids);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public class CompanyRelativityServiceImpl implements CompanyRelativityService {
|
||||
// 校验存在
|
||||
validateCompanyRelativityExists(ids);
|
||||
// 删除
|
||||
companyRelativityMapper.deleteByIds(ids);
|
||||
companyRelativityMapper.removeByIds(ids);
|
||||
}
|
||||
|
||||
private void validateCompanyRelativityExists(List<Long> ids) {
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
left join SPLY_ERP_CPN c on r.ERP_NUM = c.NUM
|
||||
where d.DELETED = 0
|
||||
and d.IS_COMPANY = 1
|
||||
and r.DELETED = 0
|
||||
<if test="name != null">
|
||||
and d.NAME = #{name}
|
||||
</if>
|
||||
@@ -44,4 +43,11 @@
|
||||
and d.DEPT_SOURCE = #{departmentSource}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="removeByIds">
|
||||
delete from SPLY_CPN_REL where ID in
|
||||
<foreach item="ids" collection="list" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user